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); }
static function deletes($fic) { $zSql = " DELETE FROM moul_tables_tmp WHERE mtp_iListId = '" . $fic . "'"; CBdd::delete($zSql); }
static function delete_rdv_of_user($iduser) { return CBdd::delete("DELETE FROM rdvContact WHERE iduser = " . $iduser); }
function supprcom($table, $condition, $conditionVal ) { $Zsql = "DELETE FROM ".$table." WHERE ".$condition."=".$conditionVal; $res = CBdd::delete($Zsql); return $res; }
static function delete_elmvide() { $zSql = " DELETE FROM moul_gpficmail WHERE fic = 0"; CBdd::delete($zSql); }
$tab = explode(",",$text1); $text2=count($tab); $tgroupe->update(); for ($i=0; $i<$text2 and $text2!=0; $i++){ if ($tab[$i]!=''){ if($tab[$i] != $id) array_push($tab_user, $tab[$i]); $tab_user_old = CTableGroupeCommune::get_array_id_user($_SESSION['idgroupe']); $tab_user_new = array_unique(array_merge($tab_user_old, $tab_user)); if($tab_user_new) $liste_user_new = implode("|", $tab_user_new); $groupe = new CTableGroupeCommune(array('id'=>$_SESSION['idgroupe'], 'text'=>$liste_user_new)); $groupe->update(); } } if(!isset($ident)){ $Zsql = 'DELETE FROM commune WHERE id_com = '.$id; CBdd::delete($Zsql); }else $msginfo = 'Vous ne pouvez pas supprimer cette commune'; break; case 5 : // Modifier 1 break; case 6 : // Filtrer CSession::save($_GET); break; case 7 : $tab_user = array();
<?php session_start(); include("../inc/init.php"); //-- Récupère les id des envois $zQuery = "SELECT retour_liste_id_email AS 'idemail' FROM retour_liste WHERE retour_liste_id = " . $_POST['iId']; if ($toIdEmail = mysql_fetch_assoc (mysql_query ($zQuery))) { //-- Supprime la ligne de stat sélectionnée $zdelQuery = "DELETE FROM retour_liste WHERE retour_liste_id = " . $_POST['iId']; CBdd::delete($zdelQuery); } else { print "error: Aucune envoi enregistré pour le retour d'id " . $_POST['iId']; } ?>
function delete() { $sql = 'DELETE FROM '.$this->table['tablename'].' WHERE (id = '.$this->table['id'].')'; CBdd::delete($sql); }
static function deletes(){ $zSql = " DELETE FROM moul_groupes_tmp "; CBdd::delete($zSql); }
static function delete_elm($iId) { $zSql = " DELETE FROM moul_groupes WHERE id = " . $iId; CBdd::delete($zSql); }
break; case 2 : // Modifier etat $etat = CBdd::select_one("SELECT etat FROM hbpiecesjointes WHERE id = " . $id, 'etat') ; $InverseEtat = ($etat) ? 0 : 1 ; $Sql = "UPDATE hbpiecesjointes SET etat = '" . $InverseEtat . "' WHERE id = '" . $id . "'"; CBdd::update($Sql) ; break; case 3 : // --- Suppression affichage break; case 33 : // --- Suppression traitement $sql = "SELECT * FROM hbpiecesjointes WHERE id = " . $id ; $toPieces = CBdd::select_row($sql); $bResultat = CBdd::delete("DELETE FROM hbpiecesjointes WHERE id = " . $id) ; if ($bResultat) { $msginfo = "Suppression effectué avec succés" ; unlink($toPieces['piece']) ; } else { $msginfo = "Erreur lors de la suppression" ; } break; case 4 : // --- Ajout affichage $toPieces['id'] = $id ;
static function delete($iId) { $zSql = " DELETE FROM moul_listes WHERE id = " . $iId; CBdd::delete($zSql); }