Просмотр файла index.php

Размер файла: 2.02Kb
<?php
/////ATMer
///Adder of Text Motor(beta-2)
////Made by Akdmeh
/////e-mail:[email protected]
////Property of http://begwer.net
////Любое копирование либо изменение без уведомление и соглашение автора незаконно!
////ICQ: 371975638
$title='Разделы';
if (file_exists('set.php')) include"set.php";
if (!isset($adminhref)) $adminhref='No';
if (!isset($reverse)) $reverse='No';
if (!isset($datecreate)) $datecreate='No';
if (!isset($css)) $css='http://begwer.net/style.css';
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
echo '<html>
<head><title>'.$title.'</title>';
echo '<link href="'.$css.'" type="text/css" rel="stylesheet"></head>';
echo '<body>';
if (isset($_GET['dir']))
{ $dir=htmlspecialchars($_GET['dir']);
}
else
{ echo 'Не выбран раздел! Если вы только что поставили скрипт,зайдите в админ-панель,и добавьте его. После этого сообщение исчезнет,и появится список файлов в разделе';
exit;
}
echo '<center>Здравствуйте!<br>Выберите  статью:</center>';//сюда введите свой вариант надписи
echo '<div class="diva">';
$lm=file_get_contents($dir.'/list.dat') or die('Раздела не существует!');
$ln=file_get_contents($dir.'/list2.dat') or die('Раздела не существует!');
$name=explode('|||',$ln);
$file=explode('|||',$lm);
$a=array_pop($name);
$b=array_pop($file);
if ($reverse == 'Yes')
{ $name=array_reverse($name);
$file=array_reverse($file);
}
for ($i=0; $i<count($name); $i++)
{
echo '<a href="read.php?dir='.$dir.'&file='.$file[$i].'">'.$name[$i].'</a>';
if ($datecreate=='Yes') echo '('.date("H:i:s d-m-Y",filemtime($dir.'/'.$file[$i].'.txt')).')';
echo '<br>';
}
if ($adminhref == 'Yes')
echo '<hr><a href="admin.php">В админ-панель</a><br>';
echo '</div><a href="http://begwer.net">Powered by BeGWeR.net</a>';
?></body></html>