private function create() {
     init::importClass(config::$load); //получаем список классов..
     init::importJS(config::$scripts); //скриптов..
     init::importCSS(config::$styles); //стилей
     $control = new controller;
     $control->getData();
 }
Пример #2
0
 public function testCss()
 {
     $c = new controller();
     $this->assertEquals('', $c->getCss());
     $c->css('.class{text-align: center;}');
     $this->assertEquals('<style type="text/css">.class{text-align: center;}</style>', $c->getCss());
 }
Пример #3
0
function setMsg($app, $msgList)
{
    $msgFile = DIR_APP . "/" . $app . "/msg/" . LANG_PRINCIPAL . ".json";
    $c = new controller();
    $c->saveMsg($app, LANG_PRINCIPAL);
    // setJson enregiste un array qui va etre convertie au format json dans le fichier pointer;
    $c->setJson($msgFile, $msgList);
}
Пример #4
0
 /**
  *
  */
 function __construct()
 {
     $controller = new controller();
     $url = $controller->getUrl();
     switch ($url[0]) {
         case 'index':
             $controller->getIndex();
             break;
     }
 }
Пример #5
0
 public static function router($app, $module, $event, $params, $ajax_conf = array(), $name_utility = '')
 {
     $security = APP_PATH . $app . DS . 'security.php';
     include $security;
     # Es una utilidad?
     if ($name_utility) {
         $pathScript = ROOT_PATH . DS . 'resources' . DS . 'utility' . DS . $name_utility . '.php';
         include $pathScript;
     } else {
         $pathModel = APP_PATH . $app . DS . $module . DS . 'dataModel.php';
         $pathHandler = APP_PATH . $app . DS . $module . DS . 'handlerEvent.php';
         $pathIndex = APP_PATH . $app . DS . $module . DS . 'index.php';
         if (file_exists($pathIndex)) {
             include $pathModel;
             include $pathHandler;
             if (class_exists('controller')) {
                 global $objAjax;
                 switch (AJAX_ENGINE) {
                     case 'xajax':
                         require PLUGINS_PATH . 'xajax/xajax_core/xajax.inc.php';
                         # Agilizar el rendimiento
                         $objxAjax = new xajax();
                         $objxAjax->setFlag("debug", $ajax_conf[AJAX_ENGINE]['debug']);
                         $objxAjax->setFlag('decodeUTF8Input', $ajax_conf[AJAX_ENGINE]['decodeUTF8Input']);
                         $objxAjax->setWrapperPrefix($ajax_conf[AJAX_ENGINE]['wrapper_prefix']);
                         $GLOBALS['objAjax'] = $objxAjax;
                         define('PATH_XAJAX_JS', 'plugin/xajax/');
                         break;
                 }
                 $controller = new controller();
                 $controller->processRequest();
                 if (method_exists($controller, $event)) {
                     $reflectionMethod = new ReflectionMethod('controller', $event);
                     $reflectionMethod->invokeArgs($controller, $params);
                 } else {
                     if ($event != 'default_event') {
                         $msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b>&nbsp;' . OPF_myLang::getPhrase('ROUTER_METHOD_NOT_FOUND') . '&nbsp;&quot;' . $event . '&quot;</div>';
                         die($msgError);
                     }
                 }
                 include $pathIndex;
             } else {
                 $msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b>&nbsp;' . OPF_myLang::getPhrase('ROUTER_CLASS_NOT_FOUND') . '&nbsp;&quot;' . 'controller' . '&quot;</div>';
                 die($msgError);
             }
         } else {
             die('Error: 404 / The module "' . $app . '/' . $module . '" does not exist.');
         }
     }
 }
Пример #6
0
 public static function getPageInstance()
 {
     if (self::$_pageInstance === null) {
         self::$_pageInstance = new yPage();
     }
     return self::$_pageInstance;
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct();
     if (empty($_SESSION['auth']) && ACTION_NAME !== 'login') {
         $this->error('跳转至登录页', U('Auth/login'), 3);
     }
 }
Пример #8
0
 public function __construct()
 {
     parent::__construct();
     include_once $this->config['model'] . 'publicmodel.php';
     log_message("info", "public model included ");
     $this->actmodel = new publicmodel();
 }
Пример #9
0
 function __construct()
 {
     parent::__construct();
     @session_start();
     //$this->view->js_code = '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>';
     $this->view->js = array('postjob/js/jquery-1.11.3.min.js', 'postjob/js/default.js', 'postjob/js/jquery.fancybox-1.3.4.pack.js', 'postjob/js/jquery.validate.min.js', 'postjob/js/jquery.fancybox.pack.js?v=2.1.5');
 }
Пример #10
0
 function __construct()
 {
     parent::__construct();
     session::init();
     session::loginAuth("comm");
     $this->breadcrumb->add("Commission", "comm");
 }
Пример #11
0
 function __construct()
 {
     parent::__construct();
     session::init();
     session::loginAuth("mynetwork");
     $this->breadcrumb->add("My Network", "mynetwork");
 }
Пример #12
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'Thank You dude!';
     $this->view->canon = 'thanks';
     $this->view->description = 'DotNetNow thanks page';
 }
Пример #13
0
 /**
  * 添加商家
  * http://localhost/beauty/index.php?m=shop&c=index&a=create
  */
 public function create()
 {
     $data = getParams("data", '');
     $data['created'] = strtotime(date('Y-m-d H:i:s'));
     $result = parent::save($data);
     echo json_encode(array('code' => '0', 'message' => '成功', 'data' => $result));
 }
Пример #14
0
 /**
  *
  * Cria uma nova instancia desta classe, e não necessita de um destrutor, pois quando o usuário
  * muda de página, esta instancia é destruída automaticamente.
  * @exemplo $objInstancia = GeralClass::getInstance()->metodoQualquer()
  */
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Пример #15
0
 public function __construct()
 {
     parent::__construct();
     include_once $this->config['model'] . 'login.php';
     log_message("info", "model included ");
     $this->model = new loginModel();
 }
Пример #16
0
 function __construct()
 {
     parent::__construct();
     $this->model = new mhome();
     $this->view = new vhome();
     //echo 'Hello controller';
 }
Пример #17
0
 public function execute()
 {
     global $application;
     if (!isset($_SESSION['master_email'])) {
         $application->direct('index', false);
     }
     $view = parent::getView();
     $view->set('general->imgkey', rand(1, 7));
     $email = $_SESSION['master_email'];
     $sec_key = $_SESSION['sec_key'];
     $application->database->prepare('SELECT id, look, username, credits, motto FROM server_users WHERE email = ?', array($email));
     $characters = $application->database->execute();
     $widget = ' ';
     while ($c = $characters->to_array()) {
         $w = new widget_object('character-widget');
         $w->set('character->look', $c['look']);
         $w->set('character->motto', $c['motto']);
         $w->set('character->username', $c['username']);
         $w->set('character->credits', $c['credits']);
         $w->set('character->string', base64_encode(sha1($c['id'])));
         $widget = $widget . $w->execute();
     }
     if (strlen($widget) <= 10) {
         $widget = 'No Characters<br><br>';
     }
     $view->set('user->email', $email);
     $view->set('user->seckey', $sec_key);
     $view->set('user->characters', $widget);
     $view->execute();
 }
Пример #18
0
 /**
  * Constructor
  *
  * Requires needed models and helpers.
  * 
  * @access	public
  */
 function __construct()
 {
     parent::__construct();
     $this->load->model('init_model');
     $this->load->model('category_model');
     $this->load->model('article_model');
 }
 public function __construct()
 {
     parent::__construct();
     include 'controllers/loginController.php';
     $valida = new login();
     $valida->sessao_valida();
 }
Пример #20
0
 function __construct()
 {
     parent::__construct();
     session::init();
     session::loginAuth("supplier");
     $this->breadcrumb->add("Tools", "supplier");
 }
Пример #21
0
 public function execute()
 {
     global $application;
     if (isset($_GET['user'])) {
         $view = parent::getView();
         $application->database->prepare('SELECT id FROM server_users WHERE username = ?', array($_GET['user']));
         $id = $application->database->execute()->result;
         $key = generate_ticket(array($id, $_GET['user']));
         $application->database->prepare('UPDATE server_users SET client_key = ? WHERE id = ?', array($key, $id));
         $application->database->execute();
         $view->set('user->sso', $key);
         $view->set('rand->number', rand(0, 999));
         $view->execute();
     } else {
         if (!isset($_SESSION['master_email'])) {
             $application->direct('index', false);
             exit;
         } else {
             if (!isset($_SESSION['habbo']['id'])) {
                 $application->direct('characters', false);
                 exit;
             }
         }
         $view = parent::getView();
         $key = generate_ticket(array($application->user->id, $application->user->username));
         $application->user->set_sso($key);
         $view->set('user->sso', $key);
         $view->set('rand->number', rand(0, 999));
         $view->execute();
     }
 }
Пример #22
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'Update email preference';
     $this->view->canon = 'email';
     $this->view->description = 'Update email preference';
 }
Пример #23
0
 function __construct()
 {
     parent::controller();
     parent::database();
     parent::module('models', 'models_auth', 'culck');
     header('Content-type: application/json');
 }
Пример #24
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'Contact us';
     $this->view->canon = 'contactus';
     $this->view->description = 'Reach out to the DotNetNow team. We are here to help you find your ideal .NET job or ideal .NET developer';
 }
Пример #25
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'DotNetNow privacy terms page';
     $this->view->canon = 'privacy';
     $this->view->description = 'DotNetNow privacy terms page lists the privacy policies of the site.';
 }
Пример #26
0
 function __construct()
 {
     parent::__construct();
     session::init();
     session::loginAuth("dashboard");
     $this->breadcrumb->add("Dashboard", "dashboard");
 }
Пример #27
0
 function __construct()
 {
     parent::__construct();
     session::init();
     session::loginAuth("advertisement");
     $this->breadcrumb->add("Advertisement", "advertisement");
 }
Пример #28
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'DotNetNow usage terms page';
     $this->view->description = 'DotNetNow usage terms page lists the terms of usage of the site';
     $this->view->canon = 'terms';
 }
Пример #29
0
 function __construct($params)
 {
     parent::__construct($params);
     $this->companyRepository = new CompanyRepository();
     $this->jobRepository = new JobRepository();
     $this->candidateRepository = new CandidateRepository();
 }
Пример #30
0
 function __construct()
 {
     parent::__construct();
     $this->view->titl = 'DotNetNow .NET Jobs Board User Signup';
     $this->view->canon = 'signup';
     $this->view->description = 'Signup for a DotNetNow account to be able to edit and track your ruby jobs post';
 }