<?php

/**
 * Created by PhpStorm.
 * User: SS
 * Date: 09/01/2016
 * Time: 11.44
 */
session_start();
require "include/beContent.inc.php";
require_once 'include/content.inc.php';
require "include/auth.inc.php";
require_once realpath(dirname(__FILE__)) . '/include/view/template/InitGraphic.php';
$main = new Skin("system");
InitGraphic::getInstance()->createSystemGraphic($main);
$form = new Form("dataEntry", $gestionetavoliEntity);
$form->addSection("Tavoli");
$form->addText("n_sedie", "Numero sedie", 40, MANDATORY);
$form->addCheck("stato", "Occupato");
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'edit';
}
$main->setContent("body", $form->requestAction());
$main->close();
session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $servicesEntity, POST);
$form->addSection("Service Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addText("script", "Script", 60, MANDATORY);
$form->addEditor("des", "Description", 15, 40);
//$form->addFile("icon", "Icon");
$form->addSection("Menu");
$form->addText("entry", "Menu Entry", 40, MANDATORY);
$form->addSelectFromReference2($servicecategoryEntity, "servicecategory", "Category");
$form->addHierarchicalPosition("position", "Position", "name", "servicecategory");
$form->addCheck("Visible", ":visible:*:*");
$form->addSection("Data filtering");
$form->addSelectFromReference2($entitiesEntity, "id_entities", "Entity");
$form->restrictReference("id_entities", "owner = '1' or name = '{$usersEntity->name}' or name = '{$logEntity->name}'");
$form->addSelectFromReference2($groupsEntity, "superuser_group", "Superuser Group");
$form_groups = new Form("dataEntry2", $servicesGroupsRelation);
$form->addSection("Groups");
$form_groups->addRelationManager("groups", "Groups");
$form->triggers($form_groups);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
switch ($_REQUEST['action']) {
    case "add":
        $main->setContent("body", $form->addItem());
        break;
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $doodleEntity);
$form->addSection("Doodle Management");
$form->addText("name", "Name", MANDATORY);
$form->addFile("picture", "Picture");
$form->addCheck("Active", ":active:*:CHECKED");
$form->addPosition("position", "Order", "name");
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
switch ($_REQUEST['action']) {
    case "add":
        $main->setContent("body", $form->addItem());
        break;
    case "edit":
        $main->setContent("body", $form->editItem());
        break;
}
$main->close();
?>
 
Example #4
0
        $form->addPassword("password2", "Confirm password", 20, MANDATORY);
        $form->addValidation("password", "password2", EQUAL, "The passwords do not match!");
        break;
    case "foto":
        $form->addSection("Foto");
        $form->addFile("foto", "Foto");
        break;
    default:
        $form->addSection("Your Profile");
        $form->addText("username", "Username");
        $form->addText("email", "Email", 50, MANDATORY);
        $form->addText("name", "Name", 40, MANDATORY);
        $form->addText("surname", "Surname", 40, MANDATORY);
        $form->addText("phone", "Phone", 20, MANDATORY);
        $form->addText("fax", "Fax", 20, MANDATORY);
        $form->addFile("foto", "Foto");
        $form->addCheck("Newsletter", ":active_newsletter:*:CHECKED");
        $form->addSection("Password");
        $form->addPassword("password", "New password", 20, MANDATORY);
        $form->addPassword("password2", "Confirm password", 20, MANDATORY);
        $form->addValidation("password", "password2", EQUAL, "The passwords do not match!");
        break;
}
if (!isset($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
    $_REQUEST['value'] = $_SESSION['user']['username'];
}
$main->setContent("body", $form->editItem(NO_DELETE));
$main->close();
?>
 
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $newsEntity);
$form->addSection("News Management");
$form->addText("title", "Titolo", 80, MANDATORY);
$form->addLongDate("date", "Data", MANDATORY);
$form->addSelectFromReference2($newsCatEntity, "category", "Category", MANDATORY);
$form->addEditor("body", "Testo", 20, 50);
$form->addFile("picture", "Picture");
$form->addCheck("Attiva", ":active:*:CHECKED");
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
switch ($_REQUEST['action']) {
    case "add":
        $main->setContent("body", $form->addItem());
        break;
    case "edit":
        $main->setContent("body", $form->editItem());
        break;
}
$main->close();
?>
 
<?php

/**
 * @author dipompeodaniele@gmail.com, n.sacco.dev@gmail.com
 */
session_start();
require "include/beContent.inc.php";
require "include/auth.inc.php";
require_once 'include/content.inc.php';
require_once realpath(dirname(__FILE__)) . '/include/view/template/InitGraphic.php';
$main = new Skin("system");
InitGraphic::getInstance()->createSystemGraphic($main);
$form = new Form("dataEntry", $newsEntity);
$form->addSection("News Management");
$form->addText("title", "Titolo", 80, MANDATORY);
$form->addLongDate("date", "Data", MANDATORY);
$form->addEditor("body", "Testo", 20, 50);
$form->addCheck("active", "Attiva");
$main->setContent("body", $form->requestAction());
$main->close();