📄 index.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/conn.php';
echo '
<html>
<head>
<title>图片管理设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function delete_disk(PIC_ID)
{
msg=\'确认要取消该图片目录么?这不会删除该路径下的文件。\';
if(window.confirm(msg))
{
URL="delete.php?PIC_ID="+PIC_ID;
window.location=URL;
}
}
function menu_code(TYPE,ID)
{
window.open("/module/menu_code?TYPE="+TYPE+"&ID="+ID,"MENU_CODE","height=270,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=10,left=10,resizable=yes");
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" align="absmiddle"><span class="big3"> 新建图片目录</span><br>
</td>
</tr>
</table>
<div align="center">
<input type="button" value="新建图片目录" class="BigButton" onClick="location=\'new\';" title="新建图片目录">
</div>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_open.gif" align="absmiddle"><span class="big3"> 管理图片目录</span>
</td>
</tr>
</table>
<br>
';
$query = 'SELECT * from PICTURE';
$cursor = exequery ($connection, $query);
$PIC_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$PIC_COUNT;
$PIC_ID = $ROW['PIC_ID'];
$PIC_NAME = $ROW['PIC_NAME'];
$PIC_PATH = $ROW['PIC_PATH'];
$PIC_NAME = str_replace ('<', '<', $PIC_NAME);
$PIC_NAME = str_replace ('>', '>', $PIC_NAME);
$PIC_NAME = stripslashes ($PIC_NAME);
if ($PIC_COUNT == 1)
{
echo '
<table border="0" cellspacing="1" width="90%" class="small" bgcolor="#000000" cellpadding="3" align="center">
<tr class="TableHeader">
<td nowrap align="center">目录名称</td>
<td nowrap align="center">目录路径</td>
<td nowrap align="center">操作</td>
</tr>
';
}
if ($PIC_COUNT % 2 == 1)
{
$TableLine = 'TableLine1';
}
else
{
$TableLine = 'TableLine2';
}
echo ' <tr class="';
echo $TableLine;
echo '">
<td nowrap align="center">';
echo $PIC_NAME;
echo '</td>
<td nowrap>';
echo $PIC_PATH;
echo '</td>
<td nowrap align="center">
<a href="edit.php?PIC_ID=';
echo $PIC_ID;
echo '"> 编辑</a>
<a href="javascript:delete_disk(';
echo $PIC_ID;
echo ');"> 删除</a>
<a href="javascript:menu_code(\'PICTURE\',\'';
echo $PIC_ID;
echo '\')">菜单定义指南</a>
</td>
</tr>
';
}
if ($PIC_COUNT == 0)
{
message ('', '尚无目录');
exit ();
}
echo ' </table>
';
echo '
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -