Example #1
0
$activation = recoverPOST("activation", $data[0]["Activation"]);
$emailRecieve = recoverPOST("email1", $data[0]["Email_Recieve"]);
$emailSend = recoverPOST("email2", $data[0]["Email_Send"]);
$situation = recoverPOST("situation", $data[0]["Situation"]);
$action = "edit";
$href = path($this->application . "/cpanel/edit");
print div("add-form", "class");
print formOpen($href, "form-add", "form-add");
print p(__(_(ucfirst(whichApplication()))), "resalt");
print isset($alert) ? $alert : NULL;
print formInput(array("name" => "name", "class" => "required span10", "field" => __(_("Name of the Website")), "p" => TRUE, "value" => $name));
print formInput(array("name" => "URL", "class" => "required span10", "field" => __(_("URL of the Website")), "p" => TRUE, "value" => $URL));
print formInput(array("name" => "slogan_spanish", "class" => "required span10", "field" => getLanguage("Spanish", TRUE) . " " . __(_("Slogan of the Website")), "p" => TRUE, "value" => $sloganEs));
print formInput(array("name" => "slogan_english", "class" => "required span10", "field" => getLanguage("English", TRUE) . " " . __(_("Slogan of the Website")), "p" => TRUE, "value" => $sloganEn));
print formInput(array("name" => "slogan_french", "class" => "required span10", "field" => getLanguage("French", TRUE) . " " . __(_("Slogan of the Website")), "p" => TRUE, "value" => $sloganFr));
print formInput(array("name" => "slogan_portuguese", "class" => "required span10", "field" => getLanguage("Portuguese", TRUE) . " " . __(_("Slogan of the Website")), "p" => TRUE, "value" => $sloganPt));
print formInput(array("name" => "email_recieve", "class" => "required span10", "field" => __(_("E-Mail for recieve notifications")), "p" => TRUE, "value" => $emailRecieve));
print formInput(array("name" => "email_send", "class" => "required span10", "field" => __(_("Email for send notifications")), "p" => TRUE, "value" => $emailSend));
print formSelect(array("name" => "theme", "class" => "required", "p" => TRUE, "field" => __(_("Default theme"))), $themes);
print formSelect(array("name" => "application", "class" => "required", "p" => TRUE, "field" => __(_("Default application"))), $defaultApplications);
$options = array(0 => array("value" => "Active", "option" => __(_("Active")), "selected" => $validation === "Active" ? TRUE : FALSE), 1 => array("value" => "Inactive", "option" => __(_("Inactive")), "selected" => $validation === "Inactive" ? TRUE : FALSE));
print formSelect(array("name" => "validation", "class" => "required", "p" => TRUE, "field" => __(_("Comments validations"))), $options);
$options = array(0 => array("value" => "User", "option" => __(_("User")), "selected" => $activation === "User" ? TRUE : FALSE), 1 => array("value" => "Admin", "option" => __(_("Administrator")), "selected" => $activation === "Admin" ? TRUE : FALSE));
print formSelect(array("name" => "activation", "class" => "required", "p" => TRUE, "field" => __(_("Accounts activation"))), $options);
$options = array(0 => array("value" => "Active", "option" => __(_("Active")), "selected" => $situation === "Active" ? TRUE : FALSE), 1 => array("value" => "Inactive", "option" => __(_("Inactive")), "selected" => $situation === "Inactive" ? TRUE : FALSE));
print formSelect(array("name" => "situation", "class" => "required", "p" => TRUE, "field" => __(_("Situation"))), $options);
print formTextarea(array("id" => "editor", "name" => "message", "class" => "required span10", "field" => __(_("Message when the Website is inactive")), "p" => TRUE, "value" => $message));
print formField(NULL, __(_("Languages")) . "<br />" . getLanguagesInput($language));
print formSave("edit");
print formClose();
print div(FALSE);
Example #2
0
$position = isset($data) ? recoverPOST("position", $data[0]["Position"]) : recoverPOST("position");
$code = isset($data) ? recoverPOST("code", $data[0]["Code"]) : recoverPOST("code");
$time = isset($data) ? recoverPOST("time", $data[0]["Time"]) : recoverPOST("time");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$principal = isset($data) ? recoverPOST("principal", $data[0]["Principal"]) : recoverPOST("principal");
$edit = isset($data) ? TRUE : FALSE;
$action = isset($data) ? "edit" : "save";
$href = isset($data) ? path(whichApplication() . "cpanel/{$action}/{$ID}/") : path(whichApplication() . "cpanel/add/");
print div("add-form", "class");
print formOpen($href, "form-add", "form-add");
print p(__(_(ucfirst(whichApplication()))), "resalt");
print isset($alert) ? $alert : NULL;
print formInput(array("name" => "title", "class" => "span10 required", "field" => __(_("Title")), "p" => TRUE, "value" => $title));
if (isset($banner)) {
    print __(_("If you change the banner image, this image will be deleted")) . "<br />";
    print img(path($banner, TRUE), array("alt" => "Banner", "class" => "no-border", "style" => "max-width: 780px;"));
    print formInput(array("name" => "banner", "type" => "hidden", "value" => $banner));
}
print formInput(array("type" => "file", "name" => "image", "class" => "required", "field" => __(_("Image")), "p" => TRUE));
$options = array(0 => array("value" => "Top", "option" => __(_("Top")) . " (960x100px)", "selected" => $position === "Top" ? TRUE : FALSE), 1 => array("value" => "Left", "option" => __(_("Left")) . " (120x600px, 250x250px)", "selected" => $position === "Left" ? TRUE : FALSE), 2 => array("value" => "Right", "option" => __(_("Right")) . " (120x600px, 250x250px)", "selected" => $position === "Right" ? TRUE : FALSE), 3 => array("value" => "Bottom", "option" => __(_("Bottom")) . " (960x100px)", "selected" => $position === "Bottom" ? TRUE : FALSE), 4 => array("value" => "Center", "option" => __(_("Center")) . " (600x100px)", "selected" => $position === "Center" ? TRUE : FALSE));
print formSelect(array("name" => "position", "class" => "required", "p" => TRUE, "field" => __(_("Position"))), $options);
print formInput(array("name" => "URL", "class" => "span10 required", "field" => __(_("URL")), "p" => TRUE, "value" => $URL));
print formTextarea(array("name" => "code", "class" => "span10 required", "style" => "height: 150px;", "field" => __(_("Code")), "p" => TRUE, "value" => $code));
$options = array(0 => array("value" => 1, "option" => __(_("Yes")), "selected" => (int) $principal === 1 ? TRUE : FALSE), 1 => array("value" => 0, "option" => __(_("No")), "selected" => (int) $principal === 0 ? TRUE : FALSE));
print formSelect(array("name" => "principal", "class" => "required", "p" => TRUE, "field" => __(_("Principal"))), $options);
$options = array(0 => array("value" => "Active", "option" => __(_("Active")), "selected" => $situation === "Active" ? TRUE : FALSE), 1 => array("value" => "Inactive", "option" => __(_("Inactive")), "selected" => $situation === "Inactive" ? TRUE : FALSE));
print formSelect(array("name" => "situation", "class" => "required", "p" => TRUE, "field" => __(_("Situation"))), $options);
print formSave($action);
print formInput(array("name" => "ID", "type" => "hidden", "value" => $ID));
print formClose();
print div(FALSE);
Example #3
0
//---------------------------
// programmer:	Jafarkhani
// create Date:	94.06
//---------------------------
require_once '../header.inc.php';
require_once 'form.class.php';
require_once inc_dataReader;
require_once inc_response;
$task = isset($_POST["task"]) ? $_POST["task"] : (isset($_GET["task"]) ? $_GET["task"] : "");
switch ($task) {
    case "formsSelect":
        formsSelect();
    case "formDelete":
        formDelete();
    case "formSave":
        formSave();
    case "RemoveFile":
        RemoveFile();
        //........................
    //........................
    case "SelectSteps":
        SelectSteps();
    case "SaveSteps":
        SaveSteps();
    case "DeleteStep":
        DeleteStep();
    case "ChangeLevel":
        ChangeLevel();
        //........................
    //........................
    case "SelectElements":