Exemplo n.º 1
0
 public function get_order(\Box_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.º 2
0
 public function get_manage(\Box_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.º 3
0
 public function get_contact_us_conversation(\Box_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.º 4
0
 public function get_kb_article(\Box_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.º 5
0
 public function get_email(\Box_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.º 6
0
 public function get_pdf(\Box_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.º 7
0
 public function get_index(\Box_App $app)
 {
     if ($this->di['auth']->isAdminLoggedIn()) {
         return $app->render('mod_index_dashboard');
     } else {
         return $app->redirect('/staff/login');
     }
 }
Exemplo n.º 8
0
 public function register(\Box_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.º 9
0
 public function get_order(\Box_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(\Box_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_api(\Box_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.º 12
0
 public function get_theme(\Box_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.º 13
0
 public function get_import_servers(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_servicesolusvm_import_servers');
 }
 public function get_index(Box_App $app)
 {
     $api = $app->getApiAdmin();
     return $app->render('mod_embed_index');
 }
Exemplo n.º 15
0
 public function get_registrar(\Box_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.º 16
0
 public function get_profile(\Box_App $app, $id)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_forum_profile', array('client_id' => $id));
 }
Exemplo n.º 17
0
 public function get_edit(\Box_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.º 18
0
 public function get_promos(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_product_promos');
 }
Exemplo n.º 19
0
 public function get_protected(\Box_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.º 20
0
 public function get_cat(\Box_App $app, $id)
 {
     $api = $this->di['api_admin'];
     $cat = $api->kb_category_get(array('id' => $id));
     return $app->render('mod_kb_category', array('category' => $cat));
 }
Exemplo n.º 21
0
 public function get_index(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_notification_index');
 }
Exemplo n.º 22
0
 public function get_object(\Box_App $app, $what)
 {
     $tpl = 'mod_embed_' . $what;
     return $app->render($tpl);
 }
Exemplo n.º 23
0
 public function register(\Box_App &$app)
 {
     $app->get('/me', 'get_profile', array(), '\\Box\\Mod\\Client\\Controller\\Client');
     $app->get('/balance', 'get_balance', array(), '\\Box\\Mod\\Client\\Controller\\Client');
     $app->get('/reset-password-confirm/:hash', 'get_reset_password_confirm', array('hash' => '[a-z0-9]+'), '\\Box\\Mod\\Client\\Controller\\Client');
     $app->get('/emails', 'get_emails', array(), '\\Box\\Mod\\Email\\Controller\\Client');
     $app->get('/banklink/:hash/:id', 'get_banklink', array('id' => '[0-9]+', 'hash' => '[a-z0-9]+'), '\\Box\\Mod\\Invoice\\Controller\\Client');
     $app->get('/blog', 'get_news', array(), '\\Box\\Mod\\News\\Controller\\Client');
     $app->get('/blog/:slug', 'get_news_item', array('slug' => '[a-z0-9-]+'), '\\Box\\Mod\\News\\Controller\\Client');
     $app->get('/service', 'get_orders', array(), '\\Box\\Mod\\Order\\Controller\\Client');
     $app->get('/service/manage/:id', 'get_order', array('id' => '[0-9]+'), '\\Box\\Mod\\Order\\Controller\\Client');
     $app->get('/contact-us', 'get_contact_us', array(), '\\Box\\Mod\\Support\\Controller\\Client');
     $app->get('/contact-us/conversation/:hash', 'get_contact_us_conversation', array('hash' => '[a-z0-9]+'), '\\Box\\Mod\\Support\\Controller\\Client');
     $service = $this->di['mod_service']('redirect');
     $redirects = $service->getRedirects();
     foreach ($redirects as $redirect) {
         $app->get('/' . $redirect['path'], 'do_redirect', array(), get_class($this));
     }
 }
Exemplo n.º 24
0
 public function get_icons(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     $location = BB_PATH_UPLOADS . '/icons/*';
     $list = array();
     $files = glob($location);
     foreach ($files as $f) {
         $name = pathinfo($f, PATHINFO_BASENAME);
         $list[] = $this->di['config']['url'] . '/bb-uploads/icons/' . $name;
     }
     return $app->render('mod_filemanager_icons', array('icons' => $list));
 }
Exemplo n.º 25
0
 public function get_email(\Box_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.º 26
0
 public function get_form(\Box_App $app, $id)
 {
     return $app->render('mod_formbuilder_build', array('id' => $id));
 }
Exemplo n.º 27
0
 public function get_activity(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_system_activity');
 }
Exemplo n.º 28
0
 public function get_history(\Box_App $app)
 {
     $this->di['is_admin_logged'];
     return $app->render('mod_staff_login_history');
 }
Exemplo n.º 29
0
 public function get_post(\Box_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 register(\Box_App &$app)
 {
     $app->get('/servicedownloadable/get-file/:id', 'get_download', array('id' => '[0-9]+'), get_class($this));
 }