Advertisement
Guest User

Untitled

a guest
May 29th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 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.4.0
  8. * @ Author : DeZender
  9. * @ Release on : 30.03.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function _version_key() {
  15. $str = file_get_contents( ROOT_PATH . '/include/license.cert' );
  16. return $str;
  17. }
  18.  
  19. function __autoload($class_name) {
  20. $file = ROOT_PATH . 'include/model/' . $class_name . '.class.php';
  21.  
  22. if (!file_exists( $file )) {
  23. $file = ROOT_PATH . 'include/class/' . $class_name . '.class.php';
  24. }
  25.  
  26. include_once( $file );
  27. }
  28.  
  29. function upfiles_is($type, $key, $name) {
  30. $class_form = new form( );
  31. $show = $class_form->images( $name, 'imgurl', $key, $type, '', 50, 'input-text', '', '', '', 0 );
  32. return $show;
  33. }
  34.  
  35. function price_rate($id) {
  36. $class = new brand_car( );
  37. $class->wheres = 'brandid=' . $id;
  38. $str2 = $class->getList( );
  39. foreach ($str2 as $val) {
  40. $mins = price_car_min( $val['id'] );
  41.  
  42. if ($mins != 0) {
  43. $str[$val['id']] = $val['price'] - $mins;
  44. }
  45. }
  46.  
  47. $maxid = array_search( next( $str ), $str );
  48. $class2 = new brand_car( );
  49. $str3 = $class2->getInfo( $maxid );
  50. $min = price_car_min( $maxid );
  51. $max = $str3['price'];
  52. $str = round( ( $max - $min ) / $max * 100, 2 );
  53. return $str;
  54. }
  55.  
  56. function price_car_min($id) {
  57. global $tblprefix;
  58. global $webdb;
  59.  
  60. $sql = 'select min(oprice) as min from ' . $tblprefix . 'dealer_price where carid=\'' . $id . '\';';
  61. $price = $webdb->getValue( $sql );
  62. return $price['min'];
  63. }
  64.  
  65. function photo_enddete($id) {
  66. global $tblprefix;
  67. global $webdb;
  68.  
  69. $sql = 'SELECT createdate FROM ' . $tblprefix . 'brand_photo where brandid=299 ORDER BY createdate DESC limit 0,1';
  70. $str = $webdb->getValue( $sql );
  71. return $str['createdate'];
  72. }
  73.  
  74. function oprice_car($id, $url = false) {
  75. global $tblprefix;
  76. global $webdb;
  77.  
  78. $sql = 'select max(oprice) as maxp,min(oprice) as minp from ' . $tblprefix . 'dealer_price where carid=\'' . $id . '\';';
  79. $price = $webdb->getValue( $sql );
  80. $str = ($url == false ? $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª' : '<a href="' . $url . '" target="_blank" title="¾­ÏúÉ̱¨¼Û£º' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª">' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª</a>');
  81. $oprice = (( $price['maxp'] == 0 && $price['minp'] == 0 ) ? 'ÔÝÎÞ±¨¼Û' : $str);
  82. return $oprice;
  83. }
  84.  
  85. function brand0_all2($id) {
  86. global $tblprefix;
  87. global $webdb;
  88.  
  89. $sql = 'SELECT id FROM ' . $tblprefix . 'brand WHERE pid in(SELECT id FROM ' . $tblprefix . 'brand WHERE pid=' . $id . ') order by clicks DESC';
  90. $str = $webdb->getList( $sql );
  91. foreach ($str as $key => $val) {
  92. $nstr[] = $val['id'];
  93. }
  94.  
  95. $str = implode( ',', $nstr );
  96. return $str;
  97. }
  98.  
  99. function brand1_all2($id) {
  100. global $tblprefix;
  101. global $webdb;
  102.  
  103. $sql = 'SELECT id FROM ' . $tblprefix . 'brand WHERE pid=' . $id . ' and level=2 order by clicks DESC';
  104. $str = $webdb->getList( $sql );
  105. foreach ($str as $key => $val) {
  106. $nstr[] = $val['id'];
  107. }
  108.  
  109. $str = implode( ',', $nstr );
  110. return $str;
  111. }
  112.  
  113. function oprice_brand($id, $url = false) {
  114. global $tblprefix;
  115. global $webdb;
  116.  
  117. $sql = 'SELECT max(oprice) as maxp,min(oprice) as minp FROM ' . $tblprefix . 'dealer_price WHERE brandid2=' . $id . ' and oprice!=0';
  118. $price = $webdb->getValue( $sql );
  119. $str = ($url == false ? $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª' : '<a href="' . $url . '" target="_blank" title="¾­ÏúÉ̱¨¼Û£º' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª">' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª</a>');
  120. $oprice = (( $price['maxp'] == 0 && $price['minp'] == 0 ) ? 'ÔÝÎÞ±¨¼Û' : $str);
  121. return $oprice;
  122. }
  123.  
  124. function dealer_oprice_brand($bid, $did, $url = false) {
  125. global $tblprefix;
  126. global $webdb;
  127.  
  128. $sql = 'SELECT max(oprice) as maxp,min(oprice) as minp FROM ' . $tblprefix . 'dealer_price WHERE brandid=' . $bid . ' and dealerid=' . $did;
  129. $price = $webdb->getValue( $sql );
  130. $str = ($url == false ? $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª' : '<a href="' . $url . '" target="_blank" title="¾­ÏúÉ̱¨¼Û£º' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª">' . $price['minp'] . '-' . $price['maxp'] . 'ÍòÔª</a>');
  131. $oprice = (( $price['maxp'] == 0 && $price['minp'] == 0 ) ? 'ÔÝÎÞ±¨¼Û' : $str);
  132. return $oprice;
  133. }
  134.  
  135. function price_brand($id, $url = false) {
  136. global $tblprefix;
  137. global $webdb;
  138.  
  139. $sql = 'select max(price) as maxp,min(price) as minp from ' . $tblprefix . 'brand_car where brandid2=\'' . $id . '\';';
  140. $price = $webdb->getValue( $sql );
  141. $str = ($url == false ? $price['minp'] . '-' . $price['maxp'] . 'Íò' : '<a href="' . $url . '" target="_blank" title="³§ÉÌÖ¸µ¼¼Û£º' . $price['minp'] . '-' . $price['maxp'] . 'Íò">' . $price['minp'] . '-' . $price['maxp'] . 'Íò</a>');
  142. $bprice = (( $price['maxp'] == 0 && $price['minp'] == 0 ) ? 'ÔÝÎÞÖ¸µ¼¼Û' : $str);
  143. return $bprice;
  144. }
  145.  
  146. function pailiang_brand($id) {
  147. global $tblprefix;
  148. global $webdb;
  149.  
  150. $sql = 'select distinct pailiang from ' . $tblprefix . 'brand_car where brandid2=' . $id . ' order by pailiang asc;';
  151. $pailiang = $webdb->getList( $sql );
  152. return $pailiang;
  153. }
  154.  
  155. ...............................................
  156. ..............................
  157. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement