<?
ob_start();
require_once("functions.php");
    if(!isset($_COOKIE[$admin])){
        header('Location: index.php');
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>

<body onload="clickMenu('menu')">
<!-- outer -->
<div id="outer">
	<!-- header ----------------------------------------------------->
	<div id="header"> <? include("header.php")?> </div>
	<!-- header -->
    
    <!-- content ---------------------------------------------------->
	<div id="content">
        <!-- con_right --------------------------------------->
	   <div id="con_right">
            <div class="title_page">إحصائية الموقع</div>
           
            
            <div class="conteaner">
                
                    <br /><br /><hr /><br />
                
                <div class="title_editor">
                    <span class="title">الإحصائية</span>
                </div>
                
                <div class="editor">
                    
                    
                        <table dir="ltr">
                            <tr class="bg1">
                                <?
                                    $sel = "select * from cat where active=1";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                                <td align="right"><span class='desmsg'><?=$result?></span></td>
                                <td class="th_table"><span class='desmsgt'>الأقسام المفعلة</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from cat where active=0";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>الاقسام الغير مفعلة </span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from cat";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>إجمالي الأقسام</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from product where active=1";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                                <td align="right"><span class='desmsg'><?=$result?></span></td>
                                <td class="th_table"><span class='desmsgt'>المنتجات المفعلة</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from product where active=0";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>المنتجات الغير مفعلة </span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from product";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>إجمالي المنتجات</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from news where active=1";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                                <td align="right"><span class='desmsg'><?=$result?></span></td>
                                <td class="th_table"><span class='desmsgt'>الأخبار المفعلة</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from news where active=0";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>الاخبار الغير مفعلة </span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from news";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>إجمالي الاخبار</span></td>
                            </tr>
                           <!--
                            <tr class="bg1">
                                <?
                                    $sel = "select * from message where status=1";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                                <td align="right"><span class='desmsg'><?=$result?></span></td>
                                <td class="th_table"><span class='desmsgt'>الرسائل المقروءة</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from message where status=0";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>الرسائل الغير مقروءة</span></td>
                            </tr>
                            <tr class="bg1">
                                <?
                                    $sel = "select * from message";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>إجمالي الرسائل</span></td>
                            </tr>
                            
                            <tr class="bg1">
                                <?
                                    $sel = "select * from pagefixed";
                                    $query = mysql_query($sel);
                                    $result=mysql_num_rows($query);                 
                                ?>
                               <td align="right"><span class='desmsg'><?=$result?></span></td>
                               <td class="th_table"><span class='desmsgt'>الصفحات الثابتة</span></td>
                            </tr>
                            -->
                        </table>
                   
                </div>
                
            </div>
       </div>
	   <!-- /con_right -->
       
       <!-- con_left ---------------------------------------->
	   <div id="con_left">
            <!-- menu ---------------------------------->
            <div id="menuall"> <? include("menu.php")?> </div>
            <!-- /menu -->
            
            <!-- calender ------------------------------>
            <div id="calender"><embed src="images/Calender.swf" width="235" height="320" /></embed></div>
            <!-- /calender -->
       </div>
	   <!-- /con_left ---------------------------------------->
    </div>
	<!-- /content -->
    
    <!-- footer ----------------------------------------------------->
	<div id="footer"> <? include("footer.php")?> </div>
	<!-- /footer -->
</div>
<!-- /outer -->
</body>
</html>
<?ob_flush();?>