当前位置: 首页>>代码示例>>PHP>>正文


PHP check::AlertExit方法代码示例

本文整理汇总了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);
         }
     }
 }
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:54,代码来源:links.class.php

示例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("修改失败");
         }
     }
 }
开发者ID:TiMoChao,项目名称:xingfu,代码行数:30,代码来源:xingfu_apply.class.php

示例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}/");
    }
}
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:install.php

示例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);
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:template_right.php

示例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 {
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:sms_sender.php

示例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'] . "%'";
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:index.php

示例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'])) {
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:modifyinfo.php

示例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;
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:category.php

示例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);
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:cache_set.php

示例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;
     }
 }
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:63,代码来源:user.class.php

示例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("&nbsp;", " ", 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);
}
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:postnew.php

示例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);
}
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:login.php

示例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'])) {
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:login.php

示例14: print_r

         }
     }
 }
 if ($_GET['action'] == 'detailtest') {
     echo "<a href=\r\n\t'{$val}' target=_blank>{$val}</a> &nbsp;&nbsp;&nbsp;&nbsp;<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> &nbsp;&nbsp;&nbsp;&nbsp;<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("&nbsp;"," ",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];
             }
         }
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:fecth.php

示例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}/");
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:install.php


注:本文中的check::AlertExit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。