|
|
|
@ -1,4 +1,4 @@ |
|
|
|
<?php //$Id: agenda.inc.php 17198 2008-12-10 10:52:11Z ivantcholakov $
|
|
|
|
<?php //$Id: agenda.inc.php 17230 2008-12-11 15:39:27Z cfasanando $
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
|
============================================================================== |
|
|
|
============================================================================== |
|
|
|
@ -409,6 +409,27 @@ function reverseAll(cbList) |
|
|
|
cbList[i].selected = !(cbList[i].selected) |
|
|
|
cbList[i].selected = !(cbList[i].selected) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function plus_attachment() { |
|
|
|
|
|
|
|
if (document.getElementById('options').style.display == 'none') { |
|
|
|
|
|
|
|
document.getElementById('options').style.display = 'block'; |
|
|
|
|
|
|
|
document.getElementById('plus').innerHTML=' <img src=\"../img/nolines_minus.gif\" alt=\"\" /> ".get_lang('AddAnAttachment')."'; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
document.getElementById('options').style.display = 'none'; |
|
|
|
|
|
|
|
document.getElementById('plus').innerHTML=' <img src=\"../img/nolines_plus.gif\" alt=\"\" /> ".get_lang('AddAnAttachment')."'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function plus_repeated_event() { |
|
|
|
|
|
|
|
if (document.getElementById('options2').style.display == 'none') { |
|
|
|
|
|
|
|
document.getElementById('options2').style.display = 'block'; |
|
|
|
|
|
|
|
document.getElementById('plus2').innerHTML=' <img src=\"../img/nolines_minus.gif\" alt=\"\" /> ".get_lang('RepeatedEvent')."'; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
document.getElementById('options2').style.display = 'none'; |
|
|
|
|
|
|
|
document.getElementById('plus2').innerHTML=' <img src=\"../img/nolines_plus.gif\" alt=\"\" /> ".get_lang('RepeatedEvent')."'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// End --> |
|
|
|
// End --> |
|
|
|
</script>"; |
|
|
|
</script>"; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2011,7 +2032,7 @@ function show_add_form($id = '') |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
global $MonthsLong; |
|
|
|
global $MonthsLong; |
|
|
|
|
|
|
|
$htmlHeadXtra[] = to_javascript(); |
|
|
|
// the default values for the forms |
|
|
|
// the default values for the forms |
|
|
|
if ($_GET['originalresource'] !== 'no') |
|
|
|
if ($_GET['originalresource'] !== 'no') |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -2168,7 +2189,7 @@ function show_add_form($id = '') |
|
|
|
|
|
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
|
|
|
|
|
|
|
|
<tr><td width="110"> |
|
|
|
<tr><td> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<?php echo get_lang('StartDate').": \n"; ?> |
|
|
|
<?php echo get_lang('StartDate').": \n"; ?> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
@ -2241,7 +2262,7 @@ function show_add_form($id = '') |
|
|
|
|
|
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
|
|
|
|
|
|
|
|
<tr><td width="110"> |
|
|
|
<tr><td> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<?php echo get_lang('StartTime').": \n"; ?> |
|
|
|
<?php echo get_lang('StartTime').": \n"; ?> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
@ -2289,7 +2310,7 @@ function show_add_form($id = '') |
|
|
|
|
|
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
|
|
|
|
|
|
|
|
<tr><td width="110"> |
|
|
|
<tr><td> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<?php echo get_lang('EndDate').": \n"; ?> |
|
|
|
<?php echo get_lang('EndDate').": \n"; ?> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
@ -2347,7 +2368,7 @@ function show_add_form($id = '') |
|
|
|
|
|
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
|
|
|
|
|
|
|
|
|
|
|
<tr><td width="110"> |
|
|
|
<tr><td> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<!-- date: 1 -> 31 --> |
|
|
|
<?php echo get_lang('EndTime').": \n"; ?> |
|
|
|
<?php echo get_lang('EndTime').": \n"; ?> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
@ -2381,7 +2402,8 @@ function show_add_form($id = '') |
|
|
|
echo "\t\t\t\t<option value=\"$value\">$value</option>\n"; |
|
|
|
echo "\t\t\t\t<option value=\"$value\">$value</option>\n"; |
|
|
|
} ?> |
|
|
|
} ?> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
</td></tr></table> |
|
|
|
</td></tr> |
|
|
|
|
|
|
|
</table> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
@ -2481,89 +2503,128 @@ function show_add_form($id = '') |
|
|
|
if(empty($id)) //only show repeat fields when adding the first time |
|
|
|
if(empty($id)) //only show repeat fields when adding the first time |
|
|
|
{ |
|
|
|
{ |
|
|
|
?> |
|
|
|
?> |
|
|
|
<tr><td colspan="2"><br /><b><?php echo get_lang('AddAnAttachment') ?><br /><br /></td></tr>
|
|
|
|
|
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td colspan="2"> |
|
|
|
<td> |
|
|
|
<label for="file_name"><?php echo ucwords(get_lang('FileName'))?></label>
|
|
|
|
<div> |
|
|
|
<input type="file" name="user_upload"/> |
|
|
|
<div class="label"> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
</tr><tr> |
|
|
|
<div class="formw"> |
|
|
|
<td colspan="2"> |
|
|
|
<a href="javascript://" onclick="return plus_attachment();"><span id="plus"> <img src="../img/nolines_plus.gif" alt="" /> <?php echo get_lang('AddAnAttachment') ?></span></a>
|
|
|
|
<label for="comment"><?php echo get_lang('FileComment')?></label><br />
|
|
|
|
</div> |
|
|
|
<textarea name="file_comment" rows ="4" cols = "34" ></textarea> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
<div id="options" style="display: none;"> |
|
|
|
<tr> |
|
|
|
<table> |
|
|
|
<td><label for="repeat"><?php echo get_lang('RepeatedEvent');?></label><input type="checkbox" name="repeat" <?php echo ($repeat?'checked="checked"':'');?>/></td>
|
|
|
|
<tr><br /> |
|
|
|
<td colspan="2" /> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td colspan="2"> |
|
|
|
<td><label for="repeat_type"><?php echo get_lang('RepeatType');?></label>
|
|
|
|
<label for="file_name"><?php echo ucwords(get_lang('FileName'))?></label>
|
|
|
|
<select name="repeat_type"> |
|
|
|
<input type="file" name="user_upload"/> |
|
|
|
<option value="daily"><?php echo get_lang('RepeatDaily');?></option>
|
|
|
|
</td> |
|
|
|
<option value="weekly"><?php echo get_lang('RepeatWeekly');?></option>
|
|
|
|
</tr> |
|
|
|
<option value="monthlyByDate"><?php echo get_lang('RepeatMonthlyByDate');?></option>
|
|
|
|
<tr> |
|
|
|
<!--option value="monthlyByDay"><?php echo get_lang('RepeatMonthlyByDay');?></option>
|
|
|
|
<td colspan="2"> |
|
|
|
<option value="monthlyByDayR"><?php echo get_lang('RepeatMonthlyByDayR');?></option-->
|
|
|
|
<label for="comment"><?php echo get_lang('FileComment')?></label><br />
|
|
|
|
<option value="yearly"><?php echo get_lang('RepeatYearly');?></option>
|
|
|
|
<textarea name="file_comment" rows ="4" cols = "34" ></textarea> |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<td colspan="2" /> |
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td><label for="repeat_end_day"><?php echo get_lang('RepeatEnd');?></label>
|
|
|
|
<td colspan="4"> |
|
|
|
<select name="repeat_end_day"> |
|
|
|
<div> |
|
|
|
<?php |
|
|
|
<div class="label"> |
|
|
|
// small loop for filling all the dates |
|
|
|
</div> |
|
|
|
// 2do: the available dates should be those of the selected month => february is from 1 to 28 (or 29) and not to 31 |
|
|
|
<div class="formw"> |
|
|
|
echo "\n"; |
|
|
|
<a href="javascript://" onclick="return plus_repeated_event();"><span id="plus2"> <img src="../img/nolines_plus.gif" alt="" /> <?php echo get_lang('RepeatedEvent') ?></span></a>
|
|
|
|
foreach (range(1, 31) as $i) |
|
|
|
</div> |
|
|
|
{ |
|
|
|
</div> |
|
|
|
// values have to have double digits |
|
|
|
|
|
|
|
$value = ($i <= 9 ? '0'.$i : $i ); |
|
|
|
<div id="options2" style="display: none;"> |
|
|
|
// the current day is indicated with [] around the date |
|
|
|
<table> |
|
|
|
if ($value==$end_day) |
|
|
|
<tr><br /> |
|
|
|
{ echo "\t\t\t\t <option value=\"".$value."\" selected> ".$i." </option>\n";} |
|
|
|
</tr> |
|
|
|
else |
|
|
|
<tr> |
|
|
|
{ echo "\t\t\t\t <option value=\"".$value."\">".$i."</option>\n"; } |
|
|
|
|
|
|
|
}?> |
|
|
|
<td><label for="repeat"><?php echo get_lang('RepeatedEvent');?></label><input type="checkbox" name="repeat" <?php echo ($repeat?'checked="checked"':'');?>/></td>
|
|
|
|
</select> |
|
|
|
<td colspan="2" /> |
|
|
|
|
|
|
|
</tr> |
|
|
|
<!-- month: january -> december --> |
|
|
|
<tr> |
|
|
|
<select name="repeat_end_month"> |
|
|
|
<td><label for="repeat_type"><?php echo get_lang('RepeatType');?></label>
|
|
|
|
<?php |
|
|
|
<select name="repeat_type"> |
|
|
|
echo "\n"; |
|
|
|
<option value="daily"><?php echo get_lang('RepeatDaily');?></option>
|
|
|
|
foreach (range(1, 12) as $i) |
|
|
|
<option value="weekly"><?php echo get_lang('RepeatWeekly');?></option>
|
|
|
|
{ |
|
|
|
<option value="monthlyByDate"><?php echo get_lang('RepeatMonthlyByDate');?></option>
|
|
|
|
// values have to have double digits |
|
|
|
<!--option value="monthlyByDay"><?php echo get_lang('RepeatMonthlyByDay');?></option>
|
|
|
|
$value = ($i <= 9 ? '0'.$i : $i ); |
|
|
|
<option value="monthlyByDayR"><?php echo get_lang('RepeatMonthlyByDayR');?></option-->
|
|
|
|
if ($value==$end_month+1) |
|
|
|
<option value="yearly"><?php echo get_lang('RepeatYearly');?></option>
|
|
|
|
{ echo "\t\t\t\t ",'<option value="',$value,'" selected="selected">',$MonthsLong[$i-1],"</option>\n"; } |
|
|
|
</select> |
|
|
|
else |
|
|
|
</td> |
|
|
|
{ echo "\t\t\t\t ",'<option value="',$value,'">',$MonthsLong[$i-1],"</option>\n"; } |
|
|
|
<td colspan="2" /> |
|
|
|
}?> |
|
|
|
</tr> |
|
|
|
</select> |
|
|
|
<tr> |
|
|
|
|
|
|
|
<td><label for="repeat_end_day"><?php echo get_lang('RepeatEnd');?></label><br />
|
|
|
|
<select name="repeat_end_year"> |
|
|
|
<select name="repeat_end_day"> |
|
|
|
<option value="<?php echo ($end_year-1) ?>"><?php echo ($end_year-1) ?></option>
|
|
|
|
<?php |
|
|
|
<option value="<?php echo $end_year ?>" selected> <?php echo $end_year ?> </option>
|
|
|
|
// small loop for filling all the dates |
|
|
|
<?php |
|
|
|
// 2do: the available dates should be those of the selected month => february is from 1 to 28 (or 29) and not to 31 |
|
|
|
echo "\n"; |
|
|
|
echo "\n"; |
|
|
|
for ($i=1; $i<=5; $i++) |
|
|
|
foreach (range(1, 31) as $i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$value=$end_year+$i; |
|
|
|
// values have to have double digits |
|
|
|
echo "\t\t\t\t<option value=\"$value\">$value</option>\n"; |
|
|
|
$value = ($i <= 9 ? '0'.$i : $i ); |
|
|
|
} ?> |
|
|
|
// the current day is indicated with [] around the date |
|
|
|
</select> |
|
|
|
if ($value==$end_day) |
|
|
|
<a href="javascript:openCalendar('new_calendar_item', 'repeat_end_')"><?php Display::display_icon('calendar_select.gif'); ?></a>
|
|
|
|
{ echo "\t\t\t\t <option value=\"".$value."\" selected> ".$i." </option>\n";} |
|
|
|
</td> |
|
|
|
else |
|
|
|
<td colspan="2" /> |
|
|
|
{ echo "\t\t\t\t <option value=\"".$value."\">".$i."</option>\n"; } |
|
|
|
</tr> |
|
|
|
}?> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- month: january -> december --> |
|
|
|
|
|
|
|
<select name="repeat_end_month"> |
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
echo "\n"; |
|
|
|
|
|
|
|
foreach (range(1, 12) as $i) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// values have to have double digits |
|
|
|
|
|
|
|
$value = ($i <= 9 ? '0'.$i : $i ); |
|
|
|
|
|
|
|
if ($value==$end_month+1) |
|
|
|
|
|
|
|
{ echo "\t\t\t\t ",'<option value="',$value,'" selected="selected">',$MonthsLong[$i-1],"</option>\n"; } |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ echo "\t\t\t\t ",'<option value="',$value,'">',$MonthsLong[$i-1],"</option>\n"; } |
|
|
|
|
|
|
|
}?> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select name="repeat_end_year"> |
|
|
|
|
|
|
|
<option value="<?php echo ($end_year-1) ?>"><?php echo ($end_year-1) ?></option>
|
|
|
|
|
|
|
|
<option value="<?php echo $end_year ?>" selected> <?php echo $end_year ?> </option>
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
echo "\n"; |
|
|
|
|
|
|
|
for ($i=1; $i<=5; $i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$value=$end_year+$i; |
|
|
|
|
|
|
|
echo "\t\t\t\t<option value=\"$value\">$value</option>\n"; |
|
|
|
|
|
|
|
} ?> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<a href="javascript:openCalendar('new_calendar_item', 'repeat_end_')"><?php Display::display_icon('calendar_select.gif'); ?></a>
|
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</td> |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
}//only show repeat fields if adding, not if editing |
|
|
|
}//only show repeat fields if adding, not if editing |
|
|
|
?> |
|
|
|
?> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td colspan="3"> |
|
|
|
<td colspan="3"> |
|
|
|
|
|
|
|
<br /> |
|
|
|
<input type="submit" name="submit_event" value="<?php echo get_lang('Ok'); ?>" onclick="selectAll(this.form.elements[7],true)" />
|
|
|
|
<input type="submit" name="submit_event" value="<?php echo get_lang('Ok'); ?>" onclick="selectAll(this.form.elements[7],true)" />
|
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
|