* * File Name : testberichte.html * Last Update : 2009-03-26 */ include('glob/start.php'); create_thispage($thispage['id'],$thispage['uri'],$thispage['title']); $orderarr = array('title','total','dateedit'); if(!in_array($o,$orderarr))$o = 'dateedit'; $result = $sm_db->query("SELECT id, labels, title, games_id, dateadd, date_format(dateadd, '%d.%m.%y') as showdateadd, ssite, url FROM tests WHERE status='1' UNION SELECT id, labels, title, TRIM(SUBSTRING_INDEX(games_id, ',', 1)), dateon as dateadd, date_format(dateon, '%d.%m.%y') as showdateadd, '".SITE_TITLE."', NULL FROM news WHERE dateon<=now() and status='1' and (labels LIKE '%[8]%' or labels LIKE '%[9]%') ORDER BY dateadd DESC") or mysql_die($sm_db); while ($db = mysqli_fetch_assoc($result)) { if($games_online[$db['games_id']]){ $res[$db['games_id']]['title'] = $games_title[$db['games_id']]; $res[$db['games_id']]['total']++; $res[$db['games_id']]['dateedit'][] = $db['dateadd']; $res[$db['games_id']][$db['dateadd']]['showdateedit'][] = $db['showdateadd']; }else{ $resoff[$db['id']]['test_title'] = ''.$db['title'].''; $resoff[$db['id']]['author'] = stripslashes(htmlentities($db['ssite'])); $resoff[$db['id']]['labels'] = GroupOfID_arr_range($db['labels'],array(7,2)); $resoff[$db['id']]['total']++; $resoff[$db['id']]['dateedit'] = $db['dateadd']; $resoff[$db['id']]['showdateedit'] = $db['showdateadd']; $orderoff[$db['id']] = $resoff[$db['id']][$o]; } } if($res){ while(list($key, $val) = each($res)){ asort($val['dateedit']); $res[$key]['dateedit'] = end($val['dateedit']); $res[$key]['showdateedit'] = end($val[$res[$key]['dateedit']]['showdateedit']); $order[$key] = $res[$key][$o]; } } $c_body .= ' '; ($o=='title')?asort($order):arsort($order); while(list($key, $val) = each($order)){ $c_body .= ' '; } $c_body .= '
Titel Anzahl Update
'.$res[$key]['title'].' '.$res[$key]['total'].' '.$res[$key]['showdateedit'].'
'; if($orderoff){ ($o=='title')?asort($orderoff):arsort($orderoff); $c_body .= '

weitere Testberichte

'; } include('glob/end.php'); ?>