index.php

来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 153 行

PHP
153
字号
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>公共网址设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script 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.location=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.gif" align="absmiddle"><span 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="BigInput" 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" value="http://">
	</td>
 </tr>
 <tr>
	<td nowrap  class="TableControl" colspan="2" align="center">
			<input type="hidden" name="USER" value="">
			<input type="submit" value="添加" class="BigButton" title="添加网址" name="button">
	</td>
</form>
</table>
<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>
<div align="center">
';
$query = 'SELECT * from URL where USER=\'\' order by URL_NO';
$connection = openconnection ();
$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>
	</thead>
	</table>
';
}
else
{
	message ('', '尚未添加网址');
}
echo '
</div>
</body>
</html>';
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?