Example #1
0
 /**
  *  Test time_select() function
  *
  *  Test {@link time_select()} function in procedural file
  *  {@link date_helper.php}
  */
 public function testTime_select_function()
 {
     $_REQUEST['Person']['lunch(4i)'] = '08';
     $_REQUEST['Person']['lunch(5i)'] = '12';
     $this->assertEquals('<select name="Person[lunch(4i)]">' . "\n" . '<option value="00">00</option>' . "\n" . '<option value="01">01</option>' . "\n" . '<option value="02">02</option>' . "\n" . '<option value="03">03</option>' . "\n" . '<option value="04">04</option>' . "\n" . '<option value="05">05</option>' . "\n" . '<option value="06">06</option>' . "\n" . '<option value="07">07</option>' . "\n" . '<option value="08"  selected="selected">08</option>' . "\n" . '<option value="09">09</option>' . "\n" . '<option value="10">10</option>' . "\n" . '<option value="11">11</option>' . "\n" . '<option value="12">12</option>' . "\n" . '<option value="13">13</option>' . "\n" . '<option value="14">14</option>' . "\n" . '<option value="15">15</option>' . "\n" . '<option value="16">16</option>' . "\n" . '<option value="17">17</option>' . "\n" . '<option value="18">18</option>' . "\n" . '<option value="19">19</option>' . "\n" . '<option value="20">20</option>' . "\n" . '<option value="21">21</option>' . "\n" . '<option value="22">22</option>' . "\n" . '<option value="23">23</option>' . "\n" . '</select>' . "\n" . ' : <select name="Person[lunch(5i)]">' . "\n" . '<option value="00">00</option>' . "\n" . '<option value="01">01</option>' . "\n" . '<option value="02">02</option>' . "\n" . '<option value="03">03</option>' . "\n" . '<option value="04">04</option>' . "\n" . '<option value="05">05</option>' . "\n" . '<option value="06">06</option>' . "\n" . '<option value="07">07</option>' . "\n" . '<option value="08">08</option>' . "\n" . '<option value="09">09</option>' . "\n" . '<option value="10">10</option>' . "\n" . '<option value="11">11</option>' . "\n" . '<option value="12"  selected="selected">12</option>' . "\n" . '<option value="13">13</option>' . "\n" . '<option value="14">14</option>' . "\n" . '<option value="15">15</option>' . "\n" . '<option value="16">16</option>' . "\n" . '<option value="17">17</option>' . "\n" . '<option value="18">18</option>' . "\n" . '<option value="19">19</option>' . "\n" . '<option value="20">20</option>' . "\n" . '<option value="21">21</option>' . "\n" . '<option value="22">22</option>' . "\n" . '<option value="23">23</option>' . "\n" . '<option value="24">24</option>' . "\n" . '<option value="25">25</option>' . "\n" . '<option value="26">26</option>' . "\n" . '<option value="27">27</option>' . "\n" . '<option value="28">28</option>' . "\n" . '<option value="29">29</option>' . "\n" . '<option value="30">30</option>' . "\n" . '<option value="31">31</option>' . "\n" . '<option value="32">32</option>' . "\n" . '<option value="33">33</option>' . "\n" . '<option value="34">34</option>' . "\n" . '<option value="35">35</option>' . "\n" . '<option value="36">36</option>' . "\n" . '<option value="37">37</option>' . "\n" . '<option value="38">38</option>' . "\n" . '<option value="39">39</option>' . "\n" . '<option value="40">40</option>' . "\n" . '<option value="41">41</option>' . "\n" . '<option value="42">42</option>' . "\n" . '<option value="43">43</option>' . "\n" . '<option value="44">44</option>' . "\n" . '<option value="45">45</option>' . "\n" . '<option value="46">46</option>' . "\n" . '<option value="47">47</option>' . "\n" . '<option value="48">48</option>' . "\n" . '<option value="49">49</option>' . "\n" . '<option value="50">50</option>' . "\n" . '<option value="51">51</option>' . "\n" . '<option value="52">52</option>' . "\n" . '<option value="53">53</option>' . "\n" . '<option value="54">54</option>' . "\n" . '<option value="55">55</option>' . "\n" . '<option value="56">56</option>' . "\n" . '<option value="57">57</option>' . "\n" . '<option value="58">58</option>' . "\n" . '<option value="59">59</option>' . "\n" . '</select>' . "\n", time_select('Person', 'lunch'));
 }
Example #2
0
function second_select($id)
{
    return time_select($id, 'second', 59);
}
 public function time_select($method, $options = array())
 {
     return time_select($this->objectName, $method, $this->object, $options);
 }
Example #4
0
 }
 $day_month_form .= '</select></label>';
 $time_form = time_select("hour_value", $config['date_left'], "h", 24);
 $time_form .= time_select("minute", $config['date_left'], "m", 60);
 $time_form .= time_select("second", $config['date_left'], "s", 60);
 $time_form_2 = time_select("time_day", $config['time_left'], "d", 50);
 $time_form_2 .= time_select("time_hour", $config['time_left'], "h", 24);
 $time_form_2 .= time_select("time_minute", $config['time_left'], "m", 60);
 $time_form_2 .= time_select("time_second", $config['time_left'], "s", 60);
 $time_form_3 = time_select("cookie_day", $config['repeattime'], "d", 50);
 $time_form_3 .= time_select("cookie_hour", $config['repeattime'], "h", 24);
 $time_form_3 .= time_select("cookie_minute", $config['repeattime'], "m", 60);
 $time_form_3 .= time_select("cookie_second", $config['repeattime'], "s", 60);
 $time_form_4 = time_select("special_time_hour", $config['special_time'], "h", 24);
 $time_form_4 .= time_select("special_time_minute", $config['special_time'], "m", 60);
 $time_form_4 .= time_select("special_time_second", $config['special_time'], "s", 60);
 /*  */
 $checked = array('', 'checked');
 $checked_type = array();
 $checked_type[$config['type']] = 'selected';
 $checked_template = array();
 $checked_template[$config['template']] = 'selected';
 $checked_lang = array();
 $checked_lang[$config['language']] = 'selected';
 $checked_special_type = array();
 $checked_special_type[$config['special_type']] = 'selected';
 $date_left_date = date('d.m.Y', $config['date_left']);
 //$date_left_date = date('m.d.Y',$config['date_left']);
 $day_config = explode('/', $config['blockvisible']);
 $template_array = '';
 $dir = 'themes/';