"; } echo ""; echo ""; echo ""; echo ""; //$dubug=(isset($_GET['debug']))?(1):(0); //$usedDB=(isset($_POST['db']))?($_POST['db']):(""); $broke='';//紀錄DB損毀的門市編號 function myErrorHandler($errno, $errstr, $errfile, $errline){ if (!(error_reporting() & $errno)) { // This error code is not included in error_reporting, so let it fall // through to the standard PHP error handler return false; } switch ($errno) { case E_WARNING: if(preg_match('/database disk image is malformed/',$errstr)&&$GLOBALS['broke']!=''){ echo '門市編號: '.$GLOBALS['broke'].' 的資料庫未完成上傳,導致資料庫損毀。
'; $GLOBALS['broke']=''; } else{ } break; default: if(file_exists('../../../menudata/'.$GLOBALS['company'].'/'.$GLOBALS['dep'].'/log')){ } else{ mkdir('../../../menudata/'.$GLOBALS['company'].'/'.$GLOBALS['dep'].'/log'); } $f=fopen('../../../menudata/'.$GLOBALS['company'].'/'.$GLOBALS['dep'].'/log/error.txt','a'); fwrite($f,date('Y/m/d H:i:s').' ---- Unknown error type: ['.$errno.'] '.$errstr.'['.$errfile.' in line '.$errline.']'.PHP_EOL); fclose($f); break; } /* Don't execute PHP internal error handler */ return true; } $old_error_handler = set_error_handler("myErrorHandler"); //error_reporting(0); session_start(); date_default_timezone_set('Asia/Taipei'); if(isset($_POST['DB'])){ $_SESSION['DB']=$_POST['DB']; if(isset($_POST['startdate'])){ $_SESSION['startdate']=$_POST['startdate']; } else{ } if(isset($_POST['enddate'])){ $_SESSION['enddate']=$_POST['enddate']; } else{ } } else{ if(isset($_POST['startdate'])){ $_SESSION['startdate']=$_POST['startdate']; } else{ } if(isset($_POST['enddate'])){ $_SESSION['enddate']=$_POST['enddate']; } else{ } } if(!isset($_SESSION['ID'])||$_SESSION['ID']==""){ echo ""; } else{ if(isset($_POST['startdate'])){ $_SESSION['startdate']=$_POST['startdate']; } else if(isset($_POST['enddate'])){ $_SESSION['enddate']=$_POST['enddate']; } else{ $_SESSION['startdate']=date("Y-m-01"); $_SESSION['enddate']=date("Y-m-t"); } $ID=$_SESSION['ID']; $name=$_SESSION['name']; $usergroup=$_SESSION['usergroup']; $DB=$_SESSION['DB']; if(isset($_SESSION['startdate'])||isset($_SESSION['enddate'])){ $startdate=$_SESSION['startdate']; $enddate=$_SESSION['enddate']; } else{ $startdate=date("Y-m-01"); $enddate=date("Y-m-t"); } } echo "
"; echo "
"; echo ""; /*echo "
"; advertising(); echo "
";*/ echo ""; echo "
"; echo "
"; echo ""; echo "
"; content($ID,$DB,$usergroup,$startdate,$enddate); echo "
"; echo "
"; echo ""; echo "
"; echo ""; if(check_mobile()){ if(!isset($_POST['conttype'])){ echo ""; } } ?>