";
}
public static function is_custom_values_exists($prefix, $datatype, $idchamp, $entity_id, $value) {
if ($value) {
$requete="select count(".$prefix."_custom_origine) from ".$prefix."_custom_values where ".$prefix."_custom_".$datatype."='".addslashes($value)."' and ".$prefix."_custom_champ=".$idchamp." and ".$prefix."_custom_origine='".$entity_id."'";
$resultat=pmb_mysql_query($requete);
if (!pmb_mysql_result($resultat, 0, 0)) {
$requete="insert into ".$prefix."_custom_values (".$prefix."_custom_champ,".$prefix."_custom_origine,".$prefix."_custom_".$datatype.") values(".$idchamp.",$entity_id,'".addslashes($value)."')";
pmb_mysql_query($requete);
}
}
}
public static function get_input_hidden_text($name, $value) {
return "";
}
public static function get_input_hidden_variable($name) {
$global_variable = $name;
global ${$global_variable};
if(${$global_variable} !== '') {
return "";
}
return "";
}
public static function get_input_hidden_caddie_variable($caddie_type) {
$input_hidden = static::get_input_hidden_variable(static::get_type()."ajt".$caddie_type);
$input_hidden .= static::get_input_hidden_variable(static::get_type()."_caddie_".$caddie_type);
return $input_hidden;
}
public static function get_caddie_form($caddie_type, $field_name, $table_name) {
global $msg;
global $PMBuserid;
$caddie_form = "
".$msg['import_choix_caddie_'.strtolower($caddie_type)]." ";
$requetetmpcad = "SELECT ".$field_name.", name FROM ".$table_name." where type='".strtoupper($caddie_type)."' and (autorisations='$PMBuserid' or autorisations like '$PMBuserid %' or autorisations like '% $PMBuserid %' or autorisations like '% $PMBuserid') order by name ";
$caddie_form .= gen_liste ($requetetmpcad, $field_name, "name", static::get_type()."_caddie_".$caddie_type, "", "", "", "","","",0);
$caddie_form .= "
";
return $caddie_form;
}
public static function get_caddies_form() {
return '';
}
public static function add_object_caddie($object_id, $object_type='NOTI', $idcaddie=0) {
$myCart = caddie_root::get_instance_from_object_type($object_type, $idcaddie);
$myCart->add_item($object_id, $object_type);
}
public static function get_link_caddie($caddie_type) {
global $msg;
$checkbox = static::get_type()."ajt".$caddie_type;
global ${$checkbox};
$idcaddie = static::get_type()."_caddie_".$caddie_type;
global ${$idcaddie};
$link_caddie = '';
if(!empty(${$checkbox}) && !empty(${$idcaddie})) {
$myCart = caddie_root::get_instance_from_object_type($caddie_type, ${$idcaddie});
import_records::add_object_caddie($notice_id, 'NOTI', $import_records_caddie_NOTI);
$link_caddie .= "