include("admin/config.php"); $banner=''; include('top.eng.php'); ?> include("admin/config.php"); $sql="select * from ".$news." where (lingua = 'uk') order by id_news desc"; if(!($result=mysql_query($sql,$conn))) { echo ("Error selecting data from NEWS table.\n"); }else{ while ($datarecord=mysql_fetch_row ($result)) { //if (time()<$datarecord[8]) {continue;} //if (time()>$datarecord[9]) {continue;} if ($datarecord[14]=='top'){ $titolo_top=stripslashes($datarecord[2]); $occhiello_top=$datarecord[3]; $immagine_top=$datarecord[15]; $cod_top=$datarecord[0]; $top='on';} $testo=explode(" ",stripslashes($occhiello_top)); $break=50; $end=50; $fine=' ...'; $i=0; $text=''; while ($i < $break) { $text=$text." ".$testo[$i]; $i++; } $occhiello_top_1=$text; $i=$break; $text=''; while ($i < $end) { $text=$text." ".$testo[$i]; $i++;} $occhiello_top_2=$text.$fine; if ($datarecord[14]=='sx1'){ $titolo_sx1=stripslashes($datarecord[2]); $occhiello_sx1=$datarecord[3]; $immagine_sx1=$datarecord[15]; $cod_sx1=$datarecord[0]; $sx1='on';} $testo=explode(" ",stripslashes($occhiello_sx1)); $break=13; $end=44; $fine=' ...'; $i=0; $text=''; while ($i < $break) { $text=$text." ".$testo[$i]; $i++; } $occhiello_sx1_1=$text; $i=$break; $text=''; while ($i < $end) { $text=$text." ".$testo[$i]; $i++;} $occhiello_sx1_2=$text.$fine; if ($datarecord[14]=='dx1'){ $titolo_dx1=stripslashes($datarecord[2]); $occhiello_dx1=$datarecord[3]; $immagine_dx1=$datarecord[15]; $cod_dx1=$datarecord[0]; $dx1='on';} $testo=explode(" ",stripslashes($occhiello_dx1)); $break=13; $end=44; $fine=' ...'; $i=0; $text=''; while ($i < $break) { $text=$text." ".$testo[$i]; $i++; } $occhiello_dx1_1=$text; $i=$break; $text=''; while ($i < $end) { $text=$text." ".$testo[$i]; $i++;} $occhiello_dx1_2=$text.$fine; if ($datarecord[14]=='sx2'){ $titolo_sx2=stripslashes($datarecord[2]); $occhiello_sx2=$datarecord[3]; $immagine_sx2=$datarecord[15]; $cod_sx2=$datarecord[0]; $sx2='on';} $testo=explode(" ",stripslashes($occhiello_sx2)); $break=13; $end=44; $fine=' ...'; $i=0; $text=''; while ($i < $break) { $text=$text." ".$testo[$i]; $i++; } $occhiello_sx2_1=$text; $i=$break; $text=''; while ($i < $end) { $text=$text." ".$testo[$i]; $i++;} $occhiello_sx2_2=$text.$fine; if ($datarecord[14]=='dx2'){ $titolo_dx2=stripslashes($datarecord[2]); $occhiello_dx2=$datarecord[3]; $immagine_dx2=$datarecord[15]; $cod_dx2=$datarecord[0]; $dx2='on';} $testo=explode(" ",stripslashes($occhiello_dx2)); $break=12; $end=28; $fine=' (...)'; $i=0; $text=''; while ($i < $break) { $text=$text." ".$testo[$i]; $i++; } $occhiello_dx2_1=$text; $i=$break; $text=''; while ($i < $end) { $text=$text." ".$testo[$i]; $i++;} $occhiello_dx2_2=$text.$fine; } } mysql_close($conn);?>
|
||||||||||||||