function reverse_etat() { if ($this->table['tablename'] == 'entreprise') $oOperation = new COperations($this->table['tablename'], $this->table['id_ent']) ; else if ($this->table['tablename'] == 'cat') $oOperation = new COperations($this->table['tablename'], $this->table['id_cat']) ; else if ($this->table['tablename'] == 'secteur') $oOperation = new COperations($this->table['tablename'], $this->table['id_sec']) ; else $oOperation = new COperations($this->table['tablename'], $this->table['id']) ; return $oOperation->reverseEtat() ; }
static function get_down($tablename, $id, $actif=0) { /* if($actif) { $sql = "select isendrang_" . $tablename . "(" . $id . ") as ok"; $res = CBdd::select_one($sql, 'ok'); $ret = ($res!=1) ? "<a href=?id=$id&a=1><img src='../img/downarrow.png' alt='down' /></a>" : ""; } else { $sql = "select isendrang_" . $tablename . "(" . $id . ") as ok"; $res = CBdd::select_one($sql, 'ok'); $ret = ($res!=1) ? "<img src='../img/downarrow.png' alt='down' class='grise'/>" : ""; } */ $oOperation = new COperations($tablename, $id) ; $res = $oOperation->isEndRang() ; if($actif) { $ret = ($res!=1) ? "<a href=?id=$id&a=1><img src='../img/downarrow.png' alt='down' /></a>" : ""; } else { $ret = ($res!=1) ? "<img src='../img/downarrow.png' alt='down' class='grise'/>" : ""; } return $ret; }