コード例 #1
0
  /**
	 * Creates all Check related URLs for the site
	 * 
	 * @param  string $type  The type of URL to make: 'list', 'add', 'edit', 'delete'
	 * @param  Meetup $obj   The Check object for the edit and delete URL types
	 * @return string  The URL requested
	 */
	static public function makeURL($type, $obj=NULL)
	{ 
		switch ($type)
		{
			case 'list':
				return 'subscription.php';
			case 'add':
				return 'subscription.php?action=add&check_id=' . $obj->prepareCheck_Id();
			case 'edit':
				return 'subscription.php?action=edit&subscription_id=' . $obj->prepareSubscription_Id();
			case 'delete':
				return 'subscription.php?action=delete&subscription_id=' . $obj->prepareSubscription_Id();
		}	
	}