Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Last active August 29, 2015 14:12
Show Gist options
  • Save taleeb35/d0a287730ed8783750e5 to your computer and use it in GitHub Desktop.
Save taleeb35/d0a287730ed8783750e5 to your computer and use it in GitHub Desktop.
<?php if($this->request->data['Control']['control_frequency_id'] == 4) { ?>
<?php $db_day_number = $control['Control']['day_number']; ?>
<?php if($db_day_number <= 30) { ?>
<div id="quarterly" style="margin-left: -10px;">
<?php echo $this->Form->input('select_quarter_month',array('type' => 'select', 'options' => $quarter_month, 'selected' => 'Month 1'));
echo $this->Form->input('select_quarter_date' ,array('type' => 'select', 'options' => $month_days_quarter, 'selected' => $db_day_number)); ?>
</div>
<?php } elseif($db_day_number > 30 && $db_day_number <= 60) { ?>
<div id="quarterly" style="margin-left: -10px;">
<?php echo $this->Form->input('select_quarter_month',array('type' => 'select', 'options' => $quarter_month, 'selected' => 'Month 2'));
echo $this->Form->input('select_quarter_date' ,array('type' => 'select', 'options' => $month_days_quarter, 'selected' => $db_day_number)); ?>
</div>
<?php } elseif($db_day_number > 60 && $db_day_number <= 90) { ?>
<div id="quarterly" style="margin-left: -10px;">
<?php echo $this->Form->input('select_quarter_month',array('type' => 'select', 'options' => $quarter_month, 'selected' => 'Month 3'));
echo $this->Form->input('select_quarter_date' ,array('type' => 'select', 'options' => $month_days_quarter, 'selected' => $db_day_number)); ?>
</div>
<?php }
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment