Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Baseobj.class.php");
class Codepromo_codepromo extends PluginsClassiques{
var $id;
var $code;
var $nom;
var $description;
var $action;
var $valeur;
var $statut;
var $table="codepromo";
var $bddvars = array("id", "code", "nom", "description", "action", "valeur", "statut");
function __construct($id=0){
parent::__construct();
if($id>0)
$this->charger_id($id);
}
function init(){
$query = "CREATE TABLE `codepromo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nom` varchar(50) NOT NULL,
`description` text NOT NULL,
`action` varchar(100) NOT NULL,
`valeur` float NOT NULL,
`code` varchar(100) NOT NULL,
`statut` smallint(6) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";
$resul = mysql_query($query, $this->link);
}
function charger($code){
return $this->getVars("select * from $this->table where code=\"$code\"");
}
function charger_id($id){
return $this->getVars("select * from $this->table where id=\"$id\"");
}
function charger_statut($code, $statut){
return $this->getVars("select * from $this->table where code='$code' AND statut IN(" . implode(",", $statut) . ")");
}
}
?>