本文整理匯總了PHP中check::AlertExit方法的典型用法代碼示例。如果您正苦於以下問題:PHP check::AlertExit方法的具體用法?PHP check::AlertExit怎麽用?PHP check::AlertExit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類check
的用法示例。
在下文中一共展示了check::AlertExit方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: uploadInfoImage
/**
* 上傳文件
* @author 肖飛
* @param array $arrFile 圖片文件信息數組$_FILES
* @param int $PR 自動壓縮的比例
* @param int $intID 內容ID,標示新增還是修改
* @return unknown
*/
function uploadInfoImage($arrFile, $PR = 0, $intID = 0)
{
if ($arrFile['name']) {
if (!in_array(strtolower($arrFile['type']), array('image/jpg', 'image/jpeg', 'image/gif', 'image/pjpeg', 'image/png', 'image/x-png', 'application/x-shockwave-flash'))) {
check::AlertExit('文件類型不符合要求(' . $arrFile['type'] . ')', -1);
}
}
if ($intID == 0) {
$intID = $this->getMaxID();
}
$strDir = ceil($intID / 1000);
$strMakeDir = $this->arrGPic['FileSavePath'] . $strDir;
if (!is_dir($this->arrGPic['FileSavePath'])) {
@mkdir($this->arrGPic['FileSavePath']);
@chmod($this->arrGPic['FileSavePath'], 0777);
}
if (!is_dir($strMakeDir)) {
@mkdir($strMakeDir);
@chmod($strMakeDir, 0777);
}
$FileExt = strrchr($arrFile['name'], ".");
//取得上傳文件擴展名
$strPhoto = $strDir . "/" . $intID . "_" . time() . $FileExt;
//存入數據庫的圖片訪問路徑
$strPicName = $strMakeDir . "/" . $intID . "_" . time() . $FileExt;
//新圖片路徑及名稱
if ($arrFile['type'] != 'application/x-shockwave-flash' && $arrFile['size'] > $this->arrGPic['FileMaxSize']) {
if ($PR != 0) {
move_uploaded_file($arrFile['tmp_name'], $strPicName);
$objGDImage = new GDImage();
if ($objGDImage->makePRThumb($strPicName, $PR)) {
return $strPhoto;
} else {
check::AlertExit($strPicName . "文件上傳錯誤!", -1);
}
} else {
check::AlertExit("文件大小不符合要求!", -1);
}
} else {
if (move_uploaded_file($arrFile['tmp_name'], $strPicName)) {
return $strPhoto;
} else {
check::AlertExit($strPicName . "文件上傳錯誤!", -1);
}
}
}
示例2: saveInfo
/**
* 保存信息內容
* @author 肖飛
* @param int $arrData 信息信息數組
* @return void
*/
function saveInfo($arrData, $intModify = 0, $isAlert = true)
{
$arr = array();
$arr = check::SqlInjection($this->saveTableFieldG($arrData));
if ($intModify == 0) {
if (!empty($_SESSION['user_id'])) {
$arr['user_id'] = intval($_SESSION['user_id']);
}
if ($this->insertInfo($arr)) {
if ($isAlert) {
check::Alert("預約成功,我們會盡快通知您,祝您生活愉快", -1);
}
check::AlertExit("", $arrGWeb['WEB_ROOT_pre'] . "/xingfu_apply/");
} else {
check::Alert("發布失敗", -1);
}
} else {
if ($this->updateInfo($arr)) {
check::Alert("修改成功!");
} else {
check::Alert("修改失敗");
}
}
}
示例3: array
}
$arrGMeta['video']['meta'] = array('Title' => $arrGMeta['video']['name'], 'Description' => $arrGMeta['video']['name'], 'Keywords' => $arrGMeta['video']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
// 首先我們要確定文件存在並且可寫。
if (is_writable($strFilename)) {
if (!($handle = fopen($strFilename, 'w'))) {
check::AlertExit("錯誤:不能打開文件 {$strFilename} !", -1);
}
// 將$somecontent寫入到我們打開的文件中。
if (fwrite($handle, $somecontent) === FALSE) {
check::AlertExit("錯誤:不能寫入到文件 {$strFilename} !", -1);
}
fclose($handle);
} else {
check::AlertExit("錯誤:文件 {$strFilename} 不可寫!", -1);
}
//sql語句
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "video` (\r\n `id` int(10) unsigned NOT NULL auto_increment,\r\n `type_id` tinyint(3) unsigned default '0',\r\n `type_roue_id` varchar(80) default NULL,\r\n `user_id` int(10) unsigned default '0',\r\n `tag` varchar(30) default NULL,\r\n `bedeck` tinyint(3) unsigned default '0',\r\n `title` varchar(100) default NULL,\r\n `title_md5` char(32) default NULL,\r\n `linkurl` varchar(100) default NULL,\r\n `summary` varchar(" . $intDbSummaryLen . ") default NULL,\r\n `structon_tb` mediumtext,\r\n `thumbnail` varchar(100) default NULL,\r\n `submit_date` datetime default '0000-00-00 00:00:00',\r\n `topflag` tinyint(1) default '0',\r\n `recommendflag` tinyint(1) default '0',\r\n `stars` tinyint(1) default '0',\r\n `clicktimes` mediumint(10) unsigned default '0',\r\n `pass` tinyint(1) default '1',\r\n PRIMARY KEY (`id`),\r\n KEY `user_id` (`user_id`),\r\n KEY `type_id` (`type_id`),\r\n KEY `title_md5` (`title_md5`),\r\n KEY `submit_date` (`submit_date`)\r\n) ENGINE=MyISAM {$extend} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT='行業資訊表' ;";
if (!is_array($arrMType) || empty($arrMType)) {
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "video_type` (\r\n\t `type_id` int(10) unsigned NOT NULL auto_increment,\r\n\t `type_parentid` int(10) unsigned NOT NULL default '0',\r\n\t `type_roue_id` varchar(80) default NULL,\r\n\t `type_title` varchar(80) default NULL,\r\n\t `type_link` varchar(150) default NULL COMMENT '跳轉鏈接',\r\n\t `type_sort` int(10) unsigned default NULL,\r\n\t `type_pass` tinyint(1) NOT NULL default '1',\r\n\t `type_read_grade` tinyint(1) NOT NULL default '0',\r\n\t `type_write_grade` tinyint(1) NOT NULL default '0',\r\n\t PRIMARY KEY (`type_id`),\r\n\t KEY `type_parentid` (`type_parentid`),\r\n\t KEY `type_sort` (`type_sort`)\r\n\t) ENGINE=MyISAM {$extend} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT='行業視頻分類表' ;";
}
foreach ($sql as $val) {
$objWebInit->db->query($val);
}
if (empty($arrModule)) {
if (!is_array($arrMType) || empty($arrMType)) {
check::AlertExit('數據庫分類行業視頻係統安裝成功', "{$strWEB_ROOT_pre}/{$strWEBADMIN_ROOT}/");
} else {
check::AlertExit('配置文件分類行業視頻係統安裝成功', "{$strWEB_ROOT_pre}/{$strWEBADMIN_ROOT}/");
}
}
示例4: str_replace
check::AlertExit('對不起,您沒有權限訪問此頁', -1);
}
if (empty($_GET['path'])) {
$arrMOutput["template_file"] = 'siteset/template_right_index.htm';
} else {
$path = $_GET['path'];
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$strFileName = $_SESSION['fileName'];
$content = str_replace('\\', '', $_POST['content']);
if (is_writable($strFileName)) {
$fp = fopen($strFileName, 'w');
fputs($fp, $content);
fclose($fp);
check::AlertExit('修改成功', -1);
} else {
check::AlertExit('很遺憾,template/ 下文件沒有寫權限!', -1);
}
}
$strFileName = __WEB_ROOT . '/templates/' . $arrGWeb['templates_id'] . '/' . $path;
$_SESSION['fileName'] = $strFileName;
$fp = fopen($strFileName, 'r');
$contents = fread($fp, filesize($strFileName));
fclose($fp);
//文件類型
$opeType = substr(strrchr($path, '.'), 1);
$arrMOutput["smarty_assign"]['contents'] = $contents;
$arrMOutput["smarty_assign"]['strType'] = $opeType;
$arrMOutput["template_file"] = 'siteset/template_right.htm';
}
// 輸出到模板
$objWebInit->output($arrMOutput);
示例5: explode
if (empty($_POST['content'])) {
check::AlertExit("錯誤:短信內容沒填!", -1);
}
//解析手機號開始
$strSpacemark = $_POST['spacemark'];
$strMobiles = $_POST['mobiles'];
$arrMobiles = explode($strSpacemark, $strMobiles);
$arrValidMobiles = array();
foreach ($arrMobiles as $v) {
$v = trim($v);
if (check::CheckMobilePhone($v)) {
$arrValidMobiles[] = $v;
}
}
if (count($arrValidMobiles) == 0) {
check::AlertExit("錯誤:填寫的手機號都不合法!", -1);
}
$strMobiles = implode(";", $arrValidMobiles);
//解析手機號完成
$objSms = new BizSMS();
$objSms->setParam($yx_arrMBizParam);
//設置商務領航短信接口的基本參數
$strResult = $objSms->sendShortMessage($strMobiles, $_POST['content']);
//從頁麵中獲取手機號和短信內容
$strReturnCode = substr($strResult, 0, 1);
if ($strReturnCode == "0") {
check::Alert("發送成功!");
} else {
if ($strReturnCode == "1") {
check::Alert("用戶名或密碼錯誤!", -1);
} else {
示例6: intval
$arrWhere[] = "type_id='" . $intTypeID . "' or type_roue_id like '%:{$intTypeID}:%'";
$arrLink[] = 'type_id=' . $intTypeID;
}
if (!empty($_GET['state'])) {
$intState = intval($_GET['state']);
$arrWhere[] = " state = '{$intState}' ";
$arrLink[] = 'state=' . $intState;
}
} else {
if ($_GET['action'] == 'del') {
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'd')) {
check::AlertExit('對不起,您沒有刪除權限', -1);
}
} else {
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) {
check::AlertExit('對不起,您沒有寫權限', -1);
}
}
$objWebInit->doInfoAction($_GET['action'], $_POST['select']);
}
}
if (!empty($_GET['title'])) {
$strKeywords = strval(urldecode($_GET['title']));
if ($strKeywords[0] == '/') {
//精確查詢ID
$strKeywords = substr($strKeywords, 1);
if (is_numeric($strKeywords)) {
$arrWhere[] = "id = '" . $strKeywords . "'";
}
} else {
$arrWhere[] = "title LIKE '%" . $_GET['title'] . "%'";
示例7: array
//數據庫連接參數
$objWebInit->setDBG($arrGPdoDB);
//smarty參數
$objWebInit->arrGSmarty = $arrGSmarty;
//圖片上傳參數
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//訪問權限檢查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
check::AlertExit('對不起,您沒有權限訪問此頁', -1);
}
// 取得文章信息
$arrInfo = $objWebInit->getInfo($_REQUEST['id']);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
check::AlertExit("錯誤:有必填選項沒填!", -1);
}
//還原圖片數組
$_POST['photo'] = array();
if (!empty($_POST['savephoto'])) {
foreach ($_POST['savephoto'] as $key => $val) {
$arrTemp = array();
$arrTemp['photo'] = $val;
if (!empty($_POST['photo_narrate' . $key])) {
$arrTemp['photo_narrate'] = $_POST['photo_narrate' . $key];
}
$_POST['photo'][$key] = $arrTemp;
}
}
//刪除舊圖
if (!empty($_POST['delphoto'])) {
示例8: strtolower
if ($types['type_id'] == $id) {
$arrType = $types;
}
}
$arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
$arrMOutput["smarty_assign"]['type_id'] = $id;
$arrMOutput["smarty_assign"]['arrType'] = $arrType;
$arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'edit_category.htm';
$objWebInit->output($arrMOutput);
break;
// 更新課程培訓類別
// 更新課程培訓類別
case 'update':
if (empty($_POST['type_title'])) {
check::AlertExit("錯誤:提交數據為空!", -1);
}
if (!empty($_POST['type_link'])) {
$_POST['type_link'] = str_replace("http://", "", strtolower($_POST['type_link']));
}
$objWebInit->makeUpdateType($_POST);
unset($_GET['action']);
break;
}
}
if (!isset($_GET['action'])) {
// 課程培訓類型列表
$arrTypeList = $objWebInit->getTypeList();
$arrTypeList = $objWebInit->formatTypeList(0, $arrTypeList);
// 輸出到模板
$arrMOutput["smarty_assign"]['arrData'] = $arrTypeList;
示例9: unset
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w', 'siteset')) {
check::AlertExit('對不起,您沒有寫權限', -1);
}
unset($_POST['okgo']);
unset($arrGWeb);
$strFilename = '../../data/webconfig.inc.php';
include $strFilename;
foreach ($arrGWeb as $k => $v) {
foreach ($_POST as $k1 => $v1) {
if ($k == $k1) {
$arrGWeb[$k] = $_POST[$k1];
}
}
}
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
if (!($handle = fopen($strFilename, 'w'))) {
check::AlertExit("錯誤:不能打開文件 {$strFilename} !", -1);
}
// 將$somecontent寫入到我們打開的文件中。
if (fwrite($handle, $somecontent) === FALSE) {
check::AlertExit("錯誤:不能寫入到文件 {$strFilename} !", -1);
}
fclose($handle);
check::AlertExit("成功地寫入到文件 {$strFilename} !", -1);
}
// 輸出到模板
$arrMOutput["smarty_assign"]['strNav'] = '網站緩存設置';
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'siteset/cache_set.htm';
$objWebInit->output($arrMOutput);
示例10: userLogin
/**
* 會員登陸
* @author 肖飛
* @param array $arrUser 會員信息數組
* @return void
*/
public function userLogin($arrData, $isEncryption = 0, $jamStr)
{
if (!check::CheckUser($arrData['User'])) {
check::AlertExit("輸入的用戶名必須是4-20字符之間的數字、字母或中文!", -1);
return false;
}
if (!check::CheckPassword($arrData['Pass'])) {
check::AlertExit("輸入的密碼必須是4-20字符之間的數字、字母!", -1);
return false;
}
$strPassTemp = $arrData['Pass'];
if ($isEncryption) {
$strPassTemp = check::strEncryption($strPassTemp, $jamStr);
}
$strSQL = "SELECT * FROM {$this->tablename2} WHERE user_name = ? and password = ?";
$rs = $this->db->prepare($strSQL);
$rs->execute(array($arrData['User'], $strPassTemp));
if ($arr = $rs->fetchAll()) {
$arr = current($this->loadTableFieldG($arr));
$user_id = '';
$user_name = '';
$password = '';
$real_name = '';
$user_group = '';
$user_popedom = '';
$submit_date = '';
$pass = '';
$email = '';
$tel = '';
$company_cn = '';
$user_type = '';
$user_bonus = '';
$_SESSION['user_id'] = $arr['user_id'];
$_SESSION['user_name'] = $arr['user_name'];
$_SESSION['password'] = $arr['password'];
$_SESSION['user_group'] = $arr['user_group'];
$_SESSION['user_grade'] = $arr['user_grade'];
$_SESSION['user_popedom'] = $arr['user_popedom'];
$_SESSION['real_name'] = $arr['real_name'];
$_SESSION['email'] = $arr['email'];
$_SESSION['tel'] = $arr['tel'];
$_SESSION['company_cn'] = $arr['company_cn'];
$_SESSION['user_type'] = $arr['user_type'];
$_SESSION['user_bonus'] = $arr['user_bonus'];
$_SESSION['pass'] = $arr['pass'];
$_SESSION['province'] = $arr['province'];
$_SESSION['city'] = $arr['city'];
$_SESSION['type_id'] = $arr['type_id'];
$arrUpdate['user_ip'] = check::getIP();
$arrUpdate['lastlog '] = date('Y-m-d H:i:s');
$arrUpdate['user_id'] = $arr['user_id'];
$this->updateUser($arrUpdate);
return true;
} else {
return false;
}
}
示例11: QQWry
}
$objQQWry =& new QQWry();
$objQQWry->qqwry($strIP);
$strZone = iconv('GB2312', 'UTF-8' . '//TRANSLIT', $objQQWry->Country);
$_POST['zone'] = $strZone;
$_POST['reply'] = array();
if ($_POST['summary'] == '') {
$_POST['summary'] = check::csubstr(trim(str_replace(" ", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, 100);
}
if (!array_key_exists('title', $_POST)) {
$_POST['title'] = $_POST['titleprefix'] . $_POST['longtitle'];
}
unset($_POST['titleprefix']);
unset($_POST['longtitle']);
if ($_POST['title'] != '') {
$_POST['title_md5'] = md5($_POST['title']);
}
//判斷文章信息
$arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
if ($arrTemp['COUNT_ROWS'] != 0) {
check::AlertExit("錯誤:相同的信息請不要重複發布!需要刷新排列的話,請登錄會員中心使用列表下方“提前”選項!", -1);
}
$objWebInit->saveInfo($_POST, 0);
if ($arrGWeb['URL_static']) {
check::Alert("", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
} else {
check::AlertExit("請先完善提問信息", $arrGWeb['WEB_ROOT_pre'] . "/ask/index.php");
}
} else {
check::AlertExit('對不起,新問題的內容不能為空!', -1);
}
示例12: user
*
* @author Arthur(ArthurXF@gmail.com)
* @copyright (c) 2006 by bizeway.com
* @version $Id$
* @package ArthurXF
* @subpackage user
*/
require_once 'config/config.inc.php';
require_once "class/user.class.php";
$objWebInit = new user();
//數據庫連接參數
$objWebInit->setDBG($arrGPdoDB);
$objWebInit->db();
//smarty參數
$objWebInit->arrGSmarty = $arrGSmarty;
if (!empty($_POST)) {
if (isset($_POST['authCode']) && $_POST['authCode'] != $_SESSION['authCode']) {
check::AlertExit("錯誤:驗證碼不匹配!", -1);
}
if ($objWebInit->userLogin($_POST, $arrGWeb['user_pass_type'], $arrGWeb['jamstr'])) {
check::AlertExit("恭喜您,登陸成功!", $_SERVER['HTTP_REFERER']);
} else {
check::AlertExit("用戶名,或者密碼錯誤!", $_SERVER['HTTP_REFERER']);
}
}
//全站公用block
@(include '../_block.php');
if (empty($_SESSION['user_id'])) {
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'login.html';
$objWebInit->output($arrMOutput);
}
示例13: user
* @author Arthur(ArthurXF@gmail.com)
* @copyright (c) 2006 by bizeway.com
* @version $Id$
* @package ArthurXF
* @subpackage user
*/
require_once 'config/config.inc.php';
require_once "class/user.class.php";
$objWebInit = new user();
$objWebInit->db();
if (empty($_SESSION['jumpURL'])) {
$_SESSION['jumpURL'] = $_SERVER['HTTP_REFERER'];
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST['authCode']) || $_POST['authCode'] != $_SESSION['captcha']) {
check::AlertExit("錯誤:驗證碼不匹配!", -1);
}
if ($objWebInit->userLogin($_POST, $arrGWeb['user_pass_type'], $arrGWeb['jamstr'])) {
// 選擇了記住用戶名,用cookie的方式記錄下來, 隻記錄用戶名
if (!empty($_POST['SafeControl'])) {
// 需要記錄
setcookie('User', $_POST['User'], time() + 32140800, '/');
// 默認有效期1年,
setcookie('User_check', $_POST['SafeControl'], time() + 32140800, '/');
} else {
// 取消記錄
setcookie('User', $_POST['User'], time() - 100, '/');
// 不需要記錄,讓Cookie 過期
setcookie('User_check', $_POST['SafeControl'], time() - 100, '/');
}
if (!empty($_SESSION['jumpURL'])) {
示例14: print_r
}
}
}
if ($_GET['action'] == 'detailtest') {
echo "<a href=\r\n\t'{$val}' target=_blank>{$val}</a> <a href='index.php'>返回</a><pre>";
print_r($arrSave);
echo "</pre>";
exit;
}
//存入數據庫
if ($_GET['action'] == 'fetchall' || $_GET['action'] == 'fetch') {
if (empty($arrGFetch[$_GET['id']]['module_id'])) {
check::AlertExit('存入欄目必須選擇!', -1);
}
if (in_array($arrGFetch[$_GET['id']]['module_id'], array('mcenter', 'account', 'certification', 'comments', 'friend', 'message', 'payment', 'usermoney', 'logs', 'archives', 'ads', 'links', 'phonelist', 'emaillist', 'keywords', 'user'))) {
check::AlertExit('非法欄目!', -1);
}
echo "<a href='{$val}' target=_blank>{$val}</a> <a href='javascript:history.go(-1);'>返回</a><pre>";
print_r($arrSave);
echo "</pre>";
$arrSave['type_id'] = $arrGFetch[$_GET['id']]['type_id'];
//if(!empty($arrSave['intro'])) $arrSave['summary'] = check::csubstr(trim(str_replace(" "," ",str_replace("\r\n","",strip_tags($arrSave['intro'])))),0,250);
if (!empty($arrSave['intro'])) {
$arrSave['summary'] = check::csubstr(check::stripText($arrSave['intro']), 0, 250);
}
if (!empty($arrGFetch[$_GET['id']]['delimiter_df'])) {
foreach ($arrGFetch[$_GET['id']]['delimiter_df'] as $k => $v) {
if (!empty($v[0])) {
$arrSave[$v[0]] = $v[1];
}
}
示例15: unset
$strWEBADMIN_ROOT = __WEBADMIN_ROOT;
}
unset($arrGWeb);
if (empty($ver_path)) {
$ver_path = '';
}
$strFilename = '..' . $ver_path . '/data/webconfig.inc.php';
include $strFilename;
$arrGMeta['weixin_xingfufengcai']['name'] = '微信_名教風采';
$arrGMeta['weixin_xingfufengcai']['cache'] = 1;
//該欄目是否生成靜態頁,0=不可以,1=可以
$arrGMeta['weixin_xingfufengcai']['admin'] = array(array('href' => '../weixin_xingfufengcai/admin/category.php', 'name' => '微信_名教風采分類'), array('href' => '../weixin_xingfufengcai/admin/index.php', 'name' => '微信_名教風采管理'));
$arrGMeta['weixin_xingfufengcai']['meta'] = array('Title' => $arrGMeta['weixin_xingfufengcai']['name'], 'Description' => $arrGMeta['weixin_xingfufengcai']['name'], 'Keywords' => $arrGMeta['weixin_xingfufengcai']['name']);
$somecontent = '<?php' . "\n" . '$arrGWeb = ' . var_export($arrGWeb, true) . ';' . "\n" . '$arrGMeta = ' . var_export($arrGMeta, true) . ';' . "\n" . '?>';
//寫入文件
file_put_contents($strFilename, $somecontent);
//sql語句
if ($_SESSION['install_type']) {
$sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai` (\n `id` int(10) unsigned NOT NULL auto_increment,\n `type_id` tinyint(3) unsigned default '0',\n `type_roue_id` varchar(80) default NULL,\n `user_id` int(10) unsigned default '0',\n `tag` varchar(30) default NULL,\n `bedeck` tinyint(3) unsigned default '0',\n `title` varchar(100) default NULL,\n `title_md5` char(32) default NULL,\n `linkurl` varchar(100) default NULL,\n `summary` varchar(" . $intDbSummaryLen . ") default NULL,\n `structon_tb` mediumtext,\n `thumbnail` varchar(30) default NULL,\n `submit_date` datetime default '0000-00-00 00:00:00',\n `topflag` tinyint(1) default '0',\n `recommendflag` tinyint(1) default '0',\n `stars` tinyint(1) default '0',\n `clicktimes` mediumint(10) unsigned default '0',\n `pass` tinyint(1) default '1',\n PRIMARY KEY (`id`),\n KEY `user_id` (`user_id`),\n KEY `type_id` (`type_id`),\n KEY `title_md5` (`title_md5`),\n KEY `submit_date` (`submit_date`)\n) ENGINE=MyISAM {$extend} COMMENT='微信_名教風采表' ;";
if ($_SESSION['install_type']) {
$sql[] = "DROP TABLE IF EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai_type`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "weixin_xingfufengcai_type` (\n `type_id` int(10) unsigned NOT NULL auto_increment,\n `type_parentid` int(10) unsigned NOT NULL default '0',\n `type_roue_id` varchar(80) default NULL,\n `type_title` varchar(80) default NULL,\n `type_link` varchar(150) default NULL COMMENT '跳轉鏈接',\n `type_sort` int(10) unsigned default NULL,\n `type_pass` tinyint(1) NOT NULL default '1',\n `type_read_grade` tinyint(1) NOT NULL default '0',\n `type_write_grade` tinyint(1) NOT NULL default '0',\n PRIMARY KEY (`type_id`),\n KEY `type_parentid` (`type_parentid`),\n KEY `type_sort` (`type_sort`)\n) ENGINE=MyISAM {$extend} COMMENT='微信_名教風采分類表' ;";
foreach ($sql as $val) {
$objWebInit->db->query($val);
}
if (empty($arrModule)) {
check::AlertExit('微信_名教風采係統安裝成功', "{$strWEB_ROOT_pre}{$strWEBADMIN_ROOT}/");
}