<div class="login"><a title="Login" href="login.php">Login</a></div><?php } ?> <form method="post" name="protocolForm" action="protocol.php"> <table align="center" class="view" cellpadding="2" cellspacing="0"> <tr> <td width="23%" class="contrast"><label for="protocol">Protocol:</label></td> <td width="77%"><?php formField("text", "protocol", $row_rsProtocols['protocol'], "32", "255", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsProtocols['notes'], "50", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" name="add" id="add" value="Add Protocol" /><?php sentSuccessful("Protocol added successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" name="update" id="update" value="Update Protocol" /><?php sentSuccessful("Protocol updated successfully!");
\t\t\t\t\t<small>{$time}</small> \t\t\t\t\t</div> EOF; } if (isset($_GET['onlychat' . $k])) { for ($i = $ONLYCHAT; $i < count($HTML); $i++) { echo $HTML[$i]; } die; } $HTML[] = '</div><a name="chat' . $k . '"></a>'; formHeader(""); formField("", "user1", "hidden", "{$v['user']}"); formField("", "pos", "hidden", "{$k}"); formField("", "role", "hidden", "traveler"); formField("", "chat", "textarea"); formFooter("Send message"); $HTML[] = <<<EOF \t\t\t<script> \t\t\t\tsetInterval(function(){ \t\t\t\t \$('#chat-box{$k}').load('?product_request/view/{$ID}/&onlychat{$k}'); \t\t\t\t }, 60000); \t\t\t</script> \t\t\t</div> EOF; } else { /*$HTML[] = <<<EOF <div class="content-box medium redback"> <h1>Request has been rejected</h1> </div> EOF;*/
<form action="datacenter.php" method="post" name="datacenterForm" id="datacenterForm"> <table class="<?php echo $_GET['function']; ?> " align="center" cellspacing="0" cellpadding="2"> <tr> <td class="contrast"><label for="datacenter">Datacenter:</label></td> <td><?php formField("text", "datacenter", $row_rsDatacenters['datacenter'], "32", "255", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsDatacenters['notes'], "50", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" name="add" id="add" value="Add Datacenter" /><?php sentSuccessful("Datacenter added successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" name="update" id="update" value="Update Datacenter" /><?php sentSuccessful("Datacenter updated successfully!");
?> </select> <?php } else { echo $row_rsEmployees['group']; } ?> </td> </tr> <?php } ?> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsEmployees['notes'], "30", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "update" || $_GET['function'] == "add") { ?> <tr> <td class="contrast"><label for="password">Password:</label></td> <td><input type="password" name="password" id="password" value="<?php echo $row_rsEmployees['password']; ?> " size="20" maxlength="15" /></td> </tr> <?php }
?> <div align="center"> <div class="casing" align="left"> <form name="appForm" id="appForm" method="post" action="application.php"> <table class="update" align="center" cellspacing="0" cellpadding="2"> <tr> <td class="contrast"><label for="application">Application:</label></td> <td><?php formField("text", "application", $row_rsApps['application'], "32", "255", null, null, "1"); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsApps['notes'], "50", null, "5", "virtual", "2"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" name="add" id="add" value="Add Application" /><?php sentSuccessful("Application added successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" name="update" id="update" value="Update Application" /><?php sentSuccessful("Application updated successfully!");
<?php if (isset($tags)) { $var["tags"] = $tags; $this->view("tags", $var, "tags"); } else { $this->view("tags", NULL, "tags"); } print formField(NULL, __(_("Language of the post")) . "<br />" . getLanguagesInput($language, "language", "select")); $options = array(0 => array("value" => 1, "option" => __(_("Yes")), "selected" => TRUE), 1 => array("value" => 0, "option" => __(_("No")))); print formSelect(array("name" => "enable_comments", "class" => "required", "p" => TRUE, "field" => __(_("Enable Comments"))), $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", "p" => TRUE, "class" => "required", "field" => __(_("Situation"))), $options); if (!isset($pwd)) { print formInput(array("name" => "pwd", "class" => "span10", "field" => __(_("Password")), "p" => TRUE, "value" => $pwd)); } else { print formField(NULL, __(_("Password")) . "<br />"); print formInput(array("id" => "lock", "class" => "lock", "type" => "button")); print formInput(array("id" => "password", "type" => "hidden", "value" => $pwd)); } print formInput(array("type" => "file", "name" => "image", "field" => __(_("Image for this post")), "p" => TRUE)); if (isset($medium)) { print img(path($medium, TRUE)); } print formInput(array("type" => "file", "name" => "mural", "class" => "required", "field" => __(_("Mural image")) . " (" . _muralSize . ")", "p" => TRUE)); if (isset($muralImage) and is_array($muralImage)) { print formInput(array("type" => "hidden", "name" => "mural_exist", "class" => "span10", "field" => __(_("Current mural image")), "p" => TRUE)); print img(path($muralImage[0]["Image"], TRUE), array("style" => "width: 98%; border: 1px solid #000;")); print $this->js("var URL = '{$muralDeleteURL}';", TRUE); print formInput(array("type" => "submit", "id" => "delete_mural", "name" => "delete_mural_image", "value" => __(_("Delete Mural")), "class" => "btn error", "p" => TRUE)); } print formSave($action);
?> <div align="center"> <div class="casing" align="left"> <form method="post" name="networkType" action="networkType.php"> <table class="update" cellspacing="0" align="center"> <tr> <td class="contrast"><label>Network Type:</label></td> <td><?php formField("text", "networkType", $row_rsNetworkTypes['networkType'], "32", "255", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label>Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsNetworkTypes['notes'], "50", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" name="update" id="update" value="Update Network Type" /><?php sentSuccessful("Network Type Updated Successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" name="add" id="add" value="Add Network Type" /><?php sentSuccessful("Network Type Updated Successfully!");
<form action="customerType.php" method="post" name="customerTypeForm" id="customerTypeForm"> <table class="<?php echo $_GET['function']; ?> " align="center" cellspacing="0" cellpadding="2"> <tr> <td width="109" class="contrast"><label for="customerType">Customer Type:</label></td> <td><?php formField("text", "customerType", $row_rsCustomerType['customerType'], "32", "255", null, null, "1"); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsCustomerType['notes'], "50", null, "5", "virtual", "2"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" name="add" id="add" value="Add Customer Type" /><?php sentSuccessful("Customer Type Added Successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" name="update" id="update" value="Update Customer Type" /><?php sentSuccessful("Customer Type Updated Successfully!");
<?php if (!defined("_access")) { die("Error: You don't have permission to access here..."); } $ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Forum"]) : 0; $title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title"); $description = isset($data) ? recoverPOST("description", $data[0]["Description"]) : recoverPOST("description"); $language = isset($data) ? recoverPOST("language", $data[0]["Language"]) : recoverPOST("language"); $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)); print formField(NULL, __(_("Languages")) . "<br />" . getLanguageRadios($language)); $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);
?> <div align="center"> <div class="casing" align="left"> <form method="post" name="subApplicationForm" action="subapplication.php"> <table align="center" cellpadding="2" cellspacing="0" class="add"> <tr> <td class="contrast"><label>Subapplication:</label></td> <td><?php formField("text", "subapplication", $row_rsSubapplications['subapplication'], "32", "255", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label>Notes:</label></td> <td><?php formField("textarea", "notes", $row_rsSubapplications['notes'], "50", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="2"><input type="submit" value="Add Subapplication" /></td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="2"><input type="submit" value="Update Subapplication" /></td></tr> <?php } ?> </table>
function formRegister($provider, $nickname, $firstname, $last_name, $email, $provider_user_id) { $str = "\n <form id='form-register>\n <div id='form-register-div' class='pr'>\n <div class='form-title'>Register</div>"; $str .= formField($provider, "Nickname", "text", "nickname", "nickname", $nickname); $str .= formField($provider, "First name", "text", "firstname", "firstname", $firstname); $str .= formField($provider, "Last name", "text", "lastname", "lastname", $last_name); $str .= formField($provider, "Email", "text", "email", "email", $email); if ($provider) { $str .= formField($provider, "Retype email", "text", "email2", "email2", ""); } $str .= formField($provider, "Password", "password", "password", "password", ""); $str .= formField($provider, "Password2", "password", "password2", "password2", ""); $str .= "\n <div><a id='register' href='#' rel='Register' class='button button-primary button-small'>Register</a></div>\n </div>\n </form>"; return $str; }
buildHeader("reportType", "Report Types", "reportType", "Update a Report Type", "Add a Report Type"); } else { buildHeader("reportType", "Report Types", "reportType", "View Report Type", "Add a Report Type"); } ?> <div align="center"> <div class="casing"><br /> <form method="post" name="reportTypeUpdate" action="<?php echo $editFormAction; ?> "> <table class="update" cellspacing="0" align="center"> <tr> <td nowrap="nowrap" class="contrast"><label for="reportType">Report Type:</label></td> <td><?php formField("text", "reportType", $row_rsReportTypes['reportType'], "32", "255", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td><?php if ($_GET['function'] == "update") { echo "<textarea name=\"notes\" id=\"notes\" cols=\"50\" rows=\"5\" wrap=\"virtual\">"; } echo stripslashes($row_rsReportTypes['notes']); if ($_GET['function'] == "update") { echo "</textarea>"; } ?> </td>
\t\t\t<a href="?travel_plan/{$ACTION}/{$ID}/&confirm" class="btn btn-danger">Yes</a> \t\t\t \t\t\t<a href="#" onClick="history.go(-1)">No</a> \t\t</div> EOF; } } if ($ACTION != "delete") { /** add form */ formHeader($ACTION == "add" ? "Add new travel plan" : "Edit existing travel plan"); formField("From", "from", "text", "", "Departure"); formField("To", "to", "text", "", "Arrival"); formField("Date", "date", "text", "", "Date of departure"); // formField("Package size", "size", "text", "", "Package dimensions (WxHxD)"); // formField("Weight", "weight", "text", "", "Maximum lugage weight"); // formField("Hand luggage", "handluggage", "checkbox", "", " Some of the items might be restricted"); formField("Additional informations", "description", "textarea"); formFooter($ACTION == "add" ? "Add new plan" : "Modify plan"); $HTML[] = <<<EOF \t<script> \t\$( "#from" ).autocomplete({ \t\tsource: "ajax/cities.php", \t\tminLength: 2 \t}); \t\$( "#to" ).autocomplete({ \t\tsource: "ajax/cities.php", \t\tminLength: 2 \t}); \t</script> EOF; }
EOF; } } if ($ACTION != "delete") { /** add form */ formHeader($ACTION == "add" ? "Add new product request" : "Edit existing product request"); formField("From", "from", "text", "", "From"); formField("To", "to", "text", "", "To"); formField("Requests ends", "date", "text", "", "When would request end"); // formField("Approximate package size", "size", "text", "", "Package dimensions (WxHxD)"); // formField("Aprroximate Weight", "weight", "text", "", "Maximum lugage weight"); //formField("Hand luggage", "handluggage", "checkbox", "", " Item is allowed"); // formField("", "fragile", "checkbox", "", " Product is fragile, handle with care"); // formField("", "solid", "checkbox", "", " Product is solid"); // formField("", "liquid", "checkbox", "", " Product is liquid"); formField("Description of product(s)", "description", "textarea"); formField("You can add picture of the item", "picture", "file"); formFooter($ACTION == "add" ? "Add new product request" : "Modify existing product request"); $HTML[] = <<<EOF \t<script> \t\$( "#from" ).autocomplete({ \t\tsource: "ajax/cities.php", \t\tminLength: 2 \t}); \t\$( "#to" ).autocomplete({ \t\tsource: "ajax/cities.php", \t\tminLength: 2 \t}); \t</script> EOF; }
<?php if (isset($_POST['submit'])) { if (strlen($_POST['feedback']) > 3) { $feedback = $db->feedback; $_POST['user'] = $_SESSION['user']; $_POST['fb_id'] = $_SESSION['fb_id']; $_POST['fb_name'] = $_SESSION['fb_name']; $_POST['date'] = date("Y-m-d H:i:s"); $_POST['update'] = microtime(true); $feedback->insert($_POST); $SUCCESS[] = "Your feedback has been successfully added"; header("Location: ?livefeedback/added"); } else { $ERROR[] = "Messages is too short"; } } if ($ACTION == "added") { $HTML[] = <<<EOF \t\t<h1>Thank you for submitting feedback</h1> \t\t<p><br>Your feedback is valuable for us. <a href="?front_search">Go to search!</a></p> EOF; } else { formHeader("Give us feedback to improve our service"); formField("Your suggestions and feedback", "feedback", "textarea", ""); formFooter("Send feedback"); }
<td colspan="2"><?php if ($_GET['function'] == "add") { ?> <input type="file" name="filename" id="filename" size="40" /><?php } elseif ($_GET['function'] == "update") { echo "<input type=\"text\" name=\"filename\" id=\"filename\" size=\"55\" value=\"" . $row_rsFileUploads['filename'] . "\" />"; } else { echo "<a href=\"" . $row_rsFileUploads['filename'] . "\">" . $row_rsFileUploads['filename'] . "</a>"; } ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="description">Description:</label></td> <td colspan="2"><?php formField("textarea", "description", $row_rsFileUploads['description'], "75", null, "7", "virtual"); ?> </td> </tr> <tr class="button"> <td colspan="3"><input type="submit" name="submit" id="submit" value="Submit File" /><?php sentSuccessful("Thanks for contributing! Your uploaded file will be reviewed as soon as possible, <br />and you will be contacted, if necessary."); ?> </td> </tr> </table> <?php if ($_GET['function'] == "add") { echo "<input type=\"hidden\" name=\"MM_insert\" value=\"fileUploadAdd\" />"; } elseif ($_GET['function'] == "update") { echo "<input type=\"hidden\" name=\"MM_update\" value=\"fileUploadUpdate\" />";
<tr> <td class="contrast"><label for="zone">Zone:</label></td> <td><?php formField("text", "zone", $row_rsCountries['zone'], "3", "3", null, null); ?> </td> <td class="contrast"><label for="digits">Digits:</label></td> <td><?php formField("text", "digits", $row_rsCountries['digits'], "5", "5", null, null); ?> </td> </tr> <tr> <td valign="top" class="contrast"><label for="notes">Notes:</label></td> <td colspan="3"><?php formField("textarea", "notes", $row_rsCountries['notes'], "45", null, "5", "virtual"); ?> </td> </tr> <?php if ($_GET['function'] == "add") { ?> <tr class="button"><td colspan="4"><input type="submit" name="add" id="add" value="Add Country" /><?php sentSuccessful("Country added successfully!"); ?> </td></tr> <?php } elseif ($_GET['function'] == "update") { ?> <tr class="button"><td colspan="4"><input type="submit" name="update" id="update" value="Update Country" /><?php sentSuccessful("Country updated successfully!");
public function getLibrary($type) { $this->type = $type; $action = NULL; if (POST("iDelete") and POST("iLibrary")) { $this->getAction("iDelete", POST("iLibrary")); } elseif (POST("dDelete") and POST("dLibrary")) { $this->getAction("dDelete", POST("dLibrary")); } elseif (POST("iMake")) { $this->getAction("make", FALSE, POST("iDir", "clean"), POST("iDirname", "clean")); } elseif (POST("dMake")) { $this->getAction("make", FALSE, POST("dDir", "clean"), POST("dDirname", "clean")); } if ($type === "images") { $this->px = "i"; $this->path = "www/lib/files/images/uploaded/"; $text = __(_("Images library")); } elseif ($type === "documents") { $this->px = "d"; $this->path = "www/lib/files/documents/uploaded/"; $text = __(_("Documents library")); } $action = segment(0, isLang()) . _sh . segment(1, isLang()) . _sh . segment(2, isLang()); $href = segment(0, isLang()) . _sh . segment(1, isLang()); $URL = path(); $alert = "onclick=\"document.getElementById('form-add').target='';"; $alert .= "document.getElementById('form-add').action='" . $URL . $action . "/#" . $this->px . "Library';"; $alert .= "return confirm('" . __(_("Do you want to delete the file?")) . "');\""; $event = "onclick=\"document.getElementById('form-add').target=''; "; $event .= "document.getElementById('form-add').action='" . $URL . $action . _sh . "#" . $this->px . "Library';\""; $path = path($href . "/upload/" . strtolower($this->type) . "/#" . $this->px . "Library"); $target = "document.getElementById('form-add').target='" . $this->px . "Upload'; "; $action = "document.getElementById('form-add').action='" . $path . "'; "; $submit = "javascript:submit(); "; $eventUpload = 'onclick="' . $target . $action . $submit . '"'; $HTML = a($this->px . "Library"); if ($this->type === "images") { $aEvents = "onclick=\"showElement(document.getElementById('" . $this->px . "-library'));\" title=\"" . __(_("Click to show or hide")) . "\" class=\"pointer\""; } else { $aEvents = "onclick=\"showElement(document.getElementById('" . $this->px . "-library1'));\" title=\"" . __(_("Click to show or hide")) . "\" class=\"pointer\""; } $HTML .= formField($aEvents, $text); if ($this->type === "images") { if (POST("iGo") or POST("iMake") or POST("iDelete")) { $HTML .= div($this->px . "-library"); } else { $HTML .= div($this->px . "-library", "id/class", "no-display"); } } else { if (POST("dGo") or POST("dMake") or POST("dDelete")) { $HTML .= div($this->px . "-library1"); } else { $HTML .= div($this->px . "-library1", "id/class", "no-display"); } } $HTML .= div("extra", "class"); $selected = NULL; if (POST($this->px . "Dirbase")) { if (POST($this->px . "Dirbase") !== $this->path) { $dir = str_replace($this->path, "/", POST($this->px . "Dirbase")); $selected = '<option value="' . POST($this->px . "Dirbase") . '" selected="selected">' . $dir . '</option>'; } } if ($type === "images") { if (POST("iMake") and POST("iDirname") != "") { if (POST("iDirname") !== $this->path) { $dir = str_replace($this->path, "/", POST("iDir")); $selected = '<option value="' . POST("iDir") . slug(POST("iDirname")) . '/" selected="selected">'; $selected .= $dir . slug(POST("iDirname")) . '/</option>'; } } } elseif ($type === "documents") { if (POST("dMake") and POST("dDirname") !== "") { if (POST("dDirname") !== $this->path) { $dir = str_replace($this->path, "/", POST("dDir")); $selected = '<option value="' . POST("dDir") . slug(POST("dDirname")) . '/" selected="selected">'; $selected .= $dir . slug(POST("dDirname")) . '/</option>'; } } } $value = POST($this->px . "Dirbase") ? POST($this->px . "Dirbase") : $this->path; $value = POST($this->px . "Make") ? POST($this->px . "Dir") . slug(POST($this->px . "Dirname")) : $value; $parts = explode("/", $value); if (count($parts) > 0) { $part = NULL; for ($i = 0; $i <= count($parts) - 1; $i++) { $part .= slug($parts[$i]) . "/"; } $part = str_replace("//", "/", $part); } $attributes = array("name" => $this->px . "Dir", "value" => $part, "type" => "hidden"); $HTML .= formInput($attributes); $attributes = array("name" => $this->px . "Px", "value" => $this->px, "type" => "hidden"); $HTML .= formInput($attributes); $attributes = array("name" => $this->px . "Application", "value" => $this->application, "type" => "hidden"); $HTML .= formInput($attributes); $attributes = array("name" => $this->px . "Path", "value" => $this->path, "type" => "hidden"); $HTML .= formInput($attributes); if (SESSION("ZanUserPrivilegeID") < 3) { $attributes = array("name" => $this->px . "Dirname", "type" => "text", "class" => "required"); $HTML .= formInput($attributes); $attributes = array("name" => $this->px . "Make", "value" => __(_("Make directory")), "type" => "submit", "class" => "btn btn-info", "events" => $event); $HTML .= formInput($attributes); if (count($this->getDirs($this->path)) > 1) { $attributes = array("name" => $this->px . "Dirbase", "class" => "required"); $HTML .= formSelect($attributes, $this->getDirs($this->path), $selected); $attributes = array("name" => $this->px . "Go", "value" => __(_("Go")), "type" => "submit", "class" => "btn btn-warning", "events" => $event); $HTML .= formInput($attributes); $HTML .= br(); } else { $HTML .= br(); } $HTML .= small(span("bold", __(_("The new folders will be created and the files will be uploaded in")) . ": ") . $part); $HTML .= br(); if ($type === "images") { $HTML .= small(span("bold", __(_("Support files"))) . ": jpg, jpeg, png, gif " . __(_("and")) . " bmp."); } elseif ($type === "documents") { $formats = "csv, doc, docx, exe, pdf, ppt, pptx, rar, xls, xlsx " . __(_("and")) . " zip"; $HTML .= small(span("bold", __(_("Support files"))) . ": " . $formats); } $HTML .= "<br />"; } $HTML .= div(FALSE); $HTML .= div("library", "class"); $HTML .= $this->getFiles($type); $HTML .= div(FALSE); $HTML .= div($this->px . "-upload-message", TRUE); $HTML .= formUploadFrame($this->px, $eventUpload); if (SESSION("ZanUserPrivilegeID") < 3) { $attributes = array("name" => $this->px . "Delete", "value" => __(_("Delete")), "type" => "submit", "class" => "btn btn-danger", "events" => $alert); $HTML .= formInput($attributes); } $HTML .= div(FALSE); return $HTML; }
function formRegister($provider, $nickname, $firstname, $lastname, $email, $provider_user_id) { $operation = "<input id='operation' type='hidden' name='operation' value=''>"; $nickname = formField(_("Nickname"), "text", "nickname", "nickname", ""); $firstname = formField(_("First Name"), "text", "firstname", "firstname", $firstname); $lastname = formField(_("Last Name"), "text", "lastname", "lastname", $lastname); $email = formField(_("Email"), "text", "email", "email", $email); if ($provider) { $email2 = ""; } else { $email2 = formField(_("Retype Email"), "text", "email2", "email2", ""); } $password = formField(_("Password"), "password", "password", "password", ""); $password2 = formField(_("Retype Password"), "password", "password2", "password2", ""); $buttons = providersButtons(); $str = "\n <form id='form-signin' action='?'>\n <div id='form-register-div' class='pr'>\n <div class='form-title'>" . _("Register") . "</div>\n {$operation}\n {$nickname}\n {$firstname}\n {$lastname}\n {$email}\n {$email2}\n {$password}\n {$password2}\n <div class='pr form-buttons'>\n <div class='pr fl ml5'><a id='save-register' href='#' rel='" . _("Save Register") . "' class='pr button button-primary button-big'>" . _("Save Register") . "</a></div>\n <div class='pr fl' style='margin-left: 10px'><a id='signin' href='#' rel='" . _("Sign In") . "' class='pr button button-primary button-big'>" . _("Sign In") . "</a></div>\n {$buttons}\n </div>\n </div>\n </form>"; return $str; }
$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);
<?php $users = $db->users; $user = $users->findOne(array("facebookid" => $_SESSION['user'])); if (isset($_POST['submit'])) { $user['location'] = $_POST['location']; $user['phone'] = $_POST['phone']; $user['description'] = $_POST['description']; $users->update(array("facebookid" => $_SESSION['user']), $user); wallPost($_SESSION['user'], $_SESSION['user'], "editprofile", "?profile/edit"); } $_POST = $user; formHeader("Edit your profile"); formField("User", "user", "disabled", "", "Your user"); formField("Name", "first", "disabled", "", "Your name"); formField("E-mail", "email", "disabled", "", "Your email"); formField("Joined", "date", "disabled", "", ""); formField("Location", "location", "text", "", "Your location (country, city)"); formField("Phone", "phone", "text", "", "Your phone number"); formField("Short description", "description", "textarea"); formFooter("Save changes");
} $ID = isset($data) ? recoverPOST("ID", $data[0]["ID_Poll"]) : recoverPOST("ID"); $title = isset($data) ? recoverPOST("title", $data[0]["Title"]) : recoverPOST("title"); $answers = isset($data) ? recoverPOST("answers", $data[1]) : recoverPOST("answers"); $type = isset($data) ? recoverPOST("type", $data[0]["Type"]) : recoverPOST("type"); $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/{$action}/{$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" => "input required", "field" => __(_("Question")), "p" => TRUE, "value" => $title)); print div("answers"); print formField(NULL, __(_("Answers")) . " (" . __(_("Empty answers not be added")) . "))"); if (is_array($answers)) { foreach ($answers as $key => $answer) { print p(TRUE, "field panswer"); print span("count", $key + 1 . ".-"); print formInput(array("name" => "answers[]", "class" => "input required", "value" => $answer)); print p(FALSE); } } else { print p(TRUE, "field panswer"); print span("count", "1.-"); print formInput(array("name" => "answers[]", "class" => "input required", "value" => $answers)); print p(FALSE); } print div(FALSE); print span(NULL, repeat(" ", 4), "add-img");