public static function exitWithMessage($message_detail, $forward_url, $second = 3, $type = "message") { switch ($type) { case "success": $page_title = "操作成功!"; break; case "error": $page_title = "错误!"; break; default: $page_title = "嗯!"; break; } $temp = explode('?', $forward_url); $file_url = $temp[0]; if ($file_url[0] !== "/") { $file_url = '/' . $file_url; $forward_url = '/' . $forward_url; } $menu = MenuUrl::getMenuByUrl($file_url); $forward_title = "首页"; if (sizeof($menu) > 0) { $forward_title = $menu['menu_name']; } if ($forward_url) { $message_detail = "{$message_detail} <script>setTimeout(\"window.location.href ='" . ADMIN_URL . "{$forward_url}';\", " . $second * 1000 . ");</script>"; } Template::assign('type', $type); Template::assign('page_title', $page_title); Template::assign('message_detail', $message_detail); Template::assign('forward_url', $forward_url); Template::assign('forward_title', $forward_title); Template::Display('message.tpl'); exit; }
public function ActionDefault() { $template = new Template(); switch ($this->action) { case 'guide': $template->title = 'Usenet Guide'; $template->body = new Template('help_guide'); break; case 'faq': $template->title = 'FAQ'; $template->body = new Template('help_faq'); break; case 'contact': $template->title = 'Contact'; $template->body = new Template('help_contact'); break; default: header('Location: ' . static::$config['url']['base']); exit; } $template->title .= ' :: '; $template->rss = static::$config['url']['rss']; $template->searchbox = new Template('searchbox'); $template->menu = new Template('menu'); $template->Display('layout'); }
public function __construct() { require '../includes/config.inc.php'; $this->SetLanguage(ConfigHelper::Get('/languages/installed')); // check validity of selected view (to prevent loading of other files from the filesystem) if (isset($_REQUEST['view']) && preg_match("/^[a-z0-9_-]+\$/i", $_REQUEST['view']) && file_exists('../views/' . $_REQUEST['view'] . '.php')) { // we now have a safe string $this->sView = $_REQUEST['view']; $this->sViewPath = '../views/' . $_REQUEST['view'] . '.php'; } elseif (empty($_REQUEST['view']) && file_exists('../views/home.php')) { // look for default view $this->sView = 'home'; $this->sViewPath = '../views/home.php'; } else { // invalid request and no default view available - quit application die('Invalid view specified.'); } if (!in_array($this->sView, array('download'))) { // instantiate translations $oTranslations = new Translations($this->sLanguage, ConfigHelper::Get('/cache/translations_dir/'), ConfigHelper::Get('/translations/allow_show_keys')); // instantiate layout template if (ConfigHelper::Get('/template/paths')) { $oTemplate = new Template('layout.php', $this->sLanguage, ConfigHelper::Get('/template/paths')); } else { $oTemplate = new Template('layout.php', $this->sLanguage); } // pass common data to template $oTemplate->Set('appRoot', ConfigHelper::Get('/app_root')); $oTemplate->Set('contactEmail', ConfigHelper::Get('/emails/contact')); $oTemplate->Set('languages', ConfigHelper::Get('/languages/installed')); $oTemplate->Set('language', $this->sLanguage); $oTemplate->Set('missingTranslations', !in_array($this->sLanguage, ConfigHelper::Get('/languages/complete'))); $oTemplate->Set('languageSwitch', ConfigHelper::Get('/languages/switch')); $oTemplate->Set('view', $this->sView); $oTemplate->Set('template', $this->sView); $oTemplate->Set('translation', $oTranslations); $oTemplate->Set('assetsDir', ConfigHelper::Get('/assets_dir')); // add content template $oTemplate->Set('content', new Template("{$this->sView}.php", $this->sLanguage, ConfigHelper::Get('/template/paths'))); $oTemplate->Set('headerImageUrl', ConfigHelper::Get('/images/header/url')); $oTemplate->Set('headerImageAlt', ConfigHelper::Get('/images/header/alt')); $oTemplate->Set('headerImageWidth', ConfigHelper::Get('/images/header/width')); $oTemplate->Set('headerImageHeight', ConfigHelper::Get('/images/header/height')); $oTemplate->Set('headerHref', ConfigHelper::Get('/urls/header')); $oTemplate->Set('reportBugUrl', ConfigHelper::Get('/urls/report_bug')); $oTemplate->Set('viewsDir', '../views/'); $oTemplate->Set('toolUrl', str_replace(array('http://', 'https://'), '', ConfigHelper::Get('/urls/tool'))); // load view require $this->GetViewPath(); // display resulting page echo $oTemplate->Display(); } else { // load view require $this->GetViewPath(); } }
public function RadioInput($sName, $sId, $sLabel, $vValue, $vDefault) { $oTemplate = new Template('radio-input.php', '', ConfigHelper::Get('/template/paths')); $oTemplate->Set('name', $sName); $oTemplate->Set('id', $sId); $oTemplate->Set('label', $sLabel); $oTemplate->Set('value', $vValue); $oTemplate->Set('current', $this->GetCurrentValue($sName, $vDefault)); return $oTemplate->Display(); }
protected function IncTemplate($sTemplate, $aVariables = array()) { $oTemplate = new Template($sTemplate, $this->sLang, $this->aTemplatePaths); $oTemplate->aVars = $this->aVars; if (count($aVariables)) { foreach ($aVariables as $sKey => $vValue) { $oTemplate->set($sKey, $vValue); } } echo $oTemplate->Display(); }
public function ActionDefault() { $template = new Template(); $render = new RSSRender(static::$config['url']['rss']); // Title if (isset($_REQUEST['q']) && !empty($_REQUEST['q'])) { $template->title = SafeHTML(trim($_REQUEST['q'])); } elseif (isset($_REQUEST['cat']) && !empty($_REQUEST['cat'])) { $cat = trim($_REQUEST['cat']); $template->title = SafeHTML($cat != 'dvd' ? ucfirst($cat) : strtoupper($cat)); } else { $template->title = 'All'; } $template->title .= ' :: '; // RSS $template->rss = 'http://' . static::$config['url']['domain'] . static::$config['url']['rss']; if (count($render->link) > 0) { $template->rss .= '?' . http_build_query($render->link, '', '&'); } // Result $template->items = $render->View(); $template->Display('layout_rss', 'text/xml'); }
public static function exitWithMessage($message_detail, $forward_url, $second = 3, $type = "message") { switch ($type) { case "success": $page_title = "操作成功!"; break; case "error": $page_title = "错误!"; break; default: $page_title = "嗯!"; break; } //var_dump($forward_url);exit; $temp = explode('?', $forward_url); $file_url = $temp[0]; if ($file_url[0] !== "/") { $file_url = '/' . $file_url; $forward_url = '/' . $forward_url; } $menu = MenuUrl::getMenuByUrl($file_url); //var_dump($temp,$menu,$file_url);exit; $forward_title = "首页"; if (sizeof($menu) > 0) { $forward_title = $menu['menu_name']; } if ($forward_url) { $message_detail = "{$message_detail}"; } Template::assign('type', $type); Template::assign('page_title', $page_title); Template::assign('message_detail', $message_detail); Template::assign('forward_url', $forward_url); Template::assign('forward_title', $forward_title); Template::Display('message.tpl'); exit; }
die; } if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/CreditShop.tpl.php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/LoggedOnly.class.php"; new LoggedOnly(); $tpl = new Template(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/CreditShop.class.php"; $cs = new CreditShop($db); if (substr_count($_GET['c'], "/") > 0) { $my_url = explode("/", $_GET['c']); $action = $my_url[1]; } else { $action = false; } $my_array['CreditShop'] = $cs->ShowPackageList($acc); if (!$action) { $my_array['Feedback'] = ""; } else { $my_array['Feedback'] = $cs->BuyPackage($action, $db, $acc); } $my_array['CurrentBalance'] = $acc->Credits; $db->Disconnect(); $tpl->Assign($my_array); $tpl->Display("Templates/{$MainTemplate}/CreditShop.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/CreditShop.tpl.php doesnt exists"; }
// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. require_once 'lib/global.php'; require_once 'template.php'; require_once 'utility.php'; $functions = array('stats' => '_xStatsShow', 'forgot' => '_xForgotPasswordShow', 'remind' => '_xForgotPasswordConfirm', 'confirm' => '_xForgotPasswordConfirmed'); prepare_request(); $t = new Template(); $t->AssignByRef('g_config', $C); $t->AssignByRef('g_request', $_REQUEST); if (!$C['flag_allow_login']) { $t->Display('trade-stats-disabled.tpl'); exit; } $r = $_REQUEST['r']; if (isset($functions[$r])) { call_user_func($functions[$r]); } else { _xStatsLoginShow(); } function _xStatsLoginShow() { global $t, $C; $t->Display('trade-stats-login.tpl'); } function _xStatsShow() {
public function ActionDefault() { // If a _lot_ of NZB files are requested together, we might run out of memory ini_set('memory_limit', '1024M'); $ids = array(); // Get post if (isset($_POST['id']) && is_array($_POST['id'])) { foreach ($_POST['id'] as $id) { $id = intval($id); if ($id > 0) { $ids[$id] = $id; } } } elseif (isset($this->params[0]) && (int) $this->params[0] > 0) { $ids[(int) $this->params[0]] = (int) $this->params[0]; } else { die('<b>Error</b>: invalid post specified.'); } $nzb = ''; $template = new Template(); $template->body = ''; foreach ($ids as $id) { try { $post = Post::FindByID($id); } catch (ActiveRecord_NotFoundException $e) { die('<b>Error</b>: post ' . SafeHTML($id) . ' does not exist.'); } // Updated time must be at least a minute ago, otherwise NZB cache may not be updated if (file_exists(Post::NZBFile($post->id)) && $post->updated < time() - 60) { $template->body .= file_get_contents(Post::NZBFile($post->id)); } else { $template->body .= Post::NZB($post->id); } // NZB name is taken from first post in list if (empty($nzb)) { $nzb = Post::NZBName($post->subject); } // Don't try to download all BDMV raws in one go please if (memory_get_peak_usage() > self::MEMORY_LIMIT) { die('<b>Error:</b> out of memory. Please download fewer NZB files together.'); } } // If multiple posts in one NZB, remove numbers from NZB name if (count($ids) > 1) { $nzb = preg_replace('/\\s+\\d+\\.nzb$/i', '.nzb', $nzb); $nzb = preg_replace('/\\s+\\d+\\s+/i', ' ', $nzb); $nzb = preg_replace('/\\s+/i', ' ', $nzb); } header('Content-disposition: inline; filename="' . $nzb . '"'); // Output NZB file $template->Display('layout_nzb', 'application/x-nzb', false); // Count download(s) if (isset($_SERVER['REMOTE_ADDR']) && !empty($_SERVER['REMOTE_ADDR'])) { // We don't store actual IP, only MD5 of the IP (for privacy) $ip = md5(strtolower(trim($_SERVER['REMOTE_ADDR']))); foreach ($ids as $id) { try { $download = Download::Find(array('postid' => $id, 'userip' => $ip)); // Found = ignore (count downloads only once) } catch (ActiveRecord_NotFoundException $e) { // Not found = add $download = new Download(); $download->postid = $id; $download->userip = $ip; $download->Save(); } } } }
$acc = new Account($db); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/WebTrade.class.php"; $wt = new WebTrade($acc); $my_array['WarningMessage'] = ""; $my_array['WebTradeContent'] = ""; if ($WebTradeSnoCheck && (!isset($_SESSION['sno__numb']) || $_SESSION['sno__numb'] === false)) { $sno_tpl['url'] = $_SERVER['REQUEST_URI']; if (!isset($_SESSION['sno__numb'])) { $sno_tpl['Feedback'] = ""; } else { if ($_SESSION['sno__numb'] === false) { $sno_tpl['Feedback'] = $GenericMessage09; } } $tpl->Assign($sno_tpl); $tpl->Display("Templates/{$MainTemplate}/SNO.tpl.php"); } else { if (!$WebTradeBlockCheck || $WebTradeBlockCheck && $acc->CheckBlockStatus($acc->memb___id) == 0) { if (substr_count($_GET['c'], "/") > 0) { $my_url = explode("/", $_GET['c']); $action = $my_url[1]; if (isset($my_url[2])) { $data = $my_url[2]; } } if (isset($action)) { switch ($action) { case "Sell": if (isset($_POST['SellItem'])) { $my_array['WebTradeContent'] = $wt->SendSellItem($db, $acc->memb___id); } else {
// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. require_once 'lib/global.php'; require_once 'utility.php'; require_once 'template.php'; $functions = array('register' => '_xRegister', 'confirm' => '_xConfirmShow'); prepare_request(); $t = new Template(); $t->AssignByRef('g_config', $C); $t->AssignByRef('g_request', $_REQUEST); if (!$C['flag_accept_new_trades']) { $t->Display('register-closed.tpl'); exit; } $r = $_REQUEST['r']; if (isset($functions[$r])) { call_user_func($functions[$r]); } else { _xRegisterShow(); } function _xRegisterShow() { global $t, $C; // Get trade rules $t->Assign('g_trade_rules', file_get_contents(FILE_TRADE_RULES)); $t->Assign('g_trade_rules_array', file(FILE_TRADE_RULES)); // Categories
<?php include "init.php"; // index.php?link_type=(torrent|text|link)&infohash=B05930182B4FC941E73A4278FC612D154D5A822B define("LINK_TYPE", isset($_GET['link_type']) ? $_GET['link_type'] : ''); define("LINK_INFOHASH", isset($_GET['infohash']) ? $_GET['infohash'] : ''); define("PAGE_ACTION", isset($_GET['page_action']) ? $_GET['page_action'] : "main"); if (LINK_TYPE == 'link') { define("PAGE_URL", 'link'); } else { define("PAGE_URL", isset($_GET['page_url']) ? $_GET['page_url'] : "start"); } if (file_exists(_configs()->paths->torrents . LINK_INFOHASH . '.torrent') && preg_match("/^[0-F]{40}/i", LINK_INFOHASH)) { if (LINK_TYPE == 'torrent' || LINK_TYPE == 'text' || LINK_TYPE == '') { $file = file_get_contents(_configs()->paths->torrents . LINK_INFOHASH . '.torrent'); if (LINK_TYPE == 'text') { header('Content-Disposition: attachment; filename="' . LINK_INFOHASH . '.txt"'); header('Content-Type: text/plain'); } else { header('Content-Disposition: attachment; filename="' . LINK_INFOHASH . '.torrent"'); header('Content-Type: application/x-bittorrent'); } die($file); } else { $tpl = new Template(_configs()->paths->template . 'template.php'); echo $tpl->Display(); } } else { $tpl = new Template(_configs()->paths->template . 'template.php'); echo $tpl->Display(); }
$user_name = $password = $remember = $verify_code = ''; extract($_POST, EXTR_IF_EXISTS); if (Common::isPost()) { // 去掉验证码 if(strtolower($verify_code) != strtolower($_SESSION['osa_verify_code'])){ if (0) { OSAdmin::alert("error", ErrorMessage::VERIFY_CODE_WRONG); } else { $user_info = User::checkPassword($user_name, $password); if ($user_info) { if ($user_info['status'] == 1) { User::loginDoSomething($user_info['user_id']); if ($remember) { $encrypted = OSAEncrypt::encrypt($user_info['user_id']); User::setCookieRemember(urlencode($encrypted), 30); } $ip = Common::getIp(); SysLog::addLog($user_name, 'LOGIN', 'User', UserSession::getUserId(), json_encode(array("IP" => $ip))); Common::jumpUrl('panel/index.php'); } else { OSAdmin::alert("error", ErrorMessage::BE_PAUSED); } } else { OSAdmin::alert("error", ErrorMessage::USER_OR_PWD_WRONG); SysLog::addLog($user_name, 'LOGIN', 'User', '', json_encode(ErrorMessage::USER_OR_PWD_WRONG)); } } } Template::assign('_POST', $_POST); Template::assign('page_title', '登入'); Template::Display('login.tpl');
if (!isset($_SESSION['memb___id']) || !isset($_SESSION['memb__pwd'])) { $my_array['tpldir'] = $MainSiteFolder . "Templates/{$MainTemplate}/"; $my_array['SiteFolder'] = $MainSiteFolder; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Template.class.php"; $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/modules/LoginAjax1.tpl.php"); } else { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $my_array['credits'] = $acc->Credits; $my_array['messages'] = $acc->Messages; $my_array['name'] = $acc->memb_name; $my_array['vip_status'] = $GenericMessage04 . $acc->VIP_Name; $my_array['due_date'] = $GenericMessage05 . $acc->VIP_DueDate; $db->Query("SELECT idx FROM Z_Currencies"); $NumRows = $db->NumRows(); for ($i = 0; $i < $NumRows; $i++) { $ArrayCurrencies[$i] = $db->GetRow(); } for ($i = 0; $i < $NumRows; $i++) { $my_array["Credit_" . $ArrayCurrencies[$i]['idx']] = number_format($acc->GetCreditAmount($acc->memb___id, $ArrayCurrencies[$i]['idx'], $db), 0, ",", "."); } $db->Disconnect(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Template.class.php"; $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/modules/LoginAjax2.tpl.php"); }
$acc = new Account($db); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Item.class.php"; $it = new Item(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/WebShop.class.php"; $ws = new WebShop($db, $acc); if ($WebShopSnoCheck && (!isset($_SESSION['sno__numb']) || $_SESSION['sno__numb'] === false)) { $sno_tpl['url'] = $_SERVER['REQUEST_URI']; if (!isset($_SESSION['sno__numb'])) { $sno_tpl['Feedback'] = ""; } else { if ($_SESSION['sno__numb'] === false) { $sno_tpl['Feedback'] = $GenericMessage09; } } $tpl->Assign($sno_tpl); $tpl->Display("Templates/{$MainTemplate}/SNO.tpl.php"); } else { $category = 0; if (substr_count($_GET['c'], "/") > 0) { $my_url = explode("/", $_GET['c']); $category = $my_url[1]; if (isset($my_url[2])) { $item = $my_url[2]; } } $my_array['WebShop_Categories'] = $ws->GetCategories($category); $my_array['WebShop_Items'] = $WebShopMessage001; if ($category === "MyBuys") { $my_array['WebShop_Last_Buys'] = ""; if (!empty($item)) { if ($item == "Insurance") {
require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/WebVault.class.php"; $wv = new WebVault($db, $acc); $my_array['WarningMessage'] = ""; $my_array['VaultCount'] = 0; $my_array['VaultLimit'] = 0; if ($WebVaultSnoCheck && (!isset($_SESSION['sno__numb']) || $_SESSION['sno__numb'] === false)) { $sno_tpl['url'] = $_SERVER['REQUEST_URI']; if (!isset($_SESSION['sno__numb'])) { $sno_tpl['Feedback'] = ""; } else { if ($_SESSION['sno__numb'] === false) { $sno_tpl['Feedback'] = $GenericMessage09; } } $tpl->Assign($sno_tpl); $tpl->Display("Templates/{$MainTemplate}/SNO.tpl.php"); } else { if (!$WebVaultBlockCheck || $WebVaultBlockCheck && $acc->CheckBlockStatus($acc->memb___id) == 0) { $ConnectStatus = $acc->CheckConnectStatus($acc->memb___id, $db); if ($ConnectStatus == 1) { $my_array['WarningMessage'] = "<span class=\"WebVaultWarningMessage\">{$WebVaultMsg02}</span>"; $my_array['WebVault'] = ""; $my_array['GameVault'] = ""; } else { if (isset($_POST['VaultItem']) || isset($_POST['WebItem'])) { $my_array['WarningMessage'] = $wv->CheckTransfers($db); } } $my_array['WebVault'] = $wv->GetWebItensList($db); $my_array['GameVault'] = $wv->GetVaultItensList($db); } else {
<?php @session_start(); if (!@(require "Config/Main.php")) { die; } require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/GenericMessages.php"; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/GeneralContent.tpl.php")) { $my_array['GeneralTitle'] = $GenericMessage07; $my_array['GeneralContent'] = $GenericMessage06; $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display("Templates/{$MainTemplate}/GeneralContent.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/GeneralContent.tpl.php doesnt exists"; }
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/../init.inc.php'; Template::Display('ht/module/hello.tpl');
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/../init.inc.php'; Template::Display('ht/module/template.tpl');
if ($action == "NewTicket") { $myTicketId = $hd->CreateNewTicket(); $saida .= $HelpDeskMessage23; } else { $myTicketId = $action; $saida .= $HelpDeskMessage24; } $myMessageId = $hd->AddNewMessage($myTicketId, $msg); if (count($_FILES) > 0 && $myMessageId) { $saida .= $hd->AddAttach($_FILES, $myMessageId); } } $saida .= "<p> </p><p><a href='?c=HelpDesk'>{$HelpDeskMessage14}</a></p>"; $my_array['HelpDesk'] = $saida; } else { if ($action == "NewTicket") { $my_array['HelpDesk'] = $hd->NewTicketForm(); } else { $my_array['HelpDesk'] = $hd->ViewTicket($action); } } } else { $my_array['HelpDesk'] = $hd->GetTicketsList(); } $db->Disconnect(); $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display("Templates/{$MainTemplate}/HelpDesk.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/HelpDesk.tpl.php doesnt exists"; }
// die("Reseller module not authorized.<br />Ask at www.leoferrarezi.com"); // } //} require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/Reseller.php"; if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/GeneralContent.tpl.php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $my_array['GeneralTitle'] = $ResellerMsg01; $my_array['GeneralContent'] = ""; $db->Query("SELECT memb___id FROM Z_Resellers WHERE memb___id = '" . $acc->memb___id . "'"); if ($db->NumRows() < 1) { $return = "<div class=\"ResellerIntroDiv\">{$ResellerMsg02}</div>"; } else { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Reseller.class.php"; $rs = new Reseller(); if (!isset($_POST['cust_memb___id']) || empty($_POST['cust_memb___id'])) { $return = $rs->ResellerForm($db, $acc); } else { $return = $rs->TransferResellerCredits($db, $acc, $_POST['cust_memb___id'], $_POST['cust_amount']); } } $my_array['GeneralContent'] = $return; $db->Disconnect(); $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/GeneralContent.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/GeneralContent.tpl.php doesnt exists"; }
<?php @session_start(); if (!@(require "Config/Main.php")) { die; } if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/ChangeKey.tpl.php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/LoggedOnly.class.php"; new LoggedOnly(); $my_array['Feedback'] = ""; if (isset($_POST['sno__numb'])) { $sno__numb = $_POST['sno__numb']; $new__key1 = $_POST['new__key1']; $new__key2 = $_POST['new__key2']; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $my_array['Feedback'] = $acc->ChangeKey($sno__numb, $new__key1, $new__key2); //Desconecta do banco $db->Disconnect(); } $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display("Templates/{$MainTemplate}/ChangeKey.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/ChangeKey.tpl.php doesnt exists"; }
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/../init.inc.php'; Template::Display('ht/login.tpl');
$oTemplate->Set('basename', $sBasename); echo $oTemplate->Display(); exit; } $sUploadDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/upload_dir')); $sSpriteDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/sprite_dir')); $sTranslationsCacheDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/translations_dir')); $sCssCacheDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/css_archive')); $sJsCacheDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/js_archive')); ConfigHelper::CreateDir($sUploadDir); ConfigHelper::CreateDir($sSpriteDir); ConfigHelper::CreateDir($sTranslationsCacheDir); ConfigHelper::CreateDir($sCssCacheDir); ConfigHelper::CreateDir($sJsCacheDir); // This section is present for Project Fondue use only and can be safely removed */ if (ConfigHelper::Get('/cache/tla/dir')) { $sTextLinkAdsDir = ConfigHelper::GetAbsolutePath($sBasename . ConfigHelper::Get('/cache/tla/dir')); ConfigHelper::CreateDir($sTextLinkAdsDir); ConfigHelper::CreateFile($sTextLinkAdsDir . '/' . ConfigHelper::Get('/cache/tla/file')); } // End section // if (!is_writeable($sUploadDir) || !is_writeable($sSpriteDir) || !is_writeable($sTranslationsCacheDir) || !is_writeable($sCssCacheDir) || !is_writeable($sJsCacheDir)) { $oTemplate = new Template('setup-permissions-error.php'); $oTemplate->Set('uploadDir', $sUploadDir); $oTemplate->Set('spriteDir', $sSpriteDir); $oTemplate->Set('translationsCacheDir', $sTranslationsCacheDir); $oTemplate->Set('cssCacheDir', $sCssCacheDir); $oTemplate->Set('jsCacheDir', $sJsCacheDir); echo $oTemplate->Display(); exit; }
protected function Details($id) { // Details screen may use a lot of memory if there are a lot of files in a post ini_set('memory_limit', '512M'); $template = new Template(); $result = ''; // Get post try { $post = Post::FindByID($id); $author = Author::FindByID($post->authorid); } catch (ActiveRecord_NotFoundException $e) { die('<b>Error</b>: post ' . SafeHTML($this->params[0]) . ' does not exist.'); } // Cache newsgroups try { $newsgroups = array(); $groups = Newsgroup::FindAll(); if (!is_array($groups)) { $groups = array($groups); } foreach ($groups as $group) { $newsgroups[$group->id] = $group->name; } } catch (ActiveRecord_NotFoundException $e) { die('<b>Error</b>: database problem - no newsgroups defined.'); } $result .= '<table cellspacing="0"><tr><th>Poster</th><th>Newsgroups</th></tr>' . "\n"; $poster = trim(preg_replace('/\\s+/', ' ', str_replace(array('@', '(', ')', '[', ']', ',', '.', '!', '-', '#', '^', '$', '+', '/', '\\'), ' ', $author->name))); $result .= '<tr><td class="split"><a href="' . static::$config['url']['base'] . '?' . http_build_query(array('q' => '@poster ' . $poster), '', '&') . '">' . SafeHTML($author->name) . '</a></td><td class="split">'; try { $list = array(); $groups = PostGroup::FindByPostID($post->id); if (!is_array($groups)) { $list[] = $newsgroups[$groups->groupid]; } else { foreach ($groups as $group) { $list[] = $newsgroups[$group->groupid]; } } $result .= implode('<br />', $list); } catch (ActiveRecord_NotFoundException $e) { die('<b>Error</b>: database problem - post is not associated with any newsgroup.'); } $result .= '</tr>' . "\n" . '</table><br />' . "\n"; // Get files try { $result .= '<table cellspacing="0">' . "\n"; $result .= '<tr><th>Date</th><th>Subject</th><th>Parts</th><th>Size</th></tr>' . "\n"; $articles = Article::Find(null, 'SELECT * FROM `articles` WHERE `postid` = ' . $post->id . ' ORDER BY `subject` ASC'); if (!is_array($articles)) { $articles = array($articles); } foreach ($articles as $article) { $result .= '<tr>' . "\n"; $result .= '<td class="date">' . gmdate('Y-m-d H:i', $article->post_date) . '</td>' . "\n"; $result .= '<td class="subject">' . SafeHTML($article->subject) . '</td>'; if ($article->parts_found != $article->parts_total) { $result .= '<td class="parts"><span class="warning">' . SafeHTML($article->parts_found) . ' / ' . SafeHTML($article->parts_total) . '</span></td>'; } else { $result .= '<td class="parts">' . SafeHTML($article->parts_found) . ' / ' . SafeHTML($article->parts_total) . '</span></td>'; } $result .= '<td class="size">' . FormatSize($article->size, 2) . '</td>'; $result .= '</tr>' . "\n"; } $result .= '</table>' . "\n"; } catch (ActiveRecord_NotFoundException $e) { die('<b>Error</b>: database problem - post has no associated articles.'); } $template->body = $result; $template->Display('layout_ajax'); }
// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. require_once 'includes/global.php'; $t = new Template(); $t->Assign('g_config', Config::GetAll()); $t->Assign('g_loc_upload', true); $t->Assign('g_logged_in', isset($_COOKIE[LOGIN_COOKIE])); if (!Config::Get('flag_allow_uploads')) { $t->Display('upload-disabled.tpl'); return; } // For flash uploads, cookie sent through post vars if (isset($_GET['flash'])) { if (isset($_POST['cookie'])) { $_COOKIE[LOGIN_COOKIE] = html_entity_decode($_POST['cookie']); } else { $t->Assign('g_errors', array(_T('Validation:PHP post_max_size exceeded'))); $t->Display('upload-flash-errors.tpl'); exit; } } if (!AuthenticateUser::Login()) { header('Location: ' . Config::Get('base_url') . '/user.php?r=login&referrer=' . urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), true, 301); return;
<?php @session_start(); if (!@(require "Config/Main.php")) { die; } if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/LostPassword.tpl.php")) { $tpl = new Template(); if (isset($_POST['memb___id'])) { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $my_array['Feedback'] = $acc->LostPassword($_POST); $db->Disconnect(); } else { $my_array['Feedback'] = ""; } $tpl->Assign($my_array); $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/LostPassword.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/LostPassword.tpl.php doesnt exists"; }
<?php @session_start(); if (!@(require "Config/Main.php")) { die; } if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/PagSeguro.tpl.php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/LoggedOnly.class.php"; new LoggedOnly(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $my_array['Feedback'] = ""; $my_array['memb___id'] = $acc->memb___id; $my_array['mail_addr'] = $acc->mail_addr; $my_array['memb_name'] = $acc->memb_name; $tpl = new Template(); $tpl->Assign($my_array); $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/PagSeguro.tpl.php"); } else { echo "ERROR: File Templates/{$MainTemplate}/PagSeguro.tpl.php doesnt exists"; }
if (!@(require "Config/Main.php")) { die; } if (substr_count($_GET['c'], "/") > 0) { $my_url = explode("/", $_GET['c']); $code = $my_url[1]; $memb___id = $my_url[2]; } else { $code = $memb___id = false; } if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/MailActivate.tpl.php")) { require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/MailActivate.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/MuDatabase.class.php"; $db = new MuDatabase(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php"; $acc = new Account($db); $tpl = new Template(); if ($memb___id || $code) { $tpl->Assign(array('MailActivateMessage' => $acc->MailActivate($memb___id, $code))); } else { if (isset($_POST['proceed'])) { $tpl->Assign(array('MailActivateMessage' => $acc->MailActivateSend($db))); } else { $tpl->Assign(array('MailActivateMessage' => $acc->MailActivateForm())); } } $tpl->Display("Templates/{$MainTemplate}/MailActivate.tpl.php"); $db->Disconnect(); } else { echo "ERROR: File Templates/{$MainTemplate}/MailActivate.tpl.php doesnt exists"; }