<?php session_start(); ?>
<?
include ("var.php");
?>
<?
include("stop.php");
?>
<?php
$mobile = "xhtml/terms.php";
$text = $_SERVER['HTTP_USER_AGENT'];
$var[2] = "AvantGo";
$var[3] = "ProxiNet";
$var[4] = "Danger hiptop 1.0";
$var[5] = "DoCoMo/";
$var[6] = "Google CHTML Proxy/";
$var[7] = "UP.Browser/";
$var[8] = "SEMC-Browser/";
$var[9] = "J-PHONE/";
$var[10] = "PDXGW/";
$var[11] = "ASTEL/";
$var[13] = "Handspring";
$var[14] = "Windows CE";
$var[15] = "PPC";
$var[17] = "Blazer/";
$var[18] = "Palm";
$var[19] = "WebPro/";
$var[20] = "EPOC32-WTL/";
$var[21] = "Tungsten";
$var[22] = "Netfront/";
$var[23] = "Mobile Content Viewer/";
$var[24] = "PDA";
$var[25] = "MMP/2.0";
$var[26] = "Embedix/";
$var[27] = "Qtopia/";
$var[28] = "Xiino/";
$var[29] = "BlackBerry";
$var[30] = "Gecko/20031007";
$var[31] = "MOT-";
$var[32] = "UP.Link/";
$var[33] = "Smartphone";
$var[34] = "portalmmm/";
$var[35] = "Nokia";
$var[36] = "Symbian";
$var[37] = "AppleWebKit/413";
$var[38] = "UPG1 UP/";
$var[39] = "RegKing";
$var[40] = "STNC-WTL/";
$var[41] = "J2ME";
$var[42] = "Opera Mini/";
$var[43] = "SEC-";
$var[44] = "ReqwirelessWeb/";
$var[45] = "AU-MIC/";
$var[46] = "Sharp";
$var[47] = "SIE-";
$var[48] = "SonyEricsson";
$var[49] = "Elaine/";
$var[50] = "SAMSUNG-";
$var[51] = "Panasonic";
$var[52] = "Siemens";
$var[53] = "Sony";
$var[54] = "Verizon";
$var[55] = "Cingular";
$var[56] = "Sprint";
$var[57] = "AT&T";
$var[58] = "Nextel";
$var[59] = "Pocket PC";
$var[60] = "T-Mobile";
$var[61] = "Orange";
$var[62] = "Casio";
$var[63] = "HTC";
$var[64] = "Motorola";
$var[65] = "Samsung";
$var[66] = "NEC";

$result = count($var);

for ($i=0;$i<$result;$i++)
{
$ausg = stristr($text, $var[$i]);
if(strlen($ausg)>0)
{
header("location: $mobile");
break;
}

}
?>
<?
include ("config.php");
?>
<?
if(isset($_SESSION['nume'])) {
      	$username = ''.$_SESSION['nume'].'';
$stare = "Show PMs";
if(!$act){mysql_query("UPDATE utilizatori SET stare='$stare' WHERE nume='$username'");}
}
?>

<html>
<?
include ("header.html");
?>
<table width='950' cellspacing='0' cellpadding='0' align='center'>

<?
include ("right.html");
?>
<td width='760' valign='top' class='continut'>

<table cellspacing='0' cellpadding='10'  width='100%'>
<tr>
<td>
<!-- CONTINUTUL !!!! -->

<?php
include 'config.php';
session_start();
?>

<?php
if (isset($_SESSION['nume'])) 
  {
    $user=$_SESSION['nume'];
    $getuser="SELECT * from utilizatori where nume='$user'";
    $getuser2=mysql_query($getuser) or die("Could not get user info");
    $getuser3=mysql_fetch_array($getuser2);
    if(isset($_POST['submit']))
    {
       $theid=$_POST['theid'];
       $delmessage="DELETE FROM b_pms where pmID='$theid' and receiver='$getuser3[id]'";
       mysql_query($delmessage) or die("Could not delete message");
       print "PM deleted, back to <A href='pm.php'>PM Main</a>"; 


    }
    else
    {
       $ID=$_GET['ID'];
       print "Are you sure you want to delete this PM?<br>";
       print "<form action='delpm.php' method='post'>";
       print "<input type='hidden' value='$ID' name='theid'>";
       print "<input type='submit' name='submit' value='delete'></form>";
   

    }  
  }
else
  {
    print "Sorry, not logged in  please <A href='login.php'>Login</a><br>";
  
  }

?>
<!-- SFARSIT CONTINUT!!! -->   

</td></tr></table>
</tr>

<tr>
<td width='180'>&nbsp;
</td>

<?
include("flooter.html")
?>