Exemple #1
0
 public function m_invoiceMaker($transactionType, $bankId, $amount = null)
 {
     global $system, $settings, $lang;
     $system->xorg->smarty->assign("MID", $settings['MID']);
     $system->xorg->smarty->assign("RedirectURL", $settings['RedirectURL']);
     $system->xorg->smarty->assign("LogoURL", $settings['LogoURL']);
     $invoiceNumber = $system->dbm->db->findMax("`{$settings['financialInvoice']}`", "invoiceNumber") + 1;
     $timeStamp = time();
     if (empty($amount)) {
         require_once 'module/shop/model/shop.php';
         require_once 'module/eDelivery/model/eDelivery.php';
         $result = mysql_query("SELECT `objectId`, `uid`, `count` FROM `{$settings['basketObject']}` WHERE `uid` = {$_SESSION['uid']}");
         while ($row = mysql_fetch_array($result)) {
             $sellPrice = m_shop::m_sellPriceCalculator($row[objectId]);
             // Insert invoice in financial system
             $system->dbm->db->insert("`{$settings['financialInvoice']}`", "`active`, `owner`, `group`, `or`, `ow`, `ox`, `gr`, `gx`, `timeStamp`, `invoiceNumber`, `objectId`, `uid`, `count`, `price`", "1, 1, 1, 1, 1, 1, 1, 1, {$timeStamp}, {$invoiceNumber}, {$row['objectId']}, {$row['uid']}, {$row['count']}, {$sellPrice}");
             // Insert to eDelivery system
             m_eDelivery::m_addObject($row['objectId']);
         }
         require_once 'module/basket/model/basket.php';
         $amount = m_basket::m_calculate('return');
     }
     $system->xorg->smarty->assign("amount", $amount);
     $countTransaction = $system->dbm->db->max_auto_inc($settings[financialTransaction]);
     $system->xorg->smarty->assign("ResNum", ++$countTransaction);
     // Insert in financial transaction control
     $this->m_insertTrans("BATCH:FOR:{$countTransaction}", $transactionType, $bankId, $amount, $invoiceNumber);
     // Delete from basket
     $system->dbm->db->delete("`{$settings['basketObject']}`", "`uid` = {$_SESSION['uid']}");
     $system->xorg->smarty->display("{$settings['moduleAddress']}/{$settings['moduleName']}/{$settings['viewAddress']}/{$settings['tplAddress']}/direct2Bank" . $settings['ext4']);
 }
Exemple #2
0
 public function m_signUp($values)
 {
     global $system, $settings, $lang;
     $timeStamp = time();
     // if(strstr($values['userName'], '@')){
     // $filter = "`email` = '$values[userName]'";
     // $signUpFlag = 'email';
     // }else{
     // $filter = "`userName` = '$values[userName]'";
     // $signUpFlag = 'userName';
     // }
     if ($system->dbm->db->count_records("`{$this->userTable}`", "`email` = '{$values['email']}'") == 0) {
         // if($values['password'] == $values['retypePassword']){
         if (strlen($values['password']) >= $settings['minCharPassword']) {
             if ($_POST['securityQuestion'] === $system->dbm->db->informer("`faqObject`", "`id` = {$_POST['securityId']}", "answer")) {
                 $password = md5($values['password']);
                 $system->dbm->db->insert("`{$this->userTable}`", "`active`, `timeStamp`, `owner`, `group`, `or`, `ow`, `ox`, `gr`, `gx`, `tr`, `tx`, `gid`, `password`, `email`, `uType`", "1, '{$timeStamp}', 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, '{$password}', '{$values['email']}', 2");
                 $id = $system->dbm->db->insert_id();
                 @mkdir("home/{$id}/images", 0777, true);
                 @mkdir("home/{$id}/_thumbs", 0777, true);
                 @mkdir("home/{$id}/files", 0777, true);
                 @fopen("home/{$id}/images/index.html", w);
                 @fopen("home/{$id}/_thumbs/index.html", w);
                 @fopen("home/{$id}/files/index.html", w);
                 require_once 'module/basket/model/basket.php';
                 m_basket::m_move($_SESSION['uid'], $id);
                 $this->m_login($id, 2, 2);
                 $system->watchDog->exception('s', $lang['add'], sprintf($lang['successfulDone'], $lang['userAdd'], $values['email']) . $lang['pleaseWait'], null, "setTimeout('location.href=\\'/\\';', 5000);");
             } else {
                 $system->watchDog->exception("e", $lang['error'], $lang['securityAnswerIsIncorrect']);
             }
         } else {
             $system->watchDog->exception("e", $lang['error'], sprintf($lang['passwordIsTooShortMinIs'], $settings['minCharPassword']));
         }
         // }else{
         // $system->watchDog->exception("e", $lang['error'], $lang['passwordsNotMatch']);
         // }
     } else {
         $system->watchDog->exception("e", $lang['error'], $lang['userNameExist']);
     }
 }
Exemple #3
0
<?php

################################
# Keywords                     #
################################
require_once "module/keywords/model/keywords.php";
$keywords = new m_keywords();
$system->xorg->smarty->assign("jQCloud", $keywords->m_listObject('showList'));
################################
# Basket                       #
################################
require_once "module/basket/config/config.php";
require_once "module/basket/model/basket.php";
$basket = new m_basket();
$system->xorg->smarty->assign("basketContent", $basket->m_listObject());
################################
# Search                       #
################################
$system->xorg->smarty->assign("category", $system->xorg->combo(array('id', 'name'), 'productCategory'));
$system->xorg->smarty->assign("company", $system->xorg->combo(array('id', 'name'), 'company'));
$system->xorg->smarty->assign("search", $system->xorg->smarty->fetch("{$settings['moduleAddress']}/shop/{$settings['viewAddress']}/{$settings['tplAddress']}/vitrin/search" . $settings[ext4]));
################################
# CSS Loader                   #
################################
$system->xorg->smarty->assign("css", $system->xorg->smarty->fetch($settings[commonTpl] . 'cssLoader' . $settings[ext4]));
################################
# JS Loader                    #
################################
$system->xorg->smarty->assign("js", $system->xorg->smarty->fetch($settings[commonTpl] . 'jsLoader' . $settings[ext4]));
################################
# Google Analytic              #