Esempio n. 1
0
	</tfoot>
</table>
<div style="clear: both;margin-top: 80px;"></div>
<?php 
} elseif ($_GET['type'] == 'subcat' && $_SESSION['UA_DETAILS']['level'] == 'admin' && !empty($_GET['id'])) {
    $results_arr = getSubCatAdm($db, $_GET['id'], $_SESSION['UA_DETAILS']['level']);
    ?>
<div style="clear: both;"></div>
<div style="margin-top: 20px;">
<!-- Error Display Box Start  -->
<?php 
    include 'error.php';
    ?>
<!-- Error Box End --></div>
 <div class="headDisp2">Activate Sub Categories of :<?php 
    echo getCatWid($db, $_GET['id'], $_SESSION['UA_DETAILS']['level']);
    ?>
</div>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="results">
	<thead>
		<tr>
			<th>No.</th>
			<th>Sub Category Name</th>
			<th>Activate</th>
		</tr>
	</thead>
	<tbody>
    <?php 
    $id = 0;
    foreach ($results_arr as $value) {
        $id++;
Esempio n. 2
0
function getSubCatAdm($db, $id, $level)
{
    $cat = getCatWid($db, $id, $level);
    $sql = "SELECT DISTINCT `subcat`,active,id,cat FROM `" . QUIZCAT . "` WHERE `cat`='" . $cat . "'";
    if ($level != 'admin') {
        $sql .= " AND `active` = '1'";
    }
    $sql .= " AND `subcat` <> '01111110'";
    $data = $db->fetch_all_array($sql);
    return $data;
}