<?php
/**
 * 自定义导航添加,修改,删除
*/

/****以下代码非专业人员不建议修改***************/
define('EmpireCMSAdmin','1');
define('EmpireCMSAPage','login');

require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require LoadLang("pub/fun.php");
require("../class/delpath.php");
require("../class/copypath.php");
require("../class/t_functions.php");
require("../data/dbcache/class.php");
require("../data/dbcache/MemberLevel.php");


$link=db_connect();
$empire=new mysqlquery();

/**
 * 区分类别,1清空0修改(默认)
*/
$uls    =   $_GET['type'] == 1?'':$_GET['urls'];
//将style存入cookie
esetcookie('style',$_GET['style']);
esetcookie('urls',$_GET['urls']);
$empire->query(" UPDATE {$dbtbpre}enewsmemberadd SET urls='{$_GET['urls']}',style='{$_GET['style']}' WHERE userid = '".getcvar('mluserid')."' ");
if( $empire->sql ){
    echo 'success';
}else{
    echo 'error';
}

db_close();
$empire=null;

?>