function user_name($t_id) {
global $link;
$sql = "SELECT username FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function user_quote($t_id) {
global $link;
$sql = "SELECT quote FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function web_site($t_id) {
global $link;
$sql = "SELECT website FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function dob($t_id) {
global $link;
$sql = "SELECT dob FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function lastlog($t_id) {
global $link;
$sql = "SELECT last_login FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
$result = mysql_query( "SELECT * FROM mon2_photos WHERE pid='$pid'", $link) or die ('request "Could not execute SQL query"');
while ( $row = mysql_fetch_object( $result ) )
{
$ID = $row->ID;
$pid = $row->pid;
global $ID, $pid;
$sql = "UPDATE mon2_photos SET views=views+1 WHERE pid='$pid' ";
mysql_query($sql)
or die("Insert into table failed");
$rankdiv = "$row->rank" / "$row->rank_cnt";
?>
Username:
ID"; ?>"> echo user_name($row->ID); ?>
DOB: echo dob($row->ID); ?>
Quote: " echo user_quote($row->ID); ?>"
Website
About Me:
Last Time Logged On:
$dt=lastlog($row->ID);
$timestamp = strtotime( "$row->last_login" );
echo date( 'M d, Y', $timestamp ); ?>
Average Rank: echo round($rankdiv, 2); ?>
Times Ranked: echo "$row->rank_cnt"; ?>
Times Viewed: echo "$row->views"; ?>
Link to this page:
}
?>
Comments
if ($comments=='1') {
$comment = addslashes($comment);
$IP = $_SERVER['REMOTE_ADDR'];
$result = mysql_query( "INSERT INTO mon2_comments VALUES (null, '$comment', '$user_ID', '$post_ID', CURRENT_DATE, '$IP')" );
};
function user_name2($t_id) {
global $link;
$sql = "SELECT username FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function user_avatar($t_id) {
global $link;
$sql = "SELECT avatar FROM mm_cthegauntlet WHERE ID = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
$result = mysql_query( "SELECT * FROM mon2_comments WHERE ID='$ID' ORDER BY com_id DESC LIMIT 0, 10" );
while ( $row = mysql_fetch_row( $result ) ) {
$comment = stripslashes($row[1]);
$dt = $row[4];
$poster = $row[3]; ?>
|
|
echo user_name2($row[3]); ?> - echo $dt ?>
echo $comment ?> |
};
?>
if (!isset($_COOKIE["thegauntletlog"]) or $_COOKIE["thegauntletlog"]=='') { /// on submit check for login
?>
Login or Register to post comments
Forgot username/pw? |
} else { ///// if logged in
$post_ID=$_COOKIE["thegauntletlog"];?>
}; // end check logged
// Closing connection
mysql_close($link);
?>