当前位置: 首页>>代码示例>>PHP>>正文


PHP kekezu::formhash方法代码示例

本文整理汇总了PHP中kekezu::formhash方法的典型用法代码示例。如果您正苦于以下问题:PHP kekezu::formhash方法的具体用法?PHP kekezu::formhash怎么用?PHP kekezu::formhash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kekezu的用法示例。


在下文中一共展示了kekezu::formhash方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init_config

 function init_config()
 {
     global $i_model, $_lang, $_K;
     $this->_basic_arr = $basic_arr = db_factory::query('select config_id,k,v,type,listorder from ' . TABLEPRE . 'witkey_basic_config');
     $config_arr = array();
     $size = sizeof($basic_arr);
     for ($i = 0; $i < $size; $i++) {
         $config_arr[$basic_arr[$i]['k']] = trim($basic_arr[$i]['v']);
         if ($basic_arr[$i]['k'] == 'ban_content' || $basic_arr[$i]['k'] == 'ban_users') {
             $config_arr[$basic_arr[$i]['k']] = trim(trim($basic_arr[$i]['v']), '|');
         }
     }
     $mtime = explode(' ', microtime());
     $nav_list = kekezu::get_table_data('*', 'witkey_nav', 'ishide!=1', 'listorder', '', '', "nav_id", null);
     $this->_nav_list = $nav_list;
     $_K['autoshop'] = $config_arr['autoshop'];
     $_K['timestamp'] = $mtime[1];
     $_K['charset'] = CHARSET;
     $_K['sitecss'] = $config_arr['sitecss'];
     $_K['css_auto_fit'] = $config_arr['css_auto_fit'];
     $_K['theme'] = $config_arr['theme'];
     $_K['sitename'] = $config_arr['website_name'];
     $_K['siteurl'] = $config_arr['website_url'];
     $_K['inajax'] = 0;
     $_K['block_search'] = array();
     $_K['is_rewrite'] = $config_arr['is_rewrite'];
     $_K['timespan'] = '600';
     $_K['i'] = 0;
     if (isset($_SERVER['HTTP_REFERER'])) {
         $_K['refer'] = $_SERVER['HTTP_REFERER'];
     }
     $_K['block_search'] = $_K['block_replace'] = array();
     $_lang = array();
     @(include S_ROOT . '/config/lic.php');
     $config_arr['seo_title'] and $_K['html_title'] = $config_arr['seo_title'] or $_K['html_title'] = $config_arr['website_name'];
     define('SKIN_PATH', 'tpl/default');
     define("EXP_NAME", $config_arr['exp_rename'] ? $config_arr['exp_rename'] : $_lang['experience']);
     define('FORMHASH', kekezu::formhash());
     define('SITEURL', $config_arr['website_url']);
     define('SITENAME', $config_arr['website_name']);
     $this->_sys_config = $config_arr;
     if ((int) KEKE_DEBUG == 1) {
         set_error_handler(array('keke_core_class', 'error_handler'));
         set_exception_handler(array('keke_exception', 'handler'));
     }
     register_shutdown_function(array('keke_core_class', 'shutdown_handler'));
 }
开发者ID:xupnge1314,项目名称:project,代码行数:47,代码来源:keke_core_class.php

示例2: admin_login

 public function admin_login($username, $password, $allow_times, $formhash = '')
 {
     global $_lang;
     global $kekezu;
     if (!kekezu::submitcheck($formhash, true)) {
         $hash = kekezu::formhash();
         $kekezu->echojson($_lang['repeat_form_submit'], 6, array('formhash' => $hash));
         die;
     }
     $user_info = keke_user_class::user_login($username, $password);
     $hash = kekezu::formhash();
     if ($user_info == -1) {
         $kekezu->echojson($_lang['username_input_error'], "6", array('formhash' => $hash));
         die;
     } else {
         if ($user_info == -2) {
             $kekezu->echojson($_lang['username_password_input_error'], "5", array('formhash' => $hash));
             die;
         }
     }
     if (!$user_info) {
         $kekezu->echojson($_lang['login_fail'], "4", array('formhash' => $hash));
         die;
     } else {
         $user_info = kekezu::get_user_info($user_info['uid']);
     }
     if (!$user_info) {
         $kekezu->echojson($_lang['no_rights_login_backstage'], "3", array('formhash' => $hash));
         die;
     } else {
         if (!$user_info['group_id'] && $user_info['uid'] != ADMIN_UID) {
             $kekezu->echojson($_lang['no_rights_login_backstage'], "2", array('formhash' => $hash));
             die;
         } else {
             $_SESSION['auid'] = $_SESSION['uid'] = $user_info['uid'];
             $_SESSION['username'] = $user_info['username'];
             kekezu::admin_system_log($user_info['username'] . date('Y-m-d H:i:s', time()) . $_lang['login_system']);
             $kekezu->echojson($_lang['login_success'], "1");
             die;
         }
     }
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:42,代码来源:keke_admin_class.php


注:本文中的kekezu::formhash方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。