Вход Регистрация
Файл: news/smile.php
Строк: 37
<?php
include 'config.php';
include 
'head.php';
include 
'functions.php';
echo 
'<div class="text">';
if (empty(
$_GET['page']))
{
$page=1;
}
else
{
$page=$_GET['page'];
}
$glob=glob("smile/*");
$count=count($glob);
$obsum=$page*$vsego;
$nasum=$obsum-$vsego;
for (
$i=$nasum$i<$obsum$i++)
{
if (!empty(
$glob[$i]))
{
$file=$glob[$i];
$file=str_replace('smile/','',$file);
$afile=explode(".",$file);
$bfile=$afile[0];
$trans1=array("TS","ts","JO","ZH","CH","SH","SCH","YE","JU","JA","jo","zh","ch","sh","sch","ye","ju","ja","A","B","V","G","D","E","Z","I","J","K","L","M","N","O","P","R","S","T","U","F","H","Y","a","b","v","g","d","e","z","i","j","k","l","m","n","o","p","r","s","t","u","f","h","'","y","X","x","1","2","3","4","5","6","7");
$trans2=array("Ц","ц","Ё","Ж","Ч","Ш","Щ","Э","Ю","Я","ё","ж","ч","ш","щ","э","ю","я","А","Б","В","Г","Д","Е","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ы","а","б","в","г","д","е","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ь","ы","КС","кс",":-)",":-(",":-|",":-0",";-)","8-)",":-D");
$bfile=str_replace($trans1,$trans2,$bfile); 
$cfile=explode(".",$file);
$s=$cfile[0];
if (
$i%2==0)
{
echo 
'<div class="even">';
}
else
{
echo 
'<div class="uneven">';
}
if (
$s==|| $s==|| $s==|| $s==|| $s==|| $s==|| $s==7)
{
echo 
'<img src="smile/'.$file.'" alt="'.$bfile.'"/>&nbsp;&nbsp;';
echo 
$bfile.'<br/>';
}
else
{
echo 
'<img src="smile/'.$file.'" alt="'.$bfile.'"/>&nbsp;&nbsp;';
echo 
':'.$bfile.':<br/>';
}
echo 
'</div>';
}
}
echo 
'</div>';
$page_nav=ceil($count/$vsego);
if (
$page_nav>1)
{
echo 
'<p>';
if (
$page==1)
{
echo 
'';
}
else
{
echo 
'<a href="?page='.($page-1).'">&lt;- Назад</a>';
}
if (
$page==or $page_nav==$page)
{
}
else
{
echo 
' | ';
}
if (
$page==$page_nav)
{
echo 
'';
}
else
{
echo 
'<a href="?page='.($page+1).'">Далее -&gt;</a>';
}
echo 
'<br/>';
if (
$page_nav>3)
{
echo 
'<form action="" method="get">
<select name="page">'
;
for(
$i=1;$i<$page_nav+1;$i++)
{
echo 
'<option value="'.$i.'"';
if (
$page==$i)
{
echo 
' selected="selected"';
}
echo 
'>'.$i.'</option>';
}
echo 
'</select><br/>
<input type="submit" value="Продолжить"/>
</form>'
;
}
echo 
'</p>';
}
echo 
'<p>- <a href="newpost.php">К форме</a><br/></p>';
echo 
$end;
?>
Онлайн: 0
Реклама