public function header() { return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>' . IP_INSTALLATION . '</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="NOINDEX,NOFOLLOW"> <link href="design/style.css" rel="stylesheet" type="text/css" /> <link rel="SHORTCUT ICON" href="favicon.ico" /> </head> <body> <div class="container"> <img id="logo" src="design/cms_logo.gif" alt="ImpressPages CMS" /> <div class="clear"></div> <div id="wrapper"> <p id="installationNotice">' . IP_INSTALLATION . '</span></p> <div class="clear"></div> <img class="border" src="design/cms_main_top.gif" alt="Design" /> <div id="main"> <div id="menu"> ' . HtmlOutput::generateMenu() . ' </div> <div id="content"> '; }
/** * The default action - show the home page */ public function indexAction() { $this->_helper->viewRenderer->setNoRender(); Zend_Layout::startMvc(array('layout' => 'media', 'layoutPath' => '../application/zoolu/layouts')); $objLayout = Zend_Layout::getMvcInstance(); $objLayout->assign('navigation', $this->view->action('index', 'Navigation', 'media')); $objLayout->assign('userinfo', $this->view->action('userinfo', 'User', 'users')); $objLayout->assign('modules', $this->view->action('navtop', 'Modules', 'core', array('module' => $this->core->sysConfig->modules->media))); $this->view->assign('jsVersion', $this->core->sysConfig->version->js); $this->view->assign('cssVersion', $this->core->sysConfig->version->css); $this->view->assign('module', $this->core->sysConfig->modules->media); $this->view->assign('languageId', $this->core->intZooluLanguageId); $this->view->assign('languageDefaultId', $this->core->sysConfig->languages->default->id); $this->view->assign('languageOptions', HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->core->intZooluLanguageId)); }
function manage() { global $cms; global $parametersMod; global $log; $answer = ''; if (isset($_GET['action'])) { switch ($_GET['action']) { case "cache_clear": $log->log('administrator/system', 'Cache was cleared'); $module = new Module(); $module->clearCache(); $answer .= ' <div class="note"> ' . $parametersMod->getValue('administrator', 'system', 'admin_translations', 'cache_cleared') . ' </div> '; break; } } $answer .= HtmlOutput::header(); $answer .= '<div class="content">'; $answer .= '<h1>ImpressPages CMS ' . htmlspecialchars(\DbSystem::getSystemVariable('version')) . '</h1>'; $answer .= '</div>'; $answer .= '<div class="content">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('administrator', 'system', 'admin_translations', 'cache')) . '</h1>'; $answer .= $parametersMod->getValue('administrator', 'system', 'admin_translations', 'cache_comments'); $answer .= '<a href="' . $cms->generateUrl($cms->curModId, 'action=cache_clear') . '" class="button">' . htmlspecialchars($parametersMod->getValue('administrator', 'system', 'admin_translations', 'cache_clear')) . '</a><br /><br /><br />'; $answer .= '</div>'; $answer .= '<div id="systemInfo" class="content" style="display: none;">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('standard', 'configuration', 'system_translations', 'system_message')) . '</h1>'; $answer .= ' <script type="text/javascript" src="' . BASE_URL . MODULE_DIR . 'administrator/system/script.js"></script>'; $answer .= '</div>'; $answer .= HtmlOutput::footer(); return $answer; }
public function BookManager() { global $BOOK; if (isset($_REQUEST['action'])) { switch ($_REQUEST['action']) { case 'list_book': $out = new HtmlOutput(); $out->AdminListBook(); exit; break; case 'add_book': $out = new HtmlOutput(); $out->AdminAddBook(); exit; break; case 'delete_book': $res = array(); if ($BOOK->DeleteBookProcess()) { $res = array("status" => 'success'); } else { $res = array("status" => 'false'); } echo json_encode($res); exit; break; case 'edit_book': $out = new HtmlOutput(); $out->AdminEditBook(); exit; break; case 'addbook_process': if ($BOOK->AddBookProcess()) { $out = new HtmlOutput(); $out->AdminAddBookSuccess(); exit; } else { $out = new HtmlOutput(); $out->AdminAddBookFalse(); exit; } break; case 'editbook_process': if ($BOOK->EditBookProcess()) { $out = new HtmlOutput(); $out->AdminEditBookSuccess(); exit; } else { $out = new HtmlOutput(); $out->AdminEditBookFalse(); exit; } break; case 'list_book_cat': $out = new HtmlOutput(); $out->AdminListBookCategory(); exit; break; case 'list_borrow': $out = new HtmlOutput(); $out->AdminListBookBorrow(); exit; break; case 'apply_borrow': $res = array(); if ($BOOK->ApplyBorrowProcess()) { $res = array("status" => 'success'); } else { $res = array("status" => 'false'); } echo json_encode($res); exit; break; case 'delete_borrow': $res = array(); if ($BOOK->DeleteBorrowProcess()) { $res = array("status" => 'success'); } else { $res = array("status" => 'false'); } echo json_encode($res); exit; break; case 'add_book_cat': $out = new HtmlOutput(); $out->AdminAddBookCategory(); exit; break; case 'addbookcategory_process': if ($BOOK->AddBookCategoryProcess()) { $out = new HtmlOutput(); $out->AdminAddBookCategorySuccess(); exit; } else { $out = new HtmlOutput(); $out->AdminAddBookCategoryFalse(); exit; } break; default: $out = new HtmlOutput(); $out->AdminListBookCategory(); exit; break; } } else { $out = new HtmlOutput(); $out->AdminListBook(); exit; } }
function manage() { global $cms; global $parametersMod; $answer = ''; if (isset($_GET['action'])) { switch ($_GET['action']) { case 'import': $standardForm = new \Library\Php\Form\Standard($this->importFields); $errors = $standardForm->getErrors(); if (sizeof($errors) > 0) { $answer = $standardForm->generateErrorAnswer($errors); } else { $fileUpload = new \Library\Php\File\UploadFile(); $fileUpload->allowOnly(array("php")); $file = $fileUpload->upload('config', TMP_FILE_DIR); //security check if ($file == UPLOAD_ERR_OK && function_exists('token_get_all')) { $error = false; $content = file_get_contents(BASE_DIR . TMP_FILE_DIR . $fileUpload->fileName); $tokens = token_get_all($content); foreach ($tokens as $key => $token) { if (is_array($token)) { if ($token[0] == 307) { $error = true; } } } if ($error) { unlink(BASE_DIR . TMP_FILE_DIR . $fileUpload->fileName); $errors['config'] = 'Incorrect language file'; $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); break; } } //end security check if ($file == UPLOAD_ERR_OK) { $_SESSION['backend_modules']['developer']['localization']['uploaded_file'] = BASE_DIR . TMP_FILE_DIR . $fileUpload->fileName; $answer .= HtmlOutput::header(); $answer .= ' <script type="text/javascript"> //<![CDATA[ parent.document.location = \'' . $cms->generateUrl($cms->curModId, 'action=import_uploaded') . '\'; //]] </script>'; $answer .= HtmlOutput::footer(); } else { $errors['config'] = 'impossible to upload'; $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); } } break; case 'import_uploaded': $answer .= HtmlOutput::header(); $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'localization', 'admin_translations', 'preview')) . '</h1>'; $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'localization', 'admin_translations', 'import_language_file')) . '</a><br /><br /><br />'; $answer .= $this->previewParameters($_SESSION['backend_modules']['developer']['localization']['uploaded_file']); $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'localization', 'admin_translations', 'import_language_file')) . '</a><br /><br />'; $answer .= HtmlOutput::footer(); break; case 'import_confirmed': if (isset($_SESSION['backend_modules']['developer']['localization']['uploaded_file'])) { //$config = unserialize(file_get_contents(TMP_FILE_DIR.$_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file'])); $answer .= HtmlOutput::header(); //$config_import = new mod_developer_config_exp_imp_parameters(); //$config_import->save_parameters(); $this->saveParameters($_SESSION['backend_modules']['developer']['localization']['uploaded_file']); $answer .= ' <div class="content"> <h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'parameters_imported')) . '</h1> <a href="' . $cms->generateUrl($cms->curModId) . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'continue')) . '</a> <div class="clear"> <!-- --></div> </div> '; $answer .= HtmlOutput::footer(); } break; case 'export': if ($_REQUEST['language'] == 'backend') { $standardForm = new \Library\Php\Form\Standard($this->exportFields); $errors = $standardForm->getErrors(); if (sizeof($errors) > 0) { $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); } else { header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"administrator_interface_" . $parametersMod->getValue('standard', 'configuration', 'advanced_options', 'administrator_interface_language') . ".php\""); $answer = $this->generateAdministratorInterfaceLanguageFile(); } } else { $standardForm = new \Library\Php\Form\Standard($this->exportFields); $errors = $standardForm->getErrors(); if (sizeof($errors) > 0) { $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); } else { header("Content-type: application/octet-stream"); $language = Db::getLanguage($_REQUEST['language']); header("Content-Disposition: attachment; filename=\"public_interface_" . $language['code'] . ".php\""); $answer = $this->generatePublicInterfaceLanguageFile($_REQUEST['language']); } } break; } } else { $answer .= HtmlOutput::header(); $answer .= '<div class="content">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'localization', 'admin_translations', 'import_language_file')) . '</h1>'; $answer .= $this->importForm(); $answer .= '</div><div class="content">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'localization', 'admin_translations', 'export_language_file')) . '</h1>'; $answer .= $this->exportForm(); $answer .= '</div>'; $answer .= HtmlOutput::footer(); } return $answer; }
</div> <a class="booklink" href="#"><?php echo $oneBook['name']; ?> </a> <p><?php echo $oneBook['description']; ?> </p> </div> <?php } ?> <?php $html = new HtmlOutput(); echo $html->PhanTrang($GLOB->obj_page_num, $GLOB->obj_page_total, ROOT_DOMAIN . "/?page_number="); ?> </div> </div> </div> <script> $(function(){ $(document).on("click", ".book-item .thuesach", function(e){ e.preventDefault(); $(".book-item").removeClass("borrow-it"); $(this).parent().parent().addClass("borrow-it"); var _BorrowLink = $(this).attr("href"); if(confirm("Ban se thue cuon sach nay?")){ //ajax request $.ajax({
/** * getsingleeditformAction * @author Thomas Schedler <*****@*****.**> */ public function getsingleeditformAction() { $this->core->logger->debug('media->controllers->FileController->getsingleeditformAction()'); if ($this->getRequest()->isPost() && $this->getRequest()->isXmlHttpRequest()) { $this->getModelFiles(); $objRequest = $this->getRequest(); $intFileId = $objRequest->getParam('fileId'); $objFile = $this->objModelFiles->loadFileById($intFileId); $this->view->assign('strEditFormAction', '/zoolu/media/file/edit'); $this->view->assign('intFileId', $intFileId); $this->view->assign('objFile', $objFile); if (count($objFile) == 1 && $objFile->current()->version > 1) { $objFileVersions = $this->objModelFiles->loadFileVersions($intFileId); $this->view->assign('objFileVersions', $objFileVersions); } $this->view->assign('imagesSizes', $this->core->sysConfig->upload->images->default_sizes->default_size->toArray()); $this->view->assign('destinationOptions', HtmlOutput::getOptionsOfSQL($this->core, 'SELECT categories.id AS VALUE, categoryTitles.title AS DISPLAY FROM categories INNER JOIN categoryTitles ON categoryTitles.idCategories = categories.id AND categoryTitles.idLanguages = ' . $this->core->intZooluLanguageId . ' WHERE categories.idParentCategory = 466 ORDER BY categoryTitles.title', $objFile->current()->idDestination)); $this->view->assign('groupOptions', HtmlOutput::getOptionsOfSQL($this->core, 'SELECT groups.id AS VALUE, groups.title AS DISPLAY FROM groups LEFT JOIN groupGroupTypes ON groupGroupTypes.idGroups = groups.id WHERE groupGroupTypes.idGroupTypes = ' . $this->core->sysConfig->group_types->frontend . ' ORDER BY groups.title', $objFile->current()->idGroup)); $this->view->assign('languageOptions', HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->intLanguageId)); } $this->assignSecurityOptions(); $this->renderScript('file/singleform.phtml'); }
?> </select> </div> <div class="form-wrap"> <p class="label">Tu khoa</p><input class="input-text book_keyword" name="book_keyword" type="text" value="<?php echo $data['tukhoa']; ?> " placeholder="Tu khoa" /> </div> <div class="form-wrap"> <p class="label">Chu de</p> <select class="chudesach input-select" name="chudesach"> <option value="default">-----------Chu de----------</option> <?php //load chu de sach $html = new HtmlOutput(); echo $html->Theloaisach($data['parent']); ?> </select> </div> <div class="form-wrap"> <p class="label">Tom tat</p> <textarea name="book_description" class="input-area book_description" placeholder="Tom tat"><?php echo $data['description']; ?> </textarea> </div> <div class="form-wrap"> <p class="label">Kho luu tru</p> <select class="kholuutru input-select" name="kholuutru"> <option value="default">-----------Kho luu tru----------</option>
/** * Get the content to show. * @param html HtmlOutput object to use. * @param val The value. * @return Processed content. */ protected function processValue(HtmlOutput $html, $val) { if (!is_object($val)) { return NULL; } if (!isset($val->v) || $val->v !== "pka1") { return NULL; } if (!isset($val->fpr)) { return NULL; } $formatted = formatKeyFingerprint($val->fpr); if ($formatted === NULL) { return NULL; } $href = NULL; $content = ""; if (isset($val->uri)) { $href = $val->uri; $href = $html->escape(sanitiseLink($href)); $content .= "<a href='{$href}'>"; } $content .= $formatted; if ($href !== NULL) { $content .= "</a>"; } return $content; }
/** * editAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('propterties->controllers->CategoryController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId()); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); /** * set action */ $this->objForm->setAction('/zoolu/properties/category/edit'); /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); $this->view->blnShowFormAlert = true; } } $this->view->form = $this->objForm; $this->renderScript('category/form.phtml'); }
<select class="ngonngu input-select" name="ngonngu"> <option value="default">-----------Ngon ngu----------</option> <option value="vi">Tieng Viet</option> <option value="en">English</option> </select> </div> <div class="form-wrap"> <p class="label">Tu khoa</p><input class="input-text book_keyword" name="book_keyword" type="text" value="" placeholder="Tu khoa" /> </div> <div class="form-wrap"> <p class="label">Chu de</p> <select class="chudesach input-select" name="chudesach"> <option value="default">-----------Chu de----------</option> <?php //load chu de sach $html = new HtmlOutput(); echo $html->Theloaisach(); //se tu dong load danh sach cac chu de co trong database ra de chon ?> </select> </div> <div class="form-wrap"> <p class="label">Tom tat</p> <textarea name="book_description" class="input-area book_description" placeholder="Tom tat" value=""></textarea> </div> <div class="form-wrap"> <p class="label">Kho luu tru</p> <select class="kholuutru input-select" name="kholuutru"> <option value="default">-----------Kho luu tru----------</option> <option value="1">Kho 1</option> <option value="2">Kho 2</option>
public function RegisterProcess() { //lay gia tri //luc nay chi can lay 1 mat khau, vi js da xac thuc 2 mat khau giong nhau $userID = $_REQUEST['user_id']; $userPwd = md5($_REQUEST['user_pass']); $userSvorgv = $_REQUEST['user_svgv']; //de tranh viec ten dang nhap trung nhau, truoc khi them vao ta se kiem tra coi ten user da co chua if ($this->CheckId($userID)) { //neu chua co nguoi nao su dung ten dang nhap nay, cho phep dang ki //o day tam bo qua email di $this->AddNewUser($userID, $userPwd, $userSvorgv); $out = new HtmlOutput(); $out->UserRegisterSucess(); exit; } else { //da ton tai ten dang nhap, bao loi~ va yeu cau dang ki voi ten khac $out = new HtmlOutput(); $out->UserRegisterFalseID(); exit; } return; }
/** * setViewMetaInfos * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ private function setViewMetaInfos() { if (is_object($this->objForm) && $this->objForm instanceof GenericForm) { $this->view->isurlfolder = $this->objForm->Setup()->getUrlFolder(); $this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation(); $this->view->folderId = $this->objForm->Setup()->getElementId(); $this->view->version = $this->objForm->Setup()->getFormVersion(); $this->view->publisher = $this->objForm->Setup()->getPublisherName(); $this->view->changeUser = $this->objForm->Setup()->getChangeUserName(); $this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y'); $this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i'); $this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId()); $this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId()); $this->view->blnIsRootLevelChild = $this->objForm->Setup()->getParentId() == 0 ? true : false; $this->view->navigationOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT navigationOptionTitles.title FROM navigationOptionTitles WHERE navigationOptionTitles.idNavigationOptions = navigationOptions.id AND navigationOptionTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM navigationOptions WHERE active = 1', $this->objForm->Setup()->getShowInNavigation()); $arrSecurityCheck = array(); if (!Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_VIEW, false, false)) { $arrSecurityCheck = array('ResourceKey' => Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_%d', 'Privilege' => Security::PRIVILEGE_VIEW, 'CheckForAllLanguages' => false, 'IfResourceNotExists' => false); } if ($this->objRequest->getParam('zoolu_module') == 1) { //portals if (Security::get()->isAllowed('portals', Security::PRIVILEGE_VIEW, false, false)) { $arrSecurityCheck = array(); } $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT languages.id AS VALUE, languages.languageCode AS DISPLAY FROM languages INNER JOIN rootLevelLanguages ON rootLevelLanguages.idLanguages = languages.id AND rootLevelLanguages.idRootLevels = ' . $this->objForm->Setup()->getRootLevelId() . ' ORDER BY languages.sortOrder, languages.languageCode', $this->objForm->Setup()->getLanguageId(), $arrSecurityCheck); $blnGeneralDeleteAuthorization = $this->objForm->Setup()->getIsStartElement(false) == true ? false : Security::get()->isAllowed('portals', Security::PRIVILEGE_DELETE, false, false); $blnGeneralUpdateAuthorization = Security::get()->isAllowed('portals', Security::PRIVILEGE_UPDATE, false, false); $blnGeneralSecurityAuthorization = Security::get()->isAllowed('portals', Security::PRIVILEGE_SECURITY, false, false); } else { if ($this->objRequest->getParam('zoolu_module') == 2) { //media $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageId(), $arrSecurityCheck); $blnGeneralDeleteAuthorization = Security::get()->isAllowed('media', Security::PRIVILEGE_DELETE, false, false); $blnGeneralUpdateAuthorization = Security::get()->isAllowed('media', Security::PRIVILEGE_UPDATE, false, false); $blnGeneralSecurityAuthorization = Security::get()->isAllowed('media', Security::PRIVILEGE_SECURITY, false, false); } else { if ($this->objRequest->getParam('zoolu_module') == 5) { //global $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageId(), $arrSecurityCheck); $blnGeneralDeleteAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_DELETE, false, false); $blnGeneralUpdateAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_UPDATE, false, false); $blnGeneralSecurityAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_SECURITY, false, false); } else { $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageId()); $blnGeneralDeleteAuthorization = true; $blnGeneralUpdateAuthorization = true; $blnGeneralSecurityAuthorization = false; } } } $this->view->authorizedDelete = $this->objForm->Setup()->getIsStartElement(false) == true || $this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->add ? false : ($blnGeneralDeleteAuthorization == true ? $blnGeneralDeleteAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_DELETE, false, false)); $this->view->authorizedUpdate = $blnGeneralUpdateAuthorization == true ? $blnGeneralUpdateAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_UPDATE, false, false); $this->view->authorizedSecurityManager = $blnGeneralSecurityAuthorization == true ? $blnGeneralSecurityAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_SECURITY, false, false); } }
/** * setViewMetaInfos * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ private function setViewMetaInfos() { if (is_object($this->objForm) && $this->objForm instanceof GenericForm) { $this->view->version = $this->objForm->Setup()->getFormVersion(); $this->view->publisher = $this->objForm->Setup()->getPublisherName(); $this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation(); $this->view->changeUser = $this->objForm->Setup()->getChangeUserName(); $this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i'); $this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i'); $this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId()); $this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId()); if ($this->objForm->Setup()->getIsStartElement(false) == true) { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM pageTypes WHERE startpage = 1', $this->objForm->Setup()->getElementTypeId()); } else { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM pageTypes WHERE page = 1', $this->objForm->Setup()->getElementTypeId()); } $this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate()); $this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n')); $this->view->blnIsStartPage = $this->objForm->Setup()->getIsStartElement(false); if ($this->objForm->Setup()->getField('url')) { $this->view->pageurl = $this->objForm->Setup()->getField('url')->getValue(); } if ($this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->edit && $this->objForm->Setup()->getElementTypeId() != $this->core->sysConfig->page_types->link->id) { $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId()); } } }
</div> <?php $stt++; } ?> </div> <?php } else { ?> <a class="app-item">Empty</a> <?php } ?> <?php $html = new HtmlOutput(); echo $html->PhanTrang($GLOB->obj_page_num, $GLOB->obj_page_total, ROOT_DOMAIN . "/?site=admin&view=book&action=list_borrow&page_number="); ?> <script> $(function(){ //xoa cho thue $(".table_borrow").find(".row").find('.table_thaotac').find(".huymuon").click(function(e){ e.preventDefault(); if(confirm("Ban co chac muon huy muon sach khong?")){ $(".table_borrow").find(".row").removeClass("delete_this"); $(this).parent().parent().addClass("delete_this"); var _ActionLink = $(this).attr("href"); $.ajax({ method: "POST", url: _ActionLink,
</div> <a class="booklink" href="#"><?php echo $oneBook['name']; ?> </a> <p><?php echo $oneBook['description']; ?> </p> </div> <?php } ?> <?php $html = new HtmlOutput(); echo $html->PhanTrang($GLOB->obj_page_num, $GLOB->obj_page_total, ROOT_DOMAIN . "/?site=home&action=search&s_key=" . $_REQUEST['s_key'] . "&page_number="); ?> </div> </div> </div> <script> $(function(){ $(document).on("click", ".book-item .thuesach", function(e){ e.preventDefault(); $(".book-item").removeClass("borrow-it"); $(this).parent().parent().addClass("borrow-it"); var _BorrowLink = $(this).attr("href"); if(confirm("Ban se thue cuon sach nay?")){ //ajax request $.ajax({
/** * setViewMetaInfos * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ private function setViewMetaInfos() { if (is_object($this->objForm) && $this->objForm instanceof GenericForm) { $this->view->version = $this->objForm->Setup()->getFormVersion(); $this->view->publisher = $this->objForm->Setup()->getPublisherName(); $this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation(); $this->view->changeUser = $this->objForm->Setup()->getChangeUserName(); $this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i'); $this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i'); $this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId()); $this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId()); if ($this->objForm->Setup()->getIsStartElement(false) == true) { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM pageTypes WHERE startpage = 1 AND active = 1 ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId()); } else { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM pageTypes WHERE page = 1 AND active = 1 ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId()); } $this->view->blnIsRootLevelChild = $this->objForm->Setup()->getParentTypeId() == $this->core->sysConfig->parent_types->rootlevel ? true : false; $this->view->navigationOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT navigationOptionTitles.title FROM navigationOptionTitles WHERE navigationOptionTitles.idNavigationOptions = navigationOptions.id AND navigationOptionTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM navigationOptions WHERE active = 1', $this->objForm->Setup()->getShowInNavigation()); $this->view->destinationId = $this->objForm->Setup()->getDestinationId(); $this->view->destinationOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT categories.id AS VALUE, categoryTitles.title AS DISPLAY FROM categories INNER JOIN categoryTitles ON categoryTitles.idCategories = categories.id AND categoryTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ' WHERE categories.idParentCategory = 466 ORDER BY categoryTitles.title', $this->objForm->Setup()->getDestinationId()); $this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate()); $this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n')); $this->view->blnIsStartPage = $this->objForm->Setup()->getIsStartElement(false); if ($this->objForm->Setup()->getField('url')) { $strBaseUrl = $this->getModelFolders()->getRootLevelMainUrl($this->objForm->Setup()->getRootLevelId()); if (substr_count($strBaseUrl, '.') <= 1) { $strBaseUrl = str_replace('http://', 'http://www.', $strBaseUrl); } $this->view->pageurl = $strBaseUrl . $this->objForm->Setup()->getField('url')->getValue(); } $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT languages.id AS VALUE, languages.languageCode AS DISPLAY FROM languages INNER JOIN rootLevelLanguages ON rootLevelLanguages.idLanguages = languages.id AND rootLevelLanguages.idRootLevels = ' . $this->objForm->Setup()->getRootLevelId() . ' ORDER BY languages.sortOrder, languages.languageCode', $this->objForm->Setup()->getLanguageId()); $this->view->authorizedDelete = $this->objForm->Setup()->getIsStartElement(false) == true || $this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->add ? false : Security::get()->isAllowed('portals', Security::PRIVILEGE_DELETE, false, false); $this->view->authorizedUpdate = Security::get()->isAllowed('portals', Security::PRIVILEGE_UPDATE, false, false); } }
/* Driver file with page layout and basic action handling. */ require_once "lib/config.inc.php"; require_once "lib/html.inc.php"; require_once "lib/json.inc.php"; require_once "lib/messages.inc.php"; require_once "lib/request.inc.php"; require_once "lib/session.inc.php"; require_once "libauth/authenticator.inc.php"; require_once "libauth/namecoin_rpc.inc.php"; require_once "libauth/namecoin_interface.inc.php"; /* Construct basic worker classes. */ $session = new Session($sessionName); $rpc = new HttpNamecoin($rpcHost, $rpcPort, $rpcUser, $rpcPassword); $nc = new NamecoinInterface($rpc, $namePrefix); $req = new RequestHandler(); $html = new HtmlOutput(); $msg = new MessageList($html); /* Set status which may be changed later to show different pages. */ $status = "unknown"; /** * Try to perform a user login request. */ function tryLogin() { global $req, $session, $msg, $nc; global $status; global $serverUri; if ($status === "unknown" && $req->check("action")) { $action = $req->getString("action"); switch ($action) { case "login":
"><?php echo $danhmuc; ?> </a></p> <div class="table_thaotac" style="width: 30%;"> <a class="thaotac sua" href="#"><i class="fa fa-edit"></i> Sua</a> <a class="thaotac xoa" href="#"><i class="fa fa-trash"></i> Xoa</a> </div> </div> <?php $stt++; } ?> </div> <?php } else { ?> <a class="app-item">Empty</a> <?php } ?> <?php $html = new HtmlOutput(); echo $html->PhanTrang($GLOB->obj_page_num, $GLOB->obj_page_total, ROOT_DOMAIN . "/?site=admin&view=book&action=list_book&book_cat=" . $_REQUEST['book_cat'] . "&page_number="); ?> </div> </div> </div> </div> <!--/Admin Main page-->
</div> <?php $stt++; } ?> </div> <?php } else { ?> <a class="app-item">Empty</a> <?php } ?> <?php $html = new HtmlOutput(); echo $html->PhanTrang($GLOB->obj_page_num, $GLOB->obj_page_total, ROOT_DOMAIN . "/?site=admin&view=member&action=unactive_user="******"&page_number="); ?> </div> <script> $(function(){ //xoa user $(".unactive_user").find(".row").find('.table_thaotac').find(".xoa").click(function(e){ e.preventDefault(); if(confirm("Ban co chac muon xoa khong?")){ $(".unactive_user").find(".row").removeClass("delete_this"); $(this).parent().parent().addClass("delete_this"); var _ActionLink = $(this).attr("href"); $.ajax({ method: "POST", url: _ActionLink,
/** * setViewMetaInfos * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ private function setViewMetaInfos() { if (is_object($this->objForm) && $this->objForm instanceof GenericForm) { $this->view->version = $this->objForm->Setup()->getFormVersion(); $this->view->publisher = $this->objForm->Setup()->getPublisherName(); $this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation(); $this->view->languagefallback = $this->objForm->Setup()->getLanguageFallbackId(); $this->view->changeUser = $this->objForm->Setup()->getChangeUserName(); $this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i'); $this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i'); $this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId()); $this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId()); $this->core->logger->debug('getCreatorId: ' . $this->objForm->Setup()->getCreatorId()); if ($this->objForm->Setup()->getIsStartElement(false) == true) { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT globalTypeTitles.title AS DISPLAY FROM globalTypeTitles WHERE globalTypeTitles.idGlobalTypes = globalTypes.id AND globalTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM globalTypes WHERE startelement = 1 AND idRootLevelGroups = ' . $this->objForm->Setup()->getRootLevelGroupId() . ' ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId()); } else { $this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT globalTypeTitles.title AS DISPLAY FROM globalTypeTitles WHERE globalTypeTitles.idGlobalTypes = globalTypes.id AND globalTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM globalTypes WHERE element = 1 AND idRootLevelGroups = ' . $this->objForm->Setup()->getRootLevelGroupId() . ' ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId()); } $this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate()); $this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n')); $this->view->blnIsStartGlobal = $this->objForm->Setup()->getIsStartElement(false); if ($this->objForm->Setup()->getField('url')) { $this->view->globalurl = $this->objForm->Setup()->getField('url')->getValue(); //add shop preview url if ($this->objForm->Setup()->getRootLevelGroupId() == $this->core->sysConfig->root_level_groups->product && $this->core->config->shop->root_level_id) { $this->view->addonurls = array(array('url' => $this->getModelFolders()->getRootLevelMainUrl($this->core->config->shop->root_level_id) . $this->objForm->Setup()->getField('url')->getValue(), 'title' => $this->core->translate->_('Shop'))); } } $arrSecurityCheck = array(); if (!Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_VIEW, false, false)) { $arrSecurityCheck = array('ResourceKey' => Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_%d', 'Privilege' => Security::PRIVILEGE_VIEW, 'CheckForAllLanguages' => false, 'IfResourceNotExists' => false); } $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageId(), $arrSecurityCheck); $blnGeneralDeleteAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_DELETE, false, false); $blnGeneralUpdateAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_UPDATE, false, false); $this->view->authorizedDelete = $this->objForm->Setup()->getIsStartElement(false) == true || $this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->add ? false : ($blnGeneralDeleteAuthorization == true ? $blnGeneralDeleteAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_DELETE, false, false)); $this->view->authorizedUpdate = $blnGeneralUpdateAuthorization == true ? $blnGeneralUpdateAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_UPDATE, false, false); $this->view->languageFallbackOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages WHERE isFallback = 1 AND id != ' . $this->objForm->Setup()->getLanguageId() . ' ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageFallbackId()); } }
function manage() { global $cms; global $parametersMod; $answer = ''; if (isset($_GET['action'])) { switch ($_GET['action']) { case 'import': $standardForm = new \Library\Php\Form\Standard($this->importFields); $errors = $standardForm->getErrors(); if (sizeof($errors) > 0) { $answer = $standardForm->generateErrorAnswer($errors); } else { $fileUpload = new \Library\Php\File\UploadFile(); $fileUpload->allowOnly(array("php", "conf", "txt")); $file = $fileUpload->upload('config', TMP_FILE_DIR); if ($file == UPLOAD_ERR_OK) { $_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file'] = BASE_DIR . TMP_FILE_DIR . $fileUpload->fileName; $answer .= HtmlOutput::header(); $answer .= ' <script type="text/javascript"> //<![CDATA[ parent.document.location = \'' . $cms->generateUrl($cms->curModId, 'action=import_uploaded') . '\'; //]] </script>'; $answer .= HtmlOutput::footer(); } else { $errors['config'] = 'impossible to upload'; $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); } } break; case 'import_uploaded': $info = pathinfo($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file']); if ($info['extension'] == 'conf') { $answer .= HtmlOutput::header(); $config = unserialize(file_get_contents($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file'])); $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_title_preview')) . '</h1>'; $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_button_preview')) . '</a><br /><br /><br />'; $answer .= $config->previewParameters(); $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_button_preview')) . '</a><br /><br />'; $answer .= HtmlOutput::footer(); } else { $answer .= HtmlOutput::header(); $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_title_preview')) . '</h1>'; $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_button_preview')) . '</a><br /><br /><br />'; $answer .= \Modules\developer\localization\Manager::previewParameters($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file']); $answer .= '<br /><a href="' . $cms->generateUrl($cms->curModId, 'action=import_confirmed') . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_button_preview')) . '</a><br /><br />'; $answer .= HtmlOutput::footer(); $answer .= HtmlOutput::header(); } break; case 'import_confirmed': if (isset($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file'])) { $info = pathinfo($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file']); if ($info['extension'] == 'conf') { $config = unserialize(file_get_contents($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file'])); $answer .= HtmlOutput::header(); //$config_import = new mod_developer_config_exp_imp_parameters(); //$config_import->save_parameters(); $config->saveParameters(); $answer .= ' <div class="content"> <h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'parameters_imported')) . '</h1> <a href="' . $cms->generateUrl($cms->curModId) . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'continue')) . '</a> <div class="clear"><!-- --></div> </div> '; $answer .= HtmlOutput::footer(); } else { $answer .= HtmlOutput::header(); //$config_import = new mod_developer_config_exp_imp_parameters(); //$config_import->save_parameters(); \Modules\developer\localization\Manager::saveParameters($_SESSION['backend_modules']['developer']['config_exp_imp']['uploaded_file']); $answer .= ' <div class="content"> <h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'parameters_imported')) . '</h1> <a href="' . $cms->generateUrl($cms->curModId) . '" class="button">' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'continue')) . '</a> <div class="clear"> <!-- --></div> </div> '; $answer .= HtmlOutput::footer(); } } break; case 'export': $standardForm = new \Library\Php\Form\Standard($this->exportFields); $errors = $standardForm->getErrors(); if (sizeof($errors) > 0) { $answer .= HtmlOutput::header(); $answer .= $standardForm->generateErrorAnswer($errors); $answer .= HtmlOutput::footer(); } else { $file = $this->writeParametersToFile(); header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"" . $file . "\""); $answer = file_get_contents(TMP_FILE_DIR . $file); } break; } } else { $answer .= HtmlOutput::header(); $answer .= '<div class="content">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'import_title')) . '</h1>'; $answer .= $this->importForm(); $answer .= '</div><div class="content">'; $answer .= '<h1>' . htmlspecialchars($parametersMod->getValue('developer', 'config_exp_imp', 'admin_translations', 'export_title')) . '</h1>'; $answer .= $this->exportForm(); $answer .= '</div>'; $answer .= HtmlOutput::footer(); } return $answer; }
/** * setViewMetaInfos * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ private function setViewMetaInfos() { if (is_object($this->objForm) && $this->objForm instanceof GenericForm) { $this->view->isurlfolder = $this->objForm->Setup()->getUrlFolder(); $this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation(); $this->view->version = $this->objForm->Setup()->getFormVersion(); $this->view->publisher = $this->objForm->Setup()->getPublisherName(); $this->view->changeUser = $this->objForm->Setup()->getChangeUserName(); $this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y'); $this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i'); $this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId()); $this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId()); if ($this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->edit && $this->objRequest->getParam('zoolu_module') != 2) { $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId()); } } }