예제 #1
0
 public function manage()
 {
     if (!Base_EpesiStoreCommon::admin_access()) {
         return;
     }
     $button_label = Base_EssClientCommon::has_license_key() ? __('License Key') : __('Register EPESI!');
     Base_ActionBarCommon::add(Base_ThemeCommon::get_template_file('Base_EpesiStore', 'icon.png'), $button_label, $this->create_callback_href(array($this, 'display_registration_form')));
     Base_ActionBarCommon::add('view', __('Invoices'), $this->create_callback_href(array($this, 'display_invoices')));
     $setup = $this->init_module('Base_Setup');
     $setup->set_inline_display();
     if (Base_SetupCommon::is_simple_setup()) {
         if (!$this->isset_module_variable('filter_set')) {
             eval_js('base_setup__last_filter="' . (!Base_EssClientCommon::has_license_key() ? '' : (Base_EpesiStoreCommon::is_update_available() ? 'updates' : 'store')) . '";');
             $this->set_module_variable('filter_set', true);
         }
         $this->display_module($setup, array(true), 'admin');
         return;
     }
     Base_ActionBarCommon::add('settings', __('Simple view'), $this->create_callback_href(array($this, 'switch_simple'), true));
     $tb = $this->init_module('Utils_TabbedBrowser');
     $tb->set_tab('Modules Setup', array($this, 'setup_admin'), array($setup));
     $tb->set_tab('Epesi Store', array($this, 'form_main_store'), array());
     $tb->tag();
     $this->display_module($tb);
 }
예제 #2
0
 * @subpackage tooltip
 */
if (!isset($_POST['cid'])) {
    die('Invalid request' . print_r($_POST, true));
}
define('JS_OUTPUT', 1);
define('CID', $_POST['cid']);
define('READ_ONLY_SESSION', 1);
require_once '../../../include.php';
ModuleManager::load_modules();
$registered = Base_EssClientCommon::is_registered();
$ver = __('version %s', array(EPESI_VERSION));
if (!$registered) {
    print $ver;
    return;
}
$updates = Base_EpesiStoreCommon::is_update_available();
if (!$updates) {
    print $ver;
    return;
}
if (Base_AclCommon::i_am_sa()) {
    $tooltip = __('There are updates available for download, click to go to EPESI store.');
} else {
    $tooltip = __('There are updates available for download. Please contact your administrator.');
}
$message = Utils_TooltipCommon::create(__('version %s', array(EPESI_VERSION)) . '<br/><b>(' . __('Updates Available!') . ')</b>', $tooltip, false);
if (Base_AclCommon::i_am_sa()) {
    $message = '<a ' . Module::create_href(array('go_to_epesi_store_for_updates' => true)) . 'class="version">' . $message . '</a>';
}
print $message;