Beispiel #1
0
 public function reportsTABLEpage($id)
 {
     /*$data['email'] = self::$session_data['email'];
       $data['type'] = self::$session_data['type'];
       $data['id'] = self::$session_data['id'];*/
     /*$_type = $data['type'];
       $_id = $data['id'];*/
     //self::$data['count'];
     self::$data['count'] = $this->session->userdata('count');
     //
     $home = new home();
     self::$data['count'] = $home->forcounter(self::$_type, self::$_id);
     Tables::getonerow($id);
     $row = Tables::getTableReports(self::$_type);
     //$data['rw'] = $row;
     self::$data['rw'] = $row;
     switch (self::$_type) {
         case 'a':
             $this->load->view('reportstable', self::$data);
             break;
         case 'u':
             $this->load->view('replytable', self::$data);
             break;
     }
 }
Beispiel #2
0
/**
* controller
*
* @author     Dac Chartrand <*****@*****.**>
* @license    http://www.fsf.org/licensing/licenses/gpl-3.0.html
*/
function sux($action, $params = null)
{
    switch ($action) {
        default:
            $home = new home();
            $home->display();
    }
}
Beispiel #3
0
 /**
  * Starts the Application
  * Takes the parts of the URL and loads the according controller & method and passes the parameter arguments to it
  * TODO: get rid of deep if/else nesting
  * TODO: make the hardcoded locations ("error/index", "index.php", new Index()) dynamic, maybe via config.php
  */
 public function __construct()
 {
     $this->splitUrl();
     // check for controller: is the url_controller NOT empty ?
     if ($this->url_controller) {
         // check for controller: does such a controller exist ?
         if (file_exists(CONTROLLER_PATH . $this->url_controller . '.php')) {
             // if so, then load this file and create this controller
             // example: if controller would be "car", then this line would translate into: $this->car = new car();
             require CONTROLLER_PATH . $this->url_controller . '.php';
             $this->url_controller = new $this->url_controller();
             // check for method: does such a method exist in the controller ?
             if ($this->url_action) {
                 if (method_exists($this->url_controller, $this->url_action)) {
                     // call the method and pass the arguments to it
                     if (isset($this->url_parameter_3)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1, $this->url_parameter_2, $this->url_parameter_3);
                     } elseif (isset($this->url_parameter_2)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1, $this->url_parameter_2);
                     } elseif (isset($this->url_parameter_1)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1);
                     } else {
                         // if no parameters given, just call the method without arguments
                         $this->url_controller->{$this->url_action}();
                     }
                 } else {
                     // redirect user to error page (there's a controller for that)
                     header('location: ' . URL . 'error/index');
                 }
             } else {
                 // default/fallback: call the index() method of a selected controller
                 $this->url_controller->index();
             }
             // obviously mistyped controller name, therefore show 404
         } else {
             // redirect user to error page (there's a controller for that)
             header('location: ' . URL . 'error/index');
         }
         // if url_controller is empty, simply show the main page (index/index)
     } else {
         //redirect for entering page and not logged in
         if (isset($_SESSION['user_logged_in'])) {
             require CONTROLLER_PATH . 'login.php';
             $controller = new login();
             $controller->index();
         } else {
             //redirect for entering page and logged in still
             require CONTROLLER_PATH . 'home.php';
             $controller = new home();
             $controller->index();
         }
     }
 }
Beispiel #4
0
 function __construct()
 {
     $url = isset($_GET['url']) ? $_GET['url'] : null;
     $url = rtrim($url, '/');
     $url = explode('/', $url);
     if (empty($url[0])) {
         require 'controller/home.php';
         $controller = new home();
         $controller->index();
         return false;
     }
     $file = 'controller/' . $url[0] . '.php';
     if (file_exists($file)) {
         require $file;
     } else {
         $this->error();
     }
     $controller = new $url[0]();
     $controller->loadModel($url[0]);
     // Calling methods
     $method = "{$url['1']}(";
     for ($i = 2; $i <= count($url); $i++) {
         if ($i != count($url)) {
             if ($i > 2) {
                 $method .= ",";
             }
             $method .= "'{$url[$i]}'";
         }
     }
     $method .= ");";
     if (isset($url[2])) {
         if (method_exists($controller, $url[1])) {
             $ads = '$controller->' . $method . '';
             eval($ads);
         } else {
             $this->error();
         }
     } else {
         if (isset($url[1])) {
             if (method_exists($controller, $url[1])) {
                 $controller->{$url[1]}();
             } else {
                 $this->error();
             }
         } else {
             $controller->index();
         }
     }
 }
Beispiel #5
0
 function __construct()
 {
     $url = $this->parseUrl();
     //set home as our default controller
     $file = SITE_PATH . '/app/controllers/home_controller.php';
     //if no  url type then load home
     if (empty($url[0])) {
         require_once $file;
         $control = new home();
         $control->index();
         return FALSE;
     }
     //if controller not empty then check if it is a valid conroller
     $file = SITE_PATH . '/app/controllers/' . $url[0] . '_controller.php';
     //if valid then include it
     if (file_exists($file)) {
         require_once $file;
     } else {
         return miscellaneous::Error();
     }
     $name = $url[0];
     //create an object of that controller
     $control = new $name();
     //params array save the method and parameter of the controller class
     $params = [];
     //by default we set the methos as index
     $method = 'index';
     //if method is set in url
     if (isset($url[1])) {
         //if it is index then skip it and show error
         if ($url[1] === 'index') {
             return miscellaneous::Error();
         } else {
             if (method_exists($url[0], $url[1])) {
                 //if method exists then set the method
                 $method = $url[1];
                 unset($url[0]);
                 unset($url[1]);
                 $params = $url ? array_values($url) : [];
             } else {
                 return miscellaneous::Error();
             }
         }
     }
     //load the model required
     $control->loadModel($name);
     //finally call the method with paramters of that controller class
     call_user_func_array([$control, $method], $params);
 }
 public static function run()
 {
     new session();
     //Suprimir Warnings
     error_reporting(E_WARNING);
     if (!isset($_SESSION['usuario'])) {
         if ($_GET['class']) {
             echo "\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\ttop.location='./';\n\t\t\t\t\t\t</script>\n\t\t\t\t\t";
         }
         $pagina = new login();
         $pagina->show();
     } else {
         //$template = file_get_contents('app.view/template.class.php');
         $template = new template();
         ob_start();
         $template->show();
         $template = ob_get_contents();
         ob_get_clean();
         $content = '';
         /*
          *  Se tiver parametros na URL, carrega a classe
          */
         if ($_GET) {
             $class = $_GET['class'];
             if (class_exists($class)) {
                 $pagina = new $class();
                 ob_start();
                 $pagina->show();
                 $content = ob_get_contents();
                 ob_end_clean();
             } else {
                 if (function_exists($method)) {
                     call_user_func($method, $_GET);
                 }
             }
         } else {
             $pagina = new home();
             ob_start();
             $pagina->show();
             $content = ob_get_contents();
             ob_end_clean();
         }
         /*
          *  Susbstitui a string #CONTENT# do template para a pagina principal
          */
         $site = str_replace('#CONTENT#', $content, $template);
         echo $site;
     }
 }
 function fetch()
 {
     if (isset($_GET['fType']) && $_GET['fType'] != '') {
         $filterType = $_GET['fType'];
     } else {
         $filterType = 'all';
     }
     //$code = '<link rel="stylesheet" href="'.URL_CALLBACK.'?p=cache&type=css&cf=hdFacebook_1235766581.css" type="text/css" charset="utf_8" />';
     //$code.='<style type="text/css">'.htmlentities(file_get_contents(PATH_FACEBOOK_STYLES.'/default.css', true)).'</style>';
     $code = $this->page->streamStyles();
     require_once PATH_CORE . '/classes/home.class.php';
     $homeObj = new home($this->db);
     $code .= '<div id="pageBody">';
     $code .= '<div id="pageContent">';
     //$code .= '<script type="text/javascript">'.htmlentities(file_get_contents(PATH_SCRIPTS.'/newsroom.js')).'</script>';
     //$code .= '<h1>Abe\'s CLIMATE CHANGE APP!*!*!*!*!</h1>';
     //$code .= '<a class="btn_1" href="'.SITE_URL.'">Visit the '.SITE_TITLE.' Application</a>';
     //$code .= '<br /><br /><hr />';
     $code .= '<div id="col_left"><!-- begin left side -->';
     $code .= '<div id="featurePanel" class="clearfix">';
     $code .= $this->page->buildPanelBar('Featured Stories', '<a href="?p=stories&o=sponsor">More from ' . SITE_SPONSOR . ' editors</a>');
     $code .= $homeObj->fetchFeature();
     $code .= '</div><!--end "featurePanel"--><div class="panel_1">';
     require_once PATH_FACEBOOK . '/classes/actionFeed.class.php';
     $actionFeed = new actionFeed(&$this->db, true);
     require_once PATH_FACEBOOK . '/classes/actionTeam.class.php';
     $actionTeam = new actionTeam(&$this->page);
     //$code .= $actionFeed->fetchFeed('all', 1, $this->siteUserId);
     $feed = $actionFeed->fetchFeed($filterType, 1, $this->siteUserId);
     $code .= preg_replace_callback('/<div class="subFilter">.*?<\\/div>/s', array($this, 'changeFilterString'), $feed);
     $code .= '</div><!-- end panel_1 -->';
     $code .= '</div><!-- end col_left -->';
     $code .= '<div id="col_right">';
     // hack to give fbId to action team class session
     $actionTeam->setAppTabMode($this->fbUserPageId);
     $code .= $this->fetchPromo();
     $code .= $actionTeam->fetchSidePanel('appTab', 3);
     $code .= '</div><!-- end col_right -->';
     $code .= '</div><!-- end pageContent -->';
     $code .= '</div><!-- end pageBody -->';
     // Hack this to the app tab
     $code = preg_replace('/on[cC]lick="[^"]+"/', '', $code);
     // $code = preg_replace('/<fb:profile-pic[^>]+>/', '', $code);
     $code = preg_replace('/href="\\/?index.php([^"]+)/', 'href="' . URL_CANVAS . '/$1&referfbid=' . $this->fbUserPageId, $code);
     $code = preg_replace('/href="\\?p=([^"]+)/', 'href="' . URL_CANVAS . '/?p=$1&referfbid=' . $this->fbUserPageId, $code);
     $code = preg_replace_callback('/<div class="pages">.*?<\\/div>/s', array($this, 'changeFilterString'), $code);
     return $code;
 }
 public static function run()
 {
     //Suprimir Warnings
     //error_reporting(E_WARNING);
     //$template = file_get_contents('app.view/template.class.php');
     $template = new template();
     ob_start();
     $template->show();
     $template = ob_get_contents();
     ob_get_clean();
     $content = '';
     /*
      *  Se tiver parametros na URL, carrega a classe
      */
     if ($_GET) {
         $class = $_GET['class'];
         if (class_exists($class)) {
             $pagina = new $class();
             ob_start();
             $pagina->show();
             $content = ob_get_contents();
             ob_end_clean();
         } else {
             $pagina = new erro();
             $pagina->codigo = 404;
             ob_start();
             $pagina->show();
             $content = ob_get_contents();
             ob_end_clean();
         }
     } else {
         $pagina = new home();
         ob_start();
         $pagina->show();
         $content = ob_get_contents();
         ob_end_clean();
     }
     /*
      *  Susbstitui a string #CONTENT# do template para a pagina principal
      */
     $site = str_replace('#CONTENT#', $content, $template);
     echo $site;
 }
 /**
  * Funcao run
  * Carrega conteudo da pagina
  * 
  * @access  public
  * @return  void
  */
 public static function run()
 {
     //Suprimir Warnings
     //error_reporting(E_WARNING);
     new TSession(1);
     //Não tem Usuario ativo
     if (!isset($_SESSION['usuario'])) {
         $pagina = new login();
         $pagina->show();
     } else {
         //$template = file_get_contents('app.view/template.class.php');
         $template = new template();
         ob_start();
         $template->show();
         $template = ob_get_contents();
         ob_get_clean();
         $content = '';
         /*
          *  Se tiver parametros na URL, carrega a classe
          */
         if ($_GET) {
             $class = urldecode($_GET['class']);
             if (class_exists($class)) {
                 if (isset($_GET['funcao'])) {
                     $funcao = $_GET['funcao'];
                     $class = $class . '_' . $funcao;
                     if (class_exists($class)) {
                         $pagina = new $class();
                     } else {
                         $pagina = new erro();
                         $pagina->codigo = 404;
                         ob_start();
                         $pagina->show();
                         $content = ob_get_contents();
                         ob_end_clean();
                     }
                 } else {
                     $pagina = new $class();
                 }
                 ob_start();
                 $pagina->show();
                 $content = ob_get_contents();
                 ob_end_clean();
             } else {
                 $pagina = new erro();
                 $pagina->codigo = 404;
                 ob_start();
                 $pagina->show();
                 $content = ob_get_contents();
                 ob_end_clean();
             }
         } else {
             $pagina = new home();
             ob_start();
             $pagina->show();
             $content = ob_get_contents();
             ob_end_clean();
         }
         /*
          *  Susbstitui a string #CONTENT# do template para a pagina principal
          */
         $site = str_replace('#CONTENT#', $content, $template);
         echo $site;
     }
 }
Beispiel #10
0
<?php

require 'class.base.php';
require 'class.html.php';
require 'class.home.php';
$base_instance = new base();
$html_instance = new html();
$home_instance = new home();
$userid = $base_instance->get_userid();
$home_id = isset($_REQUEST['home_id']) ? (int) $_REQUEST['home_id'] : '';
$base_instance->query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION'");
// necessary for the overflow problem, see http://dev.mysql.com/doc/refman/5.6/en/out-of-range-and-overflow.html
$all_text = '<div align="center">';
if ($userid == _GUEST_USERID) {
    $all_text .= '<h3>Demo Login, do not save any relevant data.</h3>Please read the <a href="help-intro.php"><u>help section</u></a> to get started with the Organizer';
} else {
    $all_text .= '<br>';
}
#
if (empty($home_id)) {
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['HOME']['MAIN']} WHERE user='******' ORDER BY ID LIMIT 1");
} else {
    $data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['HOME']['MAIN']} WHERE ID='{$home_id}' AND user='******'");
}
if (isset($data)) {
    $title = $data[1]->title;
    $element1 = $data[1]->element1;
    $element2 = $data[1]->element2;
    $element3 = $data[1]->element3;
    $element4 = $data[1]->element4;
    $element5 = $data[1]->element5;
         $state = 'collapsed';
     }
     require_once PATH_FACEBOOK . "/pages/pageTeam.class.php";
     $db->log($userid);
     $code = pageTeam::fetchTeamFriendList($fb->db, $userid, $state, true);
     break;
 case 'fetchHomePage':
     // replace just storyList
     /*
      * 			  	if (isset($_GET['userid']))
     						$userid=$_GET['userid'];
     					else
     						$userid='default';		
     */
     require_once PATH_CORE . "/classes/home.class.php";
     $homeObj = new home();
     $code = $homeObj->fetchHomePage($currentPage);
     break;
 case 'dialogPublish':
     $error = false;
     if (isset($_GET['mode'])) {
         $mode = $_GET['mode'];
     } else {
         $mode = 'wire';
     }
     if (isset($_GET['itemid'])) {
         $itemid = $_GET['itemid'];
     } else {
         $itemid = 0;
     }
     if ($userid == 0) {
Beispiel #12
0
 /**
  * 页面默认值
  */
 private function default_value()
 {
     //形状
     self::$shape = array('round' => '圆形', 'princess' => '公主方', 'heart' => '心形', 'pear' => '梨形', 'emerald' => '祖母绿', 'marquise' => '马眼形', 'cushion' => '垫形', 'oval' => '椭圆形', 'radiant' => '明亮形');
     $this->sma->assign('shape', self::$shape);
     //产品来源
     self::$proSource = array('speculation' => '炒货', 'self' => '自家店铺', 'comate' => '代理商');
     $this->sma->assign('proSource', self::$proSource);
     //颜色
     self::$color = array('D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N');
     $this->sma->assign('color', self::$color);
     //净度
     self::$clarity = array('IF', 'VVS1', 'VVS2', 'VS1', 'VS2', 'SI1', 'SI2', 'SI3', 'I1', 'I2', 'I3');
     $this->sma->assign('clarity', self::$clarity);
     //切工 or 抛光 or 对称
     self::$cut = array('ID', 'EX', 'VG', 'G', 'FR', 'PR', 'N');
     $this->sma->assign('cut', self::$cut);
     //荧光强度
     self::$Fent_Isity = array('N', 'VSL', 'F/SL', 'M', 'S', 'VS');
     $this->sma->assign('Fent_Isity', self::$Fent_Isity);
     //荧光颜色
     self::$Fent_color = array('Blue', 'Yellow', 'Green', 'Red', 'Orange', 'White');
     $this->sma->assign('Fent_color', self::$Fent_color);
     //证书类型
     self::$diploma = array('GIA', 'IGI', 'HRD', 'PGS', 'VGR', 'AGS', 'DCLA', 'Uncertified', 'EGL', 'USA', 'EGL Israel', 'EGL Other', 'NGDTC', 'NGTC', 'GTC', 'Other');
     $this->sma->assign('diploma', self::$diploma);
 }
Beispiel #13
0
define("APP_DIR", "../");
include APP_DIR . "common.inc.php";
if (!($_SERVER['PHP_AUTH_USER'] == FRONTEND_USER && $_SERVER['PHP_AUTH_PW'] == FRONTEND_PASSWORD)) {
    header("WWW-Authenticate: Basic realm=\"Emailqueue frontend\"");
    header("HTTP/1.0 401 Unauthorized");
    echo "Access restricted";
    exit;
}
$a = $utils->getglobal("a");
if (!$a || $a == "") {
    $a = "home";
}
switch ($a) {
    case "home":
        include APP_DIR . "classes/home.class.php";
        $home = new home();
        $out->add($home->getinfo());
        break;
    case "manager":
        include APP_DIR . "classes/manager.class.php";
        $manager = new manager();
        $out->add($manager->run());
        break;
    case "servicetools":
        include APP_DIR . "classes/servicetools.class.php";
        $servicetools = new servicetools();
        $out->add($servicetools->run());
        break;
}
// Control cases wich don't need head nor footer
if ($utils->getglobal("aa") != "view_iframe_body") {
Beispiel #14
0
<!DOCTYPE html>
<html lang="en">
<?php 
include_once "home.php";
?>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link type="text/css" rel="stylesheet" href="css/estilo.css" />
</head>
<body>
    <p>
   <?php 
$mivar = new home();
$mivar->showcontent();
?>
    </p>
</body>
</html>
 function fetch()
 {
     if (isset($_GET['currentPage'])) {
         $currentPage = $_GET['currentPage'];
     } else {
         $currentPage = 1;
     }
     // check for referral and log it
     $referid = $this->page->fetchReferral();
     if ($referid !== false) {
         $this->page->recordReferral($referid, 'referToSite');
     }
     // build the home page
     require_once PATH_CORE . '/classes/home.class.php';
     $homeObj = new home($this->db);
     require_once PATH_FACEBOOK . '/classes/actionTeam.class.php';
     $this->teamObj = new actionTeam($this->page);
     $inside .= '<div id="col_left"><!-- begin left side -->';
     $inside .= '<div id="featurePanel" class="clearfix">';
     $inside .= $this->page->buildPanelBar($this->common['FeaturedStoriesTitle'], '<a href="?p=stories&o=sponsor" onclick="switchPage(\'stories\',\'all\',\'sponsor\');return false;">More from ' . SITE_SPONSOR . ' editors</a>');
     $inside .= $homeObj->fetchFeature();
     $inside .= '</div><!--end "featurePanel"-->';
     if (defined('ADS_HOME_SMALL_BANNER')) {
         $inside .= str_replace("{ad}", '<fb:iframe src="' . URL_CALLBACK . '?p=cache&m=ad&locale=homeSmallBanner" frameborder="0" scrolling="no" style="margin:0px 5px 0px 0px;padding:0px;width:478px;height:70px;"/>', $this->common['adWrapSmallBanner']);
     }
     if (defined('ENABLE_MICRO')) {
         $inside .= $homeObj->fetchMicro($this->page);
     }
     // look for featured widget
     $this->initObjs();
     $featuredWidget = $this->fwtObj->lookupWidget('homeFeature');
     if ($featuredWidget != '') {
         $inside .= $featuredWidget;
     }
     if (defined('ENABLE_IMAGES')) {
         $inside .= $homeObj->fetchImages($this->page);
     }
     if (defined('ENABLE_STUFF')) {
         $inside .= $homeObj->fetchStuff($this->page);
     }
     if (defined('ENABLE_IDEAS')) {
         $inside .= $homeObj->fetchIdeas($this->page);
     }
     if (defined('ENABLE_ASK')) {
         $inside .= $homeObj->fetchAskQuestions($this->page);
     }
     $inside .= '<div class="panel_1">';
     $inside .= $this->page->buildPanelBar('Top News', '<a class="rss_link" onclick="quickLog(\'extLink\',\'home\',0,\'' . URL_RSS . '\');" target="_blank" href="' . URL_RSS . '">RSS</a><span class="pipe">|</span><a href="?p=postStory" onclick="switchPage(\'postStory\');return false;">Post a story</a>', 'The top stories as chosen by readers');
     $inside .= '<div id="storyList">';
     $inside .= $homeObj->fetchHomePage($currentPage);
     $inside .= '<input type="hidden" id="pagingFunction" value="fetchHomePage">';
     $inside .= '</div><!-- end storyList -->';
     $inside .= $this->page->buildPanelBar('', '<a href="#" onclick="switchPage(\'stories\');return false;">More stories</a><span class="pipe">|</span><a href="#" onclick="switchPage(\'postStory\');return false;">Post a story</a>');
     $inside .= '</div><!--end "panel_1"-->';
     $inside .= $this->teamObj->fetchLegend();
     $inside .= '</div><!-- end left side --><div id="col_right">';
     $usePromo = true;
     if ($this->page->session->isAppAuthorized == 1 or defined('REG_SIMPLE') and $this->session->isLoggedIn) {
         sscanf($this->page->session->u->dateRegistered, "%4u-%2u-%2u %2u:%2u:%2u", $year, $month, $day, $hour, $min, $sec);
         $tstampRegistered = mktime($hour, $min, $sec, $month, $day, $year);
         if ($tstampRegistered < time() - 7 * 24 * 60 * 60) {
             // after one week - use general announcement if available
             $this->initObjs();
             $annCode .= $this->wtObj->fetchWidgetsByTitle('coverAnnounce');
             if ($annCode != '') {
                 $inside .= $annCode;
                 $usePromo = false;
             }
         }
     }
     if ($usePromo) {
         $inside .= $homeObj->fetchPromo();
     }
     // display simple feedback
     if ($this->page->session->isLoaded and defined('ENABLE_SIMPLE_FEEDBACK')) {
         $inside .= $homeObj->buildFeedbackBox($this->page);
     }
     $inside .= $this->teamObj->fetchSidePanel('home');
     /*
     		if (defined('ENABLE_STORY_PANEL') AND ENABLE_STORY_PANEL===true) {
     			$cacheName='sideLeaders';
     			if ($this->templateObj->checkCache($cacheName,30)) {
     				// still current, get from cache
     				$temp=$this->templateObj->fetchCache($cacheName);
     			} else {
     				require_once(PATH_FACEBOOK.'/classes/storyPanels.class.php');
     				$this->spObj=new storyPanels($this->page);							
     				$temp=$this->spObj->fetchStoryList('rated','inside',5);
     				$temp.=$this->spObj->fetchStoryList('discussed','inside',5);				
     				$this->templateObj->cacheContent($cacheName,$temp);
     			}
     			$code.=$temp;		
     		}		
     * 
     */
     $inside .= '</div> <!-- end right side -->';
     if ($this->page->isAjax) {
         return $inside;
     }
     $code .= $this->page->constructPage('home', $inside);
     return $code;
 }
<?php

include "../model/crud_classe.php";
$pl = new palestra();
$nv = new novidades();
$pr = new programacao();
$hm = new home();
$conf = new configuracao();
if (!empty($_POST['cadastroPalestra'])) {
    $pl = new palestra();
    $pl->insert($_POST['dataForm'], $_POST['textForm'], $_POST['timeForm']);
    // header("Location: ../view/paginas/cadastros/cads_palestra.php");
    header("refresh:1;url=../view/paginas/cadastros/cads_palestra.php");
}
if (!empty($_POST['cadastroNovidades'])) {
    $nv->insert($_POST['tituloForm'], $_POST['textForm']);
    // header("Location: ../view/paginas/cadastros/cads_novidades.php");
    header("refresh:1;url=../view/paginas/cadastros/cads_novidades.php");
}
if (!empty($_POST['cadastroProgramacao'])) {
    $pr = new programacao();
    $pr->insert($_POST['dateForm'], $_POST['horaForm'], $_POST['descForm']);
    // header("Location: ../view/paginas/cadastros/cads_novidades.php");
    header("refresh:1;url=../view/paginas/cadastros/cads_programacao.php");
}
if (!empty($_POST['editEmecam'])) {
    if (isset($_FILES['imgEmecam'])) {
        date_default_timezone_set("Brazil/East");
        //Definindo timezone padrão
        $ext = strtolower(substr($_FILES['imgEmecam']['name'], -4));
        //Pegando extensão do arquivo
Beispiel #17
0
            $this->_lang = CONS_DEFAULT_LANG;
        } else {
            $this->_lang = $_GET['lang'];
        }
        return true;
    }
    public function currentMenu()
    {
        $typeId = 1;
        //type trang chủ là 1
        $row = $this->_home->_selectMenuType($typeId, $this->_lang);
        $typeMenu = $this->webMenuType($typeId);
        if ($row['img'] == '') {
            $img = CONS_BASE_URL . '/' . CONS_IMAGE_DEFAULT;
        } else {
            $img = CONS_BASE_URL . '/' . $typeMenu['url_img'] . $row['img'];
        }
        $arr = array('id' => $row['id'], 'name' => strip_tags($row['name']), 'title' => strip_tags($row['title']), 'description' => strip_tags($row['description']), 'tags' => strip_tags($row['tags']), 'url' => $row['url'], 'img' => $img, 'lang' => strip_tags($row['lang']), 'typeMenuId' => $typeMenu['id'], 'typeMenuName' => $typeMenu['name'], 'typeMenuImg' => $typeMenu['url_img'], 'typeMenuImgThumb' => $typeMenu['url_img_thumb'], 'rootId' => $row['id']);
        return $arr;
    }
}
$c = new home();
$lang = $c->_lang;
$config = $c->config($lang);
$currentMenu = $c->currentMenu();
$tagHead = $c->tagHead($currentMenu['title'], $currentMenu['description'], $currentMenu['tags'], $currentMenu['img'], $currentMenu['url']);
$urlImg = $c->_model->_listWebMenuType();
$viewData = ob_start();
include_once 'view/web_home.php';
$viewData = ob_get_clean();
include_once 'view/web.php';
Beispiel #18
0
                $c = new $controller();
                $req = array_values($req);
                $c->run($req);
            }
        } else {
            //в запросе более ничего нет - вызываем метод контроллера по-умолчанию и суем ему пустой массив в кач. аргуметна
            $c = new $controller();
            $c->run(array());
        }
    } else {
        //это был не контроллер
        if (method_exists('home', $req[0])) {
            //это метод контроллера home
            $method = $req[0];
            unset($req[0]);
            $req = array_values($req);
            $i = new home();
            $i->{$method}($req);
            //передаем методу оставшиеся куски запроса
        } else {
            //это не метод home() - передаем запрос контроллеру по умолчанию и суем ему оставшиеся данные
            $i = new home();
            $req = array_values($req);
            $i->run($req);
        }
    }
} else {
    //в запросе нет ничего - вызываем индекс с методом по умолчанию
    $c = new home();
    $c->run(array());
}
Beispiel #19
0
                $page_state);
        }
        else
        {
            return $this->ready_master_common(
                "content/views/content_welcome",
                array(
                    'message'   => $message
                ),
                $page_state);
        }
    }
    // </editor-fold>

    // content
    //=====================================================


}

try
{
    $this_page = new home();
    echo $this_page->init_request('default');
}
catch(Exception $e)
{
    FCore::ShowError(500, $e->getMessage());
}

?>