コード例 #1
0
ファイル: froogle.php プロジェクト: penkoh/TradingEye-V7.1.1
 function m_updateFroogle()
 {
     $libFunc = new c_libFunctions();
     #INTIALIZING VALUES
     $this->request['server'] = $libFunc->ifSet($this->request, 'server');
     $this->request['username'] = $libFunc->ifSet($this->request, 'username');
     $this->request['password'] = $libFunc->ifSet($this->request, 'password');
     $this->obDb->query = "UPDATE " . FROOGLE_SETTINGS . " SET ";
     $this->obDb->query .= "vServer\t\t='" . $libFunc->m_addToDB($this->request['server']) . "',";
     $this->obDb->query .= "vUsername\t='" . $libFunc->m_addToDB($this->request['username']) . "',";
     $this->obDb->query .= "vPassword\t='" . $libFunc->m_addToDB($this->request['password']) . "'";
     $this->obDb->updateQuery();
     $this->libFunc->m_mosRedirect(SITE_URL . "sales/adminindex.php?action=froogle.form&msg=1");
 }
コード例 #2
0
 function m_customOptionForm()
 {
     $libFunc = new c_libFunctions();
     #INTIALIZING TEMPLATES
     $this->ObTpl = new template();
     $this->ObTpl->set_file("optionform", $this->optionTemplate);
     $this->ObTpl->set_block("optionform", "IMG_BLK", "dspimg_blk");
     $this->ObTpl->set_block("optionform", "LINK_BLK", "dsplink_blk");
     $this->ObTpl->set_var("GRAPHICSMAINPATH", GRAPHICS_PATH);
     $this->ObTpl->set_var("TPL_VAR_SITEURL", SITE_URL);
     $this->ObTpl->set_var("TPL_SHOPURL", SITE_URL . "ecom/");
     $this->ObTpl->set_var("TPL_VAR_SEL1", "");
     $this->ObTpl->set_var("TPL_VAR_SEL2", "");
     $this->ObTpl->set_var("TPL_VAR_SEL3", "");
     $this->ObTpl->set_var("TPL_VAR_SEL4", "");
     //defining language variables
     $this->ObTpl->set_var("LANG_VAR_CUSTOMOPTTXT", LANG_CUSTOMOPTBUILD);
     $this->ObTpl->set_var("LANG_VAR_FIELDNAME", LANG_FIELDNAME);
     $this->ObTpl->set_var("LANG_VAR_DESCRIPTION", LANG_DESCRIPTION);
     $this->ObTpl->set_var("LANG_VAR_FIELDTYPE", LANG_TYPEOFTXT);
     $this->ObTpl->set_var("LANG_VAR_QUANTITYBOX", LANG_QUANTITYBOX);
     $this->ObTpl->set_var("LANG_VAR_INPUTBOX", LANG_INPUTBOX);
     $this->ObTpl->set_var("LANG_VAR_CHECKBOX", LANG_CHECKBOX);
     $this->ObTpl->set_var("LANG_VAR_TEXTAREA", LANG_TEXTAREA);
     $this->ObTpl->set_var("LANG_VAR_USESTOCK", LANG_USINGSTOCK);
     $this->ObTpl->set_var("LANG_VAR_ALLOWBACK", LANG_ALLOWBACKORDERS);
     $this->ObTpl->set_var("LANG_VAR_STOCKLVL", LANG_STOCKLVL);
     $this->ObTpl->set_var("LANG_VAR_ADDTLPRICE", LANG_ADDTLPRICE);
     $this->ObTpl->set_var("LANG_VAR_ONOFF", LANG_ONOFF);
     $this->ObTpl->set_var("LANG_VAR_OPTIMAGE", LANG_OPTIMAGE);
     /*CHECKING FOR POST VARIABLES
     		IF VARIABLES ARE SET THEN ASSIGNING THEIR VALUE TO VARIABLE SAMEVARIABLE
     		AS USED WHEN RETURNED FROM DATABASE
     		THIS THING IS USED TO REMOVE REDUNDANCY AND USE SAME FORM FOR EDIT AND INSERT*/
     if (count($_POST) > 0) {
         if (isset($this->request["cname"])) {
             $row_option[0]->vName = $this->request["cname"];
         }
         if (isset($this->request["description"])) {
             $row_option[0]->vDescription = $this->request["description"];
         }
         if (isset($this->request["type"])) {
             $row_option[0]->vType = $this->request["type"];
         }
         if (isset($this->request["use_inventory"])) {
             $row_option[0]->iUseInventory = $this->request["use_inventory"];
         }
         if (isset($this->request["backorder"])) {
             $row_option[0]->iBackorder = $this->request["backorder"];
         }
         if (isset($this->request["inventory"])) {
             $row_option[0]->iInventory = $this->request["inventory"];
         }
         if (isset($this->request["price"])) {
             $row_option[0]->fPrice = $this->request["price"];
         }
         if (isset($this->request["state"])) {
             $row_option[0]->iState = $this->request["state"];
         }
         $row_option[0]->vImage = "";
     } else {
         $row_option[0]->vName = "";
         $row_option[0]->vDescription = "";
         $row_option[0]->vType = "";
         $row_option[0]->iUseInventory = "";
         $row_option[0]->iBackorder = "";
         $row_option[0]->iInventory = "";
         $row_option[0]->fPrice = "";
         $row_option[0]->vImage = "";
         $row_option[0]->iState = "";
     }
     #IF EDIT MODE SELECTED
     if (isset($this->request['choiceid']) && !empty($this->request['choiceid'])) {
         $this->obDb->query = $this->obDb->query = "SELECT * FROM " . CHOICES . " WHERE iChoiceid_PK ='" . $this->request['choiceid'] . "'";
         $row_option = $this->obDb->fetchQuery();
         if (!isset($this->request['msg']) || empty($this->request['msg'])) {
             $this->request["tmFormatEditDate"] = $libFunc->dateFormat($row_option[0]->tmEditDate);
             $this->ObTpl->set_var("TPL_VAR_MSG", LBL_LAST_UPDATE . $this->request['tmFormatEditDate']);
         }
         if ($this->err == 1) {
             $this->ObTpl->set_var("TPL_VAR_MSG", $this->errMsg);
         }
         if ($row_option[0]->vType == "input") {
             $this->ObTpl->set_var("TPL_VAR_SEL2", "selected");
         } elseif ($row_option[0]->vType == "checkbox") {
             $this->ObTpl->set_var("TPL_VAR_SEL3", "selected");
         } elseif ($row_option[0]->vType == "textarea") {
             $this->ObTpl->set_var("TPL_VAR_SEL4", "selected");
         } else {
             $this->ObTpl->set_var("TPL_VAR_SEL1", "selected");
         }
         if ($row_option[0]->iUseInventory == 1) {
             $this->ObTpl->set_var("TPL_VAR_SELECTED1", "checked");
         } else {
             $this->ObTpl->set_var("TPL_VAR_SELECTED1", "");
         }
         if ($row_option[0]->iBackorder == 1) {
             $this->ObTpl->set_var("TPL_VAR_SELECTED2", "checked");
         } else {
             $this->ObTpl->set_var("TPL_VAR_SELECTED2", "");
         }
         if ($row_option[0]->iState == 1) {
             $this->ObTpl->set_var("TPL_VAR_SELECTED3", "checked");
         } else {
             $this->ObTpl->set_var("TPL_VAR_SELECTED3", "");
         }
         $this->ObTpl->set_var("TPL_VAR_MODE", "edit");
         $this->ObTpl->set_var("TPL_VAR_CHOICEID", $this->request['choiceid']);
         #HANDLING BLOCKS
         $this->ObTpl->set_var("TPL_VAR_LBLBUTTON", LBL_EDIT_CHOICE);
         if (file_exists($this->imagePath . "options/" . $row_option[0]->vImage) && $row_option[0]->vImage != "") {
             $this->ObTpl->set_var("TPL_VAR_IMGLBL", "Edit Image");
         } else {
             $this->ObTpl->set_var("TPL_VAR_IMGLBL", "Add Image");
         }
         $this->ObTpl->set_var("dspimg_blk", "");
         $this->ObTpl->parse("dsplink_blk", "LINK_BLK");
     } else {
         $this->ObTpl->set_var("TPL_VAR_CHOICEID", "");
         $this->ObTpl->set_var("TPL_VAR_MODE", "Add");
         $this->ObTpl->set_var("TPL_VAR_SELECTED1", "");
         $this->ObTpl->set_var("TPL_VAR_SELECTED2", "");
         $this->ObTpl->set_var("TPL_VAR_SELECTED3", "checked");
         $this->ObTpl->set_var("TPL_VAR_SEL1", "selected");
         $this->obDb->query = $this->obDb->query = "SELECT count(*) as totalCnt FROM " . CHOICES;
         $row_choice1 = $this->obDb->fetchQuery();
         if (!isset($this->request['msg'])) {
             $this->ObTpl->set_var("TPL_VAR_MSG", "Total Records " . $row_choice1[0]->totalCnt);
         } elseif ($this->err == 1) {
             $this->ObTpl->set_var("TPL_VAR_MSG", $this->errMsg);
         }
         $this->ObTpl->set_var("TPL_VAR_LBLBUTTON", LBL_ADD_CHOICE);
         $this->ObTpl->set_var("dsplink_blk", "");
         $this->ObTpl->parse("dspimg_blk", "IMG_BLK");
     }
     #ASSIGNING FORM ACTION
     $this->ObTpl->set_var("TPL_VAR_FORMURL", SITE_URL . "ecom/adminindex.php?action=ec_option.choiceadd");
     #ASSIGNING FORM VARAIABLES
     $this->ObTpl->set_var("TPL_VAR_TITLE", $libFunc->m_displayContent($row_option[0]->vName));
     $this->ObTpl->set_var("TPL_VAR_DESC", $libFunc->m_displayContent($row_option[0]->vDescription));
     $this->ObTpl->set_var("TPL_VAR_PRICE", $libFunc->m_displayContent($row_option[0]->fPrice));
     $this->ObTpl->set_var("TPL_VAR_INVENTORY", $libFunc->m_displayContent($row_option[0]->iInventory));
     return $this->ObTpl->parse("return", "optionform");
 }
コード例 #3
0
    }
}
array_walk($attributes, 'trim_value');
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/authentication.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/authorization.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/admin_prevnext.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/commonFunctions.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "ecom/ecom_admin_controller.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "user/user_admin_controller.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "order/order_admin_controller.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "sales/sales_admin_controller.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "admin/admin_controller.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/adminhomedisplay.php");
include_once $pluginInterface->plugincheck(MODULES_PATH . "default/adminleftmenu.php");
$obMainTemplate = new Template();
$libFunc = new c_libFunctions();
$obMainTemplate->set_file('hMainTemplate', ADMINTHEMEPATH . "default/templates/admin/default.htm");
$obMainTemplate->set_var("TPL_VAR_SITEURL", SITE_URL);
$obMainTemplate->set_var("TPL_VAR_SITENAME", htmlspecialchars(SITE_NAME));
$obMainTemplate->set_var('TPL_VAR_REAL_PATH', $libFunc->real_path());
$obMainTemplate->set_var("GRAPHICSMAINPATH", SITE_URL . "/graphics");
if (!isset($_SESSION['uname']) || empty($_SESSION['uname'])) {
    $obUserAdmin = new c_authentication($obDatabase, $obMainTemplate, $attributes);
}
$obUserAdmin = new c_leftMenu($obDatabase, $obMainTemplate, $attributes);
$obUserAdmin = new c_authorization($obDatabase, $obMainTemplate, $attributes);
global $sModule;
switch ($sModule) {
    case "ecom":
        $obEcomAdmin = new c_ecomAdminController($obDatabase, $obMainTemplate, $attributes, $libFunc);
        break;
コード例 #4
0
ファイル: sitemap.php プロジェクト: penkoh/TradingEye-V7.1.1
				Valid values range from 0.0 to 1.0. 
				This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.
				The default priority of a page is 0.5.
				
Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index.
Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.

=============
*/
require_once 'sitemap.inc.php';
require_once '../configuration.php';
# SET DATABASE OBJ AS GLOBAL VARIABLE
global $obDatabase;
// create the Sitemap object
$s = new Sitemap();
$libFunc = new c_libFunctions();
# DEFINE PRIORITY VARIABLES
define("HOMEPAGE_PRIORITY", "1.0");
define("DEPARTMENT_PRIORITY", "0.9");
define("PRODUCT_PRIORITY", "0.7");
define("CONTENT_PRIORITY", "0.7");
define("OTHER_PRIORITY", "0.5");
# 0.5 IS A DEFAULT VALUE
#DEFINE  CHANGEFREQUENCY VARIABLE
define("HOMEPAGE_CHANGEFREQ", "hourly");
define("DEPARTMENT_CHANGEFREQ", "weekly");
define("PRODUCT_CHANGEFREQ", "weekly");
define("CONTENT_CHANGEFREQ", "weekly");
define("OTHER_CHANGEFREQ", "weekly");
define("SITEMAP_CHANGEFREQ", "daily");
# ADD THE HOMEPAGE WITH A SLASH "/"
コード例 #5
0
ファイル: sitemap.php プロジェクト: penkoh/TradingEye-V7.1.1
 function m_showSitemap()
 {
     $libFunc = new c_libFunctions();
     if (!isset($this->request['mode'])) {
         $this->request['mode'] = 0;
     }
     $this->ObTpl = new template();
     $this->ObTpl->set_file("TPL_SITEMAP_FILE", $this->siteMapTemplate);
     $this->ObTpl->set_var("TPL_VAR_SITEURL", SITE_URL);
     $this->ObTpl->set_var("TPL_VAR_GRAPHICSURL", GRAPHICS_PATH);
     $siteMapUrl = SITE_URL . "index.php?action=sitemap";
     $this->ObTpl->set_var("TPL_VAR_SITEMAPURL", $libFunc->m_safeUrl($siteMapUrl));
     #SETTING TEMPLATE BLOCKS
     $this->ObTpl->set_block("TPL_SITEMAP_FILE", "TPL_MAINDEPARTMENT_BLK", "maindept_blk");
     $this->ObTpl->set_block("TPL_MAINDEPARTMENT_BLK", "TPL_DEPARTMENT_BLK", "dept_blk");
     $this->ObTpl->set_block("TPL_DEPARTMENT_BLK", "TPL_MAINSUBDEPT_BLK", "mainSubDept_blk");
     $this->ObTpl->set_block("TPL_MAINSUBDEPT_BLK", "TPL_SUBDEPT_BLK", "subDept_blk");
     $this->ObTpl->set_block("TPL_DEPARTMENT_BLK", "TPL_MAINSUBPRODUCT_BLK", "mainSubProduct_blk");
     $this->ObTpl->set_block("TPL_MAINSUBPRODUCT_BLK", "TPL_SUBPRODUCT_BLK", "subProduct_blk");
     $this->ObTpl->set_block("TPL_DEPARTMENT_BLK", "TPL_MAINSUBCONTENT_BLK", "mainSubContent_blk");
     $this->ObTpl->set_block("TPL_MAINSUBCONTENT_BLK", "TPL_SUBCONTENT_BLK", "subContent_blk");
     $this->ObTpl->set_block("TPL_SITEMAP_FILE", "TPL_MENU_BLK", "menu_blk");
     $this->ObTpl->set_block("TPL_MENU_BLK", "TPL_MENUITEM_BLK", "menuitem_blk");
     $this->ObTpl->set_block("TPL_SITEMAP_FILE", "TPL_MAINCONTENT_BLK", "mainContent_blk");
     $this->ObTpl->set_block("TPL_MAINCONTENT_BLK", "TPL_CONTENT_BLK", "content_blk");
     #INTIALIZING
     $this->ObTpl->set_var("maindept_blk", "");
     $this->ObTpl->set_var("dept_blk", "");
     $this->ObTpl->set_var("menu_blk", "");
     $this->ObTpl->set_var("menuitem_blk", "");
     $this->ObTpl->set_var("mainContent_blk", "");
     $this->ObTpl->set_var("content_blk", "");
     #QUERY TO GET DEPARTMENTS UNDER SELECTED DEPARTMENT
     $this->obDb->query = "SELECT vTitle,vSeoTitle,iDeptid_PK  FROM " . DEPARTMENTS . " D, " . FUSIONS . " F WHERE (iDeptid_PK=iSubId_FK AND vtype='department' AND iOwner_FK='0' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
     $rowDept = $this->obDb->fetchQuery();
     $deptCount = $this->obDb->record_count;
     if ($deptCount > 0) {
         for ($i = 0; $i < $deptCount; $i++) {
             $deptUrl = SITE_URL . "index.php?action=sitemap&mode=" . $rowDept[$i]->vSeoTitle;
             $count = 0;
             $this->ObTpl->set_var("mainSubDept_blk", "");
             $this->ObTpl->set_var("subDept_blk", "");
             $this->ObTpl->set_var("mainSubProduct_blk", "");
             $this->ObTpl->set_var("subProduct_blk", "");
             $this->ObTpl->set_var("mainSubContent_blk", "");
             $this->ObTpl->set_var("subContent_blk", "");
             # 15/02/2008 TO CHECK IF THERE ARE ANY PRODUCTS - DEPARTMENTS - CONTENTS UNDER DEPARTMENT
             $this->obDb->query = "SELECT vTitle,vSeoTitle,iDeptid_PK  FROM " . DEPARTMENTS . " D, " . FUSIONS . " F WHERE (iDeptid_PK=iSubId_FK AND vtype='department' AND iOwner_FK='" . $rowDept[$i]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
             $rowDepartment = $this->obDb->fetchQuery();
             $departmentCount = $this->obDb->record_count;
             if ($departmentCount > 0) {
                 $count++;
             }
             $this->obDb->query = "SELECT vTitle,vSeoTitle FROM " . PRODUCTS . " D, " . FUSIONS . " F WHERE (iProdid_PK=iSubId_FK AND vtype='product' AND iOwner_FK='" . $rowDept[$i]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
             $rowProduct = $this->obDb->fetchQuery();
             $productCount = $this->obDb->record_count;
             if ($productCount > 0) {
                 $count++;
             }
             $this->obDb->query = "SELECT vTitle,vSeoTitle FROM " . CONTENTS . " D, " . FUSIONS . " F WHERE (iContentid_PK=iSubId_FK AND vtype='content' AND iOwner_FK='" . $rowDept[$i]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
             $rowContent = $this->obDb->fetchQuery();
             $contentCount = $this->obDb->record_count;
             if ($contentCount > 0) {
                 $count++;
             }
             if ($count == 0) {
                 $deptUrl = SITE_URL . "ecom/index.php?action=ecom.details&mode=" . $rowDept[$i]->vSeoTitle;
             }
             $this->ObTpl->set_var("TPL_VAR_DEPTURL", $libFunc->m_safeUrl($deptUrl));
             $this->ObTpl->set_var("TPL_VAR_DEPTTITLE", $libFunc->m_displayContent($rowDept[$i]->vTitle));
             #SUB ITEMS
             if (!empty($this->request['mode']) && $rowDept[$i]->vSeoTitle == $this->request['mode']) {
                 #TO GET OWNER
                 $this->obDb->query = "SELECT iDeptid_PK FROM " . DEPARTMENTS . " WHERE vSeoTitle='" . $this->request['mode'] . "'";
                 $rsDeptID = $this->obDb->fetchQuery();
                 $modeCount = $this->obDb->record_count;
                 if ($modeCount > 0) {
                     #QUERY TO GET DEPARTMENTS UNDER SELECTED DEPT
                     $this->obDb->query = "SELECT vTitle,vSeoTitle,iDeptid_PK  FROM " . DEPARTMENTS . " D, " . FUSIONS . " F WHERE (iDeptid_PK=iSubId_FK AND vtype='department' AND iOwner_FK='" . $rsDeptID[0]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
                     $rowDepartment = $this->obDb->fetchQuery();
                     $departmentCount = $this->obDb->record_count;
                     if ($departmentCount > 0) {
                         for ($d = 0; $d < $departmentCount; $d++) {
                             $productUrl = SITE_URL . "ecom/index.php?action=ecom.details&mode=" . $rowDepartment[$d]->vSeoTitle;
                             $this->ObTpl->set_var("TPL_VAR_SUBDEPURL", $libFunc->m_safeUrl($productUrl));
                             $this->ObTpl->set_var("TPL_VAR_SUBDEPTTITLE", $libFunc->m_displayContent($rowDepartment[$d]->vTitle));
                             $this->ObTpl->parse("subDept_blk", "TPL_SUBDEPT_BLK", true);
                         }
                         $this->ObTpl->parse("mainSubDept_blk", "TPL_MAINSUBDEPT_BLK");
                     }
                     #QUERY TO GET PRODUCTS UNDER SELECTED DEPT
                     $this->obDb->query = "SELECT vTitle,vSeoTitle FROM " . PRODUCTS . " D, " . FUSIONS . " F WHERE (iProdid_PK=iSubId_FK AND vtype='product' AND iOwner_FK='" . $rsDeptID[0]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
                     $rowProduct = $this->obDb->fetchQuery();
                     $productCount = $this->obDb->record_count;
                     if ($productCount > 0) {
                         for ($p = 0; $p < $productCount; $p++) {
                             $productUrl = SITE_URL . "ecom/index.php?action=ecom.pdetails&mode=" . $rowProduct[$p]->vSeoTitle;
                             $this->ObTpl->set_var("TPL_VAR_SUBPRODUCTURL", $libFunc->m_safeUrl($productUrl));
                             $this->ObTpl->set_var("TPL_VAR_SUBPRODUCTTITLE", $libFunc->m_displayContent($rowProduct[$p]->vTitle));
                             $this->ObTpl->parse("subProduct_blk", "TPL_SUBPRODUCT_BLK", true);
                         }
                         $this->ObTpl->parse("mainSubProduct_blk", "TPL_MAINSUBPRODUCT_BLK");
                     }
                     #QUERY TO GET CONTENTS UNDER SELECTED DEPT
                     $this->obDb->query = "SELECT vTitle,vSeoTitle FROM " . CONTENTS . " D, " . FUSIONS . " F WHERE (iContentid_PK=iSubId_FK AND vtype='content' AND iOwner_FK='" . $rsDeptID[0]->iDeptid_PK . "' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
                     $rowContent = $this->obDb->fetchQuery();
                     $contentCount = $this->obDb->record_count;
                     if ($contentCount > 0) {
                         for ($c = 0; $c < $contentCount; $c++) {
                             $contentUrl = SITE_URL . "ecom/index.php?action=ecom.cdetails&mode=" . $rowContent[$c]->vSeoTitle;
                             $this->ObTpl->set_var("TPL_VAR_SUBCONTENTURL", $libFunc->m_safeUrl($contentUrl));
                             $this->ObTpl->set_var("TPL_VAR_SUBCONTENTTITLE", $libFunc->m_displayContent($rowContent[$c]->vTitle));
                             $this->ObTpl->parse("subContent_blk", "TPL_SUBCONTENT_BLK", true);
                         }
                         $this->ObTpl->parse("mainSubContent_blk", "TPL_MAINSUBCONTENT_BLK");
                     }
                     #END CONTENT COUNT
                 }
                 #END MODE COUNT
             }
             #END MODE CHECK
             $this->ObTpl->parse("dept_blk", "TPL_DEPARTMENT_BLK", true);
         }
         $this->ObTpl->parse("maindept_blk", "TPL_MAINDEPARTMENT_BLK");
     }
     #QUERY TO GET MENU ITEMS
     #QUERY MENU TABLE
     $this->obDb->query = "SELECT iHeaderid_PK,vHeader,vImage  FROM " . MENUHEADERS . " WHERE iState='1' ORDER BY iSort";
     $rsMenuHead = $this->obDb->fetchQuery();
     $rsMenuHeadCount = $this->obDb->record_count;
     if ($rsMenuHeadCount > 0) {
         for ($i = 0; $i < $rsMenuHeadCount; $i++) {
             $this->obDb->query = "SELECT iMenuItemsId,vItemtitle,vLink,vHrefAttributes,vImage   FROM " . MENUITEMS . " WHERE iState='1' AND iHeaderid_FK='" . $rsMenuHead[$i]->iHeaderid_PK . "' ORDER BY iSort";
             $rsMenu = $this->obDb->fetchQuery();
             $rsMenuCount = $this->obDb->record_count;
             if ($rsMenuCount > 0) {
                 $this->ObTpl->set_var("menuitem_blk", "");
                 for ($j = 0; $j < $rsMenuCount; $j++) {
                     $this->ObTpl->set_var("TPL_VAR_MENUTITLE", $libFunc->m_displayContent($rsMenu[$j]->vItemtitle));
                     $this->ObTpl->set_var("TPL_VAR_MENUURL", $libFunc->m_displayContent($rsMenu[$j]->vLink));
                     $this->ObTpl->set_var("TPL_VAR_HREFATTRIBUTES", $libFunc->m_displayContent($rsMenu[$j]->vHrefAttributes));
                     $this->ObTpl->parse("menuitem_blk", "TPL_MENUITEM_BLK", true);
                 }
                 $this->ObTpl->set_var("TPL_VAR_MENUHEAD", $libFunc->m_displayContent($rsMenuHead[$i]->vHeader));
                 $this->ObTpl->parse("menu_blk", "TPL_MENU_BLK", true);
             } else {
                 $this->ObTpl->set_var("menuitem_blk", "");
             }
         }
     }
     #QUERY TO GET CONTENTS UNDER SELECTED HOMEPAGE
     $this->obDb->query = "SELECT vTitle,vSeoTitle FROM " . CONTENTS . " D, " . FUSIONS . " F WHERE (iContentid_PK=iSubId_FK AND vtype='content' AND iOwner_FK='0' AND vOwnerType='department' AND iState='1') ORDER BY iSort";
     $rowContent = $this->obDb->fetchQuery();
     $contentCount = $this->obDb->record_count;
     if ($contentCount > 0) {
         for ($c = 0; $c < $contentCount; $c++) {
             $contentUrl = SITE_URL . "ecom/index.php?action=ecom.cdetails&mode=" . $rowContent[$c]->vSeoTitle;
             $this->ObTpl->set_var("TPL_VAR_CONTENTURL", $libFunc->m_safeUrl($contentUrl));
             $this->ObTpl->set_var("TPL_VAR_CONTENTTITLE", $libFunc->m_displayContent($rowContent[$c]->vTitle));
             $this->ObTpl->parse("content_blk", "TPL_CONTENT_BLK", true);
         }
         $this->ObTpl->parse("mainContent_blk", "TPL_MAINCONTENT_BLK");
     }
     return $this->ObTpl->parse("return", "TPL_SITEMAP_FILE");
 }
コード例 #6
0
ファイル: index.php プロジェクト: penkoh/TradingEye-V7.1.1
if ($notFoundErrorFlag !== 1) {
    global $sModule;
    switch ($sModule) {
        case "ecom":
            $obEcomAdmin = new c_ecomController($obDatabase, $obMainTemplate, $attributes);
            break;
        case "user":
            $obUserAdmin = new c_userController($obDatabase, $obMainTemplate, $attributes);
            break;
        default:
            $obHomeDisplay = new c_homeDisplay($obDatabase, $obMainTemplate, $attributes);
            break;
    }
}
$obMainTemplate->set_var("TPL_VAR_CURRENCY", CONST_CURRENCY);
$libFunc = new c_libFunctions();
$myShopUrl = $libFunc->m_safeUrl(SITE_URL . "ecom/index.php?action=ecom.viewcart");
$obMainTemplate->set_var("TPL_VAR_CARTLINK", $myShopUrl);
if (isset($_SESSION['grandTotal'])) {
    $obMainTemplate->set_var("TPL_VAR_GRANDTOTAL", number_format($_SESSION['grandTotal'], 2, '.', ''));
    $obMainTemplate->set_var("TPL_VAR_TOTALQTY", $_SESSION['totalQty']);
} else {
    $obMainTemplate->set_var("TPL_VAR_GRANDTOTAL", '0.00');
    $obMainTemplate->set_var("TPL_VAR_TOTALQTY", '0');
}
if ($libFunc->ifSet($_SESSION, "cssSelectedFile", "")) {
    $obMainTemplate->set_var("TPL_VAR_CSSFILE", trim($_SESSION['cssSelectedFile']));
} else {
    $obMainTemplate->set_var("TPL_VAR_CSSFILE", trim(DEFAULT_CSS));
}
$accessibility = $libFunc->m_safeUrl(SITE_URL . "index.php?action=cms&mode=accessibility");