SHARE
TWEET

Untitled

a guest Jan 20th, 2019 80 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 (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version         :   4.0.8.2
  8. * @ Author          :   DeZender
  9. * @ Release on      :   02.01.2019
  10. * @ Official site   :   http://DeZender.Net
  11. *
  12. */
  13.  
  14. $action = $_POST['action'];
  15.  
  16. if ($action == 'providers_list') {
  17.     $smmapi = new SMMApi();
  18.     $provider = $_POST['provider'];
  19.     $api = $conn->prepare('SELECT * FROM service_api WHERE id=:id');
  20.     $api->execute(['id' => $provider]);
  21.     $api = $api->fetch(PDO::FETCH_ASSOC);
  22.  
  23.     if ($api['api_type'] == 2) {
  24.         echo '<label class="col-sm-3 col-form-label">Servis</label>' . "\r\n" . '        <div class="col-sm-9">' . "\r\n" . '          <select class="form-control" name="service">' . "\r\n" . '              <option value="follow"';
  25.  
  26.         if ($_SESSION['data']['service'] == 'follow') {
  27.             echo 'selected';
  28.         }
  29.  
  30.         echo '>Takipçi</option>' . "\r\n" . '              <option value="like"';
  31.  
  32.         if ($_SESSION['data']['service'] == 'like') {
  33.             echo 'selected';
  34.         }
  35.  
  36.         echo '>Beğeni</option>' . "\r\n" . '          </select>' . "\r\n" . '        </div>';
  37.     }
  38.     else if ($api['api_type'] == 1) {
  39.         $services = $smmapi->action(['key' => $api['api_key'], 'action' => 'services'], $api['api_url']);
  40.         echo '<div class="service-mode__block">' . "\r\n" . '          <div class="form-group">' . "\r\n" . '          <label>Servis</label>' . "\r\n" . '            <select class="form-control" name="service">';
  41.  
  42.         foreach ($services as $service) {
  43.             echo '<option value="' . $service->service . '"';
  44.  
  45.             if ($_SESSION['data']['service'] == $service->service) {
  46.                 echo 'selected';
  47.             }
  48.  
  49.             echo '>' . $service->name . ' - ' . priceFormat($service->rate) . '</option>';
  50.         }
  51.  
  52.         echo '</select>' . "\r\n" . '          </div>' . "\r\n" . '        </div>';
  53.     }
  54.  
  55.     unset($_SESSION['data']);
  56. }
  57. else if ($action == 'paymentmethod-sortable') {
  58.     $list = $_POST['methods'];
  59.  
  60.     foreach ($list as $method) {
  61.         $update = $conn->prepare('UPDATE payment_methods SET method_line=:line WHERE id=:id ');
  62.         $update->execute(['id' => $method['id'], 'line' => $method['line']]);
  63.     }
  64. }
  65. else if ($action == 'service-sortable') {
  66.     $list = $_POST['services'];
  67.  
  68.     foreach ($list as $service) {
  69.         $id = explode('-', $service['id']);
  70.         $update = $conn->prepare('UPDATE services SET service_line=:line WHERE service_id=:id ');
  71.         $update->execute(['id' => $id[1], 'line' => $service['line']]);
  72.     }
  73. }
  74. else if ($action == 'category-sortable') {
  75.     $list = $_POST['categories'];
  76.  
  77.     foreach ($list as $category) {
  78.         $update = $conn->prepare('UPDATE categories SET category_line=:line WHERE category_id=:id ');
  79.         $update->execute(['id' => $category['id'], 'line' => $category['line']]);
  80.     }
  81. }
  82. else if ($action == 'secret_user') {
  83.     $id = $_POST['id'];
  84.     $services = $conn->prepare('SELECT * FROM services RIGHT JOIN categories ON categories.category_id=services.category_id WHERE services.service_secret=\'1\' || categories.category_secret=\'1\'  ');
  85.     $services->execute(['id' => $id]);
  86.     $services = $services->fetchAll(PDO::FETCH_ASSOC);
  87.     $grouped = array_group_by($services, 'category_id');
  88.     $return = '<form class="form" action="' . site_url('admin/clients/export') . '" method="post" data-xhr="true">' . "\r\n" . '        <div class="modal-body">' . "\r\n\r\n" . '        <div class="services-import__body">' . "\r\n" . '               <div>' . "\r\n" . '                  <div class="services-import__list-wrap services-import__list-active">' . "\r\n" . '                     <div class="services-import__scroll-wrap">';
  89.  
  90.     foreach ($grouped as $category) {
  91.         $row = [
  92.             'table' => 'clients_category',
  93.             'where' => ['client_id' => $id, 'category_id' => $category[0]['category_id']]
  94.         ];
  95.         $return .= '<span>' . "\r\n" . '                            <div class="services-import__category">' . "\r\n" . '                               <div class="services-import__category-title">' . "\r\n" . '                                 <label> ';
  96.  
  97.         if ($category[0]['category_secret'] == 1) {
  98.             $return .= '<small><i class="fa fa-lock"></i></small> <input type="checkbox"';
  99.  
  100.             if (countRow($row)) {
  101.                 $return .= 'checked';
  102.             }
  103.  
  104.             $return .= ' class="tiny-toggle" data-tt-palette="blue" data-url="' . site_url('admin/clients/secret_category/' . $id) . '" data-id="' . $category[0]['category_id'] . '"> ';
  105.         }
  106.  
  107.         $return .= $category[0]['category_name'] . ' </label>' . "\r\n" . '                               </div>' . "\r\n" . '                            </div>' . "\r\n" . '                             <div class="services-import__packages">' . "\r\n" . '                                <ul>';
  108.  
  109.         for ($i = 0; $i < count($category); $i++) {
  110.             $row = [
  111.                 'table' => 'clients_service',
  112.                 'where' => ['client_id' => $id, 'service_id' => $category[$i]['service_id']]
  113.             ];
  114.             $return .= '<li id="service-' . $category[$i]['service_id'] . '">' . "\r\n" . '                                     <label>';
  115.  
  116.             if ($category[$i]['service_secret'] == 1) {
  117.                 $return .= '<small><i class="fa fa-lock"></i></small> ';
  118.             }
  119.  
  120.             $return .= $category[$i]['service_id'] . ' - ' . $category[$i]['service_name'] . "\r\n" . '                                        <span class="services-import__packages-price-edit" >';
  121.  
  122.             if ($category[$i]['service_secret'] == 1) {
  123.                 $return .= '<input type="checkbox"';
  124.  
  125.                 if (countRow($row)) {
  126.                     $return .= 'checked';
  127. ........................................................................
  128. ...............................................
  129. ...................
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top