Fix: Solve phpcodesniffer errors and warning

This commit is contained in:
Laurent Destailleur 2011-09-14 22:20:09 +00:00
parent 852a997559
commit 0b624b859a
2 changed files with 57 additions and 57 deletions

View File

@ -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;

View File

@ -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,8 +53,8 @@ $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');
@ -72,36 +70,35 @@ foreach (glob('*.js') as $filename) {
} }
?> ?>
</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.
</blockquote>
</form> </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>