public function render() { getDisplay()->setTitle(Settings::getWebsiteName() . " - " . l("Error") . " " . $this->errorCode); getDisplay()->setTemplateVariable("error_code", $this->errorCode); getStyle()->run(); getDisplay()->add("header"); getDisplay()->add("error"); getDisplay()->add("footer"); getDisplay()->render(); }
public function render() { getDisplay()->setTitle(Settings::getWebsiteName() . " - " . l("HOME")); getDisplay()->setTemplateVariable("body", $this->body); getDisplay()->setTemplateVariable("articles", $this->articleHTML); getStyle()->run(); getDisplay()->add("header"); getDisplay()->add("index"); getDisplay()->add("footer"); getDisplay()->render(); }
public function run() { $settings = Style::getSettings(); //Reverse the Menu, we've right float getMenu()->flip(); foreach ($settings as $setting => $value) { if ($value != null) { getDisplay()->setTemplateVariable($settings, $value); } } }
public function render() { getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->page->getTitle()); getDisplay()->setTemplateVariable("body", $this->body); getDisplay()->setTemplateVariable("page", $this->page); getStyle()->run(); getDisplay()->add("header"); getDisplay()->add("page"); getDisplay()->add("footer"); getDisplay()->render(); }
public function __invoke($args) { if (count($args) < 1) { throw new OrongoScriptParseException("Argument missing for MessageBox.Show()"); } if (isset($args[1]) && is_string($args[1])) { $title = $args[1]; } else { $title = "OrongoCMS"; } $box = new MessageBox($args[0], $title); getDisplay()->addObject($box); }
public function doImports() { getDisplay()->addHTML("<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>"); if (!getDisplay()->isImported(orongoURL('orongo-admin/theme/gritter/css/jquery.gritter.css'))) { getDisplay()->import(orongoURL('orongo-admin/theme/gritter/css/jquery.gritter.css')); } if (!getDisplay()->isImported(orongoURL('js/jquery.gritter.min.js'))) { getDisplay()->import(orongoURL('js/jquery.gritter.min.js')); } if (!getDisplay()->isImported(orongoURL('js/ajax.notifications.js'))) { getDisplay()->import(orongoURL('js/ajax.notifications.js')); } }
public function render() { getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->article->getTitle()); getDisplay()->setTemplateVariable("body", $this->body); getDisplay()->addHTML('<meta name="keywords" content="' . $this->article->getTagsString() . '"/>', 'head'); getDisplay()->setTemplateVariable("article", $this->article); getDisplay()->setTemplateVariable("comments", $this->commentHTML); getStyle()->run(); getDisplay()->add("header"); getDisplay()->add("article"); getDisplay()->add("footer"); getDisplay()->render(); }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php /* * Created on Aug 19, 2010 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once 'php/piute_includes.php'; session_start(); redirectIfNotInRole('hunter', '../not-allowed.php'); $blindCount = getBlindCount(); $speciesList = getAllSpecies(); $areaList = getDisplay('areas'); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Piute Ponds Hunter Harvest Add</title> <SCRIPT LANGUAGE="JavaScript" SRC="calendar/CalendarPopup.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript">document.write(getCalendarStyles());</SCRIPT> <STYLE> .CALcpYearNavigation, .CALcpMonthNavigation { background-color:#6677DD; text-align:center; vertical-align:center;
public function doImports() { if (!getDisplay()->isImported(orongoURL('js/ajax.comments.js'))) { getDisplay()->import(orongoURL('js/ajax.comments.js')); } }
/** * Runs the style's PHP file if it has one. */ public function run() { if ($this->usePHP) { if ($this->getPHPFile() != null) { try { if ($this->mainClass instanceof IOrongoStyle) { $this->mainClass->run(); } } catch (Exception $e) { $msg = new MessageBox("An error occured while running the style."); $msg->bindException($e); getDisplay()->addObject($msg); } } } }
public function render() { getDisplay()->setTitle(Settings::getWebsiteName() . " - " . $this->pageTitle); getDisplay()->setTemplateVariable("body", $this->body); if (count($this->msgs) > 0) { $msgstring = ""; foreach ($this->msgs as $msg) { if (!is_array($msg)) { continue; } $msgstring .= '<h4 class="alert_' . $msg['msgtype'] . '">' . $msg['msg'] . "</h4>"; } getDisplay()->setTemplateVariable("msgs", $msgstring); } $objectshtml = ""; foreach ($this->objects as $object) { if ($object instanceof AdminFrontendObject == false) { continue; } $objectshtml .= $object->toHTML(); } getDisplay()->setTemplateVariable("objects", $objectshtml); getDisplay()->setTemplateVariable("current_page", $this->pageTitle); getDisplay()->setTemplateVariable("style_url", Settings::getWebsiteURL() . "orongo-admin/theme/"); getStyle()->run(); getDisplay()->add("header"); getDisplay()->add($this->pageTemplate); getDisplay()->render(); }
/** * Starts the Ajax Action, add it to the Display */ public final function start() { $this->doImports(); getDisplay()->addJS($this->toJS(), "document.ready"); }
public function __invoke($args) { if (count($args) < 1) { throw new OrongoScriptParseException("Argument missing for Template.AddJS()"); } if (!isset($args[1])) { $args[1] = null; } getDisplay()->addJS($args[0], $args[1]); }
exit; } $updater = new AdminFrontend(); $updater->main(array("time" => time(), "page_title" => "Update Checker", "page_template" => "dashboard")); $isUpdateAvailable = false; try { $isUpdateAvailable = OrongoUpdateChecker::isUpdateAvailable(); } catch (Exception $e) { $msgbox = new MessageBox(l("Error update check")); $msgbox->bindException($e); getDisplay()->addObject($msgbox); } if ($isUpdateAvailable) { $updater->addMessage(l("Update available"), "success"); $info = null; try { $info = OrongoUpdateChecker::getLatestVersionInfo(); } catch (Exception $e) { $msgbox = new MessageBox("Error occured while checking for update"); $msgbox->bindException($e); getDisplay()->addObject($msgbox); break; } if ($info->critical) { $updater->addMessage(l("Critical update"), "warning"); } $updater->addObject(new AdminFrontendObject(100, "How to update", l("Ready to update to", "r" . $info->latest_version) . '<br/>' . l("Visit for update information", "<a href='" . $info->update_url . "'>" . str_replace("http://", "", $info->update_url) . "</a>"))); } else { $updater->addMessage(l("No update"), "info"); } $updater->render();
<?php /** * @author Jaco Ruit */ require 'startOrongo.php'; startOrongo('orongo-register'); getDisplay()->setTemplateDir("orongo-admin/style/"); $msg = null; $msgtype = null; if (isset($_GET['msg'])) { $msgCode = Security::escape($_GET['msg']); switch ($msgCode) { case 0: $msg = l("REG_MSG_PASS_NO_MATCH"); $msgtype = "error"; break; case 1: $msg = l("REG_MSG_USERNAME_EXISTS"); $msgtype = "warning"; break; case 2: $msg = l("REG_MSG_USERNAME_TOO_SHORT"); $msgtype = "error"; break; case 3: $msg = l("REG_MSG_PASSWORD_TOO_SHORT"); $msgtype = "error"; break; case 4: $msg = l("REG_MSG_FILL_IN_USERNAME");
/** *Starts Orongo! :) * @param String $paramCurrentPage the current page */ function startOrongo($paramCurrentPage = 'anonymous') { session_start(); define("ROOT", dirname(__FILE__)); define("LIB", ROOT . "/lib"); define("ADMIN", ROOT . "/orongo-admin"); define("CONFIG", ROOT . "/config.php"); define('RANK_ADMIN', 3); define('RANK_WRITER', 2); define('RANK_USER', 1); define('ARTICLE_NOT_EXIST', 2100); define('PAGE_NOT_EXIST', 3100); define('USER_NOT_EXIST', 4100); define('COMMENT_NOT_EXIST', 5100); error_reporting(E_ALL); if (file_exists("orongo-install.php")) { die("If you didn't install OrongoCMS yet, proceed to the <a href='orongo-install.php'>installer</a><br/>If you installed it, please delete orongo-install.php"); } if (!file_exists(CONFIG)) { die("config.php (" . CONFIG . ") was missing!"); } require_once CONFIG; require LIB . '/function_load.php'; try { load(LIB); } catch (Exception $e) { die($e->getMessage()); } setDatabase(new Database(CONFIG)); try { setLanguage(new Language(ADMIN . '/lang/' . Settings::getLanguageName())); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); die($msgbox->getImports() . $msgbox->toHTML()); } setCurrentPage($paramCurrentPage); $style = null; try { $style = Settings::getStyle(); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); die($msgbox->getImports() . $msgbox->toHTML()); } setMenu(new Menu()); setStyle($style); setDisplay(new Display($style->getStylePath())); setUser(handleSessions()); if (defined('HACK_PLUGINS') && HACK_PLUGINS == true) { Plugin::hackKeys(); } try { setPlugins(Plugin::getActivatedPlugins('orongo-admin/')); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); getDisplay()->addObject($msgbox); } //getLanguage()->setTempLanguage(ADMIN . '/lang/en_US'); OrongoDefaultEventHandlers::init(); }
$result .= '</td>'; $result .= '</tr>'; return $result; } if (isset($_POST['me_action'])) { if ($_POST['me_action'] == 'LOADROW') { $ids = tep_db_prepare_input($_POST['ids']); $rowclass = tep_db_prepare_input($_POST['rowclass']); $rowclass = $rowclass == 'o' ? 'e' : 'o'; $temp_ids = explode(';', $ids); $pids = explode(',', $temp_ids[0]); $dbqsp = tep_db_query("SELECT * FROM jng_sp WHERE jng_sp_id=5"); //getting default provision rate of AM.VD $ressp = tep_db_fetch_array($dbqsp); $amvd_provision_rate = $ressp['provision_rate']; $content = getDisplay($pids[0], $jng_sp_id, $amvd_provision_rate, $rowclass); $rowid = $pids[0]; unset($pids[0]); $result = array(); $result['rowid'] = $rowid; $result['npids'] = count($pids); $result['ids'] = implode(',', $pids); $result['rowclass'] = $rowclass; $result['content'] = $content; ajaxReturn($result); } elseif ($_POST['me_action'] == 'DEACTIVATE') { $jcid = tep_db_prepare_input($_POST['jcid']); $pid = tep_db_prepare_input($_POST['pid']); $info_added = tep_db_prepare_input($_POST['ia']); $info_updated = tep_db_prepare_input($_POST['iu']); $info_deactivated = tep_db_prepare_input($_POST['id']);
$js = 'window.setInterval(function() {'; $js .= 'if(getAjaxBool("' . orongoURL("ajax/isGCSet.php") . '")) window.location="' . orongoURL("orongo-admin/post-issue.php") . '"; '; $js .= '},2000);'; getDisplay()->addJS($js, "document.ready"); if (isset($_GET['error'])) { $postIssue->addMessage($_GET['error'], "error"); } if (isset($_GET['msg'])) { switch ($_GET['msg']) { case 0: $postIssue->addMessage(l("Issue posted"), "success"); break; default: break; } } else { $windowJS = "var login = window.open('" . IssueTracker::getAuthSubRequestUrl(orongoURL("orongo-admin/post-issue.php")) . "');"; getDisplay()->addJS($windowJS, "document.ready"); } $postIssue->render(); } else { $postIssue->main(array("time" => time(), "page_title" => "Post Issue", "page_template" => "dashboard")); $form = new AdminFrontendForm(100, "Post Issue", "POST", orongoURL("actions/action_PostIssue.php")); $form->addInput("Issue Author", "issue_author", "text", "", true); $form->addInput("Issue Title", "issue_title", "text", "", true); $form->addInput("Issue Description", "issue_content", "textarea", "", true); $form->addInput("Issue Labels", "issue_labels", "text", ""); $form->addButton("Post", true); $postIssue->addObject($form); $postIssue->render(); }
public function addToDisplay() { getDisplay()->addHTML($this->toHTML()); }