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