Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

Anna University TNEA 2018 Rank List Published. Login to know your Rank.
Anna University April May 2018 Exam Results
Anna University Latest News , Updates and Announcements
>>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE
>>> Anna University Study Materials for all Departments
>>> Anna University Question Papers : April May June 2015 Question Papers | Nov Dec 2014 and Jan 2015 Question Papers

Register or Login to Submit Study Materials , Shoutbox and also to access Many Features !!

Vidyarthiplus Shop :: Handwritten Premium Lecture Notes
Share your Study Materials with us
Share your Study Materials with us : Click Here

PHP I NEED HELP N ULOKI SCRIPT
#1


HOW TO MAKE ADD FREND FUNCTION??

SLEDY CREATE IT AND WORK FINE ..
I JUST GOT SOME PROBLEM IN PROFILE ...

TO SHOW
ADD AS BUDDY
DELETE AS BUDDY
REQUEST SENT..

I DONT KNOW HOW TO MSKE IT ...



..
THIS CODE NOT WORK IN PROFILE

FUNCTION

PHP Code:
function budres($u$w){
//3 = can't bud
//2 = already buds
//1 = request pended
//0 = can bud
if($u==$w){
return 
3;
}
if(
arebuds($u$w)){
return 
2;
}
$req mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE ((user='".$u."' AND who='".$w."') OR (user='".$w."' AND who='".$u."')) AND agreed='0'"));
if(
$req[0]>0){
return 
1;
}
$notb mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE (user='".$w."' OR who='".$w."') AND agreed='1'"));
if(
$notb[0]>=300){
return 
3;
}
$notb mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM buddies WHERE (user='".$u."' OR who='".$u."') AND agreed='1'"));
if(
$notb[0]>=300){
return 
3;
}
return 
0;


CALLED IN PROFILE.PHP

PHP Code:
if(budres($u$w)==0){
echo 
"<a href=\"$path?asp=profile&amp;w=$w&amp;do=1\">Add as Friend</a><br />";
}else if(
budres($u$w)==1){
echo 
"Request sent<br />";
}else if(
budres($u$w)==2){
echo 
"<a href=\"$path?asp=profile&amp;w=$w&amp;do=2\">Delete Friend</a><br />";



any other way??
pliss help me




Possibly Related Threads...
Thread Author Replies Views Last Post
  [PHP] help mee to fix uloki usercp.php xss bug Pavel 0 804 16-02-2015, 07:15 AM
Last Post: Pavel
  [PHP] Uloki Modified forum script Version 2.1 Srini 16 10,001 28-09-2013, 09:46 PM
Last Post: Srini
  GPA Calculator Java Script for Blog and Website Srini 0 1,335 17-06-2012, 09:38 AM
Last Post: Srini
Reply

Subscribe


Recommend on Google



Vidyarthiplus Whatsapp