Location: PHPKode > projects > OpenSupports > Opensupports_v2_EN/support/admin/ver.php
<?php
session_start();
require "config.php";
if($_SESSION['user'] == "")
{
header('Location: index.php');
}
elseif(!isset($_SESSION['user']))
{
header('Location: index.php');
}
elseif(!isset($_GET['id']))
{
header('Location: index.php');
}
$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 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">
<!--
.Estilo2 {color: #003366}
.Estilo3 {color: #000000}
.Estilo5 {color: #666666}
.Estilo4 {	font-size: 18px;
	font-weight: bold;
}
.Estilo6 {color: #000099}
-->
</style>
</head>
<body><center>
  <p>&nbsp;</p>
  <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 align="left" valign="top" class="smalltext"><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"> </font></b><font color="#707070"><font color="#707070"><strong>Staff</strong></font><b> <img src="login_files/blueblockarrow.gif" width="8" height="8"> Answer Ticket </b></font></td>
                          </tr>
                        </tbody>
                      </table></td>
                    </tr>
                  </tbody>
              </table></td>
            </tr>
            <tr>
              <td><table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tbody>
                    <tr>
                      <td height="1" width="10"><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="515"><img src="index_files/space.gif" height="1" width="5"></td>
                      <td height="1" width="210"><img src="index_files/space.gif" height="1" width="210"></td>
                      <td height="1" width="5"><img src="index_files/space.gif" height="1" width="5"></td>
                    </tr>
                    <tr>
                      <td height="1" width="10">&nbsp;</td>
                      <td align="left" valign="top" width="10"><img src="index_files/space.gif" height="1" width="5"></td>
                      <td width="515" align="left" valign="top"><table width="502" height="298" border="0" cellpadding="0" cellspacing="0">
                        <tbody>
                          <tr>
                            <td align="left" valign="top"><fieldset>
                                <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><strong><font color="#666666">Ticket</font></strong></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">Ttitle:</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">Publish : <?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>
                                                                <tr>
                                                                  <td class="tcat">&nbsp;</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">Published : <?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="responder.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"><span class="ticketsubject"><?php echo $_SESSION[name]; ?>
                                                                <input name="name" type="hidden" id="name" value="<?php echo $_SESSION[name]; ?>">
                                                          </span></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>
                                </fieldset></td>
                          </tr>
                        </tbody>
                      </table>
                      <p>&nbsp;</p></td>
                      <td align="left" valign="top"><table width="100%" height="323" border="0" cellpadding="0" cellspacing="0">
                          <tbody>
                            <tr>
                              <td align="left" valign="top"><table class="tborder" border="0" cellpadding="0" cellspacing="0" width="100%">
                                <!-- BEGIN LOGIN BOX -->
                                <tbody>
                                  <tr class="tcat">
                                    <td align="left" width="1"><img src="index_files/space.gif" height="21" width="1"></td>
                                    <td align="left" width="8"><img src="index_files/blockarrow.gif" height="8" width="8"></td>
                                    <td width="169" align="left" valign="middle">&nbsp;<span class="smalltext">Welcome:<?php echo $_SESSION[name]; ?>(<a href="../close.php">close</a>)</span></td>
                                    <td align="right" width="25">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td colspan="4" bgcolor="#f5f5f5"><table border="0" cellpadding="2" cellspacing="1" width="98%">
                                        <tbody>
                                          <tr>
                                            <td class="smalltext" width="97%"><a href="staff.php" class="Estilo2"><img src="clipboard.gif" width="16" height="16"><span class="Estilo3"> Show Tickets </span></a></td>
                                            <td width="3%">&nbsp;</td>
                                          </tr>
                                          <tr>
                                            <td class="smalltext"><img src="new.gif" width="16" height="16">
                                                <?php
									  if($_SESSION['articulo'] == 1)
									  {
									  ?>
                                                <span class="Estilo3"> <a href="staff.php?code=475648DS7E4R5Y44F1ASD2W1">Publish Article</a> </span>
                                                <?php
									 }
									 else
									 {
									 ?>
                                                <span class="Estilo5">Publish Article </span>
                                                <?php }	?></td>
                                            <td>&nbsp;</td>
                                          </tr>
                                          <tr>
                                            <td class="smalltext"><p> <img src="lock.gif" width="16" height="16">
                                                    <?php
									  if($_SESSION['ban'] == 1)
									  {
									  ?>
                                                    <a href="staff.php?code=R5A7RHE4EW7D75EW5A" class="Estilo2"><span class="Estilo3"> Delete Users </span></a>
                                                    <?php
									 }
									 else
									 {
									 ?>
                                                    <span class="Estilo5">Delete Users </span>
                                                    <?php } ?>
                                            </p></td>
                                            <td>&nbsp;</td>
                                          </tr>
                                          <tr>
                                            <td class="smalltext"><form name="departamentoselect" method="post" action="staff.php">
                                                <table class="tborder" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                  <!-- BEGIN LOGIN BOX -->
                                                  <tbody>
                                                    <tr class="tcat">
                                                      <td align="left" width="1"><img src="index_files/space.gif" height="21" width="1"></td>
                                                      <td align="left" width="8"><img src="index_files/blockarrow.gif" height="8" width="8"></td>
                                                      <td width="169" align="left" valign="middle">&nbsp;<img src="clipboard.gif" width="16" height="16"> Show Tickets </td>
                                                      <td align="right" width="25">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                      <td colspan="4" bgcolor="#f5f5f5"><table border="0" cellpadding="2" cellspacing="1" width="100%">
                                                          <tbody>
                                                            <tr>
                                                              <td class="smalltext" width="46%"><label>
                                                                <select name="departamento" onChange="enviar()">
                                                                  <option value="" selected>Department..</option>
                                                                  <?php
$usuariodep = "-" . $_SESSION['user'] . "-";
$busquedadepartamentos=mysql_query("SELECT * FROM departamentos WHERE staff LIKE '%$usuariodep%'") or die("Problemas en el select departamentos:".mysql_error());
while ($departamento=mysql_fetch_array($busquedadepartamentos))
{
?>
                                                                  <option value="<?php echo $departamento['departamento']; ?>"><?php echo $departamento['departamento']; ?></option>
                                                                  <?php }
																	?>
                                                                </select>
                                                              </label></td>
                                                            </tr>
                                                          </tbody>
                                                        </table>
                                                          <script language="Javascript">
						document.loginform.loginemail.focus();
						                            </script></td>
                                                    </tr>
                                                    <!-- END LOGIN BOX -->
                                                    <tr class="borderrow1">
                                                      <td colspan="4" align="left" height="1"><img src="index_files/space.gif" height="1" width="1"></td>
                                                    </tr>
                                                    <tr> </tr>
                                                  </tbody>
                                                </table>
                                            </form>
                                                <a href="seach.php" class="Estilo2">
                                                <div align="center"></div>
                                                </a> </td>
                                            <td>&nbsp;</td>
                                          </tr>
                                        </tbody>
                                      </table>
                                        <script language="Javascript">
						document.loginform.loginemail.focus();
						          </script></td>
                                  </tr>
                                  <!-- END LOGIN BOX -->
                                  <tr class="borderrow1">
                                    <td colspan="4" align="left" height="1"><img src="index_files/space.gif" height="1" width="1"></td>
                                  </tr>
                                  <tr>
                                    <td height="22" colspan="4" bgcolor="#f5f5f5">&nbsp;</td>
                                  </tr>
                                </tbody>
                              </table></td>
                              <td width="5"><img src="index_files/space.gif" height="1" width="5"></td>
                            </tr>
                          </tbody>
                      </table></td>
                      <td height="1" width="5"><img src="index_files/space.gif" height="1" width="5"></td>
                    </tr>
                  </tbody>
              </table></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="Estilo6">OpenSupports</a><br>
              </div></td>
            </tr>
          </tbody>
        </table></td>
      </tr>
    </tbody>
  </table>
  <table border="0" cellpadding="0" cellspacing="0" width="830">
  </table>
  </center></body></html>
Return current item: OpenSupports