Location: PHPKode > projects > OpenSupports > support/admin/veradmin.php
<?php
session_start();
require "config.php";
if($_SESSION[login] != true)
{
header('Location: index.php');
}
if(!isset($_GET['id']))
{
header('Location: admin.php?id=users');
}
$idget = $_GET['id'];
$ticketbusqueda = mysql_query("select * from tickets WHERE id='$idget'") or die ("Error el seleccionar");
$ticket = mysql_fetch_array($ticketbusqueda);
if(!isset($ticket['id']))
{
header('Location: index.php');
}
$modifica=mysql_query("update tickets set leido='1' where id='$idget'");
?>
<!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;}
.Estilo5 {FONT-FAMILY: Verdana, Arial, Helvetica; font-size: 11px;}
.Estilo7 {color: #000099}
.Estilo4 {font-size: 18px;
	font-weight: bold;
}
-->
</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"></p>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tbody>
                    <tr>
                      <td height="1" width="7"><img src="index_files/space.gif" height="1" width="5"></td>
                      <td height="1" width="10"><img src="index_files/space.gif" height="1" width="1"></td>
                      <td height="1" width="10"><img src="index_files/space.gif" height="1" width="5"></td>
                      <td height="1" width="593"><img src="index_files/space.gif" height="1" width="210"></td>
                      <td height="1" width="8"><img src="index_files/space.gif" height="1" width="5"></td>
                    </tr>
                    <tr>
                      <td height="" width="7">&nbsp;</td>
                      <td align="left" valign="top" width="10">&nbsp;</td>
                      <td width="10">&nbsp;</td>
                      <td align="left" valign="top"><table height="298" border="0" cellpadding="0" cellspacing="0">
                          <tbody>
                            <tr>
                              <td align="left" valign="top"><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="Estilo5"><b><font color="#666666">Ticket info </font></b></span> </td>
                                    </tr>
                                  </tbody>
                                </table>
                                  <table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
                                    <tbody>
                                      <tr>
                                        <td width="120" bgcolor="#EDF4FF"><div align="right">Title:</div></td>
                                        <td width="117"><?php echo $ticket['asunto']; ?></td>
                                        <td width="82" bgcolor="#EDF4FF"><div align="right">Date:</div></td>
                                        <td width="163"><span class="smalltext"><?php echo $ticket['fecha']; ?></span></td>
                                      </tr>
                                      <tr>
                                        <td bgcolor="#EDF4FF"><div align="right">Autor:</div></td>
                                        <td><?php echo $ticket['user']; ?></td>
                                        <td bgcolor="#EDF4FF"><div align="right">Department.:</div></td>
                                        <td><?php echo $ticket['departamento']; ?></td>
                                      </tr>
                                    </tbody>
                                  </table>
                                <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                                    <thead>
                                      <tr>
                                        <td align="left" nowrap="nowrap" width="1"></td>
                                        <td width="100%" colspan="" align="left" nowrap="nowrap" class="tcat"><div align="center"><?php echo $ticket['asunto']; ?></div></td>
                                      </tr>
                                    </thead>
                                    <tbody>
                                      <tr>
                                        <td colspan="2" align="left" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EDF4FF">
                                            <tbody>
                                              <tr>
                                                <td colspan="2" class="ticketline" height="1"><img src="vertickets_files/space.gif" border="0" height="1" width="1"></td>
                                              </tr>
                                              <tr>
                                                <td style="padding: 4px;" align="left" width="200"><span class="Estilo4"><?php echo $ticket['user']; ?></span></td>
                                                <td align="right"><img src="user.png" width="32" height="32">&nbsp;</td>
                                              </tr>
                                              <tr>
                                                <td colspan="2" class="ticketline" height="1"><img src="vertickets_files/space.gif" border="0" height="1" width="1"></td>
                                              </tr>
                                            </tbody>
                                          </table>
                                            <table border="0" cellpadding="3" cellspacing="1" width="100%">
                                              <tbody>
                                                <tr>
                                                  <td align="left" width="468"><img src="fecha.gif" width="16" height="16" border="0" align="absmiddle"><span class="smalltext">Published : <?php echo $ticket['fecha']; ?></span></td>
                                                </tr>
                                                <tr>
                                                  <td colspan="2" align="left" valign="top"><hr class="tickethr" size="1">
                                                      <?php echo $ticket['contenido']; ?><span class="mediumtext"><br>
                                                      <br>
                                                    </span> </td>
                                                </tr>
                                                <tr>
                                                  <td width="468" class="tcat">Comments:</td>
                                                </tr>
                                              </tbody>
                                          </table></td>
                                      </tr>
                                      <?php

$ticketcomentariobusqueda = mysql_query("SELECT * FROM comentariostickets WHERE idticket='$_GET[id]'");
	  //Motor resultados por pagina
	  if(@mysql_num_rows($ticketcomentariobusqueda) == 0)
{
echo "(Sin respuestas)";
}
	  if(@mysql_num_rows($ticketcomentariobusqueda) != 0)
	  {
$num_total_registros = @mysql_num_rows($ticketcomentariobusqueda);
	  while ($comentario = @mysql_fetch_array($ticketcomentariobusqueda))
    { 
	  ?>
                                      <tr>
                                        <td colspan="2" align="left" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
                                            <tbody>
                                              <tr>
                                                <td colspan="2" align="left" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EDF4FF">
                                                    <tbody>
                                                      <tr>
                                                        <td colspan="2" class="ticketline" height="1"><img src="vertickets_files/space.gif" border="0" height="1" width="1"></td>
                                                      </tr>
                                                      <tr>
                                                        <td style="padding: 4px;" align="left" width="200"><span class="Estilo4"><?php echo $comentario['autor']; ?></span></td>
                                                        <td align="right"><img src="<?php
												  if($comentario['staff'] == "si")
												  {
												  echo "staff.png";
												  }
												  else
												  {
												  echo "user.png";
												  }
												  ?> " width="32" height="32">&nbsp;</td>
                                                      </tr>
                                                      <tr>
                                                        <td colspan="2" class="ticketline" height="1"><img src="vertickets_files/space.gif" border="0" height="1" width="1"></td>
                                                      </tr>
                                                    </tbody>
                                                  </table>
                                                    <table border="0" cellpadding="3" cellspacing="1" width="100%">
                                                      <tbody>
                                                        <tr>
                                                          <td align="left" width="1"><img src="fecha.gif" width="16" height="16" border="0" align="absmiddle"></td>
                                                          <td align="left" width="100%"><span class="smalltext">Publicado : <?php echo $comentario['fecha']; ?></span></td>
                                                        </tr>
                                                        <tr>
                                                          <td colspan="2" align="left" valign="top"><hr class="tickethr" size="1">
                                                              <?php echo $comentario['contenido']; ?><span class="mediumtext"><br>
                                                              <br>
                                                            </span> </td>
                                                        </tr>
                                                      </tbody>
                                                  </table></td>
                                              </tr>
                                              <tr> </tr>
                                            </tbody>
                                        </table></td>
                                      </tr>
                                      <?php
								  }
								  }
								  ?>
                                    </tbody>
                                  </table>
                                <fieldset>
                                  <form name="form1" method="post" action="responder2.php">
                                    <table width="100%" border="0" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
                                      <tbody>
                                        <tr>
                                          <td width="426" class="tcat">Comment:</td>
                                          <td width="67" class="tcat">&nbsp;</td>
                                        </tr>
                                        <tr bgcolor="#EDF4FF">
                                          <td style="padding: 4px;" align="left"><strong>Webmaster</strong></td>
                                          <td align="right"><span class="ticketsubject">
                                            <input name="staff" type="hidden" id="staff" value="si">
                                          </span><img src="staff.png" width="32" height="32">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td><textarea name="textarea2" cols="60" rows="10" id="text_content"></textarea></td>
                                          <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td><input type="submit" name="Submit" value="Send">
                                              <input type="hidden" name="idticket" value="<?php echo $_GET['id']; ?>"></td>
                                          <td>&nbsp;</td>
                                        </tr>
                                      </tbody>
                                    </table>
                                  </form>
                                </fieldset></td>
                            </tr>
                          </tbody>
                      </table></td>
                      <td height="1" width="8"><img src="index_files/space.gif" height="1" width="5"></td>
                    </tr>
                  </tbody>
                </table>
                <p align="center">&nbsp;</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="Estilo7">OpenSupports</a></div></td>
            </tr>
          </tbody>
        </table></td>
      </tr>
    </tbody>
  </table>
</center>
</body>
</html>

Return current item: OpenSupports