.
*/
if(!defined("SECURECHECK")) {die($lang['error_file_alone']);}
$error='';
$noerror='';
if(isset($_POST['delall']))
{
$complain_delete_all=$ts3->complainDeleteAll($_POST['tcldbid']);
if($complain_delete_all['success']!==false)
{
$noerror .= $lang['complaindel']."
";
}
else
{
for($i=0; $i+1==count($complain_delete_all['errors']); $i++)
{
$error .= $complain_delete_all['errors'][$i]."
";
}
}
}
if(isset($_POST['delete']))
{
$complain_delete=$ts3->complainDelete($_POST['tcldbid'], $_POST['fcldbid']);
if($complain_delete['success']!==false)
{
$noerror .= $lang['complainsdel']."
";
}
else
{
for($i=0; $i+1==count($complain_delete['errors']); $i++)
{
$error .= $complain_delete['errors'][$i]."
";
}
}
}
$complainlist=$ts3->getElement('data', $ts3->complainList());
$newcomplainlist=array();
if(!empty($complainlist))
{
foreach($complainlist AS $key=>$value)
{
$value=secure($value);
$newcomplainlist[$value['tcldbid']][$value['tname']][$value['fcldbid']]['fname']=$value['fname'];
$newcomplainlist[$value['tcldbid']][$value['tname']][$value['fcldbid']]['message']=$value['message'];
$newcomplainlist[$value['tcldbid']][$value['tname']][$value['fcldbid']]['timestamp']=$value['timestamp'];
}
}
$smarty->assign("error", $error);
$smarty->assign("noerror", $noerror);
$smarty->assign("newcomplainlist", $newcomplainlist);
?>