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/Avis.php

<?php

require_once '_framework/Model.php';

class Avis extends Model {

  public function getAllAvis() {

    $sql = 'select * from v_avis order by statut, date_avis';
    $avis = $this->runQuery($sql);
    return $avis->fetchAll();
  }

  public function getAvis($id) {
    $sql = 'select * from v_avis where id=?';
    $avis = $this->runQuery($sql, array($id));
    $rs = $avis->fetchAll();
    if ($rs && count($rs)) {
      return $rs; 
    }
    else
      throw new ErrorException("Aucun avis ne correspond à l'identifiant '$id'",0,E_USER_NOTICE);
  }
  
  public function getPrestataireAvis($id) {
    $sql = 'select * from v_avis where statut = 2 and prest_id = ?';
    return $this->runQuery($sql, array($id));
  }

  public function updateStatut($values) {
	$statut = $values[0];
	$avis_id = $values[1];
	$sql = 'update avis set	statut = ? where id=?';
	$this->runQuery($sql, $values);
	$sql = 'select prest_id from v_avis where id=?';
	$prestataire = $this->runQuery($sql, array($avis_id));
	$rs = $prestataire->fetch();
	$id = $rs['prest_id'];
	if($statut === 2) {
		$this->updateNotes($id);
	}
  }
  
  public function updateNotes($id){
	$sql = 'select
				(select round(avg(note1),2) from avis where prest_id = p.id and statut = 2 and not na1) as avg_c1,
				(select round(avg(note2),2) from avis where prest_id = p.id and statut = 2 and not na2) as avg_c2,
				(select round(avg(note3),2) from avis where prest_id = p.id and statut = 2 and not na3) as avg_c3,
				(select round(avg(note4),2) from avis where prest_id = p.id and statut = 2 and not na4) as avg_c4,
				(select round(avg(note5),2) from avis where prest_id = p.id and statut = 2 and not na5) as avg_c5,
				(select round(avg(note6),2) from avis where prest_id = p.id and statut = 2 and not na6) as avg_c6,
				(select round(avg(note7),2) from avis where prest_id = p.id and statut = 2 and not na7) as avg_c7,
				(select round(avg(note8),2) from avis where prest_id = p.id and statut = 2 and not na8) as avg_c8,
				(select round(avg(note9),2) from avis where prest_id = p.id and statut = 2 and not na9) as avg_c9,
				(select round(avg(note10),2) from avis where prest_id = p.id and statut = 2 and not na10) as avg_c10,
				round(round((select ifnull(sum(note1),0) from avis where prest_id = p.id and statut = 2 and not na1) +
					(select ifnull(sum(note2),0) from avis where prest_id = p.id and statut = 2 and not na2) +
					(select ifnull(sum(note3),0) from avis where prest_id = p.id and statut = 2 and not na3) +
					(select ifnull(sum(note4),0) from avis where prest_id = p.id and statut = 2 and not na4) + 
					(select ifnull(sum(note5),0) from avis where prest_id = p.id and statut = 2 and not na5) +
					(select ifnull(sum(note6),0) from avis where prest_id = p.id and statut = 2 and not na6) +
					(select ifnull(sum(note7),0) from avis where prest_id = p.id and statut = 2 and not na7) +
					(select ifnull(sum(note8),0) from avis where prest_id = p.id and statut = 2 and not na8) +
					(select ifnull(sum(note9),0) from avis where prest_id = p.id and statut = 2 and not na9) +
					(select ifnull(sum(note10),0) from avis where prest_id = p.id and statut = 2 and not na10),2) /
					(round((select count(note1) from avis where prest_id = p.id and statut = 2 and not na1) +
					(select count(note2) from avis where prest_id = p.id and statut = 2 and not na2) +
					(select count(note3) from avis where prest_id = p.id and statut = 2 and not na3) +
					(select count(note4) from avis where prest_id = p.id and statut = 2 and not na4) + 
					(select count(note5) from avis where prest_id = p.id and statut = 2 and not na5) +
					(select count(note6) from avis where prest_id = p.id and statut = 2 and not na6) +
					(select count(note7) from avis where prest_id = p.id and statut = 2 and not na7) +
					(select count(note8) from avis where prest_id = p.id and statut = 2 and not na8) +
					(select count(note9) from avis where prest_id = p.id and statut = 2 and not na9) +
					(select count(note10) from avis where prest_id = p.id and statut = 2 and not na10),2)),2) as avg_g
				from prestataires p
				where p.id = ?';
	$calc = $this->runQuery($sql, array($id));
	$rs = $calc->fetch();
	$avg_c1 = $rs['avg_c1'];
	$avg_c2 = $rs['avg_c2'];
	$avg_c3 = $rs['avg_c3'];
	$avg_c4 = $rs['avg_c4'];
	$avg_c5 = $rs['avg_c5'];
	$avg_c6 = $rs['avg_c6'];
	$avg_c7 = $rs['avg_c7'];
	$avg_c8 = $rs['avg_c8'];
	$avg_c9 = $rs['avg_c9'];
	$avg_c10 = $rs['avg_c10'];
	$avg_g = $rs['avg_g'];
	$values = array();
	array_push($values,$avg_c1);
	array_push($values,$avg_c2);
	array_push($values,$avg_c3);
	array_push($values,$avg_c4);
	array_push($values,$avg_c5);
	array_push($values,$avg_c6);
	array_push($values,$avg_c7);
	array_push($values,$avg_c8);
	array_push($values,$avg_c9);
	array_push($values,$avg_c10);
	array_push($values,$avg_g);
	array_push($values,$id);
	$sql = 'update prestataires set note1 = ?, note2 = ?, note3 = ?, note4 = ?, note5 = ?, note6 = ?, 
			note7 = ?, note8 = ?, note9 = ?, note10 = ?, note_g = ? 
			where id=?';
	$this->runQuery($sql, $values);
  }
    
  public function submitAvis($values) {
    $sql = 'insert into avis (prest_id,note1,note2,note3,note4,note5,note6,note7,note8,note9,note10, 
			na1,na2,na3,na4,na5,na6,na7,na8,na9,na10,remarque,anonyme,memb_nom,memb_email) 
			values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
    $this->runQuery($sql, $values);
  }
  
}
While the size may not be beginner-friendly – Base de données MCPV "Prestataires"

While the size may not be beginner-friendly

Buy Squishy & Gentle Dildos

I think the torque-oriented rumbles may not be for you when you have a sensitive clitoris. Especially with the hands-free using mode Gauge Penis Pump – Pull Rod, you can take pleasure in vaginal stimulation and use one other sex toy to enhance the expertise with clit stimulation. This is necessary as some folks favor a softer model as a end result of it gives a gentler expertise than a firmer shaft. But please note it’s more challenging to focus on specific areas, just like the G-spot, with a softer, sensible dildo. The suction cup base also lets you discover pegging with your companion in case you have a 2″ diameter O-ring harness (circled below). While the size may not be beginner-friendly, intermediary and experienced people will appreciate the flexibility.

As the name implies, We-Vibe emphasizes couples’ play, specializing in toys you’ll have the ability to management with the company’s app from anyplace with an internet connection. That means you and your companion can stay connected and engage in varied actions, even when considered one of you is touring. The app enables you to put the device’s controls in your partner’s palms, so you won’t know what to expect concerning depth or movement.

Each of them tried out toys in a ton of different positions and settings, evaluating components such as the material, ergonomics, width, size, and whether they were harness-compatible. At Women’s Health Leather Male Chastity Belt With Cuffs, we are always being sent the most recent intercourse tech, dildos and lubes. Lucky for us — and for you Fetish Full Body Harness With Double Cuffs, as a outcome of it enables our group of intercourse writers to test them out and discover the best toys in the marketplace, only for you (selfless, we know).

Some Leather Chain Bra G-String Bondage Clubwear, just like the 18 inch dildo toys are thought-about an excessive dildo. Good for temperature play (glass could be heated or cooled) a glass dildo is usually constructed so superbly they resemble a sculpture. Kohana is a haunting masterpiece of dark fantasy — an ovipositor born from the twisted union of Cthulhu-inspired horror and the monstrous bloom of the Rafflesia. Its gaping, petal-lined maw opens like a portal to another realm Emily Realistic Masturbation Ass, blending grotesque magnificence with alien starvation. Each egg it delivers feels like a part of an unholy ceremony Harness For Kinky Femdom Look, pulling you right into a world the place pleasure and horror entwine.

Especially the veiny shaft, defined coronal ridge Ground Remote Control Jump Egg, and floating testicles stand out from the competitors. Dirk can be Vac-U-Lock-compatible, making it simple to make use of with a harness or sex machine. Butt plug training units embody a number of sizes of starter butt plugs in a single set. This is a cost efficient way to stock your intercourse toy assortment. Some of the most well-liked and best butt plugs & newbie anal toys are tapered, small and delicate LALA’S Dream Sex Toy, others are large, intense and weighted. Big hole butt plugs on the market are designed for kinky anal play and fetish experimentation.

Furthermore, dildos may also be molds of someone’s penis, adding a sense of realism. Often made of silicone Leather Male Chastity Belt With Cuffs0, stainless steel, or metallic, cock rings are available non-vibrating and vibrating models, many of which could be remote- and app-controlled Bondage Opera Gloves, permitting for foreplay. Start with a simple silicone ring, lube up, and place the ring round a flaccid or semi-erect penis. TheAdultToyShop.com is the premier online dildo store for ladies.

Buy Squishy & Gentle Dildos I think the torque-oriented rumbles may not be for you when you have a sensitive clitoris. Especially with the hands-free using mode Gauge Penis Pump – Pull Rod, you can take pleasure in vaginal stimulation and use one other sex toy to enhance the expertise with clit stimulation. This is…

Leave a Reply

Your email address will not be published. Required fields are marked *