Esempio n. 1
0
<?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">
Esempio n. 2
0
}
$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 . "'";
        $column_vals .= ',' . "'" . $_POST['obj_answer'] . "'";
Esempio n. 3
0
<?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>
Esempio n. 4
0
<?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>
Esempio n. 5
0
<?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-->
Esempio n. 6
0
<?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">
Esempio n. 7
0
<?php

include 'includes/header.php';
$objSql = new SqlClass();
$standard = '';
if (isset($_GET['id'])) {
    $record_id = $objSql->sanitize($_GET['id']);
    $sql = "SELECT id,standard FROM bm_standard_master WHERE id='{$record_id}'";
    $query = $objSql->executeSql($sql);
    if ($query) {
        $record = $objSql->fetchRow($query);
        $standard = $record['standard'];
    }
}
if (isset($_POST['submit'])) {
    $record_id = $objSql->sanitize($_GET['id']);
    $standard = $objSql->sanitize($_POST['standard']);
    $sql = "UPDATE bm_standard_master SET standard='{$standard}' WHERE id='{$record_id}'";
    $record = $objSql->executeSql($sql);
    if ($record) {
        header('location:manage_standards.php?updated');
    }
}
?>
<!-- page heading start-->
<div class="page-heading">
    <h3>Edit Standard</h3>
    <ul class="breadcrumb">
        <li>
            <a href="index.php">Dashboard</a>
        </li>