56 lines
1.1 KiB
PHP
56 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once( realpath( dirname( __FILE__ ) ) . "/../../../classes/Baseobj.class.php" );
|
|
|
|
class Tarifcolissimoexpert extends Baseobj{
|
|
|
|
var $id;
|
|
var $poidsmax;
|
|
var $tarif;
|
|
var $zone;
|
|
|
|
const TABLE = "tarifcolissimoexpert";
|
|
var $table=self::TABLE;
|
|
|
|
var $bddvars = array( "id" , "poidsmax", "tarif" , "zone" );
|
|
|
|
function __construct( $id = "" ) {
|
|
|
|
parent::__construct();
|
|
|
|
if ( $id != "" ) {
|
|
|
|
$this->charger( $id );
|
|
}
|
|
}
|
|
|
|
function charger( $id ) {
|
|
|
|
return $this->getVars( "select * from $this->table where id = " . intval( $id ) );
|
|
}
|
|
|
|
function chargerPoids( $poids , $zone = 1 ) {
|
|
|
|
return $this->getVars( "select * from $this->table where poidsmax = " . floatval( $poids ) . " AND zone = " . intval( $zone ) );
|
|
}
|
|
|
|
function delete( $requete ) {
|
|
|
|
$resul = $this->query( $requete );
|
|
CacheBase::getCache()->reset_cache();
|
|
}
|
|
|
|
function supprimer() {
|
|
|
|
if ( $this->id == 0 || $this->id == "" ) {
|
|
|
|
return;
|
|
}
|
|
|
|
$this->delete( "delete from $this->table where id = " . intval( $id ) );
|
|
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
?>
|