Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function _error()
- {
- return sm_error(_('The request could not be completed due to unexpected error. Please contact support.'));
- }
- function start_session($uid, $type, $global, $user_email, $external_auth = NULL, $user_name = '')
- {
- $_SESSION['uid'] = $uid;
- $_SESSION['usertype'] = $type;
- $_SESSION['userglobal'] = $global;
- $_SESSION['useremail'] = $user_email;
- $_SESSION['user_name'] = $user_name;
- if (isset($external_auth)) {
- $_SESSION['externalauth'] = $external_auth;
- }
- $_SESSION['SERVER_NAME'] = SM_HTTP_URL;
- $_SESSION['PHP_SELF'] = $_SERVER['PHP_SELF'];
- $_SESSION['checkhost'] = md5(@$_SERVER['HTTP_USER_AGENT']);
- if ($type != 'PW_EXT') {
- $_SERVER['REQUEST_URI'] = preg_replace('/smlang=[^&]+/', '', $_SERVER['REQUEST_URI']);
- sm_set_lang();
- SM_Action_Log::login();
- }
- if (!defined('SM_HTTPS_FORCE') || !SM_HTTPS_FORCE || (SM_HTTPS_FORCE == 2)) {
- sm_redirect('nonssl');
- }
- else {
- header('Location: /' . sm_parse_login_querystring(false));
- exit();
- }
- }
- function check_user_privileges($appname, $uid, $type)
- {
- $privileges = [];
- $has_all_privileges = false;
- $q = sm_privileges('pbxware', 'tag, value', $uid, $type);
- if ($q !== true) {
- $q .= ' AND p.tag LIKE \'%server_%\'';
- }
- $privileges = sm_privileges_fetch($q);
- if (!isset($privileges['server_all_enabled'])) {
- $q = 'SELECT id, hostname FROM pbxware_servers ';
- $servers = dbexec($q);
- while ($row = mysql_fetch_assoc($servers)) {
- if (isset($privileges['server_' . $row['hostname']])) {
- $has_all_privileges = true;
- break;
- }
- }
- }
- else {
- $has_all_privileges = true;
- }
- return $has_all_privileges;
- }
- session_name('SMSESSID');
- require_once 'lib/headers.php';
- require_once 'lib/standard.php';
- require_once 'lib/database.php';
- include_once 'lib/ip_check.php';
- ..............................................................
- ................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement