function checkLogin() { global $mainframe; DEFINE('GOTOSTARTPAGE_COOKIE', 'ap_gotostartpage'); DEFINE('LOGINPAGELOCATION_COOKIE', 'ap_loginpagelocation'); DEFINE('STARTPAGE_COOKIE', 'ap_startpage'); $gotostartpage = @$_COOKIE[GOTOSTARTPAGE_COOKIE]; if ($gotostartpage) { setcookie(GOTOSTARTPAGE_COOKIE, 0); $uri = JFactory::getURI(); $url = $uri->toString(); $loginpagelocation = @$_COOKIE[LOGINPAGELOCATION_COOKIE]; $loginpagelocationuri = new JURI($loginpagelocation); $query = $loginpagelocationuri->getQuery(); if ($query && strpos($query, 'com_login') === FALSE) { if ($loginpagelocation && $url != $loginpagelocation) { $mainframe->redirect($loginpagelocation); } } else { $startpage = @$_COOKIE[STARTPAGE_COOKIE]; if ($startpage && $url != $startpage) { $mainframe->redirect($startpage); } } } }
/** * Class constructor to create an instance, takes email and password as arguments * @param string $email Your google account email * @param string $password Your google account password */ public function __construct($email, $password) { $this->email = $email; $this->password = $password; date_default_timezone_set("Asia/Taipei"); DEFINE("DEFAULT_MAX_EVENTS", 10000); }
/** * Class constructor to create an instance, takes email and password as arguments * @param string $email Your google account email * @param string $password Your google account password */ function __construct($email, $password) { $this->email = $email; $this->password = $password; date_default_timezone_set("Europe/Stockholm"); DEFINE("DEFAULT_MAX_EVENTS", 25); }
public function RSS($db_connection, $type, $feed_link, $description) { DEFINE('LINK', $db_connection); $this->type = $type; $this->feed_link = $feed_link; $this->description = $description; }
function database_connect() { global $obj_db; // get calendar database if ($_SERVER["HTTP_HOST"] == 'localhost') { // local webserver on your computer, like XAMPP DEFINE('DBHOST', 'localhost'); DEFINE('DBUSER', 'root'); DEFINE('DBPASS', ''); DEFINE('DBNAAM', 'employee-work-schedule'); } else { // online use, so when you have the calendar on the online website DEFINE('DBHOST', 'localhost'); DEFINE('DBUSER', 'raman'); DEFINE('DBPASS', 'cPuXtGrNbnP5RTEJac'); DEFINE('DBNAAM', 'work_schedule'); } $obj_db = mysqli_connect(DBHOST, DBUSER, DBPASS, DBNAAM); if ($obj_db === FALSE) { $error = "Database connection failed"; printf("Connect failed: %s\n", mysqli_connect_error()); exit; } mysqli_set_charset($obj_db, 'utf8'); }
public static function persistencia($metodo) { if ($metodo == 'ARQUIVO') { DEFINE('PERSISTENCIA', 'Arquivo'); } else { DEFINE('PERSISTENCIA', 'BD'); } }
function veritrans_gateway_init() { if (!class_exists('WC_Payment_Gateway')) { return; } DEFINE('VT_PLUGIN_DIR', plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__)) . '/'); require_once dirname(__FILE__) . '/class/class.veritrans-gateway.php'; add_filter('woocommerce_payment_gateways', 'add_veritrans_payment_gateway'); }
public function __construct() { parent::__construct(); $this->load->library('encrypt'); //$this->_user_id = $this->session->userdata('user_id'); $this->load->model('home_model', 'home'); DEFINE("FacebookAppID", "1537187986495529"); DEFINE("FacebookAppSecret", '41b16d06e17a8171ba44da9d7c480402'); }
function onAfterInitialise() { $mainframe =& JFactory::getApplication(); // register our autoloader $this->_registerAutoloader(); require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef' . DS . 'sh404sef.class.php'; // for now we declare sefConfig as global, as this would break //too many 3rd party plugins if otherwise // TODO : update doc so that new plugins use new method to get config global $sefConfig; $sefConfig =& shRouter::shGetConfig(); if (!$mainframe->isAdmin() && $sefConfig->shSecEnableSecurity) { require_once JPATH_ROOT . DS . 'components' . DS . 'com_sh404sef' . DS . 'shSec.php'; // do security checks shDoSecurityChecks(); shCleanUpSecLogFiles(); // see setting in class file for clean up frequency } if (!$sefConfig->Enabled) { // go away if not enabled return; } DEFINE('SH404SEF_IS_RUNNING', 1); if (!$mainframe->isAdmin()) { // setup our JPagination replacement, so as to bring // back # of items per page in the url, in order // to properly calculate pagination // will only work if php > 5, so test for that if (version_compare(phpversion(), '5.0') >= 0) { // this register the old file, but do not load it if PHP5 // will prevent further calls to the same jimport() // to actually do anything, because the 'joomla.html.pagination' key // is now registered statically in Jloader::import() jimport('joomla.html.pagination'); // now we can register our own path JLoader::register('JPagination', JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef' . DS . 'pagination.php'); } // include more sh404SEF stuff require_once JPATH_ROOT . DS . 'components' . DS . 'com_sh404sef' . DS . 'shCache.php'; // override router class with our : $previousRouter =& $mainframe->getRouter(); // create an instance of our class $shRouter = new shRouter(); // store the previous router $shRouter->jRouter = clone $previousRouter; // make sure the cloned Joomla router is activated $shRouter->jRouter->setMode(JROUTER_MODE_SEF); // then override $previousRouter = $shRouter; // load plugins, as per configuration $this->_loadPlugins($type = 'sh404sefcore'); // start decoding URL + decide possible redirects include JPATH_ROOT . DS . 'components' . DS . 'com_sh404sef' . DS . 'shInit.php'; } }
public function RSS() { require 'database.php'; DEFINE('DB_USER', $_username); DEFINE('DB_PASSWORD', $_password); DEFINE('DB_HOST', $_host); DEFINE('DB_NAME', $_db); // Make the connnection and then select the database. $dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Could not connect to MySQL: ' . mysql_error()); mysql_select_db(DB_NAME) or die('Could not select the database: ' . mysql_error()); }
/** * Constructor */ function __construct($config = array()) { $db = JFactory::getDBO(); $sql = " SELECT COUNT(id) as count " . " FROM #__clm_liga " . " WHERE sl = " . clm_core::$access->getJid() . " AND rang <> 0"; $db->setQuery($sql); $count_sl = $db->loadObjectList(); DEFINE('CLM_sl_count', $count_sl[0]->count); parent::__construct($config); // Register Extra tasks $this->registerTask('add', 'edit'); $this->registerTask('apply', 'save'); $this->registerTask('unpublish', 'publish'); }
public function __construct($data = null, $id = null, $width = 600, $height = 400) { if (!self::Installed()) { throw new Exception('JPGraph isn\'t installed. Call EGSGantt::Installed() before instantiating!'); } if (!defined('TTF_DIR')) { DEFINE('TTF_DIR', '/usr/share/fonts/truetype/msttcorefonts/'); } require_once APP_ROOT . 'plugins/jpgraph/jpgraph.php'; if ($id == null) { $id = time(); } $this->id = $id; }
function jr_mt_wp_get_themes_fix() { DEFINE('JR_MT_WP_GET_THEMES_WORKS', TRUE); /* Force the next request for Stylesheet or Template to process the Theme Selection logic, even if previous requests have cached the Theme. */ unset($GLOBALS['jr_mt_theme']); if (is_admin()) { global $jr_mt_all_themes_cache; $jr_mt_all_themes_cache = wp_get_themes(); update_option('jr_mt_all_themes', $jr_mt_all_themes_cache); } }
/** * * Method to authenticate the user via the database * @param string $username The username supplied in the login * @param string $password The password supplied in the login * @return TRUE|FALSE Boolean indication of success of login */ public function authenticate($username, $password, $remember = true) { $login = $this->objLu->login($username, $password, $remember); if (!$login) { // check if user is inactive if ($this->objLu->isInactive()) { throw new customException("User is inactive, please contact site admin"); } else { return FALSE; } } //Retrieve the users data from the database $line = $this->getUserDataAsArray($username); // set the line as a stdClass, serialize and store in session to lower db calls $user = new stdClass(); // add the user info to the class $user->username = $line['username']; $user->userid = $line['userid']; $user->title = $line['title']; $user->firstname = $line['firstname']; $user->surname = $line['surname']; $user->pass = NULL; $user->creationdate = $line['creationdate']; $user->emailaddress = $line['emailaddress']; $user->logins = $line['logins']; $user->isactive = $line['isactive']; // serialize the object to preserve structure etc $user = serialize($user); // set it into session to be used elsewhere (objUser mainly) $this->setSession('userprincipal', $user); if ($line) { if ($line['isactive'] == '0') { DEFINE('STATUS', 'inactive'); return FALSE; } //LDAP will be handled in chain-of-command if ($line['pass'] == sha1('--LDAP--')) { return FALSE; } else { $password = sha1(trim($password)); // if the login was successful if ($this->objLu->isloggedIn() == TRUE) { //if ( strtolower($line['pass'])==strtolower($password) ) { $this->_record = $line; return TRUE; } } } return FALSE; }
public function __construct(Request $request) { $segments = $request->segments(); $locales = LaravelLocalization::getSupportedLanguagesKeys(); $non_locale_route = ''; $lang = App::getLocale(); foreach ($segments as $segment) { if (!in_array($segment, $locales)) { $non_locale_route .= '/' . $segment; } } DEFINED('NON_LOCALE_ROUTE') or DEFINE('NON_LOCALE_ROUTE', trim($non_locale_route, '/')); DEFINED('LANG') or DEFINE('LANG', $lang); }
function woocommerce_paybox_init() { if (class_exists('WC_Payment_Gateway')) { include_once plugin_dir_path(__FILE__) . 'woocommerce_paybox_gateway.class.php'; include_once plugin_dir_path(__FILE__) . 'shortcode_woocommerce_paybox_gateway.php'; } else { exit; } DEFINE('PLUGIN_DIR', plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))); DEFINE('VERSION', '1.0.1'); DEFINE('THANKS_SHORTCODE', 'woocommerce_paybox_gateway_thanks'); add_shortcode(THANKS_SHORTCODE, 'WC_Shortcode_Paybox_Thankyou::get'); add_filter('woocommerce_payment_gateways', 'add_paybox_commerce_gateway'); add_action('init', 'woocommerce_paybox_check_response'); }
/** * Define the settings * * Everything to be stored and/or can be set by the user * */ function jr_mt_admin_init() { $settings = get_option('jr_mt_settings'); foreach (array('query', 'url', 'url_prefix', 'url_asterisk') as $key) { if (!empty($settings[$key])) { DEFINE('JR_MT_LIST_SETTINGS', TRUE); break; } } if (defined('JR_MT_LIST_SETTINGS')) { add_settings_section('jr_mt_delete_settings_section', 'Current Theme Selection Entries', 'jr_mt_delete_settings_expl', 'jr_mt_settings_page'); add_settings_field('del_entry', 'Theme Selection Entries:', 'jr_mt_echo_delete_entry', 'jr_mt_settings_page', 'jr_mt_delete_settings_section'); } add_settings_section('jr_mt_site_home_section', '<input name="jr_mt_settings[tab1]" type="submit" value="Save All Changes" class="button-primary" /></h3><h3>Site Home', 'jr_mt_site_home_expl', 'jr_mt_settings_page'); add_settings_field('site_home', 'Select Theme for Site Home<br /><code>' . JR_MT_HOME_URL . '</code>', 'jr_mt_echo_site_home', 'jr_mt_settings_page', 'jr_mt_site_home_section'); add_settings_section('jr_mt_single_settings_section', 'For An Individual Page, Post or other non-Admin page;<br />or a group of pages, specified by URL Prefix, optionally with Asterisk(s)', 'jr_mt_single_settings_expl', 'jr_mt_settings_page'); add_settings_field('add_is_prefix', 'Select here if URL is a Prefix', 'jr_mt_echo_add_is_prefix', 'jr_mt_settings_page', 'jr_mt_single_settings_section'); add_settings_field('add_theme', 'Theme', 'jr_mt_echo_add_theme', 'jr_mt_settings_page', 'jr_mt_single_settings_section'); add_settings_field('add_path_id', 'URL of Page, Post, Prefix or other', 'jr_mt_echo_add_path_id', 'jr_mt_settings_page', 'jr_mt_single_settings_section'); add_settings_section('jr_mt_querykw_section', 'For A Query Keyword on any Page, Post or other non-Admin page', 'jr_mt_querykw_expl', 'jr_mt_settings_page'); add_settings_field('add_querykw_theme', 'Theme', 'jr_mt_echo_add_querykw_theme', 'jr_mt_settings_page', 'jr_mt_querykw_section'); add_settings_field('add_querykw_keyword', 'Query Keyword', 'jr_mt_echo_add_querykw_keyword', 'jr_mt_settings_page', 'jr_mt_querykw_section'); add_settings_section('jr_mt_query_section', 'For A Query Keyword=Value on any Page, Post or other non-Admin page', 'jr_mt_query_expl', 'jr_mt_settings_page'); add_settings_field('add_query_theme', 'Theme', 'jr_mt_echo_add_query_theme', 'jr_mt_settings_page', 'jr_mt_query_section'); add_settings_field('add_query_keyword', 'Query Keyword', 'jr_mt_echo_add_query_keyword', 'jr_mt_settings_page', 'jr_mt_query_section'); add_settings_field('add_query_value', 'Query Value', 'jr_mt_echo_add_query_value', 'jr_mt_settings_page', 'jr_mt_query_section'); add_settings_section('jr_mt_aliases_section', '<input name="jr_mt_settings[tab1]" type="submit" value="Save All Changes" class="button-primary" /></h3></div><div id="jr-mt-settings2" style="display: none;"><h3>Site Aliases used in URLs to Access This WordPress Site', 'jr_mt_aliases_expl', 'jr_mt_settings_page'); /* There is always an entry for the Site URL ("Home"). */ if (count($settings['aliases']) > 1) { add_settings_section('jr_mt_delete_aliases_section', 'Current Site Alias Entries', 'jr_mt_delete_aliases_expl', 'jr_mt_settings_page'); add_settings_field('del_alias_entry', 'Site Alias Entries:', 'jr_mt_echo_delete_alias_entry', 'jr_mt_settings_page', 'jr_mt_delete_aliases_section'); } add_settings_section('jr_mt_create_alias_section', 'Create New Site Alias Entry', 'jr_mt_create_alias_expl', 'jr_mt_settings_page'); add_settings_field('add_alias', 'Site Alias', 'jr_mt_echo_add_alias', 'jr_mt_settings_page', 'jr_mt_create_alias_section'); add_settings_section('jr_mt_sticky_section', '<input name="jr_mt_settings[tab2]" type="submit" value="Save All Changes" class="button-primary" /></h3></div><div id="jr-mt-settings3" style="display: none;"><h3>Advanced Settings</h3><p><b>Warning:</b> As the name of this section implies, Advanced Settings should be fully understood or they may surprise you with unintended consequences, so please be careful.</p><h3>Sticky and Override', 'jr_mt_sticky_expl', 'jr_mt_settings_page'); add_settings_field('query_present', 'When to add Sticky Query to a URL', 'jr_mt_echo_query_present', 'jr_mt_settings_page', 'jr_mt_sticky_section'); add_settings_field('sticky_query', 'Keyword=Value Entries:', 'jr_mt_echo_sticky_query_entry', 'jr_mt_settings_page', 'jr_mt_sticky_section'); add_settings_section('jr_mt_everything_section', 'Theme for Everything', 'jr_mt_everything_expl', 'jr_mt_settings_page'); add_settings_field('current', 'Select Theme for Everything, to Override WordPress Current Theme (<b>' . wp_get_theme()->Name . '</b>)', 'jr_mt_echo_current', 'jr_mt_settings_page', 'jr_mt_everything_section'); add_settings_section('jr_mt_all_settings_section', 'For All Pages and/or All Posts', 'jr_mt_all_settings_expl', 'jr_mt_settings_page'); $suffix = array('Pages' => '<br />(Pages created with Add Page)', 'Posts' => ''); foreach (array('Pages', 'Posts') as $thing) { add_settings_field('all_' . jr_mt_strtolower($thing), "Select Theme for All {$thing}" . $suffix[$thing], 'jr_mt_echo_all_things', 'jr_mt_settings_page', 'jr_mt_all_settings_section', array('thing' => $thing)); } add_settings_section('jr_mt_ajax_section', 'AJAX', 'jr_mt_ajax_expl', 'jr_mt_settings_page'); add_settings_field('ajax_all', 'Theme for <code>admin-ajax.php</code>', 'jr_mt_echo_ajax_all', 'jr_mt_settings_page', 'jr_mt_ajax_section'); }
function __construct() { global $wpdb; DEFINE('tbl_data', true); // назва файла плагіна $this->plugin_name = plugin_basename(__FILE__); // URL адреса плагіна $this->plugin_url = trailingslashit(WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__))); // Таблиця бази даних $this->tbl_data = $wpdb->prefix . 'cms2cms_test'; //функція для активації плагіна register_activation_hook($this->plugin_name, array(&$this, 'activate')); //функція для деактивації плагіна register_deactivation_hook($this->plugin_name, array(&$this, 'deactivate')); add_action('admin_menu', array(&$this, 'admin_generate_menu')); }
function loadGlobalVars() { //ONLY ONE BOOK CAN BE DISPLAYED ON PAGE if (defined("FB_BOOK_DISPLAYED")) { return; } DEFINE("_FB_ITEMID", JRequest::getVar('Itemid', '', 'get', 'int')); $db =& JFactory::getDBO(); $query = "SELECT name, value FROM #__flippingbook_config"; $db->setQuery($query); $rows = $db->loadObjectList(); foreach ($rows as $row) { $row->value = urldecode($row->value); eval('DEFINE("FB_' . $row->name . '", "' . $row->value . '");'); } }
public function initFramework() { if ($this->_hasBeenInit == true) { return; } $this->_hasBeenInit = true; krsort($this->_registeredVersions); $this->_latestRegistered = end($this->_registeredVersions); DEFINE('FF_FRAMEWORK_DIR', $this->_latestRegistered['frameworkDir']); DEFINE('FF_FRAMEWORK_URL', $this->_latestRegistered['frameworkUrl']); if (!empty($this->_installedVersions)) { krsort($this->_installedVersions); $this->_latestInstalled = end($this->_installedVersions); } DEFINE('FF_FRAMEWORK_IS_INSTALLED', $this->_latestRegistered['isInstalled']); require_once $this->_latestRegistered['bootstrapPath']; }
function jr_mt_wp_loaded() { /* Purpose of this hook is to output any required Cookie before it is too late (after the <html> or any other HTML is generated). There is no performance impact because this effectively pre-caches values for use later. This timing is also used to enqueue JavaScript related to the Sticky feature. */ global $jr_mt_theme; if (!isset($jr_mt_theme)) { $settings = get_option('jr_mt_settings'); if (!empty($settings['remember']['query'])) { jr_mt_template(); } } DEFINE('JR_MT_TOO_LATE_FOR_COOKIES', TRUE); }
function woocommerce_paybox_init() { if (class_exists('WC_Payment_Gateway')) { include_once plugin_dir_path(__FILE__) . 'woocommerce_paybox_gateway.class.php'; include_once plugin_dir_path(__FILE__) . 'shortcode_woocommerce_paybox_gateway.php'; } else { exit; } DEFINE('PLUGIN_DIR', plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))); DEFINE('OB_VERSION', '0.4.7'); DEFINE('THANKS_SHORTCODE', 'woocommerce_paybox_gateway_thanks'); DEFINE('TEXT_DOMAIN', 'openboutique_paybox_gateway'); // Chargement des traductions load_plugin_textdomain(TEXT_DOMAIN, false, dirname(plugin_basename(__FILE__)) . '/languages/'); add_shortcode(THANKS_SHORTCODE, 'WC_Shortcode_Paybox_Thankyou::get'); add_filter('woocommerce_payment_gateways', 'add_paybox_commerce_gateway'); add_action('init', 'woocommerce_paybox_check_response'); }
public function __construct(Request $request) { $segments = $request->segments(); $locales = LaravelLocalization::getSupportedLanguagesKeys(); $non_locale_route = ''; $lang = App::getLocale(); foreach ($segments as $segment) { if (!in_array($segment, $locales)) { $non_locale_route .= '/' . $segment; } } DEFINED('NON_LOCALE_ROUTE') or DEFINE('NON_LOCALE_ROUTE', trim($non_locale_route, '/')); DEFINED('LANG') or DEFINE('LANG', $lang); $categories[1] = ProductCategory::getByBrand(5); $categories[2] = ProductCategory::getByBrand(6); $categories[3] = ProductCategory::getByBrand(7); $this->categories = $categories; }
function database_connect() { global $obj_db; // get calendar database DEFINE('DBHOST', 'localhost'); DEFINE('DBUSER', 'admin'); DEFINE('DBPASS', 'austin67'); DEFINE('DBNAAM', 'test'); DEFINE('GROUPXEVENTS', 'trilakes_groupxroom_events'); DEFINE('ROOM_STATS', 'trilakes_groupxroom_usage_stats'); $obj_db = mysqli_connect(DBHOST, DBUSER, DBPASS, DBNAAM); if ($obj_db === FALSE) { $error = "Database connection failed"; printf("Connect failed: %s\n", mysqli_connect_error()); exit; } mysqli_set_charset($obj_db, 'utf8'); }
static function _low_profile_settings() { // INIT $time_limit = isset(self::$time_limit) ? self::$time_limit : 5; $memory_limit = isset(self::$memory_limit) ? self::$memory_limit : "150M"; $timezone = isset(self::$timezone) ? self::$timezone : "America/Mexico_City"; // DEBUGGING if (self::$debug) { // E_ALL ^ E_NOTICE error_reporting(E_ALL); } else { error_reporting(0); } // PROC set_time_limit($time_limit); ini_set("memory_limit", $memory_limit); date_default_timezone_set($timezone); setlocale(LC_TIME, 'spanish'); // Separador de directorios DEFINE('DS', DIRECTORY_SEPARATOR); DEFINE('HTML_EOL', '<br/>'); }
public function executeBarGraph() { //Set the response header to a image JPEG datastream $this->getResponse()->setContent('image/jpeg'); // Change this defines to where Your fonts are stored DEFINE("TTF_DIR", "/usr/share/fonts/truetype/freefont/"); // Change this define to a font file that You know that You have DEFINE("TTF_SANS", "FreeSans.ttf"); $util = new util(); $dataDVDrip = $util->getTotalFormat('DVDrip', 'movies'); $dataHDrip = $util->getTotalFormat('HDrip', 'movies'); $data720p = $util->getTotalFormat('720p', 'movies'); $data1080p = $util->getTotalFormat('1080p', 'movies'); $datay = array($dataDVDrip, $dataHDrip, $data720p, $data1080p); $graph = new Graph(199, 145); $graph->SetScale('textlin'); $graph->SetColor('black'); $graph->SetMarginColor('#393939'); $graph->SetFrame(true, '#393939'); $top = 25; $bottom = 20; $left = 50; $right = 20; $graph->Set90AndMargin($left, $right, $top, $bottom); // Setup labels $lbl = array("DVDrip", "HDrip", "720p", "1080p"); $graph->xaxis->SetTickLabels($lbl); $graph->xaxis->SetColor('white'); $graph->xaxis->SetLabelAlign('right', 'center', 'right'); $graph->yaxis->SetLabelAlign('center', 'bottom'); $graph->yaxis->SetColor('white'); // Create a bar pot $bplot = new BarPlot($datay); $bplot->SetWidth(0.5); $bplot->SetFillGradient(array(250, 2, 2), array(109, 2, 2), GRAD_VERT); $graph->Add($bplot); $graph->Stroke(); return sfView::NONE; }
public final function __initSystem() { // load system file autoloader for smoother development __log("Firing up application " . get_class($this)); // check to see if file exists if (file_exists(PATH_SYSTEM . DS . "system.autoloader.php")) { __log("LOADING SYSTEM autoloader"); include PATH_SYSTEM . DS . "system.autoloader.php"; // $this->__initAutoload(); // load init autoload classes } else { // throw a fatal exception - autoloader is required throw new Exception("Unable to locate system file auto loader"); } // check to see if application path exists if (method_exists($this, "__path")) { if (!is_dir($this->__path())) { throw new Exception("__path method must return project directory"); } DEFINE('APPLICATION_PATH', $this->__path()); } else { throw new Exception("__path method must exists in application class"); } if (!is_subclass_of($this, __CLASS__)) { throw new Exception("Application must be subclass of " . __CLASS__); } // check modules $this->_loadModules(); if (method_exists($this, "__init")) { __log("Application Init"); // initialize application $this->__init(); } foreach ($this->_modules as $module) { if (method_exists($module, '__index')) { $module->__index(); } } }
DEFINE("BRAND_TIME_FORMAT", "(%01.3fs)"); //------------------------------------------------------------------------ // The following constants should rarely have to be changed ! //------------------------------------------------------------------------ // What group should the cached file belong to // (Set to "" will give the default group for the "PHP-user") // Please note that the Apache user must be a member of the // specified group since otherwise it is impossible for Apache // to set the specified group. DEFINE("CACHE_FILE_GROUP", "wwwadmin"); // What permissions should the cached file have // (Set to "" will give the default persmissions for the "PHP-user") DEFINE("CACHE_FILE_MOD", 0664); // Decide if we should use the bresenham circle algorithm or the // built in Arc(). Bresenham gives better visual apperance of circles // but is more CPU intensive and slower then the built in Arc() function // in GD. Turned off by default for speed DEFINE("USE_BRESENHAM", false); // Special file name to indicate that we only want to calc // the image map in the call to Graph::Stroke() used // internally from the GetHTMLCSIM() method. DEFINE("_CSIM_SPECIALFILE", "_csim_special_"); // HTTP GET argument that is used with image map // to indicate to the script to just generate the image // and not the full CSIM HTML page. DEFINE("_CSIM_DISPLAY", "_jpg_csimd"); // Special filename for Graph::Stroke(). If this filename is given // then the image will NOT be streamed to browser of file. Instead the // Stroke call will return the handler for the created GD image. DEFINE("_IMG_HANDLER", "__handle");
$res &= @chmod($dirs[$i], 0777); if (!$res) { JpGraphError::Raise(" Can't set permissions for {$aFile}. Permission problems?"); } } } return true; } } // CLASS Cache //=================================================== // CLASS Legend // Description: Responsible for drawing the box containing // all the legend text for the graph //=================================================== DEFINE('_DEFAULT_LPM_SIZE', 8); class Legend { var $color = array(0, 0, 0); // Default fram color var $fill_color = array(235, 235, 235); // Default fill color var $shadow = true; // Shadow around legend "box" var $shadow_color = 'gray'; var $txtcol = array(); var $mark_abs_size = _DEFAULT_LPM_SIZE; var $xmargin = 5, $ymargin = 3, $shadow_width = 2; var $xlmargin = 2, $ylmargin = ''; var $xpos = 0.05, $ypos = 0.15, $xabspos = -1, $yabspos = -1; var $halign = "right", $valign = "top";
DEFINE('_EW_MENU_AVAILABLE_IN_PRO_CLICK_AREAS', "With Click Areas monitoring you can track clicks on buttons, links and improve the click rate"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_SEO_REPORT', "Position of your web links on search engines"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_USERS', "User Activity monitoring"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_FLOW', "Interactive chart with internal traffic distribution"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_DOWNLOADS', "See charts of downloads of zip, pdf or other downloadable artifacts"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_STATUS', "Database table sizes monitoring"); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_COMPONENTS', "Directories size monitoring"); DEFINE('_EW_ADMINHEADER_SEARCH_RANK', "Search Rank"); DEFINE('_EW_DOWNLOADS_START_ADD_EXT', "No download statistics currently recorded. Start monitoring file downloads and"); DEFINE('_EW_NAVIGATION_VISITORS', 'Current Visitors'); DEFINE('_EW_NAVIGATION_LOCATION', 'Location'); DEFINE('_EW_NAVIGATION_BLOCKING', 'Blocking'); DEFINE('_EW_NAVIGATION_CLICKS', 'Clicks'); DEFINE('_EW_NAVIGATION_STATISTICS', 'Statistics'); DEFINE('_EW_MENU_AVAILABLE_IN_PRO_LOCATION', 'Location on a map'); DEFINE('_EW_BADGE_VISITORS', "Number of unique visitors for current day"); DEFINE('_EW_BADGE_HEATMAP', "Number of heatmap clicks for current day"); DEFINE('_EW_BADGE_LOCATION', "Number of countries from which was your website visited today"); DEFINE('_EW_BADGE_CLICKS', "Number of clicks on elements for current day"); DEFINE('_EW_BADGE_USERS', "Number of registered users today"); DEFINE('_EW_BADGE_SEO', "Number of keywords by which was your website found for today"); DEFINE('_EW_BADGE_DOWNLOAD', "Number of downloads of files for today"); DEFINE('_EW_BADGE_STATS', "Number of unique visits today"); DEFINE('_EW_BADGE_ANTISPAM', "Number of blocked spam attempts"); DEFINE('_EW_AVAILABLE_IN_FULL_VERSION', 'This feature is available in full version only'); DEFINE('_EW_GET_FULL_VERSION', "Get the full version of ExtraWatch PRO"); DEFINE('_EW_LIVE_STATS_SESSION_TIME', 'Time difference since user first visited your website'); DEFINE('_EW_DOWNLOAD_MONITOR_HTACCESS_TXT', 'Warning - please change: htaccess.txt is present in your joomla root folder, please rename it to .htaccess first and make sure there is no htaccess.txt file anymore !'); DEFINE('_EW_AGENT_NOT_PUBLISHED', "Agent module which gathers data is not published on frontend! - How to fix it?<br/><br/>\n<u>Joomla:</u><br/>\n1. Go to Extensions -> Module Manager -> find Agent module<br/>\n2. Change Position to some other value (choose some for which you already see some module in frontend - like 'footer'<br/>\n3. Save and refresh extrawatch back-end dashboard again<br/><br/>\n\n<u>Wordpress:</u><br/>\n1. Go to Apperance -> Widgets<br/>\n2. Drag and Drop ExtraWatch agent do placeholder on right to widget that it's already visible in frontend<br/>\n"); DEFINE('_EW_USER_NO_LONGER_EXISTS', "<i>User with id %d no longer exists</i>");