本文整理汇总了PHP中check类的典型用法代码示例。如果您正苦于以下问题:PHP check类的具体用法?PHP check怎么用?PHP check使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了check类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: content
public function content()
{
global $dbh, $postvar, $getvar, $instance;
if ($_POST) {
check::empty_fields();
if (!main::errors()) {
$user = $dbh->staff($_SESSION['user']);
if (!$user['password']) {
main::errors("Wrong username!?");
} else {
if (crypto::passhash($postvar['old'], $user['salt']) == $user['password']) {
if ($postvar['new'] != $postvar['confirm']) {
main::errors("Your passwords don't match!");
} else {
$salt = crypto::salt();
$newpass = crypto::passhash($postvar['new'], $salt);
$update_staff = array("password" => $newpass, "salt" => $salt);
$dbh->update("staff", $update_staff, array("id", "=", $_SESSION['user']));
main::errors("Password changed!");
}
} else {
main::errors("Your old password was wrong!");
}
}
}
}
echo style::replaceVar("tpl/admin/change-admin-password.tpl");
}
开发者ID:cozylife,项目名称:tht-reworked,代码行数:28,代码来源:pass.php
示例2: saveInfo
function saveInfo($arrData, $intModify = 0, $isAlert = true, $isLastID = false)
{
global $arrGWeb;
$arr = array();
$arr = check::SqlInjection($this->saveTableFieldG($arrData));
if ($intModify == 0) {
if ($this->insertInfo($arr)) {
if ($isAlert) {
check::Alert("恭喜你,订阅成功!系统将返回到首页", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
} else {
return true;
}
} else {
if ($isAlert) {
check::Alert("订阅失败", -1);
} else {
return false;
}
}
} else {
if ($this->updateInfo($arr)) {
if ($isAlert) {
check::Alert("退订成功!系统将返回到首页", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
} else {
return true;
}
} else {
if ($isAlert) {
check::Alert("退订失败", $arrGWeb['WEB_ROOT_pre'] . '/index.php');
} else {
return false;
}
}
}
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:35,代码来源:phonelist.class.php
示例3: smarty_modifier_api
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
* truncate (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string
* @param integer
* @param string
* @param boolean
* @param boolean
* @return string
*/
function smarty_modifier_api($array, $class, $fun, $args = '', $debug = false)
{
if (empty($class) || empty($fun)) {
return $array;
}
$result = check::getAPI($class, $fun, $args, $debug);
return $result;
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:26,代码来源:modifier.api.php
示例4: smarty_modifier_imgurl
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
* truncate (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string
* @param integer
* @param string
* @param boolean
* @param boolean
* @return string
*/
function smarty_modifier_imgurl($string, $module = '')
{
global $arrGWeb;
if (empty($module)) {
$module = $arrGWeb['module_id'];
}
return check::getImgUrl($module);
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:26,代码来源:modifier.imgurl.php
示例5: smarty_modifier_age
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
* truncate (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string
* @param integer
* @param string
* @param boolean
* @param boolean
* @return string
*/
function smarty_modifier_age($date, $blday = true)
{
if ($date == '0000-00-00') {
return '0';
} else {
return check::birthday2age($date, $blday);
}
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:26,代码来源:modifier.age.php
示例6: long_long_equal
function long_long_equal($a, $b, $message)
{
if (!($a === $b)) {
if (!((double) $a === $b)) {
return check::fail($message . ": '{$a}'!=='{$b}'");
}
}
return TRUE;
}
开发者ID:daxiazh,项目名称:swig,代码行数:9,代码来源:primitive_ref_runme.php
示例7: __tostring
function __tostring()
{
$input1 = "";
if ($this->number == 0) {
$input1 .= "<script>alert('查不到');history.back();</script>";
} else {
foreach ($this->info as $value) {
$sql = "select * from t_wz";
$f = new check($sql);
$input1 .= "<div class='post' id='post-001'>";
$input1 .= "<h1>" . $value['title'] . "</h1>";
$input1 .= "<small>" . $value['sj'] . "|</small> <a>分类:" . $value['kind'] . "</a>";
$input1 .= "<div id='rensheng'><img src='../img/" . $value['id'] . ".jpg'></div>";
$input1 .= "<div id='comments'><a href='blog_main.php?action=article2&id=" . $value['id'] . "'>readermore</a> <a>|</a><a>comments(" . $f->check1($value['id']) . ")</a></div>";
$input1 .= " </div>";
}
}
return $input1;
}
开发者ID:JiaJia01,项目名称:homework_09,代码行数:19,代码来源:checkone.class.php
示例8: smarty_modifier_ip_replace
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
* truncate (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string
* @param integer
* @param string
* @param boolean
* @param boolean
* @return string
*/
function smarty_modifier_ip_replace($ip, $start = 4, $ellipsis = '*')
{
if (check::FormatIP($ip)) {
$start = $start - 1;
$arrIP = explode('.', $ip);
foreach ($arrIP as $k => $v) {
if ($k >= $start) {
$arrIP[$k] = $ellipsis;
}
}
$ip = implode('.', $arrIP);
return $ip;
}
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:32,代码来源:modifier.ip_replace.php
示例9: 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
示例10: import
public function import()
{
global $dbh, $postvar, $getvar, $instance;
if (!$_POST) {
$servers_query = $dbh->select("servers", array("type", "=", "zpanel"), 0, 0, 1);
while ($servers_data = $dbh->fetch_array($servers_query)) {
$values[] = array($servers_data['name'], $servers_data['id']);
}
$zpanel_array['DROPDOWN'] = main::dropdown("server", $values);
echo style::replaceVar("tpl/admin/import/zpanel.tpl", $zpanel_array);
} elseif ($_POST) {
$postvar['server'] = $postvar['server'];
//Hack to make sure we post the 'server' field as it doesn't post if it's empty.
check::empty_fields();
if (main::errors()) {
echo "<ERRORS>";
} else {
$n = 0;
include INC . "/servers/zpanel.php";
$zpanel = new zpanel($postvar['server']);
$zpanel_accounts = $zpanel->listaccs($postvar['server']);
foreach ($zpanel_accounts as $zpanel_data) {
$packages_data = $dbh->select("packages", array("backend", "=", $zpanel_data['package']));
$users_data = $dbh->select("users", array("user", "=", $zpanel_data['user']));
if (!$packages_data['id']) {
$packages_insert = array("name" => $zpanel_data['package'], "backend" => $zpanel_data['package'], "description" => "Imported from ZPanel: " . $zpanel_data['package'], "type" => "free", "server" => $postvar['server'], "admin" => "1");
$dbh->insert("packages", $packages_insert);
}
$new_packages_data = $dbh->select("packages", array("backend", "=", $zpanel_data['package']));
if (!$users_data['id']) {
$salt = crypto::salt();
$newpass = crypto::passhash(rand(), $salt);
$users_insert = array("user" => $zpanel_data['user'], "zpanel_uid" => $zpanel_data['user'], "email" => $zpanel_data['user'], "password" => $zpanel_data['user'], "salt" => $zpanel_data['user'], "signup" => $zpanel_data['user'], "status" => $zpanel_data['user'], "domain" => $zpanel_data['user'], "pid" => $zpanel_data['user']);
$dbh->insert("users", $users_insert);
$dbh->insert("users_bak", $users_insert);
$n++;
}
}
echo $n . " Accounts have been imported";
}
}
}
开发者ID:cozylife,项目名称:tht-reworked,代码行数:42,代码来源:zpanelimport.php
示例11: 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
示例12: doInfoAction
/**
* 执行信息操作
* @author 肖飞
* @param string $strAction 执行命令
* @param array $arrData 选中的操作数据id数组
* @param array $arrFile 需要删除的文件
* @return boolen
*/
public function doInfoAction($strAction = null, $arrData = null, $arrFile = array('photo'))
{
switch ($strAction) {
case 'del':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'd')) {
check::AlertExit('对不起,您没有删除权限', -1);
}
$this->deleteInfo($val, $arrFile);
}
break;
case 'delpic':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'd')) {
check::AlertExit('对不起,您没有删除权限', -1);
}
$this->deleteInfoPic($val, $arrFile);
}
break;
case 'moveup':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->moveupInfo($val);
}
break;
case 'check':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->passInfo($val, 1);
}
break;
case 'uncheck':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->passInfo($val, 0);
}
break;
case 'settop':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->topInfo($val, 1);
}
break;
case 'unsettop':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->topInfo($val, 0);
}
break;
case 'setrecommend':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->recommendInfo($val, 1);
}
break;
case 'unsetrecommend':
foreach ($arrData as $key => $val) {
if (!$this->checkPopedomG($_SESSION['user_id'], 'x')) {
check::AlertExit('对不起,您没有执行权限', -1);
}
$this->recommendInfo($val, 0);
}
break;
}
return true;
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:86,代码来源:php_common.php
示例13: array_values
}
if (is_array($_POST['photo'])) {
$_POST['thumbnail'] = $_POST['photo'][0]['photo'];
} else {
$_POST['thumbnail'] = $_POST['photo'];
}
$_POST['photo'] = array_values($_POST['photo']);
$_POST['video'] = array_values($_POST['video']);
#自动拆字生成tag
if (empty($_POST['tag'])) {
$objSP = new SplitWord();
$_POST['tag'] = $objSP->SplitRMM($_POST['title'], false);
}
$_POST = array_merge($arrInfo, $_POST);
$objWebInit->saveInfo($_POST, 1);
$objWebInit->updateCache($_POST['id'], $_POST['type_id'], $arrMOutput);
check::WindowLocation('index.php', 'page=' . $_GET['page']);
}
if (!is_array($arrMType) || empty($arrMType)) {
$arrMType = $objWebInit->getTypeList();
$arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
// 输出到模板
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['FileCallPath'] = $objWebInit->arrGPic['FileCallPath'];
$arrMOutput["smarty_assign"]['FileListPicSize'] = $objWebInit->arrGPic['FileListPicSize'];
$arrMOutput["smarty_assign"]['arrData'] = $arrInfo;
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['action_type'] = "save";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm';
$objWebInit->output($arrMOutput);
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:modifyinfo.php
示例14: A
require "tests.php";
require "exception_order.php";
check::functions(array(a_foo, a_bar, a_foobar, a_barfoo));
check::classes(array(A, E1, E2, E3, exception_order, ET_i, ET_d));
check::globals(array(efoovar, foovar, cfoovar, a_sfoovar, a_foovar, a_efoovar));
$a = new A();
try {
$a->foo();
} catch (Exception $e) {
check::equal($e->getMessage(), 'C++ E1 exception thrown', '');
}
try {
$a->bar();
} catch (Exception $e) {
check::equal($e->getMessage(), 'C++ E2 exception thrown', '');
}
try {
$a->foobar();
} catch (Exception $e) {
check::equal($e->getMessage(), 'postcatch unknown', '');
}
try {
$a->barfoo(1);
} catch (Exception $e) {
check::equal($e->getMessage(), 'C++ E1 exception thrown', '');
}
try {
$a->barfoo(2);
} catch (Exception $e) {
check::equal($e->getMessage(), 'C++ E2 * exception thrown', '');
}
开发者ID:hj3938,项目名称:crossbridge,代码行数:31,代码来源:exception_order_runme.php
示例15: smarty_modifier_age
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
* @link http://smarty.php.net/manual/en/language.modifier.truncate.php
* truncate (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @param string
* @param integer
* @param string
* @param boolean
* @param boolean
* @return string
*/
function smarty_modifier_age($date, $blday = false)
{
return check::birthday2age($date, $blday);
}
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:22,代码来源:modifier.age.php
示例16: 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
示例17: unset
$strWEBADMIN_ROOT = __WEBADMIN_ROOT;
}
unset($arrGWeb);
if (empty($ver_path)) {
$ver_path = '';
}
$strFilename = '..' . $ver_path . '/data/webconfig.inc.php';
include $strFilename;
$arrGMeta['xingfu_school_show']['name'] = '兴甫幼儿园_ 园所展区';
$arrGMeta['xingfu_school_show']['cache'] = 1;
//该栏目是否生成静态页,0=不可以,1=可以
$arrGMeta['xingfu_school_show']['admin'] = array(array('href' => '../xingfu_school_show/admin/category.php', 'name' => '兴甫幼儿园_ 园所展区分类'), array('href' => '../xingfu_school_show/admin/index.php', 'name' => '兴甫幼儿园_ 园所展区管理'));
$arrGMeta['xingfu_school_show']['meta'] = array('Title' => $arrGMeta['xingfu_school_show']['name'], 'Description' => $arrGMeta['xingfu_school_show']['name'], 'Keywords' => $arrGMeta['xingfu_school_show']['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'] . "xingfu_school_show`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show` (\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'] . "xingfu_school_show_type`;";
}
$sql[] = "CREATE TABLE IF NOT EXISTS `" . $arrGPdoDB['db_tablepre'] . "xingfu_school_show_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
示例18: ads
require_once '../../admin/checklogin.php';
$objWebInit = new ads();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//翻页参数
$objWebInit->arrGPage = $arrGPage;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//JS生成参数
$objWebInit->arrGjs = $arrGjs;
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
check::AlertExit('对不起,您没有权限访问此页', -1);
}
$arrWhere = array();
$arrLink = array();
if (isset($_GET['action'])) {
if ($_GET['action'] == 'search') {
// 构造搜索条件和翻页参数
$arrLink[] = 'action=search';
if (!empty($_GET['pass'])) {
if ($_GET['pass'] == '1' || $_GET['pass'] == '0') {
$arrWhere[] = "pass='" . $_GET['pass'] . "'";
$arrLink[] = 'pass=' . $_GET['pass'];
}
}
if (!empty($_GET['id'])) {
$arrWhere[] = "id='" . $_GET['id'] . "'";
开发者ID:TiMoChao,项目名称:lc_ad_first,代码行数:31,代码来源:index.php
示例19: content
public function content()
{
global $dbh, $postvar, $getvar, $instance;
switch ($getvar['sub']) {
case "tchoose":
if ($_POST) {
check::empty_fields();
if (!main::errors()) {
foreach ($postvar as $key => $value) {
$dbh->updateConfig($key, $value);
}
main::errors("Settings Updated!");
}
}
$folder = "../themes/";
if ($handle = opendir($folder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != ".svn" && $file != "icons" && $file != "index.html" && $file != "flags") {
$values[] = array($file, $file);
}
}
}
closedir($handle);
$theme_settings_array['THEME'] = main::dropDown("theme", $values, $dbh->config("theme"));
echo style::replaceVar("tpl/admin/lof/theme-settings.tpl", $theme_settings_array);
break;
case "tupload":
// Theme Uploader
echo "Here you can upload a theme of your choice to the installer. Please be sure that the theme is in .zip format.<br><br>";
if ($_POST) {
$response = main::upload_theme();
echo $response . "<br><br>";
}
echo style::replaceVar('tpl/admin/lof/theme-upload.tpl');
break;
case "cssedit":
echo $this->EditTemplate("style", "css");
break;
case "tpledit":
echo style::replaceVar('tpl/admin/lof/template-editor.tpl');
break;
case "navedit":
echo style::replaceVar("tpl/admin/lof/navedit/top.tpl");
$navbar_query = $dbh->select("navbar", 0, array("sortorder", "ASC"));
while ($navbar_data = $dbh->fetch_array($navbar_query)) {
$link_box_array['ID'] = $navbar_data['id'];
$link_box_array['NAME'] = $navbar_data['visual'];
$link_box_array['ICON'] = $navbar_data['icon'];
$link_box_array['LINK'] = $navbar_data['link'];
$links_array['LINKS'] .= style::replaceVar("tpl/admin/lof/navedit/link-box.tpl", $link_box_array);
}
echo style::replaceVar("tpl/admin/lof/navedit/links.tpl", $links_array);
echo style::replaceVar("tpl/admin/lof/navedit/bottom.tpl");
break;
case "editheader":
echo $this->EditTemplate("header", "tpl");
break;
case "editfooter":
echo $this->EditTemplate("footer", "tpl");
break;
case "ui-theme":
if ($_POST) {
check::empty_fields();
if (!main::errors()) {
foreach ($postvar as $key => $value) {
$dbh->updateConfig($key, $value);
}
main::errors("Settings Updated!");
}
}
$folder = INC . "/css/";
foreach (main::folderFiles($folder) as $file) {
$files[] = array($file, $file);
}
$jquery_theme_changer_array['THEME'] = main::dropDown("ui-theme", $files, $dbh->config("ui-theme"));
echo style::replaceVar('tpl/admin/lof/jquery-theme-changer.tpl', $jquery_theme_changer_array);
break;
}
}
开发者ID:cozylife,项目名称:tht-reworked,代码行数:79,代码来源:lof.php
示例20: 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
注:本文中的check类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论