Просмотр файла wwphpmaster1.03/www.phpedited.com/index.php

Размер файла: 10.61Kb
<?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
          }
        }
    }
}

<!-- Part 1: Past in head.

// Your images!
Img1=new Image();Img1.src="thm-wb/wwphpmaster/menu/fm1.gif";
Img2=new Image();Img2.src="thm-wb/wwphpmaster/menu/fm2.gif";
Img11=new Image();Img11.src="thm-wb/wwphpmaster/menu/dwld1.gif";
Img22=new Image();Img22.src="thm-wb/wwphpmaster/menu/dwld2.gif";
Img111=new Image();Img111.src="thm-wb/wwphpmaster/menu/gb1.gif";
Img222=new Image();Img222.src="thm-wb/wwphpmaster/menu/gb2.gif";
Img1111=new Image();Img1111.src="thm-wb/wwphpmaster/menu/faq1.gif";
Img2222=new Image();Img2222.src="thm-wb/wwphpmaster/menu/faq2.gif";
Im1=new Image();Im1.src="thm-wb/wwphpmaster/menu/usbr1.gif";
Im2=new Image();Im2.src="thm-wb/wwphpmaster/menu/usbr2.gif";

separate=" ";

function N(name){document.images[name].src=Img1.src}
function Y(name){document.images[name].src=Img2.src}
function DrawEm(Url,Id){
document.write("&nbsp;"
+" <a href='"+Url+"' onMouseOver=\"Y('"+Id+"\')\" onMouseOut=\"N('"+Id+"')\">"
+" <img src="+Img1.src+" border='0' align='absmiddle' name='"+Id+"'></a> "+separate+" ");
}
function NN(name){document.images[name].src=Img11.src}
function YY(name){document.images[name].src=Img22.src}
function DrawEmm(Url,Id){
document.write("&nbsp;"
+" <a href='"+Url+"' onMouseOver=\"YY('"+Id+"\')\" onMouseOut=\"NN('"+Id+"')\">"
+" <img src="+Img11.src+" border='0' align='absmiddle' name='"+Id+"'></a> "+separate+" ");
}
function NNN(name){document.images[name].src=Img111.src}
function YYY(name){document.images[name].src=Img222.src}
function DrawEmmm(Url,Id){
document.write("&nbsp;"
+" <a href='"+Url+"' onMouseOver=\"YYY('"+Id+"\')\" onMouseOut=\"NNN('"+Id+"')\">"
+" <img src="+Img111.src+" border='0' align='absmiddle' name='"+Id+"'></a> "+separate+" ");
}
function NNNN(name){document.images[name].src=Img1111.src}
function YYYY(name){document.images[name].src=Img2222.src}
function DrawEmmmm(Url,Id){
document.write("&nbsp;"
+" <a href='"+Url+"' onMouseOver=\"YYYY('"+Id+"\')\" onMouseOut=\"NNNN('"+Id+"')\">"
+" <img src="+Img1111.src+" border='0' align='absmiddle' name='"+Id+"'></a> "+separate+" ");
}
function NNNNN(name){document.images[name].src=Im1.src}
function YYYYY(name){document.images[name].src=Im2.src}
function Dra(Url,Id){
document.write("&nbsp;"
+" <a href='"+Url+"' onMouseOver=\"YYYYY('"+Id+"\')\" onMouseOut=\"NNNNN('"+Id+"')\">"
+" <img src="+Im1.src+" border='0' align='absmiddle' name='"+Id+"'></a> "+separate+" ");
}
// -->
</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/panel3.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 width=100%>";
require_once"panel/panel3.php";
echo "</td>";
echo "</tr>";
echo "</table>";
}
else
{
echo "</td>";
echo "</tr>";
echo "</table>";
}

$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("[br]","<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
decoder();
echo "</BODY>";
echo "</HTML>";
?>