Advertisement
Guest User

Untitled

a guest
Sep 11th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.3.0
  8. * @ Author : DeZender
  9. * @ Release on : 17.05.2011
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class actions {
  15. function actions() {
  16. }
  17.  
  18. function getaction($id = '') {
  19. global $db;
  20.  
  21. if (!$id) {
  22. $id = $this->id;
  23. }
  24.  
  25. global $appearance_settings;
  26. global $lng;
  27.  
  28. $date_format = $appearance_settings['date_format_long'];
  29. $row = $db->fetchAssoc( '' . 'select *, date_format(`date`,\'' . $date_format . '\') as date_nice from ' . TABLE_ACTIONS . ' where id=' . $id );
  30. global $appearance_settings;
  31.  
  32. $currency_pos = $appearance_settings['currency_pos'];
  33. $default_currency = $appearance_settings['default_currency'];
  34.  
  35. if ($currency_pos == 0) {
  36. $row['amount_nice'] = $default_currency . $row['amount'];
  37. } else {
  38. $row['amount_nice'] = $row['amount'] . $default_currency;
  39. }
  40.  
  41. return $row;
  42. }
  43.  
  44. function getall($page, $no_per_page, $order, $order_way, $user_id = '') {
  45. }
  46.  
  47. function add($type, $object_id, $user_id, $invoice, $pending, $extra = '') {
  48. global $db;
  49.  
  50. if ($type == 'store') {
  51. $db->query( 'delete from ' . TABLE_ACTIONS . ( '' . ' where type = \'' . $type . '\' and object_id=\'' . $object_id . '\'' ) );
  52. }
  53.  
  54. $timestamp = date( 'Y-m-d H:i:s' );
  55. $res = $db->query( 'INSERT INTO ' . TABLE_ACTIONS . ( '' . ' SET date=\'' . $timestamp . '\', type=\'' . $type . '\', object_id=\'' . $object_id . '\', user_id=\'' . $user_id . '\', invoice=\'' . $invoice . '\', pending = ' . $pending . ' , `extra` = \'' . $extra . '\' ' ) );
  56. return 1;
  57. }
  58.  
  59. function delete($id = '') {
  60. global $db;
  61.  
  62. if (!$id) {
  63. $id = $this->id;
  64. }
  65.  
  66. $res = $db->query( 'delete from ' . TABLE_ACTIONS . ' where id=' . $id );
  67. return 1;
  68. }
  69.  
  70. function deletelisting($ad_id) {
  71. global $db;
  72.  
  73. $res = $db->query( 'delete from ' . TABLE_ACTIONS . ( '' . ' where object_id=\'' . $ad_id . '\' and ( `type` like \'newad\' or `type` like \'renewad\' or `type` like \'featured\' or `type` like \'highlited\' or `type` like \'priority\' or `type` like \'video\' )' ) );
  74. return 1;
  75. }
  76.  
  77. function deleteuser($user_id) {
  78. global $db;
  79.  
  80. $res = $db->query( 'delete from ' . TABLE_ACTIONS . ( '' . ' where object_id=\'' . $user_id . '\' and `type` like \'store\'' ) );
  81. return 1;
  82. }
  83.  
  84. function deletesubscription($sub_id) {
  85. global $db;
  86.  
  87. $res = $db->query( 'delete from ' . TABLE_ACTIONS . ( '' . ' where object_id=\'' . $sub_id . '\' and ( `type` = \'newpkg\' or `type` like \'renewpkg\' )' ) );
  88. return 1;
  89. }
  90.  
  91. function removepending($id) {
  92. global $db;
  93.  
  94. if (!$id) {
  95. $id = $this->id;
  96. }
  97.  
  98. $res = $db->query( 'update ' . TABLE_ACTIONS . ' set pending=0 where id=' . $id );
  99. return 1;
  100. }
  101. ..........................
  102. ..............
  103. .......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement