Esempio n. 1
0
 function load($data)
 {
     if (is_numeric($data)) {
         $temp = $this->conn->GetRow("select * from " . $this->table . " where type='main' and id='" . $data . "'");
     } else {
         $temp = $this->conn->GetRow("select * from " . $this->table . " where type='main' and b_name='" . $data . "'");
     }
     $this->views .= dequotes($this->ban_load($temp), -1);
     if (trim($this->views) == '') {
         echo '樣板獲取失敗,請確認後台是否有設定相關版面!!';
     } else {
         return $this->views;
     }
 }
Esempio n. 2
0
 function work()
 {
     global $_GET;
     global $console;
     global $web_set;
     $this->data['pageget'] = $_GET;
     $this->data['main_path'] = $console->_j_web_set['main_path'];
     $this->data['path'] = $console->path;
     $this->web_set = $web_set;
     $this->_para_list[] = 'web_set';
     //--下版內容
     $this->data["foor"] = $console->conn->GetRow("select * from " . PREFIX . "data_list where type='foor' and status=1 and lang='" . $_SESSION["mode_lang"] . "'");
     $this->data["foor"]['detail'] = dequotes($this->data["foor"]['detail'], -1);
     //--console
     $console->tpl->assign("console", $console);
     //別的頁面傳送來的data
     foreach ($this->_para_list as $k => $v) {
         $console->tpl->assign($v, $this->{$v});
     }
     //別的頁面傳送來的data
     $console->design->load($this->tplurl == NULL || $this->tplurl[0] == NULL ? $console->path[0] : $this->tplurl[0]);
 }
Esempio n. 3
0
            $data["one"]["href"] = explode('|__|', $data["one"]["href"]);
            $data["button"]["name"] = '名稱';
            $data["one"]["name"] = explode('|__|', $data["one"]["name"]);
            break;
        case "memberdesh":
            $data["close"]["pic"] = '1';
            $data["one"]["memo"] = explode('|__|', $data["one"]["memo"]);
            $data["order_html"] .= '<tr><td align="right">類型別名:</td><td><input type="text" name="new_type" value="' . dequotes($data["one"]["new_type"], -1) . '" disabled="disabled"></td></tr>';
            $data["order_html"] .= '<tr><td align="right">折扣率:</td><td><input type="text" name="detail" value="' . dequotes($data["one"]["detail"], -1) . '"></td></tr>';
            $data["order_html"] .= '<tr><td align="right">到達紅利限制:</td><td><input type="text" name="memo[]" value="' . dequotes($data["one"]["memo"][0], -1) . '"> - <input type="text" name="memo[]" value="' . dequotes($data["one"]["memo"][1], -1) . '"></td></tr>';
            break;
        case "contact":
            $data["close"]["pic"] = '1';
            $data["button"]["detail"] = '1';
            $data["button"]["fck"] = '1';
            $data["order_html"] .= '<tr><td align="right">GOOGLE地圖:</td><td><textarea name="memo" rows="10" cols="50">' . dequotes($data["one"]["memo"], -1) . '
			</textarea><script>var jmap = new J_map(\'[name="memo"]\');</script></td></tr>';
            break;
        case "smtp_mail":
            $data["close"]["pic"] = '1';
            $data["one"]["detail"] = explode('|__|', $data["one"]["detail"]);
            $SMTPSecure = array('ssl' => 'ssl', 'tls' => 'tls');
            $data["order_html"] .= '<tr><td align="right">連線方式:</td><td><select name="detail[]">' . Make_list($SMTPSecure, $data["one"]["detail"][0]) . '</select></td></tr>';
            $data["order_html"] .= '<tr><td align="right">連線主機:</td><td><input type="text" name="detail[]" value="' . $data["one"]["detail"][1] . '"></td></tr>';
            $data["order_html"] .= '<tr><td align="right">port:</td><td><input type="text" name="detail[]" value="' . $data["one"]["detail"][2] . '"></td></tr>';
            $data["order_html"] .= '<tr><td align="right">帳號:</td><td><input type="text" name="detail[]" value="' . $data["one"]["detail"][3] . '"></td></tr>';
            $data["order_html"] .= '<tr><td align="right">密碼:</td><td><input type="password" name="detail[]" value="' . $data["one"]["detail"][4] . '"></td></tr>';
            break;
            /*訂單信件*/
        /*訂單信件*/
        case "paymail":
Esempio n. 4
0
    $tploutput = $console->design->views;
} else {
    if ($page_name == "") {
        $page_name = 'index';
    }
    if ($page_name == 'index') {
        switch ($_GET["class"]) {
            default:
                //--首頁最新消息
                $lang = ' and lang="' . $_SESSION["mode_lang"] . '"';
                $data["title_img"] = $_SETUP["title_img"][$_GET["j_set_patten"]];
                $temp = $conn->GetArray("select * from " . PREFIX . "data_list where type='news'" . $lang . " order by sort");
                $data["news"] = $temp;
                //edm
                $temp = $conn->GetRow("select * from " . PREFIX . "data_list where type='EDM'" . $lang);
                $data["EDM"] = explode('|__|', dequotes($temp["pic"], -1));
                $design->load('index');
                break;
        }
        $tploutput = $design->views;
    }
}
//--進行輸出註解去除處理
ob_start();
if ($_SETUP['MVC']) {
    $console->tpl->display("string:" . $tploutput);
} else {
    $tpl->display("string:" . $tploutput);
}
$smarty_output = ob_get_contents();
//接收快取頁面
Esempio n. 5
0
}
/*
if ($_POST["detail"]){
	$file_name = date("YmdHis").".html";
	$file = fopen("../templates/".$file_name,"w+"); //開啟檔案
	fwrite($file,$_POST["detail"]);
	fclose($file);
	$_POST["temp_file"] = $file_name;
}
*/
if ($_POST["detail"]) {
    $_POST["detail"] = quotes($_POST["detail"], -1);
}
include_once "centerpoes.php";
if ($_GET["ajax"]) {
    echo dequotes($data["one"]["detail"], -1);
    exit;
}
if ($_SESSION["admin_info"]["view"] == "detail") {
    //主板塊路徑
    $data["one"]["main_url"] = '../index.php?ban=' . $data["one"]["id"];
} else {
    if ($data["list"]) {
        foreach ($data["list"] as $k => $v) {
            $data["list"][$k]["mode_html"] = $_SETUP["member_mode"][$v["mode"]];
            $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";
Esempio n. 6
0
<?php

$console->load->module('foor');
/*
	建構中畫面
	當後台網站設定 系統管理者設定中 設定網域導向頁面
*/
$lang = ' and lang="' . $_SESSION["mode_lang"] . '"';
$data["title_img"] = $_SETUP["title_img"][$_GET["j_set_patten"]];
$temp = $console->conn->GetRow("select * from " . PREFIX . "setting where type='demo_show'" . $lang);
if ($temp) {
    echo dequotes($temp["detail"], -1);
}
echo dequotes('<mn id=\\"dtn\\"></mn> 秒後進入首頁 <script>
		var _aaaa = 5;
		function togohome(){
		_aaaa--;
		document.getElementById(\'dtn\').innerHTML = _aaaa;
		if (_aaaa==0) window.location.href=\'' . $console->_j_web_set['main_path'] . '/index/\';
		}
		togohome();
		window.setInterval(\\"togohome()\\",1000);
		</script>', -1);
exit;
$console->module->foor();
Esempio n. 7
0
function br_replace($str)
{
    $search = array('/\\r/', '/\\n/');
    $str = str_replace('"', '""', dequotes($str, -1));
    return preg_replace($search, '', $str);
}
Esempio n. 8
0
    $sql = "select * from " . PREFIX . "data_list WHERE type='size'";
    $pro_size = $conn->GetArray($sql);
    foreach ($pro_size as $k => $v) {
        $prosize[dequotes($v["size"], -1)] = $v["name"];
    }
    $data["one"]["pro_size"] = Make_list($prosize, NULL);
    //--尺寸資訊抓出顯示
    $data["one"]["size"] = $size_array = explode('|__|', $data["one"]["size"]);
    $data["one"]["color"] = $size_array = explode('|__|', $data["one"]["color"]);
    $data["one"]["stock"] = $size_array = explode('|__|', $data["one"]["stock"]);
    $data["one"]["stock_pic"] = $size_array = explode('|__|', $data["one"]["stock_pic"]);
    $data["one"]["stock_no"] = $size_array = explode('|__|', $data["one"]["stock_no"]);
    $data["one"]["stock_status"] = explode('|__|', $data["one"]["stock_status"]);
    $data["one"]["stock_price"] = explode('|__|', $data["one"]["stock_price"]);
    $data["one"]["memo"] = dequotes($data["one"]["memo"], -1);
    $data["one"]["memo_1"] = dequotes($data["one"]["memo_1"], -1);
} else {
    foreach ($tree_data_type as $item) {
        $type_list[$item["id"]] = $aa[$item['id']] = $item["show_text"];
    }
    //--組合分類陣列
    if ($data["list"]) {
        foreach ($data["list"] as $k => $v) {
            $temp_class_list = explode('|__|', $v["class"]);
            if ($temp_class_list) {
                foreach ($temp_class_list as $a => $b) {
                    $temp_class_list[$a] = $type_list[$b];
                }
            }
            $data["list"][$k]["class_html"] = implode('<br>', $temp_class_list);
            //$data["list"][$k]["class_html"] = create_select("class_".$v["id"],$type_list,$v["class"],'1',"根目錄");
Esempio n. 9
0
<?php

$console->load->module('foor');
//edm
$temp = $console->conn->GetRow("select * from " . PREFIX . "data_list where type='EDM'" . $lang);
$data["EDM"] = json_encode(explode('|__|', dequotes($temp["pic"], -1)));
$data["href"] = json_encode(explode('|__|', dequotes($temp["href"], -1)));
$console->module->foor();
$console->module->foor->set('data', $data)->set('member_info', @$_SESSION["member_info"])->set('cookie', @$_COOKIE["cookie"])->set("setup", $_SETUP)->set("content", @$content)->set("web_set", @$web_set)->set("lang", @$_SESSION["mode_lang"]);
$console->module->foor->work();
Esempio n. 10
0
$cpos["tablelistwhere"] = "WHERE type='form_set'";
//列表顯示資料的條件
$cpos["tablewhere"] = 'id="' . $_GET["id"] . '"';
$cpos["listorderby"] = "create_date desc";
$cpos["file_check"] = array('pic', 'file');
$close["insert"] = 0;
$close["add"] = 0;
$close["del"] = 0;
$close["edit"] = 0;
$close["copy"] = 0;
$close["sort"] = 1;
include_once "centerpoes.php";
//明細
if ($_SESSION["admin_info"]["view"] == "detail") {
    $data["one"]["detail"] = explode('|__|', dequotes($data["one"]["detail"], -1));
    $data["one"]["memo"] = explode('|__|', dequotes($data["one"]["memo"], -1));
    $data["one"]["b_value"] = explode('|__|', $data["one"]["b_value"]);
} else {
}
$_SESSION["admin_info"]["search"]["status"] = '<option value="">選擇狀態</option>' . Make_list($_SETUP["status"], $_GET["s_status"]);
$data["file_url"] = $cpos["file_url"];
include_once "index.php";
//assign 所有資料、共用頁面
$tpl->assign("content", ROOT_PATH . $admin_path . "templates/" . $page_name . ".html");
$tpl->display(ROOT_PATH . $admin_path . "templates/index.html");
?>




Esempio n. 11
0
if ($_POST["cargo_status"] != $befo_data["cargo_status"] && $_POST["cargo_status"] == '1' && $befo_data["cargo_status"] != '1') {
    $conn->Execute("UPDATE " . PREFIX . "member SET point=point+" . $befo_data["addpoint"] . " WHERE id ='" . $befo_data["member_id"] . "'");
    $member_data = $conn->GetRow("select * from " . PREFIX . "member where id='" . $befo_data["member_id"] . "'");
    $member_type = $conn->GetArray("select * from " . PREFIX . "data_list where type='memberdesh' and status=1");
    foreach ($member_type as $k => $v) {
        $v["memo"] = explode('|__|', dequotes($v["memo"]));
        if ($member_data["point"] * 1 >= $v["memo"][0] * 1 && $member_data["point"] * 1 <= $v["memo"][1] * 1) {
            $conn->Execute("UPDATE " . PREFIX . "member SET type='" . $v["new_type"] . "' WHERE id ='" . $befo_data["member_id"] . "'");
        }
    }
    //-更改出貨日期
    $conn->Execute("UPDATE " . $cpos["table"] . " SET cargo_date='" . date('Y-m-d H:i:s') . "' WHERE id ='" . $befo_data["id"] . "'");
    /*出貨信件內容*/
    $mail_data = $conn->GetRow("select * from " . PREFIX . "data_list where type='cargomail' and status=1 and new_type='" . $befo_data["paycardmode"] . "'");
    if ($mail_data) {
        $mailbody = dequotes($mail_data["detail"], -1);
        $mailbody = data_mail_insert($befo_data, $mailbody);
        $subject = data_mail_insert($befo_data, $mail_data["name"]);
    } else {
        $mailbody = $befo_data['recive_name'] . ' 您好,訂單編號[' . $befo_data['order_no'] . '] 已被管理者異動為已出貨,特此通知';
        $subject = $web_set["title"] . ' 訂單狀態異動信件';
    }
    //網站設定 $web_set
    $sql = " select * from " . PREFIX . "setting WHERE lang = '" . quotes($lang) . "' order by id";
    $tmp = $conn->GetArray($sql);
    $web_set["title"] = deQuotes($tmp["0"]["detail"], -1);
    $web_set["keyword"] = deQuotes($tmp["1"]["detail"], -1);
    $web_set["receive_email"] = $tmp["2"]["detail"];
    $web_set["default_email_title"] = $tmp["3"]["detail"];
    $web_set["send_email"] = $tmp["4"]["detail"];
    $web_set["favorite_url"] = "http://" . $_SERVER["HTTP_HOST"];
Esempio n. 12
0
            } else {
                $shopping_car->addpro($temp[0], $temp[1]);
            }
        }
    }
    unset($_SESSION["temp_shopping_car"]);
    unset($_SESSION["addoth_login_tmp"]);
    //-記憶路徑判斷
    //--其他類的產品暫存加入
    //unset($_SESSION["temp_other_shopping_car"]);//-刪除暫存記憶
}
//---針對會員型別進行折扣輸入設定
if ($member->getinfo()) {
    $temp_memeber_type = $conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='" . $member->getinfo("type") . "'");
    if ($temp_memeber_type) {
        $shopping_car->deshprice(dequotes($temp_memeber_type["detail"], -1));
    }
}
//--紅利設定 (多少換1)
//$shopping_car->set_point(1);
//-結帳資料
if ($_POST && $_REQUEST['submit']) {
    //--自訂訂單編號
    $shopping_car->order_auto_set('JSP');
    $pay_bill = $shopping_car->paybill($_POST);
    if (!$pay_bill) {
        alert('付款結帳失敗!!' . $shopping_car->erromsg, '?list=1');
        exit;
    } else {
        $temp = $shopping_car->esun_pay_send($pay_bill, '回傳路徑');
    }
Esempio n. 13
0
        $data[$k]["pic"] = $pp[0];
    }
    echo json_encode($data);
    //將陣列資料轉換JSON
}
//--商品目錄選擇最後一層
if ($_GET["pro_class"]) {
    $temp = $conn->GetArray("select * from " . PREFIX . "category where parent_id='" . $_GET["pro_class"] . "'");
    if ($temp) {
        echo 'false';
    }
    exit;
}
if ($_GET["design"]) {
    $temp = $conn->GetRow("select * from " . PREFIX . "design where id='" . quotes($_GET["design"]) . "'");
    $temp["detail"] = dequotes($temp["detail"], -1);
    echo json_encode($temp);
    exit;
}
//--商品尺寸規格圖片及時存檔
if ($_POST["data_img"]) {
    //$img = str_replace('data:image/png;base64,', '', $img);
    $img = preg_replace('/^data:image\\/(png|jpg);base64,/', '', $_POST["data_img"]);
    $img = str_replace(' ', '+', $img);
    $data = base64_decode($img);
    $file_name = strtotime(date('Y-m-d H:i:s')) . rand(10, 99) . '.png';
    $file = $_POST["file_url"] . $file_name;
    $success = file_put_contents($file, $data);
    $_SESSION["upload_temp"][] = $file_name;
    echo $file_name;
}