<?php
session_start();
include_once("authorize.php");
$ulogin= $_SESSION["login"];
$upass= $_SESSION["password"];
$installed = false;
$registered = false;
if(empty($ulogin))
{
$ulogin = $_POST["login"];
$upass = $_POST["password"];
}
if(file_exists($users))
{
$installed = true;
$registered= authorize($ulogin, $upass);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="robots" content="none" />
<link rel="stylesheet" type="text/css" href="tabs.css" />
<script type="text/javascript" src="tabs.js"></script>
</head>
<body>
<div id="content">
<table width="90%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="54%">
<h1>
<a href="http://www.scriptol.com/scripts/botlane.php" target="_parent"><img src="images/botlane.gif" alt="" border="0" /></a>
</h1>
</td>
<td width="46%">
<div align="center">
<a href="setup.php" target="_parent">Setup</a> <br>
<div style="font-size:60%;">
Pit lane for webmasters - Freeware (c) 2009 Scriptol.com.<br>
Version 1.0
</div>
</div>
</td>
</tr>
</table>
<?php
if(!$installed)
{
echo "Not installed. Run <b><a href=\"install.php\" target=\"_parent\">install.php</a></b> first.<br>";
die("");
}
function checkLog()
{
echo "
<form method='post' id='auth' name='auth' action=''>
<span>Login:</span>
<input type='text' id='login' name='login' maxlength='24' value='$ulogin'>
<span class='option'>Password:</span>
<input type='password' id='password' name='password' maxlength='12' value='$upass'>
<input type='submit' name='checkuser' value='Check User'>
</form>";
die("");
}
if($registered)
{
echo "<div class='border'>Registered user: $ulogin</div>";
}
else
{
checkLog();
}
?>
<br>
<div id="tabs">
<ul>
<?php
$tablist = file("tabs-list.txt");
$toolist = array();
foreach($tablist as $line)
{
$pos = strpos($line,",");
$k = substr($line, 0, $pos);
$v = substr($line, $pos + 1);
$toolist[$k] = trim($v);
}
reset($toolist);
$selected = 'class="selected" ';
while($url = current($toolist))
{
$title = key($toolist);
if($title == "") continue;
echo '<li><a href="'.$url.'" target="mainFrame" '.$selected. 'onclick="loadit(this)" >'.$title.'</a></i>'."\n";
$selected = "";
next($toolist);
}
?>
</ul>
</div>
</div>
</body>
</html>