<?php

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", $fileToFolderEntity);
$form->addTitleForm("File to Folder Management");
$form->addSection('file details');
$form->addFile("file", "Scegli il file");
$main->setContent("body", $form->requestAction());
$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", $testEntity);
$form->addSection("Testimonial Management");
$form->addText("name", "Name", 60, MANDATORY);
$form->addPosition("posizione", "Posizione", "name");
$form->addText("edizione", "Edizione", 20, MANDATORY);
$form->addText("affiliazione", "Affiliazione", 60, MANDATORY);
$form->addFile("photo", "Foto");
$form->addTextarea("messaggio", "Messaggio", 10, 60);
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 #3
0
    function addItem_postInsertion()
    {
        /* controllare reload */
        $mail = new Template("dtml/user.mail");
        $mail->setContent("name", $_REQUEST['name']);
        $mail->setContent("username", $_REQUEST['username']);
        $mail->setContent("password", $_REQUEST['password']);
        $mail->setContent("message", $_REQUEST['message']);
        mail("{$_REQUEST['email']}", "{$GLOBALS['config']['website']['name']} Login data", $mail->get(), "From: {{$GLOBALS['config']['website']['email']}}");
    }
}
/* LOCAL END */
#if (isset($_SESSION['registered-user'])) {
#	$main = new Template("dtml_{$_SESSION['language']}/frame-public-2.html");
#} else {
#	$main = new Template("dtml/frame-private.html");
#}
$main = new Skin();
$form = new Form("dataEntry", $usersEntity);
$form->addSection("Modifica Password");
#$form1->addText("username", "username", 20, MANDATORY);
#$form1->addSection("personal data");
$form->addPassword("password", aux::lingual("Nuova Password", "New Password", "Nuova Password"));
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", $tagEntity);
$form->addSection("Tag Management");
$form->addText("tag", "Tag", 40, MANDATORY);
$form->addText("text", "Search Text", 40, MANDATORY);
$form->addPosition("position", "Position", "tag");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $catModuleEntity);
$form->addSection("Module Category Management");
$form->addText("name", "Name", 40, MANDATORY);
$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();
?>
 
<?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", $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":
<?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", $layerEntity);
$form->addSection("Layer Management");
$form->addText("title", "Title", 40, MANDATORY);
$form->addText("subtitle", "Subtitle", 40, MANDATORY);
$form->addEditor("description", "Text", 10, 50);
$form->addFile("foto", "Foto");
$form->addSelectFromReference2($bgEntity, "bg_id", "Background");
$form->addSelectFromReference2($pageEntity, "page_id", "Page");
$form->addPosition("position", "Order", "title");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $newsCatEntity);
$form->addSection("News Category Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addSelectFromReference2($newsCatEntity, "parent", "Parent");
$form->addHierarchicalPosition("position", "Position", "name", "parent");
$form->addEditor("description", "Description", 10, 70);
//$form->addPosition("position", "Order", "name");
$form->addFile("foto", "Foto");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $groupsEntity);
$form->addSection("Group Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addEditor("description", "Description", 17, 120);
$form_services = new Form("dataEntry2", $servicesGroupsRelation);
$form_services->addRelationManager("services", "Services", LEFT);
$form->triggers($form_services);
$form_users = new Form("dataEntry3", $usersGroupsRelation);
$form_users->addRelationManager("users", "Users", LEFT);
$form->triggers($form_users);
switch ($_REQUEST['action']) {
    case "add":
        $main->setContent("body", $form->addItem());
        break;
    case "edit":
        $main->setContent("body", $form->editItem());
        break;
}
$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", $fotoEntity);
$form->addSection("Photo Management");
$form->addText("title", "Title", 40, MANDATORY);
$form->addEditor("description", "Description", 20, 50);
$form->addFile("foto", "Foto");
//$form->addSelectFromReference2($galleryEntity, "name_gallery","Gallery Name", 100, MANDATORY);
$form->addHierarchicalPosition("position", "Order", "title", "id_gallery");
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 #11
0
<?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", $bgEntity);
$form->addSection("Background Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addFile("file", "Foto (1020x450)");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $sectionEntity);
$form->addSection("Section Management");
$form->addText("name", "Name", 40, MANDATORY);
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();
?>
 
    }
    function editItem_postFormFeed()
    {
    }
    function editItem_preUpdate()
    {
        $_REQUEST['metadata'] = json_encode($_REQUEST);
    }
    function addItem_postInsertion()
    {
        // boh
    }
}
$main = new Skin();
$form = new Form("dataEntry", $genEntity);
$form->addSection("Generics Management");
$form->AddText("name", "Name", 50, MANDATORY);
$form->AddText("description", "Description", 70);
$form->addText("metadata", "Metadata", 100, MANDATORY);
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

/**
 * Created by PhpStorm.
 * User: SS
 * Date: 09/01/2016
 * Time: 15.02
 */
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", $prodottiEntity);
$form->addSection("Prodotti Management");
$form->addText("item_name", "Nome", 40, MANDATORY);
$form->addText("tag", "TAG", 40);
$form->addText("price", "Prezzo", 40, MANDATORY);
$form->addText("portata", "Portata (es. PRIMO)", 40, MANDATORY);
$form_menu = new RelationForm("dataEntry2", $prodottimenuRelation);
$form->addSection("Seleziona Menu");
$form_menu->addRelationManager("menu_ristorante", "Menu");
$form->triggers($form_menu);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'edit';
}
$main->setContent("body", $form->requestAction());
$main->close();
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin("default");
$form = new Form("dataEntry", $eventicatEntity);
$form->addSection("Category Event Management");
$form->addSelectFromReference2($eventiEntity, "id_eventi", "Event", MANDATORY);
$form->addSelectFromReference2($categoriaEntity, "id_categoria", "Category", MANDATORY);
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin("default");
$form = new Form("dataEntry", $contattiEntity);
$form->addSection("Contact Management");
$form->addText("email", "email", 100, MANDATORY);
$form->addFile("Photo", "Foto");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $genEntity);
$form->addSection("Configurations Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addText("description", "Description", 60);
$form->addTextarea("metadata", "Metadata", 10, 80);
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

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", $sliderEntity);
$form->addTitleForm("Slider Management");
$form->addSection('slider details');
$form->addText("titolo", "Titolo", 40, MANDATORY);
$form->addText("descrizione", "Descrizione", 40);
$form->addText("width", "Largezza", 40, MANDATORY);
$form->addText("height", "Altezza", 40);
$relationForm = new RelationForm("dataEntry3", $imageSliderRelation);
$relationForm->addSection('Immagini da legare');
$relationForm->addRelationManager("id_sys_image", "Immagine", LEFT);
$form->triggers($relationForm);
$relationPageForm = new RelationForm("dataEntry3", $sliderPageRelation);
$relationPageForm->addSection('Pagine da legare');
$relationPageForm->addRelationManager("id_sys_page", "Pagine");
$form->triggers($relationPageForm);
$main->setContent("body", $form->requestAction());
$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("albumform", $albumEntity);
$form->addSection("Album Management");
$form->addText("title", "Album Name", 40, MANDATORY);
$form->addEditor("description", "Album Description", 10, 100);
$form->addPosition("position", "Order", "title");
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

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", $servicecategoryEntity);
$form->addSection("Service Category Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addPosition("position", "Ordering", "name");
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
$main->setContent("body", $form->requestAction());
$main->close();
?>
 
<?php

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", $groupsEntity);
$form->addTitleForm("Group Management");
$form->addSection('group details');
$form->addText("name", "Name", 40, MANDATORY);
$form->addEditor("description", "Description", 17, 60);
$form_services = new RelationForm("dataEntry2", $servicesGroupsRelation);
$form_services->addSection("Services");
$form_services->addRelationManager("services", "Services", LEFT);
$form->triggers($form_services);
$form_users = new RelationForm("dataEntry3", $usersGroupsRelation);
$form_users->addSection('Users');
$form_users->addRelationManager("users", "Users", LEFT);
$form->triggers($form_users);
$main->setContent("body", $form->requestAction());
$main->close();
<?php

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', $pageEntity);
$form->addSection('Page Management');
$form->addText('title', 'Titolo', 60, null, 60, true);
//$form->addTextarea('description', 'Description', 10, 50);
$form->addText('subtitle', 'Sottotitolo', 60);
$form->addText('link', 'Script Collegato', 255);
$form->addEditor('body', 'Corpo', 50, 50);
$form->addSelectFromReference($pageEntity, 'father', 'Padre');
//$form->addHierarchicalPosition('section', 'Sezione padre',MANDATORY,$sectionEntity);
$imageForm = new ImageForm('imageEntry', $pageEntity);
$imageForm->addImage('foto', 'Foto');
$form->triggers($imageForm);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'edit';
}
$main->setContent('body', $form->requestAction());
$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", $iconEntity);
$form->addSection("Iconogram Management");
$form->addText("name", "Name", 40, MANDATORY);
$form->addFile("icon", "Icon");
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

session_start();
require "include/beContent.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", $servicesEntity);
$form->addSection("Service Management");
$form->addText("name", "Name", 100, MANDATORY, 40, true);
$form->addText("script", "Script", 100, MANDATORY);
$form->addEditor("des", "Description", 15, 40);
$form->addSection("Menu");
$form->addText("entry", "Menu Entry", 100, MANDATORY);
$form->addHierarchicalPosition("servicecategory", "Position", MANDATORY, $servicecategoryEntity);
$form->addSelectFromReference2($entitiesEntity, "id_entities", "Entity");
$form->addSelectFromReference2($groupsEntity, "superuser_group", "Superuser Group");
$form_groups = new RelationForm("dataEntry2", $servicesGroupsRelation);
$form->addSection("Groups");
$form_groups->addRelationManager("groups", "Groups");
$form->triggers($form_groups);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
$main->setContent("body", $form->requestAction());
$main->close();
?>
 
<?php

/**
 * Created by PhpStorm.
 * User: SS
 * Date: 09/01/2016
 * Time: 14.57
 */
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", $categoriaristoranteEntity);
$form->addSection("Categoria Ristorante Management");
$form->addText("nome", "Nome", 40, MANDATORY);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = 'edit';
}
$main->setContent("body", $form->requestAction());
$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", $columnEntity);
$form->addSection("Column Management");
$form->addText("title", "Title", 40, MANDATORY);
$form->addEditor("description", "Text", 10, 50);
$form->addPosition("position", "Order", "title");
$form->addSelectFromReference2($iconEntity, "icon_id", "Icon");
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

/**
 * 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();
/* 

$channelEntity = new Entity($database,"bc_channel");
$channelEntity->setPresentation("title");
$channelEntity->addField("title",VARCHAR,50,MANDATORY);
$channelEntity->addField("link",VARCHAR,100,MANDATORY);
$channelEntity->addField("description",VARCHAR,150,MANDATORY);
$channelEntity->addReference($lanEntity, "language");

$channelEntity->addField("image_title",VARCHAR,50);
$channelEntity->addField("image_link",VARCHAR,100);
$channelEntity->addField("image",FILE);

$channelEntity->connect();
*/
$form->addSection("Image Management");
$form->addText("image_title", "Title", 50);
$form->addFile("image", "Image");
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

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $channelEntity);
$form->addSection("Picture Management");
$form->addText("title", "Title", 50, MANDATORY);
$form->addTextarea("description", "Description", 2, 100);
$form->addSelectFromReference2($albumEntity, "title_album", "Select Album", 100);
$form->addSelectFromReference2($usersEntity, "username_users", "Username", 100);
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

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();
?>