本文整理汇总了PHP中check_var_value函数的典型用法代码示例。如果您正苦于以下问题:PHP check_var_value函数的具体用法?PHP check_var_value怎么用?PHP check_var_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_var_value函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
function main($action)
{
global $db, $config, $template, $lang, $user;
global $pafiledb_config, $pafiledb_functions;
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$sort_method = request_var('sort_method', $pafiledb_config['sort_method']);
$sort_method = check_var_value($sort_method, array('file_name', 'file_time', 'file_dls', 'file_rating', 'file_update_time'));
$sort_method = $sort_method == 'file_rating' ? 'rating' : $sort_method;
$sort_order = request_var('order', $pafiledb_config['sort_order']);
$sort_order = check_var_value($sort_order, array('DESC', 'ASC'));
if (!$pafiledb_config['settings_viewall']) {
message_die(GENERAL_MESSAGE, $lang['viewall_disabled']);
} elseif (!$this->auth_global['auth_viewall']) {
if (!$user->data['session_logged_in']) {
redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=viewall', true));
}
$message = sprintf($lang['Sorry_auth_viewall'], $this->auth_global['auth_viewall_type']);
message_die(GENERAL_MESSAGE, $message);
}
$template->assign_vars(array('L_VIEWALL' => $lang['Viewall'], 'L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT), 'DOWNLOAD' => $pafiledb_config['settings_dbname']));
$this->display_files($sort_method, $sort_order, $start, true);
$this->display($lang['Download'], 'pa_viewall_body.tpl');
}
示例2: cal_date
if ($date <= 0) {
$date = cal_date(time(), $config['board_timezone']);
}
// date per jumpbox
$start_month = intval($_POST['start_month']);
$start_year = intval($_POST['start_year']);
if (!empty($start_month) && !empty($start_year)) {
$day = 01;
if (!empty($date)) {
$day = gmdate('d', $date);
}
$date = gmmktime(0, 0, 0, $start_month, $day, $start_year);
}
// mode
$mode = request_var('mode', '', true);
$mode = check_var_value($mode, array('hour'));
// start
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
// get the period
$year = gmdate('Y', $date);
$month = gmdate('m', $date);
$day = gmdate('d', $date);
$hour = gmdate('H', $date);
$min = gmdate('i', $date);
if ($mode == 'hour') {
$start_date = gmmktime($hour, 0, 0, $month, $day, $year);
$end_date = gmmktime($hour + 1, 0, 0, $month, $day, $year);
} else {
$start_date = gmmktime(0, 0, 0, $month, $day, $year);
$end_date = gmmktime(0, 0, 0, $month, $day + 1, $year);
示例3: define
define('IP_ROOT_PATH', './');
}
if (!defined('PHP_EXT')) {
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
include IP_ROOT_PATH . 'common.' . PHP_EXT;
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
if (!$config['allow_drafts']) {
message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
}
$mode = request_var('mode', '', true);
$mode = check_var_value($mode, array('loadr', 'loadn', 'loadp', 'delete'), '');
if (!empty($_POST['kill_drafts'])) {
$mode = 'delete';
}
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
if (!$user->data['session_logged_in']) {
$redirect = isset($start) ? '&start=' . $start : '';
redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=drafts.' . PHP_EXT . $redirect, true));
}
$draft_id = request_var('d', 0);
$draft_id = $draft_id < 0 ? 0 : $draft_id;
if ($draft_id > 0 || !empty($_POST['kill_drafts'])) {
if ($mode == 'loadr') {
redirect(append_sid(CMS_PAGE_POSTING . '?d=' . $draft_id . '&mode=reply' . '&draft_mode=draft_load', true));
} elseif ($mode == 'loadn') {
示例4: htmlspecialchars
$mode = $set_mode;
}
else
{
$username = htmlspecialchars($target_userdata['username']);
}
}
else
{
$mode = $set_mode;
}
}
$psort_types = array('time', 'cat');
$psort = request_var('psort', $psort_types[0]);
$psort = check_var_value($psort, $psort_types);
$nav_server_url = create_server_url();
$breadcrumbs['address'] = $lang['Nav_Separator'] . '<a href="' . $nav_server_url . append_sid('recent.' . PHP_EXT) . '" class="nav-current">' . $lang['Recent_topics'] . '</a>';
$except_forums = build_exclusion_forums_list();
$where_forums = ($special_forums == '0') ? 't.forum_id NOT IN (' . $except_forums . ')' : 't.forum_id NOT IN (' . $except_forums . ') AND t.forum_id IN (' . $forum_ids . ')';
$sql_sort = ' ORDER BY t.topic_last_post_id DESC ';
if ($psort == 'cat')
{
$sql_sort = ' ORDER BY f.forum_id ASC, t.topic_last_post_id DESC ';
}
$extra_tables = '';
$extra_fields = '';
示例5: request_var
$topic_days = request_var('search_time', 0);
if (!empty($topic_days))
{
$search_time = time() - ($topic_days * 86400);
}
else
{
$search_time = 0;
$topic_days = 0;
}
$search_date = request_var('d', 0);
$show_results = request_var('show_results', 'posts');
$show_results = check_var_value($show_results, array('posts', 'topics'));
// $sr is used to allow users to override the default result displaying for new posts
$sr_cn = $config['cookie_name'] . '_sr';
if(isset($_GET['sr']))
{
$sr_get = (isset($_GET['sr']) && ($_GET['sr'] == 't')) ? 't' : 'p';
$user->set_cookie('sr', $sr_get, $user->cookie_expire);
$_COOKIE[$sr_cn] = $sr_get;
}
$sr_cookie = (isset($_COOKIE[$sr_cn]) && ($_COOKIE[$sr_cn] == 't')) ? 't' : 'p';
$sr = $sr_cookie;
$return_chars = request_var('return_chars', 200);
$return_chars = ($return_chars >= -1) ? $return_chars : 200;
示例6: main
function main($action)
{
global $template, $lang, $pafiledb_config, $user, $config;
// =======================================================
// Get the id
// =======================================================
$cat_id = request_var('cat_id', 0);
$file_id = request_var('file_id', 0);
$action = request_var('action', '');
if (!empty($cat_id)) {
$cat_id = $cat_id;
} elseif ($file_id == 0 && $action != '') {
$cat_id_array = array();
$cat_id_array = explode('=', $action);
$cat_id = $cat_id_array[1];
} else {
message_die(GENERAL_MESSAGE, $lang['Cat_not_exist']);
}
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$sort_method = request_var('sort_method', $pafiledb_config['sort_method']);
$sort_method = check_var_value($sort_method, array('file_name', 'file_time', 'file_dls', 'file_rating', 'file_update_time'));
$sort_method = $sort_method == 'file_rating' ? 'rating' : $sort_method;
$sort_order = request_var('order', $pafiledb_config['sort_order']);
$sort_order = check_var_value($sort_order, array('DESC', 'ASC'));
// =======================================================
// If user not allowed to view file listing (read) and there is no sub Category
// or the user is not allowed to view these category we gave him a nice message.
// =======================================================
$show_category = false;
if (isset($this->subcat_rowset[$cat_id])) {
foreach ($this->subcat_rowset[$cat_id] as $sub_cat_id => $sub_cat_row) {
if ($this->auth[$sub_cat_id]['auth_view']) {
$show_category = true;
break;
}
}
}
if (!$this->auth[$cat_id]['auth_read'] && !$show_category) {
if (!$user->data['session_logged_in']) {
redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=category&cat_id=' . $cat_id, true));
}
$message = sprintf($lang['Sorry_auth_view'], $this->auth[$cat_id]['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
if (!isset($this->cat_rowset[$cat_id])) {
message_die(GENERAL_MESSAGE, $lang['Cat_not_exist']);
}
//===================================================
// assign var for naviagation
//===================================================
$this->generate_category_nav($cat_id);
$template->assign_vars(array('L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT), 'DOWNLOAD' => $pafiledb_config['settings_dbname']));
$no_file_message = true;
$filelist = false;
if (isset($this->subcat_rowset[$cat_id])) {
$no_file_message = false;
$this->category_display($cat_id);
}
$this->display_files($sort_method, $sort_order, $start, $no_file_message, $cat_id);
$this->display($lang['Download'], 'pa_category_body.tpl');
}
示例7: request_var
// --------------------------------
$allowed_cat .= $allowed_cat == '' ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id'];
}
//
// END of Categories Index
//
// ------------------------------------
// Build the sort method and sort order
// information
// ------------------------------------
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$sort_method = request_var('sort_method', $album_config['sort_method']);
$sort_method = check_var_value($sort_method, array('pic_time', 'pic_title', 'username', 'pic_view_count', 'rating', 'comments', 'new_comment'));
$sort_order = request_var('sort_order', $album_config['sort_order']);
$sort_order = check_var_value($sort_order, array('DESC', 'ASC'));
$sort_append = '&sort_method=' . $sort_method . '&sort_order=' . $sort_order;
// ------------------------------------
// additional sorting options
// ------------------------------------
if ($album_user_id != ALBUM_PUBLIC_GALLERY) {
$sort_rating_option = '';
$sort_comments_option = '';
$sort_new_comment_option = '';
if ($album_config['rate'] == 1) {
$sort_rating_option = '<option value="rating" ';
$sort_rating_option .= $sort_method == 'rating' ? 'selected="selected"' : '';
$sort_rating_option .= '>' . $lang['Rating'] . '</option>';
}
if ($album_config['comment'] == 1) {
$sort_comments_option = '<option value="comments" ';
示例8: main
function main($action)
{
global $template, $lang, $config, $pafiledb_config, $db, $images, $user;
if (!$this->auth_global['auth_search']) {
if (!$user->data['session_logged_in']) {
redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=stats', true));
}
$message = sprintf($lang['Sorry_auth_search'], $this->auth_global['auth_search_type']);
message_die(GENERAL_MESSAGE, $message);
}
include IP_ROOT_PATH . 'includes/functions_search.' . PHP_EXT;
$search_keywords = request_var('search_keywords', '', true);
$search_keywords = htmlspecialchars_decode($search_keywords, ENT_COMPAT);
$search_author = request_var('search_author', '', true);
$search_author = htmlspecialchars_decode($search_author, ENT_COMPAT);
$search_id = request_var('search_id', 0);
$search_terms = request_var('search_terms', '');
$search_terms = $search_terms == 'all' ? 1 : 0;
$cat_id = request_var('cat_id', 0);
$comments_search = request_var('comments_search', '');
$comments_search = $comments_search == 'YES' ? 1 : 0;
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$sort_method = request_var('sort_method', $pafiledb_config['sort_method']);
$sort_method = check_var_value($sort_method, array('file_name', 'file_time', 'file_dls', 'file_rating', 'file_update_time'));
$sort_method = $sort_method == 'file_rating' ? 'rating' : $sort_method;
$sort_order = request_var('order', $pafiledb_config['sort_order']);
$sort_order = check_var_value($sort_order, array('DESC', 'ASC'));
$limit_sql = $start == 0 ? $pafiledb_config['settings_file_page'] : $start . ',' . $pafiledb_config['settings_file_page'];
// encoding match for workaround
$multibyte_charset = 'utf-8, big5, shift_jis, euc-kr, gb2312';
if (isset($_POST['submit']) || $search_author != '' || $search_keywords != '' || $search_id) {
$store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_method', 'sort_order');
if ($search_author != '' || $search_keywords != '') {
if ($search_author != '' && $search_keywords == '') {
$search_author = str_replace('*', '%', trim($search_author));
$sql = get_users_sql($search_author, true, false, true, false);
$result = $db->sql_query($sql);
$matching_userids = '';
if ($row = $db->sql_fetchrow($result)) {
do {
$matching_userids .= ($matching_userids != '' ? ', ' : '') . $row['user_id'];
} while ($row = $db->sql_fetchrow($result));
} else {
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
$sql = "SELECT *\n\t\t\t\t\t\tFROM " . PA_FILES_TABLE . "\n\t\t\t\t\t\tWHERE user_id IN ({$matching_userids})";
$result = $db->sql_query($sql);
$search_ids = array();
while ($row = $db->sql_fetchrow($result)) {
if ($this->auth[$row['file_catid']]['auth_view']) {
$search_ids[] = $row['file_id'];
}
}
$db->sql_freeresult($result);
$total_match_count = sizeof($search_ids);
} elseif ($search_keywords != '') {
stopwords_synonyms_init();
$split_search = array();
$split_search = !strstr($multibyte_charset, $lang['ENCODING']) ? split_words(clean_words('search', stripslashes($search_keywords), $stopwords_array, $synonyms_array), 'search') : split(' ', $search_keywords);
$word_count = 0;
$current_match_type = 'or';
$word_match = array();
$result_list = array();
for ($i = 0; $i < sizeof($split_search); $i++) {
switch ($split_search[$i]) {
case 'and':
$current_match_type = 'and';
break;
case 'or':
$current_match_type = 'or';
break;
case 'not':
$current_match_type = 'not';
break;
default:
if (!empty($search_terms)) {
$current_match_type = 'and';
}
$match_word = addslashes('%' . str_replace('*', '', $split_search[$i]) . '%');
$sql = "SELECT file_id\n\t\t\t\t\t\t\t\t\tFROM " . PA_FILES_TABLE . "\n\t\t\t\t\t\t\t\t\tWHERE (file_name LIKE '{$match_word}'\n\t\t\t\t\t\t\t\t\tOR file_creator LIKE '{$match_word}'\n\t\t\t\t\t\t\t\t\tOR file_desc LIKE '{$match_word}'\n\t\t\t\t\t\t\t\t\tOR file_longdesc LIKE '{$match_word}')";
$result = $db->sql_query($sql);
$row = array();
while ($temp_row = $db->sql_fetchrow($result)) {
$row[$temp_row['file_id']] = 1;
if (!$word_count) {
$result_list[$temp_row['file_id']] = 1;
} elseif ($current_match_type == 'or') {
$result_list[$temp_row['file_id']] = 1;
} elseif ($current_match_type == 'not') {
$result_list[$temp_row['file_id']] = 0;
}
}
if ($current_match_type == 'and' && $word_count) {
@reset($result_list);
while (list($file_id, $match_count) = @each($result_list)) {
if (!$row[$file_id]) {
$result_list[$file_id] = 0;
}
}
//.........这里部分代码省略.........
示例9: array
// GROUP BY - END
// SORT ORDER - BEGIN
$sort_order_select_lang_array = array($lang['REFERER_HITS'], $lang['REFERER_HOST'], $lang['REFERER_URL'], $lang['REFERER_T_URL'], $lang['REFERER_IP'], $lang['REFERER_FIRST'], $lang['REFERER_LAST']);
$sort_order_select_array = array('hits', 'host', 'url', 't_url', 'ip', 'first_visit', 'last_visit');
$mode = request_var('mode', $sort_order_select_array[0]);
$mode = in_array($mode, $sort_order_select_array) ? $mode : $sort_order_select_array[0];
$select_name = 'mode';
$default = $mode;
$select_js = '';
$sort_order_select_box = $class_form->build_select_box($select_name, $default, $sort_order_select_array, $sort_order_select_lang_array, $select_js);
// SORT ORDER - END
// SORT DIR - BEGIN
$sort_dir_select_array = array('ASC', 'DESC');
$sort_dir_select_lang_array = array($lang['Sort_Ascending'], $lang['Sort_Descending']);
$sort_dir = request_var('order', 'DESC');
$sort_dir = check_var_value($sort_dir, array('DESC', 'ASC'));
$select_name = 'order';
$default = $sort_dir == 'ASC' ? 'ASC' : 'DESC';
$select_js = '';
$sort_dir_select_box = $class_form->build_select_box($select_name, $default, $sort_dir_select_array, $sort_dir_select_lang_array, $select_js);
// SORT DIR - END
$smart_delete_fields_array = array('host' => 'host', 'url' => 'url', 't_url' => 't_url', 'ip' => 'ip');
$smart_delete_field = isset($smart_delete_fields_array[$smart_delete]) ? $smart_delete_fields_array[$smart_delete] : $smart_delete_fields_array[0];
$modes_array = array('hits' => 'hits', 'host' => 'host', 'url' => 'url', 't_url' => 't_url', 'ip' => 'ip', 'first_visit' => 'firstvisit', 'last_visit' => 'lastvisit');
$order_by = isset($modes_array[$mode]) ? $modes_array[$mode] : $modes_array[0];
if (isset($_POST['clear'])) {
$sql = "DELETE FROM " . REFERERS_TABLE;
$db->sql_query($sql);
$message = $lang['REFERERS_CLEARED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_REFERERS'], '<a href="' . append_sid('admin_referers.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
示例10: request_var
$preview = true;
}
}
$search_type = request_var('searchvar', '');
$search_value = request_var('searchvalue', '');
$search_value_tmp = request_var('searchvalue2', '');
$search_value = (!empty($search_value) && !empty($search_value_tmp)) ? $search_value_tmp : $search_value;
$refresh = $preview || $submit_search || ($draft && !$draft_confirm);
$mark_list = request_var('mark', array(0));
$folders_array = array('inbox', 'outbox', 'sentbox', 'savebox');
$folder = request_var('folder', 'inbox');
$folder = check_var_value($folder, $folders_array);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
// Cancel
if ($cancel)
{
redirect(append_sid(CMS_PAGE_PRIVMSG . '?folder=' . $folder, true));
}
// Check search fields
$search_list = array(
示例11: request_var
}
// END permissions
/*
+----------------------------------------------------------
| Main work here...
+----------------------------------------------------------
*/
if (empty($mode)) {
// --------------------------------
// Moderator Control Panel
// --------------------------------
// Set Variables
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$sort_method = request_var('sort_method', 'pic_time');
$sort_method = check_var_value($sort_method, array('pic_time', 'pic_title', 'pic_user_id', 'pic_view_count', 'rating', 'comments', 'new_comment'));
$sort_order = request_var('order', 'ASC');
$sort_order = $sort_order == 'ASC' ? 'ASC' : 'DESC';
// Count Pics
$sql = "SELECT COUNT(pic_id) AS count\n\t\t\tFROM " . ALBUM_TABLE . "\n\t\t\tWHERE pic_cat_id = '{$cat_id}'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$total_pics = $row['count'];
$pics_per_page = $config['topics_per_page'];
// Text list only
// get information from DB
if ($total_pics > 0) {
$limit_sql = $start == 0 ? $pics_per_page : $start . ', ' . $pics_per_page;
// Old Approval
/*
$pic_approval_sql = '';
示例12: define
$module['1610_Users']['220_Bantron'] = $filename;
return;
}
// Load default header
if (!defined('IP_ROOT_PATH')) {
define('IP_ROOT_PATH', './../');
}
if (!defined('PHP_EXT')) {
define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
require 'pagestart.' . PHP_EXT;
// Set Overall Variables
$mode = request_var('mode', '');
$show = request_var('show', 'all');
$order = request_var('order', 'ASC');
$order = check_var_value($order, array('ASC', 'DESC'));
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
if (isset($_POST['delete_submit'])) {
if (isset($_POST['ban_delete'])) {
foreach ($_POST['ban_delete'] as $ban_id) {
$sql = "DELETE FROM " . BANLIST_TABLE . " WHERE ban_id = {$ban_id}";
if (!$db->sql_query($sql)) {
message_die(GENERAL_ERROR, "Couldn't delete selected bans from database", "", __LINE__, __FILE__, $sql);
}
}
}
$db->clear_cache('ban_', USERS_CACHE_FOLDER);
$message = $lang['Ban_update_sucessful'] . '<br /><br />' . sprintf($lang['Click_return_banadmin'], '<a href="' . append_sid('admin_user_bantron.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
} elseif (isset($_POST['submit_add']) || isset($_POST['submit_update'])) {
示例13: array
$sort_dir_sql = $sort_dir_sql_array[$sort_dir];
// Backward compatibility
if (check_http_var_exists('postorder', true))
{
$sort_dir_array_old = array('asc', 'desc');
$sort_dir = strtolower(request_var('postorder', $sort_dir_array_old[0]));
$sort_dir = check_var_value($sort_dir, $sort_dir_array_old);
$sort_dir = ($sort_dir == 'asc') ? 'a' : 'd';
$sort_dir_sql = $sort_dir_sql_array[$sort_dir];
}
if (check_http_var_exists('postdays', true))
{
$sort_days = request_var('postdays', $default_sort_days);
$sort_days = check_var_value($sort_days, $sort_days_array);
}
$vt_sort_append_array = array();
if ($sort_days != $sort_days_array[0])
{
$vt_sort_append_array['st'] = $sort_days;
}
if ($sort_key != $sort_key_array[0])
{
$vt_sort_append_array['sk'] = $sort_key;
}
if ($sort_dir != $sort_dir_array[0])
{
$vt_sort_append_array['sd'] = $sort_dir;
}
示例14: floor
$date = $date - $days * 86400;
$hours = floor($date / 3600);
$result = ($years ? $years . ' ' . ($years == '1' ? $lang['Account_year'] : $lang['Account_years']) . ', ' : '') . ($years || $weeks ? $weeks . ' ' . ($weeks == '1' ? $lang['Account_week'] : $lang['Account_weeks']) . ', ' : '') . ($years || $weeks || $days ? $days . ' ' . ($days == '1' ? $lang['Account_day'] : $lang['Account_days']) . ', ' : '') . ($years || $weeks || $days || $hours ? $hours . ' ' . ($hours == '1' ? $lang['Account_hour'] : $lang['Account_hours']) : '');
return $result;
}
}
$submit_wait = isset($_POST['submit_wait']) ? true : false;
$confirm = isset($_POST['confirm']) ? true : false;
$delete = isset($_POST['delete']) ? true : false;
$activate = isset($_POST['activate']) ? true : false;
$mark_list = !empty($_POST['mark']) ? $_POST['mark'] : 0;
if (check_http_var_exists('letter', false)) {
$by_letter = request_var('letter', 'all');
}
$action = request_var('action', 'inactive');
$action = check_var_value($action, array('inactive', 'active'));
$mode = request_var('mode', '');
$start = request_var('start', 0);
$start = $start < 0 ? 0 : $start;
$user_id = request_var(POST_USERS_URL, 0);
$user_id = $user_id < 2 ? ANONYMOUS : $user_id;
if (($delete && $confirm || $activate) && $mark_list) {
if (sizeof($mark_list)) {
$email_id = '';
for ($i = 0; $i < sizeof($mark_list); $i++) {
$email_id .= ($email_id != '' ? ', ' : '') . intval($mark_list[$i]);
}
$sql_mail = "SELECT username, user_email, user_lang, user_active FROM " . USERS_TABLE . " WHERE user_id IN ({$email_id})";
$result_mail = $db->sql_query($sql_mail);
while ($mail = $db->sql_fetchrow($result_mail)) {
if ($delete) {
示例15: request_var
// CONFIG - END
// VARS - BEGIN
$tag_id = request_var('tag_id', 0);
$tag_id = ($tag_id < 0) ? 0 : $tag_id;
$tag_text = request_var('tag_text', '', true);
$tag_text = ip_clean_string(urldecode(trim($tag_text)), $lang['ENCODING'], true);
$mode_types = array('cloud', 'list', 'view', 'replace');
$mode = request_var('mode', $mode_types[0]);
$mode = check_var_value($mode, $mode_types);
$action_types = array('list');
$action = request_var('action', $action_types[0]);
$action = check_var_value($action, $action_types);
$start = request_var('start', 0);
$start = ($start < 0) ? 0 : $start;
$per_page = request_var('per_page', 0);
$per_page = (empty($per_page) || ($per_page < 20) || ($per_page > 300)) ? $config['topics_per_page'] : $per_page;
$s_hidden_fields = '';
// SORT ORDER - BEGIN
$sort_order_array = array();
$sort_order_select_array = array();
$sort_order_select_lang_array = array();
foreach ($table_fields as $k => $v)
{