Файл: sys/system.page.php
Строк: 147
<?php
include "system.config.php";
// Генератор страниц
class PageGenerator {
function __construct() {
$this->Prepare();
}
function Prepare() {
$config = new Config;
echo "<head>rn";
echo "<title>NashShalash</title>rn";
echo "<link rel="stylesheet" href="css/font-awesome.css">rn";
echo "<link rel='stylesheet' href='css/style-" . $config->GetConfig(new Database())["style"] . ".css'></link>rn";
echo "<meta charset="UTF-8"></meta>";
echo "</head>rn";
echo "<body>rn";
echo '<table class="navi">';
echo ' <tr>';
echo ' <td>';
echo ' <a href="index.php">';
echo ' <i class="fa-menu fa-home"></i>';
echo ' </a>';
echo ' </td>';
echo ' <td>';
echo ' <a href="chat.php">';
echo ' <i class="fa-menu fa-comment"></i>';
echo ' ';
echo ' </a>';
echo ' </td>';
echo ' <td>';
echo ' <a href="profile.php?show=me">';
echo ' <i class="fa-menu fa-user"></i>';
echo ' ';
echo ' </a>';
echo ' </td>';
echo ' <td>';
echo ' <a href="music.php">';
echo ' <i class="fa-menu fa-music"></i>';
echo ' ';
echo ' </a>';
echo ' </td>';
echo ' </tr>';
echo '</table>';
echo "<div class="parent-content">";
}
function __destruct() {
$this->EndGenerating();
}
// Создать ссылку
function CreateLink($text, $link) {
echo "<div class="content-field"><a href=" . $link . " class="link">" . $text . "</a></div>rn";
}
// Создать ссылку с значком(для меню)
function CreateLinkWithIcon($icon, $text, $link) {
echo "<div class="content-field"><i class="fa fa-" . $icon . " aria-hidden="true"></i> <a href=" . $link . " class="link">" . $text . "</a></div>rn";
}
// Создать ссылку "назад"
function CreateBackLink() {
echo "<div class="content-field"><i class="fa fa-arrow-left" aria-hidden="true"></i> <a onclick="history.back();" class="link">Назад</a></div>rn";
}
// Создать обычный текст
function CreateText($text) {
echo "<div class="content-field"><font>" . $text . "</font></div>rn";
}
function CreateTextWithIcon($icon, $text) {
echo "<div class="content-field"><i class="fa fa-" . $icon . " aria-hidden="true"></i> <font>" . $text . "</font></div>rn";
}
function StartForm($action) {
echo "<form method="POST" action="$action">rn";
}
function EndForm() {
echo "</form>rn";
}
function CreateInput($name) {
echo "<div class="content-field"><input class="input" name="$name" /></div>";
}
function CreateInputWithValue($name, $value) {
echo "<div class="content-field"><input class="input" name="$name" value="$value" /></div>";
}
function CreateSubmit() {
echo "<div class="content-field"><input class="button" type="submit" /></div>";
}
function CreateCheckbox($name, $text) {
echo "<div class="content-field"><input name="$name" type="checkbox" /> $text</div>";
}
function CreateHidden($name, $value) {
echo "<input name="$name" type="hidden" value="$value" />";
}
function EndGenerating() {
echo "<div class="copy-block">Copyright ©2016 Powered by NovaSocial</div>";
echo "</div>";
echo "</body>rn";
}
}
?>