Exemplo n.º 1
0
 public function get_pdf(\Fuse_App $app, $hash)
 {
     $api = $this->di['api_guest'];
     $data = array('hash' => $hash);
     $invoice = $api->invoice_pdf($data);
     return $app->render('mod_invoice_pdf', array('invoice' => $invoice));
 }
Exemplo n.º 2
0
 public function get_kb_article(\Fuse_App $app, $category, $slug)
 {
     $api = $this->di['api_guest'];
     $data = array('slug' => $slug);
     $article = $api->kb_article_get($data);
     return $app->render('mod_kb_article', array('article' => $article));
 }
Exemplo n.º 3
0
 public function get_manage(\Fuse_App $app, $code)
 {
     $this->di['is_admin_logged'];
     $guest_api = $this->di['api_guest'];
     $currency = $guest_api->currency_get(array('code' => $code));
     return $app->render('mod_currency_manage', array('currency' => $currency));
 }
Exemplo n.º 4
0
 public function get_email(\Fuse_App $app, $id)
 {
     $api = $this->di['api_client'];
     $data = array('id' => $id);
     $email = $api->email_get($data);
     return $app->render('mod_email_email', array('email' => $email));
 }
Exemplo n.º 5
0
 public function get_order(\Fuse_App $app, $id)
 {
     $api = $this->di['api_client'];
     $data = array('id' => $id);
     $order = $api->order_get($data);
     return $app->render('mod_order_manage', array('order' => $order));
 }
Exemplo n.º 6
0
 public function get_contact_us_conversation(\Fuse_App $app, $hash)
 {
     $api = $this->di['api_guest'];
     $data = array('hash' => $hash);
     $array = $api->support_ticket_get($data);
     return $app->render('mod_support_contact_us_conversation', array('ticket' => $array));
 }
Exemplo n.º 7
0
 public function register(\Fuse_App &$app)
 {
     $app->post('/api/:role/:class/:method', 'post_method', array('role', 'class', 'method'), get_class($this));
     $app->get('/api/:role/:class/:method', 'get_method', array('role', 'class', 'method'), get_class($this));
     //all other requests are error requests
     $app->get('/api/:page', 'show_error', array('page' => '(.?)+'), get_class($this));
     $app->post('/api/:page', 'show_error', array('page' => '(.?)+'), get_class($this));
 }
Exemplo n.º 8
0
 public function get_index(\Fuse_App $app)
 {
     if ($this->di['auth']->isAdminLoggedIn()) {
         return $app->render('mod_index_dashboard');
     } else {
         return $app->redirect('/staff/login');
     }
 }
Exemplo n.º 9
0
 public function get_order(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $data = array('id' => $id);
     $order = $api->order_get($data);
     $set = array('order' => $order);
     if (isset($order['plugin']) && !empty($order['plugin'])) {
         $set['plugin'] = 'plugin_' . $order['plugin'] . '_manage.phtml';
     }
     return $app->render('mod_order_manage', $set);
 }
Exemplo n.º 10
0
 public function get_reset_password_confirm(\Fuse_App $app, $hash)
 {
     $api = $this->di['api_guest'];
     $data = array('hash' => $hash);
     $api->client_confirm_reset($data);
     $app->redirect('/login');
 }
Exemplo n.º 11
0
 public function get_registrar(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $registrar = $api->servicedomain_registrar_get(array('id' => $id));
     return $app->render('mod_servicedomain_registrar', array('registrar' => $registrar));
 }
Exemplo n.º 12
0
 public function get_history(\Fuse_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_staff_login_history');
 }
Exemplo n.º 13
0
 public function get_import_servers(\Fuse_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_servicesolusvm_import_servers');
 }
Exemplo n.º 14
0
 public function get_members(\Fuse_App $app)
 {
     return $app->render('mod_forum_members_list', array());
 }
Exemplo n.º 15
0
 public function get_server(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $server = $api->servicehosting_server_get(array('id' => $id));
     return $app->render('mod_servicehosting_server', array('server' => $server));
 }
Exemplo n.º 16
0
 public function get_api(\Fuse_App $app, $id)
 {
     // always call this method to validate if admin is logged in
     $api = $this->di['api_admin'];
     $list_from_controller = $api->example_get_something();
     $params = array();
     $params['api_example'] = true;
     $params['list_from_controller'] = $list_from_controller;
     return $app->render('mod_example_index', $params);
 }
Exemplo n.º 17
0
 public function get_email(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $template = $api->email_email_get(array('id' => $id));
     return $app->render('mod_email_details', array('email' => $template));
 }
Exemplo n.º 18
0
 public function get_protected(\Fuse_App $app)
 {
     // call $this->di['is_client_logged'] method to validate if client is logged in
     $this->di['is_client_logged'];
     return $app->render('mod_example_index', array('show_protected' => true));
 }
Exemplo n.º 19
0
 public function get_index(\Fuse_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_cookieconsent_index');
 }
Exemplo n.º 20
0
 public function get_object(\Fuse_App $app, $what)
 {
     $tpl = 'mod_embed_' . $what;
     return $app->render($tpl);
 }
Exemplo n.º 21
0
 public function get_profile(\Fuse_App $app, $id)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_forum_profile', array('client_id' => $id));
 }
Exemplo n.º 22
0
 public function get_cart(\Fuse_App $app)
 {
     return $app->render('mod_cart_index');
 }
Exemplo n.º 23
0
 public function get_history(\Fuse_App $app)
 {
     $api = $this->di['api_admin'];
     return $app->render('mod_client_login_history');
 }
Exemplo n.º 24
0
 public function get_edit(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $model = $api->massmailer_get(array('id' => $id));
     return $app->render('mod_massmailer_message', array('msg' => $model));
 }
Exemplo n.º 25
0
 public function get_js(\Fuse_App $app)
 {
     header("Content-Type: application/javascript");
     return $app->render('mod_orderbutton_js');
 }
Exemplo n.º 26
0
 public function get_icons(\Fuse_App $app)
 {
     $this->di['is_admin_logged'];
     $location = BF_PATH_UPLOADS . '/icons/*';
     $list = array();
     $files = glob($location);
     foreach ($files as $f) {
         $name = pathinfo($f, PATHINFO_BASENAME);
         $list[] = $this->di['config']['url'] . '/uploads/icons/' . $name;
     }
     return $app->render('mod_filemanager_icons', array('icons' => $list));
 }
Exemplo n.º 27
0
 public function get_index(\Fuse_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_notification_index');
 }
Exemplo n.º 28
0
 public function get_theme(\Fuse_App $app, $theme)
 {
     $this->di['is_admin_logged'];
     $mod = $this->di['mod']('theme');
     $service = $mod->getService();
     $t = $service->getTheme($theme);
     $preset = $service->getCurrentThemePreset($t);
     $html = $t->getSettingsPageHtml($theme);
     $info = null;
     if (!$t->isAssetsPathWritable()) {
         $info = __('Theme ":name" assets folder is not writable. Set folder :folder permissions to 777', array(':name' => $t->getName(), ':folder' => $t->getPathAssets()));
     }
     if (empty($html)) {
         $info = __('Theme ":name" is not configurable', array(':name' => $t->getName()));
     }
     $data = array('info' => $info, 'error' => $this->di['array_get']($_GET, 'error', null), 'theme_code' => $t->getName(), 'settings_html' => $html, 'uploaded' => $t->getUploadedAssets($theme), 'settings' => $service->getThemeSettings($t, $preset), 'current_preset' => $preset, 'presets' => $service->getThemePresets($t), 'snippets' => $t->getSnippets());
     return $app->render('mod_theme_preset', $data);
 }
Exemplo n.º 29
0
 public function get_post(\Fuse_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $post = $api->news_get(array('id' => $id));
     return $app->render('mod_news_post', array('post' => $post));
 }
Exemplo n.º 30
0
 public function get_settings(\Fuse_App $app, $mod)
 {
     $this->di['is_admin_logged'];
     $file = 'mod_' . $mod . '_settings';
     return $app->render($file);
 }