예제 #1
0
 public function displayTemplate($file, $params = array())
 {
     $template = new TemplatePage($file);
     $template->assign($params);
     $result = $template->display();
     App::setTranslation('templates/' . $this->file);
     return $result;
 }
예제 #2
0
파일: Controller.php 프로젝트: swash13/shop
 protected static function displayPage($file)
 {
     $template = new TemplatePage($file);
     $template->assignGlobals(self::$templateGlobals);
     $template->assign(self::$templateVars);
     $result = $template->display();
     App::setTranslation('controllers/' . App::getController());
     return $result;
 }
예제 #3
0
 public function __construct()
 {
     parent::__construct('chunks/admin-list');
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct('chunks/admin-form');
     $this->vars['fields'] = array();
 }
예제 #5
0
파일: nabu.php 프로젝트: nabusas/Nabu
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
	Fecha creacion		= 20-02-2015
	Desarrollador		= CAGC
	Fecha modificacion	= 27-01-2016
	Usuario Modifico	= CAGC
*/
include "../Class/Utilities.php";
include "../Class/TemplatePage.php";
session_start();
if ($_GET['p'] == 'login') {
    $objUtilities = new Utilities('localhost', 'root', '', 'nabu');
    $_SESSION['objUtilities'] = $objUtilities;
    $objTemplate = new TemplatePage($objUtilities);
    $objTemplate->initTemplate($_GET['p']);
    unset($_SESSION['role']);
} else {
    if (isset($_SESSION['role']) and $_SESSION['role'] != '') {
        $objTemplate = new TemplatePage($_SESSION['objUtilities']);
        if ($objTemplate->objUtilities->validateRole($_GET['p'], $_SESSION['role'])) {
            $objTemplate->initTemplate($_GET['p']);
        } else {
            header("location:../Pages/nabu.php?p=error");
        }
    } else {
        header("location:../Pages/nabu.php?p=login");
    }
}
예제 #6
0
파일: Controller.php 프로젝트: alexelev/bmf
 protected static function displayPage($file)
 {
     $template = new TemplatePage($file);
     $template->assignGlobals(self::$templateGlobals);
     $template->assign(self::$templateVars);
     $result = $template->display();
     return $result;
 }