Exemplo n.º 1
0
 public function Update($first_name, $last_name, $phone, $email, $source, $notes, $active, $id)
 {
     $first_name = ucwords($first_name);
     $last_name = ucwords($last_name);
     $email = strtolower($email);
     $date = date("Y-m-d");
     $sql = "  first_name =:first_name,last_name =:last_name,phone =:phone,email =:email,source =:source,notes =:notes,date =:date, active =:active WHERE id = :id ";
     $data = array(':first_name' => $first_name, ':last_name' => $last_name, ':phone' => $phone, ':email' => $email, ':source' => $source, ':notes' => $notes, ':date' => $date, ':active' => $active, ':id' => $id);
     HDB::hus()->Hupdate('patients', $sql, $data);
 }
Exemplo n.º 2
0
 public function AutoSearch($qstring, $limit, $where)
 {
     $stmt = HDB::hus()->prepare("SELECT * FROM " . H_SYSTEM_ACCESS . " WHERE {$where} LIKE :svalue LIMIT {$limit}");
     $stmt->bindValue(':svalue', "%{$qstring}");
     $stmt->execute();
     return $stmt->fetchAll(PDO::FETCH_OBJ);
 }
Exemplo n.º 3
0
        
    <div <div class="form-group">
    <label for="selsear" class="control-label"><?php 
    echo LANG_CSV_TO;
    ?>
</label>
    <select name="tablename" id="tablename"  class="form-control choz" required>
    <option value="<?php 
    echo get('himport');
    ?>
"><?php 
    echo get('himport');
    ?>
</option>
    <?php 
    foreach (HDB::hus()->query("SHOW TABLES") as $row) {
        ?>
    <option value="<?php 
        echo $row[0];
        ?>
"><?php 
        echo $row[0];
        ?>
</option>
    <?php 
    }
    ?>
    </select>
    </div>
    
        
Exemplo n.º 4
0
 function MultiFilesUpload($prid, $path_main)
 {
     for ($i = 0; $i < count($_FILES['gfile']['name']); $i++) {
         if (!@file_exists($path_main)) {
             die("Make sure Upload directory exist!");
         }
         if ($_POST) {
             if (!isset($_FILES['gfile']['name'][$i])) {
                 die("File is empty!");
             }
             if ($_FILES['gfile']['error'][$i]) {
                 die($this->upload_errors($_FILES['gfile']['error'][$i]));
             }
             $FileName = strtolower($_FILES['gfile']['name'][$i]);
             $fileExt = substr($FileName, strrpos($FileName, '.'));
             $FileType = $_FILES['gfile']['type'][$i];
             //file type
             $FileSize = $_FILES['gfile']["size"][$i];
             //file size
             $RandNumber = $this->randNum();
             //$uploaded_date	= date("Y-m-d H:i:s");
             $mianext = substr($fileExt, 1);
             //valid entensions
             $this->ValidFileExt($mianext);
             $Hfilename = $RandNumber . '.' . $mianext;
             if (move_uploaded_file($_FILES['gfile']["tmp_name"][$i], $path_main . $Hfilename)) {
                 //$dbc=new dboptions();
                 $valuesd = array(array('' . H_FILE . '' => $Hfilename, '' . RELATE_ID . '' => $prid, '' . H_DATE . '' => date('Y-m-d')));
                 HDB::hus()->Hinsert(UPLOAD_TABLE, $valuesd);
             } else {
                 die('An error occured while trying to upload File!');
             }
         }
     }
 }
Exemplo n.º 5
0
 public static function hus()
 {
     if (!self::$instance) {
         self::$instance = new HezecomDB("" . DB_TYPE . ":host=" . LOCALHOST . ";dbname=" . DB_NAME . "", DB_USERNAME, DB_PASSWORD);
     }
     return self::$instance;
 }
Exemplo n.º 6
0
 public function Update($id_patient, $card, $date, $id)
 {
     $sql = "  id_patient =:id_patient,card =:card,date =:date WHERE id = :id ";
     $data = array(':id_patient' => $id_patient, ':card' => $card, ':date' => $date, ':id' => $id);
     HDB::hus()->Hupdate('cards', $sql, $data);
 }