<?php
include "../CheckUser.php";
include("../comm/db_sql.php");
include("../comm/config.php");
include("../comm/connect.php");
include("../comm/Function.php");

$id= $_GET['id'];
$cation= $_GET['action'];
$Linkname=$_POST['Linkname'];
$LinkUrl=$_POST['LinkUrl'];

$news_query=new mysql_db();
if($cation =="add"  and trim($Linkname)!=="" and trim($LinkUrl)!=="" ){
$list_var_name="Linkname,LinkUrl";
$list_var_value="'$Linkname','$LinkUrl'";
$news_query->table=$db."Links";;  //表名
$news_query->table_mod="1"; 
$news_query->list_var_name=$list_var_name; //变量名
$news_query->list_var_value=$list_var_value;//值
$news_query->query();
@url_jump("add.php","manager.php","返回继续增加分类","返回分类管理中心");
}else
if ($cation=="del" and $id!==""){
	$news_query->table=$db."Links";;  //表名
	$news_query->table_mod="3"; //插入:1;修改:2;删除:3;建表,4;查询:5
	$news_query->table_where="Id=$id";
	$news_query->query();
	@url_jump("manager.php","add.php","返回分类管理","返回继续增加分类");
}else
if($cation=="edit" and $id!=="" and trim($Linkname)!=="" and trim($LinkUrl)!=="" ){
$news_query->update_value="Linkname='$Linkname',LinkUrl='$LinkUrl'";
$news_query->table=$db."Links";;  //表名
$news_query->table_mod="2"; 
$news_query->table_where="Id=$id";
$news_query->query();
@url_jump("manager.php","add.php","返回分类管理中","返回继续增加分类");
}else{
	@url_error("manager.php","add.php","返回分类管理","返回继续增加分类","错误的操作!");
}
$news_query=NULL;
?>