//包含后台模板文件 include "tpl/service_list.htm"; } elseif ($action == "edit") { InitGP(array("mid", "mname", "type", "node", "murl", "listorder", "mcode", "Submit")); //初始化变量全局返回 if (!empty($Submit)) { $mid = GetNum($mid); if ($type == "zone") { $node = 0; } if ($mid == 0) { showmsg("缺少ID参数!", -1); } //成功 $arrayedit = array("mname" => Char_cv($mname), "type" => Char_cv($type), "node" => GetNum($node), "murl" => Char_cv($murl), "listorder" => GetNum($listorder), "mcode" => Char_cv($mcode)); $info = $Table->edit($mid, $arrayedit); if ($info == "OK") { showmsg("编辑成功!", PHP_SELF); //成功 } else { showmsg($info, "-1"); } //出错! } else { $evalue = $Table->getone($mid); } } elseif ($action == "updatestate" && !empty($ids) && !empty($state)) { //更改状态 $state = GetNum($state); $ids = getdotstring(explode('|', $ids)); $wheresqlarr = "aid in({$ids})";
} else { $evalue = $Table->getone($aid); //print_r($evalue); include "tpl/otype_list.htm"; } } elseif ($action == "edit") { InitGP(array("node", "typeid", "typename")); //初始化变量全局返回 if (!empty($_POST) and !empty($typename)) { $typeid = GetNum($typeid); if (empty($typename)) { showmsg("名称不能为空!", PHP_SELF); } //出错! $arrayadd = array("node" => Char_cv($node), "typename" => Char_cv($typename), "listorder" => GetNum($listorder)); $info = $Table->edit($typeid, $arrayadd); if ($info == "OK") { showmsg("更新成功!", PHP_SELF); //出错! } else { showmsg("更新失败!", "-1"); //出错! } } else { $evalue = $Table->getone($aid); //print_r($evalue); include "tpl/otype_list.htm"; } } elseif ($action == "del" && !empty($did)) { //执行删除操作 $did = GetNum($did);
if (!empty($_POST) and !empty($account) and !empty($bid)) { $bid = GetNum($bid); if (empty($bid)) { showmsg("缺少ID参数!", PHP_SELF); } //出错! if (empty($currency)) { showmsg("币种不能为空!", PHP_SELF); } //出错! if (empty($accountname)) { showmsg("账户名不能为空!", PHP_SELF); } //出错! $arrayadd = array("currency" => Char_cv($currency), "account" => Char_cv($account), "accountname" => Char_cv($accountname), "bankname" => Char_cv($bankname), "remark" => Char_cv($remark)); $info = $Table->edit($bid, $arrayadd); if ($info == "OK") { exit("<script language='javascript'>alert('编辑成功');parent.\$.fn.colorbox.close();</script>"); } else { exit("<script language='javascript'>alert('编辑失败');history.go(-1);</script>"); } } else { $evalue = $Table->getone($bid); //print_r($evalue); include "tpl/bankaccount_add.htm"; } } else { showmsg("未知请求", "-1"); //出错! } //获取选择文章分类下拉框
$temparray[$key]['Telephone'] = $val['tel']; $temparray[$key]['Consignee'] = $val['consignee']; $temparray[$key]['Postcode'] = $val['zip']; $temparray[$key]['Address'] = $val['address']; $temparray[$key]['Postcode'] = $val['zip']; $temparray[$key]['Postcode'] = $val['zip']; } } echo json_encode($temparray); } elseif ($action == "add") { $jsondata = json_decode(str_replace("'", '"', file_get_contents('php://input'))); $tempid = GetNum($jsondata->id); $addarray = array('uid' => $_USERS['uid'], 'uname' => $_USERS['uname'], 'consignee' => Char_cv($jsondata->consignee), 'country' => Char_cv($jsondata->country), 'city' => Char_cv($jsondata->city), 'zip' => Char_cv($jsondata->zip), 'tel' => Char_cv($jsondata->teltphone), 'address' => Char_cv($jsondata->address)); if ($tempid > 0) { //编辑 $r->edit($tempid, $addarray); $rjson['d'] = 1; } else { //增加 $info = $r->add($addarray); $rjson['d'] = $info; } echo json_encode($rjson); } elseif ($action == "setdefault") { $jsondata = json_decode(str_replace("'", '"', file_get_contents('php://input'))); $aid = GetNum($jsondata->id); $wheresqlarr = "uname='" . $_USERS['uname'] . "'"; $wheresqlarr2 = "uname='" . $_USERS['uname'] . "' and aid=" . $aid; editstate($r->table, "def", $wheresqlarr, 0); //更改状态操作 editstate($r->table, "def", $wheresqlarr2, 1);
//出错! } } elseif ($action == "edit") { InitGP(array("mid", "mname", "type", "node", "murl", "listorder", "mcode", "Submit")); //初始化变量全局返回 if (!empty($Submit)) { $mid = GetNum($mid); if ($type == "zone") { $node = 0; } if ($mid == 0) { showmsg("缺少ID参数!", -1); } //成功 $arrayedit = array("mname" => Char_cv($mname), "type" => Char_cv($type), "node" => GetNum($node), "murl" => Char_cv($murl), "listorder" => GetNum($listorder), "mcode" => Char_cv($mcode)); $info = $mange->edit($mid, $arrayedit); if ($info == "OK") { showmsg("编辑成功!", PHP_SELF); //成功 } else { showmsg($info, "-1"); } //出错! } else { $evalue = $mange->getone($mid); } } elseif ($action == "del" && !empty($did)) { //执行删除操作 $did = GetNum($did); $info = $mange->del($did); if ($info == "OK") {
$adminpwd = md5($adminpwd); } //用户密码加密 if (is_array($mid)) { $adminmid = getdotstring($mid, 'int'); } //格式化成id,id形式 foreach ($menuarray as $value) { if (in_array($value['mid'], $mid)) { $temparray[] = $value['mcode']; } } $adminpurview = implode_field_value($temparray); //格式化成id,id形式 $arrayadd = array("adminname" => Char_cv($adminname), "adminpwd" => Char_cv($adminpwd), "adminmid" => $adminmid, "adminpurview" => $adminpurview); $info = $Table->edit($adminid, $arrayadd); if ($info == "OK") { exit("<script language='javascript'>alert('编辑成功');parent.\$.fn.colorbox.close();</script>"); } else { exit("<script language='javascript'>alert('编辑失败');history.go(-1);</script>"); } } else { $evalue = $Table->getone($adminid); //print_r($evalue); include "tpl/admin_add.htm"; } } else { showmsg("未知请求", "-1"); //出错! } //获取选择文章分类下拉框
$pagesize = 15; //一页显示信息数 $page = isset($page) ? max(1, intval($page)) : 1; //处理页码变量 $offset = ($page - 1) * $pagesize; //偏移量 $dataarray = $smtp->getdata("{$offset},{$pagesize}", $wheresql); //获取团购数据 //包含后台模板文件 include "tpl/smtp_list.htm"; } elseif ($action == "edit") { InitGP(array("eid", "smtp_server", "smtp_port", "smtp_email", "smtp_account", "smtp_password", "reply_address", "smtp_auth", "smtp_ssl", "state", "Submit")); //初始化变量全局返回 if (!empty($Submit)) { $editarray = array("smtp_server" => $smtp_server, "smtp_port" => $smtp_port, "smtp_email" => $smtp_email, "smtp_account" => $smtp_account, "smtp_password" => $smtp_password, "reply_address" => $reply_address, "smtp_ssl" => $smtp_ssl, "state" => $state, "smtp_auth" => $smtp_auth); $info = $smtp->edit($eid, $editarray); if ($info == "OK") { showmsg("编辑成功!", "smtp_list.php"); //成功 } else { showmsg($info, "-1"); } //出错! } else { //编辑信息表单 $dataedit = $smtp->getdata(1, "eid={$eid}"); $value = $dataedit[0]; //获取第一条记录 //包含后台模板文件 include "tpl/smtp_list.htm"; }