本文整理汇总了PHP中submitcheck函数的典型用法代码示例。如果您正苦于以下问题:PHP submitcheck函数的具体用法?PHP submitcheck怎么用?PHP submitcheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了submitcheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionRegister
public function actionRegister()
{
global $_G;
if ($_G['uid']) {
dheader('location: index.php?r=site/index');
}
//极验验证码配置
define("GEETEST", "../extensions/gt-php-sdk-master/");
$modelName = Dii::useModel();
define('CURSCRIPT', $modelName);
require __DIR__ . '/../models/' . $modelName . '.php';
$model = new $modelName();
$template = Dii::template();
$submit = Dii::submit();
if (submitcheck($submit, 1)) {
$result = $model->register();
if ($result === true) {
//注册成功
dheader('location: ' . dreferer());
return true;
}
}
include Dii::view('common:header');
include Dii::view($template);
include Dii::view('common:footer');
return true;
}
示例2: xweather_cp
function xweather_cp(){
parent::dxcore();
$this->dxanchor = in_array(($dxanchor = getgpc('dxanchor')), $this->anchors) ? $dxanchor : 'basic';
if(!submitcheck('dxsubmit')){
$this->showbody();
}else{
$this->save();
}
$this->footer();
}
示例3: common
function common()
{
global $_G;
if (submitcheck('hash', true) && $_G['uid']) {
$r = updatecreditbyaction('mobilesign', $_G['uid']);
if ($r['updatecredit']) {
$_G['messageparam'][0] = 'mobilesign_success';
} else {
$_G['messageparam'][0] = 'mobilesign_failed';
}
} else {
$_G['messageparam'][0] = 'mobilesign_formhash_failed';
}
mobile_core::result(mobile_core::variable(array()));
}
示例4: common
public function common()
{
global $_G;
if (self::$securityStatus != TRUE) {
return false;
}
if ($_G['uid']) {
$lastCookieReportTime = $this->_decodeReportTime($_G['cookie']['security_cookiereport']);
if ($lastCookieReportTime < strtotime('today')) {
$this->_reportLoginUser(array('uid' => $_G['uid']));
}
}
if ($_G['adminid'] > 0) {
self::$isAdminGroup = 1;
}
if ($_G['setting']['connect']['allow'] && $_G['setting']['security_qqlogin_alone']) {
$_G['setting']['regstatus'] = 0;
$_G['setting']['regconnect'] = 1;
}
if ($_G['setting']['connect']['allow'] && $_G['setting']['security_safelogin'] && (!$_G['uid'] && $_G['connectguest'] || $_G['uid'] && !$_G['member']['conisbind']) && CURMODULE == 'post') {
$msg = '<p>' . lang('plugin/security', 'safelogintips') . '</p><p class="mtm"><a href="connect.php?mod=config" target="_blank"><img src="' . IMGDIR . '/qq_bind_small.gif" class="qq_bind" align="absmiddle" /></a></p>';
if ($_G['inajax']) {
if (!$_GET['ajaxtarget']) {
$_GET['handlekey'] = 'safelogin';
}
if (!$_G['uid'] && $_G['connectguest']) {
showmessage('qqconnect:connectguest_message_complete_or_bind');
} else {
showmessage($msg, 'connect.php?mod=config', array(), array('alert' => 'info', 'showdialog' => true, 'striptags' => false, 'locationtime' => 0));
}
} else {
if (!$_G['uid'] && $_G['connectguest']) {
dheader('location: ' . $_G['siteurl'] . 'member.php?mod=connect&ac=bind');
} else {
showmessage($msg, '', array(), array('alert' => 'info', 'showdialog' => true, 'msgtype' => 2, 'striptags' => false));
}
}
}
if ($_G['setting']['connect']['allow'] && $_G['setting']['security_qqlogin_alone'] && CURMODULE == 'logging' && $_GET['action'] == 'login' && submitcheck('loginsubmit', 1)) {
showmessage('security:qqloginaloneopened');
}
return true;
}
示例5: common
function common()
{
global $_G, $seccodecheck, $secqaacheck, $connect_guest;
if ($_G['uid'] && $_G['member']['conisbind']) {
dheader('location: ' . $_G['siteurl'] . 'index.php');
}
$connect_guest = array();
if ($_G['connectguest'] && (submitcheck('regsubmit', 0, $seccodecheck, $secqaacheck) || submitcheck('loginsubmit', 1, $seccodestatus))) {
if (!$_GET['auth_hash']) {
$_GET['auth_hash'] = $_G['cookie']['con_auth_hash'];
}
$conopenid = authcode($_GET['auth_hash']);
$connect_guest = C::t('#qqconnect#common_connect_guest')->fetch($conopenid);
if (!$connect_guest) {
dsetcookie('con_auth_hash');
showmessage('qqconnect:connect_login_first');
}
}
}
示例6: seo_set
function seo_set()
{
global $head_url;
if (!submitcheck('submit')) {
$info = pick_common_get();
$info['open_seo_mod'] = dunserialize($info['open_seo_mod']);
$info['open_seo_mod_show'][0] = in_array(1, $info['open_seo_mod']) ? 1 : 0;
//门户
$info['open_seo_mod_show'][1] = in_array(2, $info['open_seo_mod']) ? 1 : 0;
//论坛
$info['open_seo_mod_show'][2] = in_array(3, $info['open_seo_mod']) ? 1 : 0;
//博客
$info = dhtmlspecialchars($info);
return $info;
} else {
$set = $_GET['set'];
$set['open_seo_mod'] = serialize($set['open_seo_mod']);
pick_common_set($set);
cpmsg(milu_lang('op_success'), PICK_GO . "seo", 'succeed');
}
}
示例7: virtualdata_set
function virtualdata_set()
{
global $head_url, $header_config;
if (!submitcheck('submit')) {
require_once libfile('function/forumlist');
$info = pick_common_get();
$info['vir_cache_time'] = $info['vir_cache_time'] ? $info['vir_cache_time'] : 10;
$info['vir_data_forum'] = unserialize($info['vir_data_forum']);
$info['vir_data_usergroup'] = unserialize($info['vir_data_usergroup']);
$info['forumselect'] = '<select name="set[vir_data_forum][]" size="10" multiple="multiple"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $info['vir_data_forum'], TRUE) . '</select>';
return $info;
} else {
$set = $_GET['set'];
if (!$set['vir_data_forum'][0] && count($set['vir_data_forum']) == 1) {
$set['vir_data_forum'] = '';
}
pick_common_set($set);
save_syscache('milu_pick_vir_postdata', '');
save_syscache('milu_pick_vir_data', '');
save_syscache('milu_pick_vir_online', '');
cpmsg(milu_lang('op_success'), PICK_GO . "virtual_data", 'succeed');
}
}
示例8: on_login
function on_login()
{
global $_G;
empty($mrefreshtime) && ($mrefreshtime = 2000);
if ($_G['uid']) {
$ucsynlogin = uc_user_synlogin($_G['uid']);
$param = array('username' => $_G['member']['username'], 'ucsynlogin' => $ucsynlogin, 'uid' => $_G['member']['uid']);
showmessage('login_succeed', dreferer(), $param, array('showdialog' => 1, 'locationtime' => 1));
}
if (!($_G['member_loginperm'] = logincheck())) {
showmessage('login_strike');
}
if (!submitcheck('loginsubmit', 1)) {
$_G['referer'] = dreferer();
$cookietimecheck = !empty($_G['cookie']['cookietime']) ? 'checked="checked"' : '';
$username = !empty($_G['cookie']['loginuser']) ? htmlspecialchars($_G['cookie']['loginuser']) : '';
include template('member/login');
} else {
$_G['uid'] = $_G['member']['uid'] = 0;
$_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
$result = userlogin($_G['gp_username'], $_G['gp_password'], null, null, 'auto');
if ($result['status'] > 0) {
setloginstatus($result['member'], $_G['gp_cookietime'] ? 2592000 : 0);
$ucsynlogin = uc_user_synlogin($_G['uid']);
$message = 1;
$param = array('username' => $_G['member']['username'], 'ucsynlogin' => $ucsynlogin, 'uid' => $_G['uid']);
showmessage('login_succeed', dreferer(), $param, array('showdialog' => 1, 'locationtime' => 1));
} else {
$password = preg_replace("/^(.{" . round(strlen($_G['gp_password']) / 4) . "})(.+?)(.{" . round(strlen($_G['gp_password']) / 6) . "})\$/s", "\\1***\\3", $_G['gp_password']);
$errorlog = dhtmlspecialchars(TIMESTAMP . "\t" . ($result['ucresult']['username'] ? $result['ucresult']['username'] : dstripslashes($_G['gp_username'])) . "\t" . $password . "\t" . "Ques #" . intval($_G['gp_questionid']) . "\t" . $_G['clientip']);
writelog('illegallog', $errorlog);
loginfailed($_G['member_loginperm']);
$fmsg = $result['ucresult']['uid'] == '-3' ? empty($_G['gp_questionid']) || $answer == '' ? 'login_question_empty' : 'login_question_invalid' : 'login_invalid';
showmessage($fmsg, '', array('loginperm' => $_G['member_loginperm']));
}
}
}
示例9: common
function common()
{
global $_G;
if (!$_G['uid'] || !in_array('wechat', $_G['setting']['plugins']['available'])) {
mobile_core::result(mobile_core::variable(array()));
}
$_G['wechat']['setting'] = unserialize($_G['setting']['mobilewechat']);
if (!$_G['wechat']['setting']['wsq_apicredit']) {
mobile_core::result(mobile_core::variable(array()));
}
$extcredit = 'extcredits' . $_G['wechat']['setting']['wsq_apicredit'];
$ac = $_GET['ac'];
$return = array();
if (submitcheck('creditsubmit') && ($ac == 'inc' || $ac == 'dec') && $_GET['value'] > 0) {
$v = $ac == 'inc' ? $_GET['value'] : -$_GET['value'];
$log = lang('plugin/wechat', 'wsq_apicredit_log_' . $ac);
updatemembercount(array($_G['uid']), array($extcredit => $v), true, '', 0, '', $log);
$data = C::t('common_member_count')->fetch($_G['uid']);
$return['extcredit'] = $data[$extcredit];
} elseif ($ac == 'get') {
$return['extcredit'] = getuserprofile($extcredit);
}
mobile_core::result(mobile_core::variable($return));
}
示例10: deletethread
$threadsdel = deletethread($moderation['delete']);
$threadsundel = undeletethreads($moderation['undelete']);
if ($threadsdel || $threadsundel) {
$cpmsg = cplang('recyclebin_succeed', array('threadsdel' => $threadsdel, 'threadsundel' => $threadsundel));
} else {
$cpmsg = cplang('recyclebin_nothread');
}
?>
<script type="text/JavaScript">alert('<?php
echo $cpmsg;
?>
');parent.$('rbsearchform').searchsubmit.click();</script>
<?php
}
} elseif ($operation == 'clean') {
if (!submitcheck('rbsubmit', 1)) {
shownav('topic', 'nav_recyclebin');
showsubmenu('nav_recyclebin', array(array('recyclebin_list', 'recyclebin', 0), array('search', 'recyclebin&operation=search', 0), array('clean', 'recyclebin&operation=clean', 1)));
showformheader('recyclebin&operation=clean');
showtableheader('recyclebin_clean');
showsetting('recyclebin_clean_days', 'days', '30', 'text');
showsubmit('rbsubmit');
showtablefooter();
showformfooter();
} else {
$deletetids = array();
$timestamp = TIMESTAMP;
$pernum = 500;
$threadsdel = intval($_GET['threadsdel']);
$days = intval($_GET['days']);
foreach (C::t('forum_threadmod')->fetch_all_recyclebin_by_dateline($timestamp - $days * 86400, 0, $pernum) as $thread) {
示例11: exit
<?php
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
if (!submitcheck('bmtagadd') && !submitcheck('bmtagsdetail') && !submitcheck('bmtagcode')) {
templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110);
trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre'));
$nextarr = array('0' => lang('pre'), '1' => lang('next'));
trbasic(lang('context_choose'), '', makeradio('mtagnew[setting][next]', $nextarr, isset($mtag['setting']['next']) ? $mtag['setting']['next'] : '0'), '');
trbasic(lang('limitin_current_channel'), 'mtagnew[setting][chid]', empty($mtag['setting']['chid']) ? '0' : $mtag['setting']['chid'], 'radio');
trbasic(lang('limitin_current_catalog'), 'mtagnew[setting][caid]', empty($mtag['setting']['caid']) ? '0' : $mtag['setting']['caid'], 'radio');
foreach ($cotypes as $k => $cotype) {
if ($cotype['sortable']) {
trbasic(lang('limitin_current_coclass') . " [{$cotype['cname']}]", 'mtagnew[setting][ccid' . $k . ']', empty($mtag['setting']['ccid' . $k]) ? '0' : $mtag['setting']['ccid' . $k], 'radio');
}
}
trbasic(lang('limitin_active_member'), 'mtagnew[setting][mid]', empty($mtag['setting']['mid']) ? '0' : $mtag['setting']['mid'], 'radio');
trbasic(lang('nocp'), 'mtagnew[setting][nocp]', empty($mtag['setting']['nocp']) ? 0 : $mtag['setting']['nocp'], 'radio', lang('agnocp'));
trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio');
tabfooter();
} else {
if (empty($mtagnew['template'])) {
if (!submitcheck('bmtagcode')) {
amessage('input_tag_tpl', M_REFERER);
} else {
$errormsg = lang('input_tag_tpl');
}
//生成代码出错的提示信息
}
}
示例12: show_msg
}
if (mysql_select_db($_POST['db']['dbname'])) {
if (mysql_query("SELECT COUNT(*) FROM {$_POST['db']['tablepre']}members")) {
$havedata = true;
}
} else {
if (!mysql_query("CREATE DATABASE `" . $_POST['db']['dbname'] . "`")) {
show_msg('设定的SupeSite数据库无权限操作,请先手工操作后,再执行安装程序');
}
}
if ($havedata) {
show_msg('危险!指定的SupeSite数据库已有数据,如果继续将会清空原有数据!', $step + 1);
} else {
show_msg('数据库配置成功,进入下一步操作', $step + 1, 1);
}
} elseif (submitcheck('opensubmit')) {
//检查用户身份
$step = 5;
include_once S_ROOT . './common.php';
//UC注册用户
if (!@(include_once S_ROOT . './uc_client/client.php')) {
showmessage('system_error');
}
$uid = uc_user_register($_POST['username'], $_POST['password'], 'webmastor@yourdomain.com');
if ($uid == -3) {
//已存在,登录
if (!($passport = getpassport($_POST['username'], $_POST['password']))) {
show_msg('输入的用户名密码不正确,请确认');
}
$setarr = array('uid' => $passport['uid'], 'username' => addslashes($passport['username']));
} elseif ($uid > 0) {
示例13: uc_pm_send
$return = uc_pm_send($_G['uid'], implode(',', $newusers), $subject, $message, 1, $pmid, 1);
}
if ($return > 0) {
DB::query("UPDATE " . DB::table('common_member_status') . " SET lastpost='{$_G['timestamp']}' WHERE uid='{$_G['uid']}'");
updatecreditbyaction('sendpm');
showmessage('do_success', "home.php?mod=space&do=pm&filter=privatepm", array(), array('msgtype' => $_G['gp_inajax'] ? 3 : 1, 'showmsg' => true));
} else {
if (in_array($return, array(-1, -2, -3, -4))) {
showmessage('message_can_not_send' . abs($return));
} else {
showmessage('message_can_not_send');
}
}
}
} elseif ($_GET['op'] == 'ignore') {
if (submitcheck('ignoresubmit')) {
$single = intval($_G['gp_single']);
if ($single) {
uc_pm_blackls_add($_G['uid'], $_POST['ignoreuser']);
showmessage('do_success', dreferer(), array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
} else {
uc_pm_blackls_set($_G['uid'], $_POST['ignorelist']);
showmessage('do_success', 'home.php?mod=space&do=pm&view=ignore', array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
}
}
} else {
cknewuser();
if (!checkperm('allowsendpm')) {
showmessage('no_privilege');
}
$friends = array();
示例14: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: modcp_report.php 14289 2010-10-21 11:32:50Z liulanbo $
*/
if (!defined('IN_DISCUZ') || !defined('IN_MODCP')) {
exit('Access Denied');
}
if (!empty($_G['fid'])) {
$curcredits = $_G['setting']['creditstransextra'][8] ? $_G['setting']['creditstransextra'][8] : $_G['setting']['creditstrans'];
if (submitcheck('reportsubmit')) {
if ($_G['gp_reportids']) {
foreach ($_G['gp_reportids'] as $reportid) {
if (DB::result_first("SELECT COUNT(*) FROM " . DB::table('common_report') . " WHERE id='{$reportid}' AND opuid='0'")) {
$creditchange = '';
$uid = $_G['gp_reportuids'][$reportid];
if ($uid != $_G['uid']) {
$msg = !empty($_G['gp_msg'][$reportid]) ? '<br />' . htmlspecialchars($_G['gp_msg'][$reportid]) : '';
if (!empty($_G['gp_creditsvalue'][$reportid])) {
$credittag = $_G['gp_creditsvalue'][$reportid] > 0 ? '+' : '';
$creditchange = '<br />' . lang('forum/misc', 'report_msg_your') . $_G['setting']['extcredits'][$curcredits]['title'] . ' ' . $credittag . $_G['gp_creditsvalue'][$reportid];
updatemembercount($uid, array($curcredits => intval($_G['gp_creditsvalue'][$reportid])), true, 'RPC', $reportid);
}
if ($creditchange || $msg) {
notification_add($uid, 'report', 'report_change_credits', array('creditchange' => $creditchange, 'msg' => $msg), 1);
}
}
$opresult = !empty($_G['gp_creditsvalue'][$reportid]) ? $curcredits . "\t" . intval($_G['gp_creditsvalue'][$reportid]) : 'ignore';
示例15: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: member_lostpasswd.php 31164 2012-07-20 07:50:57Z chenmengshu $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
define('NOROBOT', TRUE);
$discuz_action = 141;
if (submitcheck('lostpwsubmit')) {
loaducenter();
$_GET['email'] = strtolower(trim($_GET['email']));
if ($_GET['username']) {
list($tmp['uid'], , $tmp['email']) = uc_get_user(addslashes($_GET['username']));
$tmp['email'] = strtolower(trim($tmp['email']));
if ($_GET['email'] != $tmp['email']) {
showmessage('getpasswd_account_notmatch');
}
$member = getuserbyuid($tmp['uid'], 1);
} else {
$emailcount = C::t('common_member')->count_by_email($_GET['email'], 1);
if (!$emailcount) {
showmessage('lostpasswd_email_not_exist');
}
if ($emailcount > 1) {
showmessage('lostpasswd_many_users_use_email');
}