function get_payperiod_start($payperiod = NULL) { if (!$payperiod) { $payperiod = current_payperiod(); } $payperiod -= 1; $out = get_first_payperiod() + get_payperiod_length() * $payperiod; return $out; }
function draw_first_payperiod_form() { $today = '"'.date('Y-m-d').'"'; $firstpp = date('Y-m-d',mktime(get_first_payperiod())); ?> <form class='form' role="form" action='' method="post"> <?php echo 'First Payperiod: '.$firstpp; ?> <div class="form-group"> <div class="input-group date"> <input type="text" class="form-control col-md-5" name="first-pp"><span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span> </div> </div> <input type='hidden' name='first-pp-submit' value='true'> <button class="btn btn-default" onclick='submit()'>Update</button> </form> <? }