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']}"; */ $extraLine = ""; 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 = "
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"); if($user == 14 && $friend_id == 90 && $_SESSION['user5237Id'] != 90){ $i = $i+1; continue; } //$friend_name="sean1234";//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. "
$first_name $last_name
$first_name
"; } else{ $table = "
Friends folder is empty."; } } mysql_close(); return $table; } function getUserImages($user){ if(!is_numeric($user)) return; global $path, $imageCount, $global_network_url; $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 = 0; if(isset($_SESSION['user5237Id'])) $viewer_id=$_SESSION['user5237Id']; $user_id=$_GET['id']; $userName = $_SESSION['user5237']; $image=getUserImage($user_id); $friends = getFriends($user_id); $array = getViewableProfile($viewer_id, $user_id);//$userName); $error_code = $array["error_code"]; $first_name=$array["first_name"]; //echo $first_name."22222222222222222"; $last_name=$array["last_name"]; $city=$array["city"]; $province=$array["province"]; $country=$array["country"]; if($error_code != 0){ } else{ //echo $array; // get the user information, including user's privacy. // privacy=2 can be viewed by every one, privacy=1 can be viewed by friends only $about=$array["about"]; $what_like=$array["what_like"]; $interest=$array["interest"]; $book=$array["book"]; $book = $book . " Recommend a book "; $movie=$array["movie"]; $movie = $movie . " Recommend a movie "; $tv=$array["tv"]; $tv = $tv . " Recommend a TV show "; $people=$array["people"]; $celebrity=$array["celebrity"]; $money_or_science=$array["money_or_science"]; $politic=$array["politic"]; $education=$array["education"]; $job=$array["job"]; $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"]; $activity = $activity . " Recommend an activity to ".$first_name." "; $relationship_status=$array["relationship_status"]; $travel_destination=$array["travel_destination"]; $travel_destination = $travel_destination . " Recommend a travel destination to ".$first_name." "; if(strlen($city)>0) $city = $city. ", "; if(strlen($province)>0) $province = $province. ", "; $location = $city. $province.$country; if(strlen($location) ==0 ) $location = "Not Specified"; // get all blog entries. $entries = getLatestBlogEntries($user_id, $viewer_id); $groups = getGroups($user_id); $groups = $groups . " Recommend a group to ".$first_name." "; $recent_activity = getRecentActivities($viewer_id, $user_id, $first_name); $news = getLastNewsItem($user_id, $viewer_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']; //$friends = getFriends($user_id); $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"; } // on the left side a short description of } ?> Blogs ontariowww.com
Send email
Send message
Add to favorites
"> Add to friends
"> Add to best friends
"> Add to family
Advertisment
Friends
Pictures
Comment
" > ...
All Friends
  

-


About me


... More about me ...


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

My White Board
Ask me a question

My Latest News
View blog
My Art
My Best Friends
My Family
My World
Latest News:
No news posted by Date Posted:

Write A Comment ----- My Music ----- My Video

Interest :

Movies :

TV-Shows :

Books :

People :

Activity :

Groups :

Travel :



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

Recommend a blog to
Recommend 's blog to a friend


Recently ...









login first.
Not a member yet? Sign up
"; } ?>
Name:
"> Add to friends
"> Add to family
Add to favorites

Send message
Send email
- asdfasd