This page shows a double table for open tickets. I just don’t get it, there is only one table in the code. When I remove the one table both disappear.
http://webhost.pro/blog/wp-content/uploads//2014/07/double.gif
[sup]1. <?php
include( “mypath.php” );
include( “{$filepath}/config/clientdbconnect.php” );
if ( ------------------------- )
{
#exit( “Security Violation” );
}
include( “header.php” );
$sqle = “select * from helpconfig where cid = ‘1’”;
if ( !( $resulte = mysql_query( $sqle ) ) )
{
exit( mysql_error( ) );
}
while ( $rowe = mysql_fetch_array( $resulte ) )
{
$ticketlimit = $rowe[‘ticketlimit’];
$ticketdlimit = $rowe[‘ticketdlimit’];
$flash = $rowe[‘flash’];
}
$interface = grab_template( “support_center_head.html”, $cusid );
$sqle = “select * from helpconfig where cid = ‘1’”;
if ( !( $resulte = mysql_query( $sqle ) ) )
{
exit( mysql_error( ) );
}
while ( $rowe = mysql_fetch_array( $resulte ) )
{
$chaturl = $rowe[‘chaturl’];
}
if ( $chaturl )
{
$chaturl = str_replace( “{username}”, $username, $chaturl );
$chaturl = str_replace( “{password}”, $password, $chaturl );
$interface = str_replace( “javascript: openwindow(‘chat.php’);”, “{$chaturl}”, $interface );
}
if ( $flash != “Y” )
{
$interface = str_replace( “<img src=”".$url."/templates/skin/button_flashtut.gif" width=“144” height=“35” border=“0”>", “”, $interface );
}
echo $interface;
$sqle = “select * from helpconfig where cid = ‘1’”;
if ( !( $resulte = mysql_query( $sqle ) ) )
{
exit( mysql_error( ) );
}
while ( $rowe = mysql_fetch_array( $resulte ) )
{
$supporturl = $rowe[‘supporturl’];
$chaturl = $rowe[‘chaturl’];
echo “<table width=“95%” border=“0” align=“center” cellpadding=“0” cellspacing= “0”>\n
$sqlc = “SELECT * from
calls
WHERE 1 AND status!=‘CLOSED’ and cid=’”.$cid.”’ LIMIT 0, 30";if ( !( $resultc = mysql_query( “{$sqlc}” ) ) )
{
exit( mysql_error( ) );
}
while ( $rowc = mysql_fetch_array( $resultc ) )
{
$rowc[‘subject’] = str_replace( “&”, “&”, $rowc[‘subject’] );
$pid = $rowc[‘pid’];
echo " <tr bgcolor=’#f5f5f5’ onMouseOver=this.style.cursor=‘pointer’,this.style.backgroundColor=’#F4FAFD’ onMouseOut=this.style.backgroundColor=’#F5F5F5’ onclick=this.style.backgroundColor=’#84B5CB’,location.href=‘view_ticket.php?pid=".$pid."’ bordercolor=#FFFFFF>";
echo "
echo $rowc[‘pid’];
echo “
echo $rowc[‘status’];
echo "
echo $rowc[‘subject’];
echo "
echo $rowc[‘date’];
echo “
}
$totalrows = mysql_num_rows( $resultc );
if ( $totalrows == 0 )
{
echo "
}
echo " \n
}
echo “
\n<table width=“95%” border=“0” align=“center” cellpadding=“0” cellspacing=“0”>\n
$a = 1;
$sqlc = “SELECT * from
calls
WHERE 1 AND status=‘CLOSED’ and cid=’”.$cid.”’ ORDER by pid
DESC";if ( !( $resultc = mysql_query( “{$sqlc}” ) ) )
{
exit( mysql_error( ) );
}
while ( $rowc = mysql_fetch_array( $resultc ) )
{
$rowc[‘subject’] = str_replace( “&”, “&”, $rowc[‘subject’] );
if ( $a == “3” )
{
$a = 1;
}
if ( $a == “1” )
{
$bgcolor = “#EEEEEE”;
}
else
{
$bgcolor = “#F5F5F5”;
}
$pid = $rowc[‘pid’];
echo " <tr onMouseOver=this.style.cursor=‘pointer’,this.style.backgroundColor=’#CCCCCC’ onMouseOut=this.style.backgroundColor=’#eeeeee’ onclick=this.style.backgroundColor=’#84B5CB’,location.href=‘view_ticket.php?pid=".$pid."’ bordercolor=#FFFFFF bgcolor={$bgcolor}>";
echo "
echo $rowc[‘pid’];
echo "
echo $rowc[‘status’];
echo "
echo $rowc[‘pid’];
echo “>”;
echo $rowc[‘subject’];
echo "
echo $rowc[‘date’];
echo “
$a += 1;
}
echo “”;
$totalrows = mysql_num_rows( $resultc );
if ( $totalrows == 0 )
{
echo "
}
echo " \n
include( “footer.php” );
echo “\n”;
?>[/sup]