/**
* 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']) ? '&amp;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
0
/**
* 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']) ? '&amp;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&amp;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
0
文件: e_calls.php 项目: Saleh7/Kleeja
* @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') . '&amp;page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&amp;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:');
 }
 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') . '&amp;sty_t=style_orders';
         $action_return = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;style_choose=' . $style_id . '&amp;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
0
文件: register.php 项目: omtim/kleeja
				<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
0
     $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
0
文件: aupdate.php 项目: omtim/kleeja
//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') . '&amp;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') .'&amp;sty_t=style_orders';
//class
示例#8
0
文件: o_langs.php 项目: Saleh7/Kleeja
*
*/
// 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') . '&amp;page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&amp;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
0
文件: login.php 项目: omtim/kleeja
?>
)</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
0
文件: report.php 项目: omtim/kleeja
    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
0
文件: call.php 项目: omtim/kleeja
    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 -->
	
* @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') . '&amp;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
0
文件: messages.php 项目: omtim/kleeja
* @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&amp;page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&amp;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
0
文件: login.php 项目: omtim/kleeja
" />
        <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"> &laquo; <?php 
echo $lang['RETURN_HOME'];
* @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']) ? '&amp;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');
示例#16
0
文件: fileuser.php 项目: omtim/kleeja
    ?>
		<!-- button -->
		<div class="left_button"><input type="submit" name="submit_files" value="<?php 
    echo $lang['DEL_SELECTED'];
    ?>
" /></div>
		<div class="right_button">[ <a href="javascript:void(0);" onclick="checkAll(document.c, '_del', 'su');"><?php 
    echo $lang['CHECK_ALL'];
    ?>
</a> ]</div>

		<!-- @end-button -->
		
		
		<?php 
    echo kleeja_add_form_key('fileuser');
    ?>
		</form>
		
		<!-- link user -->
		<div id="filecplink">
				<div class="clr"></div>
						<fieldset>
								<legend class="copylink"><?php 
    echo $lang['COPY_AND_GET_DUD'];
    ?>
</legend>
								<input class="link_user" readonly="readonly" onclick="this.select();" type="text" name="option" value="<?php 
    echo $your_fileuser_link;
    ?>
" />
示例#17
0
文件: l_rules.php 项目: Saleh7/Kleeja
*
* @package adm
* @version $Id: l_rules.php 2062 2012-10-17 05:18:36Z saanina $
* @copyright (c) 2007 Kleeja.com
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
    exit;
}
//for style ..
$stylee = "admin_rules";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php');
$affected = false;
$H_FORM_KEYS = kleeja_add_form_key('adm_rules');
//
// Check form key
//
if (isset($_POST['submit'])) {
    if (!kleeja_check_form_key('adm_rules')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
}
$query = array('SELECT' => 'rules', 'FROM' => "{$dbprefix}stats");
$result = $SQL->build($query);
while ($row = $SQL->fetch_array($result)) {
    $rulesw = isset($_POST['rules_text']) ? $_POST['rules_text'] : $row['rules'];
    $rules = htmlspecialchars($rulesw);
    //when submit
    if (isset($_POST['submit'])) {
* @package adm
* @version $Id$
* @copyright (c) 2007 Kleeja.com
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
    exit;
}
//for style ..
$stylee = "admin_exts";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
$action_new_ext = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;add_new_ext=1';
$H_FORM_KEYS = kleeja_add_form_key('adm_exts');
$H_FORM_KEYS2 = kleeja_add_form_key('adm_exts_new_ext');
//
// Check form key
//
if (isset($_POST['submit'])) {
    if (!kleeja_check_form_key('adm_exts')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
}
if (isset($_GET['add_new_ext'])) {
    if (!kleeja_check_form_key('adm_exts_new_ext')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
}
//show exts
$query = array('SELECT' => '*', 'FROM' => "{$dbprefix}exts");
示例#19
0
文件: index.php 项目: Saleh7/Kleeja
                 //Wrong entries
                 $ERRORS[] = $lang['LOGIN_ERROR'];
             }
         }
         //let's see if there is errors
         if (sizeof($ERRORS)) {
             $errs = '';
             foreach ($ERRORS as $r) {
                 $errs .= '- ' . $r . '. <br />';
             }
         }
     }
 }
 //show template login .
 $action = './' . basename(ADMIN_PATH) . '?go=login&amp;cp=' . $go_to;
 $H_FORM_KEYS = kleeja_add_form_key('admin_login');
 $KEY_FOR_WEE = sha1(microtime() . sha1($config['h_key']));
 $KEY_FOR_PASS = preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . $KEY_FOR_WEE));
 $not_you = sprintf($lang['USERNAME_NOT_YOU'], '<a href="' . $config['siteurl'] . 'ucp.php?go=logout">', '</a>');
 $err = false;
 if (!empty($errs)) {
     $err = true;
 }
 if (isset($_GET['_ajax_'])) {
     //echo_ajax(999, '');
 }
 //prevent indexing this page by bots
 header('HTTP/1.1 503 Service Temporarily Unavailable');
 echo $tpl->display("admin_login");
 $SQL->close();
 exit;
示例#20
0
            $icon = base64_decode($plgicons[$_GET['iconp']]);
        }
    }
    if (!$icon) {
        $icon = file_get_contents($STYLE_PATH_ADMIN . 'images/default_plguin_icon.png');
    }
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    header('Accept-Ranges: bytes');
    header('Content-Length: ' . strlen($icon));
    header('Content-Type: image/png');
    echo $icon;
    $SQL->close();
    exit;
}
#security vars
$H_FORM_KEYS = kleeja_add_form_key('adm_plugins');
$GET_FORM_KEY = kleeja_add_form_key_get('adm_plugins');
#initiate plugins class
include PATH . 'includes/plugins.php';
$plg = new kplugins();
//return values of ftp from config, if not get suggested one
$ftp_info = array('host', 'user', 'pass', 'path', 'port');
if (!empty($config['ftp_info'])) {
    $ftp_info = @unserialize($config['ftp_info']);
} else {
    //todo : make sure to figure this from OS, and some other things
    $ftp_info['path'] = str_replace('/includes/adm', '', dirname(__FILE__)) . '/';
    #mose
    if (strpos($ftp_info['path'], 'public_html') !== false) {
        $ftppath_parts = explode('public_html', $ftp_info['path']);
        $ftp_info['path'] = '/public_html' . $ftppath_parts[1];
示例#21
0
文件: extra.php 项目: omtim/kleeja
*
* @package adm
* @version $Id: extra.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 = 'extra.php';
$current_smt = isset($_GET['smt']) ? preg_match('![a-z0-9_]!i', trim($_GET['smt'])) ? trim($_GET['smt']) : 'he' : 'he';
$action = ADMIN_PATH . '?cp=extra&amp;smt=' . $current_smt;
$H_FORM_KEYS = kleeja_add_form_key('adm_extra');
//
// Check form key
//
if (isset($_POST['submit'])) {
    if (!kleeja_check_form_key('adm_extra')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
}
$query = array('SELECT' => 'ex_header,ex_footer', 'FROM' => "{$dbprefix}stats");
$result = $SQL->build($query);
//is there any change !
$affected = false;
while ($row = $SQL->fetch($result)) {
    $ex_header = isset($_POST['ex_header']) ? $_POST['ex_header'] : $row['ex_header'];
    $ex_footer = isset($_POST['ex_footer']) ? $_POST['ex_footer'] : $row['ex_footer'];
示例#22
0
文件: get_pass.php 项目: omtim/kleeja
			</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('get_pass');
?>

		<input type="submit" name="submit" value="<?php 
echo $lang['GET_LOSTPASS'];
?>
" tabindex="3" />

	</form>
	<!-- @end-form -->

	<div class="clr"></div>
   
</div>
<!-- @end-Password-Recovery-Template -->
示例#23
0
文件: users.php 项目: omtim/kleeja
$action .= isset($_GET['search_id']) ? '&amp;search_id=' . htmlspecialchars($_GET['search']) : '';
$action .= (isset($_GET['qg']) ? '&amp;qg=' . intval($_GET['qg']) : '') . '&amp;smt=' . $current_smt;
$action_all = ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . '&amp;smt=' . $current_smt . (isset($_GET['page']) ? '&amp;page=' . intval($_GET['page']) : '');
//if not noraml user system
$user_not_normal = (int) $config['user_system'] != 1 ? true : false;
$is_search = $affected = $is_asearch = $GE_INFO = false;
$isn_search = true;
$GET_FORM_KEY = kleeja_add_form_key_get('adm_users');
$H_FORM_KEYS = kleeja_add_form_key('adm_users');
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser');
$H_FORM_KEYS3 = kleeja_add_form_key('adm_users_newgroup');
$H_FORM_KEYS4 = kleeja_add_form_key('adm_users_delgroup');
$H_FORM_KEYS5 = kleeja_add_form_key('adm_users_editacl');
$H_FORM_KEYS6 = kleeja_add_form_key('adm_users_editdata');
$H_FORM_KEYS7 = kleeja_add_form_key('adm_users_editexts');
$H_FORM_KEYS8 = kleeja_add_form_key('adm_users_edituser');
//
// 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['edituser'])) {
    if (!kleeja_check_form_key('adm_users_edituser')) {
示例#24
0
if (!isset($_GET['sty_t'])) {
    $_GET['sty_t'] = null;
}
#current secondary menu action
$current_smt = isset($_GET['smt']) ? preg_match('![a-z0-9_]!i', trim($_GET['smt'])) ? trim($_GET['smt']) : 'general' : 'general';
switch ($_GET['sty_t']) {
    default:
    case 'st':
        //for style ..
        $stylee = "admin_styles";
        $action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;sty_t=st' . '&amp;smt=' . $current_smt;
        $edit_tpl_action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;sty_t=style_orders&amp;style_id=' . $config['style'] . '&amp;smt=' . $current_smt . '&amp;method=1&amp;tpl_choose=';
        $show_all_tpls_action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;style_choose=' . $config['style'] . '&amp;method=1' . '&amp;smt=' . $current_smt;
        $GET_FORM_KEY = kleeja_add_form_key_get('adm_style_del_edit');
        $H_FORM_KEYS2 = kleeja_add_form_key('adm_style_order_add');
        $H_FORM_KEYS3 = kleeja_add_form_key('adm_style_order_bkup');
        //kleeja depend on its users .. and kleeja love them .. so let's tell them about that ..
        $klj_d_s = $lang['KLJ_MORE_STYLES'][rand(0, sizeof($lang['KLJ_MORE_STYLES']) - 1)];
        //get styles
        $arr = array();
        if ($dh = @opendir(PATH . 'styles')) {
            while (($file = @readdir($dh)) !== false) {
                if (strpos($file, '.') === false && $file != '..' && $file != '.') {
                    $arr[] = array('style_name' => $file, 'is_default' => $config['style'] == $file ? true : false, 'link_show_tpls' => basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;sty_t=st&amp;style_choose=' . $file . '&amp;method=1&amp;smt=curstyle', 'link_mk_default' => basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php') . '&amp;sty_t=st&amp;style_choose=' . $file . '&amp;method=2&amp;smt=curstyle');
                }
            }
            @closedir($dh);
        }
        //after submit
        if (isset($_REQUEST['style_choose'])) {
            $style_id = str_replace('..', '', $_REQUEST['style_choose']);
*
* @package adm
* @version $Id$
* @copyright (c) 2007 Kleeja.com
* @license ./docs/license.txt
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
    exit;
}
//for style ..
$stylee = "admin_ban";
$action = basename(ADMIN_PATH) . '?cp=' . basename(__FILE__, '.php');
$affected = false;
$H_FORM_KEYS = kleeja_add_form_key('adm_ban');
//
// Check form key
//
if (isset($_POST['submit'])) {
    if (!kleeja_check_form_key('adm_ban')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
}
$query = array('SELECT' => 'ban', 'FROM' => "{$dbprefix}stats");
$result = $SQL->build($query);
while ($row = $SQL->fetch_array($result)) {
    $ban = isset($_POST["ban_text"]) ? htmlspecialchars($_POST['ban_text']) : $row['ban'];
    //when submit
    if (isset($_POST['submit'])) {
        //update
示例#26
0
     //reset password page
     //
 //
 //reset password page
 //
 case 'get_pass':
     //if not default system, let's give him a link for integrated script
     if ((int) $config['user_system'] != 1) {
         $text = '<a href="' . (!empty($forgetpass_script_path) ? $forgetpass_script_path : $script_path) . '">' . $lang['LOST_PASS_FORUM'] . '</a>';
         kleeja_info($text, $lang['PLACE_NO_YOU']);
     }
     //page info
     $stylee = 'get_pass';
     $titlee = $lang['GET_LOSTPASS'];
     $action = 'ucp.php?go=get_pass';
     $H_FORM_KEYS = kleeja_add_form_key('get_pass');
     //no error yet
     $ERRORS = false;
     //after sent mail .. come here
     if (isset($_GET['activation_key']) && isset($_GET['uid'])) {
         ($hook = kleeja_run_hook('get_pass_activation_key')) ? eval($hook) : null;
         //run hook
         $h_key = htmlspecialchars($_GET['activation_key']);
         $u_id = intval($_GET['uid']);
         $result = $SQL->query("SELECT new_password FROM `{$dbprefix}users` WHERE hash_key='" . $SQL->escape($h_key) . "' AND id=" . $u_id . "");
         if ($SQL->num_rows($result)) {
             $npass = $SQL->fetch_array($result);
             $npass = $npass['new_password'];
             //password now will be same as new password
             $update_query = array('UPDATE' => "{$dbprefix}users", 'SET' => "password = '******', new_password = '', hash_key = ''", 'WHERE' => 'id=' . $u_id);
             ($hook = kleeja_run_hook('qr_update_newpass_activation')) ? eval($hook) : null;
示例#27
0
* @package adm
* @version $Id: f_reports.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_reports";
$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') . '&amp;page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&amp;smt=' . $current_smt;
$msg_sent = isset($_GET['sent']) ? intval($_GET['sent']) : false;
$H_FORM_KEYS = kleeja_add_form_key('adm_reports');
$there_queue = preg_match('!:del_[a-z0-9]{0,3}reports:!i', $config['queue']);
//
// Check form key
//
if (isset($_POST['submit'])) {
    if (!kleeja_check_form_key('adm_reports')) {
        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 . 'reports:') !== 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 . 'reports:');
示例#28
0
文件: images.php 项目: omtim/kleeja
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
    exit;
}
#number of images in each page
if (!isset($images_cp_perpage) || !$images_cp_perpage) {
    #you can add this varibale to config.php
    $images_cp_perpage = 25;
}
#style template
$current_template = 'img.php';
$action = ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . (isset($_GET['page']) ? '&amp;page=' . intval($_GET['page']) : '') . (isset($_GET['last_visit']) ? '&amp;last_visit=' . intval($_GET['last_visit']) : '');
$action_search = ADMIN_PATH . "?cp=h_search";
$H_FORM_KEYS = kleeja_add_form_key('adm_img_ctrl');
$is_search = false;
//
// after submit
//
if (isset($_POST['submit'])) {
    #check form key
    if (!kleeja_check_form_key('adm_img_ctrl')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
    }
    foreach ($_POST as $key => $value) {
        if (preg_match('/del_(?P<digit>\\d+)/', $key)) {
            $del[$key] = $value;
        }
    }
    $sizes = $num = 0;
示例#29
0
文件: search.php 项目: omtim/kleeja
* @copyright (c) 2007 Kleeja.com
* @license http://www.kleeja.com/license
*
*/
// not for directly open
if (!defined('IN_ADMIN')) {
    exit;
}
//for style ..
$current_template = "search.php";
//search files
$action = ADMIN_PATH . "?cp=h_search";
//wut the default user system
$default_user_system = (int) $config['user_system'] == 1 ? true : false;
$H_FORM_KEYS = kleeja_add_form_key('adm_files_search');
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_search');
$current_smt = isset($_GET['smt']) ? preg_match('![a-z0-9_]!i', trim($_GET['smt'])) ? trim($_GET['smt']) : 'files' : 'files';
#filling the inputs automatically via GET
$filled_ip = $filled_username = '';
if (isset($_GET['s_input'])) {
    if ((int) $_GET['s_input'] == 2) {
        $filled_username = htmlspecialchars($_GET['s_value']);
    } elseif ((int) $_GET['s_input'] == 1) {
        $filled_ip = htmlspecialchars($_GET['s_value']);
    }
}
if (isset($_POST['search_file'])) {
    if (!kleeja_check_form_key('adm_files_search')) {
        kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, ADMIN_PATH . '?cp=h_search', 1);
    }
    #delete all searches greater than 10
示例#30
0
文件: profile.php 项目: omtim/kleeja
?>
 :</label>
				<input type="password" name="ppass_new2" value="<?php 
echo $t_ppass_new2;
?>
" tabindex="5" />

			</div>
		</div>

				
		<!-- button -->
		<div class="buttons_center"><input type="submit" name="submit_data" value="<?php 
echo $lang['EDIT_U_DATA'];
?>
" tabindex="6" /></div>
		<!-- @end-button -->		
	</div>	

	<?php 
echo kleeja_add_form_key('profile');
?>

	</form>
	<!-- @end-profile -->

	
	 
	<div class="clr"></div>
</div>
<!-- @end-Profile-template -->