function saveconfig() { global $db; $alipay_account = $_POST['alipay_account']; $alipay_key = $_POST['alipay_key']; $alipay_partner = $_POST['alipay_partner']; $array = array('alipay_account' => $alipay_account, 'alipay_key' => $alipay_key, 'alipay_partner' => $alipay_partner); $db->update('ve123_aipay', $array, "id='1'"); jsalert('修改成功!'); }
function saveform() { global $db; $adminname = $_POST["adminname"]; $password = $_POST["password"]; if ($password == "") { jsalert("���벻��Ϊ��,����������!"); die; } else { $db->query("update ve123_admin set adminname='{$adminname}',password='******'"); jsalert("��������,���ס!"); } }
function checklogin() { global $db; $_obfuscate_RLkTYUq0nZlJ = htmlspecialchars($_POST['adminname']); $_obfuscate_LyySC3IF7Iÿ = htmlspecialchars($_POST['password']); $_obfuscate_xs33Yt_k = $db->query("select * from ve123_admin where adminname='" . $_obfuscate_RLkTYUq0nZlJ . "' and password='******'"); $_obfuscate_Ybai = $db->num_rows($_obfuscate_xs33Yt_k); if (0 < $_obfuscate_Ybai) { $_obfuscate_SF4ÿ = $db->fetch_array($_obfuscate_xs33Yt_k); $_obfuscate_kIVhqJkÿ = array('lastloginip' => $_obfuscate_SF4ÿ['loginip'], 'loginip' => ip(), 'lastlogintime' => $_obfuscate_SF4ÿ['logintime'], 'logintime' => date('Y-y-d H:i:s')); $db->update('ve123_admin', $_obfuscate_kIVhqJkÿ, 'admin_id=' . $_obfuscate_SF4ÿ['admin_id']); setcookie('adminname', $_obfuscate_RLkTYUq0nZlJ); header('location:index.php?somao=ok'); } else { jsalert('Óû§Ãû»òÃÜÂë´íÎó!', 'lg.php'); } }
function checklogin() { global $db; $adminname = htmlspecialchars($_POST["adminname"]); $password = htmlspecialchars($_POST["password"]); $result = $db->query("select * from ve123_admin where adminname='{$adminname}' and password='******'"); $num = $db->num_rows($result); if ($num > 0) { $rs = $db->fetch_array($result); $array = array('lastloginip' => $rs["loginip"], 'loginip' => ip(), 'lastlogintime' => $rs["logintime"], 'logintime' => date("Y-y-d H:i:s")); $db->update("ve123_admin", $array, "admin_id={$rs['admin_id']}"); setcookie("adminname", $adminname); header("location:index.php"); } else { jsalert("用户名或密码错误!", "login.php"); } }
function saveconfig() { global $db; $default_point = intval($_POST['default_point']); $zs_points = intval($_POST['zs_points']); $getpoints = my_addslashes($_POST['getpoints']); $array = array('default_point' => $default_point, 'getpoints' => $getpoints, 'zs_points' => $zs_points); $db->update('ve123_zz_config', $array, "config_id='1'"); $config = $db->get_one('select * from ve123_zz_config limit 1'); $str .= '<?php' . chr(13) . chr(10); $str .= "\$zz_config['default_point']=" . $default_point . ';' . chr(13) . chr(10); $str .= "\$zz_config['zs_points']=" . $zs_points . ';' . chr(13) . chr(10); $str .= "\$zz_config['getpoints']=\"" . $getpoints . "\";" . chr(13) . chr(10); $str .= '?>'; $fp = @fopen('../cache/zz_config.php', 'w') or die('写方式打开文件失败,请检查程序目录是否为可写'); @fputs($fp, $str) or die('文件写入失败,请检查程序目录是否为可写'); @fclose($fp); jsalert('修改成功!'); }
function saveconfig() { global $db; $default_point = intval($_POST["default_point"]); $zs_points = intval($_POST["zs_points"]); $getpoints = my_addslashes($_POST["getpoints"]); $array = array('default_point' => $default_point, 'getpoints' => $getpoints, 'zs_points' => $zs_points); $db->update("ve123_tg_config", $array, "config_id='1'"); $config = $db->get_one("select * from ve123_tg_config limit 1"); $str .= "<?php" . chr(13) . chr(10); $str .= "\$tg_config['default_point']=" . $default_point . ";" . chr(13) . chr(10); $str .= "\$tg_config['zs_points']=" . $zs_points . ";" . chr(13) . chr(10); $str .= "\$tg_config['getpoints']=\"" . $getpoints . "\";" . chr(13) . chr(10); $str .= "?>"; $fp = @fopen("../cache/tg_config.php", "w") or die("写方式打开文件失败,请检查程序目录是否为可写"); //配置conn.php文件 @fputs($fp, $str) or die("文件写入失败,请检查程序目录是否为可写"); @fclose($fp); jsalert("修改成功!"); }
function checklogin() { global $db; $adminname = htmlspecialchars($_POST['adminname']); $password = htmlspecialchars($_POST['password']); $imagecode = trim(HtmlReplace($_POST['entered_imagecode'])); if ($_SESSION['dd_ckstr'] != $imagecode) { jsalert('验证码错误!', 'login.php'); break; } $result = $db->query("select * from ve123_admin where adminname='{$adminname}' and password='******'"); $num = $db->num_rows($result); if ($num > 0) { $rs = $db->fetch_array($result); $array = array('lastloginip' => $rs['loginip'], 'loginip' => ip(), 'lastlogintime' => $rs['logintime'], 'logintime' => date('Y-y-d H:i:s')); $db->update('ve123_admin', $array, "admin_id={$rs['admin_id']}"); setcookie('adminname', $adminname); header('location:index.php'); } else { jsalert('用户名或密码错误!', 'login.php'); } }
} else { echo jsalert("您没有填写广告内容,返回重新填写!", "adsadmin.php"); exit; } } if ($action == 'edit') { $aid = $_POST['aid']; $adsbody = daddslashes(trim($_POST['editadsbody'])); $position = $_POST['editposition']; if ($adsbody) { $db->query("UPDATE et_ads SET position='{$position}',adbody='{$adsbody}' WHERE ad_id='{$aid}'"); @unlink(ET_ROOT . "/include/cache/ads.cache.php"); echo jsalert("广告位更新成功!", "adsadmin.php"); exit; } else { echo jsalert("您没有填写广告内容,返回重新填写!", "adsadmin.php"); exit; } } if ($act == 'del') { $adid = $_GET['adid']; $db->query("DELETE FROM et_ads WHERE ad_id='{$adid}'"); @unlink(ET_ROOT . "/include/cache/ads.cache.php"); header("Location: adsadmin.php"); exit; } $query = $db->query("SELECT * FROM et_ads ORDER BY ad_id DESC"); while ($data = $db->fetch_array($query)) { $ads[] = array("ad_id" => $data['ad_id'], "position" => $data['position'], "adbody" => $data['adbody']); } include $template->getfile('adsadmin.htm');
<?php define('is_admin_path', 'yes'); include '../common.inc.php'; if ($admin_login != "yes" || $my[isadmin] != 1) { header("Location: login.php"); } if ($action == "save") { $cmail_server = daddslashes(trim($_POST['mail_server'])); $cmail_port = daddslashes(trim($_POST['mail_port'])); $cmail_name = daddslashes(trim($_POST['mail_name'])); $cmail_user = daddslashes(trim($_POST['mail_user'])); $cmail_pass = daddslashes(trim($_POST['mail_pass'])); $db->query("UPDATE et_settings SET mail_server = '{$cmail_server}',mail_port='{$cmail_port}',mail_name='{$cmail_name}',mail_user='******',mail_pass='******'"); @unlink(ET_ROOT . "/include/cache/setting.cache.php"); echo jsalert("提示:邮件服务器配置完成", "mailconf.php"); exit; } if ($act == "testmail") { include "../include/mail.class.php"; $title = iconv("utf-8", "gbk", "EasyTalk邮箱测试"); $send = iconv("utf-8", "gbk", "这是一封EasyTalk邮箱测试邮件!"); sendmail($mail_name, $title, $send); echo jsalert("提示:测试邮件已发送,请注意验收", "mailconf.php"); exit; } include $template->getfile('mailconf.htm');
function saveform() { global $db; $url = trim($_POST['url']); $submit_id = $_POST['submit_id']; $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('url' => $url); $db->update('ve123_url_submit', $array, "submit_id='{$submit_id}'"); jsalert('修改成功'); } else { $array = array('url' => $url, 'ip' => ip()); $db->insert('ve123_url_submit', $array); jsalert('提交成功'); } }
function del() { global $db; $link_id = intval($_GET["link_id"]); $db->query("delete from ve123_links where link_id='{$link_id}'"); jsalert("删除成功"); }
function dell_links($url) { global $db; $db->query("delete from ve123_links where url like '%" . getdomain($url) . "%'"); $db->query("delete from ve123_links_temp"); jsalert("清除成功"); }
function saveform() { global $db, $config; $title = addslashes(HtmlReplace(trim($_POST['title']))); $content = trim($_POST['content']); $url = HtmlReplace(trim($_POST['url'])); $sortid = intval($_POST['sortid']); $about_id = intval($_POST['about_id']); $urlid = intval($_POST['urlid']); $do_action = HtmlReplace($_POST['do_action']); $is_show = $_POST['is_show']; ob_start(); if ($do_action == 'modify') { $array = array('title' => $title, 'urlid' => $urlid, 'content' => $content, 'url' => $url, 'sortid' => $sortid, 'is_show' => $is_show); $db->update('ve123_fenlei', $array, "about_id='{$about_id}'"); jsalert('修改成功'); } else { $array = array('title' => $title, 'urlid' => $urlid, 'content' => $content, 'url' => $url, 'sortid' => $sortid, 'is_show' => $is_show); $db->insert('ve123_fenlei', $array); jsalert('提交成功'); } }
function saveconfig() { global $db; $name = HtmlReplace($_POST["name"]); $user_agent = HtmlReplace($_POST["user_agent"]); $adtitle = $_POST["adtitle"]; $copyright = $_POST["copyright"]; $icp = HtmlReplace($_POST["icp"]); $url = HtmlReplace($_POST["url"]); $status_content = HtmlReplace($_POST["status_content"]); $statcode = $_POST["statcode"]; $Keywords = HtmlReplace($_POST["Keywords"]); $description = $_POST["description"]; $telephone = $_POST["telephone"]; $qq = $_POST["qq"]; $spider_depth = intval($_POST["spider_depth"]); $is_tijiao_shoulu = $_POST["is_tijiao_shoulu"]; $filter_word = $_POST["filter_word"]; $array = array('name' => $name, 'user_agent' => $user_agent, 'adtitle' => $adtitle, 'copyright' => $copyright, 'icp' => $icp, 'statcode' => $statcode, 'url' => $url, 'status_content' => $status_content, 'Keywords' => $Keywords, 'description' => $description, 'telephone' => $telephone, 'qq' => $qq, 'is_tijiao_shoulu' => $is_tijiao_shoulu, 'spider_depth' => $spider_depth, 'filter_word' => $filter_word); $db->update("ve123_siteconfig", $array, "config_id='1'"); $config = $db->get_one("select * from ve123_siteconfig limit 1"); $str .= "<?php" . chr(13) . chr(10); $str .= "\$config['name']=\"" . $name . "\";" . chr(13) . chr(10); $str .= "\$config['user_agent']=\"" . $user_agent . "\";" . chr(13) . chr(10); $str .= "\$config['adtitle']=\"" . $adtitle . "\";" . chr(13) . chr(10); $str .= "\$config['copyright']=\"" . $copyright . "\";" . chr(13) . chr(10); $str .= "\$config['icp']=\"" . $icp . "\";" . chr(13) . chr(10); $str .= "\$config['url']=\"" . $url . "\";" . chr(13) . chr(10); $str .= "\$config['status_content']=\"" . $status_content . "\";" . chr(13) . chr(10); $str .= "\$config['statcode']=\"" . addslashes($statcode) . "\";" . chr(13) . chr(10); $str .= "\$config['Keywords']=\"" . $Keywords . "\";" . chr(13) . chr(10); $str .= "\$config['description']=\"" . $description . "\";" . chr(13) . chr(10); $str .= "\$config['telephone']=\"" . $telephone . "\";" . chr(13) . chr(10); $str .= "\$config['qq']=\"" . $qq . "\";" . chr(13) . chr(10); $str .= "\$config['is_tijiao_shoulu']=\"" . $is_tijiao_shoulu . "\";" . chr(13) . chr(10); $str .= "\$config['spider_depth']=" . $spider_depth . ";" . chr(13) . chr(10); $str .= "\$config['author']=\"" . $config["author"] . "\";" . chr(13) . chr(10); $str .= "\$config['copyright']=\"" . $copyright . "\";" . chr(13) . chr(10); $str .= "\$config['filter_word']=" . var_export(explode(",", $filter_word), true) . ";" . chr(13) . chr(10); $str .= "?>"; $fp = @fopen("../cache/site_config.php", "w") or die("写方式打开文件失败,请检查程序目录是否为可写"); //配置conn.php文件 @fputs($fp, $str) or die("文件写入失败,请检查程序目录是否为可写"); @fclose($fp); jsalert("修改成功!"); }
function saveform() { global $db; $title = trim($_POST['title']); $siteurl = trim($_POST['siteurl']); $type = trim($_POST['type']); $content = trim($_POST['content']); $ad_id = $_POST['ad_id']; $sortid = intval($_POST['sortid']); $is_show = intval($_POST['is_show']); $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('title' => $title, 'siteurl' => $siteurl, 'type' => $type, 'content' => $content, 'sortid' => $sortid, 'is_show' => $is_show); $db->update('ve123_ad', $array, "ad_id='{$ad_id}'"); jsalert('Ð޸ijɹ¦'); } else { $array = array('title' => $title, 'siteurl' => $siteurl, 'type' => $type, 'content' => $content, 'sortid' => $sortid, 'is_show' => $is_show); $db->insert('ve123_ad', $array); jsalert('Ìá½»³É¹¦'); } }
function saveform() { global $db; $user_name = trim($_POST['user_name']); $password = trim($_POST['password']); $email = trim($_POST['email']); $user_group = trim($_POST['user_group']); $user_id = intval($_POST['user_id']); $points = trim($_POST['points']); $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('user_name' => $user_name, 'password' => md5($password), 'email' => $email, 'user_group' => $user_group, 'user_id' => $user_id, 'points' => $points); $db->update('ve123_zz_user', $array, "user_id='{$user_id}'"); jsalert('修改成功'); } else { $array = array('user_name' => $user_name, 'password' => md5($password), 'email' => $email, 'user_group' => $user_group, 'user_id' => $user_id, 'points' => $points); $db->insert('ve123_zz_user', $array); jsalert('提交成功'); } }
function saveform() { global $db; $title = trim($_POST["title"]); $content = trim($_POST["content"]); $gid = $_POST["gid"]; $do_action = $_POST["do_action"]; if ($do_action == "modify") { $array = array('title' => $title, 'content' => $content); $db->update("ve123_guestbook", $array, "gid='{$gid}'"); jsalert("修改成功"); } else { $array = array('title' => $title, 'content' => $content); $db->insert("ve123_guestbook", $array); jsalert("提交成功"); } }
function saveconfig() { global $db; $name = HtmlReplace($_POST["name"]); $user_agent = HtmlReplace($_POST["user_agent"]); $adtitle = $_POST["adtitle"]; $copyright = $_POST["copyright"]; $url = HtmlReplace($_POST["url"]); $searchcode = $_POST["searchcode"]; $status_content = HtmlReplace($_POST["status_content"]); $statcode = $_POST["statcode"]; $description = $_POST["description"]; $notice = HtmlReplace($_POST["notice"]); $keywords = HtmlReplace($_POST["keywords"]); $telephone = $_POST["telephone"]; $qq = $_POST["qq"]; $array = array('name' => $name, 'keywords' => $keywords, 'adtitle' => $adtitle, 'copyright' => $copyright, 'icp' => $icp, 'statcode' => $statcode, 'url' => $url, 'searchcode' => $searchcode, 'status_content' => $status_content, 'description' => $description, 'telephone' => $telephone, 'qq' => $qq, 'notice' => $notice); $db->update("ve123_dh_siteconfig", $array, "sid='1'"); jsalert("修改成功!"); }
function saveform() { global $db, $config; $title = addslashes(HtmlReplace(trim($_POST['title']))); $content = my_addslashes(trim($_POST['content'])); $filename = HtmlReplace(trim($_POST['filename'])); $url = HtmlReplace(trim($_POST['url'])); $sortid = intval($_POST['sortid']); $about_id = intval($_POST['about_id']); $do_action = HtmlReplace($_POST['do_action']); $is_show = $_POST['is_show']; ob_start(); require 'temp/open.php'; $str = ob_get_contents(); ob_end_clean(); $str = stripslashes($str); file_put_contents('../tg/html/' . $filename . '.html', $str); if ($do_action == 'modify') { $array = array('title' => $title, 'content' => $content, 'url' => $url, 'filename' => $filename, 'sortid' => $sortid, 'is_show' => $is_show); $db->update('ve123_tg_open', $array, "about_id='{$about_id}'"); jsalert('修改成功'); } else { $array = array('title' => $title, 'content' => $content, 'url' => $url, 'filename' => $filename, 'sortid' => $sortid, 'is_show' => $is_show); $db->insert('ve123_tg_open', $array); jsalert('提交成功'); } }
function del() { global $db; $db->query("delete from ve123_links where title=''"); jsalert('删除成功'); }
function dell_links($url) { global $db; $db->query("delete from ve123_links where url like '%" . $url . "%'"); jsalert('删除成功'); }
function saveform() { global $db; $title = trim($_POST["title"]); $url = trim($_POST["url"]); $sort_id = intval($_POST["sort_id"]); $link_id = intval($_POST["link_id"]); $do_action = $_POST["do_action"]; if ($do_action == "modify") { $array = array('title' => $title, 'url' => $url, 'sort_id' => $sort_id); $db->update("ve123_dh_goodlinks", $array, "link_id='{$link_id}'"); jsalert("修改成功"); } else { $array = array('title' => $title, 'url' => $url, 'sort_id' => $sort_id); $db->insert("ve123_dh_goodlinks", $array); jsalert("提交成功"); } }
function saveform() { global $db; $keywords = trim($_POST["keywords"]); $price = trim($_POST["price"]); $key_id = intval($_POST["key_id"]); $do_action = $_POST["do_action"]; if ($do_action == "modify") { $array = array('keywords' => $keywords, 'price' => $price); $db->update("ve123_zz_set_keywords", $array, "key_id='{$key_id}'"); jsalert("修改成功"); } else { $array = array('keywords' => $keywords, 'price' => $price); $db->insert("ve123_zz_set_keywords", $array); jsalert("提交成功"); } }
function saveform() { global $db; $keyword = trim($_POST['keyword']); $kid = $_POST['kid']; $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('keyword' => $keyword); $db->update('ve123_search_keyword', $array, "kid='{$kid}'"); jsalert('修改成功'); } else { $array = array('keyword' => $keyword); $db->insert('ve123_search_keyword', $array); jsalert('提交成功'); } }
echo jsalert("此电子邮件已存在,不能使用!", "useradmin.php?act=adduser"); exit; } if (StrLenW($add_pass) < 6 || StrLenW($add_pass) > 20) { echo jsalert("密码长度应该大于6个字符小于20个字符!", "useradmin.php?act=adduser"); exit; } $db->query("INSERT INTO et_users (user_name,nickname,password,mailadres,signupdate,isadmin) VALUES ('{$add_uname}','{$add_nickname}','" . md5(md5($add_pass)) . "','{$add_email}','{$addtime}','{$add_admin}')"); echo jsalert("提示:会员添加成功!", "useradmin.php"); exit; } if ($action == "user_edit") { $edit_id = $_POST["edit_id"]; $edit_pass = $_POST["edit_pass"]; $edit_email = daddslashes(trim($_POST["edit_email"])); $edit_admin = $_POST["edit_admin"]; $edit_nickname = daddslashes(trim($_POST["edit_nickname"])); $edit_close = $_POST["edit_close"]; if (!empty($edit_pass)) { $db->query("UPDATE et_users SET nickname='{$edit_nickname}',password='******',mailadres='{$edit_email}',isadmin='{$edit_admin}',userlock='{$edit_close}' WHERE user_id='{$edit_id}'"); } else { $db->query("UPDATE et_users SET nickname='{$edit_nickname}',mailadres='{$edit_email}',isadmin='{$edit_admin}',userlock='{$edit_close}' WHERE user_id='{$edit_id}'"); } echo jsalert("提示:会员资料修改成功!", "useradmin.php?u_id={$edit_id}&act=search"); exit; } include $template->getfile('useradmin.htm'); ?>
function saveconfig() { global $db; $name = HtmlReplace($_POST['name']); $user_agent = HtmlReplace($_POST['user_agent']); $adtitle = $_POST['adtitle']; $copyright = $_POST['copyright']; $url = HtmlReplace($_POST['url']); $searchcode = $_POST['searchcode']; $status_content = HtmlReplace($_POST['status_content']); $statcode = $_POST['statcode']; $description = $_POST['description']; $notice = HtmlReplace($_POST['notice']); $keywords = HtmlReplace($_POST['keywords']); $telephone = $_POST['telephone']; $qq = $_POST['qq']; $array = array('name' => $name, 'keywords' => $keywords, 'adtitle' => $adtitle, 'copyright' => $copyright, 'icp' => $icp, 'statcode' => $statcode, 'url' => $url, 'searchcode' => $searchcode, 'status_content' => $status_content, 'description' => $description, 'telephone' => $telephone, 'qq' => $qq, 'notice' => $notice); $db->update('ve123_dh_siteconfig', $array, "sid='1'"); jsalert('修改成功!'); }
function saveform() { global $db, $config; $title = addslashes(HtmlReplace(trim($_POST["title"]))); $content = trim($_POST["content"]); $filename = HtmlReplace(trim($_POST["filename"])); $url = HtmlReplace(trim($_POST["url"])); $sortid = intval($_POST["sortid"]); $about_id = intval($_POST["about_id"]); $do_action = HtmlReplace($_POST["do_action"]); $is_show = $_POST["is_show"]; ob_start(); require "temp/a.php"; $str = ob_get_contents(); ob_end_clean(); $str = stripslashes($str); file_put_contents("../a/" . $filename . ".html", $str); if ($do_action == "modify") { $array = array('title' => $title, 'content' => $content, 'url' => $url, 'filename' => $filename, 'sortid' => $sortid, 'is_show' => $is_show); $db->update("ve123_about", $array, "about_id='{$about_id}'"); jsalert("修改成功"); } else { $array = array('title' => $title, 'content' => $content, 'url' => $url, 'filename' => $filename, 'sortid' => $sortid, 'is_show' => $is_show); $db->insert("ve123_about", $array); jsalert("提交成功"); } }
$filename = date("Ymd", time()) . "_" . $_POST['tablename']; $sql = ""; } } } if ($sql != "") { $filename .= "_v" . $p . ".sql"; if (write_file($sql, $filename)) { $msgs = "表-" . $_POST['tablename'] . "-卷-" . $p . "-数据备份完成,生成备份文件./backup/{$filename}"; } } echo jsalert($msgs, "backup.php"); exit; } if ($_POST['weizhi'] == "localpc" && $_POST['fenjuan'] == 'yes') { $msgs = "只有选择备份到服务器,才能使用分卷备份功能"; echo jsalert($msgs, "backup.php"); exit; } if ($_POST['fenjuan'] == "yes" && !$_POST['filesize']) { $msgs = "您选择了分卷备份功能,但未填写分卷文件大小"; echo jsalert($msgs, "backup.php"); exit; } if ($_POST['weizhi'] == "server" && !writeable("./backup")) { $msgs = "备份文件存放目录'./backup'不可写,请修改目录属性"; echo jsalert($msgs, "backup.php"); exit; } } include $template->getfile('backup.htm');
function saveform() { global $db; $title = trim($_POST['title']); $url = trim($_POST['url']); $sort_id = intval($_POST['sort_id']); $link_id = intval($_POST['link_id']); $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('title' => $title, 'url' => $url, 'sort_id' => $sort_id); $db->update('ve123_dh_goodlinks', $array, "link_id='{$link_id}'"); jsalert('修改成功'); } else { $array = array('title' => $title, 'url' => $url, 'sort_id' => $sort_id); $db->insert('ve123_dh_goodlinks', $array); jsalert('提交成功'); } }
function saveform() { global $db; $keywords = trim($_POST['keywords']); $title = trim($_POST['title']); $url = trim($_POST['url']); $description = trim($_POST['description']); $jscode = my_addslashes(trim($_POST['jscode'])); $price = trim($_POST['price']); $pic = trim($_POST['pic']); $link_id = intval($_POST['link_id']); $do_action = $_POST['do_action']; if ($do_action == 'modify') { $array = array('keywords' => $keywords, 'title' => $title, 'url' => $url, 'description' => $description, 'jscode' => $jscode, 'price' => $price, 'pic' => $pic); $db->update('ve123_zz_open', $array, "link_id='{$link_id}'"); jsalert('修改成功'); } else { $array = array('keywords' => $keywords, 'title' => $title, 'url' => $url, 'description' => $description, 'jscode' => $jscode, 'price' => $price, 'pic' => $pic); $db->insert('ve123_zz_open', $array); jsalert('提交成功'); } }