Ejemplo n.º 1
0
<?php

if (!defined("_access")) {
    die("Error: You don't have permission to access here...");
}
$ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Ad"]) : 0;
$title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title");
$banner = isset($data) ? recoverPOST("banner", $data[0]["Banner"]) : NULL;
$URL = isset($data) ? recoverPOST("URL", $data[0]["URL"]) : "http://";
$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));
Ejemplo n.º 2
0
<?php

if (!defined("_access")) {
    die("Error: You don't have permission to access here...");
}
$ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Post"]) : 0;
$ID_URL = isset($data) ? recoverPOST("ID_URL", $data[0]["ID_URL"]) : recoverPOST("ID_URL");
$title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title");
$content = isset($data) ? recoverPOST("content", $data[0]["Content"]) : recoverPOST("content");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$language = isset($data) ? recoverPOST("language", $data[0]["Language"]) : recoverPOST("language");
$pwd = isset($data) ? recoverPOST("pwd", $data[0]["Pwd"]) : recoverPOST("pwd");
$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));
print formTextarea(array("id" => "editor", "name" => "content", "class" => "span10", "style" => "height: 400px;", "field" => __(_("Content")), "p" => TRUE, "value" => $content));
$vars["application"] = isset($application) ? $application : NULL;
$vars["categories"] = isset($categories) ? $categories : NULL;
$vars["categoriesRadio"] = isset($categoriesRadio) ? $categoriesRadio : NULL;
$this->view("categories", $vars, "categories");
print isset($imagesLibrary) ? $imagesLibrary : NULL;
print isset($documentsLibrary) ? $documentsLibrary : NULL;
?>
			<div id="file-uploader">		
				<noscript>			
					<p>Please enable JavaScript to use file uploader.</p>
Ejemplo n.º 3
0
<?php

if (!defined("_access")) {
    die("Error: You don't have permission to access here...");
}
$ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Image"]) : 0;
$title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title");
$description = isset($data) ? recoverPOST("description", $data[0]["Description"]) : recoverPOST("description");
$category = isset($data) ? recoverPOST("category", $data[0]["Album"]) : recoverPOST("category");
$ID_Category = isset($data) ? recoverPOST("ID_Category", $data[0]["ID_Category"]) : recoverPOST("ID_Category");
$medium = isset($data) ? recoverPOST("medium", $data[0]["Medium"]) : recoverPOST("medium");
$situation = isset($data) ? recoverPOST("situation", $data[0]["Situation"]) : recoverPOST("situation");
$edit = isset($data) ? TRUE : FALSE;
$action = isset($data) ? "edit" : "save";
$href = isset($data) ? path($this->application . "/cpanel/edit/{$ID}") : path($this->application . "/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));
print formTextarea(array("name" => "description", "class" => "span10 required", "style" => "height: 150px;", "field" => __(_("Description")), "p" => TRUE, "value" => $description));
if ($medium) {
    print p(img(_webURL . _sh . $medium), "field");
}
if ($action === "save") {
    print formInput(array("name" => "files[]", "type" => "file", "class" => "add-img required", "field" => __(_("Image")), "p" => TRUE));
    print span(FALSE, "&nbsp;&nbsp;&nbsp;&nbsp;", "add-img");
} else {
    print formInput(array("name" => "file", "type" => "file", "class" => "required", "field" => __(_("Image")), "p" => TRUE));
}
print formInput(array("name" => "category", "class" => "span10 required", "field" => __(_("Album")) . " (" . __(_("Write a album or select")) . ")", "p" => TRUE));
Ejemplo n.º 4
0
<?php

if (!defined("_access")) {
    die("Error: You don't have permission to access here...");
}
$ID_Application = 3;
$ID_Record = $ID_Post;
$comment = recoverPOST("comment");
$website = recoverPOST("website");
$email = recoverPOST("email");
$name = SESSION("ZanUser") ? NULL : recoverPOST("name");
$username = SESSION("ZanUser") ? SESSION("ZanUser") : NULL;
$ID_User = SESSION("ZanUserID") ? (int) SESSION("ZanUserID") : 0;
?>

<div id="comments-header">
	<span class="comments-header uppercase bold"><?php 
print __(_("Comments"));
?>
</span>
</div>

<div id="comments">
	<?php 
if ($dataComments) {
    ?>
		<?php 
    foreach ($dataComments as $comment) {
        ?>
			<div class="comment">
			
Ejemplo n.º 5
0
if (!defined("_access")) {
    die("Error: You don't have permission to access here...");
}
if (isset($data)) {
    $ID = recoverPOST("ID", $data[0]["ID_Video"]);
    $URL = recoverPOST("URL", $data[0]["URL"]);
    $ID_YouTube = recoverPOST("ID_YouTube", $data[0]["ID_YouTube"]);
    $title = recoverPOST("title", $data[0]["Title"]);
    $description = recoverPOST("description", $data[0]["Description"]);
    $situation = recoverPOST("situation", $data[0]["Situation"]);
    $edit = TRUE;
    $action = "edit";
} else {
    $ID = 0;
    $URL = recoverPOST("URL");
    $situation = recoverPOST("situation");
    $edit = FALSE;
    $action = "save";
}
$selected = 'selected="selected"';
?>

<div class="add-form">
	<form id="form-add" class="form-add" action="<?php 
print $href;
?>
" method="post" enctype="multipart/form-data">
		<fieldset>
			<legend><?php 
print __(_("Add Video"));
?>
Ejemplo n.º 6
0
    $defult = recoverPOST("defult", $data[0]["BeDefault"]);
    $category = recoverPOST("category", $data[0]["Category"]);
    $comments = recoverPOST("comments", $data[0]["Comments"]);
    $state = recoverPOST("state", $data[0]["State"]);
    $edit = TRUE;
    $action = "edit";
    $href = _webBase . _sh . _webLang . _sh . _cpanel . _sh . segment(2) . _sh . _action . _sh . $action . _sh . $ID . _sh;
} else {
    $ID = 0;
    $title = recoverPOST("title");
    $cpanel = recoverPOST("cpanel");
    $adding = recoverPOST("adding");
    $defult = recoverPOST("defult");
    $category = recoverPOST("category");
    $comments = recoverPOST("comments");
    $state = recoverPOST("state");
    $edit = FALSE;
    $action = "save";
    $href = _webBase . _sh . _webLang . _sh . _cpanel . _sh . segment(2) . _sh . _action . _sh . $action . _sh;
}
?>

<div class="add-form">
	<form id="form-add" class="form-add" action="<?php 
print $href;
?>
" method="post" enctype="multipart/form-data">
		<fieldset>
			<legend><?php 
print __("Add Application");
?>
Ejemplo n.º 7
0
$name = recoverPOST("name", $data[0]["Name"]);
$sloganEn = recoverPOST("slogan_en", $data[0]["Slogan_English"]);
$sloganEs = recoverPOST("slogan_es", $data[0]["Slogan_Spanish"]);
$sloganFr = recoverPOST("slogan_fr", $data[0]["Slogan_French"]);
$sloganPt = recoverPOST("slogan_pt", $data[0]["Slogan_Portuguese"]);
$URL = recoverPOST("URL", $data[0]["URL"]);
$language = recoverPOST("language", $data[0]["Language"]);
$theme = recoverPOST("theme", $data[0]["Theme"]);
$gallery = recoverPOST("gallery", $data[0]["Gallery"]);
$validation = recoverPOST("validation", $data[0]["Validation"]);
$application = recoverPOST("application", $data[0]["Application"]);
$message = recoverPOST("message", $data[0]["Message"]);
$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);
Ejemplo n.º 8
0
    $ID = recoverPOST("ID", $data[0]["ID_Page"]);
    $title = recoverPOST("title", $data[0]["Title"]);
    $content = recoverPOST("content", $data[0]["Content"]);
    $situation = recoverPOST("situation", $data[0]["Situation"]);
    $principal = recoverPOST("principal", $data[0]["Principal"]);
    $language = recoverPOST("language", $data[0]["Language"]);
    $edit = TRUE;
    $action = "edit";
    $href = path(whichApplication() . _sh . "cpanel" . _sh . $action . _sh . $ID . _sh);
} else {
    $ID = 0;
    $title = recoverPOST("title");
    $content = recoverPOST("content");
    $situation = recoverPOST("situation");
    $principal = recoverPOST("principal");
    $language = recoverPOST("language");
    $edit = FALSE;
    $action = "save";
    $href = path(whichApplication() . _sh . "cpanel" . _sh . "add" . _sh);
}
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("type" => "text", "name" => "title", "class" => "span10 required", "field" => __(_("Title")), "p" => TRUE, "value" => $title));
print formTextarea(array("id" => "editor", "name" => "content", "class" => "span10", "style" => "height: 400px;", "field" => __(_("Content")), "p" => TRUE, "value" => $content));
print formField(NULL, __("Languages") . "<br />" . getLanguagesInput($language));
$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);
Ejemplo n.º 9
0
 public function build()
 {
     $HTML = NULL;
     $hide = FALSE;
     $option = FALSE;
     foreach ($this->columns as $column) {
         if (!in_array($column["Field"], $this->hide)) {
             if (count($this->hide) > 0) {
                 if ($this->hideString and !$hide) {
                     $attributes = array("type" => "hidden", "name" => "_hide", "value" => base64_encode($this->hideString));
                     $HTML .= formInput($attributes);
                     unset($attributes);
                     $hide = TRUE;
                 }
             }
             if ($this->type($column["Type"]) === "string") {
                 $attributes = array("type" => "text", "name" => $column["Field"], "class" => "input", "field" => $this->rename($column["Field"]), "p" => TRUE, "value" => !$this->success ? recoverPOST($column["Field"]) : NULL);
                 if (isset($this->options)) {
                     if (!$option) {
                         $HTML .= formInput(array("type" => "hidden", "name" => "_options", "value" => base64_encode(serialize($this->options))));
                         $option = TRUE;
                     }
                     if (isset($this->options[$column["Field"]])) {
                         if ($this->options[$column["Field"]]["type"] === "select") {
                             $attrs = array("name" => $column["Field"], "class" => "select", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formSelect($attrs, $this->options[$column["Field"]]["options"]);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "radio") {
                             $attrs = array("name" => $column["Field"], "class" => "radio", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formRadio($attrs, $this->options[$column["Field"]]["options"]);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "password") {
                             $attrs = array("name" => $column["Field"], "type" => "password", "class" => "input", "field" => $this->rename($column["Field"]), "p" => TRUE);
                             $HTML .= formInput($attrs);
                             unset($attrs);
                         } elseif ($this->options[$column["Field"]]["type"] === "hidden") {
                             $attrs = array("name" => $column["Field"], "type" => "hidden", "value" => isset($this->options[$column["Field"]]["value"]) ? $this->options[$column["Field"]]["value"] : NULL);
                             $HTML .= formInput($attrs);
                             unset($attrs);
                         }
                     } else {
                         $HTML .= formInput($attributes);
                     }
                 } else {
                     $HTML .= formInput($attributes);
                 }
                 unset($attributes);
             } elseif ($this->type($column["Type"]) === "text") {
                 $attributes = array("name" => $column["Field"], "class" => "editor textarea", "field" => $this->rename($column["Field"]), "p" => TRUE, "value" => !$this->success ? recoverPOST($column["Field"]) : NULL);
                 $HTML .= formTextarea($attributes);
             }
         }
     }
     $HTML .= p(TRUE, "center");
     $attributes = array("type" => "submit", "name" => "save", "value" => __("Save"), "class" => "submit");
     $HTML .= formInput($attributes);
     unset($attributes);
     $attributes = array("type" => "submit", "name" => "cancel", "value" => __("Cancel"), "class" => "submit");
     $HTML .= formInput($attributes);
     unset($attributes);
     $HTML .= p(FALSE);
     $HTML .= formClose();
     return $HTML;
 }
Ejemplo n.º 10
0
				<p class="field">&raquo; <?php 
print __(_("E-Mail"));
?>
<br />
					<input name="email" type="text" class="required" value="<?php 
print recoverPOST("email");
?>
" tabindex="2" />
				</p>
			
				<p class="field">&raquo; <?php 
print __(_("Message"));
?>
<br />
					<textarea id="editor" name="message" class="required" tabindex="3">
						<?php 
print recoverPOST("message");
?>
					</textarea>
				</p>
				
				<p>
					<input name="send" type="submit" value="<?php 
print __(_("Send"));
?>
" tabindex="4" class="btn sucess" />
				</p>  
			</div>			
		</fieldset>
	</form>
</div>