Last active
August 29, 2015 13:56
-
-
Save usual-tools/9205302 to your computer and use it in GitHub Desktop.
初日と終了日が同じ場合に日べつ種類を「単日」にする。http://www.7-2.jp/contents/881
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 初日と終了日が同じ場合に日べつ種類を「単日」にする | |
// first_date 初日 | |
// last_date 終了日 | |
// single_day 単日 | |
// multi_day 複数日 | |
// の場合 | |
if ( !empty($this->data['Notice']['first_date']) && $this->data['Notice']['first_date']==$this->data['Notice']['last_date'] ) { | |
$last_date_kind = 'single_day'; | |
} else { | |
$last_date_kind = 'multi_day'; | |
} | |
?> | |
<p><input type="radio" name="last_date_kind" value="single_day" <?php if ( $last_date_kind=='single_day' ) { ?> checked="checked"<?php } ?> id="last_date_kind_single_day">単日</p> | |
<p><input type="radio" name="last_date_kind" value="multi_day" <?php if ( $last_date_kind=='multi_day' ) { ?> checked="checked"<?php } ?> id="last_date_kind_multi_day">複数日</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment