|
@@ -72,6 +72,8 @@ class Color extends Start_Controller {
|
|
$timetj = $this->input->post('timetj',true);
|
|
$timetj = $this->input->post('timetj',true);
|
|
$timetk = strtotime($timetk);
|
|
$timetk = strtotime($timetk);
|
|
$timetj = strtotime($timetj);
|
|
$timetj = strtotime($timetj);
|
|
|
|
+ $xztime = $this->input->post('xztime',true);
|
|
|
|
+ $time_type = empty($xztime)?0:2;
|
|
$where = "1=1";
|
|
$where = "1=1";
|
|
if($title)
|
|
if($title)
|
|
{
|
|
{
|
|
@@ -96,10 +98,18 @@ class Color extends Start_Controller {
|
|
if($developer){
|
|
if($developer){
|
|
$where .= " and developer = '$developer'";
|
|
$where .= " and developer = '$developer'";
|
|
}
|
|
}
|
|
- if($timetk && $timetj)
|
|
|
|
- {
|
|
|
|
- $where .= " and time > '$timetk' and time < '$timetj'";
|
|
|
|
- }
|
|
|
|
|
|
+ if($time_type == 2){
|
|
|
|
+ if($timetk && $timetj)
|
|
|
|
+ {
|
|
|
|
+ $where .= " and time > '$timetk' and time < '$timetj'";
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if($timetk && $timetj)
|
|
|
|
+ {
|
|
|
|
+ $where .= " and edittime > '$timetk' and edittime < '$timetj'";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if($color){
|
|
if($color){
|
|
$where .= " and color like '%$color%'";
|
|
$where .= " and color like '%$color%'";
|
|
}
|
|
}
|
|
@@ -107,7 +117,12 @@ class Color extends Start_Controller {
|
|
$where .= " and lowe like '%$lowe%'";
|
|
$where .= " and lowe like '%$lowe%'";
|
|
}
|
|
}
|
|
//数据排序
|
|
//数据排序
|
|
- $order_str = "edittime desc";
|
|
|
|
|
|
+ if($time_type == 2){
|
|
|
|
+ $order_str = "id desc";
|
|
|
|
+ }else{
|
|
|
|
+ $order_str = "edittime desc";
|
|
|
|
+ }
|
|
|
|
+
|
|
if(empty($page))
|
|
if(empty($page))
|
|
{
|
|
{
|
|
$start = 0;
|
|
$start = 0;
|
|
@@ -117,6 +132,7 @@ class Color extends Start_Controller {
|
|
{
|
|
{
|
|
$start = ($page - 1)*$perpage;
|
|
$start = ($page - 1)*$perpage;
|
|
}
|
|
}
|
|
|
|
+
|
|
$info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,content,time,edittime',$order_str,$start,$perpage);
|
|
$info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,content,time,edittime',$order_str,$start,$perpage);
|
|
foreach ($info_list as $key=>$value)
|
|
foreach ($info_list as $key=>$value)
|
|
{
|
|
{
|