Exemplo n.º 1
0
 /**
  * @Decorated
  */
 public function index()
 {
     $this->page_decorator->setPageMetaTag("description", "Home page");
     $this->page_decorator->setPageMetaTag("keywords", "Home page");
     $this->page_decorator->setPageMetaTag("author", "Trieu Nguyen");
     $this->page_decorator->setPageTitle("Job Management System at DRD");
     $this->load->helper('random_password');
     $ran_pass = get_random_password(10, 12, TRUE, TRUE, FALSE);
     ApplicationHook::logInfo($ran_pass);
     $data = array();
     $this->load->view("decorator/body", $data);
 }
Exemplo n.º 2
0
 /**
  * @Decorated
  */
 public function index()
 {
     $this->page_decorator->setPageMetaTag("description", "Home page");
     $this->page_decorator->setPageMetaTag("keywords", "Home page");
     $this->page_decorator->setPageMetaTag("author", "Trieu Nguyen");
     $this->page_decorator->setPageTitle("Job Management System at DRD");
     $this->load->helper('random_password');
     $ran_pass = get_random_password(10, 12, TRUE, TRUE, FALSE);
     //ApplicationHook::logInfo($ran_pass);
     $this->load->database();
     $this->db->cache_on();
     $query = $this->db->query("SELECT COUNT(id) as number FROM users");
     $this->db->cache_off();
     foreach ($query->result() as $row) {
         ApplicationHook::logInfo($row->number);
     }
     $data = array();
     $this->load->view("decorator/body", $data);
 }
Exemplo n.º 3
0
 public static function log($text)
 {
     if (ApplicationHook::isLogEnabled()) {
         $ci =& get_instance();
         // $ci->load->library('FirePHP');
         // $ci->firephp->log("" . $text);
     }
 }
Exemplo n.º 4
0
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="content-language" content="en" />
        <meta http-equiv="expires" content="<?php 
echo ApplicationHook::getExpireTime(1);
?>
" />

        <?php 
foreach ($page_decorator->getPageMetaTags() as $name => $content) {
    ?>
        <meta name="<?php 
    echo $name;
    ?>
" content="<?php 
    echo $content;
    ?>
" />
            <?php 
}
?>

        <title><?php 
echo $page_decorator->getPageTitle();
?>
</title>
        <base href="<?php 
echo base_url();
?>
Exemplo n.º 5
0
 /**
  * Decorate the final view and response to client
  *
  */
 public function decoratePage()
 {
     if ($this->isValidControllerRequest()) {
         $reflection = $this->getReflectedController();
         if ($reflection != NULL) {
             if ($reflection->hasAnnotation('Decorated')) {
                 ApplicationHook::logInfo("->Decorate page for " . $this->controllerName . "." . $this->controllerMethod);
                 $this->setSiteLanguage();
                 $data = $this->processFinalViewData();
                 echo trim($this->CI->load->view("decorator/page_template", $data, TRUE));
                 return;
             }
         }
     }
     echo $this->CI->output->get_output();
     $this->CI->benchmark->mark('code_end');
     //ApplicationHook::logInfo("Rendering time: ".$this->CI->benchmark->elapsed_time('code_start', 'code_end'));
 }