Exemple #1
0
 * @copyright John Diamond <*****@*****.**>
 * @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
 */
// Load config file
require_once dirname(__FILE__) . "/../config/config.inc.php";
// Load SolidWorks
require_once dirname(__FILE__) . "/../solidworks/solidworks.php";
// Load settings from database
require_once dirname(__FILE__) . "/../util/settings.php";
load_settings($conf);
require_once dirname(__FILE__) . "/../include/SolidStateMenu.class.php";
// Set the current theme
$theme = isset($_SESSION['client']['userdbo']) ? $_SESSION['client']['userdbo']->getTheme() : $conf['themes']['manager'];
$conf['themes']['current'] = $theme;
// Load the user's language preference
session_start();
$language = isset($_SESSION['client']['userdbo']) ? $_SESSION['client']['userdbo']->getLanguage() : null;
if ($language != null) {
    TranslationParser::load("language/" . $language);
    Translator::getTranslator()->setActiveLanguage($language);
}
// Change the charset to UTF-8
header("Content-type: text/html; charset=utf-8");
// Build the core menu
$menu = SolidStateMenu::getSolidStateMenu();
$username = isset($_SESSION['client']['userdbo']) ? $_SESSION['client']['userdbo']->getUsername() : null;
$menu->addItem(new SolidStateMenuItem("myinfo", "[MY_INFO]", "vcard_edit.png", "manager_content.php?page=config_edit_user&user="******"administration");
$menuItems = $menu->getItemArray();
$smarty->assign("menuItems", $menuItems);
// Display menu
$smarty->display(Page::selectTemplateFile("manager_menu.tpl"));
 /**
  * Initialize Module
  *
  * This method is called by the configuration script when the module is
  * loaded.
  *
  * @return boolean True for success
  */
 public function init()
 {
     // Check if this module is installed
     try {
         $this->moduleDBO = load_ModuleDBO($this->getName());
     } catch (DBNoRowsFoundException $e) {
         // Install this module
         $this->install();
     }
     if (class_exists("SolidStateMenu", false)) {
         // Add this module to the menu
         $menu = SolidStateMenu::getSolidStateMenu();
         $menu->addItem(new SolidStateMenuItem($this->getName(), $this->getName(), null, "manager_content.php?page=" . $this->getConfigPage()), "modules");
     }
     return true;
 }
 /**
  * Initialize SolidStateMenu Singleton
  *
  * @return SolidStateMenu The SolidStateMenu instance
  */
 public static function getSolidStateMenu()
 {
     global $conf;
     if (self::$instance == null) {
         $menu = new SolidStateMenu();
         $menu->addItem(new SolidStateMenuItem("home", $conf['company']['name'], "house.png", "manager_content.php?page=home"));
         $menu->addItem(new SolidStateMenuItem("accounts", "[ACCOUNTS]", "group.png", "manager_content.php?page=accounts"), "home");
         $menu->addItem(new SolidStateMenuItem("activeAccounts", "[ACTIVE_ACCOUNTS]", "user_green.png", "manager_content.php?page=accounts_browse"), "accounts");
         $menu->addItem(new SolidStateMenuItem("pendingAccounts", "[PENDING_ACCOUNTS]", "user_orange.png", "manager_content.php?page=accounts_browse_pending"), "accounts");
         $menu->addItem(new SolidStateMenuItem("inactiveAccounts", "[INACTIVE_ACCOUNTS]", "user_red.png", "manager_content.php?page=accounts_browse_inactive"), "accounts");
         $menu->addItem(new SolidStateMenuItem("pendingOrders", "[PENDING_ORDERS]", "status_away.png", "manager_content.php?page=pending_orders"), "accounts");
         $menu->addItem(new SolidStateMenuItem("fulfilledOrders", "[FULFILLED_ORDERS]", "status_online.png", "manager_content.php?page=fulfilled_orders"), "accounts");
         $menu->addItem(new SolidStateMenuItem("billing", "[BILLING_INVOICES]", "money.png", "manager_content.php?page=billing"), "home");
         $menu->addItem(new SolidStateMenuItem("outstandingInvoices", "[OUTSTANDING_INVOICES]", "page_error.png", "manager_content.php?page=billing_invoices_outstanding"), "billing");
         $menu->addItem(new SolidStateMenuItem("allInvoices", "[ALL_INVOICES]", "page.png", "manager_content.php?page=billing_invoices"), "billing");
         $menu->addItem(new SolidStateMenuItem("generateInvoices", "[GENERATE_INVOICES]", "page_edit.png", "manager_content.php?page=billing_generate"), "billing");
         $menu->addItem(new SolidStateMenuItem("enterPayment", "[ENTER_PAYMENT]", "money_add.png", "manager_content.php?page=billing_add_payment"), "billing");
         $menu->addItem(new SolidStateMenuItem("taxes", "[TAXES]", "coins.png", "manager_content.php?page=taxes"), "billing");
         $menu->addItem(new SolidStateMenuItem("services", "[PRODUCTS_SERVICES]", "cart.png", "manager_content.php?page=services"), "home");
         $menu->addItem(new SolidStateMenuItem("servicesHosting", "[WEB_HOSTING_SERVICES]", "page_world.png", "manager_content.php?page=services_web_hosting"), "services");
         $menu->addItem(new SolidStateMenuItem("servicesDomain", "[DOMAIN_SERVICES]", "world_link.png", "manager_content.php?page=services_domain_services"), "services");
         $menu->addItem(new SolidStateMenuItem("products", "[OTHER_PRODUCTS]", "lightbulb.png", "manager_content.php?page=services_products"), "services");
         $menu->addItem(new SolidStateMenuItem("addon", "[ADD_ONS]", "bricks.png", "manager_content.php?page=addon"), "services");
         $menu->addItem(new SolidStateMenuItem("servers", "[SERVERS]", "server_database.png", "manager_content.php?page=services_servers"), "services");
         $menu->addItem(new SolidStateMenuItem("ipaddresses", "[IP_ADDRESSES]", "server_lightning.png", "manager_content.php?page=services_ip_manager"), "services");
         $menu->addItem(new SolidStateMenuItem("domains", "[DOMAINS]", "world_link.png", "manager_content.php?page=domains"), "home");
         $menu->addItem(new SolidStateMenuItem("registeredDomains", "[REGISTERED_DOMAINS]", "world_link.png", "manager_content.php?page=domains_browse"), "domains");
         $menu->addItem(new SolidStateMenuItem("expiredDomains", "[EXPIRED_DOMAINS]", "cancel.png", "manager_content.php?page=domains_expired"), "domains");
         $menu->addItem(new SolidStateMenuItem("registerDomain", "[REGISTER_NEW_DOMAIN]", "world_add.png", "manager_content.php?page=domains_register"), "domains");
         $menu->addItem(new SolidStateMenuItem("transferDomain", "[TRANSFER_DOMAIN]", "world_go.png", "manager_content.php?page=transfer_domain"), "domains");
         $menu->addItem(new SolidStateMenuItem("administration", "[ADMINISTRATION]", "monitor.png"), "home");
         $menu->addItem(new SolidStateMenuItem("log", "[LOG]", "error.png", "manager_content.php?page=log&action=swtablesort&swtablename=log&swtableform=log&swtablesortcol=date&swtablesortdir=DESC"), "administration");
         $menu->addItem(new SolidStateMenuItem("settings", "[SETTINGS]", "table_edit.png", "manager_content.php?page=settings"), "administration");
         $menu->addItem(new SolidStateMenuItem("modules", "[MODULES]", "sitemap.png", "manager_content.php?page=modules"), "administration");
         $menu->addItem(new SolidStateMenuItem("users", "[USERS]", "vcard.png", "manager_content.php?page=config_users"), "administration");
         $menu->addItem(new SolidStateMenuItem("about", "[WEBSITE]", "bell.png", "http://www.neobill.net/"), "home");
         $menu->addItem(new SolidStateMenuItem("logout", "[LOGOUT]", "door_out.png", "manager_content.php?page=home&action=logout"), "home");
         self::$instance = $menu;
     }
     return self::$instance;
 }