Exemple #1
0
	static function is_max($max = null) {
		$tuser = new CTableCommune();
		
		if($max === null) {
			$max = CTableConfiguration::get_value_by_element('USER_MAX_NUMBER');
		}
		
		if($max <= 0) {
			return false;
		}
		
		return ($tuser->get_nb() >= $max);
	}
		
case 1 : // Diminuer pass
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$use = new CTableCommune(array('id'=>$id));
	$use->down_pass();
	break;

case 11 : // Améliorer pass
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$use = new CTableCommune(array('id'=>$id));
	$use->up_pass();
	break;

case 2 : // Modifier etat
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$use = new CTableCommune(array('id'=>$id));
	$use->reverse_etat();
	break;
	
case 3 : // Supprimer 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	break;
	
case 33 : // Supprimer 2

	$tab_user = array();
	
	if(!empty($_GET['id'])) $id = $_GET['id'];
	
	$Zsql = "SELECT id_ent FROM entreprise WHERE commune_alias=".$_SESSION['idgroupe'];
	$ident = CBdd::select_one($Zsql,'id_ent');
Exemple #3
0
		$error_signe['menu'] = '*';
	}
	
	if ($nom=='') {
		$error_type = 2;
		$error_signe['nom'] = '*';
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = 'Champ non valide';
		break;
	}
	
	$values = array('id_com'=>$id, 'nom_com'=>CFunction::addslashes($nom),'urlCommune'=>CFunction::addslashes($url), 'CP'=>$cp, 'departement'=>CFunction::addslashes($departement));
		
	$tcat = new CTableCommune($values);
	$tcat->update();
	$msginfo = 'Commune bien modifi&eacute;e';
	$a = 0;
	break;
case 6 : // Filtrer Menu
	if(isset($_GET['idpays'])) $idpays = $_GET['idpays'];
	$_SESSION['idpays'] = $idpays;
	break;
case 66 : // Filtrer Menu
	if(isset($_GET['ville'])) $ville = $_GET['ville'];
	$_SESSION['ville'] = $ville;
	//print_r($_SESSION['idpays']);
	break;
case 7 : // GROUPE
	if(isset($_POST['id_groupe'])) 		$id_groupe 		= $_POST['id_groupe'];
Exemple #4
0
	if ($idcom) {
		CBdd::update("UPDATE user SET commune_alias=".$idcom." WHERE id=".$id."");
		
		// Verification concordance pays commune
		$departement = CTableCommune::recupnomCom('commune', 'departement', 'id_com',$idcom);
		$paysV = CTableCommune::recupnomCom('departement', 'pays', 'id_dep',$departement);
		// Traitement erreur
		$use = new CTableCommuneD(array('id_user'=>$id));
		$use->delete();
	}
	else {
		// Estexiste
		$where = "nom_comD = '".$ville."', pays ='".$pays."',id_user ='******'";
		$idcom = CTableCommune::recupnomCom('communeD', 'id_user', 'id_user', $id);
		if ($idcom) CTableCommune::updatecom2('communeD', $where, 'id_user', $id);
		else CTableCommune::insert2('communeD', $where);
	}
	
	if ($login=="") {
		$error_type = 1;
		$error_signe['login'] = "******";
	}
	if ($passe=="") {
		$error_type = 2;
		$error_signe['passe'] = "*";
	}
	if ($paysV){
	if ($paysV != $pays){	
			CBdd::update("UPDATE user SET commune_alias=".$idcomA." WHERE id=".$id."");
			$error_signe['pays'] = "*";
			$error_type = 3;
Exemple #5
0
		  </p>
		  <p class="go clear">
             <label>CP</label>
             <input type="text" name="txtcle" id="txtcle" class="text" />
             <input type="button" name="bout" value="Go" onClick="test(document.forms.form_ajout.txtcle.value, <? echo $id; ?>,4)">
          </p>
		  <ul class="cleExemple" id="cp">
          	  	<? 
					// Récupération donnée
					if ($Recup1){
					$i = 0;
					while ($listeQ1 = mysql_fetch_array($Recup1)) {
					$i++;
						 // Traitement suppression
						  if (($_GET['p']==7) && ($listeQ['id_cp'] == $_GET['idm'])) {
							CTableCommune::updatecom('CpQuartier', 'nom_cp', '', 'id_cp', $listeQ['id_cp']);
							$listeQ['id_cp']='vide';
						  }
						  
						// Affichage cp
						if ($listeQ1['nom_cp'] == '') $test = 1;
						if (($listeQ1['id_cp']!='vide') && ($listeQ1['nom_cp'] !='')) {
							?>
							<li class="clear" <?  if ($test == 1) $a = 2; else $a = 1; if ($i == $a)  echo 'style="border-top:1px solid #e4b097";'; ?> >
							<span><? echo $listeQ1['nom_cp']?></span>
							<a href="<? if (($_GET['s']==7) && ($listeQ1['id_cp'] == $_GET['idm'])) echo '?id='.$id.'&idm='.$listeQ1['id_cp'].'&a=4&s=7&p=7'; else echo '?id='.$id.'&idm='.$listeQ1['id_cp'].'&a=4&s=7' ?>"  title="Supprimer" style="width:15px; text-align:center;padding-right:7px"><? if (($_GET['s']=='7') && ($listeQ1['id_cp'] == $_GET['idm'])) echo 'OK?'; else echo '<img src=\'../img/delete.png\' alt=\'delete\' />'; ?></a>
							</li>
				<?} } } ?>			 
          </ul>
		  <hr class="clearfloat" />
        
Exemple #6
0
      <th>Actif</th>
      <th>Modif</th>
      <th>Suppr</th>
      <th>Envoi</th>
      <th>Q/R</th>
      <th><input name="select" type="checkbox" id="select" onclick="reverse_check()" value="" checked/></th>
    </tr>
    <?php
          $i = 0;
          while ($user = mysql_fetch_array($r_user)) {
				
				// Récuperatoion pays
				$idcom1 = $user['commune_alias'];
				if ($idcom1){
					$departement = CTableCommune::recupnomCom('commune', 'departement', 'id_com',$idcom1);
					$paysnom = CTableCommune::recupnomCom('departement', 'pays', 'id_pays', $departement);					
				}else {
					$pay = recupnomCom('communeD', 'pays', 'id_user', $user['id']);
					$paysnom = recupnomCom('pays', 'nom', 'id_pays',$pay);
				}
				
				$relance = CBdd::select_row("SELECT COUNT(id) as num FROM email WHERE date < NOW() AND type='relance' AND destinataire LIKE '%".$user['email']."%'");

      ?>
    <tr>
      <td><a href="?a=5&id=<?php echo $user['id'] ?>"><?php echo $user['id'] ?></a></td>
      <td class="zinfo">
	  <?php 
	  // LIMITATION DE CARACTERE POUR NOM
	  $__text = CFunctions::cut_string($user['nom'], $max_input_text+3);
      echo $__text;
Exemple #7
0
      <th><input name="select" type="checkbox" id="select" onclick="reverse_check()" value="" checked/></th>
    </tr>
    <?php
          $i = 0;
          while ($user = mysql_fetch_array($r_user)) {
				
				// Récuperatoion pays
				$idcom1 = $user['commune_alias'];
				
				if ($idcom1){
					$departement = CTableCommune::recupnomCom('commune', 'departement', 'id_com',$idcom1);
					$idpays= CTableCommune::recupnomCom('departement', 'pays', 'id_dep', $departement);	
					$paysnom = CTableCommune::recupnomCom('pays', 'id', 'id_pays',$idpays);
				}else {
					$pay = CTableCommune::recupnomCom('communeD', 'pays', 'id_user', $user['id']);
					$paysnom = CTableCommune::recupnomCom('pays', 'id', 'id_pays',$pay);
				}
				
				$relance = CBdd::select_row("SELECT COUNT(id) as num FROM email WHERE date < NOW() AND type='relance' AND destinataire LIKE '%".$user['email']."%'");

      ?>
    <tr>
      <td><a href="?a=5&id=<?php echo $user['id'] ?>"><?php echo $user['id'] ?></a></td>
      <td class="zinfo">
	  <?php 
	  // LIMITATION DE CARACTERE POUR NOM
	  $__text = CFunctions::cut_string($user['nom'], $max_input_text+3);
      echo $__text;
      if($user['nom'] != $__text) {
	  ?>
        <div class="bulle"><?=$user['nom']; ?></div>
Exemple #8
0
		//Récuperation nom commune 
		$nomcomC = CTableCommune::recupnomCom('communeD', 'nom_comD', 'id_comD',$id_comune_contact);
		$nomcomA = CTableCommune::recupnomCom('commune', 'nom_com', 'id_com',$id_comune_annuaire);
		
		//Mise à jour da tabel commune provisoire
		CTableCommune::updatecom('communeD', 'nom_comD', $nomcomA, 'id_comD', $id_comune_contact);
		
		
		// Récuperation de l'id de contact
		$iduser = CTableCommune::recupnomCom('communeD', 'id_user', 'id_comD',$id_comune_contact);
		
		//Mise à jour da tabel contact
		CTableCommune::updatecom('user', 'commune_alias', $id_comune_annuaire, 'id', $iduser);
		
		//Supprimer l'enregistrement dans la table provisoire
		CTableCommune::supprcom('communeD', 'id_comD', $id_comune_contact);
		
		$msginfo = "correspondance bien efectu&eacute;";
		
		break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
  <div id="top"><?php include("../nav/menu_h.php"); ?></div>
  <div id="filet">