<?php

/* FIRESHOP: Advanced Content Market System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2012 by Mohamad Porhaji                                */
/* http://Firedesign.ir                                                   */
/*                                                                      */
/* This program is free software.  */
/************************************************************************/
/* $Id: Header.php,v 1.0.0.1 2012/02/18 By Mohamad Porhaji $ */

if (stristr(htmlentities($_SERVER["PHP_SELF"]), "header.php")) {
    Header("Location: index.php");
    die();
}




function themeheader() {
  global $db,$site_title,$page_title,$description,$keywords;


echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";

echo "<head>\n";
echo "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />\n";
echo "<title>$site_title | $page_title</title>\n";
echo "<META NAME=\"COPYRIGHT\" CONTENT=\"Copyright (c) by FireDesign.ir\">\n";
echo "<meta name=\"description\" content=\"$description\">\n";
echo "<meta name=\"keywords\" content=\"$keywords\">\n";
echo "<link rel=\"shortcut icon\" href=\"img/favicon.ico\">\n";

echo "<link href=\"template/fireshop_default/style/style.css\" rel=\"stylesheet\" type=\"text/css\" >\n";

echo "</head>\n";

echo "
<body dir=\"rtl\">
<div align=\"center\">
<div class=\"main\">
<img src=\"template/fireshop_default/images/header.jpg\"/>
<div class=\"menu\">
<div class=\"nav\"><a href=\"index.php\">صفحه نخست</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"rahgiri.php\">رهگيري سفارش</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"pay.php\">ثبت فيش بانكي</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"static.php?id=1\">شماره حساب ها</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"static.php?id=3\">قوانين فروشگاه</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"static.php?id=2\">درباره فروشگاه</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"check_contact.php\">رهگيري تماس</a></div><div class=\"naver\"></div>
<div class=\"nav\"><a href=\"contact.php\">ارتباط با ما</a></div>

<div class=\"cart\"><a href=\"buy.php\">اتمام خريد</a></div><div class=\"naver_cart\"></div>
<div class=\"cart\"><a href=\"buy.php\">مشاهده سبد خريد</a></div>
</div>

<div class=\"slat\">
<table>
<tr align=\"center\">
<td width=\"690\" valign=\"top\">
<div class=\"slider\">
<div class=\"slider_top\">&nbsp;&nbsp;&nbsp; جديدترين محصولات فروشگاه</div>
<div class=\"slider_bg\">
<div class=\"content_slider\">
    <script type=\"text/javascript\" src=\"template/fireshop_default/slider/jquery-1.js\"></script>
    
    
    <script type=\"text/javascript\" src=\"template/fireshop_default/slider/jcarouse.js\"></script>
    
    


    <script type=\"text/javascript\">
animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
	//$: Access to jQuery
	//divobj: DOM reference to DIV being expanded/ collapsed. Use 'divobj.id' to get its ID
	//state: 'block' or 'none', depending on state
}
animatedcollapse.init()

    </script>
    <link href=\"http://127.0.0.1/fireshop/template/fireshop_default/slider/dropdown.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\"><link href=\"http://127.0.0.1/fireshop/template/fireshop_default/slider/default0.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\"> 
<div dir=\"ltr\" align=\"center\">
                    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
                        <tr>
                            <td>
                                <span class=\"prev\" style=\"margin-right: 5px; cursor: pointer;\">
                                    <img src=\"template/fireshop_default/slider/step-bac.png\" border=\"0\"></span>
                            </td>
                            <td>
                                <div class=\"anyClass\">
                                    <ul>
			\n";



$sql = $db->sql_query("SELECT * FROM fireshop_product ORDER BY `product_time_stamp` DESC Limit 6");
while ($row = $db->sql_fetchrow($sql)) {
$product_title = $row['product_title'];
$product_title = substr($product_title, 0,70);
$product_pic = $row['product_pic'];
$id= $row['id'];

    echo"<li><a href=\"product.php?id=$id\"><img style='margin:2px' width='190' height='145' class=\"ImgMarg\" src=\"$product_pic\" title=\"$product_title\" border=\"0\" ><br/><br/><center>$product_title</center></a></li>";

}




                                    
			
			echo"
                                    </ul>
                                </div>
                            </td>
                            <td>
                                <span class=\"next\" style=\"margin-left: 5px; cursor: pointer;\">
                                    <img src=\"template/fireshop_default/slider/step-fwd.png\" border=\"0\"></span>
                            </td>
                        </tr>
                    </table>
                </div>

                <script type=\"text/javascript\">
                    $(window).load(function () {
                            $(function() {
                        $('.anyClass').jCarouselLite({
                            btnNext: '.next',
                            btnPrev: '.prev',
                            visible: 3,
                            scroll: 1,
                            speed: 800,
                            auto: 4000
                            });
                        });
                    });

                </script>

</div></div>
<div class=\"slider_bt\"></div>

</div>

</td>
<td width=\"270\" valign=\"top\">
<div class=\"mini_slider\">
<div class=\"mini_slider_top\">&nbsp;&nbsp;&nbsp;پرفروش ترين محصولات</div>
<div class=\"mini_slider_bg\">
<div class=\"content_mini\">
<div align=\"center\">

<script type=\"text/javascript\" language=\"javascript1.2\" src=\"template/fireshop_default/mini_slider/custom.js\"></script>



<script type=\"text/javascript\" src=\"template/fireshop_default/mini_slider/jquery.js\"></script>
<script type=\"text/javascript\">
				$(document).ready(function($){
					$('#dwp-featured-post-dynamicwp_featured-5').cycle({
						fx: 'scrollVert',
						next:   'a#dwp-featuered-next',
						prev:   'a#dwp-feateured-prev'
					 });
				});
</script>
<table>
<tr>
<td valign=\"top\">
<a href=\"\" id=\"dwp-featuered-next\" style=\"margin: 40pt 0pt 0pt 0px; background: none repeat scroll 0% 0% transparent;  float: right;\">
<img src=\"template/fireshop_default/mini_slider/next.png\" alt=\"next\" height=\"24px\" width=\"24px\"></a> 
</td>
<td valign=\"top\">
<div align=\"right\" style=\"background-color: #ffffff;margin: 0px 0px 0px 0px;padding: 0px; position: relative; list-style: none outside none; height: 160px; overflow: hidden;\">

<div id=\"dwp-featured-post-dynamicwp_featured-5\">
\n";



$sql = $db->sql_query("SELECT * FROM fireshop_product ORDER BY `total_sale` DESC Limit 6");
while ($row = $db->sql_fetchrow($sql)) {
$product_title = $row['product_title'];
$product_title = substr($product_title, 0,70);
$product_pic = $row['product_pic'];
$id= $row['id'];

    echo"<li><a href=\"product.php?id=$id\" title=\"$product_title\">$product_title<br/><br/><img src=\"$product_pic\" alt=\"img\" height=\"134\" width=\"173\"></a></li>";

}
echo"

</div>

</div>
</td>
<td valign=\"top\">
<a href=\"\" id=\"dwp-feateured-prev\" style=\"margin: 40pt 0pt 0pt 0px;background: none repeat scroll 0% 0% transparent; float: right;\">
<img src=\"template/fireshop_default/mini_slider/prev_002.png\" alt=\"prev\" height=\"24px\" width=\"24px\"></a>
</td>
</tr>
</table>

<br/>
</div>
</div></div>
<div class=\"mini_slider_bt\"></div>
</div>
</td>
</tr>
</table>
</div>\n";
}
?>