<?php
/*
	[Phpup.Net!] (C)2009-2011 Phpup.net.
	This is NOT a freeware, use is subject to license terms

	$Id: admin.class.php 2010-08-24 10:42 $
*/

if(!defined('IN_PHPUP')) {
	exit('Access Denied');
}
?>
<?php include ROOT_PATH.'/views/admin/header.php';?>
<body>
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
	<a href="index.php?con=<?php echo $GLOBALS['setting']['adminpath'];?>&act=admodify" class="add fb"><em>添加广告</em></a>
	</div>
</div>
<div class="table-list">
<TABLE cellpadding="1" cellspacing="1" style="width:700px;margin:auto;">
<thead>
<TR>
	<TH>标题</TH>
	<TH>引用地址</TH>
	<TH>操作</TH>
</TR>
</thead>
<tbody>

<?php foreach($ad['data'] as $key=>$val){?>
<TR class="tr1" id="ad<?php echo $val['id'];?>">
	<TD width="180px">
	<div id="title-<?php echo $val['id'];?>" onmouseover="this.style.backgroundColor='#ff8800';" onmouseout="this.style.backgroundColor='';" onclick="modifyValue('titleinput-<?php echo $val['id'];?>');"><?php echo $val['title'];?>
	</div>
	<input class="hideinput" id="titleinput-<?php echo $val['id'];?>" ondblclick="confirmValue('ad',this.value,'titleinput-<?php echo $val['id'];?>','id');"/>
	</TD>
	<TD>
	<?php $adindex=explode('-',$val['adindex']);?>
	<input style="width:300px;" value="<script language='javascript' src='<?php echo SITE_ROOT;?>/data/adjs/<?php echo $adindex[1];?>.js'></script>"/>
	</TD>
	<td width="100px" align="center">
	<A HREF="index.php?con=<?php echo $GLOBALS['setting']['adminpath'];?>&act=admodify&updateid=<?php echo $val['id'];?>">修改</A>
	<A HREF="index.php?con=<?php echo $GLOBALS['setting']['adminpath'];?>&act=ad&updateid=<?php echo $val['id'];?>" onclick="return confirm('确认删除此条记录？删除后无法恢复');">删除</A>
	</td>
</TR>
<?php }?>
</tbody>
</TABLE>
<div class="pages" style="margin:auto;text-align:center;"><?php echo $ad['pageinfo'];?></div>

</div>
</body>
</html>
