$data["auth_html"] = $html; //-語系版本授權 $data["lang_auth_html"] = create_select("lang_auth", $lang_data_array, $data["lang_auth"] ? $data["lang_auth"] : $_SESSION["admin_info"]["lang_auth"], "dd", "不限制", $_SESSION["admin_info"]["lang_auth"] && $_SESSION["admin_info"]["control"] != '0' ? ' onfocus="defaultValue=this.value" onchange="this.value=defaultValue"' : ""); $_SESSION["admin_info"]["view"] = "detail"; } else { include "search_data.php"; $sql .= " 1=1 " . ($_SESSION["admin_info"]["lang_auth"] ? " and lang_auth='" . $_SESSION["admin_info"]["lang_auth"] . "'" : "") . " order by create_date desc"; //改為擷取語系使用者 $data = $conn->PageExecute($sql, $per_page_qty, $page); foreach ($data as $k => $v) { foreach ($v as $k_2 => $v_2) { $data_temp[$k][$k_2] = $v_2; } //存入新陣列 給與 smarty section 使用 //$data_temp[$k]["status"] = $_SETUP["status"][$data_temp[$k]["status"]]; $data_temp[$k]["status_html"] = Make_radio($_SETUP["status"], $data_temp[$k]["status"], "status_" . $data_temp[$k]["id"]); } $tpl->assign("page_table", Page_table($data, $per_page_qty)); $data = $data_temp; $_SESSION["admin_info"]["view"] = "list"; } include_once "index.php"; //assign 所有資料、共用頁面 $tpl->assign("content", ROOT_PATH . $admin_path . "templates/admin_group.html"); $tpl->display(ROOT_PATH . $admin_path . "templates/index.html"); ?>
} else { $admin_auth = explode(',', $_SESSION["admin_info"]["auth"]); if ($html) { foreach ($html as $k => $v) { foreach ($v as $k_2 => $v_2) { $data_temp[$k][$k_2] = $v_2; } //存入新陣列 給與 smarty section 使用 $str = ""; for ($i = 1; $i <= $v["floor"]; $i++) { $str .= " "; } $data_temp[$k]["old_name"] = $v["name"]; $data_temp[$k]["name"] = $str . $v["name"]; $data_temp[$k]["ifview_html"] = $_SETUP["status"][$data_temp[$k]["ifview"]]; $data_temp[$k]["ifview"] = Make_radio($_SETUP["status"], $data_temp[$k]["ifview"], "ifview_" . $data_temp[$k]["id"]); //---移除沒權限的資料 if (!in_array($data_temp[$k]["lv"], $admin_auth) && $_SESSION["admin_info"]["control"] != '0') { unset($data_temp[$k]); } } } //$data = $data_temp; $_SESSION["admin_info"]["view"] = "list"; $temp_i = 0; foreach ($data_temp as $k => $v) { $data[$temp_i] = $v; $temp_i++; } } include_once "index.php";
$table = PREFIX . "setting"; $act = $_POST["act"]; foreach ($_POST as $k => $v) { $record[$k] = quotes($v); } $sql = " select * from " . $table . " WHERE lang='" . quotes($record["lang"]) . "' and "; //--組合參數按鈕 $data["web_set"]["upload_check_status"] = Make_radio($_SETUP["status"], $ini_webset["web_set"]["upload_check_status"], 'upload_check_status'); //--容量顯示開關 $data["web_set"]["post_fee_button_html"] = Make_radio($_SETUP["status"], $ini_webset["web_set"]["post_fee_button"], 'post_fee_button'); //--運費 $data["web_set"]["design_button"] = Make_radio($_SETUP["status"], $ini_webset["web_set"]["design_button"], 'design_button'); //--設計師 $data["web_set"]["system_button"] = Make_radio($_SETUP["status"], $ini_webset["web_set"]["system_button"], 'system_button'); //--系統 $data["web_set"]["uploadfile_rename"] = Make_radio($_SETUP["status"], $ini_webset["web_set"]["uploadfile_rename"], 'uploadfile_rename'); //--檔案重新命名 if ($act == 'submit') { $record["update_date"] = date("Y-m-d H:i:s"); $record["update_name"] = $_SESSION["admin_info"]["account"]; foreach ($record as $k => $v) { $id_tmp = explode("_", $k); if (count($id_tmp) == 2 && is_numeric($id_tmp[1])) { $id = $id_tmp["1"]; $record[$id_tmp["0"]] = $v; //$record["status"] = "1"; $where = "id=" . $id; $conn->AutoExecute($table, $record, "UPDATE", $where); } else { //--webini 資料 $ini_webset["web_set"][implode('_', $id_tmp)] = $v;
$sql = " select * from " . $table . " WHERE 1=1 and "; if ($act == 'submit') { if ($record["password"] != NULL) { $record["password"] = md5($record["password"]); } else { unset($record["password"]); } $record["update_date"] = date("Y-m-d H:i:s"); $record["update_name"] = $_SESSION["admin_info"]["account"]; $where = "id=" . $id; $conn->AutoExecute($table, $record, "UPDATE", $where); alert("修改完成", Page_get_url('')); exit; } $sql_2 = " select * from " . PREFIX . "admin_group "; $group = $conn->GetArray($sql_2); if ($id) { $sql .= " id=" . $id; $data = $conn->GetRow($sql); $data["status_html"] = Make_radio($_SETUP["status"], $data["status"], "status"); $temp = $conn->GetArray("select * from " . PREFIX . "admin_group where control>=" . $_SESSION["admin_info"]["control"]); foreach ($temp as $k => $v) { $temp_array[$v["id"]] = $v["name"]; } $data["group_html"] = Make_list($temp_array, $data["group_id"]); $_SESSION["admin_info"]["view"] = "detail"; } include_once "index.php"; //assign 所有資料、共用頁面 $tpl->assign("content", ROOT_PATH . $admin_path . "templates/admin.html"); $tpl->display(ROOT_PATH . $admin_path . "templates/index.html");
$member_typelist = $conn->GetArray('select * from ' . PREFIX . "data_list where type='memberdesh' and status=1"); if ($member_typelist) { foreach ($member_typelist as $k => $v) { $array_typem[$v['new_type']] = $v['name']; } } $type_output = str_replace('"', "'", json_encode(array('type' => $array_typem))); $sex_output = str_replace('"', "'", json_encode(array('sex' => array('0' => '女', '1' => '男')))); //--匯出資料 $data["output_title"] = array('編號', '帳戶', '姓名', '帳戶類型', '性別', 'email', '身分證字號', '生日', '電話', '地址'); $data["output_row"] = array('id', 'account', 'name', $type_output, $sex_output, 'email', 'id_num', 'birthday', 'phone', 'address'); $data["cpos"] = $cpos; //--------- if ($id || $id == '0') { $data["one"]["sex_html"] = create_input("sex", $_SETUP["sex"], $type = "radio", $data["one"]["sex"]); $data["one"]["type_html"] = Make_radio($array_typem, $data["one"]["type"], 'type'); } else { $member_typelist = $conn->GetArray('select * from ' . PREFIX . "data_list where type='memberdesh' and status=1"); if ($member_typelist) { foreach ($member_typelist as $k => $v) { $array_typem[$v['new_type']] = $v['name']; } } foreach ($data["list"] as $k => $v) { $data["list"][$k]["mode_html"] = $array_typem[$v["type"]]; $data["list"][$k]["sex_html"] = $_SETUP["sex"][$v["sex"]]; } } $_SESSION["admin_info"]["search"]["status"] = '<option value="">選擇狀態</option>' . Make_list($_SETUP["status"], $_GET["s_status"]); include_once "index.php"; //assign 所有資料、共用頁面