示例#1
0
function cf_check_time($no)
{
    global $cformsSettings;
    $t1f = $t2f = false;
    if (strlen($cformsSettings['form' . $no]['cforms' . $no . '_startdate']) > 1) {
        $t1 = cf_make_time(stripslashes($cformsSettings['form' . $no]['cforms' . $no . '_startdate']));
    } else {
        $t1f = true;
    }
    if (strlen($cformsSettings['form' . $no]['cforms' . $no . '_enddate']) > 1) {
        $t2 = cf_make_time(stripslashes($cformsSettings['form' . $no]['cforms' . $no . '_enddate']));
    } else {
        $t2f = true;
    }
    return ($t1f || $t1 <= time()) && ($t2f || $t2 >= time()) ? true : false;
}
echo $date[0];
?>
"/>
                        <input type="text" id="cforms_endtime" name="cforms_endtime" value="<?php 
echo $date[1];
?>
"/><a class="cf_timebutt2" href="javascript:void(0);"><img src="<?php 
echo $cforms_root;
?>
/images/clock.gif" alt="" title="<?php 
_e('Time entry.', 'cforms');
?>
"/></a>
						<label for="cforms_startdate"><?php 
if ($dt == 'x' && strlen($cformsSettings['form' . $no]['cforms' . $no . '_enddate']) > 1) {
    $dt = cf_make_time(stripslashes($cformsSettings['form' . $no]['cforms' . $no . '_enddate'])) - time();
    if ($dt > 0) {
        echo __('The form will be available for another ', 'cforms') . sec2hms($dt);
    } else {
        echo __('The form is not available anymore.', 'cforms');
    }
}
?>
</label>
                    </td>
				</tr>

				<?php 
if ($cformsSettings['form' . $no]['cforms' . $no . '_maxentries'] != '' || $cformsSettings['form' . $no]['cforms' . $no . '_startdate'] != '' || $cformsSettings['form' . $no]['cforms' . $no . '_enddate'] != '') {
    ?>
				<tr class="ob">