<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>处理函数</title>
</head>
<body>
<?php
require_once("../../global/connect.php");
if("add"==$_GET["mod"]){
if(mysql_num_rows(mysql_query("select * from content where arctitle='$_POST[arctitle]'"))==0){
$arctitle=strip_tags($_POST["arctitle"]);
$url=strip_tags($_POST["url"]);
$kw=strip_tags($_POST["kw"]);
$sql="insert into content (arctitle,url,channel,belong,similar,soulustate,user,adddate) values ('$arctitle','$url','$_POST[channel]','$kw','$_POST[similar]','$_POST[shoulu]','$_POST[user]',now())";
mysql_query($sql);
$kws=explode(",",str_replace("，",",",$kw));
foreach($kws as $a=>$b){
if($b!=""&&mysql_num_rows(mysql_query("select * from paiming where keyword='$b'"))==0){
$sql="insert into paiming (keyword,ranking1,ranking2,ranking3,ranking4,area,preranking1,zhishu) values ('$b','100','100','100','100','-','100','0')";
mysql_query($sql);
}}
echo "操作成功!<a target='_blank' href='http://localhost/seosystem/main.php'>[进入SEO管理系统]</a>";
}
else
echo "操作失败!".$_POST["arctitle"]."文章已存在。";
}
?>
</body>
</html>
