コード例 #1
0
ファイル: online.php プロジェクト: GlassFace/FusionCMS
 function __construct()
 {
     parent::__construct();
     $this->css = "modules/online/css/online.css";
     $this->js = "modules/online/js/sort.js";
     requirePermission("view");
 }
コード例 #2
0
ファイル: playtime.php プロジェクト: ahuraa/Yekta-Cms
 /**
  * Load the page
  */
 public function index()
 {
     requirePermission("view");
     clientLang("cant_afford", "teleport");
     clientLang("select", "teleport");
     clientLang("selected", "teleport");
     clientLang("dp", "teleport");
     clientLang("free", "teleport");
     //Set the title
     //	$this->template->setTitle("Convert Times DP");
     //Load the content
     $content_data = array("characters" => $this->characters, "url" => $this->template->page_url, "total" => $this->total, "dp" => $this->user->getDp(), "config" => $this->config);
     $page_content = $this->template->loadPage("playtime.tpl", $content_data);
     $PriceCurrency = $this->config->item('cta_price_currency');
     if ($PriceCurrency == 'dp') {
         $headline = "تبدیل زمان بازیکن به امتیاز ویژه";
     } elseif ($PriceCurrency == 'vp') {
         $headline = "تبدیل زمان بازیکن به امتیاز رایگان";
     } elseif ($PriceCurrency == 'op') {
         $headline = "تبدیل زمان بازیکن به امتیاز آنلاین";
     }
     $this->template->setTitle($headline);
     //Load the page
     $page_data = array("module" => "default", "headline" => $headline, "content" => $page_content);
     $page = $this->template->loadPage("page.tpl", $page_data);
     $this->template->view($page, "modules/playtime/css/playtime.css", "modules/playtime/js/playtime.js");
 }
コード例 #3
0
ファイル: checkout.php プロジェクト: verawow/Patchs
 public function __construct()
 {
     parent::__construct();
     $this->user->userArea();
     $this->load->model("store_model");
     requirePermission("view");
 }
コード例 #4
0
ファイル: sessions.php プロジェクト: GlassFace/FusionCMS
 public function __construct()
 {
     parent::__construct();
     $this->load->library('administrator');
     $this->load->model('session_model');
     requirePermission("viewSessions");
 }
コード例 #5
0
ファイル: read.php プロジェクト: GlassFace/FusionCMS
 public function reply($id = false)
 {
     requirePermission("reply");
     if (!$id || $id == $this->user->getId()) {
         die(lang("enter_recipient", "messages"));
     }
     $content = $this->input->post('content');
     if (!$content && strlen($content) > 3) {
         die(lang("enter_message", "messages"));
     }
     // Format title
     $title = $this->read_model->getLastTitle($id);
     if (!preg_match("/Re: /", $title)) {
         $title = "Re: " . $title;
     }
     // Compile it into BBcode
     $content = $this->fusioneditor->compile($content, $this->removeTools);
     // Add it to the database
     $this->read_model->reply($id, $this->user->getId(), $title, $content);
     $this->plugins->onReply($id, $this->user->getId(), $title, $content);
     // Clear the sender and receiver's PM cache
     $this->cache->delete('messages/' . $id . "_*");
     $this->cache->delete('messages/' . $this->user->getId() . "_*");
     die($this->fusioneditor->parse($content, $this->removeTools));
 }
コード例 #6
0
 public function index()
 {
     requirePermission("view");
     $this->template->setTitle(lang("user_panel", "ucp"));
     $cache = $this->cache->get("profile_characters_" . $this->user->getId());
     if ($cache !== false) {
         $characters = $cache;
     } else {
         $characters_data = array("characters" => $this->realms->getTotalCharacters(), "realms" => $this->realms->getRealms(), "url" => $this->template->page_url, "realmObj" => $this->realms);
         $characters = $this->template->loadPage("ucp_characters.tpl", $characters_data);
         $this->cache->save("profile_characters_" . $this->user->getId(), $characters, 60 * 60);
     }
     $links = $this->menu_model->getMenuLinks();
     if ($links) {
         foreach ($links as $key => $value) {
             // Check if we have  the permission, otherwise unset the row
             if ($value['permission'] != '') {
                 if (hasPermission($value['permission'], $value['permissionModule']) !== true) {
                     unset($links[$key]);
                     continue;
                 }
             }
             // Add the website path if internal link
             if (!preg_match("/https?:\\/\\//", $value['link'])) {
                 $links[$key]['link'] = $this->template->page_url . $value['link'];
             }
             $links[$key]['name'] = langColumn($links[$key]['name']);
         }
     }
     $data = array("username" => $this->user->getNickname(), "expansion" => $this->realms->getEmulator()->getExpansionName($this->external_account_model->getExpansion()), "vp" => $this->internal_user_model->getVp(), "dp" => $this->internal_user_model->getDp(), "url" => $this->template->page_url, "location" => $this->internal_user_model->getLocation(), "groups" => $this->acl_model->getGroupsByUser($this->user->getId()), "register_date" => $this->user->getRegisterDate(), "status" => $this->user->getAccountStatus(), "characters" => $characters, "avatar" => $this->user->getAvatar($this->user->getId()), "id" => $this->user->getId(), "menu_links" => $links, "config" => array("vote" => $this->config->item('ucp_vote'), "donate" => $this->config->item('ucp_donate'), "store" => $this->config->item('ucp_store'), "settings" => $this->config->item('ucp_settings'), "expansion" => $this->config->item('ucp_expansion'), "teleport" => $this->config->item('ucp_teleport'), "admin" => $this->config->item('ucp_admin'), "gm" => $this->config->item('ucp_gm')));
     $this->template->view($this->template->loadPage("page.tpl", array("module" => "default", "headline" => lang("user_panel", "ucp"), "content" => $this->template->loadPage("ucp.tpl", $data))), "modules/ucp/css/ucp.css");
 }
コード例 #7
0
ファイル: news.php プロジェクト: GlassFace/FusionCMS
 public function view($id)
 {
     requirePermission("canViewSpecificArticle");
     // if it's not an int or the article doesn't exist, load the index page.
     if (!$this->news_model->articleExists($id)) {
         $this->index();
         return;
     }
     // Get the cache
     $cache = $this->cache->get("news_id" . $id . "_" . getLang());
     // Check if cache is valid
     if ($cache !== false) {
         $this->template->view($cache, "modules/news/css/news.css", "modules/news/js/ajax.js");
     } else {
         // Get the article passed
         $this->news_articles = $this->template->format(array($this->news_model->getArticle($id)));
         // For each key we need to add the special values that we want to print
         foreach ($this->news_articles as $key => $article) {
             $this->news_articles[$key]['headline'] = langColumn($article['headline']);
             $this->news_articles[$key]['content'] = langColumn($article['content']);
             $this->news_articles[$key]['date'] = date("Y/m/d", $article['timestamp']);
             $this->news_articles[$key]['author'] = $this->user->getNickname($article['author_id']);
             $this->news_articles[$key]['link'] = $article['comments'] == -1 ? '' : "href='javascript:void(0)' onClick='Ajax.showComments(" . $article['id'] . ")'";
             $this->news_articles[$key]['comments_id'] = "id='comments_" . $article['id'] . "'";
             $this->news_articles[$key]['comments_button_id'] = "id='comments_button_" . $article['id'] . "'";
             $this->news_articles[$key]['tags'] = $this->news_model->getTags($id);
         }
         $content = $this->template->loadPage("articles.tpl", array("articles" => $this->news_articles, 'url' => $this->template->page_url, "pagination" => ''));
         $content .= $this->template->loadPage("expand_comments.tpl", array("article" => $this->news_articles[0], 'url' => $this->template->page_url));
         $this->cache->save("news_id" . $id . "_" . getLang(), $content);
         // Load the template and pass the page content
         $this->template->view($content, "modules/news/css/news.css", "modules/news/js/ajax.js");
     }
 }
コード例 #8
0
ファイル: donate.php プロジェクト: ahuraa/Yekta-Cms
 public function index()
 {
     requirePermission("view");
     $this->template->setTitle(lang("donate_title", "donate"));
     $donate_jahanpay = $this->config->item('donate_jahanpay');
     $user_id = $this->user->getId();
     $data = array("donate_jahanpay" => $donate_jahanpay, "user_id" => $user_id, "server_name" => $this->config->item('server_name'), "currency" => $this->config->item('donation_currency'), "currency_sign" => $this->config->item('donation_currency_sign'), "multiplier" => $this->config->item('donation_multiplier'), "multiplier_paygol" => $this->config->item('donation_multiplier_paygol'), "url" => pageURL);
     $output = $this->template->loadPage("donate.tpl", $data);
     $this->template->box("<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "ucp\"'>" . lang("ucp") . "</span> &larr; " . lang("donate_panel", "donate"), $output, true, "modules/donate/css/donate.css", "modules/donate/js/donate.js");
     if ($this->config->item('api') == '') {
         if (!isset($api)) {
             $api = '';
         }
     }
     if (!empty($api)) {
         $data = array("api" => $api);
     }
     if ($this->config->item('callback') == '') {
         if (!isset($callback)) {
             $callback = '';
         }
     }
     if (!empty($callback)) {
         $data = array("callback" => $callback);
     }
 }
コード例 #9
0
ファイル: logging.php プロジェクト: GlassFace/FusionCMS
 public function __construct()
 {
     parent::__construct();
     $this->load->library("administrator");
     $this->load->model('logging_model');
     requirePermission("viewLogs");
 }
コード例 #10
0
ファイル: realmmanager.php プロジェクト: ahuraa/Yekta-Cms
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     $this->load->model('realm_model');
     parent::__construct();
     requirePermission("editSystemSettings");
 }
コード例 #11
0
ファイル: theme.php プロジェクト: Jougito/DynWeb
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     parent::__construct();
     require_once 'application/libraries/configeditor.php';
     requirePermission("changeTheme");
 }
コード例 #12
0
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     $this->load->model("menu_model");
     parent::__construct();
     requirePermission("manageAdmin");
 }
コード例 #13
0
ファイル: donate.php プロジェクト: Jougito/DynWeb
 public function index()
 {
     requirePermission("view");
     $this->template->setTitle(lang("donate_title", "donate"));
     $user_id = $this->user->getId();
     $data = array("donate_paypal" => $this->config->item('donate_paypal'), "donate_paygol" => $this->config->item('donate_paygol'), "donate_paymentwall" => $this->config->item('donate_paymentwall'), "user_id" => $user_id, "server_name" => $this->config->item('server_name'), "currency" => $this->config->item('donation_currency'), "currency_sign" => $this->config->item('donation_currency_sign'), "multiplier" => $this->config->item('donation_multiplier'), "multiplier_paygol" => $this->config->item('donation_multiplier_paygol'), "url" => pageURL);
     $output = $this->template->loadPage("donate.tpl", $data);
     $this->template->box("<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "ucp\"'>" . lang("ucp") . "</span> &rarr; " . lang("donate_panel", "donate"), $output, true, "modules/donate/css/donate.css", "modules/donate/js/donate.js");
 }
コード例 #14
0
ファイル: admin.php プロジェクト: verawow/Patchs
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     $this->load->library('pagination');
     $this->load->model("character_transfer_model");
     parent::__construct();
     requirePermission("viewAdmin");
 }
コード例 #15
0
ファイル: admin.php プロジェクト: Jougito/DynWeb
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     $this->load->model('donate_model');
     $this->load->config('donate');
     parent::__construct();
     requirePermission("viewAdmin");
 }
コード例 #16
0
ファイル: messages.php プロジェクト: GlassFace/FusionCMS
 /**
  * Load our resources
  */
 public function __construct()
 {
     parent::__construct();
     //Load libs and models.
     $this->load->library('pagination');
     $this->load->model('inbox_model');
     $this->load->config('pm');
     $this->user->userArea();
     requirePermission("view");
 }
コード例 #17
0
ファイル: armory.php プロジェクト: GlassFace/FusionCMS
 public function __construct()
 {
     parent::__construct();
     requirePermission("view");
     $this->load->model('armory_model');
     $this->load->config('tooltip/tooltip_constants');
     $this->weapon_sub = $this->config->item("weapon_sub");
     $this->armor_sub = $this->config->item("armor_sub");
     $this->slots = $this->config->item("slots");
 }
コード例 #18
0
ファイル: settings.php プロジェクト: ahuraa/Yekta-Cms
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     parent::__construct();
     $this->load->config('smtp');
     $this->load->config('performance');
     require_once 'application/libraries/configeditor.php';
     requirePermission("editSystemSettings");
 }
コード例 #19
0
ファイル: admin.php プロジェクト: ahuraa/Yekta-Cms
 public function __construct()
 {
     // Make sure to load the administrator library!
     $this->load->library('administrator');
     parent::__construct();
     $this->load->model("auctionhouse_model");
     // Set JS and CSS paths
     $this->js = "modules/auctionhouse/js/admin.js";
     $this->css = false;
     requirePermission("viewAdmin");
 }
コード例 #20
0
ファイル: message.php プロジェクト: Jougito/DynWeb
 public function save()
 {
     requirePermission("toggleMessage");
     $fusionConfig = new ConfigEditor("application/config/message.php");
     $fusionConfig->set('message_enabled', $this->input->post('message_enabled'));
     $fusionConfig->set('message_headline', $this->input->post('message_headline'));
     $fusionConfig->set('message_headline_size', $this->input->post('message_headline_size'));
     $fusionConfig->set('message_text', $this->input->post('message_text'));
     $fusionConfig->save();
     die("The announcement has been saved!");
 }
コード例 #21
0
ファイル: character.php プロジェクト: GlassFace/FusionCMS
 function __construct()
 {
     parent::__construct();
     requirePermission("view");
     // Set JS and CSS paths
     $this->js = "modules/character/js/character.js";
     $this->css = "modules/character/css/character.css";
     $this->load->model("armory_model");
     $this->canCache = true;
     $this->items = array();
 }
コード例 #22
0
ファイル: message.php プロジェクト: ahuraa/Yekta-Cms
 public function save()
 {
     requirePermission("toggleMessage");
     $fusionConfig = new ConfigEditor("application/config/message.php");
     $fusionConfig->set('message_enabled', $this->input->post('message_enabled'));
     $fusionConfig->set('message_headline', $this->input->post('message_headline'));
     $fusionConfig->set('message_headline_size', $this->input->post('message_headline_size'));
     $fusionConfig->set('message_text', $this->input->post('message_text'));
     $fusionConfig->save();
     die("اطلاعیه با موفقیت ذخیره شد");
 }
コード例 #23
0
ファイル: admin.php プロジェクト: GlassFace/FusionCMS
 public function delete($id = false)
 {
     // Check for the permission
     requirePermission("removePoll", "sidebox_poll");
     if (!$id || !is_numeric($id)) {
         die;
     }
     $this->poll_model->delete($id);
     // Add log
     $this->logger->createLog('Removed poll', $id);
     $this->plugins->onDeletePoll($id);
 }
コード例 #24
0
ファイル: create.php プロジェクト: ahuraa/Yekta-Cms
 /**
  * Load model and make sure we're logged in
  */
 public function __construct()
 {
     parent::__construct();
     // Load our model
     $this->load->model('messages/create_model');
     $this->load->library('fusioneditor');
     // Make sure they are logged in
     $this->user->userArea();
     requirePermission("view");
     requirePermission("compose");
     $this->removeTools = array("size", "image", "color", "left", "center", "right", "html");
 }
コード例 #25
0
 /**
  * Change the expansion to the given one.
  * @param string $expansion
  * @return string
  */
 public function changeExpansion($expansion = "")
 {
     // Check for the permission
     requirePermission("canChangeExpansion");
     if (array_key_exists($expansion, $this->realms->getExpansions())) {
         //Change the expansion.
         $this->user->setExpansion($expansion);
         $this->plugins->onSetExpansion($this->user->getId(), $expansion);
         return "<center style='margin:10px;font-weight:bold;'>" . lang("expansion_changed", "ucp") . " <a href='" . $this->template->page_url . "ucp'>" . lang("back_to_ucp", "ucp") . "</a></center>";
     }
     return "" . lang("invalid_expansion", "ucp") . "";
 }
コード例 #26
0
 public function __construct()
 {
     parent::__construct();
     $this->load->config('password_recovery');
     $this->load->model('password_recovery_model');
     $this->load->helper('email_helper');
     $this->user->guestArea();
     requirePermission("view");
     if (!$this->config->item('has_smtp')) {
         die(lang("smtp_disabled", "recovery"));
     }
 }
コード例 #27
0
ファイル: vote.php プロジェクト: ahuraa/Yekta-Cms
 public function index()
 {
     requirePermission("view");
     clientLang("hours_remaining", "vote");
     $this->template->setTitle(lang("vote_panel", "vote"));
     $voteData = array('path' => $this->template->page_url, 'vote_sites' => $this->vote_model->getVoteSites(), 'formAttributes' => array('target' => '_blank'));
     $output = $this->template->loadPage("vote.tpl", $voteData);
     // Load the topsite page and format the page contents
     $data = array("module" => "default", "headline" => breadcumb(array("ucp" => lang("ucp"), "ucp/avatar" => lang("vote_panel", "vote"))), "content" => $output);
     $page = $this->template->loadPage("page.tpl", $data);
     //Load the template form
     $this->template->view($page, $this->css, $this->js);
 }
コード例 #28
0
 public function set($language)
 {
     $language = urldecode($language);
     requirePermission("use", "sidebox_language_picker");
     $this->language->setLanguage($language);
     if ($this->user->isOnline()) {
         $this->user->setLanguage($language);
     } else {
         $this->session->set_userdata(array('language' => $language));
     }
     $this->plugins->onSetLanguage($this->user->getId(), $language);
     die;
 }
コード例 #29
0
ファイル: languages.php プロジェクト: GlassFace/FusionCMS
 public function set()
 {
     $language = $this->input->post('language');
     requirePermission("changeDefaultLanguage");
     require_once 'application/libraries/configeditor.php';
     if (!$language || !is_dir("application/language/" . $language)) {
         die("Invalid language");
     }
     $fusionConfig = new ConfigEditor("application/config/default_language.php");
     $fusionConfig->set("language", $language);
     $fusionConfig->save();
     die('success');
 }
コード例 #30
0
ファイル: shoutbox.php プロジェクト: GlassFace/FusionCMS
 public function delete($id = false)
 {
     // Check for the permission
     requirePermission("removeShout", "sidebox_shoutbox");
     if (!$id) {
         die;
     }
     $this->shoutbox_model->deleteShout($id);
     $this->cache->delete('shoutbox_*');
     // Add log
     $this->logger->createLog('Deleted shout', $id);
     $this->plugins->onDelete($id);
     die('Success');
 }