Beispiel #1
0
    $del_list = substr($del_list, 0, -1);
    $sql = "select * from " . $table . " WHERE lv in (" . $del_list . ") order by parents,lv,sort";
    $data = "";
    $data = $conn->GetArray($sql);
    if ($data) {
        foreach ($data as $k => $v) {
            $data[$k]["ifview"] = $_SETUP["status"][$v["ifview"]];
        }
        include_once "index.php";
        //assign 所有資料、共用頁面
        $tpl->assign("content", ROOT_PATH . $admin_path . "templates/_sysmenu.html");
        $tpl->display(ROOT_PATH . $admin_path . "templates/index.html");
        echo '<script>if(confirm(\'刪除此分類將會刪除底下所有子分類,確定要繼續嗎?\')==true){location=\'?del=sure&del_list=' . $del_list . '&del_id=' . $del_id . '\';}else{location=\'' . Page_get_url('del_id') . '\';}</script>';
        exit;
    } else {
        LinkTo("?del=sure&del_id=" . $del_id);
        exit;
    }
}
//新增 更新 刪除 結束
//無限層分類制作
$html = Make_class($conn);
$sql = " select * from " . $table . " WHERE 1=1 and ";
if ($id || $id == '0') {
    $sql .= " id=" . $id;
    $data = $conn->GetRow($sql);
    $data["ifview"] = Make_radio($_SETUP["status"], $data["ifview"], "ifview");
    $html = Make_class($conn, $data["lv"]);
    if ($html) {
        foreach ($html as $k => $v) {
            $str = "";
Beispiel #2
0
        $_SESSION["admin_info"]["lang"] = $_POST["lang"];
        //有參數
        $temp = $conn->GetRow("select * from " . PREFIX . "language where detail='" . $lang . "'");
        $_SESSION["admin_info"]["lang_title"] = $temp["name"];
    } elseif ($_POST || !$_SESSION["admin_info"]["lang"]) {
        $_SESSION["admin_info"]["lang"] = 'ch';
        //無參數給予預設值
        $_SESSION["admin_info"]["lang_title"] = '中文';
    }
}
$record["lang"] = $post["lang"] = $lang = $_SESSION["admin_info"]["lang"];
if ($_SESSION["re_url"] != NULL && $_SESSION["admin_info"]["account"] != NULL) {
    //-判斷是否經由內頁連入 登入後導回內頁
    $url_s = $_SESSION["re_url"];
    unset($_SESSION["re_url"]);
    LinkTo($url_s);
}
//--後台編輯器載入前台式樣檔
$css_temp = $conn->GetRow("select * from " . PREFIX . "setting where type='web_css'");
$tpl->assign("web_css", '<script> website_css="' . $css_temp["detail"] . '";</script>');
//config設定檔
$page_name = Now_file();
define('LANG', $lang);
$_SESSION["admin_info"]["page"] = Page_get_url('');
$mail = new PHPMailer();
// 建立新物件
$mail->IsHTML(true);
// 設定郵件內容為HTML
$mail->CharSet = "utf-8";
// 設定郵件編碼
$mail->Encoding = "base64";