Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function getareaselect($cdggdeicd = '', $cehifijiea = '', $djaicbjaa = '', $dicceafhif = '') {
  15. $baibhebhhf = new TableClass( 'area', 'aid' );
  16. $jbaejjhid = $baibhebhhf->getdata( '', '', 'aid asc' );
  17. foreach ($jbaejjhid as $cbffhifjfh) {
  18. $dddhhcjhaa[$cbffhifjfh['aid']] = $cbffhifjfh['name_cn'];
  19. }
  20.  
  21. return getselectstr( $cdggdeicd, $dddhhcjhaa, $cehifijiea, $djaicbjaa, $dicceafhif );
  22. }
  23.  
  24. include( '../lib/common.inc.php' );
  25. include( 'function_common.php' );
  26. initgp( array( 'page', 'action', 'state', 'value', 'payid', 'ids', 'did', 'delids' ) );
  27. $Table = new TableClass( 'delivery', 'did' );
  28.  
  29. if (empty( $action )) {
  30. initgp( array( 'state', 'orderby', 'orderway', 'keywords' ) );
  31.  
  32. if (!empty( $state )) {
  33. $wherestr[] = ( . 'state=\'' . $state . '\'' );
  34. }
  35.  
  36.  
  37. if (!empty( $keywords )) {
  38. $wherestr[] = . ' CONCAT(areaname) like \'%' . $keywords . '%\' ';
  39. }
  40.  
  41.  
  42. if (!empty( $wherestr )) {
  43. $wheresql = implode( ' AND ', $wherestr );
  44. }
  45.  
  46. $orderway = ($orderway == 'desc' ? 'desc' : 'asc');
  47.  
  48. if (!empty( $orderby )) {
  49. $orderstr = ( . $orderby . ' ' ) . $orderway;
  50. }
  51.  
  52. $total = $Table->getcount( $wheresql );
  53. $pagesize = 15;
  54. $page = (empty( $page ) ? max( 1, intval( $page ) ) : 1);
  55. $offset = ( $page - 1 ) * $pagesize;
  56. $dataarray = $Table->getdata( ( . $offset . ',' ) . $pagesize, $wheresql, $orderstr );
  57. include( 'tpl/delivery_list.htm' );
  58. } else {
  59. if ($action == 'add') {
  60. initgp( array( 'did', 'areaid', 'def', 'state', 'max_weight', 'days', 'remark', 'deliveryname', 'com', 'logo', 'queryurl', 'first_weight', 'second_weight', 'continue_weight', 'first_fee', 'second_fee', 'continue_fee', 'fuel_fee', 'listorder', 'customs_fee' ) );
  61.  
  62. if (( !empty( $_POST ) && !empty( $deliveryname ) )) {
  63. if (empty( $areaid )) {
  64. alertmsg( '地区必须选择!', '-1' );
  65. }
  66.  
  67.  
  68. if (empty( $deliveryname )) {
  69. alertmsg( '快递名不能为空!', '-1' );
  70. }
  71.  
  72. $areaname = DB::result_first( 'select name_en from ' . DB::table( 'area' ) . ( . ' where aid = \'' . $areaid . '\'' ) );
  73.  
  74. if ($def == 1) {
  75. editstate( $Table->table, 'def', '1', 0 );
  76. }
  77.  
  78. $arrayadd = array( 'areaid' => getnum( $areaid ), 'areaname' => char_cv( $areaname ), 'def' => getnum( $def ), 'state' => getnum( $state ), 'deliveryname' => char_cv( $deliveryname ), 'com' => char_cv( $com ), 'logo' => char_cv( $logo ), 'queryurl' => $queryurl, 'first_weight' => getnum( $first_weight ), 'continue_weight' => getnum( $continue_weight ), 'max_weight' => getnum( $max_weight ), 'first_fee' => getnum( $first_fee ), 'continue_fee' => getnum( $continue_fee ), 'fuel_fee' => getnum( $fuel_fee ), 'customs_fee' => getnum( $customs_fee ), 'days' => char_cv( $days ), 'listorder' => getnum( $listorder ), 'remark' => $remark );
  79. $info = $Table->add( $arrayadd );
  80.  
  81. if (getnum( $info )) {
  82. ................................................................................
  83. ........................................
  84. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement