static function is_max($max = null) { $tuser = new CTableUtilisateur(); if($max === null) { $max = CTableConfiguration::get_value_by_element('USER_MAX_NUMBER'); } if($max <= 0) { return false; } return ($tuser->get_nb() >= $max); }
$id1= $_group['id']; $etat = $_group ['etat']; $sql1 = "SELECT text FROM groupeUtilitaire WHERE id = " . $id1; $text = CBdd::select_one($sql1,'text'); // Owen 01/2011 suppression contact à partir de vider groupe $text1=str_replace("|",",",$text); $tab = explode(",",$text1); $text2=count($tab); // SUPPRESSION DES COMMUNES SELECTIONNEE if(!empty($_POST['ids'])) $ids = $_POST['ids']; if(is_array($ids)) { foreach($ids as $id) { //print_r($id); $obj = new CTableUtilisateur(array('id_ent'=>$id)); $obj->delete(); } } // FIN SUPPRESSION COMMUNE // VIDAGE GROUPE COMMUNE $tgroupe->update(); // INSERTION DES AUTRES COMMUNES for ($i=0; $i<$text2 and $text2!=0; $i++){ if ($tab[$i]!=''){ //echo 'id_groupe'.$_SESSION['id_groupe']; $xZsql = "SELECT id_ent FROM entreprise WHERE id_ent=".$tab[$i]; //echo $xZsql; $ident = CBdd::select_one($xZsql,'id_ent');
$msginfo = "Enregistrement bien effectué"; $a = 0; break; case 8 : // ETAT CONTACT if(!empty($_GET['id'])) $id = $_GET['id']; $use = new CTableUtilisateur(array('id_ent'=>$id)); $use->reverse_etat_contact(); break; case 9 : // OPPORTUNITE if(!empty($_GET['id'])) $id = $_GET['id']; if(!empty($_GET['idopportunite'])) $idopportunite = $_GET['idopportunite']; $use = new CTableUtilisateur(array('id_ent'=>$id, 'idopportunite'=>$idopportunite)); $use->update(); break; } // VALEUR SESSION $filtre_resp_ = CSession::get('filtre_resp', '%%'); $filtre_resp = CFunctions::remove($filtre_resp_); $filtre_etat_contact = CSession::get('filtre_etat_contact', '%%'); $filtre_id_groupe = CSession::get('filtre_id_groupe', $id_groupe); $filtre_email = CSession::get('filtre_email', '%%'); $filtre_nom = CSession::get('filtre_nom', '%%'); $pays_id = CSession::get('pays_id', '%%'); $sql_idcom="select DISTINCT commune_alias FROM entreprise WHERE pays_ent='".$pays_id."'";