📄 index.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>个人网址管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript Language="JavaScript">
function CheckForm()
{
if(document.form1.URL_DESC.value=="")
{ alert("说明不能为空!");
return (false);
}
if(document.form1.URL.value=="")
{ alert("网址不能为空!");
return (false);
}
}
function delete_url(URL_ID)
{
msg=\'确认要删除该项网址么?\';
if(window.confirm(msg))
{
URL="delete.php?URL_ID=" + URL_ID;
window.lo';
echo 'cation=URL;
}
}
function delete_all()
{
msg=\'确认要删除所有网址么?\';
if(window.confirm(msg))
{
URL="delete_all.php";
window.location=URL;
}
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="document.form1.URL_NO.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new';
echo '.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 添加个人网址</span>
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="add.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">序号:</td>
<td nowrap class="TableData">
<input type="text" name="URL_NO" class="BigI';
echo 'nput" size="10" maxlength="25">
</td>
<tr>
<td nowrap class="TableData">说明:</td>
<td nowrap class="TableData">
<input type="text" name="URL_DESC" class="BigInput" size="25" maxlength="200">
</td>
</tr>
<tr>
<td nowrap class="TableData">网址:</td>
<td nowrap class="TableData">
<input type="text" name="URL" class="BigInput" size="25" maxlength="200"';
echo ' value="http://">
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input type="submit" value="添加" class="BigButton" title="添加网址" name="button">
<input type="button" value="返回" class="BigButton" onClick="location=\'../\'">
</td>
</form>
</table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" ';
echo '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">';
echo '<s';
echo 'pan class="big3"> 管理个人网址</span>
</td>
</tr>
</table>
<br>
<div align="center">
';
$query = (((''.'SELECT * from URL where USER=\'').$LOGIN_USER_ID).'\' order by URL_NO');
$cursor = exequery ($connection, $query);
$URL_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$URL_COUNT;
$URL_ID = $ROW['URL_ID'];
$URL_NO = $ROW['URL_NO'];
$URL_DESC = $ROW['URL_DESC'];
$URL = $ROW['URL'];
if (($URL_COUNT == 1))
{
echo '
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3">
';
}
echo ' <tr class="TableData">
<td nowrap align="center">';
echo $URL_NO;
echo '</td>
<td nowrap align="center">';
echo $URL_DESC;
echo '</td>
<td nowrap align="center"><A href="';
echo $URL;
echo '" target="_blank">';
echo $URL;
echo '</A></td>
<td nowrap align="center" width="80">
<a href="edit.php?URL_ID=';
echo $URL_ID;
echo '"> 编辑</a>
<a href="javascript:delete_url(\'';
echo $URL_ID;
echo '\');"> 删除</a>
</td>
</tr>
';
}
if ((0 < $URL_COUNT))
{
echo ' <thead class="TableHeader">
<td nowrap align="center">序号</td>
<td nowrap align="center">说明</td>
<td nowrap align="center">网址</td>
<td nowrap align="center">操作</td>
</thead>
<thead class="TableControl">
<td nowrap align="center" colspan="5">
<input type="button" class="BigButton" OnClick="javascript:delete_all();" value="全部删除">
</td>
';
echo ' </thead>
</table>
';
}
else
{
message ('', '尚未添加网址');
}
echo '
</div>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -