<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2005-2006 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts EasyCreate 1.1                 |
// +----------------------------------------------------------------------+
// | Authors: programmer<programmer@armia.com>        		              |
// |          									                          |
// +----------------------------------------------------------------------+
?>
<?php

$curTab = 'dashboard';

include "includes/session.php";
include "includes/config.php";
include "includes/function.php";
//if($_GET['cat']=="simple"){
//          $_SESSION['session_buildtype']="simple";
//}else{
//          $_SESSION['session_buildtype']="advanced";
//}
$sql="select * from tbl_template_category order by ncat_id=19 desc, vcat_name asc";
$totalrows = mysql_num_rows(mysql_query($sql));
$navigate = pageBrowser($totalrows, 10, 6, "", $_GET[numBegin], $_GET[start], $_GET[begin], $_GET[num]);
// execute the new query with the appended SQL bit returned by the function
$sql = $sql . $navigate[0];
$rs = mysql_query($sql);
$rs = mysql_query($sql);
include "includes/userheader.php";
?>
<div class="col-md-12">
<?php $linkArray = array( TOP_LINKS_DASHBOARD =>'usermain.php',
FOOTER_SITE_MANAGER =>'sitemanager.php',
SM_SELECT_CATEGORY  =>'showcategories.php');
echo getBreadCrumb($linkArray);?>
<div class="col-md-12 clear">
<div class="col-md-6 no-padding">
<h2 class="new-header"><span class="step-cnt">1</span><?php echo SM_SELECT_CATEGORY_THEME; ?>.</h2>
</div>
<div class="col-md-6 no-padding">
<a href="showtemplates.php?catid=all" class="ryt grey-btn01 btn-space"><?php echo SM_SHOW_ALL_TEMPLATES; ?></a>
</div>
</div>
<div class="temp-width">
                                  <div class="category-display">
                                        <?php
                                        if (mysql_num_rows($rs) > 0) {
                                            $i = 0;
                                            while ($row = mysql_fetch_array($rs)) {
                                                if ($i == 0) {
                                                    echo "<div class='col-md-12'>";
                                                }
                                                ?>

                                                    <div class="category-box">
                                                        <a href="./showtemplates.php?catid=<?php echo $row['ncat_id']; ?>"><img src="./<?php echo $row['vcat_thumpnail']; ?>" alt="<?php echo $row['vcat_name']; ?>" title="<?php echo $row['vcat_desc']; ?>" border=0></a>
                                                        <!--<img src="themes/Coastal-Green/business-ico.png">-->
                                                        <p class="text-center"><?php echo $row['vcat_name']; ?></p>
                                                    </div>
                                                 <?php
                                                $i++;
                                                if ($i == 3) {
                                                    $i = 0;
                                                    echo "</div>";
                                                }
                                            }?>
                                               
                                <?php            
                            } else {
                                ?>
                                <?php echo SM_NO_CATEGORY; ?>
                                <?php
                            }
                            ?>
                                </div></div>
<div class="col-md-12 clear">
<div class="admin-table-btm">
<div class="total-list lft">
<?php echo SM_LISTING." ". $navigate[1]." ". SM_OF." ". $totalrows. " " . SM_RESULTS; ?>
</div>
<div class="list-pagin ryt">
<?php echo($navigate[2]);
?>&nbsp;
</div>
<div class="clear"></div>
</div>
</div>

</div></div>
<?php
include "includes/userfooter.php";
?>