= mysql_query("SELECT * FROM fb_plan WHERE userid IN(".$final_str.") and city like '%".$city."%'");
$numres = mysql_num_rows($from_fbplan);
if(!isset($_GET['s']))
$s = 0;
else
$s = $_GET["s"];
$perpage = 4;
if(($s=="")or($s>=$numres)or($s<0)or($s==0))
{
$s = 0;
}
//$facebook_frnd = $facebook->api_client->fql_query("SELECT hometown_location,current_location,uid,first_name,pic FROM user WHERE uid IN(".$final_str.") limit ".$s.",".$perpage."");
$from_fbplan1 = mysql_query("SELECT * FROM fb_plan WHERE userid IN(".$final_str.") and city like '%".$city."%' group by userid limit ".$s.",".$perpage);
$numres1 = mysql_num_rows($from_fbplan1);
$msg = "";
// For adding event modified 24th december
if (isset($_POST["country"]))
{
$errmsg = "";
$from_date = $_POST["year"]."-".$_POST["month"]."-".$_POST["day"];
$to_date = $_POST["tyear"]."-".$_POST["tmonth"]."-".$_POST["tday"];
if (isset($_POST["year"]))
$diff = dateDiff("-", $to_date, $from_date);
//$diff = 0;
/*
if ($_POST["country"]=="")
$errmsg .= "Select the country";
if ($_POST["regi"]=="")
$errmsg .= "Select the region";
if ($_POST["city1"]=="")
$errmsg .= "Enter the city"; */
If(!checkdate($_POST["month"],$_POST["day"],$_POST["year"]))
$errmsg .= "Invalid From date";
If(!checkdate($_POST["tmonth"],$_POST["tday"],$_POST["tyear"]))
$errmsg .= "Invalid To date";
if ($diff <0 )
$errmsg .= "To date is smaller than From date";
if ($errmsg!='')
{
$errmsg = "";
}
else
{
$countryy = explode(",",$_POST["country"]);
$country_val = $countryy[1];
// echo " asdfsas".$_GET["m"]." ";
$insert_event = "insert into fb_plan set userid='".$user_id."',city ='".addslashes($_POST["city1"])."',country ='".addslashes($country_val)."',region ='".addslashes($_POST["regi"])."',dt_from='".$from_date."',dt_to ='".$to_date."',description='".addslashes($_POST["desc"])."',reg_date=now()";
$insert_sql = mysql_query($insert_event);
}
}
/////////// modified 24 th december
// For edit the event
if(isset($_GET["id"]))
{
$select_event = "select plan_id,userid,description,city,country,date_format(dt_from,'%Y-%m-%d')as frd,date_format(dt_to,'%Y-%m-%d')as tod from fb_plan where plan_id='".$_GET["id"]."'";
$select_sqls = mysql_query($select_event);
$select_resu = mysql_fetch_array($select_sqls);
$fdate = explode("-",$select_resu["frd"]);
$tdate = explode("-",$select_resu["tod"]);
}
else
{
$fdate[0] = date('Y');$fdate[2] = date('d');$fdate[1] = date('m');
$tdate[0] = date('Y');$tdate[2] = date('d');$tdate[1] = date('m');
}
// Edit end
// For delete the event
if(isset($_GET["did"]))
{
$del_event = "delete from fb_plan where plan_id='".$_GET["did"]."'";
$del_sql = mysql_query($del_event);
}
// Edit end
// end
if (!isset($_GET["fu"]))
{
?>
'".$current_date."'";
//echo $select_plans;
$select_sql = mysql_query($select_plans);
$num_future_plan = mysql_num_rows($select_sql);
$select_frndplans = "select plan_id,userid,description,city,country,date_format(dt_from,'%m-%d-%Y')as frd,date_format(dt_to,'%m-%d-%Y')as tod from fb_plan where userid!='".$user_id."' and date_format(dt_from,'%Y-%m-%d')>'".$current_date."' and city like '%".$city."%'";
// echo $select_frndplans;
$select_fsql = mysql_query($select_frndplans);
$num_frnd_future_plan = mysql_num_rows($select_fsql);
?>
|
|
|
|
EVENT INFORMATION |
|
|
|
0) {?>
|
FUTURE WHEREABOUTS : |
|
while ($select_res =mysql_fetch_array($select_sql))
{?>
|
|
|
0) { ?>
|
FRIENDS SOON IN : |
|
while ($select_fres =mysql_fetch_array($select_fsql))
{
$facebook_fusers = $facebook->api_client->fql_query('SELECT hometown_location,current_location,first_name,pic FROM user WHERE uid='.$select_fres["userid"]);?>
- ( ) ( ".$facebook_fusers[0]["first_name"]."";?> coming to )
|
|
|
|
echo " ";
//echo "| ".$facebook_users[0]['first_name']." has ".$numres." friends in ".$city." ";
echo " | | ";
//for($i=0;$i<$numres1;$i++)
echo "";
$i=0;
while ($result = mysql_fetch_array($from_fbplan1))
{
$execute_per_userid = $facebook->api_client->fql_query("SELECT hometown_location,current_location,uid,first_name,pic FROM user WHERE uid='".$result["userid"]."'");
echo "";
echo "";
if ($execute_per_userid[0]['pic']!='')
echo " | ";
else
echo " | ";
echo "
| Name | : | ".$execute_per_userid[0]['first_name']." | ";
echo "| Location | : | ".$result["city"]." | ";
echo "| Send Message | ";
echo "
| ";
echo " | ";
//echo "";
$i++;
if ($i%2==0)
{
// echo " | ";
echo " ";
}
}
echo "";
//echo "| | ";
echo " ";?>
|
|
=$numres)or($s<0)or($s==0))
{
$s = 0;
}
$friends = $facebook->api_client->friends_getAppUsers();
$friends = array_slice($friends, 0, 25);
foreach ($friends as $friend) {
//echo " $friend";
$fr_str .= "'".$friend."',";
}
$final_str = substr($fr_str,0,strlen($fr_str)-1);
$from_fbplan1 = mysql_query("SELECT plan_id,userid,description,city,country,date_format(dt_from,'%m-%d-%Y')as frd,date_format(dt_to,'%m-%d-%Y')as tod FROM fb_plan WHERE userid IN(".$final_str.") and city like '%".$city."%' group by userid limit ".$s.",".$perpage);
$numres1 = mysql_num_rows($from_fbplan1);
?>
='".$today_date."'";
$select_sql = mysql_query($select_plans);
// Future plans
$select_fplans = "select * from fb_plan where userid='".$user_id."' and date_format(dt_from,'%Y-%m-%d')>'".$today_date."'";
$select_fsql = mysql_query($select_fplans);
$facebook_user = $facebook->api_client->fql_query('SELECT hometown_location,current_location,first_name,pic FROM user WHERE uid='.$user_id);
$fbml .= "
| ";
/* if ($facebook_user[0]["pic"]!='')
$fbml .= "".$facebook_user[0]["pic"]." | ";
else
$fbml .= "888 | ";
*/
$numofplans = mysql_num_rows($select_sql);
$numof_fu_plans = mysql_num_rows($select_fsql);
//echo $select_fplans;
//echo "CCC ".$numof_fu_plans;
if($numofplans>0)
{
$select_res = mysql_fetch_array($select_sql);
//$fbml .= " | Set ! Where I am! | ";
//$fbml .= " | ";
$fbml .= "".$facebook_user[0]["first_name"]." is in ".$select_res["city"]." | ";
$fbml .= " | ";
$fbml .= "| Click to set Where I am... | ";
$fbml .= " | ";
}
else
{
//if ($facebook_user[0]["current_location"]
$city = "home town";
//$fbml .= "".$facebook_user[0]["first_name"]." is in ".$city." | ";
//$fbml .= " | ";
$fbml .= "| Set ! Where I am! | ";
$fbml .= " | ";
$fbml .= "| Click to set Where I am... | ";
$fbml .= " | ";
}
/*
if ($numof_fu_plans > 0)
{
$fbml .= "| Future Trips : | ";
$fbml .= "
";
while ( $res = mysql_fetch_array($select_fsql)){
$fbml .= "- ( ".$res["dt_from"]." - ".$res["dt_to"]." ) - ".$res["desc"]."
";
}
$fbml .="
|
|
";
}
*/
$fbml .= " ";
// Greet the currently logged-in user!
//echo "Hello, ! ";
/*$fbml = << $user_id
EndHereDoc; */
//$fbml = "".$user_id."";
//echo "the following form was added to the profile box: ";
$facebook->api_client->profile_setFBML($fbml, $user);
//echo $fbml;
?>
скачать порно
порно | | |