A
download class.vCalendar.php
Language: PHP
LOC: 22
Project Info
FreeMED Project(freemed)
Server: SourceForge
Type: cvs
...reemed\freemed\freemed\lib\
   acl.php
   API.php
   bcadd.php
   calendar-functions.php
   class.AdminModule.php
   class.Agata.php
   class.Authorizations.php
   class.BaseModule.php
   class.BillingModule.php
   class.CalendarModule.php
   class.ClaimLog.php
   class.Coverage.php
   class.Debug.php
   class.diagnosis_set.php
   class.Djvu.php
   class.EMRModule.php
   class.Fax.php
   class.FixedFormEntry.php
   ...s.FixedFormRenderer.php
   class.FormRenderer.php
   class.FreeMEDSelfTest.php
   class.GeneralConfig.php
   class.GraphModule.php
   class.Guarantor.php
   class.Handler_HL7v2.php
   ...s.Handler_HL7v2_A04.php
   ...s.Handler_HL7v2_A08.php
   ...s.Handler_HL7v2_S12.php
   ...s.Handler_HL7v2_S15.php
   class.InsuranceCompany.php
   class.LanguageRegistry.php
   class.Ledger.php
   ...s.MaintenanceModule.php
   class.Messages.php
   class.OMBS_Patient.php
   class.OMBS_Wrapper.php
   class.Parser_HL7v2.php
   class.Patient.php
   class.Payer.php
   class.PHPlot.php
   class.Physician.php
   class.Procedure.php
   class.RecordLock.php
   class.Remitt.php
   class.ReportsModule.php
   class.rxlist.php
   class.Scheduler.php
   class.TeX.php
   class.User.php
   class.UtilityModule.php
   class.vCalendar.php
   class.vCalendarEvent.php
   error_handler.php
   freemed.php
   i18n.php
   iso-set.php
   macros.php
   mail-functions.php
   settings.php
   settings.php.tmpl
   xml.php
   xmlrpc_services.php

<?php
	// $Id: class.vCalendar.php,v 1.2 2003/11/05 04:40:54 rufustfirefly Exp $
	// $Author: rufustfirefly $

// Class: FreeMED.vCalendar
class vCalendar {

	// Method: vCalendar constructor
	//
	// Parameters:
	//
	//	$name - Name of the calendar to be generated
	//
	//	$criteria - SQL "WHERE" clause text defining the
	//	qualifiers of the schedule.
	//
	function vCalendar ( $name, $criteria ) {
		$this->name = $name;
		$this->criteria = $criteria;
	} // end constructor vCalendar
		
	// Method: vCalendar->Generate
	//
	//	Create a vCalendar file from information given.
	//
	// Returns:
	//
	//	vCalendar format file text.
	//
	function generate ( ) {
		$query = "SELECT * FROM scheduler WHERE ".$this->criteria;
		$result = $GLOBALS['sql']->query($query);
		
		// Add vCalendar header
		$buffer .= "BEGIN:VCALENDAR\n".
			"VERSION:1.0\n".
			"PRODID:".$this->name."\n".
			"TZ:-07\n"; // TODO: Fix timezone

		// Loop through applicable calendar entries
		while ($r = $GLOBALS['sql']->fetch_array($result)) {
			$entry = CreateObject('FreeMED.vCalendarEvent', $r);
			$buffer .= $entry->generate();
		}

		// Add vCalendar footer
		$buffer .= "END:VCALENDAR\n";

		return $buffer;
	} // end method vCalendar->generate

} // end class vCalendar

?>

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us