Размер файла: 3.55Kb
<?php
#-----------------------------------------------------#
# **** WAP-MOTORS AutoDetect XHTML/WML **** #
#-----------------------------------------------------#
# Original Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
#-----------------------------------------------------#
# AutoDetect Made by : X-ray (Юрий) #
# E-mail : [email protected] #
# Site : http://zugdidi.us #
# WAP-Site : http://geowap.mobi #
#-----------------------------------------------------#
# Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
$text = file(BASEDIR."local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);}
echo'Вы можете вставлять смайлики<br>';
$dir = opendir (BASEDIR."images/smiles");
while ($file = readdir ($dir))
{ if (ereg (".gif$", "$file"))
{$a[]=$file;}}
closedir ($dir);
sort($a);
$total = count($a);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + $config_smilelist){ $end = $total; }
else {$end = $start + $config_smilelist; }
for ($i = $start; $i < $end; $i++){
$smkod=str_replace(".gif","",$a[$i]);
echo '<img src="'.BASEDIR.'images/smiles/'.$a[$i].'" alt="">';
echo '- :'.$smkod.'<br>';
}
echo'<hr>';
# постраничный вывод
if ($start != 0) {echo '<a href="smiles.php?start='.($start - $config_smilelist).'&'.$detect_wap.''.SID.'"><-Назад </a> ';}else{echo'<-Назад ';}
echo'|';
if ($total > $start + $config_smilelist) {echo ' <a href="smiles.php?start='.($start + $config_smilelist).'&'.$detect_wap.''.SID.'"> Далее-></a>';}else{echo' Далее->';}
$a=count($a);
$ba=ceil($a/$config_smilelist);
$ba2=floor(($a-1)/$config_smilelist)*$config_smilelist;
echo'<br><hr>Страницы:';
$asd=$start-($config_smilelist*4);
$asd2=$start+($config_smilelist*5);
if($asd<$a && $asd>0){echo ' <a href="smiles.php?start=0&'.$detect_wap.''.SID.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$a && $i>=0){
$ii=floor(1+$i/$config_smilelist);
if ($start==$i) {
echo ' <b>'.$ii.'</b>';
}
else {
echo ' <a href="smiles.php?start='.$i.'&'.$detect_wap.''.SID.'">'.$ii.'</a>';
}}
$i=$i+$config_smilelist;}
if($asd2<$a){echo ' ... <a href="smiles.php?start='.$ba2.'&'.$detect_wap.''.SID.'">'.$ba.'</a>';}
echo '<br><br>Всего доступно cмайлов: '.$total.'<br>';
echo'<a href="../index.php?'.$detect_wap.''.SID.'">На главную</a>';
include_once"../themes/$config_themes/foot.php";
?>