@Acidgod:
Thanks for the corrections.
Althought, I found one weakness from :
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&;".URL_USER_ID."=".$row['session_user_id'];
replace with :
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['session_user_id']);
Careful when redirecting (especially under the sessions.php file).
Merry Christmas.