public static function getHelpdetailNavigationURL($helpID)
 {
     global $tableprefix;
     $navigationURL = $bindName = NULL;
     if (!empty($productID)) {
         $resSet = DbHelper::execute("SELECT htitle FROM " . $tableprefix . "help WHERE hid =" . $helpID);
         $data = DbHelper::fetchOne($resSet);
         $bindName = generalMethods::doTrimSeoNames(strtolower(stripslashes($data)));
         $navigationURL = SITE_URL . "/help/" . $bindName . "/" . $helpID;
     }
     return $navigationURL;
 }
    $no_margin_class = $count_row == $cells ? 'nomargin' : '';
    ?>
                <div class="pcm_productitem_cat <?php 
    echo $no_margin_class;
    ?>
">
                    <a href="<?php 
    echo generalMethods::getCategorydetailNavigationURL($row_category["category_id"]);
    ?>
"><img src="<?php 
    echo SITE_URL . '/' . $avatarImage;
    ?>
" width="170" height="162" /></a>
					<div class="product_desc">
                    <a href="<?php 
    echo generalMethods::getCategorydetailNavigationURL($row_category["category_id"]);
    ?>
"><?php 
    echo stripslashes($category_name);
    ?>
&nbsp;(<?php 
    echo $count_product_catalog;
    ?>
)</a>
                	</div>
				</div>
                        <?php 
    $rowcnt1++;
    if ($count_row == $cells) {
        $count_row = 1;
    } else {
    public static function showVendorProductCurozileItems($IBArr)
    {
        if (count($IBArr) > 0) {
            ?>

<div class="vendor_image_thumbnail_scroll">

	<div class="vendor_image_thumbnail_scroll_inner">
		<table>
			<tr>

				<?php 
            foreach ($IBArr as $itemIB) {
                $imgPath = $imgURL = NULL;
                $partsIB = pathinfo($itemIB->image_small);
                //  echopre($partsIB);
                $imgPath = DbHelper::getBasePath() . '/products/' . $partsIB['filename'] . '.' . $partsIB['extension'];
                if (strstr($partsIB['basename'], "http://")) {
                    $imgURL = $partsIB['basename'];
                } else {
                    if (count($partsIB) == 0 || $partsIB['filename'] == "") {
                        $imgURL = SITE_URL . '/products/noimage.jpg';
                    } else {
                        $imgURL = SITE_URL . '/products/' . $partsIB['filename'] . '.' . $partsIB['extension'];
                    }
                }
                if ($imgURL == "") {
                    $imgURL = SITE_URL . '/products/noimage.jpg';
                }
                // $imgURL = (is_file($imgPath)) ? $imgURL : SITE_URL.'/products/noimage.jpg';
                // $imgPath = (is_file($imgPath)) ? $imgPath : DbHelper::getBasePath().'/products/noimage.jpg';
                // if(is_file($imgPath)) {
                ?>
				<td><a
					href="<?php 
                echo generalMethods::getProductdetailNavigationURL($itemIB->product_id);
                ?>
">
						<img src="<?php 
                echo $imgURL;
                ?>
" width="150" height="143"
						alt="<?php 
                echo $itemIB->product_name;
                ?>
"
						title="<?php 
                echo $itemIB->product_name;
                ?>
" border="0" />
				</a>
				</td>
				<?php 
                // }
            }
            ?>

			</tr>
		</table>
	</div>
	<div class="clear"></div>
</div>
<div class="clear"></div>
</div>

<?php 
        }
    }
     $seller_rs = mysql_query($seller_sql);
     $seller_rw = mysql_fetch_array($seller_rs);
     $seller_email = $seller_rw["email"];
 }
 /***************** End fetching product details **********/
 // Send mail to admin
 /*---------Multicart 2.0 Upgradation------------*/
 $subject = "New review is posted in " . stripslashes(SITE_NAME);
 $mailcontent = readEmailTemplate('product_review');
 if ($reviewapproval == "admin") {
     $to = SITE_EMAIL;
 } elseif ($reviewapproval == "vendors") {
     $to = $seller_email;
     $mailcontent = str_replace('Administrator', "Seller", $mailcontent);
 }
 $link = "<a href='" . generalMethods::getProductdetailNavigationURL($_POST["pid"]) . "' target='_blank'>Click here</a>";
 /*-------Email Template Reading Fuction Call--------*/
 $mailcontent = str_replace('[site_name]', SITE_NAME, $mailcontent);
 $mailcontent = str_replace('[product_name]', $p_row["product_name"], $mailcontent);
 $mailcontent = str_replace('[link]', $link, $mailcontent);
 /*--------------- End email template section-------------------*/
 /******* Send Email ************************************************/
 $headers = "MIME-Version: 1.0" . "\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
 $headers .= "From: " . SITE_EMAIL . "<" . SITE_EMAIL . ">" . "\r\n";
 $headers .= "Reply-To: " . SITE_NAME . "<" . SITE_EMAIL . ">" . "\r\n";
 $headers .= "Return-Path: " . SITE_NAME . "<noreply@" . SITE_EMAIL . ">" . "\r\n";
 //$headers .= "Organization: ".SITE_NAME."\r\n";
 $mailcontent = nl2br($mailcontent);
 //$mail_send_details = "<html><head><link href='".SITE_URL."/style/template1-admin.css' rel='stylesheet' type='text/css'></head><body><center><div align='left' id='layout'><div align='left' class='header'><div align='left' class='logo'><img src=".$logofolder."/".$logoimage." width='125' height='39'/></div></div><div>".$mailcontent."</div></div><div align='left' class='clear_float'><img src=".$imagefolder."/clear.gif width=1 height=1/></div></div></div></center></body></html>";
 $mail_send_details = '<html>
/*display the active template*/
$active_template = displayTemplate();
//echo stripslashes($cms_content_main[1]);
include "includes/htmltop.php";
/* Top File Name */
include_once "includes/" . $active_template[0];
?>
<!-- content area Right Column starts-------------------------------------------------------------- -->


    <div align="left" class="main_body">
        <!--mainbody area start -->
        <!--center content area start-->
        <!-- Bread Crumb Area -->
        <?php 
echo generalMethods::getBreadCrumbs(array(array('url' => '', 'name' => strip_tags($cms_content_main[0]))));
?>
        <!-- Bread Crumb Area End -->
        <br/>
        <div class="pcm_content_rightcolumn">
            <div class="pcm_messagebox">
                <div align="left" id="item_details">
                    <div class="pcm_messagebox_header">
                        <?php 
echo $cms_content_main[0];
?>
                    </div>

                    <div  class="pcm_messagebox_content">
                        <table width="100%"  border="0" cellspacing="1" cellpadding="3" class="cart_listingtbl"  >
                            <tr>
        $currency_attributes = displayCurrencyType();
        $conversionRate = ConvertedCurrencyRate($currency_attributes[2]);
        $converted_price = $price * $conversionRate;
        $discountprice = 0;
        if ($row["discount"] != "0") {
            $discountprice = $converted_price - $converted_price * $row["discount"] / 100;
            $discountprice = number_format($discountprice, 2, ".", "");
            $discountstr = "<br>discount(" . $row["discount"] . "%)";
        }
        $display_product_price = number_format($converted_price, 2, ".", "");
        $featured = $row["featured"] == 'Y' ? 'dsd' : 'new';
        echo "<item>\n";
        echo "<title>" . ucfirst($row["product_name"]) . "</title>\n";
        echo "<link>" . generalMethods::getProductdetailNavigationURL($row["product_id"]) . "</link>\n";
        echo "<description>\n";
        echo '<![CDATA[' . html_entity_decode(stripslashes($row["product_description"])) . ']]>';
        echo "</description>\n";
        echo "<guid isPermaLink='true'>" . generalMethods::getProductdetailNavigationURL($row["product_id"]) . "</guid>\n";
        echo "<g:image_link>" . SITE_URL . "/" . $prdImage . "</g:image_link>\n";
        echo "<g:price>" . $display_product_price . "</g:price>\n";
        echo "<g:condition>" . $featured . "</g:condition>\n";
        echo "<g:id>" . $row["product_id"] . "</g:id>\n";
        echo "</item>\n";
    }
}
// And at last the closing tags for the overall info
echo "</channel>\n";
echo "</rss>\n";
?>

/*if (get_magic_quotes_gpc()) {
    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
*/
/*if(isset( $_SESSION["sess_userid"]) and $_SESSION["sess_userid"]!= "") {
    $userid = $_SESSION["sess_userid"];
}else {
    header("Location:login.php");
    exit;
}*/
$name = $_POST['name'];
$email = $_POST['email'];
$product_id = $_POST['product_id'];
$product_url = '<a target="_blank" href="' . generalMethods::getProductdetailNavigationURL($product_id) . '">' . generalMethods::getProductdetailNavigationURL($product_id) . '</a>';
//$userName = getLoggedInUserName($_SESSION["sess_userid"]);
$to = $email;
$subject = "Product Information by " . SITE_NAME;
$mailcontent = readEmailTemplate('mail_friend');
$mailcontent = str_replace('[name]', $name, $mailcontent);
$mailcontent = str_replace('[product_url]', $product_url, $mailcontent);
//$mailcontent = str_replace('[user_name]',$userName,$mailcontent);
$from = "From: " . SITE_EMAIL . "\n";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: " . SITE_EMAIL . "<" . SITE_EMAIL . ">" . "\r\n";
$headers .= "Reply-To: " . SITE_NAME . "<" . SITE_EMAIL . ">" . "\r\n";
$headers .= "Return-Path: " . SITE_NAME . "<" . SITE_EMAIL . ">" . "\r\n";
$headers .= "Organization: " . SITE_NAME . "\r\n";
$mailcontent = nl2br($mailcontent);
                ?>
&product_option_id=<?php 
                echo $row["product_option_id"];
                ?>
"><img src="<?php 
                echo SITE_URL;
                ?>
/themes/<?php 
                echo $active_template[5];
                ?>
/view_cart_btn.gif" width="73" height="20" alt="Add to Cart" border="0"/></a>
                <?php 
            }
            ?>
<a class="more_btn" href="<?php 
            echo generalMethods::getProductdetailNavigationURL($row["product_id"]);
            ?>
"><img src="<?php 
            echo SITE_URL;
            ?>
/themes/<?php 
            echo $active_template[5];
            ?>
/btn_more.gif" width="73" height="20" alt="More" border="0"/></a>

                    </div>
            <?php 
        } else {
            ?>
                    <div class="adtocart_tbn" align="left"><img src="<?php 
            echo SITE_URL;
include "includes/session.php";
include "includes/functions.php";
/*display the active template*/
$active_template = displayTemplate();
include "includes/htmltop.php";
$help = "SELECT * FROM " . $tableprefix . "help where active='1' and hid='" . $_GET['id'] . "' ORDER BY hposition desc";
$result = mysql_query($help) or die(mysql_error());
$descObj = mysql_fetch_object($result);
/* Top File Name */
include_once "includes/" . $active_template[0];
?>
<div align="left" class="main_body">
			<!--mainbody area start -->
<!-- Bread Crumb Area -->
        <?php 
echo generalMethods::getBreadCrumbs(array(array('url' => 'help.html', 'name' => 'Help'), array('url' => '', 'name' => $descObj->htitle)));
?>
        <!-- Bread Crumb Area End -->
<div class="reg_wrapper">
<div class="reg_wrapper_header">
<h2>Help About - <?php 
echo strtoupper(str_replace('{SITE_NAME}', SITE_NAME, $descObj->htitle));
?>
</h2>
</div>
<div class="text_information" align="center"><?php 
echo $message;
?>
</div>

/* Top File Name */
include_once "includes/" . $active_template[0];
?>
<style>
.success_messgae{
color:#009933;
}
</style>
<div align="left" class="main_body">
			
			<!--mainbody area start -->

		<!--center content area start-->		
		<!-- Bread Crumb Area -->
                <?php 
echo generalMethods::getBreadCrumbs(array(array('url' => '', 'name' => 'Site Feedback')));
?>
                <!-- Bread Crumb Area End -->
		<form action="<?php 
echo $_SERVER["PHP_SELF"];
?>
" method="post" name="frmReview">
			<input type="hidden" name="pid" value="<?php 
echo $pid;
?>
" >
		<div align="left" id="item_details">
	
	
		<!--items display area start -->
	
function getProductPageLinkName($baseurl, $catid, $productname, $urlType = NULL)
{
    global $tableprefix;
    $link = " ";
    //$link = "<a class='nobg' href='".SITE_URL."'> Home </a> ";
    if ($catid != "") {
        $sql = "SELECT * FROM " . $tableprefix . "categories where category_id = " . $catid;
        $result = mysql_query($sql);
        if (mysql_num_rows($result) != 0) {
            $row = mysql_fetch_array($result);
            $currcatid = $row["category_id"];
            $currcatname = stripslashes($row["category_name"]);
            $subcats = $row["route"];
        }
        if ($subcats == "") {
            $bindCategory = $navigationLink = NULL;
            $bindCategory = generalMethods::doTrimSeoNames(strtolower(stripslashes($currcatname)));
            $navigationLink = $urlType == 'seo' ? SITE_URL . "/" . $bindCategory . "/" . $currcatid : SITE_URL . "/" . $baseurl . "?catid=" . $currcatid;
            $lastcat = "<a href='" . $navigationLink . "'>->" . htmlentities(stripslashes($currcatname)) . "</a>";
        } else {
            $sql = "SELECT * FROM " . $tableprefix . "categories where category_id in ({$subcats}) ";
            $result = mysql_query($sql);
            if (mysql_num_rows($result) != 0) {
                while ($row = mysql_fetch_array($result)) {
                    $subcatname = stripslashes($row["category_name"]);
                    $subcatid = $row["category_id"];
                    $bindCategory = $navigationLink = NULL;
                    $bindCategory = generalMethods::doTrimSeoNames(strtolower(stripslashes($subcatname)));
                    $navigationLink = $urlType == 'seo' ? SITE_URL . "/" . $bindCategory . "/" . $subcatid : SITE_URL . "/" . $baseurl . "?catid=" . $subcatid;
                    $link .= " <a  href='" . $navigationLink . "'->->" . htmlentities(stripslashes($subcatname)) . "</a>";
                }
            }
            // $link = substr($link, 0, -35);
        }
    }
    $link .= $lastcat;
    $prodctlink .= " <a  href='javascript:void(0);'>" . $productname . "</a>";
    $newlink = $link . $prodctlink;
    return $newlink;
}
    $catgeoryName = 'forest';
    ?>
            <div class="home_cat_list">
                <a class="home_catimg" href="<?php 
    echo SITE_URL . '/' . generalMethods::doTrimSeoNames($catgeoryName) . '/' . generalMethods::doTrimSeoNames($MadeToOrder) . "/" . $catgeoryId;
    ?>
"><img src="<?php 
    echo $madetoOrderImage;
    ?>
" width="132" height="126" alt="<?php 
    echo $MadeToOrder;
    ?>
" /></a>
                <div class="home_catname">
                    <a href="<?php 
    echo SITE_URL . '/' . generalMethods::doTrimSeoNames($catgeoryName) . '/' . generalMethods::doTrimSeoNames($MadeToOrder) . "/" . $catgeoryId;
    ?>
"><?php 
    echo $MadeToOrder;
    ?>
</a>
                </div>
            </div>
        <?php 
}
?>

        <div class="clear"></div>
    </div>

Ejemplo n.º 13
0
"><img src="<?php 
                echo SITE_URL;
                ?>
/help/<?php 
                echo mysql_result($contents, $j, 'himage');
                ?>
" width="22" height="20" alt="<?php 
                echo str_replace('{SITE_NAME}', SITE_NAME, mysql_result($contents, $j, 'htitle'));
                ?>
" border="0">
					</a></td>
					<td width="96%" align="left" class="help_text"><a href="<?php 
                echo SITE_URL;
                ?>
/help/<?php 
                echo generalMethods::doTrimSeoNames(mysql_result($contents, $j, 'htitle'));
                ?>
/<?php 
                echo mysql_result($contents, $j, 'hid');
                ?>
"><?php 
                echo str_replace('{SITE_NAME}', SITE_NAME, mysql_result($contents, $j, 'htitle'));
                ?>
</a>
					</td>
				</tr>
<?php 
            }
            //end inner for loop
        }
        //end if
<script language="javascript"   type="text/javascript"   src="<?php 
echo SITE_URL;
?>
/js/pagingHomepage.js"></script>

<script LANGUAGE="javascript" type="text/javascript">
    function clickSearch()
    {
        document.frmCatalog.submit();
    }
</script>

<div class="pcm_content_rightcolumn"  >
    <div class="pcm_productlisting_wrapper">
        <form name="frmCatalog" action="<?php 
echo generalMethods::getCategorydetailNavigationURL($catid, $page, $pagegroup);
?>
" method="POST" enctype="multipart/form-data" id="frmCatalog">
            <input type="hidden" name="catid" value="<?php 
echo htmlentities($catid);
?>
"  id="catid">
            <!--<div align="left" id="item_details">-->
            <!--items display area start -->
            <?php 
if ($catid != '') {
    ?>

            <div class="pcm_productlisting_topbox">
                <div class="brdcrumb_container">
                        <?php 
}
if (isset($_SESSION["sess_userid"]) and $_SESSION["sess_userid"] != "") {
    $userid = $_SESSION["sess_userid"];
} else {
    header("Location:login.php");
    exit;
}
if (isset($_GET['msg'])) {
    $message = $_GET['msg'];
}
//delete product review
if ($_GET['delete_permanent'] == 'Y') {
    $feedback_id = $_REQUEST['feedback_id'];
    $message = Userdashboard::updateProductFeedbackStatus($feedback_id);
    $url = "list_product_feedbacks.php?msg=" . $message;
    generalMethods::redirect($url);
}
//get currency
$currency_attributes = displayCurrencyType();
//get all product reviews
$product_feedbacks = Userdashboard::listProductFeedbacks($userid);
$totalrows = count($product_feedbacks);
//get pagination results
$limit = getPaginationLimit();
if ($limit == 0) {
    $limit = 10;
}
$page = isset($_GET['page']) ? trim($_GET['page']) : 1;
if (empty($page)) {
    $page = 1;
}
        ?>
">
        <a href="<?php 
        echo generalMethods::getCategorydetailNavigationURL($rowcatalogcategories["category_id"]);
        ?>
" title="<?php 
        echo htmlentities(stripslashes($rowcatalogcategories["category_name"]));
        ?>
"><img src="<?php 
        echo SITE_URL . '/' . $avatarImage;
        ?>
" width="170" height="162" /></a><br />
		
		<div class="product_desc">
		<a href="<?php 
        echo generalMethods::getCategorydetailNavigationURL($rowcatalogcategories["category_id"]);
        ?>
" title="<?php 
        echo htmlentities(stripslashes($rowcatalogcategories["category_name"]));
        ?>
"><?php 
        echo htmlentities($rowcatalogcategories["category_name"]);
        ?>
&nbsp;(<?php 
        echo htmlentities($count_product);
        ?>
)</a>
		</div>
        
    </div>
                            </td>
                        </tr>
						<tr></tr>


                        <tr class="tab_tblbg">
                            <td>&nbsp;</td>
                            <td height="40">
                                <?php 
if ($enable_seller_friendly == "Y") {
    ?>
                                <a href="<?php 
    echo SITE_URL;
    ?>
/store/<?php 
    echo generalMethods::doTrimSeoNames(strtolower(stripslashes($prow['artist_name'])));
    ?>
/<?php 
    echo $prow['artist_id'];
    ?>
/products"/>  <b> VIEW ALL PRODUCTS FROM  <?php 
    echo $prow['sellername'];
    ?>
</b></a>
                                    <?php 
} else {
    ?>
                                <a href="<?php 
    echo SITE_URL;
    ?>
/showportfolio.php?artistid=<?php 
			<tr>
				<td colspan="3" align="right"><span class="required">*</span>Mandatory Fields</td>
			</tr>
			<tr><td colspan="3">&nbsp;</td></tr>
			<tr><td align="left" valign="top" width="32%">Your Feedback&nbsp;<span class="required">*</span></td><td >&nbsp;</td><td align="left"><TEXTAREA class="textarea" name="txtFeedback" rows="8" cols="40"><?php 
echo $txtFeedback;
?>
</TEXTAREA></td></tr>
			<tr><td align="left" valign="top" >Your rating (1-10, 10 Best)&nbsp;<span class="required">*</span></td><td >&nbsp;</td><td align="left"><?php 
echo makeDropDownList("ddlRating", $ratinglist, $ddlRating, false, "textbox", $properties, $behaviors);
?>
</td></tr>
			<tr><td colspan="3">&nbsp;</td></tr>
			<tr><td colspan="3" align="center">				&nbsp;&nbsp;
				<input class="button" type="button" value="Back to Product Details" onClick="window.location.href='productdetails.php?productid=<?php 
echo generalMethods::getProductdetailNavigationURL($productid);
?>
';" >
				<input type="submit" class="button" value="Post Feedback" name="btnPostFeedback"></td></tr>
		</table>
		<div class="clear"></div>
		</div>	
	
	
		<div align="left" class="float_clear1"></div>
					
					
		 <!--items display area end -->
		  </div>
		
		</form>
        ?>
">
        <div class="product_img"><?php 
        //echo $prodimagedir.$product_image;
        ?>
            <a href="<?php 
        echo generalMethods::getProductdetailNavigationURL($row["product_id"], $catid, $page, $pagegroup);
        ?>
"><?php 
        echo $imageurl;
        ?>
</a>
        </div>
        <div class="product_desc">
            <a href="<?php 
        echo generalMethods::getProductdetailNavigationURL($row["product_id"], $catid, $page, $pagegroup);
        ?>
" title="<?php 
        echo $prd_name;
        ?>
">
                        <?php 
        if (strlen($prd_name) > 27) {
            echo substr(ucwords(strtolower($prd_name)), 0, 27) . "...";
        } else {
            echo ucwords(strtolower($prd_name));
        }
        ?>
            </a>
        </div>
        <div class="product_price">
/* Top File Name */
include_once "includes/" . $active_template[0];
/*---Display the terms and conditions------*/
$cms_content_terms = displayCMS('about_us');
/*---Display the terms and conditions------*/
?>

<!-- content area Right Column starts-------------------------------------------------------------- -->

<div class="pcm_content_rightcolumn">
    <div align="left" class="main_body">
			<!--mainbody area start -->
		<!--center content area start-->
                <!-- Bread Crumb Area -->
                <?php 
echo generalMethods::getBreadCrumbs(array(array('url' => '', 'name' => TEXT_VENDORS)));
?>
                <!-- Bread Crumb Area End -->

		<form name="frmRegister" action="<?php 
echo $_SERVER["PHP_SELF"];
?>
" method="POST" onSubmit="">
			<input type="hidden" name="action" value="<?php 
echo htmlentities($action);
?>
">
			
		<div align="left" id="item_details">