Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/event.php.tar

home/lmsyaran/public_html/j3/libraries/joomla/facebook/event.php000064400000040444151156710540021013
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API User class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/event/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookEvent extends JFacebookObject
{
	/**
	 * Method to get information about an event visible to the current user.
Requires authentication.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getEvent($event)
	{
		return $this->get($event);
	}

	/**
	 * Method to get the event's wall. Requires authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a link on event's feed which the current_user is or
maybe attending. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($event, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on event's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($event, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;
		$data['link'] = $link;
		$data['name'] = $name;
		$data['caption'] = $caption;
		$data['description'] = $description;
		$data['actions'] = $actions;
		$data['picture'] = $picture;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
event's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($event, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}

	/**
	 * Method to get the list of invitees for the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getInvited($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'invited', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is invited to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isInvited($event, $user)
	{
		return $this->getConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to invite users to the event. Requires authentication and
create_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $users  Comma separated list of user ids.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createInvite($event, $users)
	{
		// Set POST request parameters.
		$data = array();
		$data['users'] = $users;

		return $this->createConnection($event, 'invited', $data);
	}

	/**
	 * Method to delete an invitation. Note: you can only delete the invite if
the current user is the event admin.
	 * Requires authentication and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $user   The user id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteInvite($event, $user)
	{
		return $this->deleteConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to get the list of attending users. Requires authentication and
user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAttending($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'attending',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user is attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isAttending($event, $user)
	{
		return $this->getConnection($event, 'attending/' . $user);
	}

	/**
	 * Method to set the current user as attending. Requires authentication
and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createAttending($event)
	{
		return $this->createConnection($event, 'attending');
	}

	/**
	 * Method to get the list of maybe attending users. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMaybe($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'maybe', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is maybe attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isMaybe($event, $user)
	{
		return $this->getConnection($event, 'maybe/' . $user);
	}

	/**
	 * Method to set the current user as maybe attending. Requires
authentication and rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createMaybe($event)
	{
		return $this->createConnection($event, 'maybe');
	}

	/**
	 * Method to get the list of users which declined the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDeclined($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'declined',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user responded 'no' to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isDeclined($event, $user)
	{
		return $this->getConnection($event, 'declined/' . $user);
	}

	/**
	 * Method to set the current user as declined. Requires authentication and
rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createDeclined($event)
	{
		return $this->createConnection($event, 'declined');
	}

	/**
	 * Method to get the list of users which have not replied to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNoreply($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'noreply', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user has not replied to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isNoreply($event, $user)
	{
		return $this->getConnection($event, 'noreply/' . $user);
	}

	/**
	 * Method to get the event's profile picture. Requires authentication
and user_events or friends_events permission.
	 *
	 * @param   string   $event     The event id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 * @param   string   $type      To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the event's profile picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($event, $redirect = true, $type = null)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		if ($type)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?type=' . $type : '&type=' . $type;
		}

		return $this->getConnection($event, 'picture',
$extra_fields);
	}

	/**
	 * Method to get photos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a photo on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $source   Path to photo.
	 * @param   string  $message  Photo description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($event, $source, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($event, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get videos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'videos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a video on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $source       Path to photo.
	 * @param   string  $title        Video title.
	 * @param   string  $description  Video description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createVideo($event, $source, $title = null, $description =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($title)
		{
			$data['title'] = $title;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		return $this->createConnection($event, 'videos', $data,
array('Content-Type' => 'multipart/form-data'));
	}
}
home/lmsyaran/public_html/libraries/fof/utils/observable/event.php000064400000003631151157450100021472
0ustar00<?php
/**
 * @package     FrameworkOnFramework
 * @subpackage  utils
 * @copyright   Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba
Ltd. All rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('FOF_INCLUDED') or die;

/**
 * Defines an observable event.
 *
 * This class is based on JEvent as found in Joomla! 3.2.0
 */
abstract class FOFUtilsObservableEvent extends FOFUtilsObject
{
    /**
     * Event object to observe.
     *
     * @var    object
     */
    protected $_subject = null;

    /**
     * Constructor
     *
     * @param   object  &$subject  The object to observe.
     */
    public function __construct(&$subject)
    {
        // Register the observer ($this) so we can be notified
        $subject->attach($this);

        // Set the subject to observe
        $this->_subject = &$subject;
    }

    /**
     * Method to trigger events.
     * The method first generates the even from the argument array. Then it
unsets the argument
     * since the argument has no bearing on the event handler.
     * If the method exists it is called and returns its return value. If
it does not exist it
     * returns null.
     *
     * @param   array  &$args  Arguments
     *
     * @return  mixed  Routine return value
     */
    public function update(&$args)
    {
        // First let's get the event from the argument array.  Next we
will unset the
        // event argument as it has no bearing on the method to handle the
event.
        $event = $args['event'];
        unset($args['event']);

        /*
         * If the method to handle an event exists, call it and return its
return
         * value.  If it does not exist, return null.
         */
        if (method_exists($this, $event))
        {
            return call_user_func_array(array($this, $event), $args);
        }
        else
        {
            return null;
        }
    }
}
home/lmsyaran/public_html/j3/libraries/joomla/event/event.php000064400000003356151157653140020367
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Event
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * JEvent Class
 *
 * @since       1.5
 * @deprecated  4.0  The CMS' Event classes will be replaced with the
`joomla/event` package
 */
abstract class JEvent extends JObject
{
	/**
	 * Event object to observe.
	 *
	 * @var    object
	 * @since  2.5
	 */
	protected $_subject = null;

	/**
	 * Constructor
	 *
	 * @param   object  &$subject  The object to observe.
	 *
	 * @since   2.5
	 */
	public function __construct(&$subject)
	{
		// Register the observer ($this) so we can be notified
		$subject->attach($this);

		// Set the subject to observe
		$this->_subject = &$subject;
	}

	/**
	 * Method to trigger events.
	 * The method first generates the even from the argument array. Then it
unsets the argument
	 * since the argument has no bearing on the event handler.
	 * If the method exists it is called and returns its return value. If it
does not exist it
	 * returns null.
	 *
	 * @param   array  &$args  Arguments
	 *
	 * @return  mixed  Routine return value
	 *
	 * @since   1.5
	 */
	public function update(&$args)
	{
		// First let's get the event from the argument array.  Next we will
unset the
		// event argument as it has no bearing on the method to handle the event.
		$event = $args['event'];
		unset($args['event']);

		/*
		 * If the method to handle an event exists, call it and return its return
		 * value.  If it does not exist, return null.
		 */
		if (method_exists($this, $event))
		{
			return call_user_func_array(array($this, $event), array_values($args));
		}
	}
}
home/lmsyaran/public_html/j3/htaccess.back/joomla/facebook/event.php000064400000040444151160071270021526
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API User class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/event/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookEvent extends JFacebookObject
{
	/**
	 * Method to get information about an event visible to the current user.
Requires authentication.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getEvent($event)
	{
		return $this->get($event);
	}

	/**
	 * Method to get the event's wall. Requires authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a link on event's feed which the current_user is or
maybe attending. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($event, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on event's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($event, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;
		$data['link'] = $link;
		$data['name'] = $name;
		$data['caption'] = $caption;
		$data['description'] = $description;
		$data['actions'] = $actions;
		$data['picture'] = $picture;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
event's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($event, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}

	/**
	 * Method to get the list of invitees for the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getInvited($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'invited', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is invited to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isInvited($event, $user)
	{
		return $this->getConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to invite users to the event. Requires authentication and
create_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $users  Comma separated list of user ids.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createInvite($event, $users)
	{
		// Set POST request parameters.
		$data = array();
		$data['users'] = $users;

		return $this->createConnection($event, 'invited', $data);
	}

	/**
	 * Method to delete an invitation. Note: you can only delete the invite if
the current user is the event admin.
	 * Requires authentication and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $user   The user id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteInvite($event, $user)
	{
		return $this->deleteConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to get the list of attending users. Requires authentication and
user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAttending($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'attending',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user is attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isAttending($event, $user)
	{
		return $this->getConnection($event, 'attending/' . $user);
	}

	/**
	 * Method to set the current user as attending. Requires authentication
and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createAttending($event)
	{
		return $this->createConnection($event, 'attending');
	}

	/**
	 * Method to get the list of maybe attending users. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMaybe($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'maybe', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is maybe attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isMaybe($event, $user)
	{
		return $this->getConnection($event, 'maybe/' . $user);
	}

	/**
	 * Method to set the current user as maybe attending. Requires
authentication and rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createMaybe($event)
	{
		return $this->createConnection($event, 'maybe');
	}

	/**
	 * Method to get the list of users which declined the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDeclined($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'declined',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user responded 'no' to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isDeclined($event, $user)
	{
		return $this->getConnection($event, 'declined/' . $user);
	}

	/**
	 * Method to set the current user as declined. Requires authentication and
rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createDeclined($event)
	{
		return $this->createConnection($event, 'declined');
	}

	/**
	 * Method to get the list of users which have not replied to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNoreply($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'noreply', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user has not replied to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isNoreply($event, $user)
	{
		return $this->getConnection($event, 'noreply/' . $user);
	}

	/**
	 * Method to get the event's profile picture. Requires authentication
and user_events or friends_events permission.
	 *
	 * @param   string   $event     The event id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 * @param   string   $type      To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the event's profile picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($event, $redirect = true, $type = null)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		if ($type)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?type=' . $type : '&type=' . $type;
		}

		return $this->getConnection($event, 'picture',
$extra_fields);
	}

	/**
	 * Method to get photos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a photo on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $source   Path to photo.
	 * @param   string  $message  Photo description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($event, $source, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($event, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get videos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'videos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a video on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $source       Path to photo.
	 * @param   string  $title        Video title.
	 * @param   string  $description  Video description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createVideo($event, $source, $title = null, $description =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($title)
		{
			$data['title'] = $title;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		return $this->createConnection($event, 'videos', $data,
array('Content-Type' => 'multipart/form-data'));
	}
}
home/lmsyaran/public_html/libraries/joomla/facebook/event.php000064400000040444151160174520020474
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API User class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/event/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookEvent extends JFacebookObject
{
	/**
	 * Method to get information about an event visible to the current user.
Requires authentication.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getEvent($event)
	{
		return $this->get($event);
	}

	/**
	 * Method to get the event's wall. Requires authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a link on event's feed which the current_user is or
maybe attending. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($event, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication and publish_stream
permission.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on event's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($event, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;
		$data['link'] = $link;
		$data['name'] = $name;
		$data['caption'] = $caption;
		$data['description'] = $description;
		$data['actions'] = $actions;
		$data['picture'] = $picture;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
event's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($event, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($event, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the post if it was
created by the current user.
	 * Requires authentication and publish_stream permission.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}

	/**
	 * Method to get the list of invitees for the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getInvited($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'invited', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is invited to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isInvited($event, $user)
	{
		return $this->getConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to invite users to the event. Requires authentication and
create_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $users  Comma separated list of user ids.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createInvite($event, $users)
	{
		// Set POST request parameters.
		$data = array();
		$data['users'] = $users;

		return $this->createConnection($event, 'invited', $data);
	}

	/**
	 * Method to delete an invitation. Note: you can only delete the invite if
the current user is the event admin.
	 * Requires authentication and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   string  $user   The user id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteInvite($event, $user)
	{
		return $this->deleteConnection($event, 'invited/' . $user);
	}

	/**
	 * Method to get the list of attending users. Requires authentication and
user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getAttending($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'attending',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user is attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isAttending($event, $user)
	{
		return $this->getConnection($event, 'attending/' . $user);
	}

	/**
	 * Method to set the current user as attending. Requires authentication
and rsvp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createAttending($event)
	{
		return $this->createConnection($event, 'attending');
	}

	/**
	 * Method to get the list of maybe attending users. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMaybe($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'maybe', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user is maybe attending an event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isMaybe($event, $user)
	{
		return $this->getConnection($event, 'maybe/' . $user);
	}

	/**
	 * Method to set the current user as maybe attending. Requires
authentication and rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createMaybe($event)
	{
		return $this->createConnection($event, 'maybe');
	}

	/**
	 * Method to get the list of users which declined the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDeclined($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'declined',
'', $limit, $offset);
	}

	/**
	 * Method to check if a user responded 'no' to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isDeclined($event, $user)
	{
		return $this->getConnection($event, 'declined/' . $user);
	}

	/**
	 * Method to set the current user as declined. Requires authentication and
rscp_event permission.
	 *
	 * @param   string  $event  The event id.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function createDeclined($event)
	{
		return $this->createConnection($event, 'declined');
	}

	/**
	 * Method to get the list of users which have not replied to the event.
Requires authentication and user_events or friends_events permission.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getNoreply($event, $limit = 0, $offset = 0)
	{
		return $this->getConnection($event, 'noreply', '',
$limit, $offset);
	}

	/**
	 * Method to check if a user has not replied to the event. Requires
authentication and user_events or friends_events permission.
	 *
	 * @param   string  $event  The event id.
	 * @param   mixed   $user   Either an integer containing the user ID or a
string containing the username.
	 *
	 * @return  array   The decoded JSON response or an empty array if the
user is not invited.
	 *
	 * @since   3.2.0
	 */
	public function isNoreply($event, $user)
	{
		return $this->getConnection($event, 'noreply/' . $user);
	}

	/**
	 * Method to get the event's profile picture. Requires authentication
and user_events or friends_events permission.
	 *
	 * @param   string   $event     The event id.
	 * @param   boolean  $redirect  If false this will return the URL of the
picture without a 302 redirect.
	 * @param   string   $type      To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the event's profile picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($event, $redirect = true, $type = null)
	{
		$extra_fields = '';

		if ($redirect == false)
		{
			$extra_fields = '?redirect=false';
		}

		if ($type)
		{
			$extra_fields .= (strpos($extra_fields, '?') === false) ?
'?type=' . $type : '&type=' . $type;
		}

		return $this->getConnection($event, 'picture',
$extra_fields);
	}

	/**
	 * Method to get photos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getPhotos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'photos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a photo on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event    The event id.
	 * @param   string  $source   Path to photo.
	 * @param   string  $message  Photo description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPhoto($event, $source, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($event, 'photos', $data,
array('Content-Type' => 'multipart/form-data'));
	}

	/**
	 * Method to get videos published on event's wall. Requires
authentication.
	 *
	 * @param   string   $event   The event id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getVideos($event, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($event, 'videos', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to post a video on event's wall. Requires authentication
and publish_stream permission.
	 *
	 * @param   string  $event        The event id.
	 * @param   string  $source       Path to photo.
	 * @param   string  $title        Video title.
	 * @param   string  $description  Video description.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createVideo($event, $source, $title = null, $description =
null)
	{
		// Set POST request parameters.
		$data = array();
		$data[basename($source)] = '@' . realpath($source);

		if ($title)
		{
			$data['title'] = $title;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		return $this->createConnection($event, 'videos', $data,
array('Content-Type' => 'multipart/form-data'));
	}
}
home/lmsyaran/public_html/libraries/joomla/event/event.php000064400000003356151160262760020051
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Event
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * JEvent Class
 *
 * @since       1.5
 * @deprecated  4.0  The CMS' Event classes will be replaced with the
`joomla/event` package
 */
abstract class JEvent extends JObject
{
	/**
	 * Event object to observe.
	 *
	 * @var    object
	 * @since  2.5
	 */
	protected $_subject = null;

	/**
	 * Constructor
	 *
	 * @param   object  &$subject  The object to observe.
	 *
	 * @since   2.5
	 */
	public function __construct(&$subject)
	{
		// Register the observer ($this) so we can be notified
		$subject->attach($this);

		// Set the subject to observe
		$this->_subject = &$subject;
	}

	/**
	 * Method to trigger events.
	 * The method first generates the even from the argument array. Then it
unsets the argument
	 * since the argument has no bearing on the event handler.
	 * If the method exists it is called and returns its return value. If it
does not exist it
	 * returns null.
	 *
	 * @param   array  &$args  Arguments
	 *
	 * @return  mixed  Routine return value
	 *
	 * @since   1.5
	 */
	public function update(&$args)
	{
		// First let's get the event from the argument array.  Next we will
unset the
		// event argument as it has no bearing on the method to handle the event.
		$event = $args['event'];
		unset($args['event']);

		/*
		 * If the method to handle an event exists, call it and return its return
		 * value.  If it does not exist, return null.
		 */
		if (method_exists($this, $event))
		{
			return call_user_func_array(array($this, $event), array_values($args));
		}
	}
}
home/lmsyaran/public_html/j3/htaccess.back/joomla/event/event.php000064400000003356151161521600021075
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Event
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * JEvent Class
 *
 * @since       1.5
 * @deprecated  4.0  The CMS' Event classes will be replaced with the
`joomla/event` package
 */
abstract class JEvent extends JObject
{
	/**
	 * Event object to observe.
	 *
	 * @var    object
	 * @since  2.5
	 */
	protected $_subject = null;

	/**
	 * Constructor
	 *
	 * @param   object  &$subject  The object to observe.
	 *
	 * @since   2.5
	 */
	public function __construct(&$subject)
	{
		// Register the observer ($this) so we can be notified
		$subject->attach($this);

		// Set the subject to observe
		$this->_subject = &$subject;
	}

	/**
	 * Method to trigger events.
	 * The method first generates the even from the argument array. Then it
unsets the argument
	 * since the argument has no bearing on the event handler.
	 * If the method exists it is called and returns its return value. If it
does not exist it
	 * returns null.
	 *
	 * @param   array  &$args  Arguments
	 *
	 * @return  mixed  Routine return value
	 *
	 * @since   1.5
	 */
	public function update(&$args)
	{
		// First let's get the event from the argument array.  Next we will
unset the
		// event argument as it has no bearing on the method to handle the event.
		$event = $args['event'];
		unset($args['event']);

		/*
		 * If the method to handle an event exists, call it and return its return
		 * value.  If it does not exist, return null.
		 */
		if (method_exists($this, $event))
		{
			return call_user_func_array(array($this, $event), array_values($args));
		}
	}
}