Example #1
0
                    // $type = 'profile-timeline';


//$mno = 1016;

//echo "mno - " . $mno;



    echo " <div id='fs-general-ajax-response' style='color:#fff;position:fixed;background-color:#000;z-index:200;display:none' >  ";
      // $mc->unlink_profile_pics( $mno );
      echo "Type = " .  $type . '<br>';
      switch ( $type ) {
        case 'new-member-fb-login':  
                echo " new member fb login <br> ";
                $mppno = $mc ->member_profile_pic_query( array('mno'=>$mno  , 'type'=>'get-latest-mppno' ) ); 
                unset($_SESSION['type']);
            break;  
        case 'profile-timeline': 
                echo " time lime <br>"; 
                move_uploaded_file($_FILES["file"]["tmp_name"], "$mc->profileTimeline_original/$mno.jpg");   
  
                #get width and height of the image 

                    # load image and get height and width
                        $ri->load("$mc->profileTimeline_original/$mno.jpg");   
                        $img_height = $ri->getHeight();  
                        $img_width  = $ri->getWidth();      
                        echo " height $img_height width $img_width ";

									$mc->update_logging_in_fb_friends( $mno1 , $fb_friends['fb_all_freinds'] , $fb_friends['fb_freinds_on_fs'] , $fb_friends['fb_freinds_on_fb'] ); 
								
								// retrieve big profile pic of the new user
									echo " big profile pic <br> ";
								  	$size = 'large';
	                                $url = "http://graph.facebook.com/$fbid/picture?type=$size"; 
	                                $headers = get_headers($url, 1); 
	                                if( isset($headers['Location']) ){  
	                                    $bigpicurl = $headers['Location']; // string
	                                }else{
	                                    echo "ERROR";
	                                }   
	                                echo "profile pic path src. $bigpicurl <br>";
	                                echo "<img src=\"$bigpicurl\"  />";    
	                            // add new profile pic for the new user
	                            	$mppno = $mc->member_profile_pic_query( array('mno'=>$mno1 , 'action'=> 'Joined' , 'type'=>'insert-new-profile-pic-db' ) );   
	                            // download from fb photo server 
										$article->download_image_from_other_site( $mno1 , $bigpicurl , 'fs_folders/images/uploads/members/mem_original/' );   
	                            // resize the profile pic downloaded  
	                            	$mc->resize_profile_pic_thumbnail_and_profile( $mno1 , $mppno );    
	                            // add activity post feed  
	                            	#$mc->add_activity_wall_post ( $mno1 , $mppno , 'Joined' , 'fs_members' , $mc->date_time );    
	                            // send confirmation code 
	                            	if ( !empty($email) ) {
	                            		if ( $mc->send_verification_code_to_email( $email , $mc->generate_vefirification_code( $email ) , $firstname )  ) { 
	                            			echo " email confirmation successfully sent. . .";
	                            		} 
	                            	}   
	                            // set notification 
	                            		//$mc->set_notification_info( 'fs_members' , $mno1 , "your facebook friend Just <span class='fs-text-red'> joined </span>"  , $mno1 , 0 , 'join-fb' ); 
	                            		$mc->set_notification_info( 'fs_members' ,  $mno1 , 'joined' , null , null , 0 , 'join-fb' );