Location: PHPKode > projects > OpenSupports > support/admin/busca.php
<?php
session_start();
require "config.php";
if(isset($_POST[adminuser]))
{
if($_POST[adminuser] != $adminuser)
{
header('Location: error.php?err=loginadmin');
}
elseif($_POST[adminpass] != $adminpass)
{
header('Location: error.php?err=loginadmin');
}
}
if(!isset($_POST[adminuser]))
{
if($_SESSION[login] != true)
{
header('Location: index.php');
}
}
$_SESSION[login] = true;
if(isset($_POST[usuariobusca]))
{
$usuariobuscando=@mysql_query("select * from usuarios WHERE user='$_POST[usuariobusca]'");
$usuario = @mysql_fetch_array($usuariobuscando);
$tickets=@mysql_query("select * from tickets WHERE user='$usuario[nombre]' ORDER BY id DESC");
if(@mysql_num_rows($usuariobuscando) == 0)
{
$ok == false;
}
else
{
$ok = true;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>

<script>
function mostrar(name) {
div = document.getElementById(name);
div.style.display = '';
if(typeof (actual) != "undefined")
{
cerrar(actual);
}
}

function cerrar(name) {
div = document.getElementById(name);
if(div.style.display != 'none')
{
div.style.display='none';
}
}

</script>
<script language="JavaScript" type="text/javascript"> 
function enviar()
{
    document.departamentoselect.submit();
}
          </script>
<title>Support Center - <?php echo $titulo; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!-- default stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="index_files/index.css">
<style type="text/css">
<!--
body {
	background-image: url();
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" href="index_files/style.css" type="text/css">
<!-- default javascript -->
<script language="Javascript">
</script>
<script language="Javascript" src="index_files/basejs.js" type="text/javascript"></script>
<style type="text/css">
<!--
.Estilo1 {
	color: #006600;
	font-style: italic;
	font-weight: bold;
}
.Estilo3 {font-weight: bold; color: #006600;}
.Estilo6 {
	color: #FF0000;
	font-size: 14px;
}
.Estilo20 {color: #000099}
.Estilo21 {FONT-FAMILY: Verdana, Arial, Helvetica; font-size: 11px;}
-->
</style>
</head>
</html>
<html>
<head>
</head>
<body>
<center>
  <table align="center" border="0" cellpadding="0" cellspacing="0" width="780">
    <tbody>
      <tr>
        <td style="background-image: url();" valign="top"><table align="center" border="0" cellpadding="0" cellspacing="0" width="750">
          <tbody>
            <tr>
              <td><table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr>
                      <td><table width="100%" border="0" cellpadding="3" cellspacing="0" background="index_files/button-right.jpg">
                        <tbody>
                          <tr>
                            <td class="smalltext" align="left" valign="top"><b><font color="#707070"><a href="index.php" id="navlink"></a>Support Center <img src="login_files/blueblockarrow.gif" width="8" height="8"> Administration <img src="login_files/blueblockarrow.gif" width="8" height="8"> <a href="admin.php">Panel</a> </font></b></td>
                          </tr>
                        </tbody>
                      </table></td>
                    </tr>
                  </tbody>
              </table></td>
            </tr>
            <tr>
              <td><table width="748">
                <tr>
                  <td><div align="center">
                    <p><img src="panel.png" width="128" height="128"></p>
                    <p><span class="Estilo1">Welcome to the Administration Panel </span><span class="Estilo3"></span> (<a href="admin.php?id=cerrar">Close Session</a>) </p>
                  </div></td>
                </tr></table>
                <p align="center"><a href="admin.php"><img src="Back.png" width="70" height="70" border="0"></a> </p>
                <p align="center"><?php
				 if($ok == true)
				 {
				 ?></p>
                <table class="sectiontitlebg" border="0" cellpadding="2" cellspacing="0" width="100%">
                  <tbody>
                    <tr>
                      <td width="1"><img src="login_files/blueblockarrow.gif"></td>
                      <td><span class="smalltext"><b><font color="#666666">Information</font></b></span></td>
                    </tr>
                  </tbody>
                </table>
				<table border="0" cellpadding="2" cellspacing="0" width="100%">
                  <tbody>
                    <tr>
                      <td colspan="2"><em><strong><font color="#666666">User's information . </font></strong></em></td>
                    </tr>
                  </tbody>
                </table>
				<table width="100%" height="28" border="0" cellpadding="3" cellspacing="1">
                  <tbody>
                    <tr class="tabletitlerow" title="" onMouseOver="" onMouseOut="" onClick="" id="" style="">
                      <td width="244" height="19" colspan="" align="center" valign="middle" class="tabletitlerow"><a>Name&nbsp;</a></td>
                      <td class="tabletitlerow" colspan="" align="center" valign="middle" width="491"><a>Email</a></td>
                      </tr>
  
                    <tr class="tabletitlerow" title="" onMouseOver="" onMouseOut="" onClick="" id="" style="">
                      <td width="244" height="19" colspan="" align="center" valign="middle" class="tabletitlerow"><?php echo $usuario[nombre]; ?></td>
                      <td class="tabletitlerow" colspan="" align="center" valign="middle" width="491"><?php echo $usuario[user]; ?></td>
                      </tr>
                  </tbody>
                </table>
				<table class="sectiontitlebg" border="0" cellpadding="2" cellspacing="0" width="100%">
                          <tbody>
                            <tr>
                              <td width="1"><img src="login_files/blueblockarrow.gif"></td>
                              <td><span class="Estilo21"><b><font color="#666666">Sent tickets </font></b></span> </td>
                            </tr>
                          </tbody>
                  </table>
                                  <table border="0" cellpadding="2" cellspacing="0" width="100%">
                                    <tbody>
                                      <tr>
                                        <td colspan="2"><em><strong><font color="#666666">List of tickets that the user has sent. </font></strong></em></td>
                                      </tr>
                                    </tbody>
                                  </table>
                                  <table width="100%" height="28" border="0" cellpadding="3" cellspacing="1">
                                    <tbody>
                                      <tr class="tabletitlerow" title="" onMouseOver="" onMouseOut="" onClick="" id="" style="">
                                        <td width="113" height="19" colspan="" align="center" valign="middle" class="tabletitlerow"><a>Date&nbsp;</a></td>
                                        <td class="tabletitlerow" colspan="" align="center" valign="middle" width="119"><a>Last Message </a></td>
                                        <td class="tabletitlerow" colspan="" align="center" valign="middle" width="206"><a>Department&nbsp;</a></td>
                                      </tr>
                                      <?php
while ($reg=mysql_fetch_array($tickets))
{
?>
                                      <tr class="row1" onMouseOver="this.className='rowhighlight';" onMouseOut="this.className='row1';">
                                        <td colspan="5" align="left" valign="middle"><p><img src="login_files/icon_ticketbullet.gif" align="absmiddle" border="0"><a href="veradmin.php?id=<?php echo $reg['id']; ?>"><b><?php echo $reg['id']; ?>:</b>&nbsp;<?php echo $reg['asunto']; ?></a></p></td>
                                      </tr>
                                      <tr class="row1">
                                        <td height="47" align="center" valign="middle"><span class="smalltext"><?php echo $reg['fecha']; ?></span></td>
                                        <td align="center" valign="middle"><span class="smalltext"><?php echo $reg['ultimo']; ?></span></td>
                                        <td align="center" valign="middle"><span class="smalltext"><?php echo $reg['departamento']; ?></span></td>
                                      </tr>
                                      <?php
}
?>
                                    </tbody>
                                  </table>
				<p align="center">
				  <?php }
				 if($ok == false)
				 {
				 ?>
				</p>
				<p align="center"><span class="Estilo8 Estilo9 Estilo6">The user was not found.</span>
				  <?php }
				 ?>
				</p>
				<hr>
				<p align="center">*Select on the up bar an area to admin. </p></td>
            </tr>
            <tr>
              <td colspan="2" height="15"><div align="center"><?php echo $titulo; echo "©"; echo $fecha = date("Y");  ?>. All rights Reserved - Power by <a href="http://www.opensupports.com" class="Estilo20">OpenSupports</a></div></td>
            </tr>
          </tbody>
        </table></td>
      </tr>
    </tbody>
  </table>
</center>
</body>
</html>

Return current item: OpenSupports