コード例 #1
0
ファイル: CTable.php プロジェクト: rakotobe/Rakotobe
	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() ;
	}
コード例 #2
0
ファイル: CHtml.php プロジェクト: rakotobe/Rakotobe
	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;
	}