Exemple #1
0
function change_userdata($name, $mail, $carnet)
{
    $name_ = $name == $_SESSION["cym_name"] ? false : $name;
    $mail_ = $mail == $_SESSION["cym_mail"] ? false : $mail;
    $carnet_ = $carnet == $_SESSION["cym_carnet"] ? false : $carnet;
    if ($name_ || $mail_ || $carnet_) {
        include_once 'backend/backend.php';
        $backend = new backend();
        $result = $backend->change_userdata($_SESSION["cym_userid"], $name_, $mail_, $carnet_);
        switch ($result) {
            case "1":
                $_SESSION["cym_name"] = !$name_ == false ? $name_ : $_SESSION["cym_name"];
                $_SESSION["cym_mail"] = !$mail_ == false ? $mail_ : $_SESSION["cym_mail"];
                $_SESSION["cym_carnet"] = !$carnet_ == false ? $carnet_ : $_SESSION["cym_carnet"];
                return array('r' => 1, 'd' => "Los cambios se realizaron correctamente.");
                break;
            case "2":
                return array('r' => 3, 'd' => "El correo electrónico no esta disponible.");
                break;
            default:
                return array('r' => 0, 'd' => "Error desconocido. Por favor intente de nuevo.");
        }
    } else {
        return array('r' => 2, 'd' => "No se realizaron modificaciónes.");
    }
}
Exemple #2
0
function get_groupuser($group, $rol = 1)
{
    $userid = $_SESSION["cym_userid"];
    include_once 'backend/backend.php';
    $backend = new backend();
    return $backend->get_groupuser($group, $rol);
}
Exemple #3
0
function get_mainmenu()
{
    if (is_login()) {
        include_once "backend/backend.php";
        $backend = new backend();
        return $backend->get_mainmenu($_SESSION["cym_rol"]);
    }
    return array();
}
Exemple #4
0
function create_log($object_id)
{
    $key = isset($_SESSION["cym_key"]) ? $_SESSION["cym_key"] : create_sessionkey();
    $user = false;
    $rate = 0;
    include_once "backend/backend.php";
    $backend = new backend();
    //test_data();
    return $backend->create_log($object_id, $key, $user, $rate);
}
function try_login($user, $pass)
{
    include_once 'backend/backend.php';
    $backend = new backend();
    $the_user = $backend->trylogin($user, $pass);
    if ($the_user[0]) {
        session_start();
        $_SESSION[get_variable("prfx") . "_name"] = $user;
        $_SESSION[get_variable("prfx") . "_userid"] = $the_user[1][0];
        $_SESSION[get_variable("prfx") . "_fname"] = $the_user[1][1];
        return true;
    }
    return false;
}
Exemple #6
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);
     }
 }
Exemple #7
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend') && class_exists('shop')) {
         $backend = backend::getInstance();
         $method_menu = $backend->getMenu('shop_payment_methods');
         $recurring_menu = $backend->getMenu('shop_recurring_plans');
         // add menu entry for payment methods
         if (!is_null($method_menu)) {
             $method_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_paypal'), url_GetFromFilePath($this->path . 'images/icon.svg'), window_Open('paypal', 400, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         }
         if (!is_null($recurring_menu)) {
             $recurring_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_paypal'), url_GetFromFilePath($this->path . 'images/icon.svg'), window_Open('paypal_recurring_plans', 400, $this->getLanguageConstant('title_recurring_plans'), true, true, backend_UrlMake($this->name, 'recurring_plans')), $level = 5));
         }
     }
     // register payment method
     if (class_exists('shop')) {
         require_once 'units/express_payment_method.php';
         require_once 'units/direct_payment_method.php';
         // set helped in debug mode if specified
         PayPal_Helper::setSandbox(shop::getInstance()->isDebug());
         PayPal_Helper::setCredentials($this->settings['api_username'], $this->settings['api_password'], $this->settings['api_signature']);
         // create payment methods
         if ($this->settings['express_enabled'] == 1) {
             $this->express_method = PayPal_Express::getInstance($this);
         }
         if ($this->settings['direct_enabled'] == 1) {
             $this->direct_method = PayPal_Direct::getInstance($this);
         }
     }
 }
Exemple #8
0
 /**
  * Public function that creates a single instance
  */
 public static function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Exemple #9
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section, $action;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         $import_menu = $backend->getMenu('shop_import');
         if (!is_null($import_menu)) {
             $import_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_import_items'), url_GetFromFilePath($this->path . 'images/import.svg'), window_Open('shop_import_items', 350, $this->getLanguageConstant('title_import_items'), true, true, backend_UrlMake($this->name, 'import')), 6));
             $import_menu->addChild(null, new backend_MenuItem($this->getLanguageConstant('menu_import_english'), url_GetFromFilePath($this->path . 'images/import.svg'), window_Open('shop_import_items', 350, $this->getLanguageConstant('title_import_items'), true, true, backend_UrlMake($this->name, 'import_english')), 6));
         }
     }
     // register delivery method and create menu items
     if (ModuleHandler::is_loaded('backend') && ModuleHandler::is_loaded('shop')) {
         require_once 'units/method.php';
         require_once 'units/pickup_method.php';
         Paid_DeliveryMethod::getInstance($this);
         Pickup_DeliveryMethod::getInstance($this);
     }
     if (ModuleHandler::is_loaded('head_tag') && $section == 'shop' && $action == 'checkout') {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/pikaday.js'), 'type' => 'text/javascript'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/pikaday.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/checkout.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
     }
     if (ModuleHandler::is_loaded('backend') && ModuleHandler::is_loaded('head_tag') && $section == 'backend') {
         $head_tag = head_tag::getInstance();
         $head_tag->addTag('script', array('src' => url_GetFromFilePath($this->path . 'include/backend.js'), 'type' => 'text/javascript'));
     }
     // connect transaction handling event
     Events::connect('shop', 'transaction-completed', 'on_transaction_completed', $this);
 }
Exemple #10
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);
     }
 }
 public function login()
 {
     if (isset($_POST['mail']) && isset($_POST['pw'])) {
         $emailAdresse = $_POST['mail'];
         $pw = $_POST['pw'];
         $LogModel = $this->model('LoginModel');
         $check = $LogModel->login($emailAdresse, $pw);
         if ($check && isset($_SESSION['logged'])) {
             if ($_SESSION['logged']['admin'] == true) {
                 $b = new backend();
                 $b->index();
             } else {
                 $this->view('main');
             }
         } else {
             echo 'Bitte geben Sie Mail und Passwort ein!';
             $this->view('Login/LoginView');
         }
     }
 }
Exemple #12
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);
     }
 }
Exemple #13
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);
     }
 }
Exemple #14
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);
     }
 }
Exemple #15
0
 /**
  * Adds item to child list
  *
  * @param string $name
  * @param resource $item
  */
 function addChild($name, $item)
 {
     if (is_null($name) || empty($name)) {
         $this->children[] = $item;
     } else {
         $this->children[$name] = $item;
     }
     // register named item in backend
     if (!is_null($name)) {
         $backend = backend::getInstance();
         $backend->registerNamedItem($name, $item);
     }
 }
Exemple #16
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);
     }
 }
Exemple #17
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);
     }
 }
Exemple #18
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')) {
         $backend = backend::getInstance();
     }
 }
Exemple #19
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();
     }
 }
Exemple #20
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register mailer
     if (class_exists('contact_form')) {
         $mailer = new Mandrill_Mailer($this->language, $this->settings['api_key']);
         $contact_form = contact_form::getInstance();
         $contact_form->registerMailer('mandrill', $mailer);
     }
     // register backend
     if (class_exists('backend') && $section == 'backend') {
         $backend = backend::getInstance();
         $mandrill_menu = new backend_MenuItem($this->getLanguageConstant('menu_mandrill'), url_GetFromFilePath($this->path . 'images/icon.svg'), window_Open('mandrill_settings', 370, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5);
         $backend->addMenu($this->name, $mandrill_menu);
     }
 }
Exemple #21
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);
     }
 }
Exemple #22
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' => ''));
     }
 }
Exemple #23
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);
     }
 }
Exemple #24
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend') && class_exists('shop')) {
         $backend = backend::getInstance();
         $method_menu = $backend->getMenu('shop_delivery_methods');
         if (!is_null($method_menu)) {
             $method_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_fedex'), url_GetFromFilePath($this->path . 'images/icon.png'), window_Open('fedex', 350, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         }
     }
     // register delivery method
     if (class_exists('shop')) {
         require_once 'units/fedex_delivery_method.php';
         FedEx_DeliveryMethod::getInstance($this);
     }
 }
Exemple #25
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend') && class_exists('shop')) {
         $backend = backend::getInstance();
         $method_menu = $backend->getMenu('shop_payment_methods');
         if (!is_null($method_menu)) {
             $method_menu->addChild('', new backend_MenuItem($this->getLanguageConstant('menu_google_checkout'), url_GetFromFilePath($this->path . 'images/icon.png'), window_Open('paypal', 650, $this->getLanguageConstant('title_settings'), true, true, backend_UrlMake($this->name, 'settings')), $level = 5));
         }
     }
     // register payment method
     if (class_exists('shop')) {
         require_once "units/google_checkout_payment_method.php";
         GoogleCheckout_PaymentMethod::getInstance($this);
     }
 }
Exemple #26
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         $menu = $backend->getMenu($backend->name);
         if (!is_null($menu)) {
             $menu->insertChild(new backend_MenuItem($this->getLanguageConstant('menu_page_speed'), url_GetFromFilePath($this->path . 'images/icon.svg'), window_Open('page_speed', 670, $this->getLanguageConstant('title_page_speed'), true, false, backend_UrlMake($this->name, 'show')), $level = 5), 1);
         }
         // add style for backend
         if (class_exists('head_tag') && $section == 'backend') {
             $head_tag = head_tag::getInstance();
             $head_tag->addTag('link', array('href' => url_GetFromFilePath($this->path . 'include/page_speed.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
         }
     }
 }
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section;
     parent::__construct(__FILE__);
     // register backend
     if (class_exists('backend')) {
         $backend = backend::getInstance();
         Events::connect('backend', 'user-create', 'handleUserCreate', $this);
         Events::connect('backend', 'user-delete', 'handleUserDelete', $this);
     }
     // connect to shop events
     if (class_exists('shop')) {
         $shop = shop::getInstance();
         Events::connect('shop', 'transaction-completed', 'handleTransactionCompleted', $this);
         Events::connect('shop', 'recurring-payment', 'handleRecurringPayment', $this);
         Events::connect('shop', 'recurring-payment-suspended', 'handleRecurringPaymentSuspended', $this);
     }
 }
Exemple #28
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);
     }
 }
Exemple #29
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'));
     }
 }
Exemple #30
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     global $section, $db_use;
     parent::__construct(__FILE__);
     // let the browser/crawler know we have different desktop/mobile styles
     if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
         header('Vary: User-Agent');
     }
     // change powered by header
     header('X-Powered-By: Caracal/' . _VERSION);
     // send encoding
     header('Content-Type: text/html; charset=UTF-8');
     // register backend
     if ($section == 'backend' && class_exists('backend')) {
         $backend = backend::getInstance();
         $menu = $backend->getMenu($backend->name);
         if (!is_null($menu)) {
             $menu->insertChild(new backend_MenuItem($this->getLanguageConstant('menu_page_info'), url_GetFromFilePath($this->path . 'images/icon.svg'), window_Open('page_settings', 400, $this->getLanguageConstant('title_page_info'), true, false, backend_UrlMake($this->name, 'show')), $level = 5), 1);
         }
     }
 }