index.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 113 行
PHP
113 行
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>邮政编码查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript>
function CheckForm1()
{
if(document.form1.AREA.value=="")
{
alert("查询条件不能为空");
return false;
}
else
return true;
}
function CheckForm2()
{
if(document.form2.POST_NO.value=="")
{
alert("查询条件不能为空");
return false;
}
else
return true;
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="do';
echo 'cument.form1.AREA.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/infofind.gif" WIDTH="22" HEIGHT="20" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 邮政编码查询</span>
</td>
</tr>
</table>
<br>
<div align="center">
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td nowrap align="center" colspan="5"><b>省(直辖市/自治区)</b></td>
</tr>
';
$query = 'SELECT PROVINCE from POST_TEL where length(POST_NO)=6 group by PROVINCE';
$cursor = exequery ($connection, $query);
$PROVINCE_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$PROVINCE_COUNT;
$PROVINCE = $ROW['PROVINCE'];
if ((($PROVINCE_COUNT % 5) == 1))
{
echo ' <tr class="TableData">
';
}
echo ' <td nowrap align="center"><a href="post_info.php?PROVINCE=';
echo $PROVINCE;
echo '">';
echo $PROVINCE;
echo '</td>
';
if ((($PROVINCE_COUNT % 5) == 0))
{
echo ' </tr>
';
continue;
}
}
$REMAIN = (5 - ($PROVINCE_COUNT % 5));
if (($REMAIN == 5))
{
$REMAIN = 0;
}
for ($I = 1; ($I <= $REMAIN); ++$I)
{
echo ' <td nowrap align="center"> </td>
';
}
echo ' </tr>
</table>
<br>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3">
<tr class="TableHeader">
<td colspan="3" align="center"><b>模糊查询</b></td>
</tr>
<form name=form1 method="post" action="search.php" onsubmit="return CheckForm1();">
<tr class="TableData">
<td>市(县/区)名称包含:</td>
<td align="center"><input type="text" name="AREA';
echo '" size="20" class="BigInput"></td>
<td align="center"><input type="submit" value="查询" class="BigButton" title="进行查询" name="button"></td>
</tr>
</form>
<form name=form2 method="post" action="search.php" onsubmit="return CheckForm2();">
<tr class="TableData">
<td>邮政编码等于:</td>
<td align="center"><input type="text" name="POST_NO" size="20" class="BigInput"></td>
<td align="cen';
echo 'ter"><input type="submit" value="查询" class="BigButton" title="进行查询" name="button"></td>
</tr>
</form>
</table>
</div>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?