navigation  interaction  search

 other resources

root/tags/phpbms-0.61/timepicker.php

Revision 51 (checked in by brieb, 3 years ago)

- Added license to the top of every page with code.

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