本文整理汇总了PHP中kleeja_add_form_key函数的典型用法代码示例。如果您正苦于以下问题:PHP kleeja_add_form_key函数的具体用法?PHP kleeja_add_form_key怎么用?PHP kleeja_add_form_key使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了kleeja_add_form_key函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Saaheader
/**
* Header
*
* To show header in any page you want ..
* parameter : title : title of page as in <title></title>
*/
function Saaheader($title, $outscript = false, $extra = '')
{
global $tpl, $usrcp, $lang, $olang, $user_is, $username, $config;
global $extras, $script_encoding, $errorpage, $userinfo, $charset;
//is user ? and username
$user_is = $usrcp->name() ? true : false;
$username = $usrcp->name() ? $usrcp->name() : $lang['GUST'];
//our default charset
$charset = 'utf-8';
//links for header
$_LINKS = array('login' => $config['mod_writer'] ? 'login.html' : 'ucp.php?go=login', 'logout' => $config['mod_writer'] ? 'logout.html' : 'ucp.php?go=logout', 'register' => $config['mod_writer'] ? 'register.html' : 'ucp.php?go=register', 'profile' => $config['mod_writer'] ? 'profile.html' : 'ucp.php?go=profile', 'fileuser' => $config['mod_writer'] ? 'fileuser.html' : 'ucp.php?go=fileuser', 'filecp' => $config['mod_writer'] ? 'filecp.html' : 'ucp.php?go=filecp', 'guide' => $config['mod_writer'] ? 'guide.html' : 'go.php?go=guide', 'rules' => $config['mod_writer'] ? 'rules.html' : 'go.php?go=rules', 'call' => $config['mod_writer'] ? 'call.html' : 'go.php?go=call', 'stats' => $config['mod_writer'] ? 'stats.html' : 'go.php?go=stats');
//assign some variables
$tpl->assign("dir", $lang['DIR']);
$tpl->assign("title", $title);
$tpl->assign("_LINKS", $_LINKS);
$tpl->assign("go_current", isset($_GET['go']) ? htmlentities($_GET['go']) : false);
$tpl->assign("go_back_browser", $lang['GO_BACK_BROWSER']);
$tpl->assign("H_FORM_KEYS_LOGIN", kleeja_add_form_key('login'));
$tpl->assign("action_login", 'ucp.php?go=login' . (isset($_GET['return']) ? '&return=' . htmlspecialchars($_GET['return']) : ''));
//$extra .= '';
//check for extra header
$extras['header'] = empty($extras['header']) ? false : $extras['header'];
$tpl->assign("EXTRA_CODE_META", $extra);
$header = $tpl->display("header");
if ($config['siteclose'] == '1' && $usrcp->admin() && !defined('IN_ADMIN')) {
//add notification bar
$header = preg_replace('/<body([^\\>]*)>/i', "<body\\1>\n<!-- site is closed -->\n<p style=\"width: 100%; text-align:center; background:#FFFFA6; color:black; border:thin;top:0;left:0; position:absolute; width:100%;clear:both;\">" . $lang['NOTICECLOSED'] . "</p>\n<!-- #site is closed -->", $header);
}
($hook = kleeja_run_hook('Saaheader_func')) ? eval($hook) : null;
//run hook
echo $header;
flush();
}
示例2: Saaheader
/**
* Header
*
* To show header in any page you want ..
* parameter : title : title of page as in <title></title>
*/
function Saaheader($title, $outscript = false, $extra = '')
{
global $tpl, $usrcp, $lang, $olang, $user_is, $username, $config;
global $extras, $script_encoding, $errorpage, $userinfo, $charset;
global $STYLE_PATH;
//is user ? and username
$user_is = $usrcp->name() ? true : false;
$username = $usrcp->name() ? $usrcp->name() : $lang['GUST'];
//our default charset
$charset = 'utf-8';
$side_menu = array(1 => array('name' => 'profile', 'title' => $lang['PROFILE'], 'url' => $config['mod_writer'] ? 'profile.html' : 'ucp.php?go=profile', 'show' => $user_is), 2 => array('name' => 'fileuser', 'title' => $lang['YOUR_FILEUSER'], 'url' => $config['mod_writer'] ? 'fileuser.html' : 'ucp.php?go=fileuser', 'show' => $config['enable_userfile'] && user_can('access_fileuser')), 3 => $user_is ? array('name' => 'logout', 'title' => $lang['LOGOUT'], 'url' => $config['mod_writer'] ? 'logout.html' : 'ucp.php?go=logout', 'show' => true) : array('name' => 'login', 'title' => $lang['LOGIN'], 'url' => $config['mod_writer'] ? 'login.html' : 'ucp.php?go=login', 'show' => true), 4 => array('name' => 'register', 'title' => $lang['REGISTER'], 'url' => $config['mod_writer'] ? 'register.html' : 'ucp.php?go=register', 'show' => !$user_is && $config['register']));
$top_menu = array(1 => array('name' => 'index', 'title' => $lang['INDEX'], 'url' => $config['siteurl'], 'show' => true), 2 => array('name' => 'rules', 'title' => $lang['RULES'], 'url' => $config['mod_writer'] ? 'rules.html' : 'go.php?go=rules', 'show' => true), 3 => array('name' => 'guide', 'title' => $lang['GUIDE'], 'url' => $config['mod_writer'] ? 'guide.html' : 'go.php?go=guide', 'show' => true), 4 => array('name' => 'stats', 'title' => $lang['STATS'], 'url' => $config['mod_writer'] ? 'stats.html' : 'go.php?go=stats', 'show' => $config['allow_stat_pg'] && user_can('access_stats')), 5 => array('name' => 'report', 'title' => $lang['REPORT'], 'url' => $config['mod_writer'] ? 'report.html' : 'go.php?go=report', 'show' => user_can('access_report')), 6 => array('name' => 'call', 'title' => $lang['CALL'], 'url' => $config['mod_writer'] ? 'call.html' : 'go.php?go=call', 'show' => user_can('access_call')));
//check for extra header
$extras['header'] = empty($extras['header']) ? false : $extras['header'];
($hook = kleeja_run_hook('Saaheader_links_func')) ? eval($hook) : null;
//run hook
//assign some variables
$tpl->assign("dir", $lang['DIR']);
$tpl->assign("title", $title);
$tpl->assign("side_menu", $side_menu);
$tpl->assign("top_menu", $top_menu);
$tpl->assign("go_current", isset($_GET['go']) ? htmlentities($_GET['go']) : (empty($_GET) ? 'index' : ''));
$tpl->assign("go_back_browser", $lang['GO_BACK_BROWSER']);
$tpl->assign("H_FORM_KEYS_LOGIN", kleeja_add_form_key('login'));
$tpl->assign("action_login", 'ucp.php?go=login' . (isset($_GET['return']) ? '&return=' . htmlspecialchars($_GET['return']) : ''));
$tpl->assign("EXTRA_CODE_META", $extra);
$default_avatar = $STYLE_PATH . 'images/user_avater.png';
$tpl->assign("user_avatar", 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($userinfo['mail']))) . '?s=100&d=' . urlencode($default_avatar));
$header = $tpl->display("header");
if ($config['siteclose'] == '1' && user_can('enter_acp') && !defined('IN_ADMIN')) {
//add notification bar
$header = preg_replace('/<body([^\\>]*)>/i', "<body\\1>\n<!-- site is closed -->\n<p style=\"width: 100%; text-align:center; background:#FFFFA6; color:black; border:thin;top:0;left:0; position:absolute; width:100%;clear:both;\">" . $lang['NOTICECLOSED'] . "</p>\n<!-- #site is closed -->", $header);
}
($hook = kleeja_run_hook('Saaheader_func')) ? eval($hook) : null;
//run hook
echo $header;
flush();
}
示例3: isset
* @package adm
* @version $Id: e_calls.php 2072 2012-10-22 05:41:32Z saanina $
* @copyright (c) 2007 Kleeja.com
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//for style ..
$stylee = "admin_calls";
$current_smt = isset($_GET['smt']) ? preg_match('![a-z0-9_]!i', trim($_GET['smt'])) ? trim($_GET['smt']) : 'general' : 'general';
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&smt=' . $current_smt;
$msg_sent = isset($_GET['sent']) ? intval($_GET['sent']) : false;
$H_FORM_KEYS = kleeja_add_form_key('adm_calls');
$there_queue = preg_match('!:del_[a-z0-9]{0,3}calls:!i', $config['queue']);
//
// Check form key
//
if (isset($_POST['submit'])) {
if (!kleeja_check_form_key('adm_calls')) {
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
}
}
#add delete process to the queue
if ($current_smt == 'del_d30' || $current_smt == 'del_all') {
if (strpos($config['queue'], ':' . $current_smt . 'calls:') !== false) {
kleeja_admin_err($lang['DELETE_PROCESS_IN_WORK'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php'), 1);
} else {
update_config('queue', $config['queue'] . ':' . $current_smt . 'calls:');
示例4: switch
}
if (!isset($_REQUEST['method'])) {
$_REQUEST['method'] = 0;
}
switch ((int) $_REQUEST['method']) {
case 0:
$stylee = "admin_info";
break;
//edit tpl
//edit tpl
case 1:
//for style ..
$stylee = "admin_edit_tpl";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&sty_t=style_orders';
$action_return = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&style_choose=' . $style_id . '&method=1';
$H_FORM_KEYS = kleeja_add_form_key('adm_style_order_edit_content');
//is there any possiablity to write on files
$not_style_writeable = true;
$d_style_path = PATH . 'styles/' . $style_id;
$lang['STYLE_DIR_NOT_WR'] = sprintf($lang['STYLE_DIR_NOT_WR'], $d_style_path);
if (!is_writable($d_style_path)) {
@chmod($d_style_path, 0777);
if (is_writable($d_style_path)) {
$not_style_writeable = false;
}
} else {
$not_style_writeable = false;
}
$template_content = file_get_contents($tpl_path);
$template_content = htmlspecialchars(stripslashes($template_content));
break;
示例5: kleeja_add_form_key
<input type="text" name="kleeja_code_answer" id="kleeja_code_answer" tabindex="5" />
</div>
<div class="clr"></div>
<p class="explain"><?php
echo $lang['NOTE_CODE'];
?>
</p>
</div>
<?php
}
?>
<!-- @end-verification-code -->
<div class="clr"></div>
<?php
echo kleeja_add_form_key('register');
?>
<input type="submit" name="submit" value="<?php
echo $lang['REGISTER'];
?>
" tabindex="6" />
</form>
<!-- @end-form-register -->
<div class="clr"></div>
</div>
<!-- @end-register-template -->
示例6: strlen
$contents = strlen($ruless) > 3 ? stripslashes($ruless) : $lang['NO_RULES_NOW'];
($hook = kleeja_run_hook('rules_go_page')) ? eval($hook) : null;
//run hook
break;
//
//Page of call-us
//
//
//Page of call-us
//
case 'call':
//page info
$stylee = 'call';
$titlee = $lang['CALL'];
$action = './go.php?go=call';
$H_FORM_KEYS = kleeja_add_form_key('call');
$NOT_USER = !$usrcp->name() ? true : false;
//no error yet
$ERRORS = false;
//_post
$t_cname = isset($_POST['cname']) ? htmlspecialchars($_POST['cname']) : '';
$t_cmail = isset($_POST['cmail']) ? htmlspecialchars($_POST['cmail']) : '';
$t_ctext = isset($_POST['ctext']) ? htmlspecialchars($_POST['ctext']) : '';
($hook = kleeja_run_hook('no_submit_call_go_page')) ? eval($hook) : null;
//run hook
if (isset($_POST['submit'])) {
//after sumit
$ERRORS = array();
($hook = kleeja_run_hook('submit_call_go_page')) ? eval($hook) : null;
//run hook
//check for form key
示例7: kleeja_add_form_key
//part of admin extensions [beta !]
//helpls kleeja to be up to date!
//copyright 2007-2009 Kleeja.com ..
//license http://opensource.org/licenses/gpl-license.php GNU Public License
//$Author: $ , $Rev: $, $Date:: $
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//update in 5 steps so we can reduce the load and knows errors when they occurs
$v = @unserialize($config['new_version']);
if (!version_compare(strtolower(KLEEJA_VERSION), strtolower($v['version_number']), '<')) {
//kleeja_admin_err($lang['U_LAST_VER_KLJ']);
}
#security vars
$H_FORM_KEYS = kleeja_add_form_key('adm_aupdate');
$GET_FORM_KEY = kleeja_add_form_key_get('adm_aupdate');
$current_step = isset($_GET['astep']) ? preg_match('![a-z0-9_]!i', trim($_GET['astep'])) ? trim($_GET['astep']) : 'general' : 'general';
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&astep=' . $current_step;
if ($current_step != 'general') {
//check _GET Csrf token
//remember to add token at every m=? request !
if (!kleeja_check_form_key_get('adm_aupdate')) {
kleeja_admin_err($lang['INVALID_GET_KEY'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php'), 2);
}
}
include PATH . 'includes/update.php';
//for style ..
$stylee = 'admin_aupdate';
//$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .'&sty_t=style_orders';
//class
示例8: preg_replace
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//english as default
if (!isset($_REQUEST['lang'])) {
$_REQUEST['lang'] = 'en';
}
$lang_id = preg_replace('![^a-z]!', '', $_REQUEST['lang']);
//for style ..
$stylee = "admin_langs";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&lang=' . $lang_id;
$action2 = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php');
$H_FORM_KEYS = kleeja_add_form_key('adm_langs');
//
// Check form key
//
if (isset($_POST['submit'])) {
if (!kleeja_check_form_key('adm_langs')) {
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 3);
}
}
//get languages
$lngfiles = '';
if ($dh = @opendir(PATH . 'lang')) {
while (($file = readdir($dh)) !== false) {
if (strpos($file, '.') === false && $file != '..' && $file != '.') {
$lngfiles .= '<option ' . ($lang_id == $file ? 'selected="selected"' : '') . ' value="' . $file . '">' . $file . '</option>' . "\n";
}
示例9: kleeja_add_form_key
?>
)</p></label>
<div class="clr"></div><br />
<input type="submit" name="submit" value="<?php
echo $lang['LOGIN'];
?>
" tabindex="3" />
<div class="forget_pass"><a tabindex="5" href="<?php
echo $forget_pass_link;
?>
"><?php
echo $lang['LOSS_PASSWORD'];
?>
</a></div>
<?php
echo kleeja_add_form_key('login');
?>
</div>
</div>
</form>
<!-- @end-form-login -->
<div class="clr"></div>
</div>
<!-- @end-login-template -->
示例10: kleeja_add_form_key
echo $lang['NOTE_CODE'];
?>
</p>
</div>
<?php
}
?>
<!-- @end-verification-code -->
<div class="clr"></div>
<input name="rid" value="<?php
echo $id_d;
?>
" type="hidden" />
<input type="submit" name="submit" value="<?php
echo $lang['REPORT'];
?>
" tabindex="5" />
<?php
echo kleeja_add_form_key('report');
?>
</form>
<!-- @end-Report-Forom -->
</div>
<!-- @end-Report-template -->
示例11: kleeja_add_form_key
echo $lang['REFRESH_CAPTCHA'];
?>
" onclick="javascript:update_kleeja_captcha('<?php
echo $captcha_file_path;
?>
', 'kleeja_code_answer');">
<input type="text" class="form-control" name="kleeja_code_answer" id="kleeja_code_answer" aria-describedby="helpBlock">
<span id="helpBlock" class="help-block"><?php
echo $lang['NOTE_CODE'];
?>
</span>
</div>
<?php
}
?>
<input type="submit" name="submit" value="<?php
echo $lang['SEND'];
?>
" class="btn btn-default">
<?php
echo kleeja_add_form_key('call');
?>
</form>
<!-- @end-form -->
示例12: basename
* @copyright (c) 2007 Kleeja.com
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//for style ..
$stylee = "admin_users";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
$action .= (isset($_GET['search']) ? '&search=' . $SQL->escape($_GET['search']) : '') . (isset($_GET['admin']) && $_GET['admin'] == '1' ? '&admin=1' : '');
$is_search = $affected = $is_asearch = false;
$isn_search = true;
$H_FORM_KEYS = kleeja_add_form_key('adm_users');
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser');
//
// Check form key
//
if (isset($_POST['submit'])) {
if (!kleeja_check_form_key('adm_users')) {
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
}
}
if (isset($_POST['newuser'])) {
if (!kleeja_check_form_key('adm_users_newuser')) {
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
}
}
if (isset($_POST['search_user'])) {
if (!kleeja_check_form_key('adm_users_search')) {
示例13: isset
* @package adm
* @version $Id: messages.php 2236 2013-11-30 10:07:23Z saanina $
* @copyright (c) 2007 Kleeja.com
* @license http://www.kleeja.com/license
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//for style ..
$current_template = 'messages.php';
$current_smt = isset($_GET['smt']) ? preg_match('![a-z0-9_]!i', trim($_GET['smt'])) ? trim($_GET['smt']) : 'general' : 'general';
$action = ADMIN_PATH . '?cp=messages&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&smt=' . $current_smt;
$msg_sent = isset($_GET['sent']) ? intval($_GET['sent']) : false;
$H_FORM_KEYS = kleeja_add_form_key('adm_messages');
$there_queue = preg_match('!:del_[a-z0-9]{0,3}messages:!i', $config['queue']);
print_r($_POST);
//
// Check form key
//
if (isset($_POST['submit'])) {
if (!kleeja_check_form_key('adm_messages')) {
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
}
}
#add delete process to the queue
if ($current_smt == 'del_d30' || $current_smt == 'del_all') {
if (strpos($config['queue'], ':' . $current_smt . 'messages:') !== false) {
kleeja_admin_err($lang['DELETE_PROCESS_IN_WORK'], true, $lang['ERROR'], true, ADMIN_PATH . '?cp=messages', 1);
} else {
示例14: kleeja_add_form_key
" />
<input type="password" name="lpass_<?php
echo $KEY_FOR_PASS;
?>
" class="form-control" placeholder="<?php
echo $lang['PASSWORD'];
?>
" autofocus>
<button class="btn btn-lg btn-primary btn-block" type="submit" name="submit"><?php
echo $lang['LOGIN'];
?>
</button>
<?php
echo kleeja_add_form_key('admin_login');
?>
<input type="hidden" name="kid" value="<?php
echo $KEY_FOR_WEE;
?>
" />
<hr>
<a href="<?php
echo $config['siteurl'];
?>
" title="<?php
echo $lang['RETURN_HOME'];
?>
" class="muted"> « <?php
echo $lang['RETURN_HOME'];
示例15: basename
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
exit;
}
//for style ..
$stylee = "admin_configs";
//words
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php');
$n_submit = $lang['UPDATE_CONFIG'];
$options = '';
$SHOW_CH_STAGE = isset($_GET['type']) ? false : true;
$CONFIGEXTEND = false;
$H_FORM_KEYS = kleeja_add_form_key('adm_configs');
//
// Check form key
//
if (isset($_POST['submit'])) {
if (!kleeja_check_form_key('adm_configs')) {
$redirect_url = $action . (isset($_GET['type']) ? '&type=' . htmlspecialchars($_GET['type']) : '');
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $redirect_url, 1);
}
}
switch ($SHOW_CH_STAGE) {
//
//box of config types
//
case true:
$query = array('SELECT' => 'DISTINCT(type)', 'FROM' => "{$dbprefix}config", 'WHERE' => '`option` != \'\'', 'ORDER BY' => 'display_order');