Esempio n. 1
0
 /**
  * This function is used to Show map
  *
  * @return HTML data
  */
 function showMap()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('SITE_MAP');
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include 'classes/Core/CHome.php';
     include_once 'classes/Core/CAddCart.php';
     include 'classes/Core/CSiteMap.php';
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['skinname'] = Core_CHome::skinName();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['sitemap'] = Core_CSiteMap::showMap();
     $output['cartcount'] = Core_CAddCart::countCart();
     Bin_Template::createTemplate('sitemap.html', $output);
 }
Esempio n. 2
0
 /**
  * This function is used to get  the all news from db
  * 
  * 
  * @return string
  */
 function showNewsPage()
 {
     $pagesize = 10;
     if (isset($_GET['page'])) {
         $start = trim($_GET['page'] - 1) * $pagesize;
         $end = $pagesize;
     } else {
         $start = 0;
         $end = $pagesize;
     }
     $total = 0;
     $sql = "SELECT news_title,DATE_FORMAT(news_date,'%M %D %Y')AS date,news_desc from news_table where news_status=1 order by news_date desc";
     $query = new Bin_Query();
     if ($query->executeQuery($sql)) {
         $total = ceil($query->totrows / $pagesize);
         include 'classes/Lib/Paging.php';
         $tmp = new Lib_Paging('classic', array('totalpages' => $total, 'length' => 10), 'pagination');
         $this->data['paging'] = $tmp->output;
         $this->data['prev'] = $tmp->prev;
         $this->data['next'] = $tmp->next;
         $sql = "SELECT news_title,DATE_FORMAT(news_date,'%M %D %Y')AS date,news_desc from news_table where news_status=1 order by news_date desc limit {$start},{$end}";
         $obj = new Bin_Query();
         if ($obj->executeQuery($sql)) {
             return Display_DNews::showNewsPage($obj->records, $this->data['paging'], $this->data['prev'], $this->data['next'], $start);
         } else {
             return Core_CLanguage::_(NO_NEWS_FOUND);
         }
     } else {
         return Core_CLanguage::_(NO_NEWS_FOUND);
     }
 }
Esempio n. 3
0
 /**
  * This function is used to Display the News Page
  *
  * @return string
  */
 function showNewsPage()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('CMS');
     include_once 'classes/Core/CFeaturedItems.php';
     include_once 'classes/Display/DFeaturedItems.php';
     include 'classes/Core/CNews.php';
     include 'classes/Display/DNews.php';
     include_once 'classes/Core/CNewProducts.php';
     include_once 'classes/Display/DNewProducts.php';
     include 'classes/Core/CWishList.php';
     include 'classes/Display/DWishList.php';
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Core/CHome.php';
     include 'classes/Core/CAddCart.php';
     include 'classes/Display/DAddCart.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include 'classes/Core/CProductDetail.php';
     include 'classes/Display/DProductDetail.php';
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['skinname'] = Core_CHome::skinName();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['cartSnapShot'] = Core_CAddCart::cartSnapShot();
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     $output['signup'] = Display_DUserRegistration::signUp();
     $default = new Core_CLastViewedProducts();
     $output['lastviewedproducts'] = $default->lastViewedProducts();
     if ($_SESSION['user_id'] != '') {
         $output['wishlistsnapshot'] = Core_CWishList::wishlistSnapshot();
     }
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
     $output['categories'] = Display_DUserRegistration::showMainCat();
     $output['categorytree'] = Core_CProductDetail::showCategoryTree();
     $output['newscontent'] = Core_CNews::showNewsPage();
     if ($_SESSION['compareProductId'] == '') {
         $output['viewProducts']['viewProducts'] = Display_DWishList::viewProductElse();
     } else {
         $output['viewProducts'] = Core_CWishList::addtoCompareProduct();
     }
     Bin_Template::createTemplate('news.html', $output);
 }
Esempio n. 4
0
    /**
     * This function is used to add  the  news letter
     *
     * .
     * 
     * @return string
     */
    function addNewsLetter()
    {
        if (isset($_POST['subId']) && $_POST['subId'] != '') {
            $stat = 0;
            if (isset($_POST['chkNewsSub'])) {
                $stat = 1;
            }
            $sqlselect = "update newsletter_subscription_table set status=" . $stat . " where  subsciption_id=" . $_POST['subId'];
            $obj = new Bin_Query();
            if ($obj->updateQuery($sqlselect)) {
                return '<div class="alert alert-success">
				<button data-dismiss="alert" class="close" type="button">×</button>
				' . Core_CLanguage::_(REQUEST_NEWS_UPDATED) . '
				</div>';
            } else {
                return '<div class="alert alert-error">
				<button data-dismiss="alert" class="close" type="button">×</button>
				' . Core_CLanguage::_(REQUEST_NEWS_NOT_UPDATED) . '
				</div>';
            }
        }
    }
Esempio n. 5
0
 /**
  * This function is used to Display the FAQ Page
  *
  * @return string
  */
 function showFaq()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('CMS');
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include 'classes/Core/CFaq.php';
     include 'classes/Display/DFaq.php';
     include 'classes/Core/CHome.php';
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     include_once 'classes/Core/CCurrencySettings.php';
     include 'classes/Core/CAddCart.php';
     Core_CCurrencySettings::getDefaultCurrency();
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['skinname'] = Core_CHome::skinName();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['lastviewedproducts'] = Core_CLastViewedProducts::lastViewedProducts();
     $output['userRight'] = "userdashboard.html";
     $output['rows'] = Core_CFaq::showFaq();
     $output['cartcount'] = Core_CAddCart::countCart();
     Bin_Template::createTemplate('userIndex.html', $output);
 }
Esempio n. 6
0
    /**
     * This function is used to Display All FAQs
     * @param mixed $arr
     * @param int $paging
     * @param int $prev
     * @param int $next
     * @param int $val				
     * @return string
     */
    function listFaq($arr, $paging, $prev, $next, $val)
    {
        $output = '<table border=0 width=100% cellpadding=0 cellspacing=0><tr><td colspan=2 class="serachresult"><div class="title_fnt">
	<h1>' . Core_CLanguage::_('FREQUENTLY_ASKED_QUESTIONS') . '</h1>
	</div></td></tr>
	 			<tr><td colspan=2>
					<table width=100%>
					<tr>
					<td align="center"  class="dot_line">
					</tr>
					</table>
				</td></tr>	
				<tr><td>
				<div style="padding:15px 0 5px 0" class="review1">
				<ol>';
        if (count($arr) > 0) {
            $cnt = 1;
            for ($i = 0; $i < count($arr); $i++) {
                $output .= '<li><a href="#div' . $i . '" style="color:#878585;text-decoration:none;padding-top:10px;">' . $arr[$i]['faq_qn'] . '</a></li>';
                $cnt++;
            }
        } else {
            $output .= '<span>No Faqs Found!</span>';
        }
        $output .= '</ol><div></td></tr></table>
		
		<div style="padding:15px 0 5px 0" class="review">
			<ol>';
        $cnt = 1;
        for ($i = 0; $i < count($arr); $i++) {
            $output .= '<li><div id="div' . $i . '"><b>' . $arr[$i]['faq_qn'] . '</b><br/>' . $arr[$i]['faq_ans'] . '</div></li>';
            $cnt++;
        }
        $output .= '</ol>
		</div>';
        return $output;
    }
Esempio n. 7
0
    /**
     * This function is used to send wishlist 
     *
     * .
     * 
     * @return string
     */
    function sendWishlist()
    {
        include_once 'classes/Core/CHome.php';
        include_once 'classes/Display/DUserAccount.php';
        $skin = Core_CHome::skinName();
        $userid = $_SESSION['user_id'];
        $sqlselect = "SELECT a.product_id,image,title,msrp,date_format(date_added,'%e/%c/%Y') as adate FROM `wishlist_table` a, products_table b where a.product_id=b.product_id and a.user_id=" . $userid . " order by date_added desc";
        $obj = new Bin_Query();
        $obj->executeQuery($sqlselect);
        $content = Display_DUserAccount::getWishList($obj->records);
        $fileName = "css/" . $skin . "/styles.css";
        $data = '<style type="text/css">' . implode('', file($fileName)) . "</style>";
        $result = $data . $content;
        //Get User Mail Address
        $sqlselect = "SELECT b.email FROM `users_table` a,newsletter_subscription_table b where  a.user_status=1 and a.user_id=" . $_SESSION['user_id'];
        $obj->executeQuery($sqlselect);
        $from = $obj->records[0]['email'];
        $to_addr = $_POST['txtEmail'];
        $title = $_SESSION['user'] . "Wishlsit";
        $mail_content = $result;
        include 'classes/Lib/Mail.php';
        $mail = new Lib_Mail();
        $mail->From($from);
        $mail->ReplyTo($from);
        $mail->To($to_addr);
        $mail->Subject($title);
        $mail->Body($mail_content);
        $mail->Send();
        return '<div class="alert alert-success">
		<button data-dismiss="alert" class="close" type="button">×</button>
		' . Core_CLanguage::_(MAIL_HAS_BEEN_SENT) . '
		</div>';
    }
Esempio n. 8
0
    /**
     * This function is used to update  the   user change password
     *
     * .
     * 
     * @return string
     */
    function updateChangePassword()
    {
        $pwd = $_POST['txtNPwd'];
        $obj = new Bin_Query();
        $sqlselect = "update users_table set user_pwd='" . md5($pwd) . "' where user_id=" . $_SESSION['user_id'];
        $obj->updateQuery($sqlselect);
        if ($obj->updateQuery($sqlselect)) {
            return '<div class="alert alert-success">
			<button data-dismiss="alert" class="close" type="button">×</button>
			' . Core_CLanguage::_(YOUR_PASSWORD_SUCCESSFULLY_UPDATED) . '
			</div>';
        } else {
            return '<div class="alert alert-error">
			<button data-dismiss="alert" class="close" type="button">×</button>
			' . Core_CLanguage::_(YOUR_PASSWORD_HAS_NOT_BEEN_UPDATED) . '
			</div>';
        }
    }
Esempio n. 9
0
    /**
     * This function is used to insert news letter subscription  
     *
     * .
     * 
     * @return string
     */
    function addNewsletterSubscription()
    {
        $email = $_POST['email'];
        if ($_POST['email'] == '' || $_POST['email'] == 'Your Email') {
            $output = '<div class="alert alert-error">
			<button data-dismiss="alert" class="close" type="button">×</button>
			' . Core_CLanguage::_(REQUIRED) . '
			</div>';
            return $output;
        } elseif ($_POST['email'] != '') {
            $query = new Bin_Query();
            $sql = 'select count(*) as count from newsletter_subscription_table where email="' . $email . '"';
            $query->executequery($sql);
            if ($query->records[0]['count'] > 0) {
                $output = '<div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				' . Core_CLanguage::_(SCBSCRIBE_NEWS_LETTER_ALREADY_EMAIL_EXISTS) . '
				</div>';
                return $output;
            }
            $checkemail = Core_CUserRegistration::validateEmailAddress($email);
            if ($checkemail) {
                $sql = "insert into newsletter_subscription_table(email,status) values('" . $email . "',1)";
                if ($query->updateQuery($sql)) {
                    $output = '<div class="alert alert-success">
					<button data-dismiss="alert" class="close" type="button">×</button>
					' . Core_CLanguage::_(YOUR_REQUEST_FOR_NEWLETTER_ADDED) . '
					</div>';
                    return $output;
                } else {
                    $output = '<div class="alert alert-error">
					<button data-dismiss="alert" class="close" type="button">×</button>
					' . Core_CLanguage::_(INVALID_EMAIL_FOR_NEWSLETTER) . '
					</div>';
                    return $output;
                }
            } elseif (!$checkemail) {
                $output = '<div class="alert alert-error">
					<button data-dismiss="alert" class="close" type="button">×</button>
					' . Core_CLanguage::_(INVALID_EMAIL_FOR_NEWSLETTER) . '
					</div>';
                return $output;
            }
        }
    }
Esempio n. 10
0
 /**
  * This function is used to  check and download digital product for my downloads
  *
  * @return string
  */
 function CheckDigitalProduct()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('MY_DOWNLOADS');
     $this->checkLogin();
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include_once 'classes/Core/CUserWishList.php';
     include_once 'classes/Core/CHome.php';
     include "classes/Lib/HandleErrors.php";
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     include_once 'classes/Core/CAddCart.php';
     include_once 'classes/Core/CUserOrder.php';
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     Core_CUserWishList::Ulogin($Err);
     $output['val'] = $Err->values;
     $output['msg'] = $Err->messages;
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['skinname'] = Core_CHome::skinName();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['divStat'] = Core_CUserWishList::getStatus();
     $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['userLeftMenu'] = Display_DUserRegistration::showUserLeftMenu();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     $output['lastviewedproducts'] = Core_CLastViewedProducts::lastViewedProducts();
     $output['cartcount'] = Core_CAddCart::countCart();
     $output['userRight'] = "userdashboard.html";
     $output['rows'] = Core_CUserOrder::CheckDigitalProduct($result);
     Bin_Template::createTemplate('userIndex.html', $output);
 }
Esempio n. 11
0
 /**
  * This function is used to Display the User's left Menu
  * @return string
  */
 function showUserLeftMenu()
 {
     $output = '<div class="span3">
     	<div id="block_div">
         		<h2>' . Core_CLanguage::_('MY_ACCOUNT') . '</h2>
                	 <ul class="accountlists">';
     if ($_GET['do'] == 'dashboard') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=dashboard" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_ACCOUNT') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=dashboard" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_ACCOUNT') . '</a></li>';
     }
     if ($_GET['do'] == 'accountinfo') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=accountinfo" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('ACCOUNT_INFORMATION') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=accountinfo" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('ACCOUNT_INFORMATION') . '</a></li>';
     }
     if ($_GET['do'] == 'changepassword') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=changepassword" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('CHANGE_PASSWORD') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=changepassword" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('CHANGE_PASSWORD') . '</a></li>';
     }
     if ($_GET['do'] == 'addressbook' || $_GET['do'] == 'addaddress') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=addressbook" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('ADDRESS_BOOK') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=addressbook" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('ADDRESS_BOOK') . '</a></li>';
     }
     if ($_GET['do'] == 'myorder' || $_GET['do'] == 'orderdetail') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=myorder" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_ORDER') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=myorder" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_ORDER') . '</a></li>';
     }
     if ($_GET['do'] == 'orders') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=orders" class="select"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_PRODUCT_REVIEWS') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=orders" class="unselect"><i class="icon-chevron-right"></i> ' . Core_CLanguage::_('MY_PRODUCT_REVIEWS') . '</a></li>';
     }
     if ($_GET['do'] == 'newsletter') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=newsletter" class="select"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('NEWS_SUBCRIPTIONS') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=newsletter" class="unselect"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('NEWS_SUBCRIPTIONS') . '</a></li>';
     }
     if ($_GET['do'] == 'wishlist') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=wishlist" class="select"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('MY_WISHLIST') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=wishlist" class="unselect"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('MY_WISHLIST') . '</a></li>';
     }
     if ($_GET['do'] == 'digitdown') {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=digitdown" class="select"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('MY_DOWNLOADS') . '</a></li>';
     } else {
         $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=digitdown" class="unselect"><i class="icon-circle-arrow-right"></i> ' . Core_CLanguage::_('MY_DOWNLOADS') . '</a></li>';
     }
     $output .= ' </ul>
         </div>
           </div>';
     return $output;
 }
Esempio n. 12
0
 /**
  * This function is used to Display the Keyword Search Page
  *
  * @return string
  */
 function keywordsearch()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('COMMON');
     include 'classes/Core/CFeaturedItems.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Core/CHome.php';
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Core/CWishList.php';
     include 'classes/Core/CNewProducts.php';
     include 'classes/Core/CAddCart.php';
     include 'classes/Core/CProductDetail.php';
     include 'classes/Display/DProductDetail.php';
     include 'classes/Display/DFeaturedItems.php';
     include 'classes/Display/DUserRegistration.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Display/DWishList.php';
     include 'classes/Display/DNewProducts.php';
     include 'classes/Display/DAddCart.php';
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     if ($_POST['catsel'] != "") {
         session_unregister('subcategory');
     }
     if ($_POST['catsel'] != "") {
         // store selected main category for search
         $_SESSION['category'] = $_POST['catsel'];
     }
     if ($_POST['subcatsel'] != "") {
         // store selected sub category for search
         $_SESSION['subcategory'] = $_POST['subcatsel'];
     }
     $default = new Core_CFeaturedItems();
     $output['wishlistsnapshot'] = Core_CWishList::wishlistSnapshot();
     if ($_SESSION['compareProductId'] == '') {
         $output['viewProducts']['viewProducts'] = Display_DWishList::viewProductElse();
     } else {
         $output['viewProducts'] = Core_CWishList::addtoCompareProduct();
     }
     $default = new Core_CNewProducts();
     $output['newproducts'] = $default->newProducts();
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     if (isset($_GET['search'])) {
         $search = $_GET['search'];
     } else {
         $search = $_POST['search'];
     }
     $sort = $_POST['selsort'];
     $txtsearch = $_POST['searchtxt'];
     if ($txtsearch . length > 0) {
         $search = $txtsearch;
     }
     $mode = $_POST['selmode'];
     $output['dispsubcat'] = Core_CKeywordSearch::dispSubCategory();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['keywordsearch'] = Core_CKeywordSearch::searchKeyWord($search, $sort, $mode);
     $output['cartSnapShot'] = Core_CAddCart::cartSnapShot();
     $cou = $_SESSION['countsearch'];
     $output['countrecords'] = Core_CKeywordSearch::countSearch($cou);
     $output['disppagesize'] = Display_DKeywordSearch::displayPageSize();
     $output['searchresultfor'] = Display_DKeywordSearch::searchResultFor($search);
     $output['searchsession'] = Display_DKeywordSearch::searchSession($search);
     $output['disppricerange'] = Core_CKeywordSearch::priceRange();
     $output['categorytree'] = Core_CProductDetail::showCategoryTree();
     if ($_POST['subcatsel'] != "" or $_SESSION['subcategory'] != "") {
         // store selected sub category for search
         $output['features'] = Core_CKeywordSearch::featureList();
     }
     $output['brandwithcount'] = Core_CKeywordSearch::dispBrandWithCount();
     $output['dispselection'] = Display_DKeywordSearch::displaySelection();
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['skinname'] = Core_CHome::skinName();
     $output['banner'] = Core_CHome::getBanner();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['mylink'] = Core_CKeywordSearch::linkMode();
     $output['sortby'] = Display_DKeywordSearch::sortBy();
     $output['cartcount'] = Core_CAddCart::countCart();
     Bin_Template::createTemplate('searchpage.html', $output);
 }
Esempio n. 13
0
    /**
     * This function is used to Display SiteMap
     * @param mixed $arr
     * @return string
     */
    function showMap($arr)
    {
        $output .= '<div class="row-fluid">
		<div class="title_fnt">
			<h1>' . Core_CLanguage::_('SITE_MAP') . '</h1>
			</div>
		<div class="span12">
			<div class="container">
        	<div class="row-fluid">

		<div class="span3">
                	<h3>' . Core_CLanguage::_('CATEGORIES') . '</h3>
                   <ul class="sitemap">';
        for ($i = 0; $i < count($arr); $i++) {
            $output .= '<li><a href="' . $_SESSION['base_url'] . '/index.php?do=featured&action=showmaincatlanding&maincatid=' . $arr[$i]['category_id'] . '">' . $arr[$i]['category_name'] . '</a></li>';
        }
        $output .= ' </ul>
                </div>
		
		<div class="span3">
                	<h3>' . Core_CLanguage::_('SEARCH') . '</h3>
                   <ul class="sitemap">
                    	<li><a href="' . $_SESSION['base_url'] . '/index.php?do=search&search=">' . Core_CLanguage::_('LIST_ALL_PRODUCT') . '</a></li>
			
                    </ul>
                </div>
            	<div class="span3">
                	<h3>' . Core_CLanguage::_('LIST_ALL_PRODUCT') . '</h3>
                   <ul class="sitemap">
                    	<li><a href="' . $_SESSION['base_url'] . '/index.php?do=login">' . Core_CLanguage::_('LOGIN') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=forgetpwd">' . Core_CLanguage::_('FORGOT_PASSWORD') . '</a></li>								
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=dashboard">' . Core_CLanguage::_('ACCOUNT_DASHBOARD') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=accountinfo">' . Core_CLanguage::_('ACCOUNT_INFORMATION') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=myorder">' . Core_CLanguage::_('MY_ORDERS') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=orders">' . Core_CLanguage::_('MY_PRODUCT_REVIEWS') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=newsletter">' . Core_CLanguage::_('NEWS_LETTER_SUBSCRIPTION') . '</a></li>
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=wishlist">' . Core_CLanguage::_('MY_WISHLIST') . '</a></li>
                    </ul>
                </div>

		<div class="span3">
                	<h3>' . Core_CLanguage::_('REGISTRATION') . '</h3>
                   <ul class="sitemap">
                    	<li><a href="' . $_SESSION['base_url'] . '/index.php?do=userregistration">' . Core_CLanguage::_('USER_REGISTRATION') . '</a></li>
	
                    </ul>
                </div>
	  
            </div>
		</div>
			<div class="row-fluid">

		<div class="span3">
                	<h3> ' . Core_CLanguage::_('CONNECT') . '</h3>
                   <ul class="sitemap">
			<li><a href="' . $_SESSION['base_url'] . '/index.php?do=aboutus">' . Core_CLanguage::_('ABOUT_US') . '</a></li>
				<li><a href="http://www.zeuscart.com">' . Core_CLanguage::_('ABOUT_ZEUSCART') . '</a></li>		
                    </ul>
                </div>
			<div class="span3">
				<h3> ' . Core_CLanguage::_('CUSTOMER_SERVICES') . '</h3>
			<ul class="sitemap">
				<li><a href="' . $_SESSION['base_url'] . '/index.php?do=contactus">' . Core_CLanguage::_('CONTACT_US') . '</a></li>
					<li><a href="' . $_SESSION['base_url'] . '/index.php?do=faq">' . Core_CLanguage::_('FREQUENTLY_ASKING_QUESTIONS') . '</a></li>	
			</ul>
			</div>
		</div>
		</div>
        
                </div>';
        return $output;
    }
Esempio n. 14
0
 /**
  * This function is used to display  new letter subscription  page
  *
  * @return string
  */
 function addNewsletterSubscription()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('HOME');
     include_once 'classes/Core/CFeaturedItems.php';
     include_once 'classes/Display/DFeaturedItems.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include_once 'classes/Core/CNewProducts.php';
     include_once 'classes/Display/DNewProducts.php';
     include 'classes/Core/CWishList.php';
     include 'classes/Display/DWishList.php';
     include 'classes/Core/CKeywordSearch.php';
     include 'classes/Display/DKeywordSearch.php';
     include 'classes/Core/CAddCart.php';
     include 'classes/Display/DAddCart.php';
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     $default = new Core_CFeaturedItems();
     $output['maincatimage'] = $default->showMainCategory();
     $output['allfeaturedproducts'] = $default->featuredProducts();
     $output['showBestSellingProducts'] = $default->showBestSellingProducts();
     $output['signup'] = Display_DUserRegistration::signUp();
     $default = new Core_CLastViewedProducts();
     $output['lastviewedproducts'] = $default->lastViewedProducts();
     $default = new Core_CLastViewedProducts();
     $output['lastviewedproducts'] = $default->lastViewedProducts();
     $output['cartSnapShot'] = Core_CAddCart::cartSnapShot();
     include 'classes/Core/CHome.php';
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['skinname'] = Core_CHome::skinName();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['homepageads'] = Core_CHome::showHomePageAds();
     $output['homepagecontent'] = Core_CHome::showHomePageContent();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['banner'] = Core_CHome::getBanner();
     $output['categories'] = Display_DUserRegistration::showMainCat();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footer'] = Core_CHome::footer();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
     $output['cartcount'] = Core_CAddCart::countCart();
     $default = new Core_CFeaturedItems();
     $output['maincatimage'] = $default->showMainCategory();
     $output['newarrivalproducts'] = $default->newArrivalProducts();
     if ($_SESSION['compareProductId'] == '') {
         $output['viewProducts']['viewProducts'] = Display_DWishList::viewProductElse();
     } else {
         $output['viewProducts'] = Core_CWishList::addtoCompareProduct();
     }
     $default = new Core_CNewProducts();
     $output['newproducts'] = $default->newProducts();
     if ($_SESSION['user_id'] != '') {
         $output['wishlistsnapshot'] = Core_CWishList::snapshotForHome();
     }
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['slideshow'] = Core_CUserRegistration::viewSlideShow();
     $output['slideshowparameter'] = Core_CUserRegistration::getSlideShowParameter();
     $output['newsletter'] = Core_CUserRegistration::addNewsletterSubscription();
     Bin_Template::createTemplate('index.html', $output);
 }
Esempio n. 15
0
    /**
     * This function is used to delete  the   address for user after login
     *
     * .
     * 
     * @return string
     */
    function delAddress()
    {
        $userid = $_SESSION['user_id'];
        $sql = "delete from addressbook_table where user_id='" . $userid . "' and contact_name='" . $_GET['id'] . "'";
        $query = new Bin_Query();
        $query->executeQuery($sql);
        return '<div class="alert alert-success">
			<button data-dismiss="alert" class="close" type="button">×</button>
			' . Core_CLanguage::_(YOUR_CONTACT_SUCCESSFULLY_DELETED) . '
			</div>';
    }
Esempio n. 16
0
 /**
  * Function checks the  user register page in checkout process  and assign an error
  * 
  *
  * @return void 
  */
 function validateQuickReg()
 {
     $message = Core_CLanguage::_('REQUIRED');
     $this->Assign("txtregemail", trim($_POST['txtregemail']), "noempty", $message);
     $this->Assign("txtregpass", trim($_POST['txtregpass']), "noempty", $message);
     //$this->Assign("txtcaptcha",trim($_POST['txtcaptcha']),"noempty",$message);
     if ($_POST['txtregpass'] != '') {
         $pwdlength = strlen($_POST['txtregpass']);
         if ($pwdlength < 6) {
             $message = Core_CLanguage::_('PASSWORD_MINIMUM');
             $this->Assign("txtregpass", "", "noempty", $message);
         }
     }
     if (trim($_POST['txtregemail']) != '') {
         $message = Core_CLanguage::_('INVALID_EMAIL');
         $this->Assign("txtregemail", trim($_POST['txtregemail']), "emailcheck", $message);
     }
     // 		$message = "Characters should match the above image";
     // 		$code = $_SESSION['security_code'];
     // 		if(!empty($_POST['txtcaptcha']) && !(strtolower(trim($_POST['txtcaptcha']))==strtolower($code)))
     // 				$this->Assign("txtcaptcha","","noempty",$message);
     $useremail = $_POST['txtregemail'];
     $pswd = $_POST['txtregpass'];
     $pswd = md5($pswd);
     if (trim($useremail) != '' and trim($pswd) != '') {
         $sqlselect = "select * from users_table where user_email='" . $useremail . "' and user_status=1";
         $obj1 = new Bin_Query();
         $obj2 = new Bin_Query();
         if ($obj1->executeQuery($sqlselect)) {
             $sql = "select count(*) as temp from users_table where user_email='" . $useremail . "' and user_pwd='" . $pswd . "' and user_status=1";
             $obj2->executeQuery($sql);
             if ($obj2->records[0]['temp'] == 0) {
                 $message = Core_CLanguage::_('INVALID_PASWORD');
                 $this->Assign("txtregpass", '', "noempty", $message);
             } else {
                 $_SESSION['user_id'] = $obj1->records[0]['user_id'];
                 $_SESSION['user_name'] = $obj1->records[0]['user_display_name'];
                 $_SESSION['user_email'] = $obj1->records[0]['user_email'];
                 if ($_POST['remlogin'] == "on") {
                     setcookie("usremail", $_POST['txtregemail']);
                 } else {
                     unset($_COOKIE['usremail']);
                 }
             }
         } else {
             unset($_COOKIE['usremail']);
             $message = Core_CLanguage::_('INVALID_EMAIL');
             $this->Assign("txtregemail", '', "noempty", $message);
         }
     }
     $this->PerformValidation('' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showquickregistration');
 }
Esempio n. 17
0
    /**
     * This function is used to Display the Contact Us Form
     * @param mixed $Err
     * @return string
     */
    function showContactUs($Err)
    {
        if ($Err->messages > 0) {
            $output['val'] = $Err->values;
            $output['msg'] = $Err->messages;
        }
        $out = '<div id="myaccount_div">
		<form class="form-horizontal"  name="contactus" action="' . $_SESSION['base_url'] . '/index.php?do=contactus&action=validatecontactus" method="post">

            <div class="control-group">
              <label for="inputEmail" class="control-label">' . Core_CLanguage::_('NAME') . '<i class="red_fnt">*</i></label>
              <div class="controls">
		<input type="text" name="txtname" maxlength="40"  value="' . $output['val']['txtname'] . '"/>
		<font color="red">' . $output['msg']['txtname'] . '</font>
              </div>
            </div>
            <div class="control-group">
              <label for="inputPassword" class="control-label">' . Core_CLanguage::_('EMAIL_ADDRESS') . '<i class="red_fnt">*</i></label>
              <div class="controls">
                <input type="text" name="email" maxlength="40"  value="' . $output['val']['email'] . '"/>
		  <font color="red">' . $output['msg']['email'] . '</font>
              </div>
            </div>
            <div class="control-group">
              <label for="inputPassword" class="control-label">' . Core_CLanguage::_('ENQUIRY') . '</label>
              <div class="controls">
               <textarea rows="10" cols="35" name="comment" style="width: 211px; height: 93px;"></textarea>
              </div>
            </div>
       

          
            <div class="control-group">
              <div class="controls">
                <button class="btn btn-danger" type="submit">' . Core_CLanguage::_('SUBMIT') . '</button>
              </div>
            </div>
          </form>           </div>';
        return $out;
    }
Esempio n. 18
0
    /**
     * This function is used to list the product in  grid and noraml format based on brand
     * @param mixed $records
     * @param int $paging
     * @param int $prev
     * @param int $next	
     * @param int $val
     * @return string
     */
    function viewBrandsList($records, $paging, $prev, $next, $val)
    {
        if ($_GET['action'] == '') {
            $output = '<ul class="productlists">';
            if (count($records) > 0) {
                for ($i = 0; $i < count($records); $i++) {
                    $output .= '<li><form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '">
                    	
						<div id="listproduct">';
                    if ($records[$i]['product_status'] == 1) {
                        $output .= '<div class="ribbion_div"><img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/new.png" alt="new" /></div> ';
                    } elseif ($records[$i]['product_status'] == 2) {
                        $output .= '<div class="ribbion_div"><img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/sale.png" alt="sale" /> </div>';
                    }
                    $output .= '<div class="productimg"><a href="?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '"><img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $records[$i]['large_image_path'] . '&h=150&w=150&zc=0&s=1&f=4,11&q=100&ct=1" alt="' . $records[$i]['title'] . '"> 
						</a></div>
						<div class="description_div"><h3><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '">' . $records[$i]['title'] . '</a></h3>
						' . trim($records[$i]['description']) . '
						</div>
						<div class="dollar_div">
							<h1>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $records[$i]['msrp'] . '</h1>
						<input type="hidden" name="addtocart">';
                    $sql = "SELECT * FROM product_inventory_table WHERE product_id='" . $records[$i]['product_id'] . "'";
                    $obj = new Bin_Query();
                    $obj->executeQuery($sql);
                    $recordssoh = $obj->records;
                    if ($recordssoh[0]['soh'] > 0) {
                        $output .= '<button class="add_btn" type="submit" ></button>';
                    }
                    $output .= '</div>
						<div class="clear"></div>
							</div>
						</form></li>';
                }
            } else {
                $output .= '<div class="alert alert-info">
			<button data-dismiss="alert" class="close" type="button">×</button>
			<strong>' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</strong> 
			</div>';
            }
            $output .= '</ul>';
        } elseif ($_GET['action'] == 'grid') {
            $output = '<ul class="nolist">';
            if (count($records) > 0) {
                for ($i = 0; $i < count($records); $i++) {
                    $output .= '<li class="bags"><form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '">
					';
                    if ($records[$i]['product_status'] == 1) {
                        $output .= '<div class="ribbion_div"> <img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/new.png" alt="new"></div>';
                    } elseif ($records[$i]['product_status'] == 2) {
                        $output .= '<div class="ribbion_div"> <img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/sale.png" alt="sale"/></div>';
                    }
                    $output .= '<div class="galleryImage"><img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $records[$i]['image'] . '&a=r&h=280&amp;w=235&zc=0&s=1&f=4,11&q=100&ct=1&a=tl" alt="' . $row['title'] . '">

					<div class="info">  
					<h2>' . $records[$i]['title'] . '</h2>
					
					' . trim($records[$i]['description']) . '
					
					<h4>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $records[$i]['msrp'] . '</h4>
					<input type="hidden" name="addtocart">';
                    $sql = "SELECT * FROM product_inventory_table WHERE product_id='" . $records[$i]['product_id'] . "'";
                    $obj = new Bin_Query();
                    $obj->executeQuery($sql);
                    $recordssoh = $obj->records;
                    if ($recordssoh[0]['soh'] > 0) {
                        $output .= '<button class="add_btn" type="submit" ></button>';
                    }
                    $output .= '</div>
					</div>
					</form></li>';
                }
                $output .= '</ul>	</div></div>';
            } else {
                $output .= '<div class="alert alert-info">
			<button data-dismiss="alert" class="close" type="button">×</button>
			<strong>' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</strong> 
			</div></div></div>';
            }
        }
        $output .= '<div class="pagination">
			<ul>';
        if ($prev != '') {
            $output .= '<li> ' . $prev . ' </li>';
        }
        for ($i = 1; $i <= count($paging); $i++) {
            $output .= '<li>' . $paging[$i] . '</li>';
        }
        if ($next != '') {
            $output .= '<li>' . $next . '</li>';
        }
        $output .= '</ul>
			</div>';
        return $output;
    }
Esempio n. 19
0
 /**
  * This function is used to Display the Extended Searched Result
  * @param mixed $result
  * @param int $mode	
  * @param int $paging
  * @param int $prev
  * @param int $next	
  * @return string
  */
 function extendedSearch($result, $mode, $paging, $prev, $next)
 {
     $mode = $_POST['viewMode'];
     if (!empty($mode)) {
         $_SESSION['mode'] = $mode;
     } elseif (empty($_SESSION['mode'])) {
         $mode = 'grid';
     } else {
         $mode = 'list';
     }
     if ($mode == 'grid') {
         $output = "<table cellpadding='0' cellspacing='2' border='0' width='100%'><tr>";
         $i = 0;
         if (count($result) > 0) {
             foreach ($result as $row) {
                 $product_id = $row['product_id'];
                 $sku = $row['sku'];
                 $title = $row['title'];
                 $description = $row['description'];
                 $brand = $row['brand'];
                 if (strlen($brand) > 15) {
                     $brand = substr($brand, 0, 15) . "..";
                 }
                 $msrp = $row['msrp'];
                 $weight = $row['weight'];
                 $dimension = $row['dimension'];
                 $thumb_image = $row['thumb_image'];
                 if (!file_exists($thumb_image)) {
                     $thumb_image = 'images/noimage1.jpg';
                 }
                 $image = $row['image'];
                 if (!file_exists($image)) {
                     $image = 'images/noimage1.jpg';
                 }
                 $shipping_cost = $row['shipping_cost'];
                 $status = $row['status'];
                 $tag = $row['tag'];
                 $pat = "images/products/";
                 $rcount = $row['rcount'];
                 $rating = ceil($row['rating']);
                 $ratepath = '';
                 for ($r1 = 0; $r1 < 5; $r1++) {
                     if ($r1 < $rating) {
                         $ratepath .= '<img src="images/starf.png">';
                     } else {
                         $ratepath .= '<img src="images/stare.png">';
                     }
                 }
                 if ($i != 3) {
                     $output .= '<td  id=product_tbbg><table width="95%" border="0" align="left" cellpadding="2" cellspacing="2"><tr><td align="left"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0"><img src="' . $thumb_image . '" width="90"  border="0"/></td></tr><tr><td class="text" align="left"><a href="?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0">' . $title . '<br />Brand : ' . $brand . '<br />Model : ' . $model . '</a></td></tr><tr><td align="left" class="rate_text">  ' . $msrp . '</td></tr><tr><td align="left"><a href="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $product_id . '"><img src="images/addtocart.jpg" border="0" /></a></td></tr><tr><td align="left" class="addtowishlist" ><a href="' . $_SESSION['base_url'] . '/index.php?do=wishlist&action=viewWishList&id=' . $product_id . '">Add to Wishlist</a> </td></tr><tr><td align="left" class="addtocompare"><a href="' . $_SESSION['base_url'] . '/index.php?do=compareproduct&action=addtocompareproduct&prodid=' . $product_id . '">Add to Compare</a></td></tr><tr><td align="left" class="addtocompare"><img src="css/themes/default/compareprice.jpg" /></td></tr></table><td>';
                 } elseif ($i == 3) {
                     $output .= '</tr><tr><td><table width="95%" border="0" align="left" cellpadding="2" cellspacing="2"><tr><td align="left"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0"><img src="' . $thumb_image . '" width="90"  border="0"/></td></tr><tr><td class="text"><a href="?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0">' . $title . '<br />Brand : ' . $brand . '<br />Model : ' . $model . '</a></td></tr><tr><td align="left" class="rate_text">  ' . $msrp . '</td></tr><tr><td align="left"><a href="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $product_id . '"><img src="images/addtocart.jpg" border="0" /></a></td></tr><tr><td align="left" class="addtowishlist" style="padding-left:40px" ><a href="?do=wishlist&action=viewWishList&id=' . $product_id . '">Add to Wishlist</a> </td></tr><tr><td align="left" class="addtocompare"><a href="' . $_SESSION['base_url'] . '/index.php?do=compareproduct&action=addtocompareproduct&prodid=' . $product_id . '">Add to Compare</a></td></tr><tr><td align="left" class="addtocompare"><img src="css/themes/default/compareprice.jpg" /></td></tr></table><td>';
                     $i = 0;
                 }
                 $i++;
             }
             $output .= "</table>";
             $output .= "<table cellpadding='3' cellspacing='0' border='0' width='100%'>";
             $output .= '<tr><td align="right" class="content_list_footer" >' . ' ' . $prev . ' ';
             for ($im = 1; $im <= count($paging); $im++) {
                 $pagingvalues .= $paging[$im] . "  ";
             }
             $output .= $pagingvalues . ' ' . $next . '</td></tr></table>';
         } else {
             $output = '<div class="exe_msgbox">' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</div>';
         }
         return $output;
     } else {
         $output = "<table cellpadding='3' cellspacing='0' border='0' width='100%'><tr>";
         $i = 0;
         if (count($result) > 0) {
             foreach ($result as $row) {
                 $product_id = $row['product_id'];
                 $sku = $row['sku'];
                 $title = $row['title'];
                 if (strlen($title) > 25) {
                     $title = substr($title, 0, 25) . "..";
                 }
                 $description = $row['description'];
                 $brand = $row['brand'];
                 if (strlen($brand) > 25) {
                     $brand = substr($brand, 0, 25) . "..";
                 }
                 $msrp = $row['msrp'];
                 $weight = $row['weight'];
                 $dimension = $row['dimension'];
                 $thumb_image = $row['thumb_image'];
                 if (!file_exists($thumb_image)) {
                     $thumb_image = 'images/noimage.jpg';
                 }
                 $image = $row['image'];
                 if (!file_exists($image)) {
                     $image = 'images/noimage.jpg';
                 }
                 $shipping_cost = $row['shipping_cost'];
                 $status = $row['status'];
                 $tag = $row['tag'];
                 $pat = "images/products/";
                 $output .= '<tr><td><table width="95%" border="0" align="left" cellpadding="0" cellspacing="0"><tr><td width="17%"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0"><img src="' . $thumb_image . '" width="90" border="0"/></td><td width="30%"><table width="95%" border="0"   style="padding-left:40px"  align="left" cellpadding="2" cellspacing="2"><tr><td class="text"><a href="#">' . $title . '<br /></a></td></tr><tr><td align="left" class="rate_text">  ' . $msrp . '</td></tr><tr><td align="left"><a href="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $product_id . '"><img src="images/addtocart.jpg" border="0" /></a></td></tr></table></td><td width="33%"><table width="95%" border="0" align="left" cellpadding="2" cellspacing="2"><tr><td class="text"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $product_id . '" border="0">' . $title . '<br />Brand : ' . $brand . ' <br />Model : ' . $model . '</a></td></tr></table></td><td width="20%" ><img src="css/themes/default/compareprice.jpg" />	</td></tr><tr><td></td><td class="addtowishlist" style="padding-left:40px" ><a href="' . $_SESSION['base_url'] . '/index.php?do=wishlist&action=viewWishList&id=' . $product_id . '">Add to Wishlist</a></td><td class="addtocompare"><a href="' . $_SESSION['base_url'] . '/index.php?do=compareproduct&action=addtocompareproduct&prodid=' . $product_id . '">Add to Compare</a></td><td></td></tr></table></td></tr> <tr><td class="line"></td></tr>';
             }
             $output .= "</table>";
             $output .= "<table cellpadding='3' cellspacing='0' border='0' width='100%'>";
             $output .= '<tr align="center"><td   class="content_list_footer" >' . ' ' . $prev . ' ';
             for ($im = 1; $im <= count($paging); $im++) {
                 $pagingvalues .= $paging[$im] . "  ";
             }
             $output .= $pagingvalues . ' ' . $next . '</td></tr></table>';
         } else {
             $output = '<div class="exc_msgbox">' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</div>';
         }
         return $output;
     }
 }
Esempio n. 20
0
    /**
     * This function is used to get the pop up  of image of product 
     * @param array $arr
     * @param string $rating
     * @return string
     */
    function showPopupProducts($arr, $rating)
    {
        $output = '
			<button class="close" data-dismiss="modal" data-target="#myModal">×</button>
			<div class="container">
			<h2><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $arr[0]['product_id'] . '" target="_parent">' . $arr[0]['title'] . '</h2></a>';
        $output .= '<div>&nbsp;</div>
			<div class="row-fluid">
			
			<div class="span6"  style="width: 30%;">
			<img src="' . $_SESSION['base_url'] . '/' . $arr[0]['image'] . '"  title="' . $arr[0]['title'] . '" ></div>';
        $output .= '<div class="span6">
				<div class="gallery_detail" style="width: 85%;">
				
				<ul class="detaillist">';
        if ($arr[0]['product_status'] == 1) {
            $output .= '<div class="ribbion_newtag_div"></div>';
        } elseif ($arr[0]['product_status'] == 2) {
            $output .= '<div class="ribbion_saletag_div"></div>';
        }
        $output .= '<li>' . $rating . '</li>
				<li><table width="100%" border="0">

		
		<tr>
		<td align="left" valign="top">';
        if ($arr[0]['soh'] > 0) {
            $output .= '<span>' . Core_CLanguage::_(AVALABILITY) . ': ' . Core_CLanguage::_(IN_STOCK) . '</span>';
        } else {
            $output .= '<span>' . Core_CLanguage::_(AVALABILITY) . ' :  ' . Core_CLanguage::_(OUT_OF_STOCK) . '</span>';
        }
        $output .= '</td>
		<td align="left" valign="top"><h1>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $arr[0]['msrp'] . '</h1></td>
		</tr>
		</table></li>
		<li><h2>' . Core_CLanguage::_(QUICK_OVERVIEW) . '</h2><p>This midi dress has been made from stretch jersey. The details include: a scoop neckline and sleeveless styling with an open back and latticed deatiling. The dress has been cut with a bodycon fit.</p></li>
		<li><form method="post"	action="' . $_SESSION['base_url'] . '/index.php?do=addtocartfromproductdetail&prodid=' . $arr[0]['product_id'] . '" name="frmcart" target="_parent">
		<table width="100%" border="0">
		<tr>
		<td align="left" valign="top"> ' . Core_CLanguage::_(QUANTITY) . ' ';
        $output .= '<select name="qty[]" style="width:60px;">';
        if ($arr[0]['soh'] == 0) {
            $output .= '<option value="0">0</option>';
        }
        for ($s = 1; $s <= $arr[0]['soh']; $s++) {
            $output .= '<option value="' . $s . '">' . $s . '</option>';
        }
        $output .= '</select></td>';
        $output .= '<td align="left" valign="top"><button type="submit" class="add_btn" title="' . Core_CLanguage::_('ADD_TO_CART') . '"><p style="margin-left:38px;top:5px">' . Core_CLanguage::_('ADD_TO_CART') . '</p></button></td>';
        $output .= '</tr>
		</table>
		</form>
		</li>
		</ul>
		</div>
		</div>
		
		</div>
		<div class="clear"></div>
		</div>';
        return $output;
        return $output;
    }
Esempio n. 21
0
 /**
  * This function is used to Display the pop up  of image of product 
  *
  * @return string
  */
 function showPopupProducts()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('PRODUCT_DETAILS');
     include_once 'classes/Core/CProductDetail.php';
     include_once 'classes/Display/DProductDetail.php';
     echo $output['popproduct'] = Core_CProductDetail::showPopupProducts();
 }
Esempio n. 22
0
    /**
     * This function is used to Display the Best Selling Product
     * @param mixed $arr
     * @return string
     */
    function showBestSellingProducts($arr)
    {
        $output = '
		<div class="quickview_border" style="margin-top:14px;" >
		<div class="heading1"><span class="headingTXT">Best Selling Products</span></div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-left:10px;padding-top:10px;padding-bottom:10px;padding-right:10px;">';
        $i = 0;
        if (count($arr) > 0) {
            while ($i < count($arr)) {
                if ($i % 2 == 0) {
                    $output .= '<tr>';
                }
                $style[0] = 'background:url(images/bg_line1.gif) repeat-y right';
                $style[1] = '';
                $style[2] = 'background:url(images/bg_line1.gif) repeat-y right';
                $output .= '<td  style="' . $style[1] . '"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
				  <td width="43%" valign=top><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $arr[$i]['product_id'] . '"><img src="' . (file_exists($arr[$i]['thumb_image']) ? $arr[$i]['thumb_image'] : 'images/noimage1.jpg') . '" alt="' . addslashes($arr[$i]['title']) . '" width="' . THUMB_WIDTH . '" border=0/></a></td>
				  <td width="57%" valign="top" class="bestsellingTXT"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $arr[$i]['product_id'] . '">' . (strlen($arr[$i]['title']) > 15 ? substr($arr[$i]['title'], 0, 15) . '...' : $arr[$i]['title']) . '</a><br><br /><span class="featurePRICE">' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . number_format($_SESSION['currencysetting']['selected_currency_settings']['conversion_rate'] * $arr[$i]['msrp'], 2) . '</span>
					<br /><br>
					See all <span><!--<a href="' . $_SESSION['base_url'] . '/index.php?do=featured&action=showmaincatlanding&maincatid=' . $arr[$i]['category_id'] . '">' . $arr[$i]['category_name'] . '</a>-->
					<a href="' . $_SESSION['base_url'] . '/index.php?do=featured&action=showfeaturedproduct&subcatid=' . $arr[$i]['category_id'] . '">' . $arr[$i]['category_name'] . '</a></span></td>
				</tr>
				
				  </table></td>';
                if ($i % 2 != 0 || empty($arr[$i + 1]['product_id'])) {
                    if (empty($arr[$i + 1]['product_id'])) {
                        $output .= '<td>&nbsp;</td>';
                    }
                    $output .= '</tr> ';
                }
                if ($i == 1) {
                    $output .= '<tr>
				<td colspan="2" class="dot_line">&nbsp;</td>
				</tr>';
                }
                $i++;
            }
        } else {
            $output = '<tr><td><b>' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</b></td></tr>';
        }
        $output .= ' </table></div>';
        return $output;
    }
Esempio n. 23
0
    /**
     * This function is used When the product in list format 
     * @param mixed $records
     * @param int $paging
     * @param int $prev
     * @param int $next	
     * @param int $val
     * @return string
     */
    function viewProducts($records, $paging, $prev, $next, $val)
    {
        if ($_GET['do'] == 'viewproducts' || $_GET['do'] == 'giftproducts') {
            $output = '<ul class="productlists">';
            if (count($records) > 0) {
                for ($i = 0; $i < count($records); $i++) {
                    $removal = array("rn");
                    $desc = str_replace($removal, "", trim($records[$i]['description']));
                    $output .= '<li>';
                    if ($records[$i]['gift'] == '1') {
                        $output .= '<form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '">';
                    } else {
                        $output .= '<form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '">';
                    }
                    $output .= '<div class="span3"><div class="productimg">';
                    if ($records[$i]['product_status'] == 1) {
                        $output .= '<span class="ribbion_div"><img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/new.png" alt="new" /></span> ';
                    } elseif ($records[$i]['product_status'] == 2) {
                        $output .= '<span class="ribbion_div"><img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/sale.png" alt="sale" /> </span>';
                    }
                    $output .= '<div class="productlisting"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '"><img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $records[$i]['large_image_path'] . '&h=235&w=235&zc=0&s=1&f=4,11&q=100&ct=1" alt="' . $records[$i]['title'] . '"> 
						</a></div></div></div>
						<div class="span6"><div class="description_div"><h3><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '">' . $records[$i]['title'] . '</a></h3>

						  <p>' . $desc . '</p>
						</div></div>
						 <div class="span3"><div class="dollar_div">
							<h1>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $records[$i]['msrp'] . '</h1>
						<input type="hidden" name="addtocart">';
                    $sql = "SELECT * FROM product_inventory_table WHERE product_id='" . $records[$i]['product_id'] . "'";
                    $obj = new Bin_Query();
                    $obj->executeQuery($sql);
                    $recordssoh = $obj->records;
                    $output .= '<button class="add_btn" type="submit" ><p style="margin-left:25%">' . Core_CLanguage::_(ADD_TO_CART) . '</p></button>';
                    $output .= '</div></div>
						<div class="clear"></div>
							
						</form></li>';
                }
            } else {
                $output .= '<div class="alert alert-info">
			<button data-dismiss="alert" class="close" type="button">×</button>
			<strong>' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</strong> 
			</div>';
            }
            $output .= '</ul>';
        } elseif ($_GET['do'] == 'girdviewproducts' || $_GET['do'] == 'girdgiftproducts') {
            $output = '  <span class="visible-desktop">
           			   <div class="selecter">			
				  <div class="selecterContent">	<ul class="nolist">';
            if (count($records) > 0) {
                for ($i = 0; $i < count($records); $i++) {
                    $output .= '<li class="bags">';
                    if ($records[$i]['gift'] == '1') {
                        $output .= '<form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '">';
                    } else {
                        $output .= '<form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '">';
                    }
                    $output .= '<form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '">';
                    if ($records[$i]['product_status'] == 1) {
                        $output .= '<div class="ribbion_div"> <img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/new.png" alt="new"></div>';
                    } elseif ($records[$i]['product_status'] == 2) {
                        $output .= '<div class="ribbion_div"> <img src="' . $_SESSION['base_url'] . '/assets/img/ribbion/sale.png" alt="sale"/></div>';
                    }
                    $output .= '<div class="galleryImage"><a href="' . $_SESSION['base_url'] . '/index.php?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '"><img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $records[$i]['image'] . '&a=r&h=280&amp;w=235&zc=0&s=1&f=4,11&q=100&ct=1&a=tl" alt="' . $row['title'] . '"></a>

					<div class="info">  
					<h2>' . substr(trim($records[$i]['title']), '0', '15') . '</h2>
					
				
					
					<h4>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $records[$i]['msrp'] . '</h4>
					<input type="hidden" name="addtocart">';
                    $sql = "SELECT * FROM product_inventory_table WHERE product_id='" . $records[$i]['product_id'] . "'";
                    $obj = new Bin_Query();
                    $obj->executeQuery($sql);
                    $recordssoh = $obj->records;
                    $output .= '<button class="add_btn" type="submit" ><p style="margin-left:25%">' . Core_CLanguage::_(ADD_TO_CART) . '</p></button>';
                    $output .= '</div>
					</div>
					</form></li>';
                }
                $output .= '</ul>	</div></div>   </span>';
                $output .= '<span class="hidden-desktop">
        		<div class="row-fluid">';
                if (count($records) > 0) {
                    for ($i = 0; $i < count($records); $i++) {
                        $output .= '<div class="span3"><form name="product" method="post" action="' . $_SESSION['base_url'] . '/index.php?do=addtocart&prodid=' . $records[$i]['product_id'] . '"><div id="gallery_image">
   					<a href="?do=prodetail&action=showprod&prodid=' . $records[$i]['product_id'] . '"><img src="' . $_SESSION['base_url'] . '/timthumb/timthumb.php?src=' . $_SESSION['base_url'] . '/' . $records[$i]['image'] . '&a=r&h=500&amp;w=500&zc=0&s=1&f=4,11&q=100&ct=1&a=tl" alt="' . $row['title'] . '"></a>
					<div class="info">  
					<h2>' . $records[$i]['title'] . '</h2>
					
					' . trim($records[$i]['description']) . '
					
					<h4>' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . $records[$i]['msrp'] . '</h4>';
                        $sql = "SELECT * FROM product_inventory_table WHERE product_id='" . $records[$i]['product_id'] . "'";
                        $obj = new Bin_Query();
                        $obj->executeQuery($sql);
                        $recordssoh = $obj->records;
                        $output .= '<button class="add_btn" type="submit" ><p style="margin-left:25%">' . Core_CLanguage::_(ADD_TO_CART) . '</p></button>';
                        $output .= '</div><input type="hidden" name="addtocart">
					</div></form></div>';
                    }
                }
                $output .= '</div> </span>';
            } else {
                $output .= '<div class="alert alert-info">
			<button data-dismiss="alert" class="close" type="button">×</button>
			<strong>' . Core_CLanguage::_(NO_PRODUCT_FOUND) . '</strong> 
			</div></div></div>';
            }
        }
        $output .= '<div class="pagination">
			<ul>';
        if ($prev != '') {
            $output .= '<li> ' . $prev . ' </li>';
        }
        for ($i = 1; $i <= count($paging); $i++) {
            $output .= '<li>' . $paging[$i] . '</li>';
        }
        if ($next != '') {
            $output .= '<li>' . $next . '</li>';
        }
        $output .= '</ul>
			</div>';
        return $output;
    }
Esempio n. 24
0
    /**
     * This function is used to get product   redeem  coupon from db.
     * @param array $arr
     * 
     * 
     * @return string
     */
    function redeemCoupon($arr)
    {
        if (!empty($arr)) {
            $sql_coupon_categories = "SELECT category_id FROM coupon_category_table WHERE coupon_code='" . $arr['coupon_code'] . "'";
            $query_coupon_categories = new Bin_Query();
            if ($rows = $query_coupon_categories->executeQuery($sql_coupon_categories)) {
                foreach ($query_coupon_categories->records as $res) {
                    $category_ids[] = $res['category_id'];
                }
                $default = new Core_CAddCart();
                $cartdata = $default->getCartData();
                if (!empty($cartdata)) {
                    $cartflag = 0;
                    $sucessflag = 0;
                    foreach ($cartdata as $data) {
                        $cart_categoryid = $default->getCategoryIdByProductId($data['product_id']);
                        for ($i1 = 0; $i1 < count($category_ids); $i1++) {
                            if ($category_ids[$i1] == $cart_categoryid) {
                                if ($arr['discount_type'] == 'percent') {
                                    $redeem_price = $data['msrp'] - $data['msrp'] * ($arr['discount_amt'] / 100);
                                } else {
                                    $redeem_price = $data['msrp'] - $arr['discount_amt'];
                                }
                                $update_amt_sql = "UPDATE shopping_cart_products_table SET product_unit_price=" . $redeem_price . " WHERE cart_id=" . $data['cart_id'] . " and product_id='" . $data['product_id'] . "'";
                                $update_coupon_sql = "UPDATE coupon_user_relation_table SET no_of_uses=no_of_uses+1 WHERE coupon_code='" . $arr['coupon_code'] . "' AND user_id=" . $_SESSION['user_id'];
                                $update_amt_query = new Bin_Query();
                                if ($update_amt_query->updateQuery($update_amt_sql)) {
                                    $update_coupon_query = new Bin_Query();
                                    if ($update_coupon_query->updateQuery($update_coupon_sql)) {
                                        $output = '<div class="alert alert-success">
										<button data-dismiss="alert" class="close" type="button">×</button>
										' . Core_CLanguage::_(COUPON_REDEEMED_SUCCESSFULLY) . '
										</div>';
                                    }
                                }
                            }
                            $cartflag = 1;
                        }
                    }
                    if ($cartflag == 0) {
                        return $output = '<div class="alert alert-info">
						<button data-dismiss="alert" class="close" type="button">×</button>
						' . Core_CLanguage::_(NO_CATEGORIES_IN_YOUR_CART_MATCHES_WITH_THE_COUPON_CATEGORIES) . '
						</div>';
                    } else {
                        return $output;
                    }
                }
            } else {
                return $output = '<div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				' . Core_CLanguage::_(NO_CATEGORIES_ARE_APPLICABLE_FOR_THE_COUPON) . '
				</div>';
            }
        }
    }
Esempio n. 25
0
    /**
     * This function is used to download  the  digital product  
     *
     * .
     * 
     * @return string
     */
    function CheckDigitalProduct()
    {
        $orderid = (int) $_GET['rid'];
        $productid = (int) $_GET['pid'];
        $userid = $_SESSION['user_id'];
        $sql = "select * from orders_table where orders_id=" . $orderid . " and date_add(date_purchased,INTERVAL 7 DAY)>=curdate() and customers_id=" . $userid;
        $obj = new Bin_Query();
        if ($obj->executeQuery($sql)) {
            $sql1 = "select * from order_products_table where order_id=" . $orderid . " and product_id=" . $productid;
            if ($obj->executeQuery($sql1)) {
                $sql2 = "select digital_product_path from products_table where digital=1 and product_id=" . $productid;
                $obj->executeQuery($sql2);
                $downurl = "Location:admin/" . $obj->records[0]['digital_product_path'];
                header($downurl);
                exit;
            } else {
                $_SESSION['errmsg'] = '<div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				<strong>' . Core_CLanguage::_(YOU_CANNOT_DOWNLOAD_THIS_PRODUCT) . '</strong> 
				</div>';
                header('Location:?do=digitdown');
                exit;
            }
        } else {
            $_SESSION['errmsg'] = '<div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				<strong>' . Core_CLanguage::_(YOU_CANNOT_DOWNLOAD_THIS_PRODUCT) . '</strong> 
				</div>';
            header('Location:?do=digitdown');
            exit;
        }
    }
Esempio n. 26
0
 /**
  * This function is used to Display the about us Page
  *
  * @return string
  */
 function aboutUs()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('CMS');
     include 'classes/Core/CFooterLinks.php';
     include 'classes/Display/DFooterLinks.php';
     include 'classes/Core/CHome.php';
     include 'classes/Core/CUserRegistration.php';
     include 'classes/Display/DUserRegistration.php';
     include_once 'classes/Core/CLastViewedProducts.php';
     include_once 'classes/Display/DLastViewedProducts.php';
     include 'classes/Core/CNews.php';
     include 'classes/Display/DNews.php';
     include 'classes/Core/CProductDetail.php';
     include 'classes/Display/DProductDetail.php';
     include 'classes/Core/CAddCart.php';
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     $output['timezone'] = Core_CHome::setTimeZone();
     $output['currentDate'] = date('D,M d,Y - h:i A');
     $output['categories'] = Display_DUserRegistration::showMainCat();
     $default = new Core_CLastViewedProducts();
     $output['lastviewedproducts'] = $default->lastViewedProducts();
     $output['sitelogo'] = Core_CHome::getLogo();
     $output['pagetitle'] = Core_CHome::pageTitle();
     $output['skinname'] = Core_CHome::skinName();
     $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
     $output['googlead'] = Core_CHome::getGoogleAd();
     $output['footerconnect'] = Core_CHome::getfooterconnect();
     $output['sociallink'] = Core_CHome::showSocialLinks();
     $output['terms'] = Core_CFooterLinks::termsCondition();
     $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
     $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
     $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
     $output['headertext'] = Core_CUserRegistration::showHeaderText();
     $output['loginStatus'] = Core_CUserRegistration::loginStatus();
     $output['aboutus'] = Core_CFooterLinks::aboutUs();
     $output['newstitle'] = Core_CNews::showNewsMenu();
     $output['cartcount'] = Core_CAddCart::countCart();
     $output['categorytree'] = Core_CProductDetail::showCategoryTree();
     $output['cartcount'] = Core_CAddCart::countCart();
     Bin_Template::createTemplate('aboutus.html', $output);
 }
Esempio n. 27
0
    /**
     * This function is used to show the order confirmation.
     * @param   array  	$onlinearr	 
     * @param array 	$offlinearr
     * @param string  $domain
     *
     * @return string
     */
    function displayPaymentGateways($onlinearr, $offlinearr, $domain)
    {
        $output = '<div class="row-fluid">
        	<ul class="steps">';
        if ($_SESSION['user_id'] != '') {
            $output .= '<li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=accountinfo&vid=' . $_GET['vid'] . '"><span>1. ' . Core_CLanguage::_(MY_ACCOUNT) . '</span></a></li>';
        } else {
            $output .= '<li class="inact"><a href="#"><span>1. ' . Core_CLanguage::_(EMAIL_LOGIN) . '</span></a></li>';
        }
        if ($_GET['vid'] == '') {
            $output .= '<li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=getaddressdetails"><span>2. ' . Core_CLanguage::_(SHIPPING_ADDRESS) . '</span></a></li>
			<li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=getshippingaddressdetails&chk=0"><span>3. ' . Core_CLanguage::_(SHIPPING_ADDRESS) . '</span></a></li>
			<li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=getshippingmethod&chk=0"><span>4. ' . Core_CLanguage::_(SHIPPING_METHOD) . '</span></a></li><li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showorderconfirmation"><span>5. ' . Core_CLanguage::_(ORDER_CONFIRMATION) . '</span></a></li>
			<li class="act"><a href="#"><span>6. ' . Core_CLanguage::_(PAYMENT_DETAILS) . '</span></a></li>';
        } else {
            $output .= '<li class="inact"><a href="' . $_SESSION['base_url'] . '/index.php?do=showcart&action=showorderconfirmation&vid=' . $_GET['vid'] . '"><span>2. ' . Core_CLanguage::_(ORDER_CONFIRMATION) . '</span></a></li>
			<li class="act"><a href="#"><span>3. ' . Core_CLanguage::_(PAYMENT_DETAILS) . '</span></a></li>';
        }
        $output .= '</ul>
		</div><div class="row-fluid">
                    <div class="span12">
                         
                      <p class="billing_title">' . Core_CLanguage::_(CHOOSE_YOUR_MODE_OF_PAYMENT) . '</p>
                      
                      <div id="myaccount_div">
                      <span class="label label-info">' . Core_CLanguage::_(YOUR_CHECK_OUT_AMOUNT_IS) . '   ' . $_SESSION['currencysetting']['selected_currency_settings']['currency_tocken'] . '' . number_format($_SESSION['checkout_amount'], 2) . '</span>
                      <div id="paymentid">
                      <h6>' . Core_CLanguage::_(ONLINE_PAYMENT_GATEWAYS) . '</h6>
                       <ul class="payment_det">';
        if (count($onlinearr) > 0) {
            $cnt = count($onlinearr);
            for ($i = 0; $i < $cnt; $i++) {
                $output .= '<li><a>';
                $output .= Display_DAddCart::getPaymentGatewayForms($onlinearr[$i], $domain);
                $output .= '</a></li>';
            }
        }
        $output .= '</ul>
                            <div class="clear"></div>
                            </div>   </div>	';
        if ($_GET['vid'] == '') {
            $output .= '<div id="paymentid">
				<h6>' . Core_CLanguage::_(OFFLINE_PAYMENT_GATEWAYS) . '</h6>
				<ul class="payment_det">';
            if (count($offlinearr) > 0) {
                $cnt = count($offlinearr);
                for ($i = 0; $i < $cnt; $i++) {
                    $output .= '<li><a>';
                    $output .= Display_DAddCart::getPaymentGatewayForms($offlinearr[$i], $domain);
                    $output .= '</a></li>';
                }
            }
            $output .= '</ul>
				<div class="clear"></div>
				</div>';
        }
        $output .= ' </div> </div>';
        return $output;
    }
Esempio n. 28
0
    /**
     * This function is used to Display the User Wishlist
     * @param mixed $arr
     * @param int $paging
     * @param int $prev
     * @param int $next	
     * @param int $val
     * @param mixed $result
     * @return string
     */
    function showDigitalProduct($arr, $paging, $prev, $next, $val, $result)
    {
        $output .= $result . '<div class="title_fnt">
		<h1>' . Core_CLanguage::_('MY_DOWNLOADS') . '</h1>
		</div>
		<div id="myaccount_div">
		
		<table class="rt cf" id="rt1">
			<thead class="cf">
				<tr>
					
					<th>' . Core_CLanguage::_('ORDER') . '</th>
					<th>' . Core_CLanguage::_('PRODUCT') . ' </th>
					<th>' . Core_CLanguage::_('ORDER_DATE') . '</th>
					<th>' . Core_CLanguage::_('EXPIRE_DATE') . '</th>
					<th>' . Core_CLanguage::_('DOWNLOAD') . '</th>	
				</tr>
			</thead>
			<tbody>';
        if (count($arr) > 0) {
            for ($i = 0; $i < count($arr); $i++) {
                if (file_exists($arr[$i]['image'])) {
                    $img = $arr[$i]['image'];
                } else {
                    $img = "'" . $_SESSION['base_url'] . "/index.phpimages/noimage.jpg";
                }
                $output .= '<tr>
					
					<td>#' . $arr[$i]['orders_id'] . '</td><td><a href="?do=prodetail&action=showprod&prodid=' . $arr[$i]['product_id'] . '">' . $arr[$i]['title'] . '</a></td>
					<td>' . $arr[$i]['pdate'] . '</td>';
                if (Display_DUserAccount::dateDiff("/", date("j/n/Y"), $arr[$i]['expdate']) > 0) {
                    $output .= '<td bgcolor="#FFFFFF" >Download Expired</td>';
                } else {
                    $output .= '<td bgcolor="#FFFFFF" >' . $arr[$i]['expdate'] . '</td>';
                }
                $output .= '<td><a class="btn btn-mini" href="?do=prodown&rid=' . $arr[$i]['orders_id'] . '&pid=' . $arr[$i]['product_id'] . '">Download</a></td></tr>';
            }
        } else {
            $output .= '<tr><td colspan="6"><div class="alert alert-info">
				<button data-dismiss="alert" class="close" type="button">×</button>
				<strong>' . Core_CLanguage::_('NO_PRODUCT_FOUND') . '</strong> 
				</div></td></tr>';
        }
        $output .= '</tbody>
					</table>
					</div>';
        $_SESSION['wishList'] = $output;
        return $output;
    }
Esempio n. 29
0
 /**
  * This function is used to display the brand list
  *
  * @return string
  */
 function viewBrandsList()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('CMS');
     if ($_GET['action'] == '') {
         include 'classes/Core/CKeywordSearch.php';
         include 'classes/Display/DKeywordSearch.php';
         include 'classes/Core/CUserRegistration.php';
         include 'classes/Display/DUserRegistration.php';
         include_once 'classes/Core/CUserAddressBook.php';
         include 'classes/Core/CHome.php';
         include_once 'classes/Core/CLastViewedProducts.php';
         include_once 'classes/Display/DLastViewedProducts.php';
         include 'classes/Core/CProductDetail.php';
         include 'classes/Display/DProductDetail.php';
         include_once 'classes/Core/CAddCart.php';
         include_once 'classes/Core/CCurrencySettings.php';
         Core_CCurrencySettings::getDefaultCurrency();
         $output['sitelogo'] = Core_CHome::getLogo();
         $output['pagetitle'] = Core_CHome::pageTitle();
         $output['timezone'] = Core_CHome::setTimeZone();
         $output['currentDate'] = date('D,M d,Y - h:i A');
         $output['skinname'] = Core_CHome::skinName();
         $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
         $output['googlead'] = Core_CHome::getGoogleAd();
         $output['footer'] = Core_CHome::footer();
         $output['footerconnect'] = Core_CHome::getfooterconnect();
         $output['sociallink'] = Core_CHome::showSocialLinks();
         $output['loginStatus'] = Core_CUserRegistration::loginStatus();
         $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
         $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
         $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
         $output['headertext'] = Core_CUserRegistration::showHeaderText();
         $output['result'] = $result;
         $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
         $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
         $output['userLeftMenu'] = Display_DUserRegistration::showUserLeftMenu();
         $output['lastviewedproducts'] = Core_CLastViewedProducts::lastViewedProducts();
         $output['cartcount'] = Core_CAddCart::countCart();
         $output['categorytree'] = Core_CProductDetail::showCategoryTree();
         $output['listviewbrands'] = Core_CHome::viewBrandsList();
         Bin_Template::createTemplate('listviewbrand.html', $output);
     } else {
         include 'classes/Core/CKeywordSearch.php';
         include 'classes/Display/DKeywordSearch.php';
         include 'classes/Core/CUserRegistration.php';
         include 'classes/Display/DUserRegistration.php';
         include_once 'classes/Core/CUserAddressBook.php';
         include 'classes/Core/CHome.php';
         include_once 'classes/Core/CLastViewedProducts.php';
         include_once 'classes/Display/DLastViewedProducts.php';
         include_once 'classes/Core/CAddCart.php';
         include_once 'classes/Core/CCurrencySettings.php';
         include 'classes/Core/CProductDetail.php';
         include 'classes/Display/DProductDetail.php';
         Core_CCurrencySettings::getDefaultCurrency();
         $output['sitelogo'] = Core_CHome::getLogo();
         $output['pagetitle'] = Core_CHome::pageTitle();
         $output['timezone'] = Core_CHome::setTimeZone();
         $output['currentDate'] = date('D,M d,Y - h:i A');
         $output['skinname'] = Core_CHome::skinName();
         $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
         $output['googlead'] = Core_CHome::getGoogleAd();
         $output['footer'] = Core_CHome::footer();
         $output['footerconnect'] = Core_CHome::getfooterconnect();
         $output['sociallink'] = Core_CHome::showSocialLinks();
         $output['loginStatus'] = Core_CUserRegistration::loginStatus();
         $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
         $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
         $output['headerMainMenu'] = Core_CUserRegistration::showHeaderMainMenu();
         $output['headertext'] = Core_CUserRegistration::showHeaderText();
         $output['result'] = $result;
         $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
         $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
         $output['userLeftMenu'] = Display_DUserRegistration::showUserLeftMenu();
         $output['lastviewedproducts'] = Core_CLastViewedProducts::lastViewedProducts();
         $output['categorytree'] = Core_CProductDetail::showCategoryTree();
         $output['cartcount'] = Core_CAddCart::countCart();
         $output['gridviewbrands'] = Core_CHome::viewBrandsList();
         Bin_Template::createTemplate('gridviewbrand.html', $output);
     }
 }
Esempio n. 30
0
    /**
     * This function is used to validate the contact us 
     * 
     * 
     * @return string
     */
    function validateContactUs()
    {
        $name = $_POST['txtname'];
        $from_mail = $_POST['email'];
        $mail_content = $_POST['comment'];
        $sql = "SELECT * from admin_settings_table where set_id =1";
        $obj = new Bin_Query();
        if ($obj->executeQuery($sql)) {
            $to_mail = $obj->records[0]['admin_email'];
            Core_CFooterLinks::sendingMail($from_mail, $to_mail, $mail_content);
            $output = '<div class="alert alert-success">
			<button data-dismiss="alert" class="close" type="button">×</button>
			
			' . Core_CLanguage::_(YOUR_COMMENTS_HAVE_BEEN_SUBMITTED) . '

			</div>';
        } else {
            $output = '<div class="alert alert-error">
			<button data-dismiss="alert" class="close" type="button">×</button>
				' . Core_CLanguage::_(YOUR_COMMENTS_HAVE_NOT_BEEN_SUBMITTED) . '
			</div>';
        }
        return $output;
    }