1024; $i++) $dbsize /= 1024; $db_size_info['size'] = ceil($dbsize); $db_size_info['type'] = $bytes[$i]; return $db_size_info; } // Database size = table size + index size: $rows = db_query("SHOW TABLE STATUS"); $dbssize = 0; while ($row = mysql_fetch_array($rows)) { $dbssize += $row['Data_length'] + $row['Index_length']; } print "$dbssize bytes
"; $dbssize = db_size_info($dbssize); print "or
"; print "{$dbssize['size']} {$dbssize['type']}"; */ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') ){ $width1=150; $height1=33; } else{ $width1=160; $height1=26; $extraLine = "
"; } function getShortComments($user, $fname, $lname){ $array[0]=-1; if(!is_numeric($user)) return $array; global $server_name, $db_user, $db_password, $path; $dbh=mysql_connect ($server_name, $db_user, $db_password) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($db_user); $query = "SELECT c.from_user_id,c.comment, c.date_posted, u.user_name, u.first_name, u.last_name "; $query = $query. " FROM profile_comment c, user u "; $query = $query. " WHERE c.about_user_id=$user AND u.id=c.from_user_id ORDER BY date_posted DESC LIMIT 0, 1"; //echo $query; $result=mysql_query($query); if($result){ // to check if any result produced. $num_rows =mysql_num_rows($result); if($num_rows>0){ $i=0; $table = ""; while ($i < $num_rows){ $from_user_id=mysql_result($result, $i, "from_user_id"); $from_name=mysql_result($result, $i, "user_name"); $comment=mysql_result($result, $i, "comment"); $comment = substr($comment, 0, 150); $date_posted=mysql_result($result, $i, "date_posted"); $date_posted=date('Y-M-d H:i:s', strtotime($date_posted)); //$first_name=mysql_result($result, $i, "first_name"); //$last_name=mysql_result($result, $i, "last_name"); $comment = $comment. " ...Read "; $image= getUserImage($from_user_id); //echo $profileImage; //$image= "/users/". $from_user_id. "/profile/". $profileImage; $tr=""; $table = $table .$tr; $i = $i+1; } $table = $table. "

$first_name $last_name
$date_posted
$comment
"; } else{ $table = "
Your comment folder is empty."; } } mysql_close(); return $table; } function getFriends($user){ $array[0]=-1; if(!is_numeric($user)) return $array; global $server_name, $db_user, $db_password, $path; $dbh=mysql_connect ($server_name, $db_user, $db_password) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($db_user); $query = " SELECT f.friend_id id, f.best_friend, u.first_name, u.last_name ". " FROM friend f ". " INNER JOIN user u ON f.friend_id = u.id ". " WHERE f.user_id =$user ". " UNION ". " SELECT f.user_id id, f.best_friend, u.first_name, u.last_name ". " FROM friend f ". " INNER JOIN user u ON f.user_id = u.id ". " WHERE f.friend_id =$user ". " LIMIT 0 , 4 "; //echo $query; $result=mysql_query($query); if($result){ // to check if any result produced. $num_rows =mysql_num_rows($result); if($num_rows>0){ $i=0; $table = ""; while ($i < $num_rows){ $friend_id=mysql_result($result, $i, "id"); //$friend_name=mysql_result($result, $i, "user_name"); $first_name=mysql_result($result, $i, "first_name"); $last_name=mysql_result($result, $i, "last_name"); $image= getUserImage($friend_id); //echo $profileImage; //$image= "/users/". $friend_id. "/profile/". $profileImage; $tr=""; $table = $table .$tr; $i = $i+1; } //$table = $table. ""; $table = $table. "

$first_name

Sean
"; } else{ $table = "

Your friends folder is empty.

"; } } mysql_close(); return $table; } function getUserImages($user){ if(!is_numeric($user)) return; global $path, $imageCount; $user_dir = $path . "/users/".$user."/image"; //echo $user_dir; //$images = scandir($user_dir, 1); if(!file_exists($user_dir)){ $array["imageExists"]="no"; //return; "

You do not have any pictures or videos.
You can upload pictures or videos from My Picture or My Video menu.

"; } else{ $dh = opendir($user_dir); while (false !== ($filename = readdir($dh))) { $images[] = $filename; } $count = 0; $divTable=""; $table = ""; $imageCount = count($images); $imageCount = $imageCount>4?4:$imageCount; $start = 0; if(strcmp($images[0], ".") == 0 || strcmp($images[0], "..") == 0) $start++; if(strcmp($images[1], ".") == 0 || strcmp($images[1], "..") == 0) $start++; for ( $i=$start; $i < $imageCount ; $i++ ) { //$table="
"; //$viewLink="" ; } closedir($dh); $table = $table. "
"; $table=$table. "
"; } return $table; } $viewer_id=$_SESSION['user5237Id']; $user_id=$_SESSION['user5237Id']; $userName = $_SESSION['user5237']; $image=getUserImage($user_id); $edit_link = " (Edit)"; $entries = getLatestBlogEntries($user_id, $user_id); $friends = getFriends($user_id); $array = getViewableProfile($user_id, $user_id);//$userName); $error_code = $array["error_code"]; $about=$array["about"].$edit_link; $what_like=$array["what_like"].$edit_link; $interest=$array["interest"].$edit_link; $book=$array["book"].$edit_link; //$book = $book .$edit_link; $movie=$array["movie"].$edit_link; //$movie = $movie .$edit_link; $tv=$array["tv"].$edit_link; $people=$array["people"].$edit_link; $celebrity=$array["celebrity"].$edit_link; $money_or_science=$array["money_or_science"]; $politic=$array["politic"].$edit_link; $education=$array["education"].$edit_link; $job=$array["job"].$edit_link; $first_name=$array["first_name"]; //echo $first_name."22222222222222222"; $last_name=$array["last_name"]; $city=$array["city"]; $province=$array["province"]; $country=$array["country"]; $privacy=$array["first_name"]; $line=$array["line"]; $age=$array["age"]; $last_logged_in=$array["last_logged_in"]; $counter=$array["counter"]; $num_friends=$array["num_friends"]; $user_id=$array["user_id"]; $user_name=$array["user_name"]; $viewer_is_family=$array["viewer_is_family"]; $viewer_is_friend=$array["viewer_is_friend"]; $activity=$array["activity"].$edit_link; //$activity = $activity . " Recommend an activity to ".$first_name." "; $relationship_status=$array["relationship_status"]; $travel_destination=$array["travel_destination"].$edit_link; //$travel_destination = $travel_destination . " Recommend a travel destination to ".$first_name." "; //$image="/users/".$user_id."/profile/".$imageFileName; //if(!file_exists($path.$image)) // $image="/image/noPic.png"; // get all blog entries. $groups = getGroups($user_id); $groups = $groups .$edit_link;// " Recommend a group to ".$first_name." "; $recent_activity = getRecentActivities($user_id, $user_id, $first_name); $news = getLastNewsItem($user_id, $user_id,$viewer_is_family,$viewer_is_friend ); $news_title=$news['title']; $news_id=$news['id']; $news_date_posted=$news['date_posted']; $news_text=$news['text']; $images = getUserImages($user_id); $comments = getShortComments($user_id, $first_name, $last_name); if(money_or_science == 0) $money_or_science="I think science is better."; else $money_or_science="I think money is better."; if($education == 0){ $education="Not specified."; } else if($education == 1){ $education="High school"; } else if($education == 2){ $education="College degree"; } else if($education == 3){ $education="University degree."; } else if($education == 4){ $education="In school"; } else if($education == 5){ $education="In colledge"; } else if($education == 6){ $education="In university"; } $education=$education.$edit_link; // on the left side a short description of ?> Blogs ontariowww.com
Edit Profile
Edit Personal Information
Accoutn Settings
Advertisment
Friends
Pictures
Comment
" > ...
All Friends
  


-

----------------------------------

About me




0){ ?> 0){ ?>
Location:
Education:
Relationship Status:
I am a

My White Board

My Latest News
View blog
My Art
My Best Friends
My Family
My World
Latest News
Date Posted

My Music ----- My Video

Interest :

Movies :

TV-Shows :

Books :

People :

Activity :

Groups :

Travel :



   Latest Blog -------- View All

Recommend 's blog to a friend


Recently ...


- asdfasd