<?php
////////////////////////////////////////////////////////////////////////////
// -_- W|W PHP-master -_- //
// //
// Copyright 2008 MyIE //
// Create and Design by -_- MyIE //
// Site (web) -_- http://www.phpedited.com //
// Site (wap) -_- http://wap.phpedited.com //
// E-mail (MyIE) -_- [email protected] //
// ICQ (MyIE) -_- 952-11-78 //
// //
// Вы не имеете право убирать копирайт //
// оффициального сайта! //
//This program is free software: you can redistribute it and/or modify //
//it under the terms of the GNU General Public License as published by //
//the Free Software Foundation, either version 3 of the License, or //
//(at your option) any later version. //
// //
//This program is distributed in the hope that it will be useful, //
//but WITHOUT ANY WARRANTY; without even the implied warranty of //
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
//GNU General Public License for more details. //
// //
//You should have received a copy of the GNU General Public License //
//along with this program. If not, see <http://www.gnu.org/licenses/>. //
////////////////////////////////////////////////////////////////////////////
require_once"tmpl/func.php";
require_once"tmpl/conf.php";
require_once"tmpl/ses.php";
?>
<HTML>
<HEAD>
<?php
echo("<title>$title</title>");
?>
<meta name="description" content="Наш сайт является проектом, с которого вы можете скачать бесплатно готовый движок, и настраивать его по своему усмотрению не знаю сложных языков программирования">
<meta name="keywords" content="сайт,движок,готовый,wap,web,дизайн,шаблон,бесплатно,БД">
<script language=Javascript>
function SubmitControl(tocheack)
{
if (document.all || document.getElementById)
{
for (i=0; i < tocheack.length;i++)
{
if(tocheack.elements[i].type.toLowerCase()=="submit"||tocheack.elements[i].type.toLowerCase()=="reset")
{
tocheack.elements[i].disabled = true
}
}
}
}
</script>
<?php
$files = fopen("wap/lcl/thm.dt","r");
if(!$files)
{
echo("Ошибка открытия файла");
}
else
{
$url_thm = fgets ($files);
}
echo ("<Link href='thm-wb/$url_thm/style.css' type=text/css rel=stylesheet>");
fclose($files);
?>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html" charset=windows-1251" />
</HEAD>
<BODY>
<table border=0 cellspacing=5 cellpadding=0 width=100%>
<tr>
<td width=15%>
<?php
echo("<a href=$url><img src='thm-wb/$url_thm/logo.png' border=0 alt='$title'></a>");
?>
</td>
<td width=75%>
<td>
<td width=10%>
<?php
require_once"tmpl/err.php";
?>
</td>
</tr>
</table>
<?php
$f=fopen("wap/lcl/panel1.dt","r");
$ifda=fgets($f);
$ifda=trim($ifda);
if ($ifda==1)
{
echo "<table border=0 cellspacing=5 cellpadding=0 width=100%>";
echo "<tr>";
echo "<td valign=_top>";
require_once"panel/panel1.php";
echo "</td>";
echo "<td width=100% valign=_top>";
}
else
{
echo "<table border=0 cellspacing=5 cellpadding=0 width=100%>";
echo "<tr>";
echo "<td valign=_top width=100%>";
}
?>
<?php
////////////////////////////////////////////////////////////////////////////////////
/////// вывод новостей
$dir_rec = dir("wap/lcl/nws/");
$i = 0;
while($entry = $dir_rec->read())
{
if (substr($entry,0,3)=="rec")
{
$names[$i]=substr($entry,4);
$i++;
}
}
$dir_rec->close(); // закрываем директорию
@rsort($names); // сортируем файлы
// определяем очередность сообщений и выводим их
$count = $i;
$count1 = $count;
if (empty($start))
{
$start = 0;
}
$start = intval($start);
if ($start < 0)
{
$start = 0;
}
$file=fopen("wap/lcl/msg_nws.dt","r");
$msg_nws=fgets($file);
if ($count > $start + $msg_nws) $count = $start + $msg_nws;
// выводим все сообщения в цикле
for ($i = $start; $i < $count; $i++)
{
$entry = $names[$i];
$data = file("wap/lcl/nws/rec.".$entry);
$date = $entry;
$zagolovok = trim($data[0]);
$dat = trim($data[1]);
$news = trim($data[2]);
// делаем bb-code
$news = str_replace("[color=red]","<font color=red>",$news);
$news = str_replace("[color=blue]","<font color=blue>",$news);
$news = str_replace("[color=green]","<font color=00ff00>",$news);
$news = str_replace("[color=yellow]","<font color=yellow>",$news);
$news = str_replace("[/color]","</font>",$news);
$news = str_replace("[u]","<u>",$news);
$news = str_replace("[U]","<u>",$news);
$news = str_replace("[i]","<i>",$news);
$news = str_replace("[I]","<i>",$news);
$news = str_replace("[b]","<B>",$news);
$news = str_replace("[B]","<B>",$news);
$news = str_replace("[sub]","<SUB>",$news);
$news = str_replace("[SUB]","<SUB>",$news);
$news = str_replace("[sup]","<SUP>",$news);
$news = str_replace("[SUP]","<SUP>",$news);
$news = str_replace("[/u]","</u>",$news);
$news = str_replace("[/U]","</u>",$news);
$news = str_replace("[/i]","</i>",$news);
$news = str_replace("[/I]","</i>",$news);
$news = str_replace("[/b]","</B>",$news);
$news = str_replace("[/B]","</B>",$news);
$news = str_replace("[/SUB]","</SUB>",$news);
$news = str_replace("[/sub]","</SUB>",$news);
$news = str_replace("[/SUP]","</SUP>",$news);
$news = str_replace("[/sup]","</SUP>",$news);
$news = eregi_replace("(.*)\\[url\\](.*)\\[/url\\](.*)","\\1<ahref=\\2>\\2</a>\\3",$news);
$news = str_replace("\n","<br>",$news);
/////////////////////////
echo("<table border=0 cellspacing=5 cellpadding=0 width=100%>");
echo("<tr><td background='thm-wb/$url_thm/pls.gif' align=center width=90%>");
echo("<img src='thm-wb/$url_thm/plsl.gif' align=left>");
echo("<img src='thm-wb/$url_thm/plsr.gif' align=right>");
echo "$zagolovok";
////////// проверка на админа ////////
if ($_SESSION)
{
$files_array = file("wap/lcl/prof/$log");
if(!$files_array)
{
echo("Ошибка открытия файла wap/lcl/prof/log$log");
}
if (($files_array[2]==101) || ($files_array[2]==102))
{
echo (" <a href='adm/nws_edit.php?date=$date' class=cool title='Редактировать'>[edit]</a> <a href='adm/nws_del.php?date=$date' class=cool title='Удалить'>[del]</a>");
}
}
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=2>$news</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=right background='thm-wb/$url_thm/plsdw.png'>";
echo "Добавлено: $dat</td>";
echo "</tr>";
echo "</table>";
}
/////////////////////////
print "<center>";
if ($start != 0)
{
print "<A href=index.php?start=".($start - $msg_nws)."> Предыдущие </A>";
}
if ($count1 > $start + $msg_nws)
{
print "<A href=index.php?start=".($start + $msg_nws)."> Следующие </A> \n";
}
print "</center>";
////////////////////////////////////////////////////////////////////////////////////
?>
<?php
$f=fopen("wap/lcl/panel2.dt","r");
$ifda=fgets($f);
$ifda=trim($ifda);
if ($ifda==1)
{
echo "</td>";
echo "<td width=100% valign=_top>";
require_once"panel/panel2.php";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=5 cellpadding=0 width=100%>
<tr>
<td>
<div id=footer>
<?php
$f=fopen("wap/lcl/admin.dt","r");
$admin=fgets($f);
echo "Site from $admin<br>";
?>
</footer>
</td>
</tr>
</table>
<?php
gzip_foo();
echo "</BODY>";
echo "</HTML>";
?>