Docstoc

blog

Document Sample
blog Powered By Docstoc
					<?php
/*
   Author Ankur Jain (ankurjain@vastal.com)
   Copyright 2006 Vastal I-Tech & Co. (www.vastal.com) All rights
reserved. (Part Of Buddy Zone :: Social Networking Script A Product Of
Vastal I-Tech & Co. - www.vastal.com)
   Buddy Zone is a registered trademark of Vastal I-Tech & Co., Buddy Zone
is copyrighted under Indian Copyright Act which is valid in all counties
under Berne Convention.
   Unauthorized use of this code or any part of the entire use without
"written" permission (no exceptions) is prohibited and punishable under
international laws and treaties.

  "This software is the confidential and proprietary property of Vastal
I-Tech & Co.. ("Confidential Information"). You shall not disclose such
Confidential Information
  and shall use it only in accordance with the terms of the license
agreement you entered into with Vastal I-Tech & Co.."

   version 2.2
*/
ob_start("ob_gzhandler");
session_start();
//
*************************************************************************
*******************************************************
// Start timer to calculate the amount of time needed for the page to
load
//
*************************************************************************
*******************************************************
       include("classes/timer.class.php");
       $timer = new timer;
       $timer->start();
//
*************************************************************************
*******************************************************
// Start timer to calculate the amount of time needed for the page to
load
//
*************************************************************************
*******************************************************

//
*************************************************************************
*******************************************************
// Check For Cookie
//
*************************************************************************
*******************************************************
if (isset($_COOKIE['exact']))
{
   foreach ($_COOKIE['exact'] as $name => $value)
   {
         $email_selected= $value;
     }
}
//
*************************************************************************
*******************************************************
// Check For Cookie
//
*************************************************************************
*******************************************************

//
*************************************************************************
*******************************************************
// Include Database Connection and Misc Functions needed on most pages
//
*************************************************************************
*******************************************************
include("includes/check_hack.php");
include("includes/db-conn.php");
include("includes/conn.php");
include("includes/functions.php");

include("includes/misc_include_on_top.php");
//
*************************************************************************
*******************************************************
// Include Database Connection and Misc Functions needed on most pages
//
*************************************************************************
*******************************************************

include("classes/ads.class.php");
$ads = new ads;

$sql="select * from meta_tags";
$result=mysql_query($sql);
$data_set=mysql_fetch_array($result);

include("classes/blog.class.php");
$blog=new blog;

$id = $_GET["id"];
if($id == NULL || !is_numeric($id))
{
      $page_title = "Invalid Blog Selected";
}
else
{
      $blog_info=$blog->get_blog($_GET["id"]);
      $page_title = stripslashes($blog_info["subject"]);
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
       // Part of Buddy Zone By Vastal I-Tech & Co. (www.vastal.com)
     // Buddy Zone is a registered trademark of Vastal I-Tech & Co.
(www.vastal.com)
     // Buddy Zone is a copyrighted property of Vastal I-Tech & Co.
(www.vastal.com)
     // Unauthorized use of full or part of the code/software is
prohibited by international laws and treaties.
-->
<!-- Top.php -->
<html>
<head>
<title><?=$data_set["main_title"]?> :: <?=$page_title?></title>
<meta name="description" content="<?=$data_set["meta_desc"]?>" />
<meta name="keywords" content="<?=$data_set["keywords"]?>" />
<meta name="title" content="<?=$data_set[main_title]?> ::
<?=$page_title?>" />
<?php
       include("includes/header/header_meta_tags.php");
       include("includes/header/header_css_links.php");
       include("includes/header/header_javascript.php");

//
*************************************************************************
*******************************************************
// This file can be used to include any other javascripts needed on all
pages
//
*************************************************************************
*******************************************************
     include("includes/splash.php");
//
*************************************************************************
*******************************************************
// This file can be used to include any other javascripts needed on all
pages
//
*************************************************************************
*******************************************************
?>
</head>
<?php
       include("includes/header/header_body_tag.php");
     include("includes/instant_notification.php");

// Top Navigation
      include("includes/nav_profile.php");
// Top Navigation

//
*************************************************************************
*******************************************************
// This file can be used to include any other javascripts needed on all
pages
//
*************************************************************************
*******************************************************
     //include("includes/splash.php");
//
*************************************************************************
*******************************************************
// This file can be used to include any other javascripts needed on all
pages
//
*************************************************************************
*******************************************************

$id = addslashes($_GET["id"]);

if($_SESSION["blog_allowed"]!="yes" && $_SESSION["blog_allowed"]!=Null)
{
?>
<table width='100%' cellpadding="4" cellspacing="0"
class='dark_b_border2'>
<tr>
<td class='dark_blue_white2'>
<?=$site_name?> Blogs
</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF" class='err_class'>
The package you are subscribed to does not allow you to view/add to
blogs, please upgrade your account by clicking <a
href='upgrade_account.php'>here</a>.
</td>
</tr>
</table>
<?php
}
else
{
           if($id==Null || !is_numeric($id))
      {
?>
<table width='100%' cellpadding="4" cellspacing="0"
class='dark_b_border2'>
<tr>
<td class='dark_blue_white2'>
<?=$site_name?> Blogs
</td>
</tr>
<tr>
<td valign="top" class='err_class'>
Err # Invalid blog selected, cannot be displayed.
</td>
</tr>
</table>
<br />

<?php
     }
     else
     {
            $creator=$blog->get_creator($_GET["id"]);

                 if($blog_info["privacy"]=="1")
            {
                                   $friend_check = $blog-
>check_friend_private_blog($blog_info["member_id"],$_SESSION["member_id"]
);
                             if($friend_check == 0 && $creator !=
$_SESSION["member_id"])
                             {
?>
<table width='100%' cellpadding="0" cellspacing="0"
class='dark_b_border2'>
<tr>
<td class='dark_blue_white2'>
<?=$site_name?> Blogs
</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF" class='err_class'>
Err # This is a private Blog, you need to be a friend of the creator in
order to view this blog.
<br />
<a href='invite_friend.php?friend_id=<?=$creator?>'>Click here to request
to become friends.</a>
</td>
</tr>
</table>
<?php
                             }
            }
                 else
                 {
                       $res = $blog->update_counter($_GET["id"]);
?>
<style type="text/css">
body{
      text-align:center;
      font-family:Verdana;
      color:#000000;
      font-size:x-small;
      text-decoration:none;
      background-attachment:fixed;
}
                 :link{font-family:Verdana;color:#003399;font-size:x-
small;text-decoration:underline;}
                 a:link{font-family:Verdana;color:#003399;font-size:x-
small;text-decoration:underline;}
                 a:visited{font-family:Verdana;color:#003399;font-size:x-
small;text-decoration:underline;}
                 a:active{font-family:Verdana;color:#003399;font-size:x-
small;text-decoration:none;}
                 table.main{width:90%;border:none;}
                 table.main TD,table.main TR{border:none;}
                 table.nav{font-family:Verdana;color:#000000;font-size:x-
small;}
                 table.header{width:100%;background-
color:#D5E8FB;border:1px solid;border-color:#000000;}
                 table.header TH{font-family:Verdana;color:#000000;font-
size:x-large;text-decoration:none;font-weight:normal;border:none;}
                 table.header TD{font-family:Verdana;color:#000000;font-
size:x-small;text-decoration:none;border:none;}
                 table.profile{width:100%;border:1px solid;border-
color:#B1D0F0;background-color:#ffffff;text-align:center;}
                 table.profile TD{font-family:Verdana;color:#000000;font-
size:8pt;text-decoration:none;border:none;}
                 table.blog{width:100%;font-size:x-small;font-
family:verdana;color:#000000;word-wrap:break-word;background-
color:#B1D0F0;}
                 .blogTimeStamp{font-size:x-small;font-
family:verdana;color:#000000;font-weight:bold;background-
color:#B1D0F0;text-align:left;}
                 .blogSubject{font-size:x-small;font-
family:verdana;color:#000000;font-weight:bold;background-
color:#B1D0F0;text-align:left;}
                 .blogContent{font-size:x-small;font-
family:verdana;color:#000000;font-weight:normal;}
                 .blogContentInfo{font-size:x-small;font-
family:verdana;color:#000000;font-weight:normal;}
                 .blogCommentsProfile{width:25%;font-size:x-small;font-
family:verdana;color:#000000;font-weight:bold;background-
color:#FF9933;text-align:center;}
                 .blogComments{background-color:#F9D6B4;}
                 .blogCommentsContent{font-size:x-small;font-
family:verdana;color:#000000;}
                 .spacer{height:2;background-color:#FFFFFF;}
                 .commentSpacer{height:2;background-color:#FFFFFF;}
      .blogRealName { font-weight:normal; }
</style>
<!--- user's additional customized style sheet --->
<style type="text/css">
</style>

<div align="center">
<table class="main" width="900" align="center">
<tbody>
<tr>
<td align="center">
</module>
<br/>
<table class="nav" border="0" cellpadding="0" cellspacing="0"
width="100%">
<tbody>
<tr>
<td align="left">
<a href="view_member_blog.php?member_id=<?=$creator?>"><
Back</a></module></td>
<td align="right">


<div id="blog_content" class="blogControlTitleDiv">
<div class="blogContentLink">
<?php
if ($_SESSION["logged_in"]=="yes")
{
?>
<a href="logincomplete.php">home</a> |
<?php
}
else
{
?>
<a href="index.php">home</a> |
<?php
}
?>
<a href="my_messages.php?folder=inbox">mail</a> |
<a href="rss_blog.php?friend_id=<?=$creator?>">rss</a> |
<?php
if ($_SESSION["logged_in"]=="yes")
{
?>
<a href="logout.php">sign out</a>
<?php
}
else
{
?>
<a href="login.php">login</a>
<?php
}
?>
</div>
</div>
<div class="clear">
</div>
</module>
</td>
</tr>
</tbody>
</table>

<table width="100%">
<tbody>
<tr>
<td valign="top" width="20%">

<table class="profile">
<tr>
<td style="text-align:center;">
<?php
include("includes/people.class.php");
$people=new people;
include("includes/profile.class.php");
$profile=new profile;
$name=$people->get_name($blog_info["member_id"]);
$profile_back=$profile->get_back($blog_info["member_id"]);
$basic_info=$profile->get_basic($blog_info["member_id"]);
$people_info=$people->get_info($blog_info["member_id"]);

$num_images=$people->get_num_images($blog_info["member_id"]);
if($num_images==0)
{
       $gender=$people->check_gender($blog_info["member_id"]);
       if($gender=="Male")
     {
       $image="<img alt='' src='images/male.gif' width='90' border=0>";
     }
     else
     {
       $image="<img alt='' src='images/female.gif' width='90' border=0>";
     }
}
else
{
       $image_url=$people->get_image($blog_info["member_id"]);
       $pic_name=str_replace('user_images/', '', $image_url);
     $image = "<img src='image_gd/image_logincomplete.php?$pic_name'
border='0'>";
}

?>
<b>
<a
href="view_profile.php?member_id=<?=$blog_info["member_id"]?>"><?=$name?>
</a></b><br />
<a href="view_profile.php?member_id=<?=$blog_info["member_id"]?>">
<?=$image?>
</a>
<br />
<div style="text-align:center" class="blogRealName"></div>
<br />
<br />
<span class="userInfoBlog">
<span id="ctl00_cpMain_UserInfo_LastUpdatedDate">
<?php
      if(is_numeric($blog_info["last_updated"]))
      {
?>
<b>Last Updated: </b><?=date("F d, Y", $blog_info["last_updated"]);?>
<?php
      }
      else
      {
?>
<b>Last Updated: </b><?=$blog_info["last_updated"]?>
<?php
      }
?>
</span>
<br />
<br />
<a href="post_blog.php" id="ctl00_cpMain_UserInfo_PostBlogLink">Post New
Blog<br /></a>
<a href="blog.php" id="ctl00_cpMain_UserInfo_ManageBlogLink">Manage
Blog<br /></a>
<!--
<a href="#" id="ctl00_cpMain_UserInfo_CustomizeBlogLink">Customise
Blog<br /></a>
-->
<a href="email_friend.php?blog_id=<?=$_GET["id"]?>"
id="ctl00_cpMain_UserInfo_ForwardLink">Email to a Friend<br /></a>
</span>
</td>
</tr>
</table>
<br />
<table class="profile" >
<tr>
<td>
<b>Gender</b>: <?=$gender?><br />
<b>Status</b>:
<?php
if($profile_back["marital_status"]=="O")
{
?>
Swinger
<?php
}
?>
<?php
if($profile_back["marital_status"]=="R")
{
?>
In a relationship
<?php
}
?>

<?php
if($profile_back["marital_status"]=="S")
{
?>
Single
<?php
}
?>

<?php
if($profile_back["marital_status"]=="D")
{
?>
Divorced
<?php
}
?>

<?php
if($profile_back["marital_status"]=="M")
{
?>
Married
<?php
}
?>
<br />
<?php
        $num_days=4;
        $num_days=$num_days*2;
        $num_days=$num_days+5;
        $num_days=$num_days*50;

         $m=date("m");
         $d=date("d");

         if($m <= $basic_info["birth_month"])
         {
              $num_days=$num_days+1755;
         }
         else
         {
              $num_days=$num_days+1754;
         }
         $num_days=$num_days-$basic_info["birth_year"];

         //print "Num Days = $num_days";
         //$years = substr($num_days,1,3);
         $time_now=strtotime("now");
         $time_birth=strtotime($basic_info["dob"]);
         //print $time_birth;
         //print "<br>";
         //print $time_now;

         $diff = $time_now - $time_birth;

         $mins = $diff/60;
        $hours = $mins/60;
        $days = $hours/24;
        $days = round($days,0);
        //print "Days = $days";
        $years = $days/365;
        //$years = round($years,0);
             $xa = explode('.', $years);
             $years = $xa[0];

        if($years > 36)
        {
            $years = $years;
        }
        //print "Days = $days";


        //$days=datediff($basic_info["dob"], GetTodayDate(0));
        //$years=$days/365;
        //$years=substr($years,0,2);

        //print $basic_info["dob"];
        //print GetTodayDate(0);
        //$days=abs(new_datediff("-
",$basic_info["dob"],GetTodayDate(0)));
        //$years=$days/365;
        //$years = round($years,0);
        //print $years;
        /*
        $sql="SELECT DATEDIFF('2006-11-18','$basic_info[dob] 00:00:00')
as aa";
        $date_res=mysql_query($sql);
        $date_set=mysql_fetch_array($date_res);
        $days=$date_set["aa"];
        $years = $days/365;
        $years = round($years,0);
        */
?>
<b>Age</b>: <?=$years?><br />
<?php
$month = $basic_info["birth_month"]+1; // Since the array of months
starte from 0 we have added a +1 to make it work correctly.
?>
<b>Sign</b>:
<?php
      switch($month)
      {

           case "1":
                 if($basic_info["birth_day"] <= 20)
                 {
                       print "Capricorn";
                 }
                 else
                 {
           print "Aquarius";
      }
break;

case "2":
      if($basic_info["birth_day"] <= 19)
      {
            print "Aquarius";
      }
      else
      {
            print "Pisces";
      }
break;

case "3":
      if($basic_info["birth_day"] <= 20)
      {
            print "Pisces";
      }
      else
      {
            print "Aries";
      }
break;

case "4":
      if($basic_info["birth_day"] <= 20)
      {
            print "Aries";
      }
      else
      {
            print "Taurus";
      }
break;

case "5":
      if($basic_info["birth_day"] <= 21)
      {
            print "Taurus";
      }
      else
      {
            print "Gemini";
      }
break;

case "6":
      if($basic_info["birth_day"] <= 22)
      {
            print "Gemini";
      }
      else
     {
           print "Cancer";
      }
break;

case "7":
      if($basic_info["birth_day"] <= 22)
      {
            print "Cancer";
      }
      else
      {
            print "Leo";
      }
break;

case "8":
      if($basic_info["birth_day"] <= 21)
      {
            print "Leo";
      }
      else
      {
            print "Virgo";
      }
break;

case "9":
      if($basic_info["birth_day"] <= 23)
      {
            print "Virgo";
      }
      else
      {
            print "Libra";
      }
break;

case "10":
      if($basic_info["birth_day"] <= 24)
      {
            print "Libra";
      }
      else
      {
            print "Scorpio";
      }
break;


case "11":
      if($basic_info["birth_day"] <= 22)
      {
            print "Scorpio";
                 }
                 else
                 {
                        print "Sagittarius";
                 }
           break;

           case "12":
                 if($basic_info["birth_day"] <= 22)
                 {
                       print "Sagittarius";
                 }
                 else
                 {
                       print "Capricorn";
                 }
           break;

        }
?>
<br /><br/>
<?php
if($people_info["country"]!=Null)
{
  if(is_numeric($people_info["country"]))
  {
    $sql="select * from states where state_id = $people_info[country]";
    $country_res=mysql_query($sql);
    $country_set=mysql_fetch_array($country_res);
  }
}
?>
<b>Country</b>: <?=$country_set["state_name"]?><br />
<b>Signup Date</b>: <?=date("F d, Y", $basic_info["signup_on"]);?>
</td>
</tr>
</table>


<div id="KudoSideList">
<br />
<table class="profile" cellpadding="0" cellspacing="0">
<tr>
<td>
<div class="profileTitle">
<b>Who Gives Kudos:</b>
</div>
<div class="MyReadersListLink">
<label id="NewlyAddedKudos"></label>
<?php
      $res_kudos = $blog->get_kudos_friends($_GET["id"],$creator);
      while($kudos_set = mysql_fetch_array($res_kudos))
      {
            if($kudos_set["member_id"]!=Null)
           {
           $name=$people->get_name($kudos_set["member_id"]);
?>
<div class="MySubscriptionsListLink">
<a
href="view_profile.php?member_id=<?=$kudos_set["member_id"]?>"><?=$name?>
</a>&nbsp;(<?=$kudos_set["a"]?>)
</div>
<?php
           }
      }
?>
</div>
<br />
</td>
</tr>
</table>
</div>

<br />
<table class="profile" cellpadding="0" cellspacing="0">
<tr>
<td>
<div class="profileTitle"><b>My Subscriptions</b></div>
<?php
$sub_res=$blog->get_subscriptions($creator);
while($sub_set=mysql_fetch_array($sub_res))
{
      $name=$people->get_name($sub_set["sub_member_id"]);

?>
<div class="MySubscriptionsListLink">
<a
href="view_profile.php?member_id=<?=$sub_set["sub_member_id"]?>"><?=$name
?></a>
</div>
<?php
}
?>
</td>
</tr>
</table>
</module>
</module>
</module>
</module>
</module>
<div id="ctl00_cpMain_googlead" name="ctl00_cpMain_googlead">
<!-- ad code here -->
<?php
      $ads_set = $ads->get_top_160_banner();
      $upd = $ads->update_impr($ads_set["campaign_id"]);

     if($ads_set["banner_code"]!=Null)
      {
?>
<?=stripslashes($ads_set["banner_code"])?>
<?php
      }
      else
      {
           if($ads_set["banner_type"] == 2)
           {
?>
<a
href='track_ad_link.php?campaign_id=<?=$ads_set["campaign_id"]?>&url=<?=$
ads_set["banner_url"]?>' target='_blank'>
<img src='<?=$ads_set["banner_file"]?>' width='160' height='600'
border='0'/>
</a>
<?php
           }
           if($ads_set["banner_type"] == 3)
           {
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash
.cab#version=6,0,0,0" width="160" height="600" id="banner" ALIGN="">
<PARAM NAME=movie
VALUE="<?=$ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_i
d=<?=$ads_set["campaign_id"]?>&url=<?=$ads_set["banner_url"]?>">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED
src="<?=$ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_id=
<?=$ads_set["campaign_id"]?>&url=<?=$ads_set["banner_url"]?>"
quality=high bgcolor=#FFFFFF WIDTH="160" HEIGHT="600" NAME="banner"
ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
<?php
           }
      }
?>

<!-- ad code here -->

</div>
</templatedcontentview>
</td>

<td width="5">
<img alt="" src="images/spacer.gif" border="0" height="1" width="5"/>
</td>
<td valign="top" width="80%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="spacer">
<td></td>
</tr>
</table>

<table cellpadding="10" cellspacing="0" class="blog">
<tr>
<td width="100%" colspan="3">
<p class="blogTimeStamp">
<?=$blog_info["posted_month"]?>/<?=$blog_info["posted_day"]?>/<?=$blog_in
fo["posted_year"]?>&nbsp;
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0"
class="blog" id="blog">
<tr>
<td width="30"><img height="1" border="0" width="30" alt=""
src="images/spacer.gif" /></td>
<td>
<!--- blog subject --->
<p class="blogSubject">
<?=stripslashes($blog_info["subject"])?>
<?php
      if($blog_info["blog_category"]==Null ||
$blog_info["blog_category"]==0)
      {
?>
<br />Category: Uncategorized
<?php
      }
      else
      {
                 $cat_set = $blog-
>get_category($blog_info["blog_category"]);
?>
<br />Category: <?=stripslashes($cat_set["cat_name"])?>
<?php
      }
?>
<?php
      if($blog_info["mood"]!=0)
      {
?>
<br/>Current mood:&nbsp;
<?php
      $mood_image=$blog->get_mood_image($blog_info["mood"]);
      $mood=$blog->get_mood_name($blog_info["mood"]);
      if($mood_image!=Null)
      {
?>
<img src="<?=$mood_image?>" width='20' height='20' align=absMiddle>
<?=$mood?>
<?php
      }
      }
?>
</p>
<!--- blog body --->
<p class="blogContent">
<?=stripslashes($blog_info["body"])?>
</p>

<!--- blogger's current book/movie/music/games --->
<table cellspacing="0" cellpadding="2" border="0" class="blogContentInfo"
width='400'>
<tr valign="top">

<td>


</td>
</tr>
</table>
<p class="blogContentInfo">
<div class="cmtcell">
<?php
   $num_comments=$blog->get_num_comments($blog_info["id"]);
   $num_kudos=$blog->get_num_kudos($blog_info["id"]);
?>
<?=$blog_info["posted_hour"]?>:<?=$blog_info["posted_min"]?>
<?=$blog_info["am_pm"]?>
&nbsp;<b><?=$num_comments?></b>&nbsp;Comments
&nbsp;(<a href='add_blog_comment.php?id=<?=$_GET["id"]?>'>Add
Comment</a>)&nbsp;&nbsp;|
<label id="KudoCount1"><?=$num_kudos?>&nbsp;Kudos</label>&nbsp;
<?php
     $creator=$blog->get_creator($blog_info["id"]);
     if($creator==$_SESSION["member_id"])
     {
          $show=1;
     }
     else
     {
       if($_SESSION["member_id"]!=Null)
       {
       $sql="select count(*) as a from blog_moderators where member_id =
$_SESSION[member_id]";
       $res=mysql_query($sql);
       $data_set=mysql_fetch_array($res);

       if($data_set["a"]==1)
       {
            $show=1;
       }
       else
       {
            $show=0;
       }
       }
       else
      {
          $show=0;
      }
     }
?>
<?php
      if($show==1)
      {
?>
<a href="edit_blog.php?id=<?=$blog_info["id"]?>">Edit</a>&nbsp;
<a onClick="if( confirm('Are you sure you want to remove this blog?')
){return true;}else{ return false; }"
href="delete_blog.php?id=<?=$blog_info["id"]?>">Remove</a>
<?php
      }
?>
</div>
</div>

</p>
<p style="clear:left;"></p>
<p class="blogContentInfo">
<a id="ctl00_cpMain_SingleBlog_btnBackToBlogList"
href="view_member_blog.php?member_id=<?=$creator?>">Back to Blog List</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>

<div style="font-family:verdana; font-size:10px; font-
weight:normal;"></div>
</p>

<p>
<table width='100%' cellpadding="4" cellspacing="0">
<tr>
<td class='txt_label'>
<?php
$n = $_GET["n"];
if($n==Null || !is_numeric($n))
{
      $n = 0;
}
$n_next=$n+15;

$num_posts=$num_comments;

if($num_posts<=$n_next)
{
      $next=0;
}
else
{
       $next=1;
}

if ($num_posts !=0 )
{
      $per_page = 15;
      // Variables used for navigation
      $string = "id=$_GET[id]";
      //$n_del = "delete";
      $n_found = "";
      $n_ending = "Comments";
      $page = $_SERVER['PHP_SELF'];
      include("includes/pagination.php");
      // Variables used for navigation
}
?>
</td>
</tr>
</table>
</p>

<?php
     $comments_res=$blog->get_blog_comments($blog_info["id"],$n);
     while($comment_set=mysql_fetch_array($comments_res))
     {
         $commentor_name=$people->get_name($comment_set["member_id"]);
            $num_images=$people-
>get_num_images($comment_set["member_id"]);

           if($num_images==0)
           {
                 $gender=$people-
>check_gender($comment_set["member_id"]);
                 if($gender=="Male")
                 {
                       $image="<img alt='' src='images/male.gif'
width='90' border=0>";
                 }
                 else
                 {
                       $image="<img alt='' src='images/female.gif'
width='90' border=0>";
                 }
           }
           else
           {
                 $image_url=$people-
>get_image($comment_set["member_id"]);
                 $pic_name=str_replace('user_images/', '', $image_url);
                 $image = "<img
src='image_gd/image_logincomplete.php?$pic_name' border='0'>";
           }
?>
<p>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<img alt="" height="1" width="0" src="images/clear.gif" />
</td>
<td class="blogCommentsProfile">
<a class="profileLinks"
href="view_profile.php?member_id=<?=$comment_set["member_id"]?>"><?=$comm
entor_name?></a>
<br />
<a class="profileLinks"
href="view_profile.php?member_id=<?=$comment_set["member_id"]?>"><?=$imag
e?></a>
<br />&nbsp;
<div class="blogRealName"></div>
</td>
<td class="blogComments" width="100%">
<table cellspacing="0" cellpadding="5" border="0" width="100%">
<tr>
<td class="blogComments">
<p class="blogCommentsContent">
<?=stripslashes($comment_set["body"])?>
</p>
<p class="blogCommentsContent">
Posted by <a
href="view_profile.php?member_id=<?=$comment_set["member_id"]?>"><b>
<?=$commentor_name?></b></a> on <?=$comment_set["posted_on"]?>
<br />
<?php
     if($comment_set["comment_id"]!=0)
     {
?>
<p class="blogCommentsContent">
Posted For Comment
<?php
     $comment=$blog->get_comment($comment_set["comment_id"]);
?>
<br>
<b><?=stripslashes($comment["body"])?></b></a><br> which was posted on
<?=$comment["posted_on"]?>
<?php
     }
?>
<br>
<?php
     if($show==1)
     {
?>
[<a
href="remove_comment.php?blog_id=<?=$blog_info["id"]?>&comment_id=<?=$com
ment_set["id"]?>" onMouseOver="window.status='Remove this blog
comment';return true;" onMouseOut="window.status='';return true;"
onClick="return confirm('Are you sure you want to remove this blog
comment?')"><b>Remove</b></a>]
<?php
     }
?>
[<a
href="add_blog_comment1.php?blog_id=<?=$blog_info["id"]?>&comment_id=<?=$
comment_set["id"]?>" onMouseOver="window.status='Reply to this
comment';return true;" onMouseOut="window.status='';return
true;"><b>Reply to this</b></a>]
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr class="commentSpacer">
<td>
</td>
</tr>
</table>
</p>

<?php
        }
?>


<p class="blogContentInfo">
<a id="ctl00_cpMain_SingleBlog_btnBackToBlogList2"
href="view_member_blog.php?member_id=<?=$creator?>">Back to Blog List</a>
</p>
<p>
<div style="font-family:verdana; font-size:10px; font-
weight:normal;"></div>
</p>
</module>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</tbody>
</table>
</div>
<?php
           }
      }
}
?>
<!-- blog_comments -->
</table>
<!-- middle_content -->


<!-- Middle Text -->
<?php
include("includes/bottom.php");
?>

				
DOCUMENT INFO
Shared By:
Tags: html code
Stats:
views:16
posted:7/23/2012
language:English
pages:23
Description: its code of php for blog