Esempio n. 1
0
	if(!CTableUser::login_dispo($login, " AND id != $id")) {
		//erreur de type login non dispo
		$msginfo = "Login non disponible";
		$a = 5;
		break;
	}
	if(CTableUserContact::is_admin($_SESSION['idmbr'])) {
		$tuse = new CTableUserContact(array('id_ent'=>$id, 'login_ent'=>$login, 'password_ent'=>$passe, 'resp_ent'=>CFunctions::addslashes($responsable), 'commune_adr'=>CFunctions::addslashes($adresse),  'rue_adr'=>CFunctions::addslashes($adresse), 'pays_ent'=>$pays, 'mail_ent'=>CFunctions::addslashes($email), 'tel_ent'=>CFunctions::addslashes($telephone), 'nom_ent'=>CFunctions::addslashes($societe), 'web_ent'=>CFunctions::addslashes($web), 'etat_contact'=>$etat_contact, 'date_contact'=>$date_contact, 'descr_ent'=>CFunctions::addslashes($description), 'etat_ent'=>$etat, 'type'=>$type, 'idopportunite'=>$idopportunite));
	} else {
		$tuse = new CTableUserContact(array('id_ent'=>$id, 'login_ent'=>$login, 'password_ent'=>$passe, 'resp_ent'=>CFunctions::addslashes($responsable), 'commune_adr'=>CFunctions::addslashes($adresse),  'rue_adr'=>CFunctions::addslashes($adresse), 'pays_ent'=>$pays, 'mail_ent'=>CFunctions::addslashes($email), 'tel_ent'=>CFunctions::addslashes($telephone), 'nom_ent'=>CFunctions::addslashes($societe), 'web_ent'=>CFunctions::addslashes($web), 'etat_contact'=>$etat_contact, 'date_contact'=>$date_contact, 'descr_ent'=>CFunctions::addslashes($description), 'idopportunite'=>$idopportunite));
	}
	$tuse->update();
	
	CTablContact::delete_rdv_of_user($id);
	if($date_rdv) {
		$trdv = new CTablContact(array('iduser'=>$id, 'nom'=>CFunctions::addslashes($nom_rdv), 'date'=>$date_rdv, 'heure'=>$heure_rdv,  'type'=>$type_rdv, 'etat'=>$etat_rdv, 'nom_ent'=>$societe, 'resp_ent'=>$responsable, 'commentaire'=>$commentaire));
		$trdv->insert();
	}
	
	// DEBUT MAIL
    if ($radioText && $idopportunite)
    {
        
        $zSqlEnvoieMail  = " SELECT opportuniteContact.*, hbpiecesjointes.piece AS piece, text FROM opportuniteContact" ;
        $zSqlEnvoieMail .= " LEFT JOIN hbpiecesjointes ON hbpiecesjointes.id = pieId" ;
        $zSqlEnvoieMail .= " LEFT JOIN texte ON texte.id = texId" ;
        $zSqlEnvoieMail .= " WHERE opportuniteContact.id = " . $idopportunite ;
        
        $toEnvoyes = CBdd::select_row($zSqlEnvoieMail) ;
        
        $expediteur = CTableUtilisateur::get_email_admin() ;
Esempio n. 2
0
case 0 : // Afficher
	break;

case 2 : // Modifier etat
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$rdv = new CTablContact(array('id'=>$id));
	$rdv->reverse_etat();
	break;
	
case 3 : // Modifier etat
	if(!empty($_GET['id'])) $id = $_GET['id'];
	break;
	
case 33 : // Supprimer
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$rdv = new CTablContact(array('table'=>'rdvContact', 'id'=>$id));
	$rdv->delete();
	break;

case 5 : // Modifier 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	CFunction::redirection("../src/contact.php?a=5&id=" . $id);
	break;
	
case 6 : // Filtrer
	CSession::save($_GET);
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS