navigation  interaction  search

 other resources

root/trunk/phpbms/timepicker.php

Revision 285 (checked in by brieb, 1 year ago)

Merging object oriented branch back into trunk.

  • Property svn:keywords set to LastChangedBy LastChangedDate LastChangedRevision
Line 
1 <?php
2 /*
3  $Rev$ | $LastChangedBy$
4  $LastChangedDate$
5  +-------------------------------------------------------------------------+
6  | Copyright (c) 2004 - 2007, Kreotek LLC                                  |
7  | All rights reserved.                                                    |
8  +-------------------------------------------------------------------------+
9  |                                                                         |
10  | Redistribution and use in source and binary forms, with or without      |
11  | modification, are permitted provided that the following conditions are  |
12  | met:                                                                    |
13  |                                                                         |
14  | - Redistributions of source code must retain the above copyright        |
15  |   notice, this list of conditions and the following disclaimer.         |
16  |                                                                         |
17  | - Redistributions in binary form must reproduce the above copyright     |
18  |   notice, this list of conditions and the following disclaimer in the   |
19  |   documentation and/or other materials provided with the distribution.  |
20  |                                                                         |
21  | - Neither the name of Kreotek LLC nor the names of its contributore may |
22  |   be used to endorse or promote products derived from this software     |
23  |   without specific prior written permission.                            |
24  |                                                                         |
25  | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     |
26  | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       |
27  | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
28  | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      |
29  | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   |
30  | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        |
31  | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   |
32  | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   |
33  | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     |
34  | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   |
35  | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    |
36  |                                                                         |
37  +-------------------------------------------------------------------------+
38 */
39     require_once("include/session.php");
40         
41     function displayTPBox(){   
42 ?>
43
44 <table border="0" cellspacing="0" cellpadding="0" style="width:230px;">
45     <tr>
46         <td width="100%" class="tpHead">&nbsp;</td>
47         <td class="tpHead"><button type="buttton" class="invisibleButtons" id="TPCancel" onclick="closeTPBox();"><img src="<?php echo APP_PATH ?>common/stylesheet/<?php echo STYLESHEET ?>/image/button-x.png" align="absmiddle" alt="x" width="16" height="16" border="0" /></button></td>       
48     </tr>
49 </table>
50 <table border="0" cellspacing="0" cellpadding="0" class="tpHour" style="width:230px;">
51     <tr>
52         <td onclick="tpClickHour(0)">00</td>
53         <td onclick="tpClickHour(1)">01</td>
54         <td onclick="tpClickHour(2)">02</td>
55         <td onclick="tpClickHour(3)">03</td>
56         <td onclick="tpClickHour(4)">04</td>
57         <td onclick="tpClickHour(5)">05</td>
58         <td onclick="tpClickHour(6)">06</td>
59         <td onclick="tpClickHour(7)">07</td>
60         <td onclick="tpClickHour(8)">08</td>
61         <td onclick="tpClickHour(9)">09</td>
62         <td onclick="tpClickHour(10)">10</td>
63         <td onclick="tpClickHour(11)">11</td>
64     </tr>
65     <tr>
66         <td onclick="tpClickHour(12)">12</td>
67         <td onclick="tpClickHour(13)">13</td>
68         <td onclick="tpClickHour(14)">14</td>
69         <td onclick="tpClickHour(15)">15</td>
70         <td onclick="tpClickHour(16)">16</td>
71         <td onclick="tpClickHour(17)">17</td>
72         <td onclick="tpClickHour(18)">18</td>
73         <td onclick="tpClickHour(19)">19</td>
74         <td onclick="tpClickHour(20)">20</td>
75         <td onclick="tpClickHour(21)">21</td>
76         <td onclick="tpClickHour(22)">22</td>
77         <td onclick="tpClickHour(23)">23</td>
78     </tr>
79 </table>
80 <table border="0" cellspacing="0" cellpadding="0" class="tpMinute" id="tpMinuteLess" width="230px">
81     <tr>
82         <td onclick="tpClickMinute(this)">:00</td>
83         <td onclick="tpClickMinute(this)">:05</td>
84         <td onclick="tpClickMinute(this)">:10</td>
85         <td onclick="tpClickMinute(this)">:15</td>
86         <td onclick="tpClickMinute(this)">:20</td>
87         <td onclick="tpClickMinute(this)">:25</td>
88     </tr>
89     <tr>
90         <td onclick="tpClickMinute(this)">:30</td>
91         <td onclick="tpClickMinute(this)">:35</td>
92         <td onclick="tpClickMinute(this)">:40</td>
93         <td onclick="tpClickMinute(this)">:45</td>
94         <td onclick="tpClickMinute(this)">:50</td>       
95         <td onclick="tpClickMinute(this)">:55</td>       
96     </tr>
97 </table>
98 <table border="0" cellspacing="0" cellpadding="0" class="tpMinute" id="tpMinuteMore"  width="230px" style="display:none;">
99     <tr>
100     <?php
101         for($i=0;$i<60;$i++){
102             if($i!=0 && ($i/6)==round($i/6,0))
103                 echo ("</TR><TR>");
104             ?><td onclick="tpClickMinute(this)">:<?php echo str_pad($i,2,"0",STR_PAD_LEFT)?></td><?php
105         }
106     ?>
107     </tr>
108 </table>
109
110 <div align=right>
111 <input name="TPmoreless" id="TPmoreless" type="button" value="more" class="smallButtons" onclick="switchMinutes(this)">
112 </div>
113 <?php    }//end function
114
115     if(!isset($_GET["cm"]))
116         $_GET["cm"]="shw";
117     
118     if(!isset($_GET["st"]))
119         $_GET["sd"]="12:00 AM";
120
121     switch($_GET["cm"]){
122         case "shw":
123             displayTPBox();
124         break;
125     }
126     
127 ?>
128
Note: See TracBrowser for help on using the browser.
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.