Example #1
0
 public function markActive()
 {
     if ($this->name == SysApplication::getCurrentPage()->name) {
         return 'id = "active"';
     } else {
         return '';
     }
 }
Example #2
0
<?php

// Менеджер продуктов
// Задачи:
// НУТЫПОНЕЛ, некогда писать тз.
// Автор:
// Копипастер228.
// При участии команды сайта Ognemet.co
// 9.09.2015
// Find a way to avoid this:
$self = SysApplication::getCurrentPage();
// 'cause this shit is the same for all the managers using modules.
$index = SYSApplication::getPageIndexByName($self->name);
// Generaly, the shit below is the only shit that should be here:
$exesProductManager = SysApplication::callManager($self->id);
if (!isset($_GET['action'])) {
    $action = 'list';
} else {
    $action = $_GET['action'];
}
if (isset($_POST['ProductID'])) {
    $handleViewCheckbox = isset($_POST['OnView']) ? 1 : 0;
    $handleStoreCheckbox = isset($_POST['ToStore']) ? 1 : 0;
    $exesProductManager->saveProduct($_POST['ProductID'], $_POST['Price'], $_POST['Name'], $_POST['ProductCategoryID'], $handleViewCheckbox, $handleStoreCheckbox, $_POST['Amount'], $_POST['Unit']);
}
if (isset($_POST['CategoryID'])) {
    $exesProductManager->saveCategory($_POST['CategoryID'], $_POST['CategoryName']);
}
switch ($action) {
    case 'single':
        if (isset($_GET['id'])) {
Example #3
0
<?php

global $waycup;
$shops = $waycup->getListOfShops();
setlocale(LC_ALL, 'rus');
date_default_timezone_set('Europe/Moscow');
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>

      <?php 
$pagetitle = SysApplication::getCurrentPage()->name;
if (!$pagetitle) {
    echo "Way Cup Coffee";
} else {
    echo "Way Cup Coffee" . " | " . $pagetitle;
}
?>

    </title>
    <script src="../js/jquery.js"></script>
    <script src="../js/main.js"></script>
    <script src="../js/bootstrap.min.js"></script> 
    <link href="../css/bootstrap.css" rel="stylesheet" media="screen">
    <link href="../css/style.css" rel="stylesheet" media="screen">
    <link rel="shortcut icon" type="image/x-icon" href="../img/icon.gif" />

  </head>