Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.8.2
- * @ Author : DeZender
- * @ Release on : 02.01.2019
- * @ Official site : http://DeZender.Net
- *
- */
- $action = $_POST['action'];
- if ($action == 'providers_list') {
- $smmapi = new SMMApi();
- $provider = $_POST['provider'];
- $api = $conn->prepare('SELECT * FROM service_api WHERE id=:id');
- $api->execute(['id' => $provider]);
- $api = $api->fetch(PDO::FETCH_ASSOC);
- if ($api['api_type'] == 2) {
- 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"';
- if ($_SESSION['data']['service'] == 'follow') {
- echo 'selected';
- }
- echo '>Takipçi</option>' . "\r\n" . ' <option value="like"';
- if ($_SESSION['data']['service'] == 'like') {
- echo 'selected';
- }
- echo '>Beğeni</option>' . "\r\n" . ' </select>' . "\r\n" . ' </div>';
- }
- else if ($api['api_type'] == 1) {
- $services = $smmapi->action(['key' => $api['api_key'], 'action' => 'services'], $api['api_url']);
- 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">';
- foreach ($services as $service) {
- echo '<option value="' . $service->service . '"';
- if ($_SESSION['data']['service'] == $service->service) {
- echo 'selected';
- }
- echo '>' . $service->name . ' - ' . priceFormat($service->rate) . '</option>';
- }
- echo '</select>' . "\r\n" . ' </div>' . "\r\n" . ' </div>';
- }
- unset($_SESSION['data']);
- }
- else if ($action == 'paymentmethod-sortable') {
- $list = $_POST['methods'];
- foreach ($list as $method) {
- $update = $conn->prepare('UPDATE payment_methods SET method_line=:line WHERE id=:id ');
- $update->execute(['id' => $method['id'], 'line' => $method['line']]);
- }
- }
- else if ($action == 'service-sortable') {
- $list = $_POST['services'];
- foreach ($list as $service) {
- $id = explode('-', $service['id']);
- $update = $conn->prepare('UPDATE services SET service_line=:line WHERE service_id=:id ');
- $update->execute(['id' => $id[1], 'line' => $service['line']]);
- }
- }
- else if ($action == 'category-sortable') {
- $list = $_POST['categories'];
- foreach ($list as $category) {
- $update = $conn->prepare('UPDATE categories SET category_line=:line WHERE category_id=:id ');
- $update->execute(['id' => $category['id'], 'line' => $category['line']]);
- }
- }
- else if ($action == 'secret_user') {
- $id = $_POST['id'];
- $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\' ');
- $services->execute(['id' => $id]);
- $services = $services->fetchAll(PDO::FETCH_ASSOC);
- $grouped = array_group_by($services, 'category_id');
- $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">';
- foreach ($grouped as $category) {
- $row = [
- 'table' => 'clients_category',
- 'where' => ['client_id' => $id, 'category_id' => $category[0]['category_id']]
- ];
- $return .= '<span>' . "\r\n" . ' <div class="services-import__category">' . "\r\n" . ' <div class="services-import__category-title">' . "\r\n" . ' <label> ';
- if ($category[0]['category_secret'] == 1) {
- $return .= '<small><i class="fa fa-lock"></i></small> <input type="checkbox"';
- if (countRow($row)) {
- $return .= 'checked';
- }
- $return .= ' class="tiny-toggle" data-tt-palette="blue" data-url="' . site_url('admin/clients/secret_category/' . $id) . '" data-id="' . $category[0]['category_id'] . '"> ';
- }
- $return .= $category[0]['category_name'] . ' </label>' . "\r\n" . ' </div>' . "\r\n" . ' </div>' . "\r\n" . ' <div class="services-import__packages">' . "\r\n" . ' <ul>';
- for ($i = 0; $i < count($category); $i++) {
- $row = [
- 'table' => 'clients_service',
- 'where' => ['client_id' => $id, 'service_id' => $category[$i]['service_id']]
- ];
- $return .= '<li id="service-' . $category[$i]['service_id'] . '">' . "\r\n" . ' <label>';
- if ($category[$i]['service_secret'] == 1) {
- $return .= '<small><i class="fa fa-lock"></i></small> ';
- }
- $return .= $category[$i]['service_id'] . ' - ' . $category[$i]['service_name'] . "\r\n" . ' <span class="services-import__packages-price-edit" >';
- if ($category[$i]['service_secret'] == 1) {
- $return .= '<input type="checkbox"';
- if (countRow($row)) {
- $return .= 'checked';
- ........................................................................
- ...............................................
- ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement