ruạṛ
<?php /** * Global definitions and includes * @version 0.9 * @author Robert Urquhart <programmer@activatedesign.co.nz> * @package WEP-CMS */ /** * @global string SITE_FROM_ADDRESS send email notifications from this address */ define('SITE_FROM_ADDRESS', 'sales@qualityprecast.co.nz'); /** * @global string SITE_FROM_NAME send email notifications from this name * @todo add this to mail function */ define('SITE_FROM_NAME', ''); /** * @global string SITE_ADMIN_ADDRESS send order notifications etc to this address */ define('SITE_ADMIN_ADDRESS', 'sales@qualityprecast.co.nz'); /** * @global string ADMIN_INDEX_PAGE * override for page shown on login which is otherwise module dependant (empty string). * - useful when entering content / products and don't want to have to click through from * products / orders repectively on login */ define('ADMIN_INDEX_PAGE',''); //eg 'pages.php' //Whether or not the site is responsive define('RESPONSIVE',false); /** * module flags */ /** * global string THUMBNAIL_PREFIX * - used by upload_image() and similar functions when generating a single thumbnail * - used by display functions when looking for a thumbnail file */ define('THUMBNAIL_PREFIX','small-'); /** * Lists module * @global bool MODULE_LISTS_VISIBLE (display lists in admin panel menu) * @global bool MODULE_LISTS_NAME (Menu item text) * @global bool MODULE_LISTS_CREATE (display new list form) */ define('MODULE_LISTS_VISIBLE',false); define('MODULE_LISTS_NAME','List Options'); define('MODULE_LISTS_CREATE',true); /** * pages module * - doesn't have it's own flag as is base for everything else * @global bool PAGE_HAS_SLIDESHOW * @global int PAGE_SLIDESHOW_WIDTH (max) px referenced by new/replace slideshow image scripts * @global int PAGE_SLIDESHOW_HEIGHT (max) px referenced by new/replace slideshow image scripts */ define('PAGE_HAS_SLIDESHOW',true); define('PAGE_SLIDESHOW_WIDTH',1002); define('PAGE_SLIDESHOW_HEIGHT',360); /** * galleries * - doesn't have a flag as also present in every site * @global int GALLERY_IMAGE_WIDTH (max) px referenced by new/replace image scripts * @global int GALLERY_IMAGE_HEIGHT (max) px referenced by new/replace image scripts * @global int GALLERY_THUMBNAIL_WIDTH (max) px referenced by new/replace image scripts * @global int GALLERY_THUMBNAIL_HEIGHT (max) px referenced by new/replace image scripts * @global int GALLERY_IMAGES_PER_PAGE referenced by new/replace image scripts */ define('GALLERY_IMAGE_WIDTH',1000); define('GALLERY_IMAGE_HEIGHT',800); define('GALLERY_THUMBNAIL_WIDTH',200); define('GALLERY_THUMBNAIL_HEIGHT',200); define('GALLERY_IMAGES_PER_PAGE', 20); /** * Products module * @global bool MODULE_PRODUCTS (display products page in admin panel menu) * @global INT PRODUCT_DATA_LIST (list_id of the list containing product_data fields ) * @todo (WEP3) make products scripts inaccessible if this is false */ define('MODULE_PRODUCTS',false); define('PRODUCT_DATA_LIST',1); define('PRODUCT_OPTIONS_LIST',2); /** * Products image dimensions * @global int CATEGORY_THUMBNAIL_WIDTH (max) px referenced by new/replace image scripts * @global int CATEGORY_THUMBNAIL_HEIGHT (max) px referenced by new/replace image scripts * @global int PRODUCT_IMAGE_WIDTH (max) px referenced by new/replace image scripts * @global int PRODUCT_IMAGE_HEIGHT (max) px referenced by new/replaceimage scripts * @global int PRODUCT_THUMBNAIL_WIDTH (max) px referenced by new/replace image scripts * @global int PRODUCT_THUMBNAIL_HEIGHT (max) px referenced by new/replace image scripts */ define('CATEGORY_THUMBNAIL_WIDTH',150); define('CATEGORY_THUMBNAIL_HEIGHT',150); define('PRODUCT_IMAGE_WIDTH',680); define('PRODUCT_IMAGE_HEIGHT',0); define('PRODUCT_THUMBNAIL_WIDTH',150); define('PRODUCT_THUMBNAIL_HEIGHT',150); /** * @global int NUM_FEATURED_PRODUCTS number of products to display in featured products block * - for SQL query * - selected at random from those defined */ define('NUM_FEATURED_PRODUCTS',4); // on the product page display this many /** * @global int PRODUCTS_PER_PAGE number of products to display on each category page * - setting this to '0' disables paging */ define('PRODUCTS_PER_PAGE',0); /** * @global int NUM_ASSOCIATED_PRODUCTS number of products to display on each product page * - for SQL query * - selected at random from those defined */ define('MODULE_PRODUCT_ASSOCIATED',false); define('NUM_ASSOCIATED_PRODUCTS',4); // on the product page display this many /** * @global bool MODULE_CART (display orders page in admin panel menu) */ define('MODULE_CART',false); /** * @global bool MODULE_STOCKISTS (display stockists page in admin panel menu) */ define('MODULE_STOCKISTS',false); /** * override normal behaviour of adding a new instance of a product from the category/product page * instead if an instance of the product exists in the cart increase its quantity appropriately */ define('CART_UPDATE_EXISTING',false); /** * @global bool Whether the site has an AJAX powered mini shopping cart */ define("MODULE_MINI_CART", true); /** * payment options */ /** * @global string BANK_DETAILS instructions for paying by bank deposit */ define('BANK_DETAILS',''); /** * DPS (Payment Express) * @global string DPS_ID DPS (PxPay) Login ID * @global string DPS_ENCRYPT DPS (PxPay) Encryption string * @global string PXPAY_URL (DPS) */ //* define('DPS_ID','ActivateDesignPXP2_Dev'); // Activate Design developer account define('DPS_ENCRYPT','9ab6069948263952afc303d0c0a5ce0a589db63e1713136d5002719dbdc99b3e'); // AD developer account // */ /* define('DPS_ID',''); //live define('DPS_ENCRYPT',''); //live // */ define('PXPAY_URL', 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx'); /** * Paypal * @global bool PAYPAL_TEST_MODE determines whether request goes to paypal or sandbox, debugging output * @global string PAYPAL_ACCOUNT_EMAIL email to associate with Paypal transaction requests */ define('PAYPAL_TEST_MODE',true); define('PAYPAL_ACCOUNT_EMAIL', 'programmer@activatedesign.co.nz'); // Activate Design test account //define('PAYPAL_ACCOUNT_EMAIL', 'progra_1193784050_biz@activatedesign.co.nz'); // Test account retailer //define('PAYPAL_ACCOUNT_EMAIL', ''); // live /** * @global bool MODULE_DISCOUNT_VOUCHERS */ define('MODULE_DISCOUNT_VOUCHERS',false); /** * @todo more product module options eg price format */ /** * customers module * always involved with cart module but may be standalone * @global bool MODULE_CUSTOMERS (display customers page in admin panel menu) * @global bool MODULE_CUSTOMER_WHOLESALE * @global bool MODULE_CUSTOMER_DISCOUNT * @global bool MODULE_CUSTOMER_REGISTER allow registration from the site vs customers must be created from the admin panel * @global bool MODULE_CUSTOMER_INTERESTS toggle Newsletter submodule */ define('MODULE_CUSTOMERS',false); define('MODULE_CUSTOMER_WHOLESALE',false); define('MODULE_CUSTOMER_DISCOUNT',false); define('MODULE_CUSTOMER_REGISTER',false); define('MODULE_CUSTOMER_INTERESTS',false); /** * blog module * @global bool MODULE_BLOG * @global bool BLOG_LIST (list_id for post types if required - you will need to create a List and code it in) * @global bool ARTICLES_PER_PAGE default number of posts to show in a topic page or sidebar * @global bool RECENT_ARTICLES default number of posts to show in a "Recent News" section * @global bool BLOG_POST_SUMMARY enter a plain text summary field for previews * @global bool BLOG_POST_IMAGE upload a Featured Image for each blog post * @global int BLOG_FEATURE_IMAGE_WIDTH (max) px referenced by new/replace image scripts * @global int BLOG_FEATURE_IMAGE_HEIGHT (max) px referenced by new/replaceimage scripts * @global int BLOG_FEATURE_THUMBNAIL_WIDTH (max) px referenced by new/replace image scripts * @global int BLOG_FEATURE_THUMBNAIL_HEIGHT (max) px referenced by new/replace image scripts */ define('MODULE_BLOG',false); define('BLOG_LIST',0); define('ARTICLES_PER_PAGE', 10); define('RECENT_ARTICLES', 5); define('BLOG_POST_SUMMARY', false); define('BLOG_POST_IMAGE', false); define('BLOG_FEATURE_IMAGE_WIDTH',515); define('BLOG_FEATURE_IMAGE_HEIGHT',387); define('BLOG_FEATURE_THUMBNAIL_WIDTH',200); define('BLOG_FEATURE_THUMBNAIL_HEIGHT',150); /** * Testimonials module * @global bool MODULE_TESTIMONIALS (display lists in admin panel menu) * @global bool TESTIMONIALS_LIST (list_id for testimonial types if required - you will need to create a List) */ define('MODULE_TESTIMONIALS',false); define('TESTIMONIALS_LIST',3); /** * files module * @global bool MODULE_FILES * @global bool MODULE_FILES_REQUIRE_LOGIN require a logged in customer * @var array $FILE_TYPES allowed file types (suffix) => mime types * (define() can only do scalar values) */ define('MODULE_FILES',false); define('MODULE_FILES_REQUIRE_LOGIN',false); $FILE_TYPES = array( 'jpg'=>'image/jpeg' , 'jpeg'=>'image/jpeg' , 'png'=>'image/png' //, 'psd'=>'image/photoshop' //, 'ai'=>'application/force-download' , 'pdf'=>'application/pdf' , 'doc'=>'application/msword' , 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document' , 'xls'=>'application/vnd.ms-excel' , 'xlsx'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.document' , 'zip'=>'application/zip' //, 'eps'=>'application/postscript' ); define('FILE_DIR', '/resources/files/'); /** * php 5.4 enforces not relying on server */ date_default_timezone_set ( 'Pacific/Auckland' ); // Automatically loads called classes. Means classes do not need to be explicitly included, nor will they be loaded into memory until they are actually needed. function autoInclude($class) { if(!@include(dirname(__FILE__) . "/classes/class." . $class . ".php")) { debug_print_backtrace(); die("Could not find " . dirname(__FILE__) . "/classes/class." . $class . ".php"); } } spl_autoload_register(autoInclude); /** * Includes * legacy include site-data could be brought in with these definitions, but it would be better to combine all define()s into one file */ require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/site-data.php'; require_once $_SERVER['DOCUMENT_ROOT'].'/admin/scripts-includes/functions.php'; ?>
cải xoăn