<?php
session_start();

include("../stop.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>wWw.ExtremShare.Net - Upload - Download Mobile Version Nokia, Samsung, LG, Iphone, Siemens, Sharp, Motorola, Philips, BlackBerry, Gphone, Panasonic, Htc, etc....</title>
<link rel='stylesheet' href='style.css' type='text/css'/>
</head>
<body>

<table bgcolor="yellow" width="100%">
<tr><td><font color='red' size='5'>E</font><font color='black' size='5'>xtrem</font><font color='red' size='5'>S</font><font color='black' size='5'>hare</font><font color='blue' size='5'>.Net</font></td></tr></table>

<?php
////////////////////////////////////// Include Fisiere
include("logare/bazadb.php");
include("logare/login.php");
echo $logged_in; 

echo "<div class='hl'>Main menu</div>";
include('config.php');

if(isset($_SESSION['nume'])) {
      	$username = ''.$_SESSION['nume'].'';
$stare = "Index wWw.ExtremShare.Net <i>(wap)</i>";
if(!$act){mysql_query("UPDATE utilizatori SET stare='$stare' WHERE nume='$username'");}
}

$total = mysql_result(mysql_query("SELECT COUNT(*) as id FROM fisiere"),0);
$totalusers = mysql_result(mysql_query("SELECT COUNT(*) as id FROM utilizatori"),0);

$request = mysql_query("SELECT * FROM cereri WHERE id");
$request_rows = mysql_num_rows($request);   

echo "<b>&#8226;</b> <a href=\"upload.php\">Upload A File</a><br/>";
echo "<b>&#8226;</b> <a href=\"uploads.php\">Latest Uploads</a><br/>";
echo "<b>&#8226;</b> <a href=\"top.php\">Top Downloads</a><br/>";
echo "<b>&#8226;</b> <a href=\"category.php\">Categories</a><br/>";
echo "<b>&#8226;</b> <a href=\"search.php\">Search Uploads</a><br/>";
echo "<b>&#8226;</b> <a href=\"comm.php\">Last 20 Comments</a><br/>";
echo "<b>&#8226;</b> <a href=\"shoutbox.php\">Shoutbox</a><br/>";
echo "<b>&#8226;</b> <a href='cereri.php'>Request File</a>($request_rows)<br />";
if(isset($_SESSION['nume'])) {
}else{
echo "<b>&#8226;</b> <a href='register.php'>Register</a><br />";

}

echo "<div class='hl'>Users Online</div>";
$i=1;
$recent=date("U")-900;
$getusersonline="SELECT * from utilizatori where lasttime>'$recent'"; //grab from sql users on in last 15 minutes
$getusersonline2=mysql_query($getusersonline) or die("Could not get users");
$num=mysql_num_rows($getusersonline2);
$countguests="SELECT DISTINCT guestip from guestsonline where time>'$recent'";
$countguests2=mysql_query($countguests) or die("Could not count guests");
$thecount=mysql_num_rows($countguests2);
while($getusersonline3=mysql_fetch_array($getusersonline2))
{
$id = $getusersonline3["id"];
$mod = $getusersonline3["color"];
$avat = $getusersonline3["setavatar"];
$nume = $getusersonline3["nume"];
  print "<sup>$i.</sup><a href='profile.php?id=$id' class='$mod'><b>";
  print "$nume</b></a>  ";
$i++;
}


echo "<div class='hl'>Statistics</div>";

$sql = mysql_query("SELECT * FROM setting WHERE id = '1' ");
while($row = mysql_fetch_array($sql))
{
$count = $row["hit"];   
$count = $count + 1;
echo "Total hits: <b>$count</b><br /> ";
}

echo "<strong>&#176;</strong> Total users: <b> ".$totalusers."</b><br/>";

echo "<strong>&#176;</strong> Total files: <b> ".$total."</b><br/>";


$sql = mysql_query("SELECT * FROM setting WHERE id = '1' ");
while($row = mysql_fetch_array($sql))
{
$count = $row["hit"];   
$count = $count + 1;

if(!$act){mysql_query("UPDATE setting SET hit='$count' WHERE id='1'");}
}
?>
<div class='hl2'>
<a href="upload.php"><b>[Upload] </b></a>
<a href="index.php"><b>[Menu]</b></a><div>
</div><table bgcolor="yellow" width="100%"><tr>
<td>Powered by <a href="http://extremshare.net" class='admin'>ExtremShare.Net</a>

<div id="eXTReMe"><a href="http://extremetracking.com/open?login=extremsh">
<img src="http://t1.extreme-dm.com/i.gif" style="border: 0;"
height="38" width="41" id="EXim" alt="eXTReMe Tracker" /></a>
<script type="text/javascript"><!--
var EXlogin='extremsh' // Login
var EXvsrv='s10' // VServer
EXs=screen;EXw=EXs.width;navigator.appName!="Netscape"?
EXb=EXs.colorDepth:EXb=EXs.pixelDepth;EXsrc="src";
navigator.javaEnabled()==1?EXjv="y":EXjv="n";
EXd=document;EXw?"":EXw="na";EXb?"":EXb="na";
EXd.write("<img "+EXsrc+"=http://e1.extreme-dm.com",
"/"+EXvsrv+".g?login="+EXlogin+"&amp;",
"jv="+EXjv+"&amp;j=y&amp;srw="+EXw+"&amp;srb="+EXb+"&amp;",
"l="+escape(EXd.referrer)+" height=1 width=1>");//-->
</script>
<noscript><div id="neXTReMe"><img height="1" width="1" alt=""
src="http://e1.extreme-dm.com/s10.g?login=extremsh&amp;j=n&amp;jv=n" />
</div></noscript></div>
</td></tr></table></div></body></html>
<?php
if(isset($_SESSION['nume']))
{
  $user1=$_SESSION['nume'];
  $getuser="SELECT * from utilizatori where nume='$user1'";
  $getuser2=mysql_query($getuser) or die("Could not get user info");
  $getuser3=mysql_fetch_array($getuser2);
  $thedate=date("U");
  $checktime=$thedate-200;
  $uprecords="Update utilizatori set lasttime='$thedate' where id='$getuser3[id]'";
  mysql_query($uprecords) or die("Could not update records");
  if($getuser3[tsgone]<$checktime)
  {
    $updatetime="Update utilizatori set tsgone='$thedate', oldtime='$getuser3[tsgone]' where id='$getuser3[id]'";
    mysql_query($updatetime) or die("Could not update time");
  }
}
?>