Вход Регистрация
Файл: app/functions/view.func.php
Строк: 62
<?php
# Author: Oleg Kulaga (Cyber_Shot);
# Package: WGame Engine;
# Version: 0.1;

if (!defined("APP")) die("Access Denied");

function 
view_header($title null
{
    
$title = !empty($title) ? data_out($title) : (!empty(app_getConfig('_system''title')) ? data_out(app_getConfig('_system''title')) : 'Wgame Engine');
    
$style = !empty(app_getConfig('_system''style')) ? data_out(app_getConfig('_system''style')) : 'default.css';
    
?> 

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link rel="stylesheet" type="text/css" href="<?=DS.HOME?>/public/styles/<?=$style?>"> 
<title> <?=$title?> </title> 
</head> 
<body>

<div class="header">
    <?=$title?>
</div> 

    <?php
    view_notifierDisplay
();


function 
view_footer() 
{
    if (!empty(
$_SESSION['userId'])) 
    {
        
$user DB::$dbs->queryFetch("SELECT `access` FROM "USERS ." WHERE `id` = ?", [$_SESSION['userId']]);
        
        if (!empty(
$user['access'])) 
        {
            
?> 

<div class="block"> 
    <a href="<?=DS.HOME.DS?>wgame.panel" class="touchLink"> Панель управления</a>
</div> 

            <?php
        
}
        unset(
$user);
    } 

    if (
$_SERVER['SCRIPT_NAME'] != DS.HOME.DS.'public/index.php' && 
        
$_SERVER['SCRIPT_NAME'] != DS.HOME.DS.'public/main.php'
    {
        
?> 

<div class="block"> 
    <a href="<?=DS.HOME.DS?>wgame.index" class="touchLink"> На главную</a>
</div>  

        <?php
    
}
    
?> 

<div class="footer"> 
Powered by &copy;WGame Engine 2017
</div> 

    <?php


function 
view_notifierDisplay() 
{
    if (!empty(
$_SESSION['notifier'])) 
    {
        
?> 
        
<table class="notifier" width="100%">
    <tr> 
    <td width="10%" style="font-size: 22px;text-align: center;"> 
        !
    </td> 
    <td width="90%">
        <?=data_out($_SESSION['notifier'])?>
    </td> 
    </tr> 
</table> 
        
        <?php
        
unset($_SESSION['notifier']);
    }
}

function 
view_notifierAdd($message$header null
{
    
$_SESSION['notifier'] = $message;
    
    if (!empty(
$header)) 
    {
        
header("Location: "$header);
        exit();
    }


function 
view_navigationLink($array
{
    if (
is_array($array)) 
    {
        echo 
'<div class="navigation"> ';
        foreach (
$array as $key => $value
        {
            echo 
'<span class="c_blue b">::</span><a href="'DS HOME DS data_out($key) .'"> 'data_out($value) .'</a> ';
        } 
        echo 
'</div> ';
    }
}
Онлайн: 0
Реклама