', '', $var); $var = str_replace('(','(',$var); $var = str_replace(')',')',$var); $var = str_replace('?','?',$var); } return $var; } } } $is_include = strrpos($_SERVER['PHP_SELF'], "include/")===false ?false:true; if(!$is_include){ foreach ($_POST as $key=>$value){ $_POST[$key] = web_safe_check($key,$value); } foreach ($_GET as $key=>$value){ $_GET[$key] = web_safe_check($key,$value); // echo $key.'=>'.$_GET[$key].'
'; } } function getWebName(){ $url = getcwd(); if(strrpos($url, "/web/")!==false){ // 有 /web/ 用這個去拆字串 $tmps = explode("/web/", $url); $tmp = $tmps[1]; $tmps = explode("/", $tmp); $who_am_i=$tmps[0]; } if($who_am_i==""){ $url = str_replace("\webadmin","",$url); //echo $url.'
'; $url = str_replace("\include","",$url); $url = str_replace("\mobile","",$url); $url = str_replace("\merchants","",$url); $who_am_i= strrchr($url,DIRECTORY_SEPARATOR); } return strtok($who_am_i,DIRECTORY_SEPARATOR); } $web = getWebName(); if ($web==""){ echo "ERROR"; }else{ // echo $web.'
'; } // 修正 $npwpage , 當資料夾不是根目錄時,會判斷錯誤 $php_self = $_SERVER['PHP_SELF']; // 用 $web 來拆字串 $tmp = explode($web.'/', $php_self); $check_str = $tmp[1]; if(strrpos($check_str, "/")!==false){ $tmps = explode("/", $check_str); $nowpage = $tmps[0]; }else{ $nowpage = $check_str; } // echo $web.'
'; $_config_file = dirname(__FILE__).'/web/'.$web.'/config.php'; if(is_file($_config_file)){ require $_config_file; } $web = base64_encode($web); require dirname(__FILE__).'/webadmin/include/config_web.php'; // 2024-12-12 內頁網址自動跳轉自訂網址 $useseourl = getLangSetting('all','useseourl'); if($useseourl=='Y'){ // 只處理文章 產品 相簿 表單 $checkUrl = false; // 解析當前檔案室否符合 $redirect = array('article.php','product.php','album.php','eforms.php'); $redirect_d = array('article_d.php','product_d.php','album_d.php','eforms_d.php'); // 修正 $npwpage解析錯誤的問題 if(empty($nowpage)){ $nowpage = basename($php_self); } if(in_array($nowpage,$redirect)){ // 解析功能名 $tbname = str_replace('.php','',$nowpage); $maybeid = ($_GET['cid'] == '')?'':$_GET['cid']; if($maybeid==''){ $key_id = 'fn'; }else{ $key_id = 'c'; } $checkUrl = true; } if(in_array($nowpage,$redirect_d)){ // 解析功能名 $tbname = str_replace('_d.php','',$nowpage); $maybeid = $_GET['id']; $key_id = 'd'; $checkUrl = true; } if($checkUrl){ $tb = $_GET['tb']; $lang = $_GET['lang']; require dirname(__FILE__).'/public/webpage/include/urlparse_checkUrl.php'; $urlparse_checkUrl = new urlparse_checkUrl(); $urlparse_checkUrl->fn_id = $tbname.$tb; $urlparse_checkUrl->isFromList = 'Y'; $urlparse_checkUrl->key_id = $key_id; $urlparse_checkUrl->data_id = $maybeid; $urlparse_checkUrl->checkUrl(); } } //require 'include/lib.php'; //修改以下邏輯2024-12-12 by jr //showcount是一個很低頻率修改的設定,所以不用每次都去讀取資料庫 //將showcount的設定值寫入檔案,每次讀取檔案即可 //每一天更新一次檔案 //檔案名稱為showcount_config.txt //檔案內容為Y或N //如果檔案的更新日期不是當月,就更新檔案 // 定義一個函式來寫入檔案 function writeShowCountToFile($filename, $showcount) { if ($fp = fopen($filename, "w")) { fwrite($fp, $showcount); fclose($fp); } } $showcount_config_file = $CFG->root_web_user . "/showcount_config.txt"; // 檢查檔案是否存在 if (!file_exists($showcount_config_file)) { // 檔案不存在,讀取資料庫並寫入檔案 $showcount = getLangSetting('all', 'showcount') === 'Y' ? 'Y' : 'N'; writeShowCountToFile($showcount_config_file, $showcount); } else { // 檔案存在,檢查日期 $file_date = date("Y-m-d", filemtime($showcount_config_file)); $current_date = date("Y-m-d"); if ($file_date != $current_date) { // 日期不同,更新檔案內容 $showcount = getLangSetting('all', 'showcount') === 'Y' ? 'Y' : 'N'; writeShowCountToFile($showcount_config_file, $showcount); } else { // 日期相同,讀取檔案內容 $showcount = file_get_contents($showcount_config_file); if ($showcount === false) { $showcount = 'N'; // 無法讀取檔案時提供預設值 } } } if($showcount == 'Y'){ require dirname(__FILE__).'/webadmin/include/counter.php'; } $CFG->header_js = array(); $CFG->header_css = array(); $CFG->footer_js = array(); $CFG->footer_script = array(); $jquery_ver = ''; } ?>
Warning: Undefined variable $CFG in C:\xampp\htdocs\index.php on line 3

Warning: Attempt to read property "template_id" on null in C:\xampp\htdocs\index.php on line 3

Warning: Undefined variable $CFG in C:\xampp\htdocs\index.php on line 4

Warning: Attempt to read property "colorcss_id" on null in C:\xampp\htdocs\index.php on line 4

Warning: Undefined variable $CFG in C:\xampp\htdocs\index.php on line 5

Warning: Attempt to read property "bgcss_id" on null in C:\xampp\htdocs\index.php on line 5
web."'"; // echo $sql.'
'; $query = @mysql_query($sql); $adminType = @mysql_fetch_assoc($query); $admin_path = 'webadmin'; if($adminType['adminType']=='webtech'){ $admin_path = $adminType['adminType']; } $mmstr = base64url_encode($ta.'||'.$ke); header("location:".$admin_path."/?mmstr=".$mmstr); } $_timer = new debugTimer(); $_page_timer = new debugTimer(); $_page_timer->start('page load'); try{ require("public_template.php"); $maincss = 'wapper'; if($templateItem['className']!=''){ $maincss = $templateItem['className']; } $panelcss = 'panel'; if(strpos($templateItem['template_id'],'RWD')===0){ $panelcss = ''; } ?>
C:\xampp\htdocs\public\webpage\index.php on line 31
"> tbext."template_panel t_panel where t_panel.template_id='$template_id' and t_panel.pid=0 order by t_panel.seq asc"; //echo "===>".$sql."
"; $_timer->start($sql); $rs = @mysql_query($sql); $_timer->end(); $panels_size = @mysql_num_rows($rs); if($panels_size==0){ throw new Exception('抱歉,尚未設定'.htmlspecialchars($template_id)); } $panels = array(); $last_panel = ''; $panel_size = 0; $_timer->start('rs while'); while($panelItem = @mysql_fetch_assoc($rs)){ if($panelItem['page_style']=='footer' || $panelItem['page_style']=='header'){ // echo 'panel=>footer load start
'; ## 表示要去撈取 footermain 的設定 $_page_style = $panelItem['page_style']; $resql = "select * from ".$CFG->tbext."template_panel t_panel where t_panel.template_id in (".pSQLStr($CFG->page_template_id).",".pSQLStr($CFG->template_id).") and t_panel.page_style='".$_page_style."main' limit 1"; // echo $resql.'
'; $rers = @mysql_query($resql); $tmppanelItem = @mysql_fetch_assoc($rers); if($tmppanelItem['template_id']!=''){ $panelItem = $tmppanelItem; $tp_id = $panelItem['tp_id']; $tmpVO = new panelVO($tp_id); ?>bulidHtmlStart($tmpVO,'',$panelItem); loadsubPanel($panelItem['template_id'],$tp_id,1); loadModel($panelItem['template_id'],$tp_id); $PANEL_tools->bulidHtmlEnd($panelItem); ?>bulidHtmlStart($tmpVO,'',$panelItem); loadsubPanel($template_id,$tp_id); loadModel($template_id,$tp_id); $PANEL_tools->bulidHtmlEnd($panelItem); $now_panel++; //{seo 判斷 if ($nowpage=='index.php' || $nowpage=="home.php"){ $header_info_xml = getLangSetting($lang,'header_info'); $header_info_obj = new parseXML($header_info_xml); $pos = strrpos($panelItem['appendcss'], "indexseo1"); if(!($pos===false)){ ?>
value('/content/index_seo_mainkey'.$ii); if($tmp!=''){ ?>


Warning: Undefined variable $tmp in C:\xampp\htdocs\public\webpage\index.php on line 103

value('/content/index_companyname'); $pos = strrpos($panelItem['appendcss'], "indexseocompany"); if(!($pos===false)){ ?>
C:\xampp\htdocs\public\webpage\index.php on line 115
" title="
Warning: Undefined variable $index_companyname in C:\xampp\htdocs\public\webpage\index.php on line 115
">
Warning: Undefined variable $CFG in C:\xampp\htdocs\public\webpage\index.php on line 115

Warning: Attempt to read property "company_name" on null in C:\xampp\htdocs\public\webpage\index.php on line 115
value('/content/index_seo_seckey'.$ii); if($tmp!=''){ ?>C:\xampp\htdocs\public\webpage\index.php on line 127
" title="
Warning: Undefined variable $tmp in C:\xampp\htdocs\public\webpage\index.php on line 127
">
Warning: Undefined variable $tmp in C:\xampp\htdocs\public\webpage\index.php on line 127
  
end(); ?>
template_id==$templateItem['template_id']){ $xml = getLangSetting($lang,'homepop'); if($xml!=''){ $xmlobj = new parseXML($xml); $description = db2html(@$xmlobj->value('/content/description'),false); // 加上不做 lazyload 處理 $manualSize = @$xmlobj->value('/content/manualSize'); $screen_wide = @$xmlobj->value('/content/screen_wide'); $webURL = @$xmlobj->value('/content/webURL'); if($description!='' || $webURL!=''){ if($CFG->run_seo_optimization){ if(!isset($CFG->resource_loaded['css']['fancybox_215'])){?> C:\xampp\htdocs\public\webpage\index.php on line 155
js/fancybox/jquery.fancybox.css" as="style" onload="this.onload=null;this.rel='stylesheet'"/> resource_loaded['js']['fancybox_215'])){ $CFG->need_append_resource['js']['fancybox_215'] = $CFG->web_lib.'js/fancybox/jquery.fancybox.pack.js'; } } if ($webURL !=''){ ?>


Warning: Undefined variable $description in C:\xampp\htdocs\public\webpage\index.php on line 189


Warning: Undefined variable $description in C:\xampp\htdocs\public\webpage\index.php on line 191

getMessage(); echo $message; } $_page_timer->end(); require("footer.php"); ?>