Inheritance: extends ApplicationObject
Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     if (!check_hash_key() && $GLOBALS['action'] == 'send_mobile_verify_code') {
         showErr("非法请求!", 1);
     }
 }
Exemplo n.º 2
0
 public function init()
 {
     // import the module-level components
     $this->setImport(array('PatientTicketing.components.*'));
     \Yii::app()->authManager->registerRuleset('PatientTicketing', new components\PatientTicketing_AuthRules());
     parent::init();
 }
Exemplo n.º 3
0
 public function __construct()
 {
     $this->_SetHandler('GraphingModule', 'Generate');
     $this->_SetMetaInformation('table_name', 'NONE');
     // Call parent constructor
     parent::__construct();
 }
Exemplo n.º 4
0
 public function detail($targetid)
 {
     $this->targetid = $targetid;
     $sparams2 = array('id' => $this->targetid, 'module' => $this->module, 'customerid' => $_SESSION["loggeduser"]['id'], 'sessionid' => $_SESSION["loggeduser"]['sessionid']);
     $lmod2 = $GLOBALS["sclient"]->call('get_project_tickets', $sparams2);
     if (isset($lmod2) && count($lmod2) > 0 && $lmod2 != "") {
         $data['relatedticketlist'] = $lmod2[1][$this->module]['data'];
         $data['relatedtickettableheader'] = $lmod2[0][$this->module]['head'][0];
     }
     $sparams3 = array('id' => $this->targetid, 'block' => "ProjectTask", 'contactid' => $_SESSION["loggeduser"]['id'], 'sessionid' => $_SESSION["loggeduser"]['sessionid']);
     $lmod3 = $GLOBALS["sclient"]->call('get_project_components', $sparams3);
     if (isset($lmod3) && count($lmod3) > 0 && $lmod3 != "") {
         $data['relatedtaskslist'] = $lmod3[1]['ProjectTask']['data'];
         $data['relatedtaskstableheader'] = $lmod3[0]['ProjectTask']['head'][0];
     }
     $sparams4 = array('id' => $this->targetid, 'block' => "ProjectMilestone", 'contactid' => $_SESSION["loggeduser"]['id'], 'sessionid' => $_SESSION["loggeduser"]['sessionid']);
     $lmod4 = $GLOBALS["sclient"]->call('get_project_components', $sparams4);
     if (isset($lmod4) && count($lmod4) > 0 && $lmod4 != "") {
         $data['relatedmilestoneslist'] = $lmod4[1]['ProjectMilestone']['data'];
         $data['relatedmilestonestableheader'] = $lmod4[0]['ProjectMilestone']['head'][0];
     }
     $data['recordinfo'] = parent::detail($this->targetid, false);
     $data['recordid'] = $this->targetid;
     Template::display($this->module, $data, 'detail');
 }
 public function __construct()
 {
     parent::__construct();
     if (!check_hash_key()) {
         showErr("非法请求!", 1);
     }
 }
Exemplo n.º 6
0
 public function __construct()
 {
     // __("Work Lists")
     // Add main menu notification handlers
     $this->_SetHandler('MainMenu', 'notify');
     /*
     // Form proper configuration information
     $this->_SetMetaInformation('global_config_vars', array(
     	'worklist_enabled',
     	'worklist_providers'
     ));
     $this->_SetMetaInformation('global_config', array(
     	__("Show Work Lists") =>
     	'html_form::select_widget ( '.
     	'"worklist_enabled", '.
     	'array ('.
     		__("enabled").' => 1, '.
     		__("disabled").' => 0, '.
     	' ) ) ',
     	__("Work List Providers") =>
     	'freemed::multiple_choice ( '.
     		'"SELECT phylname, phyfname, id '.
     		'FROM physician WHERE phyref=\'no\' '.
     		'ORDER BY phylname, phyfname", '.
     		'"##phylname##, ##phyfname##", '.
     		'"worklist_providers", fm_join_from_array($worklist_providers), '.
     		'false )'
     	)
     );
     */
     // Call parent constructor
     parent::__construct();
 }
Exemplo n.º 7
0
 public function beforeControllerAction($controller, $action)
 {
     if (parent::beforeControllerAction($controller, $action)) {
         // this method is called before any module controller action is performed
         // you may place customized code here
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 8
0
 public function __construct()
 {
     // __("CD/RW Backup")
     // Set administration handler
     $this->_SetHandler('AdminMenu', 'menu');
     // Form proper configuration information
     $this->_SetMetaInformation('global_config_vars', array('cdrw_device', 'cdrw_driver', 'cdrw_speed'));
     $this->_SetMetaInformation('global_config', array(__("CD Recorder Device") => 'html_form::select_widget("cdrw_device", ' . 'module_function ( "CDRWBackup", ' . '"device_list" ) )', __("CD Recorder Driver") => 'html_form::select_widget("cdrw_driver", ' . 'module_function ( "CDRWBackup", ' . '"driver_list" ) )', __("CD Recorder Max Speed") => 'html_form::select_widget("cdrw_speed", ' . 'array ( ' . '"1x" => "1",' . '"2x" => "2",' . '"4x" => "4",' . '"8x" => "8",' . '"12x" => "12",' . '"16x" => "16",' . '"24x" => "24",' . '"32x" => "32",' . '"40x" => "40",' . '"48x" => "48",' . '"52x" => "52"' . ') )'));
     // Call parent constructor
     parent::__construct();
 }
Exemplo n.º 9
0
 /**
  * чтобы закешировать ноду юзера, нужно чтобы этот юзер не был авторизован
  * авторизованных юзеров хранить в кеше не будем
  */
 function checkCacheSettings()
 {
     global $current_user;
     if (parent::checkCacheSettings()) {
         if ($current_user->authorized) {
             // отключаем кеширование
             parent::disableCaching();
             return false;
         }
     }
     // вполне можно покешировать пустую ноду
     return true;
 }
Exemplo n.º 10
0
 public function __construct()
 {
     // __("Updates")
     // Add main menu notification handlers
     $this->_SetHandler('MenuNotifyItems', 'menu_notify');
     $this->_SetHandler('MainMenu', 'notify');
     $this->_SetHandler('Utilities', 'menu');
     $this->_SetMetaInformation('UtilityName', __("Updates"));
     $this->_SetMetaInformation('UtilityDescription', __("Update and security feeds menu."));
     // Form proper configuration information
     $this->_SetMetaInformation('global_config_vars', array('update_user', 'update_pass'));
     $this->_SetMetaInformation('global_config', array(__("Updates Username") => 'html_form::text_widget ( "update_user" ) ', __("Updates Password") => 'html_form::password_widget ( "update_pass" ) '));
     // Call parent constructor
     parent::__construct();
 }
Exemplo n.º 11
0
 public function filter()
 {
     global $match, $router;
     include parent::view();
 }
Exemplo n.º 12
0
 public function filter()
 {
     global $match;
     include_once parent::view();
 }
Exemplo n.º 13
0
 public static function start()
 {
     global $avmod, $modulesNames, $targetmodule;
     $targetmoduleacces = true;
     $targetmodule = $_REQUEST['module'];
     $targetaction = $_REQUEST['action'];
     //Get a list of available module for this user
     $params = array($_SESSION["loggeduser"]['id']);
     $avmod = $GLOBALS["sclient"]->call('get_modules', $params);
     //echo '<h2>response</h2><pre>' . htmlspecialchars($GLOBALS["sclient"]->response, ENT_QUOTES) . '</pre>';
     //if no target module specified set HelpDesk as the default index module
     if (!isset($targetmodule) || $targetmodule == "") {
         $targetmodule = "HelpDesk";
     }
     //if a download for a file is requested call the function to retrieve the desired file
     if (isset($_REQUEST['downloadfile']) && $_REQUEST['downloadfile'] === "true") {
         User::download_file();
     }
     //Check if the requested module is Available
     foreach ($avmod as $key => $value) {
         if ($targetmodule == $value['name']) {
             $targetmoduleacces = false;
         }
         $modulesNames[$value['name']] = $value['translated_name'];
     }
     if ($targetmoduleacces && $targetmodule != 'Home') {
         $targetmodule = "HelpDesk";
         //die("Not Autorized!");
     }
     //Require the base module class
     require_once "modules/Module/index.php";
     //if isset a specific file and a specific class for the requested module include the extended class and create the object
     if (file_exists("modules/" . $targetmodule . "/index.php")) {
         require_once "modules/" . $targetmodule . "/index.php";
     }
     if (class_exists($targetmodule)) {
         $mod = new $targetmodule();
     } else {
         $mod = new BaseModule($targetmodule);
     }
     //if is pesent a target id show the corrispondent entity else show a list of entities for the target module
     if (isset($_REQUEST['id'])) {
         $mod->detail($_REQUEST['id']);
     } else {
         if (isset($_REQUEST['productid'])) {
             $mod->detail($_REQUEST['productid']);
         } else {
             if (isset($_REQUEST['faqid'])) {
                 $mod->detail($_REQUEST['faqid']);
             } else {
                 if ($targetmodule == "HelpDesk" && $targetaction == "new") {
                     $mod->create_new();
                 } else {
                     $mod->get_list();
                 }
             }
         }
     }
     //if there is a request for change password call the modal again and show the request resault
     if (isset($GLOBALS["opresult"]) && $GLOBALS["opresult"] != "") {
         echo "<script> \$(function(){ \$('#changePassModal').modal('show'); })</script>";
     }
 }
Exemplo n.º 14
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Exemplo n.º 15
0
 public function __construct()
 {
     // Store the rpc map in the meta information
     $this->_SetMetaInformation('rpc_field_map', $this->rpc_field_map);
     $this->_SetMetaInformation('distinct_fields', $this->distinct_fields);
     $this->_SetMetaInformation('table_name', $this->table_name);
     if (!$this->MODULE_HIDDEN) {
         $this->_SetAssociation('SupportModule');
     }
     // Call parent constructor
     parent::__construct();
 }
Exemplo n.º 16
0
 public function __construct()
 {
     parent::__construct();
     $GLOBALS['tmpl']->assign("max_size", get_max_file_size());
 }
Exemplo n.º 17
0
require_once "module/classes/BaseModule.class.php";
require_once "module/classes/DB.class.php";
require_once "module/classes/URI.class.php";
require_once "module/classes/Mail.class.php";
require_once "module/classes/Filter.class.php";
require_once "module/classes/SQL.class.php";
require_once "module/classes/reCaptha.class.php";
require_once "module/classes/Error.class.php";
require_once "module/classes/Auth.class.php";
require_once "module/classes/SMSC.class.php";
require_once "module/classes/Online.class.php";
$plugin = glob("module/classes/frontend/*.php");
foreach ($plugin as $name) {
    include $name;
}
$oBaseModule = new BaseModule();
/*
$user = file("user.txt");
$products = DB::query_array("SELECT * FROM `product_tb` ");
$currency = DB::query_array("SELECT * FROM `currency_tb` ");
$date = date("Y-m-d", time()-60*60*24*30);
for ($i = 0; $i <= 30; $i++){
	$now = date("Y-m-d ".rand(0,23).":".rand(0,59).":s", strtotime($date)+60*60*24*$i+3600*rand(0,10));
	$users = DB::query_array("SELECT * FROM `user_tb` ");
	
	for ($z = 0;$z< rand(6000, 12000);$z++){		
		$rand = rand(0, count($users)-1);
		$user_id = $users[$rand]['id'];
		$ref_id = $users[$rand]['ref_id'];
		
		$product_id = $products[rand(0, count($products)-1)]['id'];
Exemplo n.º 18
0
 public function __construct()
 {
     // call parent constructor
     parent::__construct();
 }
Exemplo n.º 19
0
require_once "module/classes/BaseModule.class.php";
require_once "module/classes/web/Table.class.php";
require_once "module/classes/web/Form.class.php";
require_once "module/classes/web/ConstructForm.class.php";
require_once "module/classes/BaseModule.class.php";
require_once "module/classes/admin/Admin.class.php";
require_once "module/classes/Resize.class.php";
require_once "module/classes/Menu.class.php";
require_once "module/classes/URI.class.php";
require_once "module/classes/Filter.class.php";
require_once "module/classes/Meta.class.php";
// lib
require_once "lib/phpmailer/class.phpmailer.php";
require_once "lib/smarty/Smarty.class.php";
$login_successful = false;
$oBaseModule = new BaseModule();
if (!isset($_GET['region'])) {
    $oBaseModule->redirectTo('/admin/ru/');
}
if (!isset($_REQUEST['act'])) {
    $sAct = "actionDefault";
} else {
    $sAct = "action" . $_REQUEST['act'];
}
if (isset($_GET['act']) && $_GET['act'] == "Logout") {
    if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
        header('WWW-Authenticate: Basic realm="My Realm"');
        header('HTTP/1.0 401 Unauthorized');
        echo "<script>window.location = '/admin/';</script>";
        exit(0);
    } else {
Exemplo n.º 20
0
 function _config_view()
 {
     parent::_config_view();
     $this->_view->template_dir = MODULE_ABSPATH . '/templates';
     $this->_view->res_base = MODULE_WEBPATH . '/templates';
 }
Exemplo n.º 21
0
 public function init()
 {
     parent::init();
     //$this->setViewPath($this->getBasePath() . '/home/views');
 }
Exemplo n.º 22
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     ModulePeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ModulePeer();
     }
     return self::$peer;
 }
Exemplo n.º 23
0
 /**
  * @return array
  */
 public function getInstallers()
 {
     $this->loadComposerData();
     if (isset($this->composerData['extra']['venne']['installers'])) {
         return array_merge(parent::getInstallers(), $this->composerData['extra']['venne']['installers']);
     }
     return parent::getInstallers();
 }
Exemplo n.º 24
0
<?php

date_default_timezone_set('PRC') or die('时区设置失败,请联系管理员!');
require './constants.php';
require './setting/sitesetting.php';
require './Include/functions/global.fun.php';
require './Include/logic/base.logic.php';
include './Include/Entities/base.entity.php';
require './Modules/base.mod.php';
require './Include/lib/log.lib.php';
require './Include/Entities/UserPermission.php';
require './Include/logic/authority.logic.php';
require "./Baidu_Push/Channel.class.php";
$mod_ary = null;
if (isset($_POST['mod'])) {
    $mod_ary = $_POST['mod'];
} else {
    if (isset($_GET['mod'])) {
        $mod_ary = $_GET['mod'];
    } else {
        $mod_ary = $siteconfig['default_module'];
    }
}
if (!checkmodule(__WEB_ROOT . '/Modules/ajax/' . $mod_ary . '.mod.php')) {
    $baseMod = new BaseModule($siteconfig);
    $baseMod->Messager('输入非法,请输入正确地址。', './index.php');
    return;
}
include __WEB_ROOT . '/Modules/ajax/' . $mod_ary . '.mod.php';
$moduleObj = new ModuleObj($siteconfig);
Exemplo n.º 25
0
 public function init()
 {
     // import the module-level components
     $this->setImport(array('PASAPI.components.*'));
     parent::init();
 }
Exemplo n.º 26
0
 public function init()
 {
     parent::init();
     $this->_initMisc();
 }
Exemplo n.º 27
0
 public function init()
 {
     parent::init();
     $this->setViewPath($this->getBasePath() . '/admin/views');
 }
Exemplo n.º 28
0
 function Admin()
 {
     parent::__construct();
     spl_autoload_register(array($this, 'autoloader'));
 }
Exemplo n.º 29
0
	/**
	 * Init admin-level models, componentes, etc...
	 */
	public function initAdmin()
	{
		//Yii::trace('Init users module admin resources.');
		parent::initAdmin();
	}
Exemplo n.º 30
0
 public function __construct()
 {
     parent::__construct();
 }