Ejemplo n.º 1
0
 public static function read_by_doc($doc_id)
 {
     return parent::read(['id'], FALSE, ['doc_id = ?', $doc_id])[0];
 }
Ejemplo n.º 2
0
if ($_POST) {
    $id = $_POST['id'];
    $update = $_POST['record'];
    if ($record->update($id, $update)) {
        Flash::success('Record Successfully Updated!!');
        unset($_POST);
    } else {
        Flash::error('Record Could Not Be Updated!!');
    }
}
if (isset($_GET['id'])) {
    $user_id = $_GET['id'];
} else {
    $user_id = $_SESSION['user_id'];
}
$data = $record->read($user_id);
require 'templates/header.php';
?>

<div id="page-wrapper">

<div class="container-fluid">

    <!-- Page Heading -->
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Patient Record
                <small>View Records</small>
            </h1>
            <ol class="breadcrumb">
Ejemplo n.º 3
0
 public static function find_one($email, $password)
 {
     $c_password = crypt($password, SALT);
     $model = parent::read(['*'], TRUE, ['email = ? AND password = ?', $email, $c_password]);
     return isset($model['error']) ? FALSE : $model;
 }
Ejemplo n.º 4
0
 public static function by_name($name)
 {
     return parent::read(['doc.*', self::$props['content']], TRUE, ["name = ?", $name]);
 }