Mini Shell

Direktori : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires2/models/
Upload File :
Current File : /home/admin/web/mcpv.demarco.ddnsfree.com/public_html/external/prestataires2/models/Prestataire.php

<?php

require_once '_framework/Model.php';
require_once '_framework/Crypto.php';
require_once '_framework/Configuration.php';

class Prestataire extends Model {
	
  private $crypto;
  
  function __construct() {
	$this->crypto = new Crypto();
  }

  public function getPrestataires() {
    $sql = 'select * from v_prestataires order by statut';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }
  public function getPendingPrestataires() {
    $sql = 'select * from v_prestataires where statut < 2 order by date_creat desc';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }

  public function getActivePrestataires() {
    $sql = 'select * from v_prestataires where statut = 2 order by note_g desc,lieu';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }

  public function getPrestataire($id) {
    $sql = 'select * from v_prestataires'
      . ' where id=?';
    $prestataires = $this->runQuery($sql, array($id));
	$records = $prestataires->fetchall();
    if ($records && count($records)) {
		return $records;
	}
    else
      throw new ErrorException("Aucun membre ne correspond à l'identifiant '$id'",0,E_USER_NOTICE);
  }

  public function addPrestataire($values) {
    $sql = 'insert into prestataires (fonct_id, nom, prenom, adresse, npa, lieu, tel, email, attrib1, attrib2, attrib3, remarque, statut, memb_creat)'
      . ' values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
    $this->runQuery($sql, $values);
  }

  public function deletePrestataire($id) {
    $sql = 'delete from prestataires'
      . ' where id=?';
    $prestataire = $this->runQuery($sql, array($id));
  }

  public function updatePrestataire($values) {
    $sql = 'update prestataires set nom=?, prenom=?, adresse=?, npa=?, lieu=?, tel=?, email=?, statut=?, attrib1=?, attrib2=?, attrib3=?, remarque=? '
      . ' where id=?';
    $prestataire = $this->runQuery($sql, $values);
  }

  public function updateStatut($values) {
    $sql = 'update prestataires set statut=? where id=?';
    $this->runQuery($sql, $values);
  }
  
  public function getUniqueNoms() {
    $sql = 'select distinct nom from v_prestataires where statut = 2 order by nom';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }
  
  public function getUniqueLieux() {
    $sql = 'select distinct lieu from v_prestataires where statut = 2 order by lieu';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }
  
  public function getUniqueFonctions() {
    $sql = 'select distinct fonction from v_prestataires where statut = 2 order by fonction';
    $prestataires = $this->runQuery($sql);
	$records = $prestataires->fetchall();
    return $records;
  }

}


December 29, 2020 – Page 3 – Base de données MCPV "Prestataires"

Day: December 29, 2020

Our selection is not just about imitating the look of luxury

NYC counterfeit bust seizes $1B in fake handbags and shoes Around Christmastime people are usually selling a lot more of their shoes. This customer wanted to sell two pairs of Yeezy DS 350 V2 shoes with different color schemes. The customer isn’t happy cheap fake shoes, but he’s not keeping up with the prices. That’s…

Read More

Some single-use male masturbators just like the Tenga Easy

For Discerning Adults Certified sex therapist Bat Sheva Marcus Charming Sexy Long Sleeves Midriff Lace Jampsuit For Ladies New Design Lace Spliecd With Mesh Tediies Bright-colored Deep V Neck Halter Lace Suit Jampsuit, Ph.D., MSW New Fashion Topless One-piece Deep V Neck Lingeries, MPH Adult Enchanting Lace Bandaged Low-cut Teddies, notes this is a brand…

Read More