Permalink
Browse files

+allow multiple order fields

  • Loading branch information...
wadelau committed Apr 24, 2018
1 parent 4b11880 commit 8930e4006ee9150b54ec122f53cf7387e2ff8aa8
Showing with 11 additions and 4 deletions.
  1. +10 −3 class/pagenavi.class.php
  2. +1 −1 view/index_main.html
@@ -116,10 +116,17 @@ function getOrder(){
$order = "";
foreach($_REQUEST as $k=>$v){
if(strpos($k,"pnob") === 0){
$order = substr($k,4);
break;
$order .= substr($k,4);
if($v == 1){
$order .= " desc";
}
$order .= ",";
#break; # allow multiple order fields
}
}
if($order != ''{
$order .= "1 "; # + "order by 1 ", compatible with this->get('isasc');
})
#debug(__FILE__.":getOrder:$order");
return $order;
}
@@ -181,7 +188,7 @@ function getCondition($gtbl, $user){
$field = $arr[0];
$linkfield = $arr[1];
}
if(isset($_REQUEST[$field]) && $_REQUEST[$field] != ''
if(isset($_REQUEST[$field]) && $_REQUEST[$field] != ''
&& $_REQUEST[$field] != $v){
$v = $_REQUEST[$field];
}
@@ -158,7 +158,7 @@
</tr>
{/foreach}
<tr><td style="white-space:nowrap;">
<a href="{$ido}&tbl=fin_todotbl&pnobstate=1&tit=事项管理&pnsktouserid={$userid}">更多...</a></td></tr>
<a href="{$ido}&tbl=fin_todotbl&pnobstate=1&tit=事项管理&pnsktouserid={$userid}&pnobid=1">更多...</a></td></tr>
</table>
</div>
</td>

0 comments on commit 8930e40

Please sign in to comment.