'; 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)
Sort       Order    
Note

Nickname:
Pages: Left  '; for($i = ($page - 1) ; $i < ($page+3 > ceil($count/10) ? ceil($count/10) : $page+3) ; $i++) { if ($i >= 0) { if ($i == $page) echo $page."   " ; else echo ''.$i.'   '; } } echo 'Right    '; //some more html stuff if ($isadmin) { //admin people get to see this (or weekend) echo '
'; if ($admin == 'edit') { echo ''; } }else{ //non admin people get to see this echo '
Nickname Sentences Words Actions Edit
'; } //--------------------------the-code-that-displays-all-the-info---------------------- //this is where things get messy.. someone should fix that *hint* *hint* YOU $i=1; while ($r = mysql_fetch_array($result)) { $nick = $r['nickname']; $sentences = $r['sentences']; $words = $r['words']; $actions = $r['actions']; $tdColor = ($i %2) ? "white-td" : "blight-td"; //takes care of the pritty colors ;) $sql = ("SELECT * FROM v3_weekend.link WHERE nickname = '".mysql_real_escape_string($nick)."' LIMIT 1"); $query = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($query); if (($admin == edit) && ($clean['editNick'] == $nick)) { echo " "; } else { echo " "; if ($isadmin) { echo " '; } } echo " "; $i++; } mysql_select_db('v3_hts'); //changing it back to the hts db in case some fancy sql stuff happends in the footer or whereever //this code changes the colour to whatever it wasn't was before if ($tdColor == "white-td") { $tdColor = "blight-td"; } else { $tdColor = "white-td"; } //--------------------------------the-search-stuff-again----------------------------- ?>
Nickname Sentences Words Actions
" .(($row['lvl'] > 0) ? "$nick" : $nick)."
" .(($row['lvl'] > 0) ? "$nick" : $nick)." $sentences $words $actionsedit
Nickname:
Pages: Left  '; for($i = $page-1; $i < ($page+3 > ceil($count/10) ? ceil($count/10) : $page+3) ; $i++) { if ($i >= 0) { if ($i == $page) echo $page."   "; else echo ''.$i.'   '; } } echo 'Right    '; ?>
IRC Statistic Page (source)
Sort       Order    
You are currently viewing the HTS source code. Copyright held by HTS developers. No permission to reproduce is given.