样式控制

master
sunke 5 years ago
parent fa70a3c77a
commit 4f98f9fabe

@ -1048,7 +1048,7 @@ class ToolController extends ThinkController {
$paramsName = $status.'_start';
for ($i = 1; $i < 13; $i++) {
$name = $paramsName.$i;
if (empty($_REQUEST[$name])) {
if ($_REQUEST[$name] == '') {
return $this->error('时间选择不能为空');
}else {
if ($i < 7) {
@ -1057,10 +1057,40 @@ class ToolController extends ThinkController {
$endTime .= $_REQUEST[$name];
}
}
$this->checkTimeFormat($i, $startTime, $endTime, $_REQUEST[$name]);
}
$start_timeArr = str_split($startTime, 1);
$startTimeStr = '';
foreach ($start_timeArr as $timeKey => $start_time) {
if ($timeKey == 1 || $timeKey == 3) {
$startTimeStr .= $start_time.':';
}else {
$startTimeStr .= $start_time;
}
}
$st = '2020-03-23'.' '.$startTimeStr;
$startTimeStamp = strtotime($st);
$end_timeArr = str_split($endTime, 1);
$endTimeStr = '';
foreach ($end_timeArr as $timeKey1 => $end_time) {
if ($timeKey1 == 1 || $timeKey1 == 3) {
$endTimeStr .= $end_time.':';
}else {
$endTimeStr .= $end_time;
}
}
$et = '2020-03-23'.' '.$endTimeStr;
$endTimeStamp = strtotime($et);
if ($startTimeStamp >= $endTimeStamp) {
return $this->error('开始时间不能大于结束时间');
}
switch($status) {
case 'daily':
$limit_time_type = 'day';

@ -79,16 +79,16 @@
<span class="form_radio">
<label><input type="radio" name="status" value="daily" checked="checked"/> 每日</label>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start1" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start2" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start1" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start2" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start3" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start4" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start3" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start4" value="{$info.title|default='0'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start5" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start6" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start5" value="{$info.title|default='0'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start6" value="{$info.title|default='0'}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
@ -96,16 +96,16 @@
</div>
<div class="input-list" style="margin-left:20px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start7" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start8" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start7" value="{$info.title|default='2'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start8" value="{$info.title|default='3'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start9" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start10" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start9" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start10" value="{$info.title|default='9'}" placeholder="">
<span style="margin-left:10px">:</span>
<div class="input-append date" id="datetimepicker" style="display:inline-block;margin-left:5px">
<input type="text" class="" style="width:10px;" maxlength="1" name="daily_start11" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px" maxlength="1" name="daily_start12" value="{$info.title|default=''}" placeholder="">
<input type="text" class="" style="width:10px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start11" value="{$info.title|default='5'}" placeholder="">
<input type="text" class="" style="width:10px;margin-left:5px;border:none;border-radius:0px;border-bottom:1px solid #ccc;-webkit-box-shadow:inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);" maxlength="1" name="daily_start12" value="{$info.title|default='9'}" placeholder="">
<span class="add-on"><i class="icon-th"></i></span>
</div>
@ -113,7 +113,7 @@
</div>
</span>
<span class="notice-text">说明:时间格式(00:00:00)</span>
<span class="notice-text">说明:时间格式(24小时制,时间设置范围00:00:00 23:59:59)</span>
</td>
</tr>

Loading…
Cancel
Save