Guest User

Untitled

a guest
Sep 20th, 2020
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if ($iCustomerId == '1') {
  15. $cmp_ssql = '';
  16. $eSystem = " AND eSystem = 'General'";
  17. $sql = "SELECT * FROM company WHERE eStatus != 'Deleted' " . $cmp_ssql . ' order by tRegistrationDate desc';
  18. $cmp_ssql = '';
  19.  
  20. if (SITE_TYPE == 'Demo') {
  21. $cmp_ssql = " And rd.tRegistrationDate > '" . WEEK_DATE . "'";
  22. }
  23. $ssl = '';
  24.  
  25. if ($status != '' && $status == 'active') {
  26. $ssl = " AND rd.eStatus = '" . $status . "'";
  27. } elseif ($status != '' && $status == 'inactive') {
  28. $ssl = " AND rd.eStatus = '" . $status . "'";
  29. }
  30. $sql = "SELECT rd.*, c.vCompany companyFirstName, c.vLastName companyLastName FROM register_driver rd LEFT JOIN company c ON rd.iCompanyId = c.iCompanyId WHERE rd.eStatus != 'Deleted'" . $ssl . $cmp_ssql;
  31. $cmp_ssql = '';
  32.  
  33. if (SITE_TYPE == 'Demo') {
  34. $cmp_ssql = " And rd.tRegistrationDate > '" . WEEK_DATE . "'";
  35. }
  36. $ssl = '';
  37.  
  38. if ($status != '' && $status == 'active') {
  39. $ssl = " AND rd.eStatus = '" . $status . "'";
  40. } elseif ($status != '' && $status == 'inactive') {
  41. $ssl = " AND rd.eStatus = '" . $status . "'";
  42. }
  43. $sql = "SELECT count(rd.iDriverId) as tot_driver FROM register_driver rd LEFT JOIN company c ON rd.iCompanyId = c.iCompanyId and c.eStatus != 'Deleted' WHERE rd.eStatus != 'Deleted'";
  44. $cmp_ssql = '';
  45.  
  46. if (SITE_TYPE == 'Demo') {
  47. $cmp_ssql = " And rd.tRegistrationDate > '" . WEEK_DATE . "'";
  48. }
  49. $sql = "SELECT dv.*, m.vMake, md.vTitle,rd.vEmail, rd.vName, rd.vLastName, c.vName as companyFirstName, c.vLastName as companyLastName\r\nFROM driver_vehicle dv, register_driver rd, make m, model md, company c\r\nWHERE\r\ndv.iMakeId = m.iMakeId" . $cmp_ssql;
  50. $cmp_ssql = '';
  51.  
  52. if (SITE_TYPE == 'Demo') {
  53. $cmp_ssql = " And tRegistrationDate > '" . WEEK_DATE . "'";
  54. }
  55.  
  56. if ($status == 'all') {
  57. $sql = 'SELECT * FROM register_user WHERE 1 = 1 ';
  58. } else {
  59. $sql = "SELECT * FROM register_user WHERE eStatus != 'Deleted'";
  60. }
  61. $cmp_ssql = '';
  62.  
  63. if (SITE_TYPE == 'Demo') {
  64. $cmp_ssql = " And tRegistrationDate > '" . WEEK_DATE . "'";
  65. }
  66. $ssql1 = "AND (vEmail != '' OR vPhone != '')";
  67.  
  68. if ($status == 'all') {
  69. $sql = 'SELECT count(iUserId) as tot_rider FROM register_user WHERE 1 = 1 ' . $ssql1 . $cmp_ssql;
  70. } else {
  71. $sql = "SELECT count(iUserId) FROM register_user WHERE eStatus != 'Deleted'" . $ssql1 . $cmp_ssql;
  72. }
  73.  
  74. if (count($data) > 0) {
  75. $common_member = "SELECT iDriverId\r\nFROM register_driver\r\nWHERE tRegistrationDate < '" . $er_date . "'";
  76. $sql = 'DELETE FROM driver_vehicle WHERE iDriverId IN (' . $member . ')';
  77. $sql = 'DELETE FROM trips WHERE iDriverId IN (' . $member . ')';
  78. $sql = 'DELETE FROM log_file WHERE iDriverId IN (' . $member . ')';
  79. $sql = "DELETE FROM register_driver WHERE tRegistrationDate < '" . $date . "'";
  80. }
  81.  
  82. if (count($userObj->locations) > 0) {
  83. $locations = implode(', ', $userObj->locations);
  84. $locations_where = ' AND EXISTS(SELECT * FROM vehicle_type WHERE trips.iVehicleTypeId = vehicle_type.iVehicleTypeId AND vehicle_type.iLocationid IN(-1, ' . $locations . '))';
  85. }
  86.  
  87. if ($tripStatus != '') {
  88. if ($tripStatus == 'on ride') {
  89. $ssl = " AND (iActive = 'On Going Trip' OR iActive = 'Active') AND eCancelled='No'";
  90. } elseif ($tripStatus == 'cancelled') {
  91. $ssl = " AND (iActive = 'Canceled' OR eCancelled='yes')";
  92. } elseif ($tripStatus == 'finished') {
  93. $ssl = " AND iActive = 'Finished' AND eCancelled='No'";
  94. } else {
  95. $ssl = '';
  96. }
  97. $sql = "SELECT COUNT(iTripId) as tot FROM trips WHERE 1 = 1 AND eSystem = 'General'" . $cmp_ssql . $ssl . $dsql . $locations_where;
  98. }
  99.  
  100. if ($tripStatus != '') {
  101. if ($tripStatus == 'on ride') {
  102. $ssl = " AND (iActive = 'On Going Trip' OR iActive = 'Active') AND eCancelled='No'";
  103. } elseif ($tripStatus == 'cancelled') {
  104. $ssl = " AND (iActive = 'Canceled' OR eCancelled='yes')";
  105. } elseif ($tripStatus == 'finished') {
  106. $ssl = " AND iActive = 'Finished' AND eCancelled='No'";
  107. } else {
  108. $ssl = '';
  109. }
  110. $sql = 'SELECT iTripId FROM trips WHERE 1' . $cmp_ssql . $ssl . $dsql . $locations_where;
  111. }
  112.  
  113. if (SITE_TYPE == 'Demo') {
  114. $cmp_ssql = " And tEndDate > '" . WEEK_DATE . "'";
  115. }
  116.  
  117. if ($time == 'month') {
  118. $startDate = date('Y-m') . '-01';
  119. $endDate = date('Y-m') . '-31';
  120. $ssl = " AND tTripRequestDate BETWEEN '" . $startDate . "' AND '" . $endDate . "'";
  121. } elseif ($time == 'year') {
  122. $startDate1 = date('Y') . '-00-01';
  123. $endDate1 = date('Y') . '-12-31';
  124. $ssl = " AND tTripRequestDate BETWEEN '" . $startDate1 . "' AND '" . $endDate1 . "'";
  125. } else {
  126. $startDate2 = date('Y-m-d') . '';
  127. $endDate2 = date('Y-m-d') . '';
  128. $ssl = " AND tTripRequestDate BETWEEN '" . $startDate2 . "' AND '" . $endDate2 . "'";
  129. }
  130. $mailerCharSet = 'UTF-8';
  131. $mailerHost = 'mail.example.com';
  132. $mailerSMTPDebug = 0;
  133. $mailerSMTPAuth = true;
  134. $mailerPort = 25;
  135. $mailerUsername = 'username';
  136. $mailerPassword = 'password';
  137. $message = "The mail message was sent with the following mail setting:\r\nSMTP = aspmx.l.google.com\r\nsmtp_port = 25\r\nsendmail_from = YourMail@address.com";
  138. $headers = 'From: YOURMAIL@gmail.com';
  139. echo 'Check your email now....<BR/>';
  140. $NS = 'http://www.w3.org/2005/Atom';
  141. $ATOM_CONTENT_ELEMENTS = array('content', 'summary', 'title', 'subtitle', 'rights');
  142. $ATOM_SIMPLE_ELEMENTS = array('id', 'updated', 'published', 'draft');
  143. $debug = false;
  144. $depth = 0;
  145. $indent = 2;
  146. $ns_contexts = array();
  147. $ns_decls = array();
  148. $content_ns_decls = array();
  149. $content_ns_contexts = array();
  150. $is_xhtml = false;
  151. ........................................................................
  152. ..........................................
  153. .................
RAW Paste Data