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

Размер файла: 1.97Kb
<?php
include "conf.php";
if (isset($_GET['sid'])) {
$fnum = htmlspecialchars(trim($_GET['sid']));
$fpas = htmlspecialchars(trim($_GET['pass']));
$file = fopen ("data/db.txt", "r");
	while (!feof ($file)) {
		$email = fgets ($file, 1024);
		$email = trim ($email);
		if ($email != "") {
			$pass = trim(fgets ($file, 1024));
			$cat = trim(fgets ($file, 1024));
			$fid = trim(fgets ($file, 1024));
			if ($fnum == $fid) {
				if ($fpass == $pass){
					if ($cat == "1") $cpat = "internet/"
					if ($cat == "2") $cpat = "computer/";
					if ($cat == "3") $cpat = "culture/";
					if ($cat == "4") $cpat = "lichnoe/";
					if ($cat == "5") $cpat = "smi/";
					if ($cat == "6") $cpat = "dosug/";
					if ($cat == "7") $cpat = "sport/";
					$ffed = $cpat.$fid.".txt";
					$file = fopen ($ffed, "r");
						$allhits = fgets ($file, 1024);
						$todhits = fgets ($file, 1024);
						$sname = fgets ($file, 1024);
						$saddr = fgets ($file, 1024);
						$semail = fgets ($file, 1024);
						$spass = fgets ($file, 1024);
						echo "<head><title>$ratname - Редактирование сайта</title></head><body><form action=edit.php method=get>";
						echo "Название сайта<br><input name=";
					fclose ($file);
					exit;
				}
				echo "Пароль не соответствует";
				exit;
			}
			echo "Информация не найдена";
			exit;
		}
	}
fclose ($file);
echo "<a href=index.php>Вернуться в рейтинг</a><br><br>Информация не найдена";
}  else {
echo "<html><head><title>$ratname - Вход</title></head><body>";
echo "<a href=index.php>Вернуться в рейтинг</a><br><br><form action=remind.php method=get>";
echo "<b>Введите ID вашего сайта</b><br><input type=text name=sid><br>Введите пароль<input type=text name=pass><br><input type=submit>";
echo "</form><br><br>Если вы не помните ID своего сайта, то узнать его можно, просмотрев";
echo " код своего счетчика<br><&nbsp;script language=javascript src=".$rataddr."count.php?cat=7&sit=<font size=+2><b>123</b></font>><!-- --><&nbsp;/script>";
}
?>