# takes decimal
# returns hh:mm
function enc_hhmm($str) {
+ if(strlen($str) == 0) {
+ return '';
+ }
$hours = floor($str);
$minutes = round(($str - $hours) * 60);
$str = sprintf("%d:%02d", $hours, $minutes);
<!--~opt_display_1 start~-->
<!--~~display_body start~~-->
<h2>~singular.cap~ details</h2>
- <!--~display_row start~--><!--~display_short start~-->
+<!--~display_row start~--><!--~display_short start~-->
<div><span class="caption">~caption.html~:</span> ~~~name~.html~~</div>
- <!--~end~--><!--~display_html start~-->
+<!--~end~--><!--~display_html start~-->
<div><span class="caption">~caption.html~:</span> <div style="padding-left: 20px; border: 1px solid black">~~~name~~~</div></div>
- <!--~end~--><!--~display_multiline start~-->
+<!--~end~--><!--~display_multiline start~-->
<div><span class="caption">~caption.html~:</span> <div style="padding-left: 20px">~~~name~.htmlbrtab~~</div></div>
- <!--~end~--><!--~end~-->
+<!--~end~--><!--~end~-->
<p><a href="~form_name~?~form_name~_edit_id=~~id.attr~~">Edit</a></p>
<!--~~end~~-->
echo '401 Unauthorized';
exit;
}
- <!--~end~--><!--~pulldowns start~-->
+<!--~end~--><!--~pulldowns start~-->
pulldown('~name~', array('option 1', 'option 2', 'option 3'));
- <!--~end~--><!--~opt_db_3 start~-->
+<!--~end~--><!--~opt_db_3 start~-->
$edit_id = format_int($_REQUEST['~form_name~_edit_id']);
unset($_REQUEST['~form_name~_edit_id']);
if($edit_id) {
~form_name~_display_listing();
return;
}
- <!--~end~-->
+<!--~end~-->
tem_show('new_msg');
}<!--~end~-->