本文整理汇总了PHP中checklevel函数的典型用法代码示例。如果您正苦于以下问题:PHP checklevel函数的具体用法?PHP checklevel怎么用?PHP checklevel使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checklevel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: multibox_admin_showpage
function multibox_admin_showpage()
{
global $main_smarty, $the_template, $db;
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
if ($canIhaveAccess == 1) {
define('pagename', 'multibox_admin');
$main_smarty->assign('pagename', pagename);
define('modulename', 'multibox_admin');
$main_smarty->assign('modulename', modulename);
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$main_smarty->display(multibox_admin_tpl_path . '/blank.tpl');
$main_smarty = do_sidebar($main_smarty);
$sql = "SELECT * FROM " . table_totals;
$results = $db->get_results($sql);
$main_smarty->assign('results', object_2_array($results));
if (isset($_REQUEST['action'])) {
$main_smarty->assign('action', $_REQUEST['action']);
totals_regenerate();
$sql = "SELECT * FROM " . table_totals;
$results = $db->get_results($sql);
$main_smarty->assign('new_results', object_2_array($results));
}
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
$main_smarty->assign('tpl_center', multibox_admin_tpl_path . 'multibox_main');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
echo "Page Forbidden";
}
}
示例2: sendannouncement_showpage
function sendannouncement_showpage()
{
// Method for identifying modules rather than pagename
define('modulename', 'send_announcement');
// $main_smarty->assign('modulename', modulename);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 0) {
header("Location: " . my_base_url . my_pligg_base);
die;
}
global $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
// breadcrumbs
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$navwhere['text2'] = "Send Announcement";
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', "Send Annoucement");
// breadcrumbs
$main_smarty->assign('tpl_center', send_announcement_tpl_path . 'sendannouncement');
$main_smarty->display($the_template . '/pligg.tpl');
}
示例3: dowork
function dowork()
{
global $db;
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
if ($canIhaveAccess == 1) {
if (is_writable('../settings.php') == 0) {
die("Error: settings.php is not writeable.");
}
$action = isset($_REQUEST['action']) && sanitize($_REQUEST['action'], 3) != '' ? sanitize($_REQUEST['action'], 3) : "view";
if ($action == "view") {
$config = new pliggconfig();
if (isset($_REQUEST['page'])) {
$config->var_page = sanitize($_REQUEST['page'], 3);
$config->showpage();
} else {
$config->listpages();
}
}
if ($action == "save") {
$config = new pliggconfig();
$config->var_id = substr(sanitize($_REQUEST['var_id'], 3), 6, 10);
$config->var_value = $db->escape($_REQUEST['var_value']);
$config->store();
}
}
}
示例4: dowork
function dowork()
{
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
if (is_writable('settings.php') == 0) {
die("Error: settings.php is not writeable.");
}
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
} else {
$action = "view";
}
if ($action == "view") {
$config = new pliggconfig();
if (isset($_REQUEST['page'])) {
$config->var_page = $_REQUEST['page'];
$config->showpage();
}
}
if ($action == "save") {
$config = new pliggconfig();
$config->var_id = substr($_REQUEST['var_id'], 6, 10);
$config->var_value = $_REQUEST['var_value'];
$config->store();
}
}
}
示例5: hello_world_showpage
function hello_world_showpage()
{
global $main_smarty, $the_template, $db;
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
if ($canIhaveAccess == 1) {
define('pagename', 'hello_world');
$main_smarty->assign('pagename', pagename);
// Method for identifying modules rather than pagename
define('modulename', 'hello_world');
$main_smarty->assign('modulename', modulename);
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$main_smarty->display(hello_world_tpl_path . '/blank.tpl');
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_hello_world_BreadCrumb');
$navwhere['link2'] = URL_hello_world;
$navwhere['text3'] = '';
$navwhere['link3'] = '';
$navwhere['text4'] = '';
$navwhere['link4'] = '';
$main_smarty = do_sidebar($main_smarty);
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
$main_smarty->assign('tpl_center', hello_world_tpl_path . 'hello_world_main');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例6: captcha_showpage
function captcha_showpage()
{
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
if ($canIhaveAccess == 1) {
global $main_smarty, $the_template;
$navwhere['text1'] = 'Captcha';
$navwhere['link1'] = URL_captcha;
define('pagename', 'captcha');
$main_smarty->assign('pagename', pagename);
// New method for identifying modules rather than pagename
define('modulename', 'captcha');
$main_smarty->assign('modulename', modulename);
$main_smarty = do_sidebar($main_smarty, $navwhere);
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
} else {
$action = '';
}
if ($action == 'enable') {
if (isset($_REQUEST['captcha'])) {
$captcha = $_REQUEST['captcha'];
} else {
$captcha = '';
}
enable_captcha($captcha);
}
if ($action == 'configure') {
if (isset($_REQUEST['captcha'])) {
$captcha = $_REQUEST['captcha'];
} else {
$captcha = '';
}
include_once captcha_captchas_path . '/' . $captcha . '/main.php';
captcha_configure();
$main_smarty->assign('tpl_center', captcha_tpl_path . '../captchas/' . $captcha . '/captcha_configure');
$main_smarty->display($template_dir . '/admin/admin.tpl');
die;
}
if ($action == 'EnableReg') {
$value = isset($_REQUEST['value']) ? $_REQUEST['value'] : '';
if ($value != '') {
misc_data_update('captcha_reg_en', $value);
}
header('Location: ' . URL_captcha);
}
$captcha = get_misc_data('captcha_method');
if ($captcha == '') {
$captcha = 'recaptcha';
}
$main_smarty->assign('captcha_method', $captcha);
$main_smarty->assign('tpl_center', captcha_tpl_path . '/captcha_home');
$main_smarty->display($template_dir . '/admin/admin.tpl');
}
}
示例7: karma_showpage
function karma_showpage()
{
global $db, $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
// Save settings
if ($_POST['submit']) {
misc_data_update('karma_submit_story', sanitize($_REQUEST['karma_submit_story'], 3));
misc_data_update('karma_submit_comment', sanitize($_REQUEST['karma_submit_comment'], 3));
misc_data_update('karma_story_publish', sanitize($_REQUEST['karma_story_publish'], 3));
misc_data_update('karma_story_vote', sanitize($_REQUEST['karma_story_vote'], 3));
misc_data_update('karma_story_unvote', sanitize($_REQUEST['karma_story_vote_remove'], 3));
misc_data_update('karma_comment_vote', sanitize($_REQUEST['karma_comment_vote'], 3));
misc_data_update('karma_story_discard', sanitize($_REQUEST['karma_story_discard'], 3));
misc_data_update('karma_story_spam', sanitize($_REQUEST['karma_story_spam'], 3));
misc_data_update('karma_comment_delete', sanitize($_REQUEST['karma_comment_delete'], 3));
if ($_REQUEST['karma_username'] && $_REQUEST['karma_value'] != 0) {
$db->query($sql = "UPDATE " . table_users . " SET user_karma=user_karma+'" . $db->escape($_REQUEST['karma_value']) . "' WHERE user_login='" . $db->escape($_REQUEST['karma_username']) . "'");
if (!$db->rows_affected) {
$error = "Wrong username " . sanitize($_REQUEST['karma_username'], 1);
}
}
$main_smarty->assign('error', $error);
}
// breadcrumbs
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$navwhere['text2'] = "Modify Karma";
$navwhere['link2'] = my_pligg_base . "/module.php?module=karma";
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
// breadcrumbs
define('modulename', 'karma');
$main_smarty->assign('modulename', modulename);
define('pagename', 'admin_modify_karma');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('settings', str_replace('"', '"', get_karma_settings()));
$main_smarty->assign('tpl_center', karma_tpl_path . 'karma_main');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例8: dowork
function dowork()
{
global $db, $main_smarty;
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('god');
if ($canIhaveAccess == 1) {
if (is_writable('../settings.php') == 0) {
die("Error: settings.php is not writeable.");
}
$action = isset($_REQUEST['action']) && sanitize($_REQUEST['action'], 3) != '' ? sanitize($_REQUEST['action'], 3) : "view";
if ($action == "view") {
$config = new pliggconfig();
$config->listpages();
if (isset($_REQUEST['page'])) {
$config->var_page = sanitize($_REQUEST['page'], 3);
$config->showpage();
# }else{
# $config->listpages();
}
}
if ($action == "save") {
$config = new pliggconfig();
// $config->var_id = substr(sanitize($_REQUEST['var_id'], 3), 6, 10);
$config->var_id = sanitize($_REQUEST['var_id'], 3);
$config->read();
// Check if template exists
if ($config->var_name == '$thetemp' && $config->var_value != js_urldecode($_REQUEST['var_value'])) {
if (!file_exists('../templates/' . js_urldecode($_REQUEST['var_value']))) {
print "alert('" . $main_smarty->get_config_vars('PLIGG_Visual_AdminPanel_NoTemplate') . "')";
exit;
} else {
if (file_exists('../templates/' . js_urldecode($_REQUEST['var_value']) . '/template_details.php')) {
include '../templates/' . js_urldecode($_REQUEST['var_value']) . '/template_details.php';
}
if ($template_info['designed_for_pligg_version'] < pligg_version() && !$_REQUEST['force']) {
if (!$template_info['designed_for_pligg_version']) {
$template_info['designed_for_pligg_version'] = 'unknown';
}
print sprintf("if (confirm('" . $main_smarty->get_config_vars('PLIGG_Visual_AdminPanel_Template_Version') . "')) {XMLHttpRequestObject.open('GET', '?action=save&var_id={$config->var_id}&var_value=" . urlencode($_REQUEST['var_value']) . "&force=1', true); XMLHttpRequestObject.send(null);}", $template_info['designed_for_pligg_version'], pligg_version());
exit;
}
}
}
$config->var_value = $db->escape(js_urldecode($_REQUEST['var_value']));
$config->store(false);
}
}
}
示例9: close_comments_showpage
function close_comments_showpage()
{
global $db, $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
if ($_POST['submit']) {
$_REQUEST = str_replace('"', "'", $_REQUEST);
$close_comment_method = trim($_REQUEST['close_comment_method']);
$close_comment_time = trim($_REQUEST['close_comment_time']);
if ($close_comment_method == 'time') {
misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
} elseif ($close_comment_method == 'manual') {
misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
} elseif ($close_comment_method == 'both') {
misc_data_update('close_comment_method', mysql_real_escape_string($close_comment_method));
} else {
$main_smarty->assign('module_error', "Method POST data did not contain an expected value");
}
if (is_numeric($close_comment_time)) {
misc_data_update('close_comment_time', mysql_real_escape_string($close_comment_time));
} else {
$main_smarty->assign('module_error', "Time POST data did not contain a numerical value. Please give the second field a value of 0 or higher.");
}
}
// breadcrumbs
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
// breadcrumbs
define('modulename', 'close_comments');
$main_smarty->assign('modulename', modulename);
define('pagename', 'close_comments_settings');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('settings', get_close_comments_settings());
$main_smarty->assign('tpl_center', close_comments_tpl_path . 'close_comments_settings');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例10: zip_install_preview_admin
function zip_install_preview_admin()
{
global $main_smarty, $the_template, $db, $my_pligg_base;
force_authentication();
$amIgod = 0;
$amIgod = $amIgod + checklevel('admin');
if ($amIgod == 1) {
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$main_smarty->display(zip_install_tpl_path . '/blank.tpl');
$navwhere['text2'] = 'ZIP Install';
$navwhere['link2'] = my_pligg_base . '/module.php?module=zip_install';
$navwhere['text3'] = '';
$navwhere['link3'] = '';
$navwhere['text4'] = '';
$navwhere['link4'] = '';
$main_smarty = do_sidebar($main_smarty);
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
$action = $_REQUEST['action'];
switch ($action) {
case "modules":
$main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install_modules');
$main_smarty->display($template_dir . '/admin/admin.tpl');
break;
case "templates":
$main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install_templates');
$main_smarty->display($template_dir . '/admin/admin.tpl');
break;
case "filemod":
if (uploadFile(zip_install_absolute_path, $_FILES, "modules")) {
redirect(my_pligg_base . '/admin/admin_modules.php?status=uninstalled');
}
break;
case "filetem":
if (uploadFile(zip_install_absolute_path, $_FILES, "templates")) {
redirect(my_pligg_base . '/admin/admin_config.php?page=Template');
}
break;
default:
$main_smarty->assign('tpl_center', zip_install_tpl_path . 'zip_install');
$main_smarty->display($template_dir . '/admin/admin.tpl');
break;
}
}
}
示例11: contactable_showpage
function contactable_showpage()
{
global $db, $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
if ($_POST['submit']) {
$_REQUEST = str_replace('"', "'", $_REQUEST);
$contactable_input = $_REQUEST['contactable_mail'];
$result = filter_var($contactable_input, FILTER_VALIDATE_EMAIL);
// Checking if the email is valid. Returns 'false' if not valid.
if (!$result) {
// Email is not valid
$msg = "Error! Your email address does not appear to be valid.";
} else {
// Add email address to database field
misc_data_update('contactable_mail', mysql_real_escape_string($contactable_input));
}
}
// breadcrumbs
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
define('modulename', 'contactable');
$main_smarty->assign('modulename', modulename);
define('pagename', 'admin_contactable');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('msg', $msg);
// Error messages
$main_smarty->assign('contactable', get_contactable_settings());
$main_smarty->assign('tpl_center', contactable_tpl_path . 'settings');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例12: spam_trigger_showpage
function spam_trigger_showpage()
{
global $db, $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
// Save settings
if ($_POST['submit']) {
misc_data_update('spam_trigger_light', sanitize($_REQUEST['spam_light'], 3));
misc_data_update('spam_trigger_medium', sanitize($_REQUEST['spam_medium'], 3));
misc_data_update('spam_trigger_hard', sanitize($_REQUEST['spam_hard'], 3));
header("Location: " . my_pligg_base . "/module.php?module=spam_trigger");
die;
}
// breadcrumbs
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$navwhere['text2'] = "Modify spam_trigger";
$navwhere['link2'] = my_pligg_base . "/module.php?module=spam_trigger";
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
define('modulename', 'spam_trigger');
$main_smarty->assign('modulename', modulename);
define('pagename', 'admin_modifyspam_trigger');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('settings', str_replace('"', '"', get_spam_trigger_settings()));
$main_smarty->assign('places', $spam_trigger_places);
$main_smarty->assign('tpl_center', spam_trigger_tpl_path . 'spam_trigger_main');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例13: pligg_web_toolbar_showpage
function pligg_web_toolbar_showpage()
{
global $main_smarty, $the_template, $db;
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
define('pagename', 'pligg_web_toolbar');
$main_smarty->assign('pagename', pagename);
// Method for identifying modules rather than pagename
define('modulename', 'pligg_web_toolbar');
$main_smarty->assign('modulename', modulename);
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
$navwhere['link1'] = getmyurl('admin', '');
$navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_pligg_web_toolbar_BreadCrumb');
$navwhere['link2'] = URL_pligg_web_toolbar;
$navwhere['text3'] = '';
$navwhere['link3'] = '';
$navwhere['text4'] = '';
$navwhere['link4'] = '';
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
} else {
$action = '';
}
if ($action == 'enable') {
enable_pligg_web_toolbar();
}
if ($action == 'disable') {
disable_pligg_web_toolbar();
}
$main_smarty = do_sidebar($main_smarty);
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
$main_smarty->assign('tpl_center', pligg_web_toolbar_tpl_path . 'pligg_web_toolbar_main');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例14: analytics_showpage
function analytics_showpage()
{
global $db, $main_smarty, $the_template;
include_once 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'link.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'smartyvariables.php';
$main_smarty = do_sidebar($main_smarty);
force_authentication();
$canIhaveAccess = 0;
$canIhaveAccess = $canIhaveAccess + checklevel('admin');
if ($canIhaveAccess == 1) {
if ($_POST['submit']) {
$_REQUEST = str_replace('"', "'", $_REQUEST);
$analytics_input = substr($_REQUEST['analytics_id'], 0, 14);
// Shorten input to 14 characters (max length of Analytics IDs)
if (strlen($analytics_input) > '14') {
$msg = "Error! The value entered was more than 14 characters in length. Please try again.";
}
misc_data_update('analytics_id', mysql_real_escape_string($analytics_input));
}
// breadcrumbs
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
define('modulename', 'analytics');
$main_smarty->assign('modulename', modulename);
define('pagename', 'admin_analytics');
$main_smarty->assign('pagename', pagename);
$main_smarty->assign('msg', $msg);
// Error messages
$main_smarty->assign('settings', get_analytics_settings());
$main_smarty->assign('tpl_center', analytics_tpl_path . 'settings');
$main_smarty->display($template_dir . '/admin/admin.tpl');
} else {
header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
}
}
示例15: spam_trigger_do_submit3
function spam_trigger_do_submit3($vars)
{
global $db, $current_user;
if (checklevel('god') || checklevel('admin')) {
return;
}
$linkres = $vars['linkres'];
if (!$linkres->id) {
return;
}
$settings = get_spam_trigger_settings();
$str = $linkres->title . "\n" . $linkres->content . "\n" . $linkres->link_summary . "\n" . $linkres->tags;
// Killspam user
if ($settings['spam_hard'] && !spam_trigger_check($str, $settings['spam_hard'])) {
$_SESSION['spam_trigger_story_error'] = 'deleted';
spam_trigger_killspam($current_user->user_id);
} elseif ($settings['spam_medium'] && !spam_trigger_check($str, $settings['spam_medium'])) {
$_SESSION['spam_trigger_story_error'] = 'discarded';
$linkres->status = 'discard';
} elseif ($settings['spam_light'] && !spam_trigger_check($str, $settings['spam_light'])) {
$_SESSION['spam_trigger_story_error'] = 'moderated';
$linkres->status = 'moderated';
}
}