Ejemplo n.º 1
0
	function delete_user($md5_id) {
		$sql = "SELECT email FROM user WHERE md5(id) = '".$md5_id."'";
		$user_email = CBdd::select_one($sql, 'email');
		
		$sql = "SELECT * FROM email WHERE destinataire LIKE '%".$email."%'";
		
		$result = CBdd::select($sql);
		
		$count = mysql_num_rows($result);
		
		if(count($count)) {
			while($email = mysql_fetch_array($result, MYSQL_ASSOC)) {
				$destinataire = $email['destinataire'];
				$destinataire = str_replace($user_email, '', $destinataire);	
							
				$destinataire  = str_replace(array(',,', ';;', ';'), ",", $destinataire);
				
				$email['destinataire'] = trim($destinataire, ',');				
				
				if(empty($destinataire)) {
					$_email = new CTableEmail(array('id'=>$email['id']));
					$_email->delete();
				}
				else {
					
					//unset($email[id]);
					$email['text'] = CFunction::addslashes($email['text']);
					
					if(empty($email['id_campagne'])) {
						$email['id_campagne'] = 0;
					}
					
					if(empty($email['id_groupe'])) {
						$email['id_groupe'] = 0;
					}
					
					$_email = new CTableEmail($email);					
					$_email->update();
				}
			}
		}
		
		$sql = "DELETE FROM user WHERE md5(id) = '" . $md5_id . "'";			
		return CBdd::delete($sql);
	}
Ejemplo n.º 2
0
	if ($date=='') {
		$error_type = 2;
		$error_signe['date'] = '*';
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = 'Champ non valide';
		break;
	}
	
	$values = array(
			'id'=>$id, 
			'date'=>$date, 
			'titre'=>CFunction::addslashes($titre), 
			'etat'=>$etat, 
			'contenu'=>CFunction::addslashes($contenu), 
			'prix'=>$prix);
		
	$menu_obj = new CTableMenu($values);
	$menu_obj->update();
	$msginfo = 'Menu bien modifié';
	$a = 0;
	break;
}

$filtre  = CSql::between($filtre_date_debut, $filtre_date_fin);
/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$menu_obj = CTableMenu::select('*', $filtre, $order);
?>
Ejemplo n.º 3
0
	if ($idcat=='') {
		$error_type = 1;
		$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_motcle'=>$id, 'nom_motcle'=>CFunction::addslashes($nom),'cat_motcle'=>$idcat);
		
	$tcat = new CTableMotcle($values);
	$tcat->update();
	$msginfo = 'Catégorie bien modifiée';
	$a = 0;
	break;

case 6 : // Filtrer sec
	if(isset($_GET['idsec'])) $idsec = $_GET['idsec'];
	$_SESSION['secteur'] = $idsec;
	break;
case 66 : // Filtrer cat
	if(isset($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
Ejemplo n.º 4
0
		break;
	case 44:
		
		
		
		$obj  	= new CTableGroupe(array('id'=>$destinataire));
		$groupe = $obj->select_row();
		
		$values = array(
				'nom'=>CFunction::addslashes($texte['nom']),
				'id_groupe'=>$destinataire,
				'destinataire'=>$groupe['nom'], 
				'expediteur'=>$expediteur, 
				'id_text'=>$texte['id'],
				'id_campagne'=>$id_campagne,
				'text'=>CFunction::addslashes($texte['text']), 
				'pj'=>'',
				'imap'=>'',
				'type'=>'campagne',
				'periode'=>0,
				'date'=>$date
		);	
					
		$envoi = new CTableEmail($values);
		$result = $envoi->insert(false);
		if(!$result) {
			echo 'INSERT_ERROR, 0';
		}
		else {
			echo 'Enregistrement réussi';
		}
Ejemplo n.º 5
0
	if(!empty($_POST['etat'])) 			$etat 		= $_POST['etat'];
	if(!empty($_POST['text']))  		$text 		= trim($_POST['text']);
	if(!empty($_POST['style']))  		$style 		= trim($_POST['style']);
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}

	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tdes = new CTableTexte(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), CTableUser::is_admin($_SESSION['idmbr']) ?  "'etat'=>$etat" : "", 'text'=>CFunction::addslashes($text), 'style'=>CFunction::addslashes($style)));
	$tdes->update();
	$msginfo = "texte bien modifié";
	$a = 0;
	break;
	
case 6 : // Filtrer 1
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	$_SESSION['idart'] = 0;
	break;
	
case 66 : // Filtrer 2
	if(!empty($_GET['idart'])) $idart = $_GET['idart'];
	$_SESSION['idart'] = $idart;
	break;
Ejemplo n.º 6
0
		
case 5 : // Modifier 1
	//$tconfig 		= new CTableConfiguration(array('id'=>$id));
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$Zsql   = "SELECT * FROM configuration WHERE id = ".$id;
	//print_r($Zsql);
	$configuration = CBdd::select_row($Zsql) ;
	//$configuration  = $tconfig->select_row();
	$nom  			= $configuration['nom'];
	$valeur  		= $configuration['valeur'];
	$choix  		= $configuration['choix'];
	break;
		
case 55 : // Modifier 2
	if(!empty($_POST['id'])) 		$id 		= $_POST['id'];
	if(!empty($_POST['valeur'])) 	$valeur 	= CFunction::addslashes(trim($_POST['valeur']));

	if ($valeur=="") {
		$error_type = 2;
		$error_signe['valeur'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		break;
	}
	CBdd::update("UPDATE configuration SET valeur='".$valeur."' WHERE id=".$id."");
	//$tconfig = new CTableConfiguration(array('id'=>$id, 'valeur'=>$valeur));
	//$tconfig ->update();
	$msginfo = "configuration bien modifiée";
	$a = 0;
Ejemplo n.º 7
0
	if(!empty($_POST['id'])) 			$id 		= $_POST['id'];
	if(!empty($_POST['nom'])) 			$nom 		= trim($_POST['nom']);
	if(!empty($_POST['etat'])) 			$etat 		= $_POST['etat'];
	
	if ($nom=='') {
		$error_type = 1;
		$error_signe['nom'] = '*';
	}

	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = 'Champ non valide';
		$a = 5;
		break;
	}
	$campagne = new CTableCampagne(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat));
	$campagne->update();
	$msginfo = 'Campagne bien modifié';
	$a = 5;
	break;
	
case 6 : // Filtrer 1
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	$_SESSION['idart'] = 0;
	break;
	
case 66 : // Filtrer 2
	if(!empty($_GET['idart'])) $idart = $_GET['idart'];
	$_SESSION['idart'] = $idart;
	break;
Ejemplo n.º 8
0
	if ($nom=='') {
		$error_type = 1;
		$error_signe['nom'] = '*';
	}
	if ($pays=='') {
		$error_type = 2;
		$error_signe['pays'] = '*';
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = 'Champ non valide';
		break;
	}
	
	$values = array('id_dep'=>$id, 'nom'=>CFunction::addslashes($nom), 'pays'=>CFunction::addslashes($pays));
		
	$tcat = new CTableDepartement($values);
	$tcat->update();
	$msginfo = 'Menu bien modifié';
	$a = 0;
	break;
case 6 : // Filtrer Menu
	if(isset($_GET['idpays'])) $idpays = $_GET['idpays'];
	$_SESSION['idpays'] = $idpays;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
Ejemplo n.º 9
0
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}
	if (empty($idart)) {
		$error_type = 2;
		$error_signe['idart'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tpag = new CTablePage(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat, 'idart'=>$idart, 'text'=>CFunction::addslashes($text), 'head'=>CFunction::addslashes($head), 'description'=>CFunction::addslashes($description), 'keywords'=>CFunction::addslashes($keywords), 'send'=>$send));
	$tpag->update();
	$msginfo = "page bien modifiée";
	$a = 0;
	break;
	
case 6 : // Filtrer 1
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	$_SESSION['idart'] = 0;
	break;
	
case 66 : // Filtrer 2
	if(!empty($_GET['idart'])) $idart = $_GET['idart'];
	$_SESSION['idart'] = $idart;
	break;
Ejemplo n.º 10
0
		
		if($valid == 1)	{		
			
			if ($bIsGrGrp == 0){
				$obj  	= new CTableGroupe(array('id'=>$destinataire));
				$groupe = $obj->select_row();
			}
			else{
				$obj  	= new CTableGrGroupe(array('id'=>$destinataire));
				$groupe = $obj->select_row();
			}
			
			$zSql 	= " ";
			$zSql  .= " INSERT INTO email (id,nom,id_groupe,type_envoi,destinataire,expediteur,id_text,id_campagne,text,pj,imap,type,periode,date) " ; 
			$zSql  .= " VALUES ('',\"".CFunction::addslashes($texte['nom'])."\",\"".$destinataire."\",\"".$bIsGrGrp."\",\"".$groupe['nom']."\",\"".$expediteur."\"" ;
			$zSql  .= " ,".$texte['id'].",".$id_campagne.",\"".CFunction::addslashes($texte['text'])."\",'','','campagne',0,'".$date."')";
			$result = CBdd::insert($zSql);
			
			if(!$result) {
				echo 'INSERT_ERROR, 0';
			}
			else {
				echo 'Enregistrement réussi';
			}
		}
		else{
			echo 'Cette date est déja passée ou prise';
		}
				
		break;
	case 5:		// AFFICHAGE POUR MODIFICATION
Ejemplo n.º 11
0
	if(!empty($_POST['etat'])) 			$etat 		= $_POST['etat'];
	if(!empty($_POST['idreda'])) 		$idreda 	= $_POST['idreda'];
	if(!empty($_POST['text']))  		$text 		= trim($_POST['text']);
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}

	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tdes = new CTableFooter(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), CTableUser::is_admin($_SESSION['idmbr']) ?  "'etat'=>$etat" : "", 'idreda'=>$idreda, 'text'=>CFunction::addslashes($text), 'etat'=>$etat));
	$tdes->update();
	$msginfo = "footer bien modifié";
	$a = 0;
	break;
	
case 6 : // Filtrer 1
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	$_SESSION['idart'] = 0;
	break;
	
case 66 : // Filtrer 2
	if(!empty($_GET['idart'])) $idart = $_GET['idart'];
	$_SESSION['idart'] = $idart;
	break;
Ejemplo n.º 12
0
	if ($idcat=='') {
		$error_type = 1;
		$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_cat'=>$id, 'nom_cat'=>CFunction::addslashes($nom),'secteur_cat'=>$idcat, 'actif'=>$etat);
		
	$tcat = new CTableCat($values);
	$tcat->update();
	$msginfo = 'Catégorie bien modifiée';
	$a = 0;
	break;
case 6 : // Filtrer Menu
	if(isset($_GET['idsec'])) $_SESSION['idsec'] = $_GET['idsec'];
	break;
	
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
Ejemplo n.º 13
0
		$error_signe['page'] = '*';
	}
	
	$tgal  = new CTableGalerie(array('id'=>$id));
	$gal   = $tgal->select_row();
	
	$tgal = new CTableGalerie(array(
	'id'=>$id,
	'nom'=>CFunction::clean(CFunction::addslashes($nom)), 
	'etat_defilement'=>$defil,
	'idpage'=>$idpage, 
	'idart'=>$idart,
	'dossier'=>$dossier, 
	'dateevent'=>$dateevent, 
	'lien'=>$lien, 
	'texte'=>CFunction::addslashes($text)
	));
	
	if($gal['dossier'] != $dossier) {
		if(file_exists('../../userfiles/image/galeries/'.$gal['dossier'])) {
			rename('../../userfiles/image/galeries/'.$gal['dossier'], '../../userfiles/image/galeries/'.$dossier);
		}
		else {
			mkdir('../../userfiles/image/galeries/'.$dossier, 0644);
		}
	}
	$tgal->update();
	
	CTableGalerie::rearrange($idart);
	
	$msginfo = 'Galerie bien modifiée';
Ejemplo n.º 14
0
	if(!empty($_POST['nom'])) 		$nom 		= trim($_POST['nom']);
	if(!empty($_POST['etat'])) 		$etat 		= $_POST['etat'];
	if(!empty($_POST['idreda']))	$idreda 	= $_POST['idreda'];
	if(isset($_POST['idlecteur'])) 	$idlecteur 	= $_POST['idlecteur'];

	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'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat, 'idreda'=>$idreda, 'idlecteur'=>$idlecteur);
		
	$tcat = new CTableCategorie($values);
	$tcat->update();
	$msginfo = 'Menu bien modifié';
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$r_categorie = CTableCategorie::select("*", 1, $order);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
Ejemplo n.º 15
0
	
	
	if(!empty($_POST['id'])) 		$id 		= $_POST['id'];
	if(!empty($_POST['nom'])) 		$nom 		= trim($_POST['nom']);

	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'=>$id, 'nom'=>CFunction::addslashes($nom));
		
	$tcat = new CTablePays($values);
	$tcat->update();
	$msginfo = 'Menu bien modifi&eacute;';
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$requetPays_   ="select * from pays ";
if ($_GET['order']) $requetPays_  .= " ORDER BY ".COrder::formate($_GET['order']);
else $requetPays_  .= " ORDER BY ".$order." DESC";
Ejemplo n.º 16
0
	$art = $tart->select_row();
	
	$old_nom = $art['nom'];
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	
	$tart= new CTableGroupe(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat));
	$tart->update();
	
	CBdd::update("UPDATE email SET destinataire = '".$nom."' WHERE destinataire = '".$old_nom."'");
	$msginfo = "groupe bien modifi&eacute;";
	$a = 0;
	break;
	
case 555 : // Vider
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$tgroupe= new CTableGroupe(array('id'=>$id, 'text'=>''));
	$_group  = $tgroupe->select_row();
	
	$nom = $_group['nom'];
	$etat = $_group ['etat'];
	
Ejemplo n.º 17
0
                  	);
                    if(!empty($id)) $obj->update(); else $obj->insert();
                    $obj->update();
                    $msginfo = "Email bien envoy&eacute;";
                }
                else /*($go == "Envoyer à la date pr&eacute;vue")*/ {
                	//-- Y a-t-il utilisation de cron ?

                  	$obj = new CTableEmail (
                  		array (
		                    'id' => $id,
		                    'expediteur' => CFunction::addslashes($expediteur),
		                    'destinataire' => CFunction::addslashes($destinataire),
		                    'nom' => CFunction::addslashes($nom),
		                    'text' => CFunction::addslashes($text),
		                    'pj' => CFunction::addslashes($pj),
		                    'etat'=> 3,
		                    'date' => $date,
                  			'type_envoi' => $bIsGr
                  		)
                  	);

                    if(!empty($id)) $obj->update(); else $obj->insert();
                    $msginfo = "Email mis en fil d'attente";
                }

                $a = 0;
                break;

            case 6 : // Filtrer
                CSession::save($_GET);
Ejemplo n.º 18
0
	
	if($video == 'null') {
		$error_type = 1;
		$error_signe['video'] = "*";
	}
	
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 4;
		break;
	}
	
	$tvideo = new CTableVideo(array(
		'id'=>$id, 
		'nom'=>CFunction::addslashes($nom), 
		'id_page'=>$idpage, 
		'fichier'=>str_replace('../../userfiles/media/', '', $fichier)));
	$tvideo->update();
	
	$msginfo = 'Video bien modifi&eacute;e';
	$a = 0;
	
	break;
	
case 6 : // Filtrer 1
	
	break;
	
case 66 : // Filtrer 1
	
Ejemplo n.º 19
0
	if(!empty($_POST['id'])) 		$id 		= $_POST['id'];
	if(!empty($_POST['question'])) 	$question 	= trim($_POST['question']);
	if(!empty($_POST['reponse'])) 	$reponse 	= trim($_POST['reponse']);
	if(!empty($_POST['etat'])) 		$etat 		= $_POST['etat'];

	if ($question=='') {
		$error_type = 2;
		$error_signe['question'] = '*';
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = 'Champ non valide';
		break;
	}
	
	$values = array('id'=>$id, 'etat'=>$etat, 'question'=>CFunction::addslashes($question), 'reponse'=>CFunction::addslashes($reponse));
	
	$tfaq = new CTableFaq($values);
	$tfaq->update();
	$msginfo = 'FAQ bien modifi&eacute;';	
	
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$r_faq = CTableFaq::select("*", 1, $order);
?>
<!-- InstanceEndEditable -->
Ejemplo n.º 20
0
	if ($id=='') {
		$error_type = 1;
		$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;
Ejemplo n.º 21
0
                            $body = CNmail::build_html_body($style, CFunction::stripslashes($text));
                            if(!CMail::send_mailing($zEmail, $nom, $body, $expediteur, $arr_pj)) {
                                    //$msginfo = "Echec d'envoi d'email. Veuillez r&eacute;essayer ult&eacute;rieurement";
                                    break;
                            }
                        }
                    }
                    

                    $obj = new CTableEmail(array('id'=>$id, 'expediteur'=>CFunction::addslashes($expediteur), 'destinataire'=>CFunction::addslashes($destinataire), 'nom'=>CFunction::addslashes($nom), 'text'=>mysql_real_escape_string(CFunction::addslashes($body)), 'pj'=>CFunction::addslashes($pj), 'etat'=>1, 'date'=>date("Y-m-d H:i:s")));
                    if(!empty($id)) $obj->update(); else $obj->insert();
                    $obj->update();
                    $msginfo = "Email bien envoy&eacute;";
                }
                else /*($go == "Envoyer à la date pr&eacute;vue")*/ {
                    $obj = new CTableEmail(array('id'=>$id, 'expediteur'=>CFunction::addslashes($expediteur), 'destinataire'=>CFunction::addslashes($destinataire), 'nom'=>CFunction::addslashes($nom), 'text'=>CFunction::addslashes($body), 'pj'=>CFunction::addslashes($pj), 'etat'=>3, 'date'=>$date));
                    if(!empty($id)) $obj->update(); else $obj->insert();
                    $obj->update();
                    $msginfo = "Email mis en fil d'attente";
                }

                $a = 0;
                break;


            case 6 : // Filtrer
                CSession::save($_GET);
                break;

            case 7 : // Publipostage 1
                if(!empty($_GET['id'])) $id = $_GET['id'];
Ejemplo n.º 22
0
                    }
                }
                else {
                    $zSql2 = "SELECT COUNT(*) AS COUNT FROM retour_email WHERE retour_email_id_email ='".$id."' AND retour_email_id_user ='******'";
                    $iNbRowMatch = $bdd->select_one($zSql,'COUNT');
                    if ((int)($iNbRowMatch)>0) {
                        $zSql3 = "UPDATE retour_email SET retour_email_statut = '0', retour_email_lien='0' WHERE retour_email_id_email ='".$id."' AND retour_email_id_user ='******'";
                        $resInsert = $bdd->update($zSql3);
                    }
                    else {
                        $zSql3 = "INSERT INTO retour_email (retour_email_id_email,retour_email_id_user,retour_email_statut,retour_email_lien) VALUES ('".$id."', '".$zUser."', '0', '0')";
                        $resInsert = $bdd->insert($zSql3);
                    }
                }
                $text = $text . '<p style="text-align: center;"><a href="'.URL_RACINE.'/adminpanther/src/email.php?id='.$id.'">Visualiser cette email comme page HTML</a></p>';
                $text = $text .'<img src ="'.URL_RACINE.'/adminpanther/src/retour.php?id='.$zUser.'&key='.$id.'"  frameborder="0"/>';
                $text = $text . CDesinscription::insert_link();
                $body = CNmail::build_html_body($style, CFunction::stripslashes($text));
                if(!CMail::send_mailing($zEmail, $nom, $body, $expediteur, $arr_pj)) {
                        //$msginfo = "Echec d'envoi d'email. Veuillez r&eacute;essayer ult&eacute;rieurement";
                        break;
                }
            $iNbMailEnvoye++;
            if ($iNbMailEnvoye>$iMaxMailSend) {sleep($iMailMaxTimeout); $iNbMailEnvoye = 0;}
            }
        }
        $obj = new CTableEmail(array('id'=>$id, 'expediteur'=>CFunction::addslashes($expediteur), 'destinataire'=>CFunction::addslashes($destinataire), 'nom'=>CFunction::addslashes($nom), 'text'=>mysql_real_escape_string(CFunction::addslashes($text)), 'pj'=>CFunction::addslashes($pj), 'etat'=>1, 'date'=>date("Y-m-d H:i:s")));
        if(!empty($id)) $obj->update(); else $obj->insert();
        $obj->update();
    }
?>
Ejemplo n.º 23
0
	if(!empty($_POST['etat'])) 		$etat 	= $_POST['etat'];
	if(!empty($_POST['pieId'])) 	$pieId 	= $_POST['pieId'];
	if(!empty($_POST['texId'])) 	$texId 	= $_POST['texId'];
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	
	$tart= new CTableOpportunite(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'pieId'=>$pieId, 'texId'=>$texId, 'etat'=>$etat));
	$tart->update();
	$msginfo = "opportunit&eacute; bien modifi&eacute;e";
	$a = 0;
	break;

case 6 : // Filtrer
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$select = "*";
Ejemplo n.º 24
0
	CTemplate::set_current_template(basename($id));
	break;
case 5 : // Modifier 1
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$rep  = CTemplate::get_info_file($id);
	$nom  = $rep ['name'];
	$url_dest = $rep ['url'];
	$url_design = $url_dest . "/design.xml";
	$template_objet= new CTemplate($nom);
	$design = $template_objet->design;
	break;
		
case 55 : // Modifier 2
	if(!empty($_POST['id'])) 	$id 	= $_POST['id'];
	if(!empty($_POST['nom'])) 	$nom 	= trim($_POST['nom']);
	$template_objet = new CTemplate(CFunction::addslashes($nom));
	$template_objet->set_elements($_POST);
	$template_objet->save();
	$msginfo = "Dossier bien modifi&eacute;";
	$a = 0;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$arr_urlrep = CTemplate::get_folder(0, $url_base);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><?php include("../nav/header.php"); ?></div>
Ejemplo n.º 25
0
	
	if ($nom=="") {
		$error_type = 1;
		$error_signe['nom'] = "*";
	}
	if (empty($idcat)) {
		$error_type = 2;
		$error_signe['idcat'] = "*";
	}
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tart= new CTableArticle(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'etat'=>$etat, 'idcat'=>$idcat));
	$tart->update();
	$msginfo = "sous-menu bien modifi&eacute;";
	$a = 0;
	break;

case 6 : // Filtrer
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$select = "*";
Ejemplo n.º 26
0
		$error_type = 1;
		$error_signe['nom'] = "*";
	}

	if ($type=="") {
		$error_type = 2;
		$error_signe['type'] = "*";
	}
	
	if ($error_type > 0) {
		//erreur de type champ non valide
		$msginfo = "Champ non valide";
		$a = 5;
		break;
	}
	$tconfig = new CTableQuestion(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'type'=>CFunction::addslashes($type), 'choix'=>CFunction::addslashes($choix), 'etat'=>$etat, 'obligatoire'=>$obligatoire));
	$tconfig ->update();
	$msginfo = "question bien modifi&eacute;e";
	$a = 0;
	break;
	
case 7 : // Emplacement
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$r_question = CTableQuestion::select("*", 1, $order);
?>
<!-- InstanceEndEditable -->