Fix: Solve phpcodesniffer errors and warning
This commit is contained in:
parent
852a997559
commit
0b624b859a
@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
define('NEWLINE', "\n");
|
define('NEWLINE', "\n");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DHTML_Calendar
|
||||||
|
*/
|
||||||
class DHTML_Calendar {
|
class DHTML_Calendar {
|
||||||
var $calendar_lib_path;
|
var $calendar_lib_path;
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,7 @@ setcookie('lang', $lang);
|
|||||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>Test for calendar.php</title>
|
||||||
Test for calendar.php
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -55,12 +53,12 @@ $calendar->load_files();
|
|||||||
|
|
||||||
<h1>Calendar.php test</h1>
|
<h1>Calendar.php test</h1>
|
||||||
|
|
||||||
<form action="test.php" method="get">
|
<form action="test.php" method="get">Select language: <select
|
||||||
Select language: <select name="lang" onchange="this.form.submit()">
|
name="lang" onchange="this.form.submit()">
|
||||||
<?php
|
<?php
|
||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
chdir('lang');
|
chdir('lang');
|
||||||
foreach (glob('*.js') as $filename) {
|
foreach (glob('*.js') as $filename) {
|
||||||
$l = preg_replace('/(^calendar-|.js$)/', '', $filename);
|
$l = preg_replace('/(^calendar-|.js$)/', '', $filename);
|
||||||
$selected = '';
|
$selected = '';
|
||||||
if ($l == $lang)
|
if ($l == $lang)
|
||||||
@ -69,48 +67,47 @@ foreach (glob('*.js') as $filename) {
|
|||||||
if ($l == 'en')
|
if ($l == 'en')
|
||||||
$display = 'EN';
|
$display = 'EN';
|
||||||
echo '<option ' . $selected . 'value="' . $l . '">' . $display . '</option>';
|
echo '<option ' . $selected . 'value="' . $l . '">' . $display . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<blockquote style="font-size: 90%">
|
<blockquote style="font-size: 90%"><b>NOTE</b>: as of this release,
|
||||||
<b>NOTE</b>: as of this release, 0.9.6, only "EN" and "RO", which I
|
0.9.6, only "EN" and "RO", which I maintain, function correctly. Other
|
||||||
maintain, function correctly. Other language files do not work
|
language files do not work because they need to be updated. If you
|
||||||
because they need to be updated. If you update some language file,
|
update some language file, please consider sending it back to me so that
|
||||||
please consider sending it back to me so that I can include it in the
|
I can include it in the calendar distribution.</blockquote>
|
||||||
calendar distribution.
|
</form>
|
||||||
</blockquote>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form action="test.php" method="get">
|
<form action="test.php" method="get"><input type="hidden"
|
||||||
<input type="hidden" name="submitted" value="1" />
|
name="submitted" value="1" />
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>Date 1:</td>
|
||||||
Date 1:
|
<td><?php $calendar->make_input_field(
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php $calendar->make_input_field(
|
|
||||||
// calendar options go here; see the documentation and/or calendar-setup.js
|
// calendar options go here; see the documentation and/or calendar-setup.js
|
||||||
array('firstDay' => 1, // show Monday first
|
array(
|
||||||
|
'firstDay' => 1, // show Monday first
|
||||||
'showsTime' => true,
|
'showsTime' => true,
|
||||||
'showOthers' => true,
|
'showOthers' => true,
|
||||||
'ifFormat' => '%Y-%m-%d %I:%M %P',
|
'ifFormat' => '%Y-%m-%d %I:%M %P',
|
||||||
'timeFormat' => '12'),
|
'timeFormat' => '12'
|
||||||
|
),
|
||||||
// field attributes go here
|
// field attributes go here
|
||||||
array('style' => 'width: 15em; color: #840; background-color: #ff8; border: 1px solid #000; text-align: center',
|
array(
|
||||||
|
'style' => 'width: 15em; color: #840; background-color: #ff8; border: 1px solid #000; text-align: center',
|
||||||
'name' => 'date1',
|
'name' => 'date1',
|
||||||
'value' => strftime('%Y-%m-%d %I:%M %P', strtotime('now')))); ?>
|
'value' => strftime('%Y-%m-%d %I:%M %P', strtotime('now'))
|
||||||
</td>
|
)
|
||||||
|
); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<button>Submit</button>
|
<button>Submit</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user