0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
classes
/
[
Home
]
File: Baseobj.class.php
<?php include_once(realpath(dirname(__FILE__)) . "/Requete.class.php"); // Classe Baseobj class Baseobj extends Requete{ var $bddvars = array(); function Baseobj(){ $this->Requete(); } function getListVarsSql(){ $listvars=""; for($i=0; $i<count($this->bddvars); $i++){ $listvars .= $this->bddvars[$i] . ","; } return substr($listvars, 0, strlen($listvars)-1); } function getListValsSql(){ $listvals=""; for($i=0; $i<count($this->bddvars); $i++){ $tempvar = $this->bddvars[$i]; if(get_magic_quotes_gpc()) $this->$tempvar = stripslashes($this->$tempvar); $this->$tempvar = mysql_real_escape_string($this->$tempvar, $this->link); $listvals .= "\"" . $this->$tempvar . "\","; } return substr($listvals, 0, strlen($listvals)-1); } function getVars($query){ if(! $resul = mysql_query($query, $this->link)) return 0; $row = mysql_fetch_object($resul); if($row){ for($i=0; $i<count($this->bddvars); $i++){ $tempvar = $this->bddvars[$i]; $this->$tempvar = $row->$tempvar; } return 1; } else return 0; return mysql_num_rows($resul); } function serialise_js(){ $this->host= ""; $this->login_mysql= ""; $this->password_mysql= ""; $this->db = ""; $this->link=""; $json = new Services_JSON(); return $json->encode($this); } } ?>
©
2018.