Exemplo n.º 1
0
 function setok_f()
 {
     sys_popedom($this->module_sign . ":setting", "tpl");
     $rs = array();
     if ($_POST && is_array($_POST) && count($_POST) > 0) {
         foreach ($_POST as $key => $value) {
             $rs[$key] = $this->trans_lib->safe($key);
         }
     }
     $file = ROOT_DATA . "system_" . $_SESSION["sys_lang_id"] . ".php";
     $_sys = array();
     if (file_exists($file)) {
         include $file;
     }
     //判断邮件密码及FTP密码
     if ($rs["smtp_pass"] && strlen($rs["smtp_pass"]) == strlen($_sys["smtp_pass"]) && substr($rs["smtp_pass"], 0, 1) == substr($_sys["smtp_pass"], 0, 1) && substr($rs["smtp_pass"], -1) == substr($_sys["smtp_pass"], -1)) {
         $rs["smtp_pass"] = $_sys["smtp_pass"];
     }
     if ($rs["ftp_pass"] && strlen($rs["ftp_pass"]) == strlen($_sys["ftp_pass"]) && substr($rs["ftp_pass"], 0, 1) == substr($_sys["ftp_pass"], 0, 1) && substr($rs["ftp_pass"], -1) == substr($_sys["ftp_pass"], -1)) {
         $rs["ftp_pass"] = $_sys["ftp_pass"];
     }
     //判断FTP复选框
     $rs["ftp_pasv"] = $this->trans_lib->checkbox("ftp_pasv");
     $this->file_lib->vi($rs, ROOT_DATA . "system_" . $_SESSION["sys_lang_id"] . ".php", "_sys");
     error("数据更新成功!", site_url("setting"));
 }
Exemplo n.º 2
0
 function index_f()
 {
     //设置是否有权限执行此操作
     sys_popedom("html:list", "tpl");
     $this->auto_load();
     $this->cate_m->langid($_SESSION["sys_lang_id"]);
     $this->cate_m->get_all();
     $this->cate_m->format_list(0, 0);
     $catelist = $this->cate_m->flist();
     if (!$catelist) {
         $catelist = array();
     }
     foreach ($catelist as $key => $value) {
         $value["space"] = "";
         for ($i = 0; $i < $value["level"]; $i++) {
             $value["space"] .= "  ";
         }
         $catelist[$key] = $value;
     }
     $module_list = $this->module_m->all_module();
     //取得模块列表
     $cate_html = "<select name='typeid' id='typeid'>";
     $cate_html .= "<option value='0:0'>全部,不限制…</option>";
     $cate_html .= "<optgroup label='选择模块'>";
     $new_mlist = array();
     foreach ($module_list as $key => $value) {
         if ($value["ctrl_init"] == "list" && ($value["if_list"] || $value["if_msg"])) {
             $new_mlist[] = $value;
             $cate_html .= "<option value='" . $value["id"] . ":0'";
             if ($typeid == $value["id"] . ":0") {
                 $cate_html .= " selected";
             }
             $cate_html .= ">" . $value["title"];
             if (!$value["status"]) {
                 $cate_html .= "(已停用)";
             }
             $cate_html .= "</option>";
         }
     }
     $cate_html .= "</optgroup>";
     $cate_html .= "<optgroup label='选择分类'>";
     foreach ($catelist as $key => $value) {
         $cate_html .= "<option value='" . $value["module_id"] . ":" . $value["id"] . "'";
         if ($typeid == $value["module_id"] . ":" . $value["id"]) {
             $cate_html .= " selected";
         }
         $cate_html .= ">【" . $value["title"] . "】" . $value["space"] . $value["cate_name"];
         if (!$value["status"]) {
             $cate_html .= "(已停用)";
         }
         $cate_html .= "</option>";
     }
     $cate_html .= "</optgroup>";
     $cate_html .= "</select>";
     $this->tpl->assign("cate_html", $cate_html);
     $this->tpl->display("create_html/list.html");
 }
Exemplo n.º 3
0
 function del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("对不起,你的操作有错误!");
     }
     sys_popedom("subscribers:delete", "ajax");
     $this->subscribers_m->del($id);
     exit("ok");
 }
Exemplo n.º 4
0
 function del_f()
 {
     $id = $this->trans_lib->safe("id");
     if (!$id) {
         exit("Error:操作非法,没有指定ID");
     }
     sys_popedom("hotlink:delete", "ajax");
     $this->hotlink_m->del($id);
     exit("ok");
 }
Exemplo n.º 5
0
 function index_f()
 {
     sys_popedom("excel:list", "tpl");
     $condition = "ctrl_init='list'";
     $mlist = $this->module_m->all_module(0, $condition);
     $this->tpl->assign("mlist", $mlist);
     //取得附件信息
     $filelist = $this->file_list();
     $this->tpl->assign("filelist", $filelist);
     //读取excel文件
     $this->tpl->display("excel/list.html");
 }
Exemplo n.º 6
0
 function setok_f()
 {
     sys_popedom($this->module_sign . ":setting", "tpl");
     $rs = array();
     if ($_POST && is_array($_POST) && count($_POST) > 0) {
         foreach ($_POST as $key => $value) {
             $rs[$key] = $this->trans_lib->safe($key);
         }
     }
     $this->file_lib->vi($rs, ROOT_DATA . "system_" . $_SESSION["sys_lang_id"] . ".php", "_sys");
     error("数据更新成功!", site_url("setting"));
 }
Exemplo n.º 7
0
 function index_f()
 {
     sys_popedom("excel_user:list", "tpl");
     $DB_Server = $this->db->host;
     $DB_Username = $this->db->user;
     $DB_Password = $this->db->pass;
     $DB_DBName = $this->db->data;
     $savename = date("YmjHis");
     $Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password) or die("Couldn't connect.");
     mysql_query("Set Names gb2312");
     $file_type = "vnd.ms-excel";
     $file_ending = "xls";
     header("Content-Type: application/{$file_type};charset=utf-8");
     header("Content-Disposition: attachment; filename=" . $savename . ".{$file_ending}");
     //header("Pragma: no-cache");
     $now_date = date("Y-m-j H:i:s");
     $sql = "Select id,username,phone,regdate,status,fxstatus,job,company,bankAccount,cardCode,bankName from " . $this->db->prefix . "user ";
     $ALT_Db = @mysql_select_db($DB_DBName, $Connect) or die("Couldn't select database");
     $result = @mysql_query($sql, $Connect) or die(mysql_error());
     $sep = "\t";
     for ($i = 0; $i < mysql_num_fields($result); $i++) {
         echo mysql_field_name($result, $i) . "\t";
     }
     print "\n";
     $i = 0;
     while ($row = mysql_fetch_row($result)) {
         $schema_insert = "";
         for ($j = 0; $j < mysql_num_fields($result); $j++) {
             if (!isset($row[$j])) {
                 $schema_insert .= "NULL" . $sep;
             } elseif ($row[$j] != "") {
                 if ($j == "3") {
                     $postdate = date('Y-m-d h:m:s', $row[$j]);
                     $schema_insert .= "{$postdate}" . $sep;
                 } else {
                     $schema_insert .= "{$row[$j]}" . $sep;
                 }
             } else {
                 $schema_insert .= "" . $sep;
             }
         }
         $schema_insert = str_replace($sep . "\$", "", $schema_insert);
         $schema_insert .= "\t";
         print trim($schema_insert);
         print "\n";
         $i++;
     }
     return true;
     $this->tpl->display("home.html");
 }
Exemplo n.º 8
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom($this->module_sign . ":delete", "ajax");
     $rs = $this->tpl_m->get_one($id);
     if ($rs["ifsystem"]) {
         exit("error: 对不起,系统模板不允许删除");
     }
     if ($rs["ifdefault"]) {
         exit("error: 对不起,默认模板不允许删除");
     }
     $this->tpl_m->del($id);
     exit("ok");
 }
Exemplo n.º 9
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom("usergroup:delete", "ajax");
     $rs = $this->usergroup_m->get_one($id);
     if ($rs["ifdefault"]) {
         exit("默认组不允许删除!");
     }
     if ($rs["ifsystem"]) {
         exit("系统组不允许删除!");
     }
     $this->usergroup_m->del($id);
     exit("ok");
 }
Exemplo n.º 10
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom("user:delete", "ajax");
     load_plugin("user:del:prev");
     $this->user_m->del($id);
     load_plugin("user:del:next");
     exit("ok");
 }
Exemplo n.º 11
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom($this->module_sign . ":delete", "ajax");
     $this->phpok_m->del($id);
     exit("ok");
 }
Exemplo n.º 12
0
 function index_f()
 {
     sys_popedom($this->module_sign . ":list", "tpl");
     if (file_exists(ROOT_DATA . "system_" . $_SESSION["sys_lang_id"] . ".php")) {
         include ROOT_DATA . "system_" . $_SESSION["sys_lang_id"] . ".php";
         $siteurl = $_sys["siteurl"];
     }
     if (!$siteurl) {
         $siteurl = $this->trans_lib->get_url();
     }
     if (substr($siteurl, -1) != "/") {
         $siteurl .= "/";
     }
     $this->tpl->assign("siteurl", $siteurl);
     $this->cate_m->langid($_SESSION["sys_lang_id"]);
     $this->cate_m->get_all();
     $this->cate_m->format_list(0, 0);
     $catelist = $this->cate_m->flist();
     if (!$catelist) {
         $catelist = array();
     }
     foreach ($catelist as $key => $value) {
         $value["space"] = "";
         for ($i = 0; $i < $value["level"]; $i++) {
             $value["space"] .= "  ";
         }
         $catelist[$key] = $value;
     }
     $module_list = $this->module_m->all_module();
     //取得模块列表
     $cate_html = "<select name='typeid' id='typeid'>";
     $cate_html .= "<option value='0:0'>全部,不限制…</option>";
     $cate_html .= "<optgroup label='选择模块'>";
     $new_mlist = array();
     foreach ($module_list as $key => $value) {
         if ($value["ctrl_init"] == "list" && ($value["if_list"] || $value["if_msg"])) {
             $new_mlist[] = $value;
             $cate_html .= "<option value='" . $value["id"] . ":0'";
             if ($typeid == $value["id"] . ":0") {
                 $cate_html .= " selected";
             }
             $cate_html .= ">" . $value["title"];
             if (!$value["status"]) {
                 $cate_html .= "(已停用)";
             }
             $cate_html .= "</option>";
         }
     }
     $cate_html .= "</optgroup>";
     $cate_html .= "<optgroup label='选择分类'>";
     foreach ($catelist as $key => $value) {
         $cate_html .= "<option value='" . $value["module_id"] . ":" . $value["id"] . "'";
         if ($typeid == $value["module_id"] . ":" . $value["id"]) {
             $cate_html .= " selected";
         }
         $cate_html .= ">【" . $value["title"] . "】" . $value["space"] . $value["cate_name"];
         if (!$value["status"]) {
             $cate_html .= "(已停用)";
         }
         $cate_html .= "</option>";
     }
     $cate_html .= "</optgroup>";
     $cate_html .= "</select>";
     $this->tpl->assign("cate_html", $cate_html);
     $this->tpl->display("create_html/list.html");
 }
Exemplo n.º 13
0
 function fields_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error: 操作非法,没有指定ID");
     }
     sys_popedom($this->module_sign . ":delete", "tpl");
     //删除模块操作
     $this->module_m->fields_del($id);
     exit("ok");
 }
Exemplo n.º 14
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->safe("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     $array = sys_id_list($id);
     if (!$array[0]) {
         exit("error:错误");
     }
     $rs = $this->list_m->get_one($array[0]);
     $module_id = $rs["module_id"];
     sys_popedom($module_id . ":delete", "ajax");
     $this->list_m->del($id);
     exit("ok");
 }
Exemplo n.º 15
0
 function groupdel_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         error("没有指定组ID", $this->url("datalink"));
     }
     sys_popedom($this->module_sign . ":group", "tpl");
     $this->datalink_m->del_group($id);
     error("组信息删除成功", $this->url("datalink"));
 }
Exemplo n.º 16
0
Arquivo: gd.php Projeto: ahmatjan/yida
 function del_gd_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("Error:操作非法,没有指定ID");
     }
     sys_popedom("gd:delete", "ajax");
     $rs = $this->gd_m->get_one($id);
     $sign = $rs["pictype"];
     //获取数据
     $rslist = $this->gd_m->gd_list($sign);
     if ($rslist && count($rslist) > 0 && is_array($rslist)) {
         foreach ($rslist as $key => $value) {
             if ($value["filename"] && file_exists(ROOT . $value["filename"]) && is_file(ROOT . $value["filename"])) {
                 $this->file_lib->rm(ROOT . $value["filename"]);
             }
         }
     }
     $this->gd_m->gd_del($sign);
     $this->gd_m->del($id);
     exit("ok");
 }
Exemplo n.º 17
0
 function fields_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("Error:操作非法,没有指定ID");
     }
     sys_popedom("payment:delete", "ajax");
     $this->payment_m->fields_del($id);
     exit("ok");
 }
Exemplo n.º 18
0
 function ajax_status_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("对不起,你的操作有错误!");
     }
     sys_popedom("plugin:check", "ajax");
     $rs = $this->plugin_m->get_one($id);
     $status = $rs["status"] ? 0 : 1;
     $this->plugin_m->set_status($id, $status);
     //更新配置文件信息
     $rs["status"] = $status;
     $this->_config($id);
     exit("ok");
 }
Exemplo n.º 19
0
 function ajax_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     $module_id = $this->trans_lib->int("module_id");
     if (!$module_id) {
         exit("error: 无法读取模块ID");
     }
     if ($id == $_SESSION["admin_id"]) {
         exit("error: 管理员不能删除自己!");
     }
     sys_popedom($this->module_sign . ":delete", "ajax");
     $this->admin_m->del($id);
     exit("ok");
 }
Exemplo n.º 20
0
 function fields_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error: 操作非法,没有指定ID");
     }
     sys_popedom("usergroup:delete", "tpl");
     //删除模块操作
     $this->usergroup_m->fields_del($id);
     exit("ok");
 }
Exemplo n.º 21
0
 function recover_data_f()
 {
     sys_popedom("phpoksql:set", "tpl");
     $id = $this->trans_lib->safe("id");
     if (!$id) {
         error("没有指定备份文件!", site_url("phpoksql,baklist"));
     }
     $filelist = $this->file_lib->ls(ROOT_DATA);
     if (!$filelist) {
         error("没有取得相应数据!", site_url("phpoksql,baklist"));
     }
     $idlen = strlen($id . "_data_");
     $rslist = array();
     foreach ($filelist as $key => $value) {
         $bv = basename($value);
         if (substr($bv, 0, $idlen) == $id . "_data_") {
             $rslist[] = $value;
         }
     }
     if (!$rslist || count($rslist) < 1) {
         error("数据文件丢失,请检查!", site_url("phpoksql,baklist"));
     }
     $startid = $this->trans_lib->int("startid");
     if (!$rslist[$startid]) {
         error("数据信息已恢复完成!建议您清空缓存后退出再重新登录!", site_url("phpoksql,baklist"));
     }
     $file = $rslist[$startid];
     //恢复表结构数据
     $msg = $this->file_lib->cat($file);
     $this->format_sql($msg);
     $new_startid = $startid + 1;
     if (!$rslist[$new_startid]) {
         error("数据信息已恢复完成!建议您清空缓存后退出再重新登录!", site_url("phpoksql,baklist"));
     }
     error("正在恢复数据,请稍候!", site_url("phpoksql,recover_data") . "id=" . rawurlencode($id) . "&startid=" . $new_startid);
 }
Exemplo n.º 22
0
 function ajax_status_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom("menu:check", "ajax");
     $rs = $this->menu_m->get_one($id);
     $status = $rs["status"] ? 0 : 1;
     $this->menu_m->set_status($id, $status);
     exit("ok");
 }
Exemplo n.º 23
0
 function ajax_lang_del_f()
 {
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("error:没有指定ID");
     }
     sys_popedom($this->module_sign . ":delete", "ajax");
     $rs = $this->lang_m->lang_one($id);
     if (!$rs) {
         exit("error:没有找到相关数据!");
     }
     $this->lang_m->del_m($rs["var"]);
     exit("ok");
 }
Exemplo n.º 24
0
 function setok_f()
 {
     sys_popedom("files:setting", "tpl");
     $rs = array();
     if ($_POST && is_array($_POST) && count($_POST) > 0) {
         foreach ($_POST as $key => $value) {
             $rs[$key] = $this->trans_lib->safe($key);
         }
     }
     //判断如何附件使用activex上传时,则创建两个目录
     if ($rs["file_uptype"] == "activex") {
         $this->file_lib->make(ROOT . SYS_UP_PATH . "/xu_temp_");
         $this->file_lib->make(ROOT . SYS_UP_PATH . "/xu_temp");
     }
     $this->file_lib->vi($rs, ROOT_DATA . "attachment.php", "_sys");
     error("附件参数配置成功!", site_url("files"));
 }
Exemplo n.º 25
0
 function setok_f()
 {
     sys_popedom("order:modify", "tpl");
     $id = $this->trans_lib->int("id");
     if (!$id) {
         error("操作错误,没有指定ID", $this->url("order"));
     }
     $old_rs = $this->order_m->get_one($id);
     //
     $rs = array();
     $rs["pass"] = $this->trans_lib->safe("pass");
     $rs["fullname"] = $this->trans_lib->safe("fullname");
     $rs["email"] = $this->trans_lib->safe("email");
     $rs["note"] = $this->trans_lib->safe("note");
     $rs["pay_status"] = $this->trans_lib->int("pay_status");
     $rs["pay_type"] = $this->trans_lib->int("pay_type");
     $rs["pay_code"] = $this->trans_lib->safe("pay_code");
     $rs["pay_price"] = $this->trans_lib->safe("pay_price");
     $rs["pay_currency"] = $this->trans_lib->safe("pay_currency");
     $pay_date = $this->trans_lib->safe("pay_date");
     if ($pay_date) {
         $rs["pay_date"] = strtotime($pay_date);
     }
     $this->order_m->update($rs, $id);
     unset($rs);
     //更新产品信息
     $rslist = $this->order_m->get_products($id);
     if ($rslist) {
         foreach ($rslist as $key => $value) {
             $pro = array();
             $pro["title"] = $this->trans_lib->safe("protitle_" . $value["id"]);
             $pro["price"] = $this->trans_lib->safe("proprice_" . $value["id"]);
             $pro["amount"] = $this->trans_lib->int("proamount_" . $value["id"]);
             //echo "<pre>".print_r($pro,true)."</pre>";
             $this->order_m->pro_save($pro, $value["id"]);
         }
     }
     //exit;
     //判断是否有添加
     $prolist_array = $this->trans_lib->safe("product_list");
     $protitle = $this->trans_lib->safe("protitle");
     $proprice = $this->trans_lib->safe("proprice");
     $proamount = $this->trans_lib->safe("proamount");
     foreach ($prolist_array as $key => $value) {
         if ($protitle[$key]) {
             $pro = array();
             $pro["orderid"] = $id;
             $pro["proid"] = 0;
             $pro["title"] = $protitle[$key];
             $pro["price"] = $proprice[$key];
             $pro["price_currency"] = $old_rs["price_currency"];
             $pro["amount"] = $proamount[$key];
             $this->order_m->pro_save($pro);
         }
     }
     //更新地址信息
     $address = array();
     $address["order_id"] = $id;
     $address["address_type"] = "shipping";
     $address["fullname"] = $this->trans_lib->safe("s_fullname");
     $address["tel"] = $this->trans_lib->safe("s_tel");
     $address["email"] = $this->trans_lib->safe("s_email");
     $address["country"] = $this->trans_lib->safe("s_country");
     $address["address"] = $this->trans_lib->safe("s_address");
     $address["zipcode"] = $this->trans_lib->safe("s_zipcode");
     $address["note"] = $this->trans_lib->safe("s_note");
     $this->order_m->save_address($address);
     //更新地址信息
     $address = $this->order_m->get_address($id);
     if ($address && $address["billing"]) {
         $address = array();
         $address["order_id"] = $id;
         $address["address_type"] = "billing";
         $address["fullname"] = $this->trans_lib->safe("b_fullname");
         $address["tel"] = $this->trans_lib->safe("b_tel");
         $address["email"] = $this->trans_lib->safe("b_email");
         $address["country"] = $this->trans_lib->safe("b_country");
         $address["address"] = $this->trans_lib->safe("b_address");
         $address["zipcode"] = $this->trans_lib->safe("b_zipcode");
         $address["note"] = $this->trans_lib->safe("b_note");
         $this->order_m->save_address($address);
     }
     $this->order_m->update_totoal_price($id);
     error("订单信息更新成功!", $this->url("order"));
 }
Exemplo n.º 26
0
 function list_del_f()
 {
     sys_popedom("collection:delete", "ajax");
     $id = $this->trans_lib->safe("id");
     if (!$id) {
         exit("Error: 没有指定要删除的ID串!");
     }
     $id = sys_id_string($id, ",", "intval");
     $this->collection_m->del_list($id);
     exit("ok");
 }
Exemplo n.º 27
0
 function ajax_taxis_f()
 {
     $id = $this->trans_lib->int("id");
     $val = $this->trans_lib->int("val");
     sys_popedom($this->module_sign . ":modify", "ajax");
     if (!$id) {
         exit("没有指定ID!");
     }
     $array = array();
     $array["taxis"] = $val;
     $this->cate_m->save($array, $id);
     exit("ok");
 }
Exemplo n.º 28
0
 function pl_del_f()
 {
     sys_popedom("commission:delete", "ajax");
     $id = $this->trans_lib->safe("id");
     if (!$id) {
         exit("操作错误,没有指定ID!");
     }
     $this->commission_m->pl_del($id);
     exit("ok");
 }
Exemplo n.º 29
0
 function status_f()
 {
     sys_popedom("reply:check", "ajax");
     $id = $this->trans_lib->int("id");
     if (!$id) {
         exit("操作错误,没有指定ID!");
     }
     $rs = $this->reply_m->get_one($id);
     $status = $rs["status"] ? 0 : 1;
     $this->reply_m->status($id, $status);
     $this->reply_m->update_star($rs["tid"]);
     exit("ok");
 }