new changes (e.g. show events) by Bart Visscher
parent
4a94c12091
commit
96bc635c6d
|
@ -2,7 +2,7 @@
|
|||
/*************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Bart Visscher *
|
||||
* (c) Copyright 2011 Georg Ehrke *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
|
@ -24,4 +24,4 @@ if(!OC_USER::isLoggedIn()) {
|
|||
$calendarid = $_POST['calendarid'];
|
||||
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
|
||||
$cal = OC_Calendar_Calendar::findCalendar($calendarid);
|
||||
echo $cal['active'];
|
||||
echo $cal['active'];
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/*************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Georg Ehrke *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
* manual: ownclouddev.georgswebsite.de/manual *
|
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE *
|
||||
* *
|
||||
* If you are not able to view the License, *
|
||||
* <http://www.gnu.org/licenses/> *
|
||||
* <http://ownclouddev.georgswebsite.de/license/> *
|
||||
* please write to the Free Software Foundation. *
|
||||
* Address: *
|
||||
* 59 Temple Place, Suite 330, Boston, *
|
||||
* MA 02111-1307 USA *
|
||||
*************************************************/
|
||||
require_once('../../../lib/base.php');
|
||||
$l10n = new OC_L10N('calendar');
|
||||
if(!OC_USER::isLoggedIn()) {
|
||||
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
|
||||
}
|
||||
$calendar = OC_Calendar_Calendar::findCalendar($_GET['calendarid']);
|
||||
$tmpl = new OC_Template("calendar", "part.editcalendar");
|
||||
$tmpl->assign('calendar',$calendar);
|
||||
$tmpl->printPage();
|
||||
?>
|
|
@ -23,4 +23,4 @@ if(!OC_USER::isLoggedIn()) {
|
|||
}
|
||||
$output = new OC_TEMPLATE("calendar", "part.getcal");
|
||||
$output -> printpage();
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
// Init owncloud
|
||||
require_once('../../../lib/base.php');
|
||||
|
||||
$l=new OC_L10N('calendar');
|
||||
|
||||
// We send json data
|
||||
header( "Content-Type: application/jsonrequest" );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_User::isLoggedIn()){
|
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") )));
|
||||
exit();
|
||||
}
|
||||
|
||||
// Get data
|
||||
if( isset( $_POST['timezone'] ) ){
|
||||
$timezone=$_POST['timezone'];
|
||||
OC_Preferences::setValue( OC_User::getUser(), 'calendar', 'timezone', $timezone );
|
||||
echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Timezone changed") )));
|
||||
}else{
|
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") )));
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/*************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Georg Ehrke *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
* manual: ownclouddev.georgswebsite.de/manual *
|
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE *
|
||||
* *
|
||||
* If you are not able to view the License, *
|
||||
* <http://www.gnu.org/licenses/> *
|
||||
* <http://ownclouddev.georgswebsite.de/license/> *
|
||||
* please write to the Free Software Foundation. *
|
||||
* Address: *
|
||||
* 59 Temple Place, Suite 330, Boston, *
|
||||
* MA 02111-1307 USA *
|
||||
*************************************************/
|
||||
require_once('../../../lib/base.php');
|
||||
|
||||
$l10n = new OC_L10N('calendar');
|
||||
|
||||
// We send json data
|
||||
header( "Content-Type: application/jsonrequest" );
|
||||
|
||||
// Check if we are a user
|
||||
if( !OC_User::isLoggedIn()){
|
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") )));
|
||||
exit();
|
||||
}
|
||||
|
||||
$calendarid = $_POST['id'];
|
||||
OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], $_POST['description'], null, null, null, $_POST['color']);
|
||||
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
|
||||
$calendar = OC_Calendar_Calendar::findCalendar($calendarid);
|
||||
$tmpl = new OC_Template('calendar', 'part.calendar.row');
|
||||
$tmpl->assign('calendar', $calendar);
|
||||
echo json_encode( array( "status" => "success", "data" => $tmpl->fetchPage() ));
|
|
@ -16,3 +16,5 @@ OC_App::addNavigationEntry( array(
|
|||
'href' => OC_Helper::linkTo( 'calendar', 'index.php' ),
|
||||
'icon' => OC_Helper::imagePath( 'calendar', 'icon.png' ),
|
||||
'name' => $l->t('Calendar')));
|
||||
|
||||
OC_App::registerPersonal('calendar', 'settings');
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
<notnull>false</notnull>
|
||||
<length>100</length>
|
||||
</field>
|
||||
|
||||
|
||||
<field>
|
||||
<name>active</name>
|
||||
<type>integer</type>
|
||||
|
@ -143,7 +143,7 @@
|
|||
<notnull>true</notnull>
|
||||
<length>4</length>
|
||||
</field>
|
||||
|
||||
|
||||
<field>
|
||||
<name>ctag</name>
|
||||
<type>integer</type>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Georg Ehrke, Bart Visscher *
|
||||
* (c) Copyright 2011 Georg Ehrke *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
|
@ -462,17 +462,17 @@ function oc_cal_switch2today() {
|
|||
|
||||
function oc_cal_update_eventsvar(loadyear) {
|
||||
$.getJSON(oc_webroot + "/apps/calendar/ajax/getcal.php?year=" + loadyear, function(newevents, status) {
|
||||
if(status == "nosession") {
|
||||
if(status == "nosession") {
|
||||
alert("You are not logged in. That can happen if you don't use owncloud for a long time.");
|
||||
document.location.href = oc_webroot;
|
||||
document.location(oc_webroot);
|
||||
}
|
||||
if(status == "parsingfail" || typeof (newevents) == "undefined") {
|
||||
$(function() {
|
||||
$( "#parsingfail_dialog" ).dialog();
|
||||
});
|
||||
} else {
|
||||
oc_cal_events[loadyear]= newevents[loadyear];
|
||||
oc_cal_update_view('');
|
||||
oc_cal_events[loadyear] = newevents[loadyear];
|
||||
oc_cal_update_view('', '');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -678,8 +678,8 @@ function oc_cal_load_events(loadview) {
|
|||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var dates = oc_cal_generate_dates("oneweek");
|
||||
for(var i = 0; i <= 6; i++) {
|
||||
var loadevents_month = dates[i][0];
|
||||
var loadevents_days = dates[i][1];
|
||||
var loadevents_month = dates[i][1];
|
||||
var loadevents_days = dates[i][0];
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month]) != "undefined") {
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days]) != "undefined") {
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days]["allday"]) != "undefined") {
|
||||
|
@ -718,8 +718,8 @@ function oc_cal_load_events(loadview) {
|
|||
var weekdaynum = 0;
|
||||
var weeknum = 1;
|
||||
for(var i = 0; i <= 27; i++) {
|
||||
var loadevents_month = dates[i][0];
|
||||
var loadevents_days = dates[i][1];
|
||||
var loadevents_month = dates[i][1];
|
||||
var loadevents_days = dates[i][0];
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month]) != "undefined") {
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days]) != "undefined") {
|
||||
var pnum = 0;
|
||||
|
@ -767,8 +767,8 @@ function oc_cal_load_events(loadview) {
|
|||
var weekdaynum = 0;
|
||||
var weeknum = 1;
|
||||
for(var i = 0; i <= 41; i++) {
|
||||
var loadevents_month = dates[i][0];
|
||||
var loadevents_days = dates[i][1];
|
||||
var loadevents_month = dates[i][1];
|
||||
var loadevents_days = dates[i][0];
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month]) != "undefined") {
|
||||
if( typeof (oc_cal_events[oc_cal_year][loadevents_month][loadevents_days]) != "undefined") {
|
||||
var pnum = 0;
|
||||
|
@ -896,10 +896,27 @@ function oc_cal_choosecalendar(){
|
|||
alert(t("calendar", "You can't open more than one dialog per site!"));
|
||||
}
|
||||
}
|
||||
|
||||
function oc_cal_calender_activation(checkbox, calendarid){
|
||||
function oc_cal_calender_activation(checkbox, calendarid)
|
||||
{
|
||||
$.post(oc_webroot + "/apps/calendar/ajax/activation.php", { calendarid: calendarid, active: checkbox.checked?1:0 },
|
||||
function(data) {
|
||||
checkbox.checked = data == 1;
|
||||
});
|
||||
}
|
||||
function(data) {
|
||||
checkbox.checked = data == 1;
|
||||
});
|
||||
}
|
||||
function oc_cal_editcalendar(object, calendarid){
|
||||
$(object).closest('tr').load(oc_webroot + "/apps/calendar/ajax/editcalendar.php?calendarid="+calendarid);
|
||||
}
|
||||
function oc_cal_editcalendar_submit(button, calendarid){
|
||||
var displayname = $("#displayname_"+calendarid).val();
|
||||
var active = $("#active_"+calendarid+":checked").length;
|
||||
var description = $("#description_"+calendarid).val();
|
||||
var calendarcolor = $("#calendarcolor_"+calendarid).val();
|
||||
|
||||
$.post("ajax/updatecalendar.php", { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
|
||||
function(data){
|
||||
if(data.error == "true"){
|
||||
}else{
|
||||
$(button).closest('tr').html(data.data)
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
|
|
@ -54,4 +54,4 @@ var oc_cal_datemonthyear = String(oc_cal_dayofmonth) + String(oc_cal_month) + S
|
|||
var oc_cal_calendars = new Array();
|
||||
//event vars
|
||||
var oc_cal_events = new Array();
|
||||
oc_cal_events[oc_cal_year] = new Array(0,1,2,3,4,5,6,7,8,9,10,11);
|
||||
oc_cal_events[oc_cal_year] = new Array();
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
$(document).ready(function(){
|
||||
$("#timezone").change( function(){
|
||||
// Serialize the data
|
||||
var post = $( "#timezone" ).serialize();
|
||||
// Ajax foo
|
||||
$.post( oc_webroot + '/apps/calendar/ajax/settimezone.php', post, function(data){
|
||||
if( data.status == "success" ){
|
||||
}
|
||||
else{
|
||||
$('#timezoneerror').html( data.data.message );
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
|
@ -56,15 +56,15 @@
|
|||
* This class manages our calendars
|
||||
*/
|
||||
class OC_Calendar_Calendar{
|
||||
public static function allCalendars($uid){
|
||||
public static function allCalendars($uid, $active=null){
|
||||
$values = array($uid);
|
||||
$active_where = '';
|
||||
if (!is_null($active)){
|
||||
$active_where = ' AND active = ?';
|
||||
$values[] = $active;
|
||||
}
|
||||
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_calendars WHERE userid = ?' . $active_where );
|
||||
$result = $stmt->execute($values);
|
||||
$active_where = '';
|
||||
if (!is_null($active)){
|
||||
$active_where = ' AND active = ?';
|
||||
$values[] = $active;
|
||||
}
|
||||
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_calendars WHERE userid = ?' . $active_where );
|
||||
$result = $stmt->execute($values);
|
||||
|
||||
$calendars = array();
|
||||
while( $row = $result->fetchRow()){
|
||||
|
@ -112,14 +112,14 @@ class OC_Calendar_Calendar{
|
|||
|
||||
public static function editCalendar($id,$name=null,$description=null,$components=null,$timezone=null,$order=null,$color=null){
|
||||
// Need these ones for checking uri
|
||||
$calendar = self::find($id);
|
||||
$calendar = self::findCalendar($id);
|
||||
|
||||
// Keep old stuff
|
||||
if(is_null($name)) $name = $calendar['name'];
|
||||
if(is_null($description)) $description = $calendar['description'];
|
||||
if(is_null($components)) $components = $calendar['components'];
|
||||
if(is_null($timezone)) $timezone = $calendar['timezone'];
|
||||
if(is_null($order)) $order = $calendar['order'];
|
||||
if(is_null($order)) $order = $calendar['calendarorder'];
|
||||
if(is_null($color)) $color = $calendar['color'];
|
||||
|
||||
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,description=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' );
|
||||
|
@ -131,6 +131,7 @@ class OC_Calendar_Calendar{
|
|||
public static function setCalendarActive($id,$active){
|
||||
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET active = ? WHERE id = ?' );
|
||||
$stmt->execute(array($active, $id));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
$tmpl = new OC_Template( 'calendar', 'settings');
|
||||
$timezone=OC_Preferences::getValue(OC_User::getUser(),'calendar','timezone','');
|
||||
$tmpl->assign('timezone',$timezone);
|
||||
$tmpl->assign('timezones',DateTimeZone::listIdentifiers());
|
||||
|
||||
OC_Util::addScript('calendar','settings');
|
||||
|
||||
return $tmpl->fetchPage();
|
|
@ -4,16 +4,13 @@
|
|||
$option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
|
||||
for($i = 0; $i < count($option_calendars); $i++){
|
||||
echo "<tr>";
|
||||
echo "<td width=\"20px\"><input id=\"active_" . $option_calendars[$i]["id"] . "\" type=\"checkbox\" onClick=\"oc_cal_calender_activation(this, " . $option_calendars[$i]["id"] . ")\"></td>";
|
||||
echo "<td><label for=\"active_" . $option_calendars[$i]["id"] . "\">" . $option_calendars[$i]["displayname"] . "</label></td>";
|
||||
echo "<td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Download") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/download.svg\"></a></td><td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Rename") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/rename.svg\"></a></td>";
|
||||
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
|
||||
$tmpl->assign('calendar', $option_calendars[$i]);
|
||||
$tmpl->printpage();
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br /><br /><br />
|
||||
<input style="float: left;" type="button" onclick="oc_cal_choosecalendar_submit();" value="<?php echo $l->t("Submit"); ?>">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( "#choosecalendar_dialog" ).dialog({
|
||||
width : 500,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
echo "<td width=\"20px\"><input id=\"active_" . $_['calendar']["id"] . "\" type=\"checkbox\" onClick=\"oc_cal_calender_activation(this, " . $_['calendar']["id"] . ")\"" . ($_['calendar']["active"] ? ' checked="checked"' : '') . "></td>";
|
||||
echo "<td><label for=\"active_" . $_['calendar']["id"] . "\">" . $_['calendar']["displayname"] . "</label></td>";
|
||||
echo "<td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Download") . "\" class=\"action\"><img src=\"/owncloud/core/img/actions/download.svg\"></a></td><td width=\"20px\"><a style=\"display: block; opacity: 0.214133;\" href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"oc_cal_editcalendar(this, " . $_['calendar']["id"] . ");\"><img src=\"/owncloud/core/img/actions/rename.svg\"></a></td>";
|
|
@ -0,0 +1,32 @@
|
|||
<td id="editcalendar_dialog" title="<?php echo $l->t("Edit calendar"); ?>" colspan="4">
|
||||
<table width="100%" style="border: 0;">
|
||||
<tr>
|
||||
<th><?php echo $l->t('Displayname') ?></th>
|
||||
<td>
|
||||
<input id="displayname_<?php echo $_['calendar']['id'] ?>" type="text" value="<?php echo $_['calendar']['displayname'] ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<input id="active_<?php echo $_['calendar']['id'] ?>" type="checkbox"<?php echo ($_['calendar']['active'] ? ' checked="checked"' : '' ) ?>>
|
||||
<label for="active_<?php echo $_['calendar']['id'] ?>">
|
||||
<?php echo $l->t('Active') ?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $l->t('Description') ?></th>
|
||||
<td>
|
||||
<textarea id="description_<?php echo $_['calendar']['id'] ?>"><?php echo $_['calendar']['description'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $l->t('Calendar color') ?></th>
|
||||
<td>
|
||||
<input id="calendarcolor_<?php echo $_['calendar']['id'] ?>" type="text" value="<?php echo $_['calendar']['calendarcolor'] ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input style="float: left;" type="button" onclick="oc_cal_editcalendar_submit(this, <?php echo $_['calendar']['id'] ?>);" value="<?php echo $l->t("Submit"); ?>">
|
||||
</td>
|
|
@ -1,22 +1,4 @@
|
|||
<?php
|
||||
/*************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Bart Visscher *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
* manual: ownclouddev.georgswebsite.de/manual *
|
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE *
|
||||
* *
|
||||
* If you are not able to view the License, *
|
||||
* <http://www.gnu.org/licenses/> *
|
||||
* <http://ownclouddev.georgswebsite.de/license/> *
|
||||
* please write to the Free Software Foundation. *
|
||||
* Address: *
|
||||
* 59 Temple Place, Suite 330, Boston, *
|
||||
* MA 02111-1307 USA *
|
||||
*************************************************/
|
||||
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1);
|
||||
$events = OC_Calendar_Calendar::allCalendarObjects($calendars[0]['id']);
|
||||
$select_year = $_GET["year"];
|
||||
|
@ -30,10 +12,10 @@ foreach($events as $event)
|
|||
$start_dt->setTimezone(new DateTimeZone($user_timezone));
|
||||
$end_dt = new DateTime($event['enddate'], new DateTimeZone('UTC'));
|
||||
$end_dt->setTimezone(new DateTimeZone($user_timezone));
|
||||
$year = $start_dt->format('Y');
|
||||
$year = $start_dt->format('Y');
|
||||
$month = $start_dt->format('n') - 1; // return is 0 based
|
||||
$day = $start_dt->format('j');
|
||||
$hour = $start_dt->format('G');
|
||||
$day = $start_dt->format('j');
|
||||
$hour = $start_dt->format('G');
|
||||
|
||||
// hack
|
||||
if (strstr($event['calendardata'], 'DTSTART;VALUE=DATE:')) {
|
||||
|
@ -47,11 +29,14 @@ foreach($events as $event)
|
|||
$return_event['startdate'] = $start_dt->format('Y-m-d H:i');
|
||||
$return_event['enddate'] = $end_dt->format('Y-m-d H:i');
|
||||
$return_event['description'] = $event['summary'];
|
||||
if (isset($return_events[$year][$month][$day][$hour])){
|
||||
if (isset($return_events[$year][$month][$day][$hour]))
|
||||
{
|
||||
$return_events[$year][$month][$day][$hour][] = $return_event;
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
$return_events[$year][$month][$day][$hour] = array(1 => $return_event);
|
||||
}
|
||||
}
|
||||
echo json_encode($return_events);
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<form id="calendar">
|
||||
<fieldset class="personalblock">
|
||||
<label for="timezone"><strong><?php echo $l->t('Timezone');?></strong></label>
|
||||
<select id="timezone" name="timezone">
|
||||
<?php foreach($_['timezones'] as $timezone):
|
||||
if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $timezone ) ):
|
||||
$ex=explode('/', $timezone, 2);//obtain continent,city
|
||||
if ($continent!=$ex[0]):
|
||||
if ($continent!="") echo '</optgroup>';
|
||||
echo '<optgroup label="'.$ex[0].'">';
|
||||
endif;
|
||||
$city=$ex[1];
|
||||
$continent=$ex[0];
|
||||
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
|
||||
endif;
|
||||
endforeach;?>
|
||||
</select><span id="timezoneerror"></span>
|
||||
</fieldset>
|
||||
</form>
|
Loading…
Reference in New Issue