Example #1
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // load module style and scripts
     if (class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/slideshow.js'), 'type' => 'text/javascript'));
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/lightbox.js'), 'type' => 'text/javascript'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/lightbox.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         // load backend files if needed
         if ($section == 'backend') {
             $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/gallery.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/gallery_toolbar.js'), 'type' => 'text/javascript'));
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
             if (MainLanguageHandler::getInstance()->isRTL()) {
                 $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/gallery_rtl.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
             }
         }
     }
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $gallery_menu = new backend_MenuItem($this->getLanguageConstant('menu_gallery'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $gallery_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_images'), url_GetFromFilePath($this->path . 'images/images.svg'), window_Open('gallery_images', 670, $this->getLanguageConstant('title_images'), true, true, backend_UrlMake($this->name, 'images')), 5));
         $gallery_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_groups'), url_GetFromFilePath($this->path . 'images/groups.svg'), window_Open('gallery_groups', 450, $this->getLanguageConstant('title_groups'), true, true, backend_UrlMake($this->name, 'groups')), 5));
         $gallery_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_containers'), url_GetFromFilePath($this->path . 'images/containers.svg'), window_Open('gallery_containers', 490, $this->getLanguageConstant('title_containers'), true, true, backend_UrlMake($this->name, 'containers')), 5));
         $backend->addMenu($this->name, $gallery_menu);
     }
 }
Example #2
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // load module style and scripts
     if (class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         //$head_tag->addTag('link', array('href'=>url_GetFromFilePath($this->path.'include/_blank.css'), 'rel'=>'stylesheet', 'type'=>'text/css'));
         //$head_tag->addTag('script', array('src'=>url_GetFromFilePath($this->path.'include/_blank.js'), 'type'=>'text/javascript'));
     }
     // register backend
     if (class_exists('backend')) {
         // add backend specific script
         if (class_exists('head_tag')) {
             $head_tag = head_tag::getInstance();
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/downloads_toolbar.js'), 'type' => 'text/javascript'));
         }
         // create main menu entries
         $backend = backend::getInstance();
         $downloads_menu = new backend_MenuItem($this->getLanguageConstant('menu_downloads'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $downloads_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_upload_file'), url_GetFromFilePath($this->path . 'images/upload.svg'), window_Open('upload_file', 400, $this->getLanguageConstant('title_upload_file'), true, true, backend_UrlMake($this->name, 'upload')), 5));
         $downloads_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_manage'), url_GetFromFilePath($this->path . 'images/manage.svg'), window_Open('downloads', 520, $this->getLanguageConstant('title_manage'), true, true, backend_UrlMake($this->name, 'list')), 5));
         $backend->addMenu($this->name, $downloads_menu);
     }
 }
Example #3
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $activities_menu = new backend_MenuItem($this->getLanguageConstant('menu_activities'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $activities_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_manage'), url_GetFromFilePath($this->path . 'images/activities.svg'), window_Open('activities', 730, $this->getLanguageConstant('title_manage'), true, true, backend_UrlMake($this->name, 'show')), $level = 5));
         $activities_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_log'), url_GetFromFilePath($this->path . 'images/log.svg'), window_Open('activities_log', 730, $this->getLanguageConstant('title_log'), true, true, backend_UrlMake($this->name, 'show_log')), $level = 5));
         $backend->addMenu($this->name, $activities_menu);
     }
 }
Example #4
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         $faq_menu = new backend_MenuItem($this->getLanguageConstant('menu_faq'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 4);
         $faq_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_manage_questions'), url_GetFromFilePath($this->path . 'images/questions.svg'), window_Open('faq', 700, $this->getLanguageConstant('title_questions'), true, true, backend_UrlMake($this->name, 'manage')), $level = 4));
         $backend->addMenu($this->name, $faq_menu);
     }
 }
Example #5
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $codes_menu = new backend_MenuItem($this->getLanguageConstant('menu_codes'), url_GetFromFilePath($this->path . 'images/icon.png'), 'javascript:void(0);', $level = 5);
         $codes_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_codes_manage'), url_GetFromFilePath($this->path . 'images/manage.png'), window_Open('codes_manage', 450, $this->getLanguageConstant('title_codes_manage'), true, true, backend_UrlMake($this->name, 'codes_manage')), $level = 5));
         $backend->addMenu($this->name, $codes_menu);
     }
 }
Example #6
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $mailchimp_menu = new backend_MenuItem($this->getLanguageConstant('menu_mailchimp'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $mailchimp_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_lists'), url_GetFromFilePath($this->path . 'images/lists.svg'), window_Open('mailchimp_lists', 450, $this->getLanguageConstant('title_lists'), true, true, backend_UrlMake($this->name, 'lists')), $level = 5));
         $mailchimp_menu->addSeparator(5);
         $mailchimp_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_settings'), url_GetFromFilePath($this->path . 'images/settings.svg'), window_Open('mailchimp_settings', 450, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         $backend->addMenu($this->name, $mailchimp_menu);
     }
 }
Example #7
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $links_menu = new backend_MenuItem($this->getLanguageConstant('menu_links'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $links_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_links_manage'), url_GetFromFilePath($this->path . 'images/manage.svg'), window_Open('links_list', 720, $this->getLanguageConstant('title_links_manage'), true, true, backend_UrlMake($this->name, 'links_list')), $level = 5));
         $links_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_links_groups'), url_getFromFilePath($this->path . 'images/groups.svg'), window_Open('groups_list', 500, $this->getLanguageConstant('title_groups_manage'), true, true, backend_UrlMake($this->name, 'groups_list')), $level = 5));
         $links_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_links_overview'), url_GetFromFilePath($this->path . 'images/overview.svg'), window_Open('links_overview', 650, $this->getLanguageConstant('title_links_overview'), true, true, backend_UrlMake($this->name, 'overview')), $level = 6));
         $backend->addMenu($this->name, $links_menu);
     }
 }
Example #8
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         $callbox_menu = new backend_MenuItem($this->getLanguageConstant('menu_callbox'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $callbox_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_settings'), url_GetFromFilePath($this->path . 'images/settings.svg'), window_Open('callbox_settings', 400, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         $backend->addMenu($this->name, $callbox_menu);
     }
     if (class_exists('head_tag') && $section != 'backend' && $this->settings['include_code']) {
         $head_tag = head_tag::getInstance();
         $url = str_replace('{id}', $this->settings['account_id'], '//{id}.tctm.co/t.js');
         $head_tag->addTag('script', array('src' => $url, 'type' => 'text/javascript', 'async' => ''));
     }
 }
Example #9
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $referrals_menu = new backend_MenuItem($this->getLanguageConstant('menu_affiliates'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $referrals_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_manage_affiliates'), url_GetFromFilePath($this->path . 'images/affiliates.svg'), window_Open('affiliates', 700, $this->getLanguageConstant('title_affiliates'), true, true, backend_UrlMake($this->name, 'affiliates')), $level = 10));
         $referrals_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_referral_urls'), url_GetFromFilePath($this->path . 'images/referrals.svg'), window_Open('referrals', 750, $this->getLanguageConstant('title_referrals'), true, true, backend_UrlMake($this->name, 'referrals')), $level = 4));
         $referrals_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_information'), url_GetFromFilePath($this->path . 'images/information.svg'), window_Open('affiliate_information', 400, $this->getLanguageConstant('title_affiliate_information'), true, true, backend_UrlMake($this->name, 'information')), $level = 4));
         $backend->addMenu($this->name, $referrals_menu);
     }
     if (isset($_REQUEST['affiliate']) && $section != 'backend' && $section != 'backend_module') {
         $this->createReferral();
     }
 }
Example #10
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         if (class_exists('head_tag')) {
             $head_tag = head_tag::getInstance();
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
         }
         $leads_menu = new backend_MenuItem($this->getLanguageConstant('menu_leads'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $leads_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_results'), url_GetFromFilePath($this->path . 'images/results.svg'), window_Open('leads_results', 730, $this->getLanguageConstant('title_results'), true, true, backend_UrlMake($this->name, 'results')), $level = 5));
         $leads_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_types'), url_GetFromFilePath($this->path . 'images/types.svg'), window_Open('leads_types', 350, $this->getLanguageConstant('title_types'), true, true, backend_UrlMake($this->name, 'types')), $level = 5));
         $backend->addMenu($this->name, $leads_menu);
     }
 }
Example #11
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     parent::__construct(__FILE__);
     // load module style and scripts
     if (class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         //$head_tag->addTag('link', array('href'=>url_GetFromFilePath($this->path.'include/_blank.css'), 'rel'=>'stylesheet', 'type'=>'text/css'));
         //$head_tag->addTag('script', array('src'=>url_GetFromFilePath($this->path.'include/_blank.js'), 'type'=>'text/javascript'));
     }
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         $tips_menu = new backend_MenuItem($this->getLanguageConstant('menu_tips'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $tips_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_tips_manage'), url_GetFromFilePath($this->path . 'images/manage.svg'), window_Open('tips', 500, $this->getLanguageConstant('title_tips_manage'), true, true, backend_UrlMake($this->name, 'tips')), $level = 5));
         $backend->addMenu($this->name, $tips_menu);
     }
 }
Example #12
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // load module style and scripts
     if (class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         /* $head_tag->addTag('link', array('href'=>url_GetFromFilePath($this->path.'include/default_style.css'), 'rel'=>'stylesheet', 'type'=>'text/css')); */
         /* $head_tag->addTag('script', array('src'=>url_GetFromFilePath($this->path.'include/youtube_controls.js'), 'type'=>'text/javascript')); */
     }
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $youtube_menu = new backend_MenuItem($this->getLanguageConstant('menu_youtube'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $youtube_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_video_list'), url_GetFromFilePath($this->path . 'images/list.svg'), window_Open($this->name . '_video_list', 650, $this->getLanguageConstant('title_video_list'), true, true, backend_UrlMake($this->name, 'video_list')), $level = 5));
         $youtube_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_video_groups'), url_GetFromFilePath($this->path . 'images/groups.svg'), window_Open($this->name . '_group_list', 570, $this->getLanguageConstant('title_video_groups'), true, true, backend_UrlMake($this->name, 'group_list')), $level = 5));
         $backend->addMenu($this->name, $youtube_menu);
     }
 }
Example #13
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // create mailer support
     $system_mailer = new ContactForm_SystemMailer($this->language);
     $smtp_mailer = new ContactForm_SmtpMailer($this->language);
     $this->registerMailer('system', $system_mailer);
     $this->registerMailer('smtp', $smtp_mailer);
     // configure SMTP mailer
     $smtp_mailer->set_server($this->settings['smtp_server'], $this->settings['smtp_port'], $this->settings['use_ssl']);
     if ($this->settings['smtp_authenticate']) {
         $smtp_mailer->set_credentials($this->settings['smtp_username'], $this->settings['smtp_password']);
     }
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $contact_menu = new backend_MenuItem($this->getLanguageConstant('menu_contact'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $contact_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_manage_forms'), url_GetFromFilePath($this->path . 'images/forms.svg'), window_Open('contact_forms', 600, $this->getLanguageConstant('title_forms_manage'), true, true, backend_UrlMake($this->name, 'forms_manage')), $level = 5));
         $contact_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_manage_templates'), url_GetFromFilePath($this->path . 'images/templates.svg'), window_Open('contact_form_templates', 550, $this->getLanguageConstant('title_templates_manage'), true, true, backend_UrlMake($this->name, 'templates_manage')), $level = 5));
         $contact_menu->addSeparator(5);
         $contact_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_settings'), url_GetFromFilePath($this->path . 'images/settings.svg'), window_Open('contact_form_settings', 400, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings_show')), $level = 5));
         $contact_menu->addSeparator(5);
         $contact_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_submissions'), url_GetFromFilePath($this->path . 'images/submissions.svg'), window_Open('contact_form_submissions', 650, $this->getLanguageConstant('title_submissions'), true, true, backend_UrlMake($this->name, 'submissions')), $level = 5));
         $backend->addMenu($this->name, $contact_menu);
         // add backend support script
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/backend.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
     }
     if (class_exists('collection') && $section != 'backend') {
         $collection = collection::getInstance();
         $collection->includeScript(collection::DIALOG);
         $collection->includeScript(collection::COMMUNICATOR);
     }
     if (class_exists('head_tag') && $section != 'backend') {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/contact_form.js'), 'type' => 'text/javascript'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/contact_form.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
     }
 }
Example #14
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     if (class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/news_system.js'), 'type' => 'text/javascript'));
     }
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $news_menu = new backend_MenuItem($this->getLanguageConstant('menu_news'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', 5);
         $news_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_add_news'), url_GetFromFilePath($this->path . 'images/add_news.svg'), window_Open('news_add', 490, $this->getLanguageConstant('title_news_add'), true, true, backend_UrlMake($this->name, 'news_add')), 5));
         $news_menu->addSeparator(5);
         $news_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_manage_news'), url_GetFromFilePath($this->path . 'images/manage_news.svg'), window_Open('news', 520, $this->getLanguageConstant('title_manage_news'), true, true, backend_UrlMake($this->name, 'news')), 5));
         $news_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_manage_groups'), url_GetFromFilePath($this->path . 'images/manage_groups.svg'), window_Open('news_groups', 580, $this->getLanguageConstant('title_manage_groups'), true, true, backend_UrlMake($this->name, 'groups')), 5));
         $news_menu->addSeparator(5);
         $news_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_news_feeds'), url_GetFromFilePath($this->path . 'images/rss.svg'), window_Open('news_feeds', 700, $this->getLanguageConstant('title_manage_feeds'), true, true, backend_UrlMake($this->name, 'feeds')), 5));
         $backend->addMenu($this->name, $news_menu);
     } else {
         // if we are not in backend section, create feed links
         $this->createFeedLinks();
     }
 }
Example #15
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // load module style and scripts
     if ($section == 'backend' && class_exists('head_tag')) {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/chat.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         //$head_tag->addTag('script', array('src'=>url_GetFromFilePath($this->path.'include/_blank.js'), 'type'=>'text/javascript'));
     }
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $chat_menu = new backend_MenuItem($this->getLanguageConstant('menu_chat'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', $level = 5);
         $chat_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_join_chat'), url_GetFromFilePath($this->path . 'images/chat.svg'), window_Open('chat', 670, $this->getLanguageConstant('title_chat'), true, true, backend_UrlMake($this->name, 'chat')), $level = 5));
         $chat_menu->addSeparator(5);
         $chat_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_users'), url_GetFromFilePath($this->path . 'images/users.svg'), window_Open('chat_users', 550, $this->getLanguageConstant('title_chat_users'), true, true, backend_UrlMake($this->name, 'users')), $level = 5));
         $chat_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_rooms'), url_GetFromFilePath($this->path . 'images/rooms.svg'), window_Open('chat_rooms', 450, $this->getLanguageConstant('title_chat_rooms'), true, true, backend_UrlMake($this->name, 'rooms')), $level = 5));
         $chat_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_admins'), url_GetFromFilePath($this->path . 'images/admins.svg'), window_Open('chat_admins', 450, $this->getLanguageConstant('title_chat_admins'), true, true, backend_UrlMake($this->name, 'admins')), $level = 5));
         $backend->addMenu($this->name, $chat_menu);
     }
 }
Example #16
0
 /**
  * Constructor
  *
  * @return backend
  */
 protected function __construct()
 {
     global $section, $language;
     parent::__construct(__FILE__);
     // create events
     Events::register('backend', 'user-create');
     Events::register('backend', 'user-change');
     Events::register('backend', 'user-delete');
     Events::register('backend', 'user-password-change');
     // load CSS and JScript
     if (class_exists('head_tag') && $section == 'backend') {
         $head_tag = head_tag::getInstance();
         $collection = collection::getInstance();
         $collection->includeScript(collection::JQUERY);
         $collection->includeScript(collection::JQUERY_EVENT_DRAG);
         $collection->includeScript(collection::WINDOW_SYSTEM);
         if ($_SESSION['logged']) {
             $collection->includeScript(collection::JQUERY_EXTENSIONS);
             $collection->includeScript(collection::NOTEBOOK);
             $collection->includeScript(collection::SHOWDOWN);
             $collection->includeScript(collection::TOOLBAR);
         }
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/backend.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
     }
     // add admin level menus
     if ($section == 'backend') {
         $system_menu = new backend_MenuItem($this->getLanguageConstant('menu_system'), url_GetFromFilePath($this->path . 'images/icons/16/system.svg'), 'javascript:void(0);', $level = 1);
         $system_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_modules'), url_GetFromFilePath($this->path . 'images/icons/16/modules.svg'), window_Open('system_modules', 610, $this->getLanguageConstant('title_modules'), true, false, backend_UrlMake($this->name, 'modules')), $level = 10));
         $system_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_users'), url_GetFromFilePath($this->path . 'images/icons/16/users.svg'), window_Open('system_users', 690, $this->getLanguageConstant('title_users_manager'), true, false, backend_UrlMake($this->name, 'users')), $level = 10));
         $system_menu->addSeparator(10);
         $system_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_change_password'), url_GetFromFilePath($this->path . 'images/icons/16/change_password.svg'), window_Open('change_password_window', 350, $this->getLanguageConstant('title_change_password'), true, false, backend_UrlMake($this->name, 'change_password')), $level = 1));
         $system_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_logout'), url_GetFromFilePath($this->path . 'images/icons/16/logout.svg'), window_Open('logout_window', 350, $this->getLanguageConstant('title_logout'), true, false, backend_UrlMake($this->name, 'logout')), $level = 1));
         $this->addMenu($this->name, $system_menu);
     }
 }
Example #17
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // create methods storage
     $this->payment_methods = array();
     $this->delivery_methods = array();
     // create events
     Events::register('shop', 'shopping-cart-changed');
     Events::register('shop', 'before-checkout');
     Events::register('shop', 'transaction-completed');
     Events::register('shop', 'transaction-canceled');
     // register recurring events
     foreach (RecurringPayment::$signals as $status => $signal_name) {
         Events::register('shop', $signal_name);
     }
     // load module style and scripts
     if (class_exists('head_tag') && $section != 'backend') {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/checkout.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/shopping_cart.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/shopping_cart.js'), 'type' => 'text/javascript'));
     }
     // register backend
     if (class_exists('backend') && $section == 'backend') {
         $head_tag = head_tag::getInstance();
         $backend = backend::getInstance();
         if (class_exists('head_tag')) {
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/multiple_images.js'), 'type' => 'text/javascript'));
             $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
         }
         $shop_menu = new backend_MenuItem($this->getLanguageConstant('menu_shop'), url_GetFromFilePath($this->path . 'images/icon.svg'), 'javascript:void(0);', 5);
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_items'), url_GetFromFilePath($this->path . 'images/items.svg'), window_Open('shop_items', 580, $this->getLanguageConstant('title_manage_items'), true, true, backend_UrlMake($this->name, 'items')), 5));
         $recurring_plans_menu = new backend_MenuItem($this->getLanguageConstant('menu_recurring_plans'), url_GetFromFilePath($this->path . 'images/recurring_plans.svg'), 'javascript: void(0);', 5);
         $shop_menu->addChild('shop_recurring_plans', $recurring_plans_menu);
         $shop_menu->addSeparator(5);
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_categories'), url_GetFromFilePath($this->path . 'images/categories.svg'), window_Open('shop_categories', 490, $this->getLanguageConstant('title_manage_categories'), true, true, backend_UrlMake($this->name, 'categories')), 5));
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_item_sizes'), url_GetFromFilePath($this->path . 'images/item_sizes.svg'), window_Open('shop_item_sizes', 400, $this->getLanguageConstant('title_manage_item_sizes'), true, true, backend_UrlMake($this->name, 'sizes')), 5));
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_manufacturers'), url_GetFromFilePath($this->path . 'images/manufacturers.svg'), window_Open('shop_manufacturers', 400, $this->getLanguageConstant('title_manufacturers'), true, true, backend_UrlMake($this->name, 'manufacturers')), 5));
         // delivery methods menu
         $delivery_menu = new backend_MenuItem($this->getLanguageConstant('menu_delivery_methods'), url_GetFromFilePath($this->path . 'images/delivery.svg'), 'javascript: void(0);', 5);
         $shop_menu->addChild('shop_delivery_methods', $delivery_menu);
         $shop_menu->addSeparator(5);
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_special_offers'), url_GetFromFilePath($this->path . 'images/special_offers.svg'), window_Open('shop_special_offers', 490, $this->getLanguageConstant('title_special_offers'), true, true, backend_UrlMake($this->name, 'special_offers')), 5));
         $shop_menu->addSeparator(5);
         // payment methods menu
         $methods_menu = new backend_MenuItem($this->getLanguageConstant('menu_payment_methods'), url_GetFromFilePath($this->path . 'images/payment_methods.svg'), 'javascript: void(0);', 5);
         $shop_menu->addChild('shop_payment_methods', $methods_menu);
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_currencies'), url_GetFromFilePath($this->path . 'images/currencies.svg'), window_Open('shop_currencies', 350, $this->getLanguageConstant('title_currencies'), true, true, backend_UrlMake($this->name, 'currencies')), 5));
         $shop_menu->addSeparator(5);
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_transactions'), url_GetFromFilePath($this->path . 'images/transactions.svg'), window_Open('shop_transactions', 590, $this->getLanguageConstant('title_transactions'), true, true, backend_UrlMake($this->name, 'transactions')), 5));
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_warehouses'), url_GetFromFilePath($this->path . 'images/warehouse.svg'), window_Open('shop_warehouses', 490, $this->getLanguageConstant('title_warehouses'), true, true, backend_UrlMake($this->name, 'warehouses')), 5));
         $shop_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_stocks'), url_GetFromFilePath($this->path . 'images/stock.svg'), window_Open('shop_stocks', 490, $this->getLanguageConstant('title_stocks'), true, true, backend_UrlMake($this->name, 'stocks')), 5));
         $shop_menu->addSeparator(5);
         $shop_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_settings'), url_GetFromFilePath($this->path . 'images/settings.svg'), window_Open('shop_settings', 400, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         $backend->addMenu($this->name, $shop_menu);
     }
     // register search
     if (class_exists('search')) {
         $search = search::getInstance();
         $search->registerModule('shop', $this);
     }
 }