![](./im/avatars/personal/8589-avatar.jpg)
Новичок
![](./im/images/pips1.gif)
Покинул форум
Сообщений всего: 17
Дата рег-ции: Нояб. 2011
Откуда: Городок
Помог: 0 раз(а)
![](./templates/InvisionExBB/im/spacer.gif)
|
<?php
include_once '../sys/inc/start.php';
$doc = new document();
$doc->title = 'sms поздравления';
$five = 800;
$tranc = 1;
$sDir ='./book/' ;
$sMask ='*.txt' ;
array_walk (glob($sDir .'/'. $sMask), function ($value , $key)
{
if($rFile =fopen ($value , 'r'))
{
echo("<a href='" .$ value ."'>".htmlspecialchars (fgets ($rFile ))."</a>");
fclose ($rFile );
}
});
$echo .= '<hr>';
if($p == '1') $echo .= ''; else {$echo .= '<a href="index.php?id='.$id.'&p='.($p-1).'">назад</a>';$echo .= ' '; }
if($end=='1') $echo .= ''; else {$echo .= '<a href="index.php?id='.$id.'&p='.($p+1).'">далее</a>';}
$echo .= '<br/><a href="index.php?go=1&id='.$id.'">перейти</a>';
$echo .= '<br/><a href="index.php">в начало</a>';
}
else $echo .='
введите номер страницы от 1 до '.(ceil(strlen($file)/$five)).'<br/><input name="code" format="*N" maxlength="10" title="code"/>
<anchor title="go">перейти<go href="index.php" method="get">
<postfield name="p" value="$(code)"/>
<postfield name="id" value="'.$id.'"/>
</go></anchor><br/><a href="index.php">в начало</a>';
}
}
$echo .= '<br/><a href="http://wap.land-of-mags.com/bib/index.php">В библиотеку</a></p>';
function unicode($string)
{
$rus=array('А','Б','В','Г','Д','Е','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У','Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я',
'а','б','в','г','д','е','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я');
$string = str_replace('Ё','Ё',$string);
$string = str_replace('ё','ё',$string);
for($i=0; $i<count($rus); $i++)
{
$s=1040;
$d = '&#'.($s+$i).';';
$string = str_replace($rus[$i],$d,$string);
}
return $string;
}
if($tranc==0) echo $echo; else echo unicode($echo);
?>
|