So here’s my events_rec.php that queries the info for the scheduler:
//render sql
if ($scheduler->is_select_mode()){
$scheduler->render_sql("SELECT start_date,end_date,text,rec_type,event_pid,event_length,office_ID,reason,patient_ID,name,howheard_ID,promo_ID,events_rec.company_ID, appt_status,saw_by, previsit_categories.color, previsit_categories.textColor FROM events_rec LEFT JOIN previsit_categories ON previsit_categories.ID = events_rec.reason where office_ID IN ($office_id) AND appt_status IN ($appt_progress) AND saw_by IN ($provider) AND events_rec.company_ID = '" . addslashes($_SESSION['Company_ID']) . "'","event_id","start_date,end_date,text,rec_type,event_pid,event_length,office_ID,reason,patient_ID,name,howheard_ID,promo_ID,company_ID,appt_status,saw_by, previsit_categories.color(color), previsit_categories.textColor(textColor)");
} else {
$scheduler->render_sql("select * from events_rec where office_ID IN ($office_id) AND appt_status IN ($appt_progress) AND saw_by IN ($provider) AND company_ID = '" . addslashes($_SESSION['Company_ID']) . "'","event_id","start_date,end_date,text,rec_type,event_pid,event_length,office_ID,reason,patient_ID,name,howheard_ID,promo_ID,company_ID,appt_status,saw_by");
}
Here’s some generated XML (hope this helps!):
<data>
<event id="1322775061x1192">
<start_date>
<![CDATA[ 2011-12-01 13:20:00 ]]>
</start_date>
<end_date>
<![CDATA[ 2011-12-01 14:45:00 ]]>
</end_date>
<text>
<![CDATA[ ]]>
</text>
<rec_type>
<![CDATA[ ]]>
</rec_type>
<event_pid>
<![CDATA[ 0 ]]>
</event_pid>
<event_length>
<![CDATA[ 0 ]]>
</event_length>
<office_ID>
<![CDATA[ 3 ]]>
</office_ID>
<reason>
<![CDATA[ 1 ]]>
</reason>
<patient_ID>
<![CDATA[ 2123 ]]>
</patient_ID>
<name>
<![CDATA[ Wallace Mogel ]]>
</name>
<howheard_ID>
<![CDATA[ 26 ]]>
</howheard_ID>
<promo_ID>
<![CDATA[ 218 ]]>
</promo_ID>
<company_ID>
<![CDATA[ 1 ]]>
</company_ID>
<appt_status>
<![CDATA[ 1 ]]>
</appt_status>
<saw_by>
<![CDATA[ 1 ]]>
</saw_by>
<color>
<![CDATA[ ]]>
</color>
<textColor>
<![CDATA[ ]]>
</textColor>
</event>
<event id="1322775061x1193">
<start_date>
<![CDATA[ 2011-12-01 15:35:00 ]]>
</start_date>
<end_date>
<![CDATA[ 2011-12-01 17:00:00 ]]>
</end_date>
<text>
<![CDATA[ ]]>
</text>
<rec_type>
<![CDATA[ ]]>
</rec_type>
<event_pid>
<![CDATA[ 0 ]]>
</event_pid>
<event_length>
<![CDATA[ 0 ]]>
</event_length>
<office_ID>
<![CDATA[ 3 ]]>
</office_ID>
<reason>
<![CDATA[ -1 ]]>
</reason>
<patient_ID>
<![CDATA[ -1 ]]>
</patient_ID>
<name>
<![CDATA[ ]]>
</name>
<howheard_ID>
<![CDATA[ -1 ]]>
</howheard_ID>
<promo_ID>
<![CDATA[ -1 ]]>
</promo_ID>
<company_ID>
<![CDATA[ 1 ]]>
</company_ID>
<appt_status>
<![CDATA[ 2 ]]>
</appt_status>
<saw_by>
<![CDATA[ -1 ]]>
</saw_by>
<color>
<![CDATA[ ]]>
</color>
<textColor>
<![CDATA[ ]]>
</textColor>
</event>
<coll_options for="reason">
<item value="-1" label="None..."/>
<item value="1" label="Test"/>
<item value="2" label="Follow Up"/>
<item value="3" label="Service"/>
<item value="5" label="Delivery - Repair"/>
<item value="7" label="Other"/>
</coll_options>
<coll_options for="apptstatus">
<item value="1" label="Confirmed"/>
<item value="2" label="Unconfirmed"/>
<item value="3" label="Cancelled"/>
<item value="4" label="No Show"/>
<item value="5" label="Walk-In"/>
</coll_options>
<coll_options for="offices">
<item value="1" label="Office1"/>
<item value="2" label="Office2"/>
<item value="3" label="Office3"/>
</coll_options>
<coll_options for="howheard">
<item value="-1" label="None..."/>
<item value="10" label="Other"/>
<item value="24" label="Comeback"/>
<item value="26" label="Newspaper"/>
<item value="27" label="Television"/>
<item value="28" label="Radio"/>
<item value="29" label="Direct Mail"/>
<item value="30" label="Email"/>
<item value="31" label="Upgrade Letter"/>
<item value="34" label="Word of Mouth"/>
</coll_options>
<coll_options for="provider">
<item value="-1" label="None..."/>
<item value="1" label="Chris"/>
<item value="2" label="Nick"/>
</coll_options>
<coll_options for="promos">
<item value="-1" label="None..."/>
<item value="218" label="Newspaper 2011-11-28"/>
<item value="220" label=" Upgrade Letter 2011-11-28"/>
<item value="217" label="Newspaper 2011-11-28"/>
</coll_options>
</data>
So I got the textColor and color to change finally. You HAVE to also have the column name in the db table named ‘textColor’ and ‘color’ for this to work! Once I did that, the events change color based on the query.
However, NO events can be updated or deleted. So, that’s the other issue I’m working against.
Thank YOU!