Beispiel #1
0
{
    if (!is_dir('uploads')) {
        die('Upload folder not exists');
    } elseif (!is_writable('uploads')) {
        die('Not enough permission on uploads folder');
    }
}
$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'] . "'";
Beispiel #2
0
<?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 
Beispiel #3
0
 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;
 }
Beispiel #4
0
<?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>
Beispiel #5
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>
Beispiel #6
0
 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;
 }