コード例 #1
0
ファイル: area.php プロジェクト: usmanali126/injectpoint
}
if (isset($_POST['submit'])) {
    print_r($_POST);
    foreach ($_POST as $key => $value) {
        if (empty($_POST[$key])) {
            $error = 'Fill empty fields first.';
        } else {
            $data[$key] = $value;
        }
    }
    if (!isset($error)) {
        $obj = new inject_record();
        $add_result = $obj->add_area();
    }
}
$obj = new inject_record();
$uc_result = $obj->get_uc();
$result = $obj->get_area(null);
//print_r($result);
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>Add Area</title>
        <?php 
require 'inc/head.php';
コード例 #2
0
if (isset($_POST['id'])) {
    $obj = new inject_record();
    $result = $obj->get_area($_POST['id']);
    while ($row = mysqli_fetch_array($result)) {
        $data[] = array($row['number'], $row['name'], $row['hw_name']);
    }
    if (is_null($data)) {
        $result = array('a');
        echo json_encode($result);
    } else {
        echo json_encode($data);
    }
    exit;
}
if (isset($_POST['mcard'])) {
    $obj = new inject_record();
    $result = $obj->get_info($_POST['mcard']);
    while ($row = mysqli_fetch_array($result)) {
        $data = array($row['m_card'], $row['m_name'], $row['father_name'], $row['cell_number'], $row['concile_id'], $row['area_id'], $row['address']);
    }
    if (is_null($data)) {
        $result = array('Not Avail able');
        echo json_encode($result);
    } else {
        echo json_encode($data);
    }
    exit;
}
class inject_record
{
    function db_connection()
コード例 #3
0
ファイル: index.php プロジェクト: usmanali126/injectpoint
    //print_r($_POST);
    if (empty($_POST['user_name']) || empty($_POST['user_password'])) {
        $blank = 'Please fill both fileds';
    } else {
        $obj = new inject_record();
        $result = $obj->login();
        if ($result == TRUE) {
            $error = TRUE;
        }
    }
}
if (isset($_GET['login'])) {
    $login = TRUE;
}
if (isset($_GET['logout'])) {
    $obj = new inject_record();
    $result = $obj->logout();
    if ($result == TRUE) {
        $msg = TRUE;
    }
}
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>Log in</title>
コード例 #4
0
    $obj = new inject_record();
    $data = array("card" => $_POST['mcard'], "card_column" => "m_card");
    $result = $obj->get_info($data);
    while ($row = mysqli_fetch_array($result)) {
        $data = array($row['m_card'], $row['m_name'], $row['father_name'], $row['cell_number'], $row['concile_id'], $row['area_id'], $row['address']);
    }
    if (is_null($data)) {
        $result = array('Not Avail able');
        echo json_encode($result);
    } else {
        echo json_encode($data);
    }
    exit;
}
if (isset($_POST['card'])) {
    $obj = new inject_record();
    $param = array("card" => $_POST['card'], "card_column" => $_POST['column']);
    $result = $obj->get_info($param);
    //echo $result;
    //exit;
    if (mysqli_num_rows($result) == 1) {
        //echo '<span>this card no already register'.$_POST['card'].'<span>';
        echo 0;
    } else {
        echo 1;
    }
    exit;
}
class inject_record
{
    function db_connection()
コード例 #5
0
ファイル: report.php プロジェクト: usmanali126/injectpoint
<?php

require 'classes/inject_record.php';
if (!isset($_SESSION['name'])) {
    header('Location:index.php?login=login');
}
$opv = $ipv = $bcg = $p1 = $p2 = $p3 = $m1 = $m2 = $tt1 = $tt2 = 0;
if (isset($_POST['date_search'])) {
    $obj = new inject_record();
    $date = $_POST['date'];
    //echo '%'.$date;
    //exit;
    $result = $obj->report('%' . $date);
    $total_inject = mysqli_num_rows($result);
    while ($row = mysqli_fetch_array($result)) {
        // print_r($row);
        if (preg_match('/' . $date . '/', $row['opv1'])) {
            $opv++;
        }
        if (preg_match('/' . $date . '/', $row['opv2'])) {
            $ipv++;
        }
        if (preg_match('/' . $date . '/', $row['1_inj'])) {
            $bcg++;
        }
        if (preg_match('/' . $date . '/', $row['2_inj'])) {
            $p1++;
        }
        if (preg_match('/' . $date . '/', $row['3_inj'])) {
            $p2++;
        }
コード例 #6
0
ファイル: uc.php プロジェクト: usmanali126/injectpoint
}
if (isset($_POST['submit'])) {
    //print_r($_POST);
    foreach ($_POST as $key => $value) {
        if (empty($_POST[$key])) {
            $error = 'Fill empty fields first.';
        } else {
            $data[$key] = $value;
        }
    }
    if (!isset($error)) {
        $obj = new inject_record();
        $add_result = $obj->add_uc();
    }
}
$obj = new inject_record();
$result = $obj->get_uc();
//print_r($result);
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>Add Uc</title>
        <?php 
require 'inc/head.php';
?>
コード例 #7
0
ファイル: record.php プロジェクト: usmanali126/injectpoint
                    $date = $_POST['odate'][$i];
                }
                $parm = array($_POST['card_number'], $index, $date, $card_column);
                $obj = new inject_record();
                $result = $obj->update_injection($parm);
                break;
                //}else{
                //echo '<br>epmty';
            }
            $i++;
        }
    }
    //exit();
    if (isset($result) && $result == TRUE) {
        $data = array("card" => $_POST['card_number'], "card_column" => $card_column);
        $obj = new inject_record();
        $result = $obj->get_info($data);
        $row = mysqli_fetch_array($result);
        $dob = date_create($row['dob']);
        $curren_date = date_create(date('Y-m-d'));
        $diff = date_diff($dob, $curren_date);
        //echo $diff->format("%R%a days");
        $days = $diff->format("%a");
    } else {
        $error = 'Try Again';
    }
}
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.