Просмотр файла admin/wel.php

Размер файла: 2.31Kb
<?php
##############################
##	     WAP-ENGINE 	    ##
##############################
##						    ##
## Автор : CHUMA			##
## e-mail : [email protected]		##
## WAP : http://wapeng.info ##
## ICQ : 13-14-11			##
##                        	##
##############################
##  ВЫ НЕ ИМЕЕТЕ ПРАВО      ##
##  ИЗМЕНЯТЬ КОД СКРИПТА    ##
##  ДЛЯ ДАЛЬНЕЙШЕГО         ##
##  РАСПРОСТРАНЕНИЯ         ##
##############################
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);

extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);

session_name("SESID");
session_start();

include ("../config.php"); //Подключаем настройки сайта. (config.php)

if ($_GET[act]=="set")
{

 if ($_SESSION['login']==$nickadmina && md5($_SESSION['pass'])==$passadmina)
  {
$configwel=$_POST[wwel];
$setwel=trim("$configwel");

$fp = fopen("../data/welcome.txt","w'");
fputs($fp,$setwel);
fclose($fp);

header ("location: wel.php?set=1");

  } 
   else
  {
   include ("../themes/$themes.php"); //Вставляем скин сайта.
   echo'Неправильный ввод.<br><a href=index.php>Назад</a>';
   include ("../templates/foot.php"); //Вставляем низ сайта. (templates/foot.php)
  }

}


$file = fopen("../data/welcome.txt","r");
$wel = fread ($file, 1000);

if ($_GET[act]=="")
{
include ("../themes/$themes.php"); //Вставляем скин сайта.

if ($_SESSION['login']==$nickadmina && md5($_SESSION['pass'])==$passadmina)
  {
if ($_GET[set]=="1")
{
echo"<center>Приветствие настроено</center>";
}
echo"<form method=\"post\" action=\"wel.php?act=set\">";
//  Ник админа на сайте
echo"<center>Приветствие:<br><input name=\"wwel\" value=\"$wel\"/><br />";	
echo"<input value=\"Настроить\" name=\"do\" type=\"submit\" /></center></form>";
  	
print"<a href=\"main.php\">В админку</a>";

  } 
   else
  {
    echo"Неправильный ввод.<br> <a href=index.php>Назад</a>";
  }
include ("../templates/foot.php"); //Вставляем низ сайта. (templates/foot.php)
}

?>