Changeset 762 for trunk/search.php
- Timestamp:
- Apr 11, 2005, 10:31:50 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/search.php
r688 r762 134 134 } 135 135 //----------------------------------------------------- template initialization 136 /**137 * instantiate number list for days in a template block138 *139 * @param string blockname140 * @param string selection141 */142 function get_day_list($blockname, $selection)143 {144 global $template;145 146 $template->assign_block_vars(147 $blockname, array('SELECTED' => '', 'VALUE' => 0, 'OPTION' => '--'));148 149 for ($i = 1; $i <= 31; $i++)150 {151 $selected = '';152 if ($i == (int)$selection)153 {154 $selected = 'selected="selected"';155 }156 $template->assign_block_vars(157 $blockname, array('SELECTED' => $selected,158 'VALUE' => $i,159 'OPTION' => str_pad($i, 2, '0', STR_PAD_LEFT)));160 }161 }162 163 /**164 * instantiate month list in a template block165 *166 * @param string blockname167 * @param string selection168 */169 function get_month_list($blockname, $selection)170 {171 global $template, $lang;172 173 $template->assign_block_vars(174 $blockname, array('SELECTED' => '',175 'VALUE' => 0,176 'OPTION' => '------------'));177 178 for ($i = 1; $i <= 12; $i++)179 {180 $selected = '';181 if ($i == (int)$selection)182 {183 $selected = 'selected="selected"';184 }185 $template->assign_block_vars(186 $blockname, array('SELECTED' => $selected,187 'VALUE' => $i,188 'OPTION' => $lang['month'][$i]));189 }190 }191 136 192 137 // start date
Note: See TracChangeset
for help on using the changeset viewer.