Skip to content

Commit

Permalink
gestion premium 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2choiz committed Apr 25, 2015
1 parent 331aa3a commit de185cf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Application/Controllers/ViewRecette.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,16 @@ public function getAllViewRecettes($param) { // obtenir toutes les recettes
//$where = " 1 ORDER BY `titre` ";

if(empty($param['droit']) ){
//premium s'il n'y a pas de parametre droit
//en attendant que les clients integre ce param
$param['droit']="premium";

//return $this->setApiResult(false, true, "la valeur 'droit' n'est pas défini");
//classique s'il n'y a pas de parametre droit
$param['droit']="classique";
}


//on effectue le tri par rapport au type de client
if ( $param['droit']==='membre' ) {
$where = " `droit`='1' ";
$where = " `droit`='classique' ";
} else if( $param['droit']==='premium' ) {
$where = " (`droit`='1' OR `droit`='2') ";
$where = " (`droit`='classique' OR `droit`='premium') ";
}else{ //l'admin a acces à tout
$where="";
}
Expand Down

0 comments on commit de185cf

Please sign in to comment.