<?php
function actualizeaza_text($text1,$text2='')
{
global$conn;
$linii_actualizate=0;
if($text2=='')
{
$conn->query('DELETE FROM`alerte`WHERE`text`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('DELETE FROM`evenimente`WHERE`text`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('DELETE FROM`mesaje`WHERE`text`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`descriere`=""WHERE`descriere`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`status`=""WHERE`status`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`status_prieteni`=""WHERE`status_prieteni`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
$conn->query('DELETE FROM`notificari`WHERE`text`LIKE"%'.$text1.'%"');
$linii_actualizate+=$conn->affected_rows;
}
else
{
$conn->query('UPDATE`alerte`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`bancuri`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`bancuri_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`biblioteca_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`blog_articole`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`blog_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`cantari`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`cantari_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`chat_arhiva`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`comentarii_profil`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`contact`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`daruri_oferite`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`descarcari_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`devotionale`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`devotionale_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`evenimente`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`forum_postari`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`forum_topicuri`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`galerie_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`grup_anunturi`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`jurnal_admini`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`maxime`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`maxime_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`maxime_random`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`meditatii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`meditatii_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`descriere`=REPLACE(`descriere`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`status`=REPLACE(`status`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`membrii`SET`status_prieteni`=REPLACE(`status_prieteni`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`mesaje`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`mesaje_instant`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`mesaje_instant_admini`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`mesaje_instant_admini_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`mesaje_instant_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`notificari`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`poezii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`poezii_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`sms`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`sms_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`stiri`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`stiri_comentarii`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`t2_rapoarte`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`tichet_intrebari`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
$conn->query('UPDATE`tichet_raspunsuri`SET`text`=REPLACE(`text`,"'.$text1.'","'.$text2.'")');
$linii_actualizate+=$conn->affected_rows;
}
return$linii_actualizate;
}
function muta_poza($pid,$imagine_poza,$fid,$nume_album,$tip_album,$valoare_album,$fidd)
{
global$conn,$de,$domenii_statice,$imagine_album;
if($fidd>0)
{
$finfo=$conn->query('SELECT`id`,`nume`,`tip`,`valoare`FROM`galerie_albume`WHERE`id`="'.$fidd.'"&&`de`="'.$de.'"')->fetch_row();
if($finfo[0]==0)
return false;
else
$conn->query('UPDATE`membrii`SET`avatar`=""WHERE`avatar`="'.$imagine_poza.'"');
}
else
$finfo=[0,'Poze fără album',0,''];
if($tip_album==3&&($finfo[2]!=3||($tip_album==3&&$finfo[3]!=$valoare_album)))
$conn->query('DELETE FROM`notificari`WHERE`text`LIKE"am adăugat pentru tine poza [url=/poza/id/'.$pid.'][img=/'.$imagine_poza.']aceasta[/url]!%"&&`la`="'.$valoare_album.'"');
if($finfo[2]==3&&($tip_album!=3||($finfo[2]==3&&$valoare_album!=$finfo[3])))
notificare('am adăugat pentru tine poza [url=/poza/id/'.$pid.'][img=/'.$imagine_poza.']aceasta[/url]![br/]Din albumul [url=/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'/album/'.$fidd.'-'.seo($finfo[1]).'][img='.$imagine_album[$finfo[2]].']'.$finfo[1].'[/url]',$finfo[3],$de);
if($finfo[2]!=$tip_album)
$conn->query('UPDATE`evenimente`SET`text`=REPLACE(`text`,"[url=/poza/id/'.$pid.'][img='.($tip_album==0?'/'.$imagine_poza:$imagine_album[$tip_album]).']aceasta poza[/url]","[url=/poza/id/'.$pid.'][img='.($finfo[2]==0?'/'.$imagine_poza:$imagine_album[$finfo[2]]).']aceasta poza[/url]")');
if($fidd!=$fid||$finfo[1]!=$nume_album||$finfo[2]!=$tip_album)
{
$conn->query('UPDATE`jurnal_admini`SET`text`=REPLACE(`text`,"<!-- poza'.$pid.' -->'.($fid==0?'':'[br/]Din albumul [url=/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'/album/'.$fid.'-'.seo($nume_album).'][img='.$imagine_album[$tip_album].']'.$nume_album.'[/url]').'","<!-- poza'.$pid.' -->'.($fidd==0?'':'[br/]Din albumul [url=/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'/album/'.$fidd.'-'.seo($finfo[1]).'][img='.$imagine_album[$finfo[2]].']'.$finfo[1].'[/url]').'")');
$conn->query('UPDATE`notificari`SET`text`=REPLACE(`text`,"<!-- poza'.$pid.' -->'.($fid==0?'':'[br/]Din albumul [url=/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'/album/'.$fid.'-'.seo($nume_album).'][img='.$imagine_album[$tip_album].']'.$nume_album.'[/url]').'","<!-- poza'.$pid.' -->'.($fidd==0?'':'[br/]Din albumul [url=/poze-membru/la/'.$de.'-'.seo(nume($de,1)).'/album/'.$fidd.'-'.seo($finfo[1]).'][img='.$imagine_album[$finfo[2]].']'.$finfo[1].'[/url]').'")');
}
if($fidd!=$fid)
$conn->query('UPDATE`galerie_poze`SET`fid`="'.$fidd.'"WHERE`id`="'.$pid.'"&&`de`="'.$de.'"');
return true;
}
function schimba_id($la,$cid,$combin=0)
{
global$conn,$meniu;
$detalii_membru=$conn->query('SELECT`id`,`postari`,`lei`,`banca_lei`,`euro`,`banca_euro`,`mesaje_chat`,`cadoul`,`mesaje_instant`,`puncte_joc`,`trivia`,`spune_cartea`,`anagrame`,`top_alerte`,`top_daruri`,`top_mesaje`,`vizite`,`data`FROM`membrii`WHERE`id`="'.$la.'"')->fetch_row();
$detalii_membrul=$conn->query('SELECT`id`,`data`FROM`membrii`WHERE`id`="'.$cid.'"')->fetch_row();
if(($detalii_membru[0]=='')||($combin==0&&$detalii_membrul[0]>0))
return false;
if($combin==1&&$detalii_membru[0]>0)
{
if($conn->query('SELECT COUNT(*)FROM`barnbuddy_membrii`WHERE`de`="'.$la.'"')->fetch_row()[0]>0&&$conn->query('SELECT COUNT(*)FROM`barnbuddy_membrii`WHERE`de`="'.$cid.'"')->fetch_row()[0]>0)
sterge_barnbuddy($la,0);
if($conn->query('SELECT COUNT(*)FROM`eroul`WHERE`de`="'.$la.'"')->fetch_row()[0]>0&&$conn->query('SELECT COUNT(*)FROM`eroul`WHERE`de`="'.$cid.'"')->fetch_row()[0]>0)
sterge_eroul($la,0);
if($conn->query('SELECT COUNT(*)FROM`gradina_membrii`WHERE`de`="'.$la.'"')->fetch_row()[0]>0&&$conn->query('SELECT COUNT(*)FROM`gradina_membrii`WHERE`de`="'.$cid.'"')->fetch_row()[0]>0)
sterge_gradina($la,0);
if($conn->query('SELECT COUNT(*)FROM`t2_membrii`WHERE`de`="'.$la.'"')->fetch_row()[0]>0&&$conn->query('SELECT COUNT(*)FROM`t2_membrii`WHERE`de`="'.$cid.'"')->fetch_row()[0]>0)
sterge_t2($la,0);
}
$conn->query('UPDATE`alerte`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`alerte`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`alerte`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`anagrame_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`anagrame_cuvinte`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`anagrame_cuvinte`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`anagrame_raspunsuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`baiatul_zilei`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`baiatul_zilei`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`baiatul_zilei_din`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`bancuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`bancuri_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`bancuri_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`bancuri_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`bancuri_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`biblioteca_carti`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`biblioteca_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`biblioteca_semne`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`blog_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`blog_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`blog_articole`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`blog_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`blog_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`barnbuddy_experienta`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`barnbuddy_membrii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`barnbuddy_membrii`SET`care`="'.$cid.'"WHERE`care`="'.$la.'"');
$conn->query('UPDATE`barnbuddy_plante`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`cantari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`cantari_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`cantari_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`cantari_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`cantari_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`casatorii_produse_cumparate`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`casatorii_produse_oferite`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`casatorii_produse_oferite`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`casatorii_virtuale`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`casatorii_virtuale`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`casatorii_virtuale`SET`divort`="'.$cid.'"WHERE`divort`="'.$la.'"');
$conn->query('UPDATE`chat_arhiva`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`chat_arhiva`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`chat_camere`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`chat_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`chat_mesaje`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`chat_mesaje`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`chestionar_intrebari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`chestionar_raspunsuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`comentarii_profil`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`comentarii_profil`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`comentarii_profil`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`contact`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`contact`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`daruri_oferite`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`daruri_oferite`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`descarcari_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`descarcari_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`descarcari_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`descarcari_fisiere`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`descarcari_fisiere`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`descarcari_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`devotionale`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`devotionale_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`devotionale_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`devotionale_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`devotionale_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`eroul`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`eroul`SET`care`="'.$cid.'"WHERE`care`="'.$la.'"');
$conn->query('UPDATE`evenimente`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`evenimente`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`fata_zilei`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`fata_zilei`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`fata_zilei_din`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_abonati_forumuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_abonati_topicuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_postari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_postari`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`forum_topicuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`forum_topicuri`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`galerie_albume`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`galerie_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`galerie_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`galerie_comentarii`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`galerie_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`galerie_poze`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`galerie_poze`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`galerie_poze`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`gradina_membrii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`gradina_membrii`SET`care`="'.$cid.'"WHERE`care`="'.$la.'"');
$conn->query('UPDATE`gradina_plante_cumparate`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`gradina_seminte_cumparate`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`grupuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`grup_membrii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`ignorati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`ignorati`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`imagini_zambareti_favoriti`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`istoric_browsere`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`istoric_logari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`istoric_nume`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`istoric_nume`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`istoric_vizite_profil`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`istoric_vizite_profil`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`jurnal_admini`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`jurnal_admini`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`magazin_cumparaturi`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`maxime`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`maxime_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`maxime_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`maxime_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`maxime_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`meditatii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`meditatii_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`meditatii_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`meditatii_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`meditatii_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`id`="'.$cid.'"WHERE`id`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`invitatde`="'.$cid.'"WHERE`invitatde`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`profil`="'.$cid.'"WHERE`profil`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`membrii_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`membrii_pedepsiti`SET`exid`="'.$cid.'"WHERE`exid`="'.$la.'"');
$conn->query('UPDATE`membrii_pedepsiti`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`mesaje`SET`raportat`="'.$cid.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant_admini`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant_admini_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`mesaje_instant_admini_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`notificari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`notificari`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`ora_lei`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`parole_incercate`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`poezii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`poezii_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`poezii_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`poezii_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`poezii_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`prieteni`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`prieteni`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`quiz_membrii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`recupereaza`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`sms`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`sms_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`sms_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`sms_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`sms_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
if($meniu['biblia']==1)
{
$conn->query('UPDATE`spune_cartea_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`spune_cartea_raspunsuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
}
$conn->query('UPDATE`stiri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`stiri_abonati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`stiri_aprecieri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`stiri_comentarii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`stiri_note`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_ajutor`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_ajutor`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`t2_armata`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_invitatii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_invitatii`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`t2_membrii`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_procese`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_rapoarte`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`t2_targ`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`t2_triburi`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`tichet_intrebari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`tichet_raspunsuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`trivia_conectati`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`trivia_intrebari`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`trivia_intrebari`SET`valid`="'.$cid.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`trivia_raspunsuri`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`x_0`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`x_0`SET`la`="'.$cid.'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`x_0_jurnal`SET`de`="'.$cid.'"WHERE`de`="'.$la.'"');
actualizeaza_text('/la/'.$la.'-','/la/'.$cid.'-');
if($combin==1&&$detalii_membru[0]>0)
{
$conn->query('UPDATE`membrii`SET`postari`=postari+'.$detalii_membru[1].',`lei`=lei+'.$detalii_membru[2].',`banca_lei`=banca_lei+'.$detalii_membru[3].',`euro`=euro+'.$detalii_membru[4].',`banca_euro`=banca_euro+'.$detalii_membru[5].',`mesaje_chat`=mesaje_chat+'.$detalii_membru[6].',`cadoul`=cadoul+'.$detalii_membru[7].',`mesaje_instant`=mesaje_instant+'.$detalii_membru[8].',`puncte_joc`=puncte_joc+'.$detalii_membru[9].',`trivia`=trivia+'.$detalii_membru[10].',`spune_cartea`=spune_cartea+'.$detalii_membru[11].',`anagrame`=anagrame+'.$detalii_membru[12].',`top_alerte`=top_alerte+'.$detalii_membru[13].',`top_daruri`=top_daruri+'.$detalii_membru[14].',`top_mesaje`=top_mesaje+'.$detalii_membru[15].',`vizite`=vizite+'.$detalii_membru[16].($detalii_membrul[1]>$detalii_membru[17]?',`data`="'.$detalii_membru[17].'"':'').'WHERE`id`="'.$cid.'"');
sterge_membru($la,0);
}
return true;
}
function sterge_banc($pid)
{
global$conn;
$conn->query('DELETE FROM`bancuri`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`bancuri_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`bancuri_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`bancuri_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/banc/id/'.$pid.'-');
return true;
}
function sterge_bancuri($la,$conditie)
{
global$conn,$id_sters;
$bancuri=$conn->query('SELECT`id`FROM`bancuri`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($banc=$bancuri->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/banc/id/'.$banc[0].'-"');
$conn->query('UPDATE`bancuri`SET`de`="'.$id_sters.'"WHERE`id`="'.$banc[0].'"');
}
else
sterge_banc($banc[0]);
}
$conn->query('DELETE FROM`bancuri_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`bancuri_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`bancuri_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`bancuri_note`WHERE`de`="'.$la.'"');
}
}
function sterge_barnbuddy($la,$conditie)
{
global$conn,$id_sters;
if($conditie!=2)
{
$conn->query('DELETE FROM`barnbuddy_experienta`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`barnbuddy_membrii`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('UPDATE`barnbuddy_membrii`SET`care`="'.$id_sters.'"WHERE`care`="'.$la.'"');
$conn->query('DELETE FROM`barnbuddy_plante`WHERE`de`="'.$la.'"');
}
return true;
}
function sterge_carte($pid)
{
global$conn;
$conn->query('DELETE FROM`biblioteca_carti`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`biblioteca_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`biblioteca_semne`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`biblioteca_texte`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/biblioteca/id/'.$pid.'-');
return true;
}
function sterge_biblioteca($la,$conditie)
{
global$conn,$id_sters;
$carti=$conn->query('SELECT`id`FROM`biblioteca_carti`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($carte=$carti->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/biblioteca/id/'.$carte[0].'-"');
$conn->query('UPDATE`biblioteca_carti`SET`de`="'.$id_sters.'"WHERE`id`="'.$carte[0].'"');
}
else
sterge_carte($carte[0]);
}
$conn->query('DELETE FROM`biblioteca_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
$conn->query('DELETE FROM`biblioteca_semne`WHERE`de`="'.$la.'"');
}
function sterge_articol_blog($pid)
{
global$conn;
$conn->query('DELETE FROM`blog_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`blog_articole`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`blog_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`blog_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/articol/id/'.$pid.'-');
return true;
}
function sterge_blog($la,$conditie)
{
global$conn,$id_sters;
$articole=$conn->query('SELECT`id`FROM`blog_articole`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($articol=$articole->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/articol/id/'.$articol[0].'-"');
$conn->query('UPDATE`blog_articole`SET`de`="'.$id_sters.'"WHERE`id`="'.$articol[0].'"');
}
else
sterge_articol_blog($articol[0]);
}
$conn->query('DELETE FROM`blog_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`blog_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`blog_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`blog_note`WHERE`de`="'.$la.'"');
}
}
function sterge_cantare($pid)
{
global$conn;
$conn->query('DELETE FROM`cantari`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`cantari_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`cantari_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`cantari_note`WHERE`pid`="'.$pid.'"');
$conn->query('UPDATE`melodia_zilei`SET`id3`="0"WHERE`id3`="'.$pid.'"');
actualizeaza_text('[url=/cantare/id/'.$pid.'-');
return true;
}
function sterge_cantari($la,$conditie)
{
global$conn,$id_sters;
$cantari=$conn->query('SELECT`id`FROM`cantari`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($cantare=$cantari->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/cantare/id/'.$cantare[0].'-"');
$conn->query('UPDATE`cantari`SET`de`="'.$id_sters.'"WHERE`id`="'.$cantare[0].'"');
}
else
sterge_cantare($cantare[0]);
}
$conn->query('DELETE FROM`cantari_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`cantari_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`cantari_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`cantari_note`WHERE`de`="'.$la.'"');
}
}
function sterge_camera_chat($pid)
{
global$conn;
$conn->query('DELETE FROM`chat_arhiva`WHERE`cid`="'.$pid.'"');
$conn->query('DELETE FROM`chat_camere`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`chat_conectati`WHERE`rid`="'.$pid.'"');
$conn->query('DELETE FROM`chat_mesaje`WHERE`cid`="'.$pid.'"');
actualizeaza_text('[url=/camera-chat/camera/'.$pid.'-');
return true;
}
function sterge_chestionar($pid)
{
global$conn;
$conn->query('DELETE FROM`chestionar_intrebari`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`chestionar_raspunsuri`WHERE`pid`="'.$pid.'"');
$conn->query('UPDATE`forum_topicuri`SET`tid`="0"WHERE`tid`="'.$pid.'"');
actualizeaza_text('[url=/chestionar/id/'.$pid.'-');
return true;
}
function sterge_chestionare($la,$conditie)
{
global$conn,$id_sters;
$chestionare=$conn->query('SELECT`id`FROM`chestionar_intrebari`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($chestionar=$chestionare->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/chestionar/id/'.$chestionar[0].'-"');
$conn->query('UPDATE`chestionar_intrebari`SET`de`="'.$id_sters.'"WHERE`id`="'.$chestionar[0].'"');
}
else
sterge_chestionar($chestionar[0]);
}
if($conditie!=2)
$conn->query('DELETE FROM`chestionar_raspunsuri`WHERE`de`="'.$la.'"');
}
function sterge_fisier_descarcari($pid)
{
global$conn;
$conn->query('DELETE FROM`descarcari_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`descarcari_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`descarcari_fisiere`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`descarcari_note`WHERE`pid`="'.$pid.'"');
$conn->query('UPDATE`descarcari_fisiere`SET`id_nou`="0"WHERE`id_nou`="'.$pid.'"');
$conn->query('UPDATE`melodia_zilei`SET`id1`="0"WHERE`id1`="'.$pid.'"');
$conn->query('UPDATE`melodia_zilei`SET`id2`="0"WHERE`id2`="'.$pid.'"');
$conn->query('UPDATE`melodia_zilei`SET`id4`="0"WHERE`id4`="'.$pid.'"');
$conn->query('UPDATE`melodia_zilei`SET`id5`="0"WHERE`id5`="'.$pid.'"');
$conn->query('UPDATE`membrii`SET`melodie_favorita`="0"WHERE`melodie_favorita`="'.$pid.'"');
actualizeaza_text('[url=/fisier/id/'.$pid.'-');
return true;
}
function sterge_descarcari($la,$conditie)
{
global$conn,$id_sters;
$descarcari=$conn->query('SELECT`id`FROM`descarcari_fisiere`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($fisier=$descarcari->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/fisier/id/'.$fisier[0].'-"');
$conn->query('UPDATE`descarcari_fisiere`SET`de`="'.$id_sters.'"WHERE`id`="'.$fisier[0].'"');
}
else
sterge_fisier_descarcari($fisier[0]);
}
$conn->query('DELETE FROM`descarcari_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`descarcari_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`descarcari_aprecieri`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('UPDATE`descarcari_fisiere`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('DELETE FROM`descarcari_note`WHERE`de`="'.$la.'"');
}
}
function sterge_devotionala($pid)
{
global$conn;
$conn->query('DELETE FROM`devotionale`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`devotionale_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`devotionale_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`devotionale_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/devotionala/id/'.$pid.'-');
return true;
}
function sterge_devotionale($la,$conditie)
{
global$conn,$id_sters;
$devotionale=$conn->query('SELECT`id`FROM`devotionale`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($devotionala=$devotionale->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/devotionala/id/'.$devotionala[0].'-"');
$conn->query('UPDATE`devotionale`SET`de`="'.$id_sters.'"WHERE`id`="'.$devotionala[0].'"');
}
else
sterge_devotionala($devotionala[0]);
}
$conn->query('DELETE FROM`devotionale_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`devotionale_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`devotionale_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`devotionale_note`WHERE`de`="'.$la.'"');
}
}
function sterge_eroul($la,$conditie)
{
global$conn,$id_sters;
if($conditie!=2)
{
$conn->query('DELETE FROM`eroul`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('UPDATE`eroul`SET`care`="'.$id_sters.'"WHERE`care`="'.$la.'"');
}
return true;
}
function sterge_forum($pid)
{
global$conn;
$conn->query('DELETE FROM`forum_abonati_forumuri`WHERE`fid`="'.$pid.'"');
$conn->query('DELETE FROM`forum_forumuri`WHERE`id`="'.$pid.'"');
$topicuri=$conn->query('SELECT`id`FROM`forum_topicuri`WHERE`fid`="'.$pid.'"');
while($topic=$topicuri->fetch_row())
{
sterge_topic($topic[0]);
}
actualizeaza_text('[url=/forum/forum/'.$pid.'-');
return true;
}
function sterge_gradina($la,$conditie)
{
global$conn,$id_sters;
if($conditie!=2)
{
$conn->query('DELETE FROM`gradina_membrii`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('UPDATE`gradina_membrii`SET`care`="'.$id_sters.'"WHERE`care`="'.$la.'"');
$conn->query('DELETE FROM`gradina_plante_cumparate`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`gradina_seminte_cumparate`WHERE`de`="'.$la.'"');
}
return true;
}
function sterge_grup($pid)
{
global$adresasite,$conn,$id_robot;
$logo=$conn->query('SELECT`logo`FROM`grupuri`WHERE`id`="'.$pid.'"')->fetch_row()[0];
if($logo!='')
{
if(!@unlink($adresasite[6].'/'.$logo))
$conn->query('INSERT INTO`jurnal_admini`SET`nume`="Erori FTP",`de`="'.$id_robot.'",`text`="imaginea de la link-ul: '.$logo.', nu a putut fi ștearsă, trebuie să fie ștearsă manual din FTP.",`data`="'.$_SERVER['REQUEST_TIME'].'"');
}
$chat=$conn->query('SELECT`id`FROM`chat_camere`WHERE`clid`="'.$pid.'"')->fetch_row()[0];
if($chat>0)
sterge_camera_chat($chat);
$fid=$conn->query('SELECT`id`FROM`forum_forumuri`WHERE`clid`="'.$pid.'"')->fetch_row()[0];
if($fid>0)
sterge_forum($fid);
$conn->query('DELETE FROM`grupuri`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`grup_anunturi`WHERE`cid`="'.$pid.'"');
$conn->query('DELETE FROM`grup_membrii`WHERE`cid`="'.$pid.'"');
actualizeaza_text('[url=/grup/id/'.$pid.'-');
return true;
}
function sterge_grupuri($la,$conditie)
{
global$conn,$id_sters;
$grupuri=$conn->query('SELECT`id`FROM`grupuri`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($grup=$grupuri->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/grup/id/'.$grup[0].'-"');
$conn->query('UPDATE`grupuri`SET`de`="'.$id_sters.'"WHERE`id`="'.$grup[0].'"');
}
else
sterge_grup($grup[0]);
}
if($conditie!=2)
$conn->query('DELETE FROM`grup_membrii`WHERE`de`="'.$la.'"');
}
function sterge_maxima($pid)
{
global$conn;
$conn->query('DELETE FROM`maxime`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`maxime_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`maxime_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`maxime_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/maxima/id/'.$pid.'-');
return true;
}
function sterge_maxime($la,$conditie)
{
global$conn,$id_sters;
$maxime=$conn->query('SELECT`id`FROM`maxime`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($maxima=$maxime->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/maxima/id/'.$maxima[0].'-"');
$conn->query('UPDATE`maxime`SET`de`="'.$id_sters.'"WHERE`id`="'.$maxima[0].'"');
}
else
sterge_maxima($maxima[0]);
}
$conn->query('DELETE FROM`maxime_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`maxime_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`maxime_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`maxime_note`WHERE`de`="'.$la.'"');
}
}
function sterge_meditatie($pid)
{
global$conn;
$conn->query('DELETE FROM`meditatii`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`meditatii_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`meditatii_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`meditatii_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/meditatie/id/'.$pid.'-');
return true;
}
function sterge_meditatii($la,$conditie)
{
global$conn,$id_sters;
$meditatii=$conn->query('SELECT`id`FROM`meditatii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($meditatie=$meditatii->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/meditatie/id/'.$meditatie[0].'-"');
$conn->query('UPDATE`meditatii`SET`de`="'.$id_sters.'"WHERE`id`="'.$meditatie[0].'"');
}
else
sterge_meditatie($meditatie[0]);
}
$conn->query('DELETE FROM`meditatii_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`meditatii_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`meditatii_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`meditatii_note`WHERE`de`="'.$la.'"');
}
}
function sterge_mesaj_instant($pid)
{
global$conn;
$conn->query('DELETE FROM`mesaje_instant`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`mesaje_instant_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`mesaje_instant_comentarii`WHERE`pid`="'.$pid.'"');
actualizeaza_text('mesajul instant [b]'.$pid.'[/b]');
return true;
}
function sterge_mesaje_instant($la,$conditie)
{
global$conn;
$mesaje_instant=$conn->query('SELECT`id`FROM`mesaje_instant`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($mesaj_instant=$mesaje_instant->fetch_row())
{
sterge_mesaj_instant($mesaj_instant[0]);
}
$conn->query('DELETE FROM`mesaje_instant_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
$conn->query('DELETE FROM`mesaje_instant_aprecieri`WHERE`de`="'.$la.'"');
}
function sterge_mesaj_instant_admini($pid)
{
global$conn;
$conn->query('DELETE FROM`mesaje_instant_admini`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`mesaje_instant_admini_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`mesaje_instant_admini_comentarii`WHERE`pid`="'.$pid.'"');
actualizeaza_text('mesajul instant admini [b]'.$pid.'[/b]');
return true;
}
function sterge_mesaje_instant_admini($la,$conditie)
{
global$conn;
$mesaje_instant_admini=$conn->query('SELECT`id`FROM`mesaje_instant_admini`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($mesaj_instant_admini=$mesaje_instant_admini->fetch_row())
{
sterge_mesaj_instant_admini($mesaj_instant_admini[0]);
}
$conn->query('DELETE FROM`mesaje_instant_admini_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
$conn->query('DELETE FROM`mesaje_instant_admini_aprecieri`WHERE`de`="'.$la.'"');
}
function sterge_poezie($pid)
{
global$conn;
$conn->query('DELETE FROM`poezii`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`poezii_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`poezii_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`poezii_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/poezie/id/'.$pid.'-');
return true;
}
function sterge_poezii($la,$conditie)
{
global$conn,$id_sters;
$poezii=$conn->query('SELECT`id`FROM`poezii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($poezie=$poezii->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/poezie/id/'.$poezie[0].'-"');
$conn->query('UPDATE`poezii`SET`de`="'.$id_sters.'"WHERE`id`="'.$poezie[0].'"');
}
else
sterge_poezie($poezie[0]);
}
$conn->query('DELETE FROM`poezii_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`poezii_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`poezii_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`poezii_note`WHERE`de`="'.$la.'"');
}
}
function sterge_postare($pid,$tid)
{
global$conn;
$conn->query('DELETE FROM`evenimente`WHERE`text`LIKE"%/tip/'.$pid.'%"&&`text`LIKE"%[url=/forum/topic/'.$tid.'-%"');
$conn->query('DELETE FROM`forum_postari`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`notificari`WHERE`text`LIKE"%/tip/'.$pid.'%"&&`text`LIKE"%[url=/forum/topic/'.$tid.'-%"');
$postari=$conn->query('SELECT`id`,`tid`FROM`forum_postari`WHERE`citat`="'.$pid.'"');
while($postare=$postari->fetch_row())
{
sterge_postare($postare[0],$postare[1]);
}
return true;
}
function sterge_postari($la,$conditie)
{
global$conn;
$postari=$conn->query('SELECT`id`,`tid`FROM`forum_postari`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($postare=$postari->fetch_row())
{
sterge_postare($postare[0],$postare[1]);
}
}
function sterge_poza($pid)
{
global$adresasite,$conn,$id_robot;
$conn->query('DELETE FROM`galerie_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`galerie_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`galerie_note`WHERE`pid`="'.$pid.'"');
$poza=$conn->query('SELECT`mare`,`mica`FROM`galerie_poze`WHERE`id`="'.$pid.'"')->fetch_row();
$conn->query('DELETE FROM`galerie_poze`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`jurnal_admini`WHERE`text`LIKE"%[url=/poza/id/'.$pid.']%"');
$conn->query('UPDATE`membrii`SET`avatar`=""WHERE`avatar`="'.$poza[1].'"');
if(!@unlink($adresasite[6].'/'.$poza[0])&&$poza[0]!='')
$conn->query('INSERT INTO`jurnal_admini`SET`nume`="Erori FTP",`de`="'.$id_robot.'",`text`="poza de la link-ul: '.$poza[0].', nu a putut fi ștearsă, trebuie să fie ștearsă manual din FTP.",`data`="'.$_SERVER['REQUEST_TIME'].'"');
if(!@unlink($adresasite[6].'/'.$poza[1])&&$poza[1]!='')
$conn->query('INSERT INTO`jurnal_admini`SET`nume`="Erori FTP",`de`="'.$id_robot.'",`text`="poza de la link-ul: '.$poza[1].', nu a putut fi ștearsă, trebuie să fie ștearsă manual din FTP.",`data`="'.$_SERVER['REQUEST_TIME'].'"');
actualizeaza_text('[url=/poza/id/'.$pid.']');
return true;
}
function sterge_album_poze($pid,$la)
{
global$conn;
if($pid>0)
{
$conn->query('DELETE FROM`galerie_albume`WHERE`id`="'.$pid.'"&&`de`="'.$la.'"');
actualizeaza_text('[url=/poze-membru/la/'.$la.'-'.seo(nume($la,1)).'/album/'.$pid.'-');
}
$poze=$conn->query('SELECT`id`FROM`galerie_poze`WHERE`fid`="'.$pid.'"&&`de`="'.$la.'"');
while($poza=$poze->fetch_row())
{
sterge_poza($poza[0]);
}
return true;
}
function sterge_poze($la,$conditie)
{
global$conn,$id_sters;
$albume=$conn->query('SELECT`id`,`de`FROM`galerie_albume`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($album=$albume->fetch_row())
{
sterge_album_poze($album[0],$album[1]);
}
$conn->query('DELETE FROM`galerie_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
$poze=$conn->query('SELECT`id`FROM`galerie_poze`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($poza=$poze->fetch_row())
{
sterge_poza($poza[0]);
}
if($conditie!=2)
{
$conn->query('DELETE FROM`galerie_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`galerie_note`WHERE`de`="'.$la.'"');
if($la!=0)
{
$conn->query('UPDATE`galerie_comentarii`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`galerie_poze`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`galerie_poze`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
}
}
}
function sterge_sms($pid)
{
global$conn;
$conn->query('DELETE FROM`sms`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`sms_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`sms_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`sms_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/sms/id/'.$pid.'-');
return true;
}
function sterge_smsuri($la,$conditie)
{
global$conn,$id_sters;
$smsuri=$conn->query('SELECT`id`FROM`sms`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($sms=$smsuri->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/sms/id/'.$sms[0].'-"');
$conn->query('UPDATE`smsuri`SET`de`="'.$id_sters.'"WHERE`id`="'.$sms[0].'"');
}
else
sterge_sms($sms[0]);
}
$conn->query('DELETE FROM`sms_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`sms_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`sms_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`sms_note`WHERE`de`="'.$la.'"');
}
}
function sterge_stire($pid)
{
global$conn;
$conn->query('DELETE FROM`stiri`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`stiri_aprecieri`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`stiri_comentarii`WHERE`pid`="'.$pid.'"');
$conn->query('DELETE FROM`stiri_note`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/stire/id/'.$pid.'-');
return true;
}
function sterge_stiri($la,$conditie)
{
global$conn,$id_sters;
$stiri=$conn->query('SELECT`id`FROM`stiri`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($stire=$stiri->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/stire/id/'.$stire[0].'-"');
$conn->query('UPDATE`stiri`SET`de`="'.$id_sters.'"WHERE`id`="'.$stire[0].'"');
}
else
sterge_stire($stire[0]);
}
$conn->query('DELETE FROM`stiri_comentarii`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
if($conditie!=2)
{
$conn->query('DELETE FROM`stiri_abonati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`stiri_aprecieri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`stiri_note`WHERE`de`="'.$la.'"');
}
}
function sterge_tichet($pid)
{
global$conn;
$conn->query('DELETE FROM`tichet_intrebari`WHERE`id`="'.$pid.'"');
$conn->query('DELETE FROM`tichet_raspunsuri`WHERE`pid`="'.$pid.'"');
actualizeaza_text('[url=/tichet/id/'.$pid.'-');
return true;
}
function sterge_tichete($la,$conditie)
{
global$conn;
$tichete=$conn->query('SELECT`id`FROM`tichet_intrebari`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($tichet=$tichete->fetch_row())
{
sterge_tichet($tichet[0]);
}
$conn->query('DELETE FROM`tichet_raspunsuri`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
}
function sterge_topic($pid)
{
global$conn;
$chestionar=$conn->query('SELECT`tid`FROM`forum_topicuri`WHERE`id`="'.$pid.'"')->fetch_row();
if($chestionar[0]>0)
sterge_chestionar($chestionar[0]);
$conn->query('DELETE FROM`forum_abonati_topicuri`WHERE`tid`="'.$pid.'"');
$conn->query('DELETE FROM`forum_postari`WHERE`tid`="'.$pid.'"');
$conn->query('DELETE FROM`forum_topicuri`WHERE`id`="'.$pid.'"');
actualizeaza_text('[url=/forum/topic/'.$pid.'-');
return true;
}
function sterge_topicuri($la,$conditie)
{
global$conn,$id_sters;
$topicuri=$conn->query('SELECT`id`FROM`forum_topicuri`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
while($topic=$topicuri->fetch_row())
{
if($conditie==1)
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="/forum/topic/'.$topic[0].'-"');
$conn->query('UPDATE`forum_topicuri`SET`de`="'.$id_sters.'"WHERE`id`="'.$topic[0].'"');
}
else
sterge_topic($topic[0]);
}
if($conditie!=2)
{
$conn->query('DELETE FROM`forum_abonati_forumuri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`forum_abonati_topicuri`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('DELETE FROM`forum_conectati`WHERE`de`="'.$la.'"');
}
}
function sterge_t2($la,$conditie)
{
global$conn;
if($conditie!=2)
{
$conn->query('DELETE FROM`t2_ajutor`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`t2_armata`WHERE`de`="'.$la.'"');
if($la!=0)
$conn->query('DELETE FROM`t2_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`t2_invitatii`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`t2_membrii`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`t2_procese`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`t2_rapoarte`WHERE`la`="'.$la.'"');
$conn->query('DELETE FROM`t2_targ`WHERE`de`="'.$la.'"');
if($conn->query('SELECT COUNT(*)FROM`t2_triburi`WHERE`de`="'.$la.'"')->fetch_row()[0])
{
$conn->query('UPDATE`t2_membrii`SET`trib`=""WHERE`trib`="'.$conn->query('SELECT`nume`FROM`t2_triburi`WHERE`de`="'.$la.'"')->fetch_row()[0].'"');
$conn->query('DELETE FROM`t2_triburi`WHERE`de`="'.$la.'"');
}
}
return true;
}
function sterge_membru($la,$conditie)
{
global$conn,$id_proprietari,$id_sters,$meniu;
$detalii_membrul=$conn->query('SELECT`nume`,`email`FROM`membrii`WHERE`id`="'.$la.'"')->fetch_row();
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="'.$detalii_membrul[0].'"');
sterge_bancuri($la,$conditie);
sterge_barnbuddy($la,$conditie);
sterge_biblioteca($la,$conditie);
sterge_blog($la,$conditie);
sterge_cantari($la,$conditie);
sterge_chestionare($la,$conditie);
sterge_descarcari($la,$conditie);
sterge_devotionale($la,$conditie);
sterge_eroul($la,$conditie);
sterge_gradina($la,$conditie);
sterge_grupuri($la,$conditie);
sterge_maxime($la,$conditie);
sterge_meditatii($la,$conditie);
sterge_mesaje_instant($la,$conditie);
sterge_mesaje_instant_admini($la,$conditie);
sterge_poezii($la,$conditie);
sterge_postari($la,$conditie);
sterge_poze($la,$conditie);
sterge_smsuri($la,$conditie);
sterge_stiri($la,$conditie);
sterge_tichete($la,$conditie);
sterge_topicuri($la,$conditie);
sterge_t2($la,$conditie);
$conn->query('DELETE FROM`alerte`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':'||`la`="'.$la.'"'));
$conn->query('DELETE FROM`chat_arhiva`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
$conn->query('DELETE FROM`chat_mesaje`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
$conn->query('DELETE FROM`comentarii_profil`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':'||`la`="'.$la.'"'));
$conn->query('DELETE FROM`daruri_oferite`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':'||`la`="'.$la.'"'));
$conn->query('DELETE FROM`evenimente`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':''));
$conn->query('DELETE FROM`mesaje`WHERE`de`="'.$la.'"'.($conditie==2?'&&`data`>"'.($_SERVER['REQUEST_TIME']-86400).'"':'||`la`="'.$la.'"'));
if($conditie!=2)
{
$conn->query('DELETE FROM`anagrame_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`baiatul_zilei`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`baiatul_zilei_din`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`casatorii_produse_cumparate`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`casatorii_produse_oferite`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`casatorii_virtuale`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`chat_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`fata_zilei`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`fata_zilei_din`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`ignorati`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`imagini_zambareti_favoriti`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`istoric_browsere`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`istoric_logari`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`istoric_vizite_profil`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`jurnal_admini`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`magazin_cumparaturi`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`membrii_pedepsiti`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`notificari`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`ora_lei`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`parole_incercate`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`prieteni`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`quiz_membrii`WHERE`de`="'.$la.'"');
if($meniu['biblia']==1)
$conn->query('DELETE FROM`spune_cartea_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`trivia_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`x_0`WHERE`de`="'.$la.'"||`la`="'.$la.'"');
$conn->query('DELETE FROM`x_0_jurnal`WHERE`de`="'.$la.'"');
if($la!=0)
{
$conn->query('DELETE FROM`anagrame_raspunsuri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`chat_arhiva`WHERE`la`="'.$la.'"');
$conn->query('DELETE FROM`chat_mesaje`WHERE`la`="'.$la.'"');
$conn->query('DELETE FROM`evenimente`WHERE`la`="'.$la.'"');
$conn->query('DELETE FROM`jurnal_admini`WHERE`la`="'.$la.'"');
$conn->query('DELETE FROM`membrii`WHERE`id`="'.$la.'"');
$conn->query('DELETE FROM`membrii_conectati`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`recupereaza`WHERE`de`="'.$la.'"');
if($meniu['biblia']==1)
$conn->query('DELETE FROM`spune_cartea_raspunsuri`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`trivia_raspunsuri`WHERE`de`="'.$la.'"');
$conn->query('UPDATE`alerte`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`anagrame_cuvinte`SET`de`="'.$id_sters.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`anagrame_cuvinte`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`casatorii_virtuale`SET`divort`="'.$id_sters.'"WHERE`divort`="'.$la.'"');
$conn->query('UPDATE`chat_camere`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`comentarii_profil`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`contact`SET`la`="'.$id_proprietari[0].'"WHERE`la`="'.$la.'"');
$conn->query('UPDATE`contact`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`forum_postari`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`forum_topicuri`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`istoric_nume`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`invitatde`="'.$id_sters.'"WHERE`invitatde`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`profil`="'.$id_sters.'"WHERE`profil`="'.$la.'"');
$conn->query('UPDATE`membrii`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
$conn->query('UPDATE`membrii_pedepsiti`SET`exid`="'.$id_sters.'"WHERE`exid`="'.$la.'"');
$conn->query('UPDATE`mesaje`SET`raportat`="'.$id_sters.'"WHERE`raportat`="'.$la.'"');
$conn->query('UPDATE`trivia_intrebari`SET`de`="'.$id_sters.'"WHERE`de`="'.$la.'"');
$conn->query('UPDATE`trivia_intrebari`SET`valid`="'.$id_sters.'"WHERE`valid`="'.$la.'"');
}
}
if($conditie==1)
{
if($conn->query('SELECT COUNT(*)FROM`elemente_ramase`WHERE`la`="'.$la.'"')->fetch_row()[0]==1)
{
$conn->query('DELETE FROM`istoric_nume`WHERE`de`="'.$la.'"');
$conn->query('DELETE FROM`elemente_ramase`WHERE`la`="'.$la.'"&&`link`="'.$detalii_membrul[0].'"');
}
else
{
$numele=$conn->query('SELECT`id`,`nume`FROM`istoric_nume`WHERE`de`="'.$la.'"ORDER BY`data`DESC');
while($nume=$numele->fetch_row())
{
$conn->query('INSERT INTO`elemente_ramase`SET`la`="'.$la.'",`link`="'.$nume[1].'"');
$conn->query('DELETE FROM`istoric_nume`WHERE`de`="'.$la.'"&&`id`="'.$nume[0].'"');
}
}
$conn->query('DELETE FROM`membrii_de_sters`WHERE`la`="'.$la.'"');
}
return true;
}
function sterge_folder($folder)
{
if(is_dir($folder))
{
$elemente=scandir($folder);
foreach($elemente AS$element)
{
if($element!='.'&&$element!='..')
{
if(filetype($folder.'/'.$element)=='dir')
sterge_folder($folder.'/'.$element);
else
unlink($folder.'/'.$element);
}
}
reset($elemente);
return rmdir($folder);
}
else
return false;
}