Advertisement
Guest User

unzend.com_ioncube_decoder7

a guest
Feb 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.58 KB | None | 0 0
  1. <?php
  2.  
  3. ioncube decoder https://www.unzend.com
  4. define("ADMINAREA", true);
  5. require("../init.php");
  6. $aInt = new WHMCS\Admin("View Cancellation Requests");
  7. $aInt->title = $aInt->lang("clients", "cancelrequests");
  8. $aInt->sidebar = "clients";
  9. $aInt->icon = "cancelrequests";
  10. $aInt->helplink = "Cancellation Requests";
  11. $completed = $whmcs->get_req_var("completed");
  12. if( $action == "delete" )
  13. {
  14.     check_token("WHMCS.admin.default");
  15.     delete_query("tblcancelrequests", array( "id" => $id ));
  16.     redir();
  17. }
  18.  
  19. $aInt->deleteJSConfirm("doDelete", "clients", "cancelrequestsdelete", "?action=delete&id=");
  20. ob_start();
  21. echo $aInt->beginAdminTabs(array( $aInt->lang("global", "searchfilter") ));
  22. echo "\n<form action=\"";
  23. echo $whmcs->getPhpSelf();
  24. echo "\" method=\"get\"><input type=\"hidden\" name=\"filter\" value=\"true\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">";
  25. echo $aInt->lang("fields", "reason");
  26. echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"reason\" class=\"form-control input-300\" value=\"";
  27. echo $reason;
  28. echo "\" /></td><td width=\"15%\" class=\"fieldlabel\">";
  29. echo $aInt->lang("fields", "client");
  30. echo "</td><td class=\"fieldarea\">";
  31. echo $aInt->clientsDropDown($userid, false, "userid", true);
  32. echo "</td></tr>\n<tr><td class=\"fieldlabel\">";
  33. echo $aInt->lang("fields", "domain");
  34. echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domain\" class=\"form-control input-300\" value=\"";
  35. echo $domain;
  36. echo "\" /></td><td class=\"fieldlabel\">";
  37. echo $aInt->lang("fields", "type");
  38. echo "</td><td class=\"fieldarea\"><select name=\"type\" class=\"form-control select-inline\"><option value=\"\">";
  39. echo $aInt->lang("global", "any");
  40. echo "</option><option value=\"Immediate\"";
  41. if( $type == "Immediate" )
  42. {
  43.     echo " selected";
  44. }
  45.  
  46. echo ">";
  47. echo $aInt->lang("clients", "cancelrequestimmediate");
  48. echo "</option><option value=\"End of Billing Period\"";
  49. if( $type == "End of Billing Period" )
  50. {
  51.     echo " selected";
  52. }
  53.  
  54. echo ">";
  55. echo $aInt->lang("clients", "cancelrequestendofperiod");
  56. echo "</option></select></td></tr>\n<tr><td class=\"fieldlabel\">";
  57. echo $aInt->lang("mergefields", "serviceid");
  58. echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"serviceid\" class=\"form-control input-100\" value=\"";
  59. echo $serviceid;
  60. echo "\" /></td><td class=\"fieldlabel\">&nbsp;</td><td class=\"fieldarea\">&nbsp;</td></tr>\n</table>\n\n<div class=\"btn-container\">\n    <input type=\"submit\" value=\"Filter\" class=\"btn btn-default\" />\n</div>\n\n</form>\n\n";
  61. echo $aInt->endAdminTabs();
  62. echo "\n<p>\n    <div class=\"btn-group\" role=\"group\">\n        <a href=\"";
  63. echo $_SERVER["PHP_SELF"];
  64. echo "\" class=\"btn btn-default";
  65. if( !$completed )
  66. {
  67.     echo " active";
  68. }
  69.  
  70. echo "\">";
  71. echo $aInt->lang("clients", "cancelrequestsopen");
  72. echo "</a>\n        <a href=\"";
  73. echo $_SERVER["PHP_SELF"];
  74. echo "?completed=true\" class=\"btn btn-default";
  75. if( $completed )
  76. {
  77.     echo " active";
  78. }
  79.  
  80. echo "\">";
  81. echo $aInt->lang("clients", "cancelrequestscompleted");
  82. echo "</a>\n    </div>\n</p>\n\n";
  83. $aInt->sortableTableInit("date", "ASC");
  84. $query = "FROM tblcancelrequests INNER JOIN tblhosting ON tblhosting.id=tblcancelrequests.relid INNER JOIN tblproducts ON tblproducts.id=tblhosting.packageid INNER JOIN tblproductgroups ON tblproductgroups.id=tblproducts.gid INNER JOIN tblclients ON tblhosting.userid=tblclients.id WHERE ";
  85. $filter = false;
  86. $criteria = array(  );
  87. if( $reason )
  88. {
  89.     $criteria[] = "tblcancelrequests.reason LIKE '%" . db_escape_string($reason) . "%'";
  90.     $filter = true;
  91. }
  92.  
  93. if( $domain )
  94. {
  95.     $criteria[] = "tblhosting.domain LIKE '%" . db_escape_string($domain) . "%'";
  96.     $filter = true;
  97. }
  98.  
  99. if( $userid )
  100. {
  101.     $criteria[] = "tblhosting.userid=" . (int) $userid;
  102.     $filter = true;
  103. }
  104.  
  105. if( $serviceid )
  106. {
  107.     $criteria[] = "tblcancelrequests.relid=" . (int) $serviceid;
  108.     $filter = true;
  109. }
  110.  
  111. if( $type )
  112. {
  113.     $criteria[] = "tblcancelrequests.type='" . db_escape_string($type) . "'";
  114.     $filter = true;
  115. }
  116.  
  117. if( !$filter )
  118. {
  119.     if( $completed )
  120.     {
  121.         $criteria[] = "(tblhosting.domainstatus='Cancelled' OR tblhosting.domainstatus='Terminated') ";
  122.     }
  123.     else
  124.     {
  125.         $criteria[] = "(tblhosting.domainstatus!='Cancelled' AND tblhosting.domainstatus!='Terminated') ";
  126.     }
  127.  
  128. }
  129.  
  130. $query .= implode(" AND ", $criteria);
  131. $result = full_query("SELECT COUNT(tblcancelrequests.id) " . $query);
  132. $data = mysql_fetch_array($result);
  133. $numrows = $data[0];
  134. $query .= " ORDER BY tblcancelrequests.date ASC";
  135. $query = "SELECT tblcancelrequests.*,tblhosting.domain,tblhosting.nextduedate,tblproducts.name AS productname,tblproductgroups.name AS groupname,tblhosting.id AS productid,tblhosting.userid,tblclients.firstname,tblclients.lastname,tblclients.companyname,tblclients.groupid " . $query . " LIMIT " . (int) ($page * $limit) . "," . (int) $limit;
  136. $result = full_query($query);
  137. while( $data = mysql_fetch_array($result) )
  138. {
  139.     $clicount++;
  140.     $id2 = $data["id"];
  141.     $date = $data["date"];
  142.     $relid = $data["relid"];
  143.     $reason = $data["reason"];
  144.     $type = $data["type"];
  145.     $date = fromMySQLDate($date, "time");
  146.     $domain = $data["domain"];
  147.     $productname = $data["productname"];
  148.     $groupname = $data["groupname"];
  149.     $productid = $data["productid"];
  150.     $userid = $data["userid"];
  151.     $firstname = $data["firstname"];
  152.     $lastname = $data["lastname"];
  153.     $companyname = $data["companyname"];
  154.     $groupid = $data["groupid"];
  155.     $nextduedate = $data["nextduedate"];
  156.     $nextduedate = fromMySQLDate($nextduedate);
  157.     $xname = "<a href=\"clientshosting.php?userid=" . $userid . "&id=" . $productid . "\">" . $groupname . " - " . $productname . "</a><br>" . $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid);
  158.     if( $domain )
  159.     {
  160.         $xname .= " (" . $domain . ")";
  161.     }
  162.  
  163.     $type = ($type == "Immediate" ? $aInt->lang("clients", "cancelrequestimmediate") : $aInt->lang("clients", "cancelrequestendofperiod") . "<br>(" . $nextduedate . ")");
  164.     $tabledata[] = array( $date, $xname, "<textarea rows=\"3\" class=\"form-control\" readonly>" . $reason . "</textarea>", $type, "<a href=\"#\" onClick=\"doDelete('" . $id2 . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>" );
  165. }
  166. echo $aInt->sortableTable(array( $aInt->lang("fields", "date"), $aInt->lang("fields", "product"), $aInt->lang("fields", "reason"), $aInt->lang("fields", "type"), "" ), $tabledata);
  167. $content = ob_get_contents();
  168. ob_end_clean();
  169. $aInt->content = $content;
  170. $aInt->jquerycode = $jquerycode;
  171. $aInt->jscode = $jscode;
  172. $aInt->display();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement