コード例 #1
0
ファイル: TemplatePage.php プロジェクト: swash13/shop
 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
ファイル: TemplateList.php プロジェクト: swash13/shop
 public function __construct()
 {
     parent::__construct('chunks/admin-list');
 }
コード例 #4
0
ファイル: TemplateForm.php プロジェクト: swash13/shop
 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;
 }