【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“AgentsSave.php”一文,供大家参考学习
<meta name="generator" content="Namo WebEditor(Trial)">
<?
if($_SESSION[Admin]<="2"){echo("<meta http-equiv=refresh content=\"0;URL=Login.php\"></meta>");}
else
{
include_once("../Config/Config.php");
include_once("../Config/Connect.php");
include_once("../Config/Pageset.php");
if($_POST[Agents_Edit])
{
$sql="update Agents set Agents_Agent='$_POST[Agents_Agent]',Agents_address='$_POST[Agents_address]',Agents_contact='$_POST[Agents_contact]',Agents_fax='$_POST[Agents_fax]',Agents_email='$_POST[Agents_email]',Agents_name='$_POST[Agents_name]',Agents_mobile='$_POST[Agents_mobile]' where Agents_id='$_POST[Agents_id]'";
if(mysql_query($
sql,$link))
{
echo("作者群Θ!!<br>---安装方式---");
echo("<meta http-equiv=refresh content=\"3;URL=../admin.php?about=Agents\"></meta>");
}
}
else
{
if($_POST[Agents_Agent]!="" and $_POST[Agents_name]!="")
{
$sql=" insert into Agents (Agents_Agent,Agents_address,Agents_contact,Agents_fax,Agents_email,Agents_name,Agents_mobile) values ('$_POST[Agents_Agent]','$_POST[Agents_address]','$_POST[Agents_contact]','$_POST[Agents_fax]','$_POST[Agents_email]','$_POST[Agents_name]','$_POST[Agents_mobile]')";
if(
mysql_query($sql,$link))
{
echo("精彩片段!!<br>---精彩回放---");
echo("<meta http-equiv=refresh content=\"3;URL=../admin.php?about=Agents\"></meta>");
}
}
else
{
echo("
网络销售站");
}
}
}
?>