Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.5.0.0
- * @ Author : DeZender
- * @ Release on : 22.06.2018
- * @ Official site : http://DeZender.Net
- *
- */
- if (function_exists('get_execution_time') == false) {
- function get_execution_time()
- {
- static $microtime_start = null;
- if ($microtime_start === null) {
- $microtime_start = microtime(true);
- return 0;
- }
- return microtime(true) - $microtime_start;
- }
- get_execution_time();
- }
- define('DS', DIRECTORY_SEPARATOR);
- define('MUBASHIER', true);
- define('IFRAME_NAMES', 'facebook.com|twitter.com|slideshare.com|scribd.com|flickr.com|instagram.com|youtube-nocookie.com|youtube.com|youtu.be|vimeo.com|soundcloud.com|dailymotion.com|dai.ly|ustream.tv|vine.co|wordpress.tv|videojug.com|videofork.com|vidyomani.com|vid.me');
- define('IFRAME_REGEXP_SYNTAX', '/(\\/\\/)?(www\\.)?(%s)/Sui');
- define('IFRAME_REGEXP', sprintf(IFRAME_REGEXP_SYNTAX, IFRAME_NAMES));
- final class Mubashier
- {
- public $driver_name = 'PDO';
- public $manager = false;
- public static $webpage_caching = true;
- public $webpage_id = null;
- public $live_webpage = false;
- protected $initialized = false;
- protected $sessionState = Mubashier::SESSION_STATE_UNINITIALIZED;
- protected $pdo = null;
- protected $pdo_structure = null;
- protected static $statsDb = null;
- protected $config = null;
- protected $cats = null;
- protected $featured_sliders = null;
- protected $user_groups = null;
- protected $countries = null;
- protected $sources = null;
- protected $pages = array();
- protected $touch_mode = false;
- protected $types = array('1' => 'أخبار', '2' => 'فيديوهات', '3' => 'صور', '4' => 'مقالات');
- protected $types_prefix = array('1' => 'index', '2' => 'videos', '3' => 'photos', '4' => 'articles', '5' => 'gif');
- protected $translation = array();
- protected $db_info = array();
- protected $html = array('header' => array(), 'footer' => array());
- protected $javascript_options = null;
- protected $css = null;
- protected $js = array();
- public $js_place = 'header';
- public $ad_sizes = array(array(160, 600), array(120, 600), array(180, 600), array(200, 200), array(250, 250), array(300, 250), array(336, 280), array(728, 90), array(468, 60), array(300, 600), array(320, 50), array(320, 75), array(180, 227), array(780, 40), array(970, 90));
- protected $mime_types = array('video' => array('video/mp4' => 'mp4', 'video/m4v' => 'm4v', 'video/mov' => 'mov', 'video/wmv' => 'wmv', 'video/flv|video/x-flv' => 'flv'), 'audio' => array('audio/wma' => 'wma', 'audio/m4a' => 'm4a', 'audio/mp3' => 'mp3', 'audio/wav' => 'wav', 'audio/mpeg' => 'mpeg', 'audio/flv|audio/x-flv' => 'flv'), 'image' => array('image/gif' => 'gif', 'image/jpeg' => 'jpg', 'image/jpg' => 'jpg', 'image/png' => 'png', 'image/x-ms-bmp' => 'bmp'), 'flash' => array('application/x-shockwave-flash' => 'swf'), 'compressed' => array('application/x-bzip' => 'bz', 'application/x-bzip2' => 'bz2', 'application/zip' => 'zip', 'application/x-rar-compressed' => 'rar'), 'text' => array('application/x-sql' => 'sql', 'text/plain' => 'txt', 'application/pdf' => 'pdf', 'application/force-download' => 'pdf', 'application/msword' => 'doc', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx'));
- public $inits = array();
- public $theme_features = array('general_scripts' => true, 'navbars' => true, 'ads' => true, 'polls' => false, 'outside_services' => false);
- protected $vars_data = array();
- public $executions_time = array();
- public static $final_urls = array();
- public static $urls_transport = array();
- public static $urls_response = array();
- public static $urls_errors = array();
- public static $urls_providers_loaded = array();
- public static $theme_path = null;
- public static $random_int = 0;
- public $lang_pakgs = array('root', 'theme');
- public $temp_opt_handler = 'cache';
- protected static $uaHttpHeaders = array('HTTP_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA', 'HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_ORIGINAL_USER_AGENT', 'HTTP_X_SKYFIRE_PHONE', 'HTTP_X_BOLT_PHONE_UA', 'HTTP_DEVICE_STOCK_UA', 'HTTP_X_UCBROWSER_DEVICE_UA');
- protected $userAgent = null;
- public static $statics = array();
- const VERSION = '1.7.89';
- const REQUIRED_FUNCTIONS = 'mail,mb_strlen,mb_convert_encoding,glob,ini_set,error_reporting,set_time_limit,ignore_user_abort,memory_get_usage';
- const NEWS_RSS = '//api.mubashier.com/news.php';
- const UPDATE_CHECKER = 'http://api.mubashier.com/version.php';
- const SOURCES_API_TABLELIST = '//api.mubashier.com/store/sources_tablelist.php';
- const SOURCES_API_IMPORT = 'http://api.mubashier.com/store/sources_export.php';
- const SOURCES_API_CHECKER = 'http://api.mubashier.com/store/sources_checker.php';
- const XPATH_FEEDTYPES_JSON = 'http://api.mubashier.com/json/feedtypes_xpath.json';
- const XPATH_IMAGES_JSON = 'http://api.mubashier.com/json/image_xpath.json';
- const IFRAME_REGEXP = IFRAME_REGEXP;
- const SESSION_STATE_UNAVAILABLE = -1;
- const SESSION_STATE_UNINITIALIZED = 0;
- const SESSION_STATE_INITIALIZED = 1;
- const SESSION_STATE_EXTERNAL = 2;
- public function __construct($db_connection = true, $session_start = true)
- {
- Mubashier::protect();
- self::$random_int = rand(0, 100);
- $this->version = self::VERSION;
- self::loadClass('geo', 'Browser');
- self::loadClass('detect', 'Browser');
- $this->setUserAgent();
- $config_file = dirname(__FILE__) . DS . 'config.inc.php';
- if (file_exists($config_file)) {
- if (include($config_file)) {
- $this->db_info = $db_info;
- if (true == $session_start) {
- $this->session_start();
- }
- require_once dirname(__FILE__) . '/phpfastcache/3.0.0/phpfastcache.php';
- if (defined('C_STORAGE') == true) {
- phpFastCache::$config = array('storage' => C_STORAGE, 'htaccess' => true, 'path' => C_PATH, 'securityKey' => 'default', 'extensions' => array(), 'fallback' => 'files');
- } else {
- phpFastCache::$disabled = true;
- }
- if (self::isCLi() == true || empty($_SERVER['REQUEST_URI'])) {
- self::$webpage_caching = false;
- } else {
- if (defined('C_WEBPAGE')) {
- self::$webpage_caching = C_WEBPAGE;
- }
- if (strpos($_SERVER['REQUEST_URI'], 'cron') !== false || strpos($_SERVER['REQUEST_URI'], 'panel') !== false || strpos($_SERVER['REQUEST_URI'], 'ads') !== false || strpos($_SERVER['REQUEST_URI'], 'ajax') !== false || strpos($_SERVER['REQUEST_URI'], 'revision') !== false || strpos($_SERVER['REQUEST_URI'], 'auth') !== false || strpos($_SERVER['REQUEST_URI'], 'install') !== false || strpos($_SERVER['REQUEST_URI'], 'share') !== false || strpos($_SERVER['REQUEST_URI'], 'actions') !== false) {
- self::$webpage_caching = false;
- }
- if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- self::$webpage_caching = false;
- }
- if (isset($_GET['fresh'])) {
- self::$webpage_caching = false;
- }
- if ($this->isLoggedIn()) {
- self::$webpage_caching = false;
- }
- }
- if (self::$webpage_caching === true && ($html = __c()->get($this->webpage_id())) !== null) {
- $this->beforeCacheActions();
- exit($html);
- }
- $this->live_webpage = true;
- ob_start();
- if ($db_connection) {
- self::loadClass('NotORM', 'db');
- try {
- $this->pdo = $this->db_connect($db_info['dsn'], $db_info['user'], $db_info['pass'], array());
- } catch (Exception $e) {
- include dirname(__FILE__) . DS . 'db' . DS . 'error.php';
- exit();
- }
- $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
- $this->pdo->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
- $this->pdo_structure = new NotORM_Structure_Convention($primary = 'id', $foreign = '%s_id', $table = '%ss', $prefix = $db_info['prefix']);
- $this->db = new NotORM($this->pdo, $this->pdo_structure);
- }
- self::setStatic('db', $this->db);
- unset($db_info);
- if (defined('TEMP_OPT_HANDLER')) {
- $this->temp_opt_handler = TEMP_OPT_HANDLER;
- return null;
- }
- }
- } else {
- exit(header('Location: install'));
- }
- }
- public function __destruct()
- {
- if ($this->live_webpage && self::$webpage_caching) {
- $html = ob_get_contents();
- __c()->set($this->webpage_id(), $html, C_WEBPAGE_LIFETIME);
- $this->pdo = null;
- $this->db = null;
- }
- if (50400 <= PHP_VERSION_ID && PHP_SESSION_ACTIVE === session_status() || PHP_VERSION_ID < 50400 && isset($_SESSION) && session_id()) {
- session_write_close();
- }
- }
- public function webpage_id()
- {
- if ($this->webpage_id == null) {
- $id = 'wp_';
- $id .= basename($_SERVER['SCRIPT_FILENAME'], '.php') . '_';
- $id .= md5($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'] . $this->getAgentDeviceType() . $this->getUserid() . Detect::getOs($this->getUserAgent()) . Geo::getCurrentCountry());
- $this->webpage_id = $id;
- }
- return $this->webpage_id;
- }
- public function beforeCacheActions()
- {
- if (defined('IS_VIEW_PAGE') && defined('DIRECT_VIEWS')) {
- $id = (int) $_GET['id'];
- $stats_db = self::getStatsDBPath();
- if (self::check_user_agent('bot') == true) {
- self::updateStatsDBData($stats_db, $id, 'bot_views', '+1');
- ...........................................................................................
- ........................................................
- ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement