L’Express de Madagascar Online : quotidien d’information et d’analyse
$criteria = array(“/[s,]{1,}(na|sa|ou|et|and)[s,]{1,}/i”, “/[s,]{0,}(+)[s,]{0,}/i”) ; $replace = array(” “, ” “) ; $bannit_words = array(‘de’, ‘la’, ‘le’, ‘du’, ‘des’, ‘aux’) ; $search = isset($_GET['search'])?str_replace(“*”, “%”, stripslashes($_GET['search'])):”" ; if (isset($search)&&strlen($search)>=2) { if (preg_match_all(‘/”([^"']+)”/i’, $search, $quoted_tags)) { foreach($quoted_tags[1] as $value) $value = trim($value) ; if(!in_array($value, $bannit_words))$tags[]= $value ; $search = preg_replace(‘/”(.+)”/i’, ”, $search) ; } $search = preg_replace($criteria, $replace, $search) ; $search = str_replace(“/”, “”, $search) ; $search = str_replace(“\”, “”, $search) ; $split = preg_split(“/[s,]+/”, $search) ; foreach($split as $value) { $value = trim($value) ; if (strlen($value)>1&&!in_array($value, $bannit_words))$tags[] = $value ; } } $table =’news’ ; $query = “SELECT id, category, title, title2, abstract, content, author, xcode, n_edition, DATE_FORMAT(date, ‘%Y’) as year, view FROM $table WHERE id={$_GET['id']}” ; $request = mysql_query($query) ; $nb = mysql_num_rows($request) ; $ln = mysql_fetch_array($request) ; EXTRACT($ln) ; $qr = “SELECT DATE_FORMAT(date_publication, ‘%d-%m-%Y’) FROM editions WHERE n_edition=$n_edition” ; $rq = mysql_query($qr) ; $date = mysql_result($rq,0,0) ; $voiraussi = “” ; $table = “news” ; $query = “UPDATE $table set view = view+1 WHERE id=’$id’” ; $request = mysql_query($query) ; $query = “SELECT id as id2, title as titre, title2 as soustitre FROM $table WHERE category=’$category’ and id’$id’ AND n_edition=$n_edition order by id” ; $request = mysql_query($query) ; $nb = mysql_num_rows($request) ; if ($nb > 0) { $voiraussi = ” Autres titres
- ” ; while($fields = mysql_fetch_array($request)) { EXTRACT($fields) ; $titre = strip_tags($titre) ; $soustitre = strip_tags($soustitre) ; $voiraussi .= “
- $titre- $soustitre
” ; } $voiraussi .= “
” ; } // $filename = ($photo1′NONE’)?”diaspora/$year/$photo1″:”images/diaspora.jpg” ; $colorarray = array(“black”, “red”, “green”, “darkblue”, “blue”, “orange”, “yellow”, “gray”,”pink”) ; $y = date(“Y”) ; $category = strtoupper($category) ; $title_author = eregi(“^Interview”, $title)?”Propos recueilli par”:”" ; $window = “$category $title $title2 $abstract $content $author Date : $date
– Envoyer cet article
Popularity: 1% [?]

Leave your response!