public function displayCustomFormLink() { $customFormObj = new CustomForm($this->MySQL); $menuCustomFormInfo = $this->menuItemObj->objCustomPage->get_info(); $customFormObj->select($menuCustomFormInfo['custompage_id']); echo "\n\t\t\t<div style='text-align: " . $menuCustomFormInfo['textalign'] . "'>\n\t\t\t" . $menuCustomFormInfo['prefix'] . "<a href='" . MAIN_ROOT . "customform.php?pID=" . $menuCustomFormInfo['custompage_id'] . "' target='" . $menuCustomFormInfo['linktarget'] . "'>" . $customFormObj->get_info_filtered("name") . "</a>\n\t\t\t</div>\n\t\t\t"; }
public function buyFormSucceeded(\CustomForm $form, $values) { $product = $this->context->moduleSimpleEshopModel->getProduct($this->getParameter("id"), 1); $this->iModuleId = $product["page_page_modules_id"]; $this->loadModuleFromDB(); if ($form->isValid()) { $values["product_id"] = $product["id"]; $values["product_title"] = $product["title"]; $values["page_page_modules_id"] = $product["page_page_modules_id"]; $order = $this->db->createOrder($values); if (!$order) { $this->flashMessage('Jejda. :( Něco je špatně. Zkuste znovu nebo se s námi spojte přímo. Děkujeme za pochopení.'); } else { $mail = new Message(); $mailer = new SendmailMailer(); $emailHTML = $this->getEmailHTML($order, $product); // send confirmation email to customer $mail->setFrom($this->module->settings->email)->addTo($order->email)->setSubject('Potvrzení o koupi.')->setHTMLBody($emailHTML); $mailer->send($mail); // send confirmation email to owner of the eshop $mail->setFrom($this->module->settings->email)->addTo($this->module->settings->email)->setSubject('Potvrzení o koupi.')->setHTMLBody($emailHTML); $mailer->send($mail); $this->flashMessage($this->module->settings->order_confirmation, 'success'); } } else { $this->flashMessage('Doplňte prosím všechny povinné položky.'); } $this->redirect(":" . $this->getName() . ':Product', array('id' => $product['nice_url_segment'], 'moduleid' => $product['page_page_modules_id'])); }
protected function createComponentAddForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link("Module" . $this->moduleName . ':Save', array('id' => $this->module->id, 'parent_page_id' => $this->oParentPresenter->getParameter('id'))); $form->setAction($url_save); $this->setFormItems($form); return $form; }
protected function createComponentAdminAddForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link("Module" . $this->moduleName . ':Save', array('id' => $this->module->id)); $form->setAction($url_save); $form->addUpload('img', 'Obrázek:')->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.')->addRule(\Nette\Application\UI\Form::FILLED, 'Musíte zadat obrázek.'); $form->setCustomRenderer(); return $form; }
public function displayCustomFormLink() { $customFormObj = new CustomForm($this->MySQL); $menuCustomFormInfo = $this->menuItemObj->objCustomPage->get_info(); $customFormObj->select($menuCustomFormInfo['custompage_id']); $menuItemInfo = $customFormObj->get_info_filtered(); $menuCustomFormInfo['link'] = MAIN_ROOT . "customform.php?pID=" . $menuItemInfo['customform_id']; $this->formatLink($menuItemInfo, $menuCustomFormInfo); }
protected function createComponentEditForm() { $form = new \CustomForm(); $form->addUpload('img', 'Obrázek:')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Nadpis', 50, 255); $form->addText('subtitle', 'Podtitulek', 50, 255); $form->addTextArea('text', 'Text'); $form->addText('link', 'Odkaz (celá URL adresa)', 50); $form->addText('link_text', 'Viditelný text odkazu', 50, 32); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }
protected function createComponentEditForm() { $form = new \CustomForm(); $form->addRadioList('icon', 'Ikonka', $this->icons); $form->addTextArea('text', 'Text'); $form->addText('link', 'Odkaz (celá URL adresa)', 1000); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }
protected function createComponentSimpleGoogleMapsForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link('ModuleSimpleGoogleMaps:Save', array('id' => $this->module->id, 'parent_page_id' => $this->oParentPresenter->getParameter('id'))); $form->setAction($url_save); $form->addText('address', 'Změnit adresu: ', 255)->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat adresu.'); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); return $form; }
protected function createComponentAddImagesForm() { $form = new \CustomForm(); $url_save = $this->link('Module' . $this->moduleName . ':SaveImages', array('moduleid' => $this->module->id, 'id' => $this->params['id'])); $form->setAction($url_save); $form->addUpload('img', 'Přidat obrázek:', true)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.')->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat image.'); $form->addSubmit('create', 'Nahrát'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); return $form; }
/** * Sign-in form factory. * @return Nette\Application\UI\Form */ protected function createComponentSignInForm() { $form = new \CustomForm(); $form->addText('username', 'Přihlašovací jméno:')->setRequired('Prosím zadejte přihlašovací jméno.')->setAttribute("placeholder", "Přihlašovací jméno"); $form->addPassword('password', 'Heslo:')->setRequired('Prosím zadejte heslo.')->setAttribute("placeholder", "Heslo"); $form->addCheckbox('remember', 'Zapamatovat přihlášení na delší dobu.'); $form->addSubmit('send', 'Přihlásit'); // call method signInFormSucceeded() on success $form->onSuccess[] = $this->signInFormSucceeded; $form->setCustomRenderer(); return $form; }
protected function createComponentNewsletterForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link('ModuleEmailGatherer:Save', array('id' => $this->module->id, 'parent_page_id' => $this->oParentPresenter->getParameter('id'))); $form->setAction($url_save); $form->addText('email', 'Email: ', 256)->addRule(Form::EMAIL, 'Nezadali jste platnou e-mailovou adresu.')->setRequired('Zadejte e-mailovou adresu'); $form->addSubmit('create', 'Přihlásit se k odběru novinek!'); $form->setCustomRenderer(); return $form; }
<?php // Custom Form Page Options $customFormPageObj = new CustomForm($mysqli); $arrCustomFormPages = $customFormPageObj->get_entries(); $customFormPageOptions = array(); foreach ($arrCustomFormPages as $eachCustomFormPage) { $customFormPageOptions[$eachCustomFormPage['customform_id']] = $eachCustomFormPage['name']; } if (count($customFormPageOptions) == 0) { $customFormPageOptions = array("No Custom Form Pages"); } $customFormOptionComponents = array("customform" => array("type" => "select", "attributes" => array("class" => "textBox formInput"), "options" => $customFormPageOptions, "sortorder" => $i++, "display_name" => "Custom Form"));
protected function createComponentEditForm() { $form = new \CustomForm(); $form->addUpload('img', 'Obrázek:')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Nadpis', 50)->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat nadpis.'); $form->addText('subtitle', 'Podtitulek', 50); $form->addTextArea('text', 'Text')->setAttribute("class", "tinymce_text_editor")->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat text.'); $form->addText('client', 'Zákazník (jméno, město, ...)', 50); $form->addText('link', 'Odkaz (celá URL adresa)', 50); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }
* * License: http://www.bluethrust.com/license.php * */ include_once "../classes/customform.php"; if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $customFormPageObj = new CustomForm($mysqli, "custompages", "custompage_id"); $countErrors = 0; $dispError = ""; if ($_POST['submit']) { if (trim($_POST['pagename']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a page name for your custom page.<br>"; } if ($countErrors == 0) { $_POST['wysiwygHTML'] = str_replace("<?", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("?>", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("<?", "", $_POST['wysiwygHTML']); $_POST['wysiwygHTML'] = str_replace("?>", "", $_POST['wysiwygHTML']); $_POST['submitMessageHTML'] = str_replace("<?", "", $_POST['submitMessageHTML']); $_POST['submitMessageHTML'] = str_replace("?>", "", $_POST['submitMessageHTML']); $_POST['submitMessageHTML'] = str_replace("<?", "", $_POST['submitMessageHTML']);
<?php if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php" || !isset($_GET['cID'])) { include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/customform.php"; // Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("View Custom Form Submissions"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $customFormPageObj = new CustomForm($mysqli); // Check Login if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $customFormPageObj->select($_POST['cfID'])) { $memberInfo = $member->get_info(); } else { exit; } } else { $memberInfo = $member->get_info(); $consoleObj->select($consoleObj->findConsoleIDByName("View Custom Form Submissions")); if (!$member->hasAccess($consoleObj)) { exit; } } $arrSubmissions = $customFormPageObj->getSubmissions(); foreach ($arrSubmissions as $submissionID) { $customFormPageObj->objSubmission->select($submissionID); if ($customFormPageObj->objSubmission->get_info("seenstatus") == 0) {
protected function createComponentImageGaleryForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link('ModuleImageGalery:Save', array('id' => $this->module->id, 'parent_page_id' => $this->oParentPresenter->getParameter('id'))); $form->setAction($url_save); $form->addUpload('img', 'Obrázek:', true)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.')->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat image.'); $form->addText('description', 'Popis: ', 50); $form->addSubmit('create', 'Nahrát'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); return $form; }
* Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/customform.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Custom Form Pages"); $consoleObj->select($cID); $customPageObj = new CustomForm($mysqli); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $customPageObj->select($_POST['cpID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $customPageInfo = $customPageObj->get_info_filtered(); if ($_POST['confirm'] == "1") { $customPageObj->delete(); include "main_customforms.php"; } else { echo "<p align='center'>Are you sure you want to delete the custom form <b>" . $customPageInfo['name'] . "</b>?<br><br>All submissions related to this form will also be deleted."; } } elseif (!$customPageObj->select($_POST['cpID'])) { echo "<p align='center'>Unable find the selected custom form. Please try again or contact the website administrator.</p>"; } }
protected function createComponentSettingsForm() { $form = new \CustomForm(); $url_save = $this->oParentPresenter->link("Module" . $this->moduleName . ":SaveSettings", array('id' => $this->module->id, 'parent_page_id' => $this->module->page_id)); $form->setAction($url_save); foreach ($this->module->settings as $setting) { $form->addText($setting->key, $setting->name)->setDefaultValue($setting->value); } $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); return $form; }
protected function createComponentSettings() { $form = new \CustomForm(); $form->addUpload('logo', 'Logo')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Titulek stránky', 64); $form->addText('description', 'Popis stránky', 256); $form->addText('keywords', 'Klíčová slova stránky', 512); $form->addText('email', 'Hlavní e-mail', 512); $form->addHidden("layout"); $form->addText('layoutVisible', 'Layout')->setDisabled()->setValue($this->settings["layout"]->getTitle()); $form->addSubmit('setLayout', 'Vybrat jiný layout')->setAttribute("data-toggle", "modal")->setAttribute("data-target", "#layoutWizard")->setAttribute("type", "button"); $form->addSubmit('addPage', 'Uložit'); $defaults = $this->settings; $defaults["layout"] = $this->settings["layout"]->getName(); $form->setDefaults($defaults); $form->onSuccess[] = array($this, 'addPageModuleToPageFormSucceeded'); $form->setCustomRenderer(); return $form; }
/** createComponentEditPageForm GET VALUES FROM renderEdit, by line "$this['editPageForm']->setDefaults($this->page);" */ protected function createComponentEditPageForm() { $aPages = $this->context->page->getParentsForSelect(); // disable form submit when the page is homepage/index page of the web, // we dont want user to edit these homepage data $disabled = false; if ($this->page) { if ($this->page->id === 0) { $disabled = true; } } $form = new \CustomForm(); $form->addText('name', 'Jméno stránky:')->setRequired('Zadejte prosím jméno stránky.'); $form->addText('title', 'Titulek stránky:'); $form->addText('seo_url_text', 'SEO URL text:'); $form->addSelect('id_parent', 'Nadřazená stránka:', $aPages)->setPrompt('Zvolte nadřazenou stránku'); $form->addCheckbox('online', 'Zobrazovat stránku?'); $form->addSubmit('editPage', 'Editovat a uložit')->setDisabled($disabled); $form->onSuccess[] = array($this, 'editPageFormSucceeded'); $form->setCustomRenderer(); return $form; }
* Bluethrust Clan Scripts v4 * Copyright 2014 * * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ // Config File $prevFolder = ""; include_once $prevFolder . "_setup.php"; include_once $prevFolder . "classes/customform.php"; // Classes needed for index.php $customFormObj = new CustomForm($mysqli); if (!$customFormObj->select($_GET['pID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>"); } $customPageInfo = $customFormObj->get_info(); $ipbanObj = new Basic($mysqli, "ipban", "ipaddress"); if ($ipbanObj->select($IP_ADDRESS, false)) { $ipbanInfo = $ipbanObj->get_info(); if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } // Start Page $PAGE_NAME = $customPageInfo['name'] . " - ";
} } function editItem_postFormFeed() { } function editItem_preUpdate() { $_REQUEST['metadata'] = json_encode($_REQUEST); } function addItem_postInsertion() { // boh } } $main = new Skin(); $form = new CustomForm("dataEntry", $confEntity); $form->addSection("Twitter Connection"); $form->addHidden("metadata", ""); $form->addText("twaccount", "Twitter Account", 50); $form->addText("twcount", "No. Tweets", 4); $form->addText("twconsumerkey", "Consumer Key", 70); $form->addText("twconsumersecret", "Consumer Secret", 70); $form->addText("twaccesstoken", "Access Token", 70); $form->addText("twaccesstokensecret", "Access Token Secret", 70); if (!isset($_REQUEST['action'])) { $_REQUEST['action'] = "edit"; } switch ($_REQUEST['action']) { case "add": $main->setContent("body", $form->addItem()); break;
function dispMenu($intSectionNum) { global $MAIN_ROOT, $LOGGED_IN, $mysqli, $shoutBoxPostLink, $shoutBoxDeleteLink, $shoutBoxEditLink, $arrShoutBoxIDs, $websiteInfo, $arrLoginInfo; echo "<div id='menuSection_" . $intSectionNum . "'>"; $menuCatObj = new MenuCategory($mysqli); $menuItemObj = new MenuItem($mysqli); $customPageObj = new Basic($mysqli, "custompages", "custompage_id"); $customFormObj = new CustomForm($mysqli); $downloadCatObj = new Basic($mysqli, "downloadcategory", "downloadcategory_id"); $memberObj = new Member($mysqli); $pollObj = new Poll($mysqli); if ($LOGGED_IN) { $intMenuAccessType = 1; } else { $intMenuAccessType = 2; } $arrMenuCategories = $menuCatObj->getCategories($intSectionNum, $intMenuAccessType); foreach ($arrMenuCategories as $menuCatID) { $menuCatObj->select($menuCatID); $menuCatInfo = $menuCatObj->get_info(); $arrMenuItems = $menuItemObj->getItems($menuCatInfo['menucategory_id'], $intMenuAccessType); if ($menuCatInfo['headertype'] == "image") { echo "<img src='" . $MAIN_ROOT . $menuCatInfo['headercode'] . "' class='menuHeaderImg'><br>"; } else { $menuCatInfo['headercode'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCatInfo['headercode']); $menuCatInfo['headercode'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCatInfo['headercode']); $menuCatInfo['headercode'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCatInfo['headercode']); $menuCatInfo['headercode'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCatInfo['headercode']); $menuCatInfo['headercode'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCatInfo['headercode']); echo $menuCatInfo['headercode']; } foreach ($arrMenuItems as $menuItemID) { $menuItemObj->select($menuItemID); $menuItemInfo = $menuItemObj->get_info(); $menuItemInfo['itemtype'] = $menuItemInfo['itemtype'] == "customcode" || $menuItemInfo['itemtype'] == "customformat" ? "customblock" : $menuItemInfo['itemtype']; switch ($menuItemInfo['itemtype']) { case "link": $menuItemObj->objLink->select($menuItemInfo['itemtype_id']); $menuLinkInfo = $menuItemObj->objLink->get_info(); $checkURL = parse_url($menuLinkInfo['link']); if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) { $menuLinkInfo['link'] = $MAIN_ROOT . $menuLinkInfo['link']; } echo "<div style='text-align: " . $menuLinkInfo['textalign'] . "'> " . $menuLinkInfo['prefix'] . "<a href='" . $menuLinkInfo['link'] . "' target='" . $menuLinkInfo['linktarget'] . "'>" . $menuItemInfo['name'] . "</a></div>"; break; case "top-players": $dispTopPlayers = unserialize(SPECIAL_MENU_ITEM); echo $dispTopPlayers['top-players']; break; case "customform": $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']); $menuCustomFormInfo = $menuItemObj->objCustomPage->get_info(); $customFormObj->select($menuCustomFormInfo['custompage_id']); echo "<div style='text-align: " . $menuCustomFormInfo['textalign'] . "'> " . $menuCustomFormInfo['prefix'] . "<a href='" . $MAIN_ROOT . "customform.php?pID=" . $menuCustomFormInfo['custompage_id'] . "' target='" . $menuCustomFormInfo['linktarget'] . "'>" . $customFormObj->get_info_filtered("name") . "</a></div>"; break; case "custompage": $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']); $menuCustomPageInfo = $menuItemObj->objCustomPage->get_info(); $customPageObj->select($menuCustomPageInfo['custompage_id']); echo "<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'> " . $menuCustomPageInfo['prefix'] . "<a href='" . $MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a></div>"; break; case "downloads": $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']); $menuDownloadLinkInfo = $menuItemObj->objCustomPage->get_info(); $downloadCatObj->select($menuDownloadLinkInfo['custompage_id']); echo "<div style='text-align: " . $menuDownloadLinkInfo['textalign'] . "'> " . $menuDownloadLinkInfo['prefix'] . "<a href='" . $MAIN_ROOT . "downloads/index.php?catID=" . $menuDownloadLinkInfo['custompage_id'] . "' target='" . $menuDownloadLinkInfo['linktarget'] . "'>" . $downloadCatObj->get_info_filtered("name") . "</a></div>"; break; case "customblock": $menuItemObj->objCustomBlock->select($menuItemInfo['itemtype_id']); $menuCustomBlockInfo = $menuItemObj->objCustomBlock->get_info(); $menuCustomBlockInfo['code'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCustomBlockInfo['code']); $menuCustomBlockInfo['code'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCustomBlockInfo['code']); $menuCustomBlockInfo['code'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCustomBlockInfo['code']); $menuCustomBlockInfo['code'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCustomBlockInfo['code']); $menuCustomBlockInfo['code'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCustomBlockInfo['code']); echo $menuCustomBlockInfo['code']; break; case "image": $menuItemObj->objImage->select($menuItemInfo['itemtype_id']); $menuImageInfo = $menuItemObj->objImage->get_info(); $checkURL = parse_url($menuItemInfo['imageurl']); if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) { $menuImageInfo['imageurl'] = $MAIN_ROOT . $menuImageInfo['imageurl']; } $dispSetWidth = ""; if ($menuImageInfo['width'] != 0) { $dispSetWidth = "width: " . $menuImageInfo['width'] . "px; "; } $dispSetHeight = ""; if ($menuImageInfo['height'] != 0) { $dispSetHeight = "height: " . $menuImageInfo['height'] . "px; "; } echo "<div style='text-align: " . $menuImageInfo['imagealign'] . "; margin-top: 15px; margin-bottom: 15px'>"; if ($menuImageInfo['link'] != "") { $checkURL = parse_url($menuImageInfo['link']); if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) { $menuImageInfo['link'] = $MAIN_ROOT . $menuImageInfo['link']; } echo "<a href='" . $menuImageInfo['link'] . "' target='" . $menuImageInfo['linktarget'] . "'><img src='" . $menuImageInfo['imageurl'] . "' style='" . $dispSetWidth . $dispSetHeight . "' title='" . $menuItemInfo['name'] . "'></a>"; } else { echo "<img src='" . $menuImageInfo['imageurl'] . "' title='" . $menuItemInfo['name'] . "' style='" . $dispSetWidth . $dispSetHeight . "'>"; } echo "</div>"; break; case "shoutbox": $menuItemObj->objShoutbox->select($menuItemInfo['itemtype_id']); $menuShoutboxInfo = $menuItemObj->objShoutbox->get_info(); if ($menuShoutboxInfo['width'] == 0) { $menuShoutboxInfo['width'] = "145"; } $blnShoutboxWidthPercent = false; if ($menuShoutboxInfo['percentwidth'] == 1) { $blnShoutboxWidthPercent = true; } if ($menuShoutboxInfo['height'] == 0) { $menuShoutboxInfo['height'] = "300"; } $blnShoutboxHeightPercent = false; if ($menuShoutboxInfo['percentheight'] == 1) { $blnShoutboxHeightPercent = true; } $mainShoutboxObj = new Shoutbox($mysqli, "news", "news_id"); $newShoutBoxID = uniqid("mainShoutBox_"); $arrShoutBoxIDs[] = $newShoutBoxID; $mainShoutboxObj->strDivID = $newShoutBoxID; $mainShoutboxObj->intDispWidth = $setShoutBoxWidth; $mainShoutboxObj->intDispHeight = $setShoutBoxHeight; $mainShoutboxObj->strEditLink = $shoutBoxEditLink; $mainShoutboxObj->strDeleteLink = $shoutBoxDeleteLink; $mainShoutboxObj->strPostLink = $shoutBoxPostLink; echo $mainShoutboxObj->dispShoutbox($menuShoutboxInfo['width'], $menuShoutboxInfo['height'], $blnShoutboxWidthPercent, $menuShoutboxInfo['textboxwidth'], $blnShoutboxHeightPercent); echo "\n\t\t\t\t\t\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\t\$('#" . $newShoutBoxID . "').animate({\n\t\t\t\t\t\t\t\t\t\tscrollTop:\$('#" . $newShoutBoxID . "')[0].scrollHeight\n\t\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#" . $newShoutBoxID . "_message').keypress(function(eventObj) {\n\t\t\t\t\t\t\t\t\tif(eventObj.which == 13) {\n\t\t\t\t\t\t\t\t\t\tif(\$('#" . $newShoutBoxID . "_message').val() != \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\$('#" . $newShoutBoxID . "_postShoutbox input[type=button]').click();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\n\t\t\t\t\t"; break; case "newestmembers": $dispNewMembers = unserialize(SPECIAL_MENU_ITEM); echo $dispNewMembers['newmembers']; break; case "forumactivity": $dispNewMembers = unserialize(SPECIAL_MENU_ITEM); echo $dispNewMembers['forumactivity']; break; case "login": echo constant("LOGIN_BOX"); break; case "poll": $pollObj->select($menuItemInfo['itemtype_id']); $memberObj->select($_SESSION['btUsername']); $pollObj->dispPollMenu($memberObj); break; } } echo "<br>"; } echo "</div>"; }
/* * Bluethrust Clan Scripts v4 * Copyright 2014 * * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../classes/customform.php"; if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $customFormPageObj = new CustomForm($mysqli, "custompages", "custompage_id"); if (isset($_GET['cfID']) && $customFormPageObj->select($_GET['cfID'])) { echo "\n\t\n\t\t<div id='loadingSpiral' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t</p>\n\t\t</div>\n\t\n\t\t<div id='submissionsDiv'>\n\t\n\t"; include "custompages/submissiondetail.php"; echo "</div>"; echo "\n\n\t\t<script type='text/javascript'>\n\t\n\t\t\n\t\t\tfunction deleteSubmission(intSubmissionID) {\n\t\t\t\n\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\$('#submissionsDiv').fadeOut(250);\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/custompages/include/deletesubmission.php', { cfID: '" . $_GET['cfID'] . "', subID: intSubmissionID }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#submissionsDiv').html(data);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#submissionsDiv').fadeIn(250);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t</script>\n\t\n\t"; } else { include "custompages/main_submissions.php"; }