'; for($i = 0; $i < count($mode_types_text); $i++) { $selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : ''; $select_sort_mode .= ''; } $select_sort_mode .= ''; //-----------------------------setting-$select_sort_order---------------------------- //in this var we set some HTML code that alows users to select if they want it ascending or descending $select_sort_order = ''; //--------------------------------setting---$where----------------------------------- //this thing goes in an sql statement if (!$mysql['nickname']) { //if its not specified $where = ""; }elseif ($mysql['nickname'] == '%') { //if someone tries to select everyone.. wich is just lame and still limited to 10 people $where = ""; }else{ $where = "WHERE nickname LIKE '". $mysql['nickname'] ."'"; } //--------------------------------setting---$order_by-------------------------------- switch( $mode ) { case 'nickname': $order_by = "$where ORDER BY nickname $order"; break; case 'sentences': $order_by = "$where ORDER BY sentences $order"; break; case 'words': $order_by = "$where ORDER BY words $order"; break; case 'actions': $order_by = "$where ORDER BY actions $order"; break; default: $order_by = "$where ORDER BY words $order"; $mode = "words"; //so it gets put in the GET thing with the page thing //this also prevents any xss since it will be one of the cases or turn into "words" } //----------------------------sending-some-html-to-the-user-------------------------- ?>
| IRC Statistic Page (source) | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| IRC Statistic Page (source) | ||||||||||||||||||||||||||