Location: PHPKode > projects > Sound PHP Engine > s-p-e-0.3.0/s-p-e-0.3.0/data/admininfo.php
<?php
// ===================================================== 
// 
// s-p-e - Content management system. 
// Copyright (C) 2004, 2005, 2010, 2011 Vladimir B. Tsarkov
// 
// This file is part of s-p-e. 
// 
// s-p-e 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. 
// 
// s-p-e 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 s-p-e. If not, see <http://www.gnu.org/licenses/>.
//
// ------
//
//  You can contact us via e-mail: lipetsk-gnu-lug at bk period ru
//
//  admininfo.php
//
//  Abstract: Outputs the information about users.
//  
//  Revision History:
// 
//	1  2004-03-27 - 2005-07-02  vbt
//	2  2005-07-20  vbt
//	3  2005-09-18  vbt
//	4  2010-06-24  vbt
//	5  2011-01-21  vbt
//
// =====================================================
header("Content-Type: text/html; charset=UTF-8");

include("configure/specfg.php"); 
include("../include/functions.php");

cache();

session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
session_start();

gc();

redirect(read(session_id()));

if(read(session_id()) == "administrator")
	{
		      	
	language($cfg["deflangadmin"]);
	
	echo "<html>
	<head>
	<link rel='stylesheet' href='../skin/".($cfg["skin"])."/style.css' type='text/css'>
	<head>
	<body>";
	
	if((isset($_POST["login"]) == false) || ($_POST["login"] == false))
	{
		echo "<font class='negative'>".(_("Please, specify the user's name."))."</font>";
	}
	
	if(isset($_POST["login"]))
	{
		$login = $_POST["login"];
		$login = trim($login);
		connect($cfg["host"], $cfg["user"], $cfg["password"], $cfg["database"], $connector);
		$result = mysql_query("select login, mail, addk 
			  from ".($cfg["prefix"])."security 
			  where login='$login'", $connector) 
			  or die("error #102-1");
		if($row = mysql_fetch_array($result, MYSQL_NUM))
		{
			echo "<p>
			<font class='s-normal'>
			<b>&raquo;&raquo;</b>
			<b>".(_("Login")).":</b> ".($row[0])."
			</font>
			</p>

			<p>
			<font class='s-normal'>
			<b>&raquo;&raquo;</b>
			<b>".(_("E-mail")).":</b> ".($row[1])."
			</font>
			</p>
			<p>
			<font class='s-normal'>
			<b>&raquo;&raquo;</b></td>
			<b>".(_("Status")).":</b> ".($row[2])."
			</p>";
		}
		if((mysql_num_rows($result) == 0) && ($login == true))
		{
			echo "<font class='negative'>".(_("User"))."</font>
			&nbsp;$login&nbsp;
			<font class='negative'>".(_("does not exist."))."</font>";
		}
		mysql_free_result($result);
		mysql_close($connector);
	}
	echo "<p>
	<font class='s-normal'>
	".(_("Back to the"))." <a href='admin.php'>".(_("s-p-e Administrator's Page"))."</a>
	</font>
	</p>
	</body>
	</html>";	
} else {
	echo _("Access denied.");
}
?>
Return current item: Sound PHP Engine