<html><hand>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=<?php echo CHARSET;?>">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta HTTP-EQUIV="Content-Language" CONTENT="<?php echo CHARSET;?>">
<script language='JavaScript' src='admin/img/admin.js'></script>
<link href="admin/img/style.css" rel="stylesheet" type="text/css">
<?php 
if(!defined('IN_ADMIN')) exit('Access Denied');
switch ($action){
	case 'add':
?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=link&action=add' enctype="multipart/form-data">
<tr class=td4><td colspan=2><strong>添加连接</strong></td></tr>
<tr class=td2><td width='20%'><strong>连接名称</strong></td>
<td width='80%'><input name=info[title] maxlength=20 value="" style='height:18px;width:150px'></td></tr>
<tr class=td2><td width='20%'><strong>连接说明</strong></td>
<td width='80%'><input name=info[alt] maxlength=20 value="" style='height:18px;width:150px'></td></tr>
<tr class=td2><td><strong>连接地址</strong></td>
<td><input name=info[url] type=TEXT maxlength=80 style='height:18px;width:150px'></td></tr>
<tr class=td2><td><strong>LOGO地址</strong></td>
<td><input type="file" name="uploadfile" /></td></tr>

<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
<?php 	
	break;
	case 'list':
	?>
<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<tr class=td4><td colspan=4><strong>连接管理</strong></td></tr>
<tr align='center' class=td3>
<td width='30%'>连接名称</td>
<td width='30%'>连接地址</td>
<td width='20%'>LOGO地址</td>
<td width='20%'>操作</td></tr>
<?php 
if(is_array($n) && !empty($n)){
	foreach($n as $ad){ 
	?>
<tr align=center class=td2 onMouseMove="this.className='td3'" onMouseOut="this.className='td2'">
<td><?=$ad['title']?></td>
<td><span ><?=$ad['url']?></span></td>
<td><span ><a href="<?php echo SITE_URL.'/'.$ad['img']?>" >查看</a></span></td>
<td><span class=Font5><a href="?file=link&action=edit&id=<?=$ad['id']?>">修改</a> | <a href="?file=link&action=del&id=<?=$ad['id']?>">删除</a></span></td>
</tr>
<?php }}?>
</table>
<table width='100%' border=0 cellspacing=0 cellpadding=5 style='border-top:1px #C4D8ED solid'>
<tr><td align=center class=td2><?=$dispage;?>
</td>
</tr>
</table>
<?php 	
	break;
	case 'edit':
	?>
	<table width='100%' cellpadding=3 cellspacing=1 class=td1>
<form name='myform' method='post' Action='<?=SCRIPT_NAME;?>?file=link&action=edit' enctype="multipart/form-data">
<tr class=td4><td colspan=2><strong>修改连接</strong></td></tr>
<input name=id type=hidden value='<?=$ns['id']?>'>
<tr class=td2><td width='20%'><strong>连接名称</strong></td>
<td width='80%'><input name=info[title] maxlength=20 value="<?=$ns['title']?>" style='height:18px;width:150px'></td></tr>
<tr class=td2><td width='20%'><strong>连接说明</strong></td>
<td width='80%'><input name=info[alt] maxlength=20 value="<?=$ns['alt']?>" style='height:18px;width:150px'></td></tr>
<tr class=td2><td><strong>连接地址</strong></td>
<td><input name=info[url] type=TEXT maxlength=80 value="<?=$ns['url']?>" style='height:18px;width:150px'></td></tr>
<tr class=td2><td><strong>LOGO地址</strong></td>
<td><input type="file" name="uploadfile" /> 不修改请留空</td></tr>

<tr class=td2><td></td>
<td><input type=submit value=' 提 交 ' name='dosubmit'></td></tr>
</form>
</table>
	<?php 
	break;
}
?>