📄 clssubco.php
字号:
<?
require('session.inc');
require('connect.inc');
if ($usern!=-1)
{
html_header("非法登录,拒绝访问 - ACCESS DENIED",'<META http-equiv="refresh" content="3; url=index.php">');
echo "<td align=right valign=center><br>
Sorry, 您正想非法登录本系统,请正常登录!<br>系统会在3秒后自动返回登录页面。
<br><br><br><a href=index.php>返回登录</a></td>";
html_footer();
}
else
{
?>
<html>
<head>
<title>::: DATABASE 化妆品公司数据库管理系统 - 关闭分公司 :::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="common.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="770" border="0" cellspacing="0" cellpadding="0" align="center" height="450">
<tr>
<td background="images/bg2.jpg">
<table width="770" border="0" cellspacing="0" cellpadding="0" height="450">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="450">
<tr>
<td height="140" class="bigh"><font color=#ff3333>关闭分公司</font></td>
</tr>
<tr>
<td valign=top>
<?
if ($step==0)
{
$str_sql="select stid,stname from STOREHOUSETB where stid > '-1' and isactive = '1';";
$result=mysql_db_query($db,$str_sql,$link_id);
if (!$result) html_error_exit('MySQL查询命令失败!');
else
{
?>
<table width="45%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td>
<form name="form1" method="post" action="clssubco.php?step=1">
<p><b><font face=Arial>Step 1 </font>- 选择要关闭的分公司</b></p>
<p>
<select name="stid">
<?
$html='';
while ($record=mysql_fetch_object($result))
$html.='<option value="'.$record->stid.'">'.$record->stname.'</option>';
echo $html;
?>
</select>
</p>
<p>
<input type="submit" name="Submit" value="关 闭">
<a href=index2.php>返回首页</a> </p>
</form>
</td>
</tr>
</table>
<?
}
}
else
{
if ($step==1)
{
$str_sql="select * from STOREHOUSETB where stid = '$stid';";
$result=mysql_db_query($db,$str_sql,$link_id);
if (!$result) html_error_exit('MySQL查询命令失败!');
else
{
$record=mysql_fetch_object($result);
$stname=$record->stname;
$email=$record->email;
?>
<table width="45%" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td>
<p><b><font face=Arial>Step 2 </font>- 确认关闭</b></p>
<p><b>要关闭的分公司信息</b></p>
<p><b>分公司ID号</b>
<?
echo " - $stid</p><p><b>分公司名称</b> - $stname</p><p><b>分公司邮箱 - </b>$email </p>
<p>
<b><font color=#ff3333>确认关闭 (以后该分公司将无法登录)?</b><br>
<a href=clssubco.php?step=2&stid=$stid>是</a> <a href=clssubco.php?step=0>否</a> <a href=index2.php>返回首页</a></p>
</td>
</tr>
</table>";
}
}
else
{
$str_sql="update STOREHOUSETB set isactive = '0'
where stid = '$stid';";
$result=mysql_db_query($db,$str_sql,$link_id);
if (!$result) html_error_exit('MySQL更新命令失败!');
else
{
echo "<div align=right><br>分公司成功关闭<br>
<br><br><br><a href=clssubco.php?step=0>返回继续关闭</a> <a href=index2.php>返回首页</a></div>";
}
}
}
@mysql_close($link_id);
?>
</td>
</tr>
<tr>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
<tr>
<td valign="bottom" align="right"><font face="Arial"><b>Powered
by <img src="images/php.gif" width="39" height="20" align="absmiddle">
& <img src="images/mysql.gif" width="82" height="20" align="absmiddle"></b></font></td>
<td align="right" valign="bottom" width="200"><font face="Arial">©
<a href="mailto:lonelyp@etang.com">Lonely Passenger</a>,2001<br>
All rights reserved!</font></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -