function edit_theme() { $db = JFactory::getDBO(); $cid = JRequest::getVar('cid', array(0), '', 'array'); JArrayHelper::toInteger($cid, array(0)); $id = $cid[0]; $row = JTable::getInstance('spidercalendar_theme', 'Table'); // load the row from the db table $row->load($id); $lists = array(); //title_font Select List $title_font = array('' => '- Select Font -', 'Arial' => 'Arial', 'Courier New' => 'Courier New', 'Georgia' => 'Georgia', 'Tahoma' => 'Tahoma', 'Verdana' => 'Verdana', 'Impact' => 'Impact'); $title_fontOptions = array(); foreach ($title_font as $key => $value) { $title_fontOptions[] = JHTML::_('select.option', $key, $value); } //end //title_style Select List $title_style = array('normal' => 'Normal', 'bold' => 'Bold', 'italic' => 'Italic', 'bold/italic' => 'Bold and Italic'); $title_styleOptions = array(); foreach ($title_style as $key => $value) { $title_styleOptions[] = JHTML::_('select.option', $key, $value); } //end //date_font Select List $date_font = array('' => '- Select Font -', 'Arial' => 'Arial', 'Courier New' => 'Courier New', 'Georgia' => 'Georgia', 'Tahoma' => 'Tahoma', 'Verdana' => 'Verdana', 'Impact' => 'Impact'); $date_fontOptions = array(); foreach ($date_font as $key => $value) { $date_fontOptions[] = JHTML::_('select.option', $key, $value); } //end //date_style Select List $date_style = array('normal' => 'Normal', 'bold' => 'Bold', 'italic' => 'Italic', 'bold/italic' => 'Bold and Italic'); $date_styleOptions = array(); foreach ($date_style as $key => $value) { $date_styleOptions[] = JHTML::_('select.option', $key, $value); } //end //week_start_day Select List $week_start_day = array('mo' => 'Monday', 'su' => 'Sunday'); $week_start_dayOptions = array(); foreach ($week_start_day as $key => $value) { $week_start_dayOptions[] = JHTML::_('select.option', $key, $value); } //end //month_type Select List $month_type = array(1 => 'Previous,current,next', 2 => 'Current'); $month_typeOptions = array(); foreach ($month_type as $key => $value) { $month_typeOptions[] = JHTML::_('select.option', $key, $value); } //end if ($row->show_time != '') { $lists['show_time'] = JHTML::_('select.booleanlist', 'show_time', 'class="inputbox"', $row->show_time); } else { $lists['show_time'] = JHTML::_('select.booleanlist', 'show_time', 'class="inputbox"', 1); } if ($row->show_repeat != '') { $lists['show_repeat'] = JHTML::_('select.booleanlist', 'show_repeat', 'class="inputbox"', $row->show_repeat); } else { $lists['show_repeat'] = JHTML::_('select.booleanlist', 'show_repeat', 'class="inputbox"', 1); } $lists['title_style'] = JHTML::_('select.genericlist', $title_styleOptions, 'title_style', 'class="inputbox"', 'value', 'text', $row->title_style); $lists['title_font'] = JHTML::_('select.genericlist', $title_fontOptions, 'title_font', 'class="inputbox"', 'value', 'text', $row->title_font); $lists['week_start_day'] = JHTML::_('select.genericlist', $week_start_dayOptions, 'week_start_day', 'class="inputbox"', 'value', 'text', $row->week_start_day); $lists['date_style'] = JHTML::_('select.genericlist', $date_styleOptions, 'date_style', 'class="inputbox"', 'value', 'text', $row->date_style); $lists['date_font'] = JHTML::_('select.genericlist', $date_fontOptions, 'date_font', 'class="inputbox"', 'value', 'text', $row->date_font); $lists['month_type'] = JHTML::_('select.genericlist', $month_typeOptions, 'month_type', 'class="inputbox"', 'value', 'text', $row->month_type); // display function HTML_contact::edit_theme($row, $lists); }