Hi all,i have found an old thread ( Display_open_topics.php). It works with v1.9.12 (19292ad). but i can't display topics subject, and topic number.For Name and Created and Modified Date is working . I have seen that subject data is in "ost_ticket__cdata". I have tried to merge with object_id, without succes. Anybody use this mod? Thank you !Here is the full code?php display_open_topics.php Displays a block of the last X number of open tickets. Neil Tozier Copyright (c) 2010-2013 For use with osTicket version 1.8ST (http://www.osticket.com) Released under the GNU General Public License WITHOUT ANY WARRANTY. See osTickets's LICENSE.TXT for details.**********************************************************************/// needed for 1.8 for now until we tie this back into the built in DB query$username="xxxxx";$password="xxxxx";$database="xxxxx";//mysql_connect(localhost,$username,$password);mysql_connect('localhost',$username,$password) or die(mysql_error());@[deleted]($database) or die( "Unable to select database");// end 1.8 fix for now// The columns that you want to collect data for from the db//$columns = "ticket_id, user_id, subject, created, updated, priority_id";$columns = " number, ticket_id, user_id, created, updated";// The maximum amount of open tickets that you want to display.$limit ='100';// mysql query. The columns tha$query = "SELECT $columns FROM ost_ticket WHERE team_id = '0' ORDER BY created DESC LIMIT 0,$limit";if($result=mysql_query($query)) { $num = mysql_numrows($result);}if ($num >> 0) {// table headers, if you add or remove columns edit thisecho "";echo "";$i=0;while ($i < $num) { // You will need one line below for each column name that you collect and want to display. // If you are unfamiliar with php its essentially $uniqueVariable = mysql junk ( columnName ); // Just copy one of the lines below and change the $uniqueVariable and columnName $number = mysql_result($result,$i,"number"); $subject = mysql_result($result,$i,"subject"); $user_id = mysql_result($result,$i,"user_id"); $ticket_id = mysql_result($result,$i,"ticket_id"); $created = mysql_result($result,$i,"created"); $updated = mysql_result($result,$i,"updated"); //$agency = mysql_result($result,$i,"agency"); $priority = mysql_result($result,$i,"priority_id"); // if no update say so if ($updated == '0000-00-00 00') { $updated = 'no update yet'; } // look up internal form id $entryIdsql = "SELECT id,form_id,object_id FROM ost_form_entry WHERE object_id=$ticket_id LIMIT 1"; $entryIdresult = mysql_query($entryIdsql); $entry_id = mysql_result($entryIdresult,0,"id"); $form_id = mysql_result($entryIdresult,0,"form_id"); $object_id = mysql_result($entryIdresult,0,"object_id"); // get subject $subjectsql = "SELECT subject FROM ost_ticket__cdata WHERE ticket_id=$object_id and field_id=5"; $subjectresult = mysql_query($subjectsql); $subject = mysql_result($subjectresult,0,"value"); // get priority $prioritysql = "SELECT value FROM ost_form_entry_values WHERE entry_id=$entry_id and field_id=7"; $priorityresult = mysql_query($prioritysql); $priority = mysql_result($priorityresult,0,"value"); // get ticket openers name $namesql = "SELECT name FROM ost_user WHERE id=$user_id"; $nameresult = mysql_query($namesql); $name = mysql_result($nameresult,0,"name"); //mysql_close(); // change row back ground color to make more readable if(($i % 2) == 1) //odd {$bgcolour = '#F6F6F6';} else //even {$bgcolour = '#FEFEFE';} //populate the table with data echo "" ."" ."" .""; ++$i;}echo "NumberOpenerSubjectCreate DateModify Date $priority $name $subject $created " ." $updated ";}else { echo "There are no tickets open at this time.
";}?>