本文整理汇总了PHP中system_CleanVars函数的典型用法代码示例。如果您正苦于以下问题:PHP system_CleanVars函数的具体用法?PHP system_CleanVars怎么用?PHP system_CleanVars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了system_CleanVars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect_header
$xoopsDB->queryF($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
return $MemID;
}
//自動取得tad_web_mems的最新排序
function tad_web_mems_max_sort($WebID)
{
global $xoopsDB;
$sql = "select max(`MemSort`) from " . $xoopsDB->prefix("tad_web_link_mems") . " where WebID='{$WebID}'";
$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
list($sort) = $xoopsDB->fetchRow($result);
return ++$sort;
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$MemID = system_CleanVars($_REQUEST, 'MemID', 0, 'int');
common_template($WebID);
switch ($op) {
case "import_excel":
import_excel($WebID, $_FILES['importfile']['tmp_name']);
break;
case "import2DB":
import2DB($WebID);
break;
//儲存座位
//儲存座位
case "save_seat":
save_seat($MemID);
header("location: {$_SERVER['PHP_SELF']}?WebID={$WebID}");
exit;
break;
示例2: system_CleanVars
$xoBreadCrumb->addLink(_AM_SYSTEM_BANNERS_NAV_ADDNWCLI);
$xoBreadCrumb->addHelp(system_adminVersion('banners', 'help') . '#new_client');
$xoBreadCrumb->addTips(_AM_SYSTEM_BANNERS_NAV_TIPS);
$xoBreadCrumb->render();
$obj = $banner_client_Handler->create();
$form = $obj->getForm();
$xoopsTpl->assign('form', $form->render());
break;
default:
$xoBreadCrumb->addHelp(system_adminVersion('banners', 'help'));
$xoBreadCrumb->addTips(_AM_SYSTEM_BANNERS_NAV_TIPS);
$xoBreadCrumb->render();
// Get start pager
$start = system_CleanVars($_REQUEST, 'start', 0, 'int');
$startF = system_CleanVars($_REQUEST, 'startF', 0, 'int');
$startC = system_CleanVars($_REQUEST, 'startC', 0, 'int');
// Display Banners
// Criteria
$criteria = new CriteriaCompo();
$criteria->setSort('date');
$criteria->setOrder('DESC');
$criteria->setStart($start);
$criteria->setLimit($nb_aff);
$banner_count = $banner_Handler->getCount($criteria);
$banner_arr = $banner_Handler->getall($criteria);
$xoopsTpl->assign('banner_count', $banner_count);
if ($banner_count > 0) {
foreach (array_keys($banner_arr) as $i) {
$bid = $banner_arr[$i]->getVar('bid');
$imptotal = $banner_arr[$i]->getVar('imptotal');
$impmade = $banner_arr[$i]->getVar('impmade');
示例3: system_CleanVars
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'default', 'string');
$member_handler =& xoops_gethandler('member', 'system');
// Define main template
$xoopsOption['template_main'] = 'system_users.html';
// Call Header
xoops_cp_header();
$myts =& MyTextSanitizer::getInstance();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css');
// Define scripts
$xoTheme->addScript('browse.php?modules/system/js/admin.js');
// Define Breadcrumb and tips
$xoBreadCrumb->addLink(_AM_SYSTEM_USERS_NAV_MAIN, system_adminVersion('users', 'adminpath'));
$uid = system_CleanVars($_REQUEST, 'uid', 0);
switch ($op) {
// Edit user
case 'users_edit':
// Assign Breadcrumb menu
$xoBreadCrumb->addHelp(system_adminVersion('users', 'help') . '#edit');
$xoBreadCrumb->addLink(_AM_SYSTEM_USERS_NAV_EDIT_USER);
$xoBreadCrumb->render();
form_user(false, $uid);
break;
// Add user
// Add user
case 'users_add':
// Assign Breadcrumb menu
$xoBreadCrumb->addHelp(system_adminVersion('users', 'help') . '#add');
$xoBreadCrumb->addLink(_AM_SYSTEM_USERS_NAV_ADD_USER);
示例4: set_bootstrap
<?php
/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("tadgallery_cooliris.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$csn = system_CleanVars($_REQUEST, 'csn', 0, 'int');
$xoopsTpl->assign("csn", $csn);
$xoopsTpl->assign("up_file_url", _TADGAL_UP_FILE_URL);
list_tad_gallery_cate_tree($csn);
//列出所有tad_gallery_cate資料
function list_tad_gallery_cate_tree($def_csn = "")
{
global $xoopsDB, $xoopsTpl;
$tadgallery = new tadgallery();
$cate_count = $tadgallery->get_tad_gallery_cate_count();
$path = get_tadgallery_cate_path($def_csn);
$path_arr = array_keys($path);
$sql = "select csn,of_csn,title from " . $xoopsDB->prefix("tad_gallery_cate") . " order by sort";
$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
while (list($csn, $of_csn, $title) = $xoopsDB->fetchRow($result)) {
$font_style = $def_csn == $csn ? ", font:{'background-color':'yellow', 'color':'black'}" : '';
$open = in_array($csn, $path_arr) ? 'true' : 'false';
$display_counter = empty($cate_count[$csn]['file']) ? "" : " ({$cate_count[$csn]['file']})";
$data[] = "{ id:{$csn}, pId:{$of_csn}, name:'{$title}{$display_counter}', url:'cooliris.php?csn={$csn}', open: {$open} ,target:'_self' {$font_style}}";
}
$json = implode(",\n", $data);
if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/ztree.php")) {
redirect_header("index.php", 3, _MA_NEED_TADTOOLS);
示例5: redirect_header
$btemplate = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block_id);
if (count($btemplate) > 0) {
$tplfile_handler->delete($btemplate[0]);
}
}
redirect_header('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_BLOCKS_DBUPDATED);
}
} else {
redirect_header('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_DBERROR);
}
break;
case 'clone':
// Initialize blocks handler
$block_handler =& xoops_getmodulehandler('block');
// Get avatar id
$block_id = system_CleanVars($_REQUEST, 'bid', 0, 'int');
if ($block_id > 0) {
// Define main template
$xoopsOption['template_main'] = 'system_blocks.html';
// Call Header
xoops_cp_header();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
// Define Breadcrumb and tips
$xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath'));
$xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_CLONEBLOCK);
$xoBreadCrumb->render();
$block = $block_handler->get($block_id);
$blockform = $block->getForm('clone');
$xoopsTpl->assign('blockform', $blockform->render());
// Call Footer
示例6: exit
// Author: Kazumi Ono (AKA onokazu) //
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
// Check users rights
if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
exit(_NOPERM);
}
// Check is active
if (!xoops_getModuleOption('active_mailusers', 'system')) {
redirect_header('admin.php', 2, _AM_SYSTEM_NOTACTIVE);
}
// Parameters
$limit = 100;
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'list', 'string');
// Define main template
$GLOBALS['xoopsOption']['template_main'] = 'system_mailusers.tpl';
// Call Header
xoops_cp_header();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
$xoTheme->addScript('modules/system/js/admin.js');
switch ($op) {
case 'list':
default:
// Define Breadcrumb and tips
$xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_MANAGER, system_adminVersion('mailusers', 'adminpath'));
$xoBreadCrumb->addHelp(system_adminVersion('mailusers', 'help'));
$xoBreadCrumb->render();
示例7: exit
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
// Check users rights
if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
exit(_NOPERM);
}
if (isset($_REQUEST)) {
foreach ($_REQUEST as $k => $v) {
${$k} = $v;
}
}
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'default', 'string');
// Setting type
$confcat_id = system_CleanVars($_REQUEST, 'confcat_id', 0, 'int');
// Define main template
$xoopsOption['template_main'] = 'system_preferences.html';
// Call Header
xoops_cp_header();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
// Define scripts
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
$xoTheme->addScript('modules/system/js/admin.js');
$xoBreadCrumb->addLink(_AM_SYSTEM_PREFERENCES_NAV_MAIN, system_adminVersion('preferences', 'adminpath'));
//Display part
switch ($op) {
case 'show':
if (empty($confcat_id)) {
$confcat_id = 1;
示例8: XoopsFormText
$form->addElement(new XoopsFormText(_AM_SYSTEM_FILEMANAGER_ADDDIR_NAME, 'dir_name', 50, 255), true);
$form->addElement(new XoopsFormHidden('op', 'filemanager_add_dir_save'));
$form->addElement(new XoopsFormHidden('path', $path));
$form->addElement(new XoopsFormButton('', 'dir_button', _SUBMIT, 'submit'));
echo $form->render();
break;
//Confirm delete directory
//Confirm delete directory
case 'filemanager_confirm_delete_directory':
$path = system_CleanVars($_REQUEST, 'path', '', 'string');
echo '<div class="confirmMsg">' . sprintf(_AM_SYSTEM_FILEMANAGER_DIR_SUREDEL, $path) . '<br><br><div class="buttons"><a href="#" class="ui-corner-all" onclick="filemanager_delete_directory(\'' . $path . '\');">' . _AM_SYSTEM_FILEMANAGER_DELETE . '</a> <a href="#" class="ui-corner-all" onclick="$(\'#confirm_delete\').hide();filemanager_load_tree(); filemanager_display_file(\'\', 0)">' . _AM_SYSTEM_FILEMANAGER_CANCEL . '</a></div></div>';
break;
// Delete one directory
// Delete one directory
case 'filemanager_delete_directory':
$path = system_CleanVars($_REQUEST, 'path', '', 'string');
/**
* @param $dossier
* @return bool|null
*/
function deltree($dossier)
{
if (($dir = opendir($dossier)) === false) {
return null;
}
while ($name = readdir($dir)) {
if ($name === '.' || $name === '..') {
continue;
}
$full_name = $dossier . '/' . $name;
if (is_dir($full_name)) {
示例9: Criteria
if ($comments_module > 0) {
$criteria->add(new Criteria('com_modid', $comments_module));
$comments_module = $_REQUEST['comments_module'];
}
$comments_status = system_CleanVars($_REQUEST, 'comments_status', 0, 'int');
if ($comments_status > 0) {
$criteria->add(new Criteria('com_status', $comments_status));
$comments_status = $_REQUEST['comments_status'];
}
$criteria->setSort('com_created');
$criteria->setOrder('DESC');
$comments_count = $comments_Handler->getCount($criteria);
$xoopsTpl->assign('comments_count', $comments_count);
if ($comments_count > 0) {
$comments_start = system_CleanVars($_REQUEST, 'comments_start', 0, 'int');
$comments_limit = system_CleanVars($_REQUEST, 'comments_limit', 0, 'int');
if (!in_array($comments_limit, $limit_array)) {
$comments_limit = xoops_getModuleOption('comments_pager', 'system');
}
$criteria->setLimit($comments_limit);
$criteria->setStart($comments_start);
$comments_arr = $comments_Handler->getObjects($criteria, true);
}
$form = '<form action="admin.php?fct=comments" method="post">
<select name="comments_module">';
foreach ($module_array as $k => $v) {
$sel = '';
if ($k == $module) {
$sel = ' selected="selected"';
}
$form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>';
示例10: dirname
// Include XOOPS control panel header
include_once dirname(dirname(__DIR__)) . '/include/cp_header.php';
// Check user rights
if (is_object($xoopsUser)) {
$admintest = 0;
$xoopsModule = XoopsModule::getByDirname('system');
if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
redirect_header(XOOPS_URL, 3, _NOPERM);
}
$admintest = 1;
} else {
redirect_header(XOOPS_URL, 3, _NOPERM);
}
// XOOPS Class
include_once $GLOBALS['xoops']->path('/class/pagenav.php');
include_once $GLOBALS['xoops']->path('/class/template.php');
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
include_once $GLOBALS['xoops']->path('/class/xoopslists.php');
// System Class
include_once $GLOBALS['xoops']->path('/modules/system/class/breadcrumb.php');
include_once $GLOBALS['xoops']->path('/modules/system/class/cookie.php');
// Load Language
xoops_loadLanguage('admin', 'system');
// Include System files
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
// include system category definitions
include_once $GLOBALS['xoops']->path('/modules/system/constants.php');
// Get request variable
$fct = system_CleanVars($_REQUEST, 'fct', '', 'string');
$xoBreadCrumb = new SystemBreadcrumb($fct);
$xoBreadCrumb->addLink(_AM_SYSTEM_CPANEL, XOOPS_URL . '/admin.php', true);
示例11: redirect_header
$xoopsTpl->assign('all_content', $all_content);
$xoopsTpl->assign('now_op', 'jill_booking_list');
if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/sweet_alert.php")) {
redirect_header("index.php", 3, _MD_NEED_TADTOOLS);
}
include_once XOOPS_ROOT_PATH . "/modules/tadtools/sweet_alert.php";
$sweet_alert = new sweet_alert();
$delete_jill_booking_func = $sweet_alert->render('delete_jill_booking_func', "{$_SERVER['PHP_SELF']}?op=delete_jill_booking&primary=", "primary");
$xoopsTpl->assign('delete_jill_booking_func', $delete_jill_booking_func);
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$jb_sn = system_CleanVars($_REQUEST, 'jb_sn', '', 'int');
$jbi_sn = system_CleanVars($_REQUEST, 'jbi_sn', '', 'int');
$primary = system_CleanVars($_REQUEST, 'primary', '', 'string');
switch ($op) {
/*---判斷動作請貼在下方---*/
case "delete_jill_booking":
$primaryArr = explode("_", $primary);
//jbi_sn=$primaryArr[0], jb_date=$primaryArr[1], jbt_sn=$primaryArr[2]
delete_booking($primaryArr[2], $primaryArr[1], $primaryArr[0]);
header("location: {$_SERVER['PHP_SELF']}");
exit;
break;
default:
jill_booking_list($jbi_sn);
break;
/*---判斷動作請貼在上方---*/
}
/*-----------秀出結果區--------------*/
示例12: foreach
$sort++;
}
$sort = 1;
foreach ($item_album as $csn) {
$sql = "update " . $xoopsDB->prefix("tad_gallery_cate") . " set `sort`='{$sort}' where `csn`='{$csn}'";
$xoopsDB->queryF($sql) or die(_TADGAL_SORT_COMPLETED . " (" . date("Y-m-d H:i:s") . ")");
$sort++;
}
echo _TADGAL_SORT_COMPLETED . " (" . date("Y-m-d H:i:s") . ")";
}
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$sn = system_CleanVars($_REQUEST, 'sn', 0, 'int');
$csn = system_CleanVars($_REQUEST, 'csn', 0, 'int');
$item_photo = system_CleanVars($_POST, 'item_photo', '', 'array');
$item_album = system_CleanVars($_POST, 'item_album', '', 'array');
switch ($op) {
case "edit_photo":
$main = edit_photo($sn);
break;
case "edit_album":
$main = edit_album($csn);
break;
case "update_tad_gallery":
update_tad_gallery($sn);
break;
case "delete_tad_gallery":
$csn = delete_tad_gallery($sn);
mk_rss_xml();
mk_rss_xml($csn);
break;
示例13: get_jill_booking_item
$itemArr = get_jill_booking_item($jbi_sn, 1);
$checkapproval = explode(";", $itemArr['jbi_approval']);
if (in_array($uid, $checkapproval)) {
$sql = "update `" . $xoopsDB->prefix("jill_booking_date") . "` set\n `jb_status` = '1'\n where `jb_sn` = '{$jb_sn}' && `jb_date`='{$jb_date}' && `jbt_sn`='{$jbt_sn}' ";
//die($sql);
$xoopsDB->queryF($sql) or die('0');
}
die('1');
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$jb_sn = system_CleanVars($_REQUEST, 'jb_sn', '', 'int');
$jbi_sn = system_CleanVars($_REQUEST, 'jbi_sn', '', 'int');
$jbt_sn = system_CleanVars($_REQUEST, 'jbt_sn', '', 'int');
$jb_info = system_CleanVars($_REQUEST, 'jb_info', '', 'string');
switch ($op) {
/*---判斷動作請貼在下方---*/
case "update_jb_status":
if (is_date($_REQUEST['jb_date']) == 1) {
update_jb_status($jb_sn, $_REQUEST['jb_date'], $jbt_sn, $jbi_sn);
}
break;
case "delete_booking":
$infoArr = explode("_", $jb_info);
$jbi_sn = delete_booking($infoArr[1], $infoArr[2], $infoArr[3]);
header("location: {$_SERVER['PHP_SELF']}?jbi_sn={$jbi_sn}");
break;
default:
jill_booking_approvallist($jbi_sn);
break;
示例14: list_all_class
function list_all_class()
{
list_all_tad_webs();
list_tad_web_news('', '', 'news', 5, 'NewsDate');
list_tad_web_news('', '', 'homework', 5, 'NewsDate');
list_tad_web_works('', '', 5);
list_tad_web_discuss('', '', 5);
list_tad_web_files('', '', 5);
list_tad_web_action('', '', 10);
list_tad_web_video('', '', 5);
list_tad_web_link('', '', 5);
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$WebID = system_CleanVars($_REQUEST, 'WebID', 0, 'int');
common_template($WebID);
switch ($op) {
case "list_tad_web_news":
$xoopsTpl->assign("op", $op);
list_tad_web_news("", "", 'news');
break;
case "list_tad_web_homework":
$xoopsTpl->assign("op", $op);
list_tad_web_news("", "", 'homework');
break;
case "list_tad_web_files":
$xoopsTpl->assign("op", $op);
list_tad_web_files();
break;
case "list_tad_web_action":
示例15: count
$error = true;
}
$blocks = XoopsBlock::getByModule($module_id);
$bcount = count($blocks);
for ($i = 0; $i < $bcount; $i++) {
$blocks[$i]->setVar('isactive', !$old);
$blocks[$i]->store();
}
//Set active modules in cache folder
xoops_setActiveModules();
}
break;
case 'display_in_menu':
// Get module handler
$module_handler =& xoops_gethandler('module');
$module_id = system_CleanVars($_POST, 'mid', 0, 'int');
if ($module_id > 0) {
$module =& $module_handler->get($module_id);
$old = $module->getVar('weight');
// Set value
$module->setVar('weight', !$old);
if (!$module_handler->insert($module)) {
$error = true;
}
}
break;
case 'submit':
$ret = array();
$write = false;
$module = empty($_POST['module']) ? array() : $_POST['module'];
foreach ($module as $mid) {