define('INIT_SMARTY', true);
// Use Smarty
require_once BASE_PATH . '/assets/includes/session.php';
require_once BASE_PATH . '/assets/includes/initialize.php';
require_once BASE_PATH . '/assets/includes/commands.php';
require_once BASE_PATH . '/assets/includes/init.member.php';
require_once BASE_PATH . '/assets/includes/security.inc.php';
require_once BASE_PATH . '/assets/includes/language.inc.php';
require_once BASE_PATH . '/assets/includes/cart.inc.php';
require_once BASE_PATH . '/assets/includes/affiliate.inc.php';
define('META_TITLE', '');
// Override page title, description, keywords and page encoding here
define('META_DESCRIPTION', '');
define('META_KEYWORDS', '');
define('PAGE_ENCODING', '');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    $content = getDatabaseContent('purchaseAgreement');
    $content['name'] = $lang['purchaseAgreement'];
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    $smarty->assign('content', $content);
    $smarty->display('content.tpl');
    // About template
} catch (Exception $e) {
    echo $e->getMessage();
}
if ($db) {
    mysqli_close($db);
}
// Close any database connections
function CheckFilesDatabases($content, $ruleid)
{
    $filesToCheck = LoadDansArray();
    $config = ConfigToArray($content);
    events(__FUNCTION__ . ":: Checking " . count($filesToCheck) . " files databases with " . count($config) . " rows config");
    reset($filesToCheck);
    while (list($num, $key) = each($filesToCheck)) {
        if ($config[$key] != null) {
            $filepath = trim($config[$key]);
            $dirpath = dirname($filepath);
            @mkdir($dirpath, 0666, true);
            $basename = basename($filepath);
            events(__FUNCTION__ . ":: Checking rule N.{$ruleid} in file={$basename}");
            if (!is_file($filepath)) {
                @file_put_contents($filepath, '#');
            }
            $content = getDatabaseContent($ruleid, $basename);
            @file_put_contents($filepath, $content);
            continue;
        } else {
            events(__FUNCTION__ . ":: config[{$key}] SKIPPED !");
        }
    }
}
예제 #3
0
//define('PAGE_ENCODING','');
define('META_TITLE', $lang['aboutUs'] . ' – ' . $config['settings']['site_title']);
// Assign proper meta titles
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
/*
if($config['settings']['cache_pages'])
	$smarty->setCaching(Smarty::CACHING_LIFETIME_CURRENT); // Set this page to cache if it is turned on
*/
//print_k($activeLanguages[$selectedLanguage]);  // Testing
//print_k($activeCurrencies);
//print_k($displayCurrencies);
try {
    if (!$smarty->isCached('about.tpl', $pageCacheID)) {
        //echo $config['settings']['logo'].'test'; exit; // Testing
        $content = getDatabaseContent('aboutUs');
        $content['body'] = $smarty->fetch('eval:' . $content['body']);
        $smarty->assign('content', $content);
        //$smarty->display('about.tpl'); // About template
        $pageIsCached = false;
    } else {
        $pageIsCached = true;
    }
    $smarty->display('about.tpl', $pageCacheID);
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
if ($db) {
    mysqli_close($db);
}
예제 #4
0
             $jumpToOnCreate = 'login.php?jumpTo=members';
         }
         if ($config['settings']['notify_account']) {
             try {
                 $member['primaryAddress']['state'] = $adminStateName;
                 $member['primaryAddress']['country'] = $adminCountryName;
                 /*
                 $content = new databaseContent(51);
                 $content->setMemberInfo($memberInfo);
                 $content->setLanguage();
                 $content->includeManagerLang();
                 $adminEmailContent = $content->getContent();
                 $adminSubject = $adminEmailContent['name'];
                 $adminBody = $adminEmailContent['content'];
                 */
                 $content = getDatabaseContent('newMemberEmailAdmin');
                 $content['body'] = $smarty->fetch('eval:' . $content['body']);
                 kmail($config['settings']['support_email'], $config['settings']['business_name'], $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body']);
                 // Notify the admin that there is a new member
             } catch (Exception $e) {
                 echo $e->getMessage();
                 exit;
             }
         }
         //echo 'jt:'.$jumpToOnCreate; exit;
         header("location: {$jumpToOnCreate}");
         exit;
     }
 } else {
     $formNotice[] = 'emailExists';
 }
예제 #5
0
    $stepNumber = array('a' => 1, 'b' => 0, 'c' => 2, 'd' => 3);
}
try {
    $smarty->assign('stepNumber', $stepNumber);
    // Shipping address info
    $smarty->assign('shippingDetails', $shippingDetails);
    // Shipping address info
    $smarty->assign('gateways', $gateways);
    // Shipping address info
    $smarty->assign('shippingAddress', $_SESSION['shippingAddressSession']);
    // Shipping address info
    $smarty->assign('billingAddress', $_SESSION['billingAddressSession']);
    // Billing address info
    $smarty->assign('cartInfo', $_SESSION['cartInfoSession']);
    // Cart info session
    $smarty->assign('cartTotals', $_SESSION['cartTotalsSession']);
    // Cart totals session
    $content = getDatabaseContent('checkConfirmPage');
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    $smarty->assign('content', $content);
    $smarty->display('cart.mailin.tpl');
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
clearCartSession();
// Clear the cart session after loading everything
if ($db) {
    mysqli_close($db);
}
// Close any database connections
예제 #6
0
     }
 }
 if ($_POST['form']['email'] && $error == 0) {
     try {
         $badChars = array('>', '<', 'script', '[', ']');
         $_POST['form']['question'] = str_replace($badChars, '***', $_POST['form']['question']);
         foreach ($badChars as $badChar) {
             if (strpos($_POST['form']['email'], $badChar) !== false or strpos($_POST['form']['name'], $badChar) !== false) {
                 header("location: error.php?eType=invalidQuery");
                 exit;
             }
         }
         $smarty->assign('form', $_POST['form']);
         //$smarty->assign('formEmail',$_POST['form']['email']);
         //$smarty->assign('formQuestion',$_POST['form']['question']);
         $content = getDatabaseContent('contactFormEmailAdmin', $config['settings']['lang_file_mgr']);
         // Get content and force language for admin
         $content['name'] = $smarty->fetch('eval:' . $content['name']);
         $content['body'] = $smarty->fetch('eval:' . $content['body']);
         $options['replyEmail'] = $_POST['form']['email'];
         $options['replyName'] = $_POST['form']['name'];
         kmail($config['settings']['sales_email'], $config['settings']['business_name'], $config['settings']['sales_email'], $lang['contactFromName'], $content['name'], $content['body'], $options);
         // Send email to sales email
         $smarty->assign("contactNotice", 'contactMessage');
         unset($form);
     } catch (Exception $e) {
         echo $e->getMessage();
         exit;
     }
 } else {
     if ($error == 1) {
예제 #7
0
}
// Just to be safe make sure a memberID exists before continuing
try {
    if ($_POST) {
        if ($message) {
            mysqli_query($db, "\r\n\t\t\t\t\tINSERT INTO {$dbinfo[pre]}tickets \r\n\t\t\t\t\t(\r\n\t\t\t\t\t \tmember_id,\r\n\t\t\t\t\t\tsummary,\r\n\t\t\t\t\t\topened,\r\n\t\t\t\t\t\tlastupdated,\r\n\t\t\t\t\t\tstatus,\r\n\t\t\t\t\t\tupdatedby,\r\n\t\t\t\t\t\tviewed\r\n\t\t\t\t\t)\r\n\t\t\t\t\tVALUES\r\n\t\t\t\t\t(\r\n\t\t\t\t\t \t'{$memberID}',\r\n\t\t\t\t\t\t'{$summary}',\r\n\t\t\t\t\t\t'{$nowGMT}',\r\n\t\t\t\t\t\t'{$nowGMT}',\r\n\t\t\t\t\t\t'2',\r\n\t\t\t\t\t\t'0',\r\n\t\t\t\t\t\t'1'\r\n\t\t\t\t\t)\t\t\t\t\r\n\t\t\t\t\t");
            // Insert ticket
            $ticketID = mysqli_insert_id($db);
            mysqli_query($db, "\r\n\t\t\t\t\tINSERT INTO {$dbinfo[pre]}ticket_messages  \r\n\t\t\t\t\t(\r\n\t\t\t\t\t \tticket_id,\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\tsubmit_date,\r\n\t\t\t\t\t\tadmin_response,\r\n\t\t\t\t\t\tadmin_id\r\n\t\t\t\t\t)\r\n\t\t\t\t\tVALUES\r\n\t\t\t\t\t(\r\n\t\t\t\t\t \t'{$ticketID}',\r\n\t\t\t\t\t\t'{$message}',\r\n\t\t\t\t\t\t'{$nowGMT}',\r\n\t\t\t\t\t\t'0',\r\n\t\t\t\t\t\t'0'\r\n\t\t\t\t\t)\t\t\t\t\r\n\t\t\t\t\t");
            // Insert message
            // xxxx Notify admin of new support ticket response
            $notify = 1;
            if ($notify && $_SESSION['member']['email'] != "") {
                // Build email
                $toEmail = $config['settings']['support_email'];
                $content = getDatabaseContent('newAdminTicketResponse');
                // Get content from db
                $content['name'] = $smarty->fetch('eval:' . $content['name']);
                $content['body'] = $smarty->fetch('eval:' . $content['body']);
                $options['replyEmail'] = $config['settings']['support_email'];
                $options['replyName'] = $config['settings']['business_name'];
                kmail($toEmail, $toEmail, $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body'], $options);
                // Send email
            }
            $notice = 'ticketSubmitted';
            $smarty->assign('notice', $notice);
        }
    }
    $smarty->display('ticket.new.tpl');
} catch (Exception $e) {
    echo $e->getMessage();
예제 #8
0
             $errorCode = 0;
         }
         // saveMode
         echo '{"errorCode":"' . $errorCode . '","fileName":"' . urlencode($fileName) . '","message":"' . $message . '"}';
         exit;
     }
     break;
 case "forgotPassword":
     $memberResult = mysqli_query($db, "SELECT f_name,l_name,password FROM {$dbinfo[pre]}members WHERE email = '{$form['toEmail']}'");
     $memberRows = mysqli_num_rows($memberResult);
     $member = mysqli_fetch_array($memberResult);
     if ($memberRows > 0) {
         $form['memberName'] = $member['f_name'] . " " . $member['l_name'];
         $form['password'] = k_decrypt($member['password']);
         $smarty->assign('form', $form);
         $content = getDatabaseContent('emailForgottenPassword');
         // Get content from db
         $content['name'] = $smarty->fetch('eval:' . $content['name']);
         $content['body'] = $smarty->fetch('eval:' . $content['body']);
         $options['replyEmail'] = $config['settings']['support_email'];
         $options['replyName'] = $config['settings']['business_name'];
         //$form['toEmail']
         kmail($form['toEmail'], $form['toEmail'], $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body'], $options);
         // Send email
         echo '{"errorCode": "sentPasswordToEmail"}';
     } else {
         echo '{"errorCode": "passwordToEmailFailed"}';
     }
     break;
 case "deleteContrMedia":
     $mediaID = k_decrypt($_REQUEST['mediaID']);
예제 #9
0
    $invoice['invoice_date_display'] = $customDate->showdate($invoice['invoice_date'], 0);
    // Get corrected dates
    $invoice['due_date_display'] = $customDate->showdate($invoice['due_date'], 0);
    //echo $invoiceItems[1204]['asset_id'];
    //print_k($invoiceItems); exit;
    $smarty->assign('adminCurrency', $adminCurrency);
    // Admins currency info
    $smarty->assign('order', $orderInfo);
    // Assign order details
    $smarty->assign('invoiceItems', $invoiceItems);
    // Assign invoice details
    $smarty->assign('invoice', $invoice);
    // Assign invoice details
    $smarty->assign('invoiceItemsCount', $invoiceItemsCount);
    // Number of invoice items
    $content = getDatabaseContent('invoiceTemplate');
    // Get db content
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    // Evaluate the content from the db
    $smarty->assign('content', $content);
    // Output content to smarty
    $smarty->display('invoice.tpl');
    //}
    //else
    //	die('Order is empty - no invoice Items');
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
if ($db) {
    mysqli_close($db);
예제 #10
0
// Define the base path
define('PAGE_ID', 'content');
// Page ID
define('ACCESS', 'public');
// Page access type - public|private
define('INIT_SMARTY', true);
// Use Smarty
require_once BASE_PATH . '/assets/includes/session.php';
require_once BASE_PATH . '/assets/includes/initialize.php';
require_once BASE_PATH . '/assets/includes/commands.php';
require_once BASE_PATH . '/assets/includes/init.member.php';
require_once BASE_PATH . '/assets/includes/security.inc.php';
require_once BASE_PATH . '/assets/includes/language.inc.php';
require_once BASE_PATH . '/assets/includes/cart.inc.php';
require_once BASE_PATH . '/assets/includes/affiliate.inc.php';
$content = getDatabaseContent($id);
define('META_TITLE', $content['name']);
// Override page title, description, keywords and page encoding here
define('META_DESCRIPTION', '');
define('META_KEYWORDS', '');
define('PAGE_ENCODING', '');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    $content['name'] = $smarty->fetch('eval:' . $content['name']);
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    $smarty->assign('content', $content);
    $smarty->display('content.tpl');
} catch (Exception $e) {
    echo $e->getMessage();
}
예제 #11
0
// Use Smarty
require_once BASE_PATH . '/assets/includes/session.php';
require_once BASE_PATH . '/assets/includes/initialize.php';
require_once BASE_PATH . '/assets/includes/commands.php';
require_once BASE_PATH . '/assets/includes/init.member.php';
require_once BASE_PATH . '/assets/includes/security.inc.php';
require_once BASE_PATH . '/assets/includes/language.inc.php';
require_once BASE_PATH . '/assets/includes/cart.inc.php';
require_once BASE_PATH . '/assets/includes/affiliate.inc.php';
define('META_TITLE', '');
// Override page title, description, keywords and page encoding here
define('META_DESCRIPTION', '');
define('META_KEYWORDS', '');
define('PAGE_ENCODING', '');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    $content = getDatabaseContent('privacyPolicy');
    $content['name'] = $lang['privacyPolicy'];
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    $smarty->assign('content', $content);
    $smarty->display('content.tpl');
    // About template
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
if ($db) {
    mysqli_close($db);
}
// Close any database connections
예제 #12
0
// Use Smarty
require_once BASE_PATH . '/assets/includes/session.php';
require_once BASE_PATH . '/assets/includes/initialize.php';
require_once BASE_PATH . '/assets/includes/commands.php';
require_once BASE_PATH . '/assets/includes/init.member.php';
require_once BASE_PATH . '/assets/includes/security.inc.php';
require_once BASE_PATH . '/assets/includes/language.inc.php';
require_once BASE_PATH . '/assets/includes/cart.inc.php';
require_once BASE_PATH . '/assets/includes/affiliate.inc.php';
define('META_TITLE', '');
// Override page title, description, keywords and page encoding here
define('META_DESCRIPTION', '');
define('META_KEYWORDS', '');
define('PAGE_ENCODING', '');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    $content = getDatabaseContent('termsOfUse');
    $content['name'] = $lang['termsOfUse'];
    $content['body'] = $smarty->fetch('eval:' . $content['body']);
    $smarty->assign('content', $content);
    $smarty->display('content.tpl');
    // About template
} catch (Exception $e) {
    echo $e->getMessage();
}
include BASE_PATH . '/assets/includes/debug.php';
if ($db) {
    mysqli_close($db);
}
// Close any database connections