}
}
}
-$date = sprintf("%02d%02d%02d000000", Horde_Util::getFormData('year'), Horde_Util::getFormData('month'), Horde_Util::getFormData('mday'));
-$date = new Horde_Date($date);
+
+$date = new Horde_Date(Horde_Util::getFormData('date', date('Ymd') . '000000'));
+$end = new Horde_Date(Horde_Util::getFormData('enddate', date('Ymd') . '000000'));
+
$vfb_html = $attendee_view->render($date);
// Add the ContactAutoCompleter
return false;
}
- /**
- * Adds a new resource to storage
- *
- * @param Kronolith_Resource $resource
- *
- * @return unknown_type
- */
- static public function addResource($resource)
- {
- // Create a new calendar id.
- $calendar = 'resource_' . hash('md5', microtime());
- $resource->set('calendar', $calendar);
- $driver = Kronolith::getDriver('Resource');
-
- return $driver->save($resource);
- }
-
- /**
- * Return a list of resources that the current user has access to at the
- * specified permission level. Right now, all users have PERMS_READ, but
- * only system admins have PERMS_EDIT | PERMS_DELETE
- *
- * @return array of Kronolith_Resource objects
- */
- static public function listResources($perms = PERMS_READ, $params = array())
- {
- if (($perms & (PERMS_EDIT | PERMS_DELETE)) && !Horde_Auth::isAdmin()) {
- return array();
- }
-
- // Query kronolith_resource table for all(?) available resources?
- // maybe by 'type' or 'name'? type would be arbitrary?
- $driver = Kronolith::getDriver('Resource');
- return $driver->listResources($params);
- }
-
- /**
- * Determine if the provided calendar id represents a resource's calendar.
- *
- * @param string $calendar The calendar identifier to check.
- *
- * @return boolean
- */
- static public function isResourceCalendar($calendar)
- {
- if (strncmp($calendar, 'resource_', 9) === 0) {
- return true;
- }
-
- return false;
- }
-
}
\ No newline at end of file
* response_type - a RESPONSETYPE_* constant
* category - The category of this resource...an arbitrary label used
* to group multiple resources for the resource_group implementation
+ *
* @var array
*/
protected $_params = array();
}
/**
- * Check availability and return an appropriate Kronolith response code.
- *
- * @param Kronolith_Event $event The event to check on
- *
- * @return integer Kronolith::RESPONSE* constant
- */
- public function getResponse($event)
- {
- switch($this->getResponseType()) {
- case Kronolith_Resource::RESPONSETYPE_ALWAYS_ACCEPT:
- return Kronolith::RESPONSE_ACCEPTED;
- case Kronolith_Resource::RESPONSETYPE_AUTO:
- if ($this->isFree($event)) {
- return Kronolith::RESPONSE_ACCEPTED;
- } else {
- return Kronolith::RESPONSE_DECLINED;
- }
- case Kronolith_Resource::RESPONSETYPE_ALWAYS_DECLINE:
- return Kronolith::RESPONSE_DECLINED;
- case Kronolith_Resource::RESPONSETYPE_NONE:
- case Kronolith_Resource::RESPONSETYPE_MANUAL:
- return Kronolith::RESPONSE_NONE;
- }
- }
-
- /**
* Determine if event is free for specified time
*
* @param $startTime
*/
class Kronolith_Resource_Group extends Kronolith_Resource_Base
{
-
/**
*
* @var Kronolith_Driver_Resource