2005/1/11 8:36
JS
Just popping in
Posts: 87
Since: 2002/12/16
// let start including the header of xoops include("../../mainfile.php"); // including top functions of xoops include(XOOPS_ROOT_PATH."/header.php"); // including the rest ?> include "conf.php"; ?> Name Race Class Level Rank $link = mysql_connect($db_host, $db_user, $db_passwd) or die("Could not connect"); mysql_select_db($db_name) or die("Could not select DB"); $query = "SELECT * FROM `guild_char`"; if( $guild_name != "" ){ $query .= " WHERE guild_name = '$guild_name'"; } if( $_REQUEST['sort'] == 'name' ) { $query .= " ORDER BY name"; } else if( $_REQUEST['sort'] == 'race' ) { $query .= " ORDER BY race"; } else if( $_REQUEST['sort'] == 'class' ) { $query .= " ORDER BY class"; } else if( $_REQUEST['sort'] == 'guild_rank' ) { $query .= " ORDER BY guild_rank"; } else { $query .= " ORDER BY level DESC"; } print ""; $result = mysql_query($query) or die(mysql_error()); while ( $row = mysql_fetch_assoc( $result ) ) { ?> href="char.php?name=print $row['name']; ?>&server=print $row['server']; ?>"> print $row["name"]; ?> print $row["race"]; ?> print $row["class"]; ?> print $row["level"]; ?> print $row["guild_rank"]; ?> } ?> // including footer of xoops include(XOOPS_ROOT_PATH."/footer.php"); // done ?>
2005/1/11 9:25
wtravel
Posts: 987
Since: 2003/8/27
Advanced Search
328 user(s) are online (217 user(s) are browsing Support Forums)
Members: 0
Guests: 328