Current Path : /var/www/html/social/ |
|
Current File : /var/www/html/social/smartpull_ajax.php |
<?php session_start();
require "__dashboardconfig/class.function.php";
dashboard::establishConnection();
if(isset($_REQUEST['getupdated_postcmntlikes']))
{ //
$postid_array=explode(',',$_REQUEST['PostIds_Array']);
$postid_array=array_unique($postid_array);
$timestamp=$_REQUEST['timestamp'];
$postlikes_array=explode(',',$_REQUEST['PostLikes_arrays']);
//print_r($postlikes_array); die;
$wallid=$_REQUEST['wallid_raj'];
$social_userpost=$_REQUEST['postwallname'];
$result='';
$str='';
// Dtails of users//
$commenter_details=mysql_fetch_array(mysql_query("SELECT * FROM `social_userbasicinfo` WHERE `user_id`='".$_SESSION['userid']."'"));
$session_userimg=$commenter_details['user_img'];
$commenter_profile_link='http://www.365hops.com/social/index.php'.'?f='.$_SESSION['username'].'&m='.base64_encode($commenter_details['user_id'].$_SESSION['username']);
// New Post For That Particular Wall & User Id//
$str_timestamp=$timestamp;
$limitdata=10;
$userfrndsids='';//
// Friend Ids
$showfrndgellerarrid = array();
$showfrndgelleryqueryy = mysql_query("select friends_id from social_userfriends where user_id = '".$wallid."' and userfriendsstatus ='1'");
while($showfrndgelleryqueryrowss = mysql_fetch_array($showfrndgelleryqueryy,MYSQL_ASSOC)){
array_push($showfrndgellerarrid,$showfrndgelleryqueryrowss['friends_id']);
}
$userfrndsids = join(',', array_unique($showfrndgellerarrid));
// Following Ids//
$showfrndgellerarrid2 = array();
$showfrndgelleryqueryy2 = mysql_query("select user_id from social_userfriends where friends_id = '".$wallid."' and userfriendsstatus ='1'");
while($showfrndgelleryqueryrowss2 = mysql_fetch_array($showfrndgelleryqueryy2,MYSQL_ASSOC)){
array_push($showfrndgellerarrid2,$showfrndgelleryqueryrowss2['user_id']);
}
$userfollowids = join(',', array_unique($showfrndgellerarrid2));
//
if($str_timestamp!='')
{
$strtimestamp="AND U.`date`>'".$str_timestamp."'";
}
else
{
$strtimestamp='';
}
if($social_userpost=='social_userpost'){
$sql_postids=mysql_query("SELECT `postid` FROM `hk_userposts` WHERE 1 AND ((`wallownerid`='$wallid') OR (`posteruserid` in($userfrndsids) AND `wallownerid` in($userfollowids)))");
$postids=array("0");
if(mysql_num_rows($sql_postids)>0)
{
while($res_pids=mysql_fetch_array($sql_postids,MYSQL_ASSOC))
{
array_push($postids,$res_pids['postid']);
}
}
}
else
{
$sql_postids=mysql_query("SELECT `postid` FROM `hk_posts` WHERE 1 AND `wallownerid`='$wallid' AND walltype='$social_userpost'");
$postids=array("0");
if(mysql_num_rows($sql_postids)>0)
{
while($res_pids=mysql_fetch_array($sql_postids,MYSQL_ASSOC))
{
array_push($postids,$res_pids['postid']);
}
}
}
$strpostids=implode(',',$postids);
$str_selectids="AND U.`postid` IN(".$strpostids.")";
$txtstr='';
$sql ="SELECT U.*,S.user_fullname,S.user_img,(select liked_status from hk_posts_vs_likes where socialpostid = U.postid and likeruserid = '".$_SESSION['userid']."') as poststatus FROM hk_posts as U left join social_userbasicinfo as S on U.posteruserid= S.user_id where 1 $str_selectids $strtimestamp order by U.`updated` desc limit 0, 10";
$query = mysql_query($sql);
if(mysql_num_rows($query)>0){
while($cdata=mysql_fetch_array($query,MYSQL_ASSOC)){
if($cdata['walltype']=='social_userpost')
{
if($cdata['posteruserid']!=$cdata['wallownerid']){
$wallownerquery=mysql_fetch_array(mysql_query("SELECT `user_id`,`user_fullname` FROM `social_userbasicinfo` WHERE `user_id`='".$cdata['wallownerid']."'"),MYSQL_ASSOC);
$cdata['wallowner_name']=$wallownerquery['user_fullname'];
$cdata['wallowner_link']=baseurl.'/social/'.trim('index.php'.'?f='.$wallownerquery['user_fullname'].'&m='.base64_encode($wallownerquery['user_id'].$wallownerquery['user_fullname']));
$wallmsg=" wrote on <i>".$cdata['wallowner_name']."'s</i> board";
}
else
{
$cdata['wallowner_name']='his own';
$cdata['wallowner_link']=trim($base_url.'index.php'.'?f='.$cdata['user_fullname'].'&m='.base64_encode($com_id.$cdata['user_fullname']));
$wallmsg = " wrote on his own board";
}
}
elseif($cdata['walltype']=='hk_sport_discussion_post')
{
$wallownerquery=mysql_fetch_array(mysql_query("SELECT hk_sport_discussion_category.`cat_id`, hk_sport_discussion_category.`cat_type`, hk_sport_discussion_category.`interst_id`, hk_sport_discussion_category.`cat_name` FROM `hk_sport_discussion_category` WHERE hk_sport_discussion_category.`cat_id`='".$cdata['wallownerid']."'"),MYSQL_ASSOC);
$cdata['wallowner_name']=$wallownerquery['cat_name'];
$widss=dashboard::encode($wallownerquery['cat_id']);
if($wallownerquery['cat_type']=='T')
{
$bards=' live match ';
}
else
{
$bards=' ';
}
$cdata['wallowner_link']=baseurl.'/social/sport_board1.php?'.$widss;
$wallmsg=" wrote on <i>".$cdata['wallowner_name']."</i>".$bards."board";
}
elseif($cdata['walltype']=='hk_event_vs_post')
{
$wallownerquery=mysql_fetch_array(mysql_query("SELECT hk_event.`id`, hk_event.`name` FROM `hk_event` WHERE hk_event.`id`='".$cdata['wallownerid']."'"),MYSQL_ASSOC);
$cdata['wallowner_name']=$wallownerquery['name'];
$widss=base64_encode($wallownerquery['id']);
$cdata['wallowner_link']=baseurl.'/social/event_detail.php?eventid='.$widss;
$wallmsg=" posted on <i>".$cdata['wallowner_name']."</i> event";
}
elseif($cdata['walltype']=='hk_finder_request_vs_post')
{
$wallownerquery=mysql_fetch_array(mysql_query("SELECT hk_finder_request.`id`, hk_finder_request.`looking_for` FROM `hk_finder_request` WHERE hk_finder_request.`id`='".$cdata['wallownerid']."'"),MYSQL_ASSOC);
$cdata['wallowner_name']=$wallownerquery['looking_for'];
$widss=base64_encode($wallownerquery['id']);
$cdata['wallowner_link']=baseurl.'/social/finder_detail.php?requestid='.$widss;
$wallmsg=" posted on <i>".$cdata['wallowner_name']."</i> finder request";
}
elseif($cdata['walltype']=='follow')
{
$wallownerquery=mysql_fetch_array(mysql_query("SELECT `user_id`,`user_fullname`,`user_img` FROM `social_userbasicinfo` WHERE `user_id`='".$cdata['wallownerid']."'"),MYSQL_ASSOC);
$cdata['wallowner_name']=$wallownerquery['user_fullname'];
$cdata['wallowner_img']=baseurl.'ProfileThumb/Thumb/'.$wallownerquery['user_img'];
$cdata['wallowner_link']=baseurl.'/social/'.trim('index.php'.'?f='.$wallownerquery['user_fullname'].'&m='.base64_encode($wallownerquery['user_id'].$wallownerquery['user_fullname']));
$wallmsg=" started following <i>".$cdata['wallowner_name']."</i>";
}
else
{
$wallmsg='';
}
$link = trim(baseurl.'social/index.php'.'?f='.$cdata['user_fullname'].'&m='.base64_encode($cdata['user_id'].$cdata['user_fullname'])); // PROFILE LINKS
$name = $cdata['user_fullname']; // NAME OF FRIENDS
$imag = baseurl.'social/ProfileThumb/Thumb/'.$cdata['user_img']; // FRIENDS IMAGE
$comment = $cdata['comments'];
$stripcomment = strip_tags($comment); //ASHISH
$numoflikes = $cdata['likes'];
$commenttime = $cdata['date'];
$postid = $cdata['postid'];
$page_url='index.php?post_id='.$postid;
$likestatus = $cdata['poststatus'];
$writerids=$cdata['posteruserid'];
//next two lines added by ashish
$url_share = 'http://www.365hops.com/social/dashboard.php?rpid='.$postid;
$url_title = "Post Title";
$fbcaption = "Caption goes Here";
$fbpicture = "http://www.365hops.com/social/images/logo.png";
$fbdescp = "Full Story description goes here. It could be something like what does the fox say ding ding ding ding ding";
$fbPost = "https://www.facebook.com/dialog/feed?app_id=267984193361306&display=popup&name=".urlencode($url_title)."&caption=".urlencode($fbcaption)."&description=".urlencode($fbdescp)."&picture=".urlencode($fbpicture)."&link=".urlencode($url_share)."&redirect_uri=http://www.365hops.com/social/closeFbpop.html";
$twitterPost = "http://twitter.com/home?status=".urlencode($url_title)."+".urlencode($url_share);
$googlePost = "https://plus.google.com/share?url=".urlencode($url_share);
if($likestatus==1){$classofthumb = 'icon-thumbs-down';}
elseif($likestatus==2){$classofthumb = 'icon-thumbs-up';}
else { $classofthumb = 'icon-thumbs-up'; }
$mtime = dashboard::ago($commenttime);
if($social_userpost=='hk_sport_discussion_post' || $social_userpost=='hk_event_vs_post'){
$wallmsg = '';
$str_not_sp='';
}
else
{
$str_not_sp='<div class="walltoken">'.$name.' '.$wallmsg.'</div>';
}
if($numoflikes>1)
{
$txt_like="likes";
}
else
{
$txt_like="like";
}
$txtstr.= $postid.'#$RAJ$#'.'<div class="messpaddtop kafemesscolor" id="postcontainerid_'.$postid.'" ><div class="kafe_conpadd">
<ul class="post-list">
<li class="post">'.$str_not_sp.'<div title="Remove" class="closePreview1 postDelete" onclick="opendelete_confirm('.$postid.','.$writerids.');return false;" ></div>
<div class="poster"><a href="'.$link.'"><img class="frnd" src="'.$imag.'"></a></div>
<div class="post-info">
<div class="post-details">
<div class="sponame"><a href="'.$link.'"><strong>'.$name.'</strong></a></div>
<div class="post-txt bg-blue">'.str_replace('\n','<br/>',$comment).'</div>
<div class="thumbs-up coarr" style="margin-top:5px;">
<a href="javascript:void(0)" onclick="postslikefunc('.$postid.','.$_SESSION['userid'].');return false;" title="THUMBS UP" class="thumbs-icon"><i id="Plikeicon_'.$postid.'" class="'.$classofthumb.'"></i></a>
<!--<a href="javascript:void(0)"onclick="postdeletefunc('.$postid.','.$_SESSION['userid'].');return false;" title="Delete" class="thumbs-icon"><i class="icon-thumbs-up"></i></a> -->
<a href="#post_liker_list" role="button" data-toggle="modal" class="like-numbr" onClick="return postlikerlistfunc('.$postid.');">
<i id="Plikecounttxt_'.$postid.'"><b>'.$numoflikes.'</b> '.$txt_like.'</i></a><input type="hidden" id="Plikecount_'.$postid.'" name="likescount" value="'.$numoflikes.'" /></div>
<div class="date-time datetop" style="margin-top:7px;">('.$mtime.') </div>
<div class="share-icons pull-right chorem" style="margin-top:5px;">
<a class="kafe_fb1" href='.$fbPost.' onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\'); return false;" title="Share on Facebook"><i class="icon icon-facebook-sign"></i></a>
<a class="kafe_tw1" href='.$twitterPost.' onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\'); return false;" title="Share on Twitter"><i class="icon icon-twitter-sign"></i></a>
<a class="kafe_g1" href='.$googlePost.' onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\'); return false;" title="Share on Google Plus"><i class="icon icon-google-plus-sign"></i></a>
</div>
<div class="clear"></div>
<ul class="comment-wrap" id="comment-wrap_ids_'.$postid.'">';
$commenter_profile_link='http://www.365hops.com/social/index.php'.'?f='.$_SESSION['username'].'&m='.base64_encode($session_userid.$_SESSION['username']);
$replydata = dashboard::getwallCommentdata_raj($postid);
foreach($replydata as $replyrow){
$replyid = $replyrow['replyid']; // reply row id
$replyer_id = $replyrow['userid']; // replyer user
$replyer_comments = $replyrow['comment']; // replyer comments
$reply_times = $replyrow['date']; // replyer comments time
$rmtime = dashboard::ago($reply_times); // time shown
$replyer_commentslikes = $replyrow['likes']; // replyer comments likes
$replyer_fullname = $replyrow['user_fullname']; // replyer full name
$replyer_img = 'ProfileThumb/Thumb/'.$replyrow['user_img']; // replyer image
$rlikestatus = $replyrow['replystatus'];
if($rlikestatus==1){$rclassofthumb = 'icon-thumbs-down';}
elseif($rlikestatus==2){$rclassofthumb = 'icon-thumbs-up';}
else { $rclassofthumb = 'icon-thumbs-up'; }
$rlink = trim($base_url.'index.php'.'?f='.$replyer_fullname.'&m='.base64_encode($replyer_id.$replyer_fullname)); // PROFILE LINKS
if($replyer_commentslikes>1)
{
$txt_like2="likes";
}
else
{
$txt_like2="like";
}
$txtstr.='<li class="comment" id="PostContID_'.$replyid.'">
<div title="Remove" class="closePreview1" onclick="opendelete_confirm_reply('.$replyid.','.$replyer_id.');return false;" ></div>
<div class="commenter-pic"><a href="'.$rlink.'"><img class="frnd" src="'.$replyer_img.'"></a></div>
<div class="comment-dtls">
<div class="sponame"><a href="'.$rlink.'"><strong>'.$replyer_fullname.'</a></strong></div>
<div class="comment-txt">'.str_replace('\n','<br/>',$replyer_comments).'</div>
<div class="thumbs-up">
<a href="javascript:void(0)" title="THUMBS UP" class="'.$rclassofthumb.'" id="Cbtnlikebtnid_'.$replyid.'" onclick="commentlikefunc('.$replyid.','.$session_userid.');"></a>
<!---<a href="javascript:void(0)" title="Delete" class="thumbs-icon" onclick="commentdeletefunc('.$replyid.','.$session_userid.');"><i class="icon-thumbs-up"></i></a>--->
<a href="#post_liker_list" role="button" data-toggle="modal" class="like-numbr coarr" id="Cbtnlikelistbtnid_'.$replyid.'" onClick="return commentlikerlistfunc('.$replyid.');">'.$replyer_commentslikes.' '.$txt_like2.'</a></div>
<input type="hidden" id="Clikecountss_'.$replyid.'" value="'.$replyer_commentslikes.'" />
<div class="date-time">('.$rmtime.') </div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</li>';
}
$txtstr.= '</ul></div>
</div>
<div class="clear"></div>
</li>
</ul>
</div>
<div class="textararea">
<ul>
<li class="comment my-own">
<div class="commenter-pic" id="commenterpicsid_'.$postid.'" ><img class="frnd" src="ProfileThumb/Thumb/'.$session_userimg.'"></div>
<div class="commentdtlscomm">
<div class="commenter-name" id="commenternameid_'.$postid.'">'.$_SESSION['username'].'</div>
<div class="comment-txtbottom">
<form method="post" action="">
<input type="hidden" id="commenterlinkid_'.$postid.'" value="'.$commenter_profile_link.'" />
<input type="hidden" id="ccat'.$postid.'" name="ccat" value="'.base64_encode($catid).'">
<textarea name="comment" class="comment rajcmntboxpostid" maxlength="200" id="ctextarea'.$postid.'"></textarea>
<!--<input type="submit" value=" Comment " class="btn-write btn btn-warning btn-mini comment_button button" id="'.$postid.'" />-->
<!--</form>-->
<div class="commiconnewenv">
<div class="sporcon">
<div class="posttt sporcon2"><input type="submit" value="Post" class="comment_button" id="'.$postid.'" /></div>
</div>
</div>
</form>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</li>
</ul>
</div>
<div class="clear"></div>
</div>';
//$html.= '<div class="clear"></div>';
}
$result2=$txtstr;
}
else
{
$result2='';
}
//
/********************* Raj ******/ // Post Ends//
if(count($postid_array)>0){
for($i=0;$i<count($postid_array);$i++){
$postid=$postid_array[$i]; //PostId
$postlikeno=$postlikes_array[$i]; // Number Of Likes on Post
$str.=$postid;
// Checking FOr Updated Likes//
$RESPlikes=mysql_fetch_array(mysql_query("SELECT `likes`,updated,updated2 FROM `hk_posts` WHERE `postid`='".$postid."'"));
if($RESPlikes['likes']==$postlikeno)
{
$plikes='';
}
else
{
$plikes=$RESPlikes['likes'];
}
$str.='#RAJ#'.$plikes;
$strcmntlikes='';
$commentss='';
if($RESPlikes['updated2']>$timestamp)
{
$sqlcomment=mysql_query("SELECT U.*,S.user_fullname,S.user_img,(select liked_status from hk_comments_vs_likes where socialreplyid = U.replyid and likeruserid = '".$_SESSION['userid']."' ) as replystatus FROM hk_comments AS U INNER JOIN social_userbasicinfo AS S ON U.userid = S.user_id where `postid`='".$postid."' and replystatus = '1' order by replyid asc");
if(mysql_num_rows($sqlcomment)>0)
{
while($replyrow=mysql_fetch_array($sqlcomment,MYSQL_ASSOC))
{
$strcmntlikes.=$replyrow['replyid'].'_'.$replyrow['likes'].'CL';
if($replyrow['date']>$timestamp)
{
$session_userid = $_SESSION['userid'];
$replyid = $replyrow['replyid']; // reply row id
$replyer_id = $replyrow['userid']; // replyer user
$replyer_comments = $replyrow['comment']; // replyer comments
$reply_times = $replyrow['date']; // replyer comments time
$rmtime = dashboard::ago($reply_times); // time shown
$replyer_commentslikes = $replyrow['likes']; // replyer comments likes
$replyer_fullname = $replyrow['user_fullname']; // replyer full name
$replyer_img = 'ProfileThumb/Thumb/'.$replyrow['user_img']; // replyer image
$rlikestatus = $replyrow['replystatus'];
if($rlikestatus==1){$rclassofthumb = 'icon-thumbs-down';}
elseif($rlikestatus==2){$rclassofthumb = 'icon-thumbs-up';}
else { $rclassofthumb = 'icon-thumbs-up'; }
$rlink = trim($base_url.'index.php'.'?f='.$replyer_fullname.'&m='.base64_encode($replyer_id.$replyer_fullname)); // PROFILE LINKS
if($replyer_commentslikes>1)
{
$txt_like2="likes";
}
else
{
$txt_like2="like";
}
$commentss.=$replyid.'_LI@CID_'.'<li class="comment" id="PostCommentID_'.$replyid.'">
<div title="Remove" class="closePreview1" onclick="opendelete_confirm_reply('.$replyid.','.$replyer_id.');return false;" ></div>
<div class="commenter-pic"><a href="'.$rlink.'"><img class="frnd" src="'.$replyer_img.'"></a></div>
<div class="comment-dtls">
<div class="sponame"><a href="'.$rlink.'"><strong>'.$replyer_fullname.'</a></strong></div>
<div class="comment-txt">'.str_replace('\n','<br/>',$replyer_comments).'</div>
<div class="thumbs-up">
<a href="javascript:void(0)" title="THUMBS UP" class="'.$rclassofthumb.'" id="Cbtnlikebtnid_'.$replyid.'" onclick="commentlikefunc('.$replyid.','.$session_userid.');"></a>
<a href="#post_liker_list" role="button" data-toggle="modal" class="like-numbr coarr" id="Cbtnlikelistbtnid_'.$replyid.'" onClick="return commentlikerlistfunc('.$replyid.');">'.$replyer_commentslikes.' '.$txt_like2.'</a></div>
<input type="hidden" id="Clikecountss_'.$replyid.'" value="'.$replyer_commentslikes.'" />
<div class="date-time">('.$rmtime.') </div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</li>@RAJCOMMENT@';
}
}
$strcmntlikes=substr($strcmntlikes,0,-2);
$commentss=substr($commentss,0,-12);
}
}
elseif($RESPlikes['updated']>$timestamp)
{
$sqlcomment2=mysql_query("SELECT U.*,S.user_fullname,S.user_img,(select liked_status from hk_comments_vs_likes where socialreplyid = U.replyid and likeruserid = '".$_SESSION['userid']."') as replystatus FROM hk_comments AS U RIGHT JOIN social_userbasicinfo AS S ON U.userid = S.user_id where `postid`='".$postid."' and date>'".$timestamp."' and replystatus = '1' order by replyid asc");
if(count($sqlcomment2)>0)
{
while($replyrow=mysql_fetch_array($sqlcomment2,MYSQL_ASSOC))
{
$session_userid = $_SESSION['userid'];
$replyid = $replyrow['replyid']; // reply row id
$replyer_id = $replyrow['userid']; // replyer user
$replyer_comments = $replyrow['comment']; // replyer comments
$reply_times = $replyrow['date']; // replyer comments time
$rmtime = dashboard::ago($reply_times); // time shown
$replyer_commentslikes = $replyrow['likes']; // replyer comments likes
$replyer_fullname = $replyrow['user_fullname']; // replyer full name
$replyer_img = 'ProfileThumb/Thumb/'.$replyrow['user_img']; // replyer image
$rlikestatus = $replyrow['replystatus'];
if($rlikestatus==1){$rclassofthumb = 'icon-thumbs-down';}
elseif($rlikestatus==2){$rclassofthumb = 'icon-thumbs-up';}
else { $rclassofthumb = 'icon-thumbs-up'; }
$rlink = trim($base_url.'index.php'.'?f='.$replyer_fullname.'&m='.base64_encode($replyer_id.$replyer_fullname)); // PROFILE LINKS
if($replyer_commentslikes>1)
{
$txt_like2="likes";
}
else
{
$txt_like2="like";
}
$commentss.=$replyid.'_LI@CID_'.'<li class="comment" id="PostCommentID_'.$replyid.'">
<div title="Remove" class="closePreview1" onclick="opendelete_confirm_reply('.$replyid.','.$replyer_id.');return false;" ></div>
<div class="commenter-pic"><a href="'.$rlink.'"><img class="frnd" src="'.$replyer_img.'"></a></div>
<div class="comment-dtls">
<div class="sponame"><a href="'.$rlink.'"><strong>'.$replyer_fullname.'</a></strong></div>
<div class="comment-txt">'.str_replace('\n','<br/>',$replyer_comments).'</div>
<div class="thumbs-up">
<a href="javascript:void(0)" title="THUMBS UP" class="'.$rclassofthumb.'" id="Cbtnlikebtnid_'.$replyid.'" onclick="commentlikefunc('.$replyid.','.$session_userid.');"></a>
<a href="#post_liker_list" role="button" data-toggle="modal" class="like-numbr coarr" id="Cbtnlikelistbtnid_'.$replyid.'" onClick="return commentlikerlistfunc('.$replyid.');">'.$replyer_commentslikes.' '.$txt_like2.'</a></div>
<input type="hidden" id="Clikecountss_'.$replyid.'" value="'.$replyer_commentslikes.'" />
<div class="date-time">('.$rmtime.') </div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</li>@RAJCOMMENT@';
}
$commentss=substr($commentss,0,-12);
}
}
else
{
$strcmntlikes='';
$commentss='';
}
$str.='#RAJ#'.$commentss.'#RAJ#'.$strcmntlikes.'@RAJ@';
} // End Of For Loop
$result=substr($str,0,-5);
} // End Of If
print($result.'***RAJ***'.$result2);
}
// ******************/
?>
,