<?php include 'includes/header.php'; $objSql = new SqlClass(); $sql = "SELECT id,standard FROM bm_standard_master"; $records = $objSql->executeSql($sql); ?> <!-- page heading start--> <div class="page-heading"> <h3>Manage Standards</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li> <li class="active"> Manage Standards </li> </ul> </div> <!-- page heading end--> <!--body wrapper start--> <section class="wrapper"> <!-- page start--> <?php if (isset($_GET['updated'])) { ?> <div class="row"> <div class="col-lg-12"> <div class="alert alert-success">Standard Updated Successfully</div> </div> </div> <?php
} } $objSql1 = new SqlClass(); $getStandardSql = "SELECT id,standard FROM bm_standard_master"; $standards = $objSql1->executeSql($getStandardSql); $objSql2 = new SqlClass(); $getSubjectSql = "SELECT id,subject FROM bm_subject_master"; $subjects = $objSql2->executeSql($getSubjectSql); $objSql3 = new SqlClass(); $getLevelSql = "SELECT id,level FROM bm_level_master"; $levels = $objSql3->executeSql($getLevelSql); if (isset($_POST['save_question'])) { /*echo '<pre>'; print_r($_POST); echo '</pre>';*/ $objSql4 = new SqlClass(); $_POST = $objSql4->sanitize($_POST); $db_columns = array('standard', 'subject', 'author', 'question_level', 'status', 'marks', 'question_type', 'question', 'answer'); $column_sring = implode(',', $db_columns); $column_vals = "'" . $_POST['standard'] . "'"; $column_vals .= ',' . "'" . $_POST['subject'] . "'"; $column_vals .= ',' . "'" . $_POST['author'] . "'"; $column_vals .= ',' . "'" . $_POST['level'] . "'"; $column_vals .= ',' . "'" . $_POST['status'] . "'"; $column_vals .= ',' . "'" . $_POST['marks'] . "'"; $column_vals .= ',' . "'" . $_POST['question_type'] . "'"; if (isset($_POST['question_type']) && $_POST['question_type'] == 'objective') { $obj_question_array = array('question' => $_POST['obj_question'], 'option_a' => $_POST['option_a'], 'option_b' => $_POST['option_b'], 'option_c' => $_POST['option_c'], 'option_d' => $_POST['option_d']); $obj_question = json_encode($obj_question_array); //echo $obj_question; $column_vals .= ',' . "'" . $obj_question . "'";
<?php session_start(); ob_start(); include "../lib/db.php"; $objSql = new SqlClass(); if (isset($_POST['login'])) { $username = $_REQUEST['username']; $password = md5($_REQUEST['password']); $query = "SELECT * FROM bm_admin WHERE username ='******' AND password ='******' and status='active'"; $objSql->setAdvanceErr(true); if ($record = $objSql->executeSql($query)) { if ($objSql->getNumRecord()) { while ($row = $objSql->fetchRow($record)) { $_SESSION['adminuser'] = $username; $_SESSION['admin_login'] = "******"; $_SESSION['admin_sessid'] = $row['id']; header("Location:index.php"); exit; } } else { $_SESSION['msg'] = "Login Credentials didn't match"; header("Location:login.php"); exit; } } } ?> <!DOCTYPE html> <html lang="en"> <head>
function display_scroll_text($type) { $sql = "SELECT * from scroll_text where status='1' and place_displayed='{$type}'"; $objSql1 = new SqlClass(); $record1 = $objSql1->executeSql($sql); return $record1; }
<?php include 'includes/header.php'; $objSql = new SqlClass(); $subject = ''; if (isset($_GET['id'])) { $record_id = $objSql->sanitize($_GET['id']); $sql = "SELECT id,subject FROM bm_subject_master WHERE id='{$record_id}'"; $query = $objSql->executeSql($sql); if ($query) { $record = $objSql->fetchRow($query); $subject = $record['subject']; } } if (isset($_POST['submit'])) { $record_id = $objSql->sanitize($_GET['id']); $subject = $objSql->sanitize($_POST['subject']); $sql = "UPDATE bm_subject_master SET subject='{$subject}' WHERE id='{$record_id}'"; $record = $objSql->executeSql($sql); if ($record) { header('location:manage_subjects.php?updated'); } } ?> <!-- page heading start--> <div class="page-heading"> <h3>Edit Subject</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li>
<?php include 'includes/header.php'; $objSql = new SqlClass(); if (isset($_POST['submit'])) { $new_standard = $objSql->sanitize($_POST['new_standard']); $sql = "INSERT INTO bm_standard_master(standard) values('" . $new_standard . "')"; $record = $objSql->executeSql($sql); if (!$record) { header('location:add_new_standsrd.php?error'); } } ?> <!-- page heading start--> <div class="page-heading"> <h3>Add New Standard</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li> <li class="active"> Add New Standard </li> </ul> </div> <!-- page heading end--> <!--body wrapper start--> <section class="wrapper"> <!-- page start--> <div class="row"> <div class="col-lg-6">
<?php include 'includes/header.php'; $objSql = new SqlClass(); $level = ''; if (isset($_GET['id'])) { $record_id = $objSql->sanitize($_GET['id']); $sql = "SELECT id,level FROM bm_level_master WHERE id='{$record_id}'"; $query = $objSql->executeSql($sql); if ($query) { $record = $objSql->fetchRow($query); $level = $record['level']; } } if (isset($_POST['submit'])) { $record_id = $objSql->sanitize($_GET['id']); $level = $objSql->sanitize($_POST['level']); $sql = "UPDATE bm_level_master SET level='{$level}' WHERE id='{$record_id}'"; $record = $objSql->executeSql($sql); if ($record) { header('location:manage_levels.php?updated'); } } ?> <!-- page heading start--> <div class="page-heading"> <h3>Edit Level</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li>
function makecount($table, $field, $value) { $query = "select count(" . $field . ") from " . $table . " where " . $field . "='" . $value . "'"; //echo $query; $objSql = new SqlClass(); $res = $objSql->executeSql($query); $row = $objSql->fetchRow($res); return $row; }
<?php include 'includes/header.php'; $objSql = new SqlClass(); $sql = "SELECT * FROM bm_students"; $record = $objSql->executeSql($sql); ?> <!-- page heading start--> <div class="page-heading"> <h3> Student List </h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li> <li class="active"> Student List</li> </ul> </div> <!-- page heading end--> <!--body wrapper start--> <div class="wrapper"> <div class="row"> <div class="col-sm-12"> <section class="panel"> <header class="panel-heading"> Student List </header> <div class="panel-body">
<?php include 'includes/header.php'; $objSql = new SqlClass(); if (isset($_POST['submit'])) { $new_level = $objSql->sanitize($_POST['new_level']); $sql = "INSERT INTO bm_level_master(level) values('" . $new_level . "')"; $record = $objSql->executeSql($sql); if (!$record) { header('location:add_new_level.php?error'); } else { header('location:manage_levels.php'); } } ?> <!-- page heading start--> <div class="page-heading"> <h3>Add New Level</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li> <li class="active"> Add New Level </li> </ul> </div> <!-- page heading end--> <!--body wrapper start--> <section class="wrapper"> <!-- page start-->
<?php include 'includes/header.php'; $objSql = new SqlClass(); if (isset($_POST['submit'])) { $new_subject = $objSql->sanitize($_POST['new_subject']); $sql = "INSERT INTO bm_subject_master(subject) values('" . $new_subject . "')"; $record = $objSql->executeSql($sql); if (!$record) { header('location:add_new_subject.php?error'); } } ?> <!-- page heading start--> <div class="page-heading"> <h3>Add New Subject</h3> <ul class="breadcrumb"> <li> <a href="index.php">Dashboard</a> </li> <li class="active"> Add New Subject </li> </ul> </div> <!-- page heading end--> <!--body wrapper start--> <section class="wrapper"> <!-- page start--> <div class="row"> <div class="col-lg-6">