HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/content-sp/work-sp/nqb_master_section_oly.php
<?php
include_once('header.php');

$TEAM_ACCESS = 'csp_team_user_access';
$TEAM_WORK = 'csp_team_work';
$CSP_EDITORS = 'csp_editors';

//$pageArray = array();
if (@$editor_id != '') {
	$getWorks = $conn->query("SELECT w.work_name, w.work_code, w.display_status FROM $TEAM_ACCESS as tu LEFT JOIN $TEAM_WORK as w on w.work_id=tu.work_id where tu.editor_id='$editor_id' and w.parent_id='48' and tu.status='1' order by w.display_order asc");
}

// foreach ($getWorks as $w) {
// 	$pageArray[] = $w['work_code'];
// }

//print_r($pageArray);
$fileName = str_replace('.php', '', basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']));

?>

<style>
	.btn_style {
		font-size: 16px;
		margin: 2px;
	}
</style>
<div class="page-inner">
	<div class="page-title">
		<h3>Question Bank Structure</h3>
	</div>
	<div class="menuDiv">

		<?php foreach ($getWorks as $w) {
			if ($w['display_status'] != '0') {
		?>
				<a href="<?php echo $w['work_code']; ?>" class="btn <?php if ($pageName == $w['work_code'] . '.php') { ?>btn-primary <?php } else {
																																		echo "btn-success";
																																	} ?> btn_style"><?php echo $w['work_name']; ?></a>
		<?php }
		} ?>
	</div>


	<?php
	// if (!in_array($fileName, $pageArray)) {
	// 	include_once 'footer.php';
	// 	die();
	// }
	?>
	<div id="main-wrapper">