├── groups.txt ├── config.php ├── proxy.txt ├── index.php ├── connects.php ├── main ├── assets │ ├── img │ │ ├── logo.png │ │ └── favicon.ico │ ├── js │ │ ├── loader.js │ │ ├── custom-select2.js │ │ ├── custom-jquery.steps.js │ │ └── custom.js │ └── css │ │ ├── loader.css │ │ ├── fonticons.css │ │ ├── myStyle.css │ │ ├── perfect-scrollbar.css │ │ ├── custom_dt_custom.css │ │ ├── file-upload-with-preview.min.css │ │ ├── datatables.css │ │ ├── dt-global_style.css │ │ └── alert.css ├── vendor │ ├── autoload.php │ ├── composer │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_static.php │ │ ├── LICENSE │ │ ├── autoload_real.php │ │ └── installed.json │ └── php-curl-class │ │ └── php-curl-class │ │ ├── composer.json │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── src │ │ └── Curl │ │ │ ├── Encoder.php │ │ │ ├── Decoder.php │ │ │ ├── StringUtil.php │ │ │ ├── ArrayUtil.php │ │ │ └── CaseInsensitiveArray.php │ │ └── SECURITY.md ├── templates │ ├── Kek.json │ ├── Kek1.json │ ├── Оригинал.json │ ├── Шаблон1.json │ ├── Шаблон2.json │ ├── Шаблон3.json │ ├── пропро.json │ ├── Keto - PL.json │ └── Нет.json ├── scripts │ ├── addTemplate.php │ ├── deleteTemplate.php │ ├── addGroup.php │ ├── deleteProxy.php │ ├── addProxy.php │ ├── deleteGroup.php │ ├── deleteAccounts.php │ ├── checkUserProxy.php │ ├── checkAddAccounts.php │ ├── createAd │ │ ├── uniq.php │ │ ├── copyAdset.php │ │ ├── createAd.php │ │ ├── campaign.php │ │ ├── preview.php │ │ └── is_upload.php │ ├── publishFp.php │ ├── stopCampaigns.php │ ├── startCampaigns.php │ ├── changeCurrency.php │ ├── stopAdsets.php │ ├── startAdsets.php │ ├── stopAds.php │ ├── startAds.php │ └── createPixel.php ├── additional_load │ ├── cab_buttons_reload.js │ ├── account_buttons_reload.js │ ├── adset_buttons_reload.js │ ├── ad_buttons_reload.js │ └── campaign_buttons_reload.js ├── modals │ ├── addGroup.php │ ├── createFp.php │ ├── addProxy.php │ ├── addCard.php │ ├── deleteGroup.php │ ├── deleteProxy.php │ ├── deleteTemplate.php │ ├── changeCurrency.php │ ├── addAccount copy.php │ └── addAccount.php ├── currency.php ├── accounts.php └── cabs.php ├── db.php ├── README.md ├── headers.php ├── get.php └── post.php /groups.txt: -------------------------------------------------------------------------------- 1 | gfgfh 2 | 1 3 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /proxy.txt: -------------------------------------------------------------------------------- 1 | http://185.154.75.130:8054@killbill:kuzul515 2 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /connects.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /main/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bulikanchik/robotbook/HEAD/main/assets/img/logo.png -------------------------------------------------------------------------------- /main/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bulikanchik/robotbook/HEAD/main/assets/img/favicon.ico -------------------------------------------------------------------------------- /main/assets/js/loader.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function(){ 2 | var load_screen = document.getElementById("load_screen"); 3 | document.body.removeChild(load_screen); 4 | }); -------------------------------------------------------------------------------- /main/vendor/autoload.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/php-curl-class/php-curl-class/src/Curl'), 10 | ); 11 | -------------------------------------------------------------------------------- /main/templates/Kek.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"20","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AF"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/Kek1.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"20","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AF"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/Оригинал.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"20","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AE"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/Шаблон1.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"20","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AE"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/Шаблон2.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"50","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AF"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/Шаблон3.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"50","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AF"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/templates/пропро.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","place_daily_budget":"campaign_daily_budget","daily_budget":"20","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","countries":["AF"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/scripts/addTemplate.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /db.php: -------------------------------------------------------------------------------- 1 | connect_error) { 11 | die("Подключение не удалось: " . $mysqli_connection->connect_error); 12 | } 13 | 14 | $link = mysqli_init(); 15 | $success = mysqli_real_connect( 16 | $link, 17 | $db_host, 18 | $db_username, 19 | $db_password, 20 | $db_name 21 | ); 22 | 23 | ?> -------------------------------------------------------------------------------- /main/assets/css/loader.css: -------------------------------------------------------------------------------- 1 | div#load_screen{ 2 | background: rgb(236, 239, 255); 3 | opacity: 1; 4 | position: fixed; 5 | z-index:999999; 6 | top: 0px; 7 | bottom: 0; 8 | left: 0; 9 | right: 0; 10 | width: 100%; 11 | } 12 | div#load_screen .loader { 13 | display: flex; 14 | justify-content: center; 15 | height: 100vh; 16 | } 17 | div#load_screen .loader-content { 18 | right: 0; 19 | align-self: center; 20 | } 21 | .spinner-grow { 22 | color: #304aca; 23 | } -------------------------------------------------------------------------------- /main/scripts/deleteTemplate.php: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /main/scripts/addGroup.php: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # robotbook 2 | Чат с поддержкой: https://t.me/robotbook_support 3 | 4 | 5 | https://vk.com/rptteeam - без них этого проекта просто не существовало, Яков спасибо =) 6 | 7 | https://vk.com/npprteam - поддерживали и помогали с самого начала этого проекта! 8 | 9 | https://vk.com/bearded_cpa - спасибо за привязку карт 10 | 11 | https://vk.com/adamusfb - спасибо за Remask 12 | 13 | 14 | Инструкция: 15 | 16 | У меня все стоит на бегете поэтому рекомендую тестировать тоже на бегете а дальше переносить куда угодно! 17 | 18 | 1. Создаём БД в MySQL, импортируем туда содержимое database.sql 19 | 20 | 2. Прописываем настройки подключения к MySQL в файле db.php 21 | 22 | 3. Меняем на версию php 7.4 23 | 24 | Сайт для примера http://alaskap1.beget.tech можете загрузить свой аккаунт запустить рекламу и так далее! 25 | 26 | 27 | Логин: a 28 | пароль: pass 29 | -------------------------------------------------------------------------------- /main/additional_load/cab_buttons_reload.js: -------------------------------------------------------------------------------- 1 | $("button[name=refreshRk]").click(function(e) { 2 | e.preventDefault(); 3 | var arr = [] 4 | arr.push(this.value); 5 | 6 | SuccessAlert.innerHTML = 'Обновляем рекламные кабинеты...'; 7 | $('.success').show(); 8 | $.ajax({ 9 | type : 'POST', 10 | data : { 11 | numbers: arr, 12 | first: "1" 13 | }, 14 | url : 'scripts/refreshCabs.php', 15 | success : function(data) { 16 | reloadTables(); 17 | $('.success').hide(); 18 | SuccessAlert.innerHTML = 'Рекламные кабинеты успешно обновлены!'; 19 | $('.success').show(); 20 | setTimeout(function(){ $('.success').hide(); }, 5000); 21 | }, 22 | error : function(xhr, err) { 23 | } 24 | }); 25 | 26 | }); 27 | 28 | 29 | -------------------------------------------------------------------------------- /headers.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/scripts/deleteProxy.php: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /main/scripts/addProxy.php: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /main/scripts/deleteGroup.php: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /main/vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Curl\\' => 5, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'Curl\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/php-curl-class/php-curl-class/src/Curl', 20 | ), 21 | ); 22 | 23 | public static function getInitializer(ClassLoader $loader) 24 | { 25 | return \Closure::bind(function () use ($loader) { 26 | $loader->prefixLengthsPsr4 = ComposerStaticInitaf0d849c06174569f1eec7b49de20918::$prefixLengthsPsr4; 27 | $loader->prefixDirsPsr4 = ComposerStaticInitaf0d849c06174569f1eec7b49de20918::$prefixDirsPsr4; 28 | 29 | }, null, ClassLoader::class); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /main/assets/js/custom-select2.js: -------------------------------------------------------------------------------- 1 | multiselectLoad(); 2 | function multiselectLoad() { 3 | $(".basic").select2({ 4 | tags: true, 5 | }); 6 | 7 | var formSmall = $(".form-small").select2({ tags: true }); 8 | formSmall.data('select2').$container.addClass('form-control-sm') 9 | 10 | $(".nested").select2({ 11 | tags: true 12 | }); 13 | $(".tagging").select2({ 14 | tags: true 15 | }); 16 | $(".disabled-results").select2(); 17 | $(".placeholder").select2({ 18 | placeholder: "Make a Selection", 19 | allowClear: true 20 | }); 21 | 22 | function formatState (state) { 23 | if (!state.id) { 24 | return state.text; 25 | } 26 | var baseClass = "flaticon-"; 27 | var $state = $( 28 | ' ' + state.text + ' ' 29 | ); 30 | return $state; 31 | }; 32 | 33 | $(".templating").select2({ 34 | templateSelection: formatState 35 | }); 36 | }; -------------------------------------------------------------------------------- /main/templates/Keto - PL.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","campaign_status":"ACTIVE","adset_status":"ACTIVE","ad_status":"ACTIVE","place_daily_budget":"adset_daily_budget","daily_budget":"50","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"2","age_min":"20","age_max":"","countries":["PL"],"location_types":"recent and home","languages":[""],"attribution_spec":"1 click 1 view","mobile":"mobile","Android":"Android","Android_Smartphone":"Android_Smartphone","android_version1":"2.0","android_version2":"8.0","publisher_platforms_facebook":"publisher_platforms_facebook","facebook_positions_feed":"facebook_positions_feed","facebook_positions_right_hand_column":"facebook_positions_right_hand_column","facebook_positions_instant_article":"facebook_positions_instant_article","facebook_positions_marketplace":"facebook_positions_marketplace","facebook_positions_video_feeds":"facebook_positions_video_feeds","facebook_positions_story":"facebook_positions_story","facebook_positions_search":"facebook_positions_search","message":"","title":"","description":"","call_to_action":"LEARN_MORE"} -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "php-curl-class/php-curl-class", 3 | "description": "PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.", 4 | "homepage": "https://github.com/php-curl-class/php-curl-class", 5 | "license": "Unlicense", 6 | "keywords": [ 7 | "php", "curl", "class", "api", "api-client", "client", "framework", "http", "http-client", "http-proxy", "json", 8 | "php-curl", "php-curl-library", "proxy", "requests", "restful", "web-scraper", "web-scraping", "web-service", 9 | "xml" 10 | ], 11 | "authors": [ 12 | { 13 | "name": "Zach Borboa" 14 | } 15 | ], 16 | "require": { 17 | "php": ">=5.3", 18 | "ext-curl": "*" 19 | }, 20 | "require-dev": { 21 | "ext-gd": "*", 22 | "phpunit/phpunit": "*", 23 | "squizlabs/php_codesniffer": "*" 24 | }, 25 | "suggest": { 26 | "ext-mbstring": "*" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "Curl\\": "src/Curl/" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /main/vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /main/scripts/deleteAccounts.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Tokenbase WHERE number='".$value."'"); 7 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 8 | 9 | $query= $link->query("DELETE FROM Tokenbase WHERE access_token='".$row['access_token']."'"); 10 | $queryRk = $link->query("DELETE FROM Rk_Id WHERE access_token='".$row['access_token']."'"); 11 | $queryCamp = $link->query("DELETE FROM Camp_Id WHERE access_token='".$row['access_token']."'"); 12 | $queryAdset = $link->query("DELETE FROM Adset_Id WHERE access_token='".$row['access_token']."'"); 13 | $queryAd = $link->query("DELETE FROM Ad_Id WHERE access_token='".$row['access_token']."'"); 14 | $queryFp = $link->query("DELETE FROM Fp_Id WHERE access_token='".$row['access_token']."'"); 15 | } 16 | 17 | $log = "DELETE ACCOUNTS \n".json_encode($_POST)."\n".$query."\n".$queryRk."\n".$queryCamp."\n".$queryAdset."\n".$queryAd."\n".$queryFp."\n\n\n"; 18 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 19 | 20 | 21 | exit(); 22 | 23 | ?> 24 | -------------------------------------------------------------------------------- /get.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/scripts/checkUserProxy.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | PHP Curl Class uses semantic versioning with version numbers written as `MAJOR.MINOR.PATCH`. You may safely update 4 | `MINOR` and `PATCH` version changes. It is recommended to review `MAJOR` changes prior to upgrade as there may be 5 | backwards-incompatible changes that will affect existing usage. 6 | 7 | ### Changes 8 | 9 | (TODO: Add changes for next `MAJOR` version release.) 10 | 11 | ### Manual Review 12 | 13 | Manually view changes on the [comparison page](https://github.com/php-curl-class/php-curl-class/compare/). For example, 14 | visit [7.4.0...8.0.0](https://github.com/php-curl-class/php-curl-class/compare/7.4.0...8.0.0) to compare the changes for 15 | the `MAJOR` upgrade from 7.4.0 to 8.0.0. Comparing against `HEAD` is also possible using the `tag...HEAD` syntax 16 | ([8.3.0...HEAD](https://github.com/php-curl-class/php-curl-class/compare/8.3.0...HEAD)). 17 | 18 | View the log between releases: 19 | 20 | $ git fetch --tags 21 | $ git log 7.4.0...8.0.0 22 | 23 | View the code changes between releases: 24 | 25 | $ git fetch --tags 26 | $ git diff 7.4.0...8.0.0 27 | 28 | View only the source log and code changes between releases: 29 | 30 | $ git log 7.4.0...8.0.0 "src/" 31 | $ git diff 7.4.0...8.0.0 "src/" 32 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /main/assets/js/custom-jquery.steps.js: -------------------------------------------------------------------------------- 1 | $("#example-basic").steps({ 2 | headerTag: "h3", 3 | bodyTag: "section", 4 | transitionEffect: "slideLeft", 5 | autoFocus: true, 6 | cssClass: 'pill wizard' 7 | }); 8 | $("#circle-basic").steps({ 9 | headerTag: "h3", 10 | bodyTag: "section", 11 | transitionEffect: "slideLeft", 12 | autoFocus: true, 13 | cssClass: 'circle wizard' 14 | }); 15 | $("#circle-basic1").steps({ 16 | headerTag: "h3", 17 | bodyTag: "section", 18 | transitionEffect: "slideLeft", 19 | autoFocus: true, 20 | cssClass: 'circle wizard' 21 | }); 22 | $("#circle-basic2").steps({ 23 | headerTag: "h3", 24 | bodyTag: "section", 25 | transitionEffect: "slideLeft", 26 | autoFocus: true, 27 | cssClass: 'circle wizard' 28 | }); 29 | $("#example-vertical").steps({ 30 | headerTag: "h3", 31 | bodyTag: "section", 32 | transitionEffect: "slideLeft", 33 | cssClass: 'circle wizard', 34 | titleTemplate: '#index#', 35 | stepsOrientation: "vertical" 36 | }); 37 | $("#pill-vertical").steps({ 38 | headerTag: "h3", 39 | bodyTag: "section", 40 | transitionEffect: "slideLeft", 41 | cssClass: 'pills wizard', 42 | titleTemplate: '#title#', 43 | stepsOrientation: "vertical" 44 | }); -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/src/Curl/Encoder.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/src/Curl/Decoder.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/scripts/checkAddAccounts.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Tokenbase WHERE acc_name='".$_POST['info'][$i][0]."'"); 8 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 9 | if(count($row) != 0) 10 | $dubleNames[] = $i + 1; 11 | } 12 | 13 | //Дублирующие токены 14 | $dubleAccs = []; 15 | for($i = 0; $i < count($_POST['info']); ++$i) { 16 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$_POST['info'][$i][1]."'"); 17 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 18 | if(count($row) != 0) 19 | $dubleAccs[] = $i + 1; 20 | } 21 | 22 | //Дублирующие имена в пришедшем массиве 23 | $dubleNamesInput = []; 24 | 25 | for($i = 0; $i < count($_POST['info']); ++$i) 26 | $numbers[] = $_POST['info'][$i][0]; 27 | 28 | $numbers = array_count_values($numbers); 29 | 30 | for($i = 0; $i < count($_POST['info']); ++$i) { 31 | if($numbers[$_POST['info'][$i][0]] != "1") 32 | $dubleNamesInput[] = $i + 1; 33 | } 34 | 35 | //Дублирующие токены в пришедшем массиве 36 | $dubleAccsInput = []; 37 | 38 | for($i = 0; $i < count($_POST['info']); ++$i) 39 | $accs[] = $_POST['info'][$i][1]; 40 | 41 | $accs = array_count_values($accs); 42 | 43 | for($i = 0; $i < count($_POST['info']); ++$i) { 44 | if($accs[$_POST['info'][$i][1]] != "1") 45 | $dubleAccsInput[] = $i + 1; 46 | } 47 | 48 | $out[] = $dubleNames; 49 | $out[] = $dubleAccs; 50 | $out[] = $dubleNamesInput; 51 | $out[] = $dubleAccsInput; 52 | 53 | print_r(json_encode($out)); 54 | 55 | exit(); 56 | ?> -------------------------------------------------------------------------------- /main/additional_load/account_buttons_reload.js: -------------------------------------------------------------------------------- 1 | $("button[name=deleteAcc]").click(function(e) { 2 | e.preventDefault(); 3 | var arr = [] 4 | arr.push(this.value); 5 | 6 | $.ajax({ 7 | type : 'POST', 8 | data : { 9 | numbers: arr 10 | }, 11 | url : 'scripts/deleteAccounts.php', 12 | success : function(data) { 13 | 14 | reloadTables(); 15 | $('.success').hide(); 16 | SuccessAlert.innerHTML = 'Аккаунты успешно удалены!'; 17 | $('.success').show(); 18 | setTimeout(function(){ $('.success').hide(); }, 5000); 19 | }, 20 | error : function(xhr, err) { 21 | } 22 | }); 23 | 24 | }); 25 | 26 | 27 | 28 | $(document).ready(function(){ 29 | $("button[name=refreshAcc]").click(function(e) { 30 | e.preventDefault(); 31 | var arr = [] 32 | arr.push(this.value); 33 | 34 | SuccessAlert.innerHTML = 'Обновляем аккаунты...'; 35 | $('.success').show(); 36 | $.ajax({ 37 | type : 'POST', 38 | data : { 39 | numbers: arr, 40 | first: "1" 41 | }, 42 | url : 'scripts/refreshAccounts.php', 43 | success : function(data) { 44 | reloadTables(); 45 | $('.success').hide(); 46 | SuccessAlert.innerHTML = 'Аккаунты успешно обновлены!'; 47 | $('.success').show(); 48 | setTimeout(function(){ $('.success').hide(); }, 5000); 49 | }, 50 | error : function(xhr, err) { 51 | } 52 | }); 53 | 54 | }); 55 | }); 56 | 57 | -------------------------------------------------------------------------------- /main/modals/createFp.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/src/Curl/StringUtil.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/currency.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /main/vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 | if ($useStaticLoader) { 31 | require_once __DIR__ . '/autoload_static.php'; 32 | 33 | call_user_func(\Composer\Autoload\ComposerStaticInitaf0d849c06174569f1eec7b49de20918::getInitializer($loader)); 34 | } else { 35 | $map = require __DIR__ . '/autoload_namespaces.php'; 36 | foreach ($map as $namespace => $path) { 37 | $loader->set($namespace, $path); 38 | } 39 | 40 | $map = require __DIR__ . '/autoload_psr4.php'; 41 | foreach ($map as $namespace => $path) { 42 | $loader->setPsr4($namespace, $path); 43 | } 44 | 45 | $classMap = require __DIR__ . '/autoload_classmap.php'; 46 | if ($classMap) { 47 | $loader->addClassMap($classMap); 48 | } 49 | } 50 | 51 | $loader->register(true); 52 | 53 | return $loader; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /main/templates/Нет.json: -------------------------------------------------------------------------------- 1 | {"camp_name":"","adset_name":"","ad_name":"","campaign_status":"ACTIVE","adset_status":"ACTIVE","ad_status":"ACTIVE","place_daily_budget":"campaign_daily_budget","daily_budget":"","objective":"CONVERSIONS","bid_strategy":"LOWEST_COST_WITHOUT_CAP","genders":"0","age_min":"","age_max":"","location_types":"recent and home","languages":[""],"attribution_spec":"1 click","targeting_optimization":"targeting_optimization","mobile":"mobile","desktop":"desktop","IOS":"IOS","iPhone":"iPhone","iPad":"iPad","iPod":"iPod","ios_version1":"2.0","ios_version2":"9.0","Android":"Android","Android_Smartphone":"Android_Smartphone","Android_Tablet":"Android_Tablet","android_version1":"2.0","android_version2":"8.0","publisher_platforms_facebook":"publisher_platforms_facebook","facebook_positions_feed":"facebook_positions_feed","facebook_positions_right_hand_column":"facebook_positions_right_hand_column","facebook_positions_instant_article":"facebook_positions_instant_article","facebook_positions_marketplace":"facebook_positions_marketplace","facebook_positions_video_feeds":"facebook_positions_video_feeds","facebook_positions_story":"facebook_positions_story","facebook_positions_search":"facebook_positions_search","publisher_platforms_audience_network":"publisher_platforms_audience_network","audience_network_positions_classic":"audience_network_positions_classic","audience_network_positions_instream_video":"audience_network_positions_instream_video","audience_network_positions_rewarded_video":"audience_network_positions_rewarded_video","publisher_platforms_instagram":"publisher_platforms_instagram","instagram_positions_stream":"instagram_positions_stream","instagram_positions_story":"instagram_positions_story","instagram_positions_explore":"instagram_positions_explore","publisher_platforms_messenger":"publisher_platforms_messenger","messenger_positions_messenger_home":"messenger_positions_messenger_home","messenger_positions_story":"messenger_positions_story","messenger_positions_sponsored_messages":"messenger_positions_sponsored_messages","message":"","title":"","description":"","call_to_action":"LEARN_MORE","is_pixel":"on","pixel_name":""} -------------------------------------------------------------------------------- /main/scripts/createAd/uniq.php: -------------------------------------------------------------------------------- 1 | readimageblob($image); 9 | 10 | $width = $im->getImageWidth(); 11 | $height = $im->getImageHeight(); 12 | 13 | do { 14 | $ratio = rand(0, 1000) / 100; 15 | $new_width = floor($width * $ratio); 16 | $new_height = floor($height * $ratio); 17 | } while ( 18 | ($new_width < 700 || $new_width > 1000) 19 | && ($new_height < 700 || $new_height > 1000)); 20 | 21 | $im->scaleImage($new_width, $new_height); 22 | $im->rotateImage('#00000000', rand(-30, 30) / 100); 23 | $crop_pixels = rand(0, 5); 24 | $im->cropImage( 25 | $new_width - abs($crop_pixels), $new_height - abs($crop_pixels), 26 | 0, 0 27 | ); 28 | 29 | $color = new ImagickPixel(); 30 | $rand_color1 = rand(0, 255); 31 | $rand_color2 = rand(0, 255); 32 | $rand_color3 = rand(0, 255); 33 | $color->setColor("rgb($rand_color1,$rand_color2,$rand_color3)"); 34 | $im->borderImage($color, rand(0, 1), rand(0, 1)); 35 | 36 | $im->brightnessContrastImage(rand(-5, 5), rand(-5, 5)); 37 | 38 | $image = $im->getimageblob(); 39 | file_put_contents($dest, $image); 40 | } 41 | 42 | static public function video($source, $dest) 43 | { 44 | $noise_types = ['all', 'c0', 'c1', 'c2', 'c3']; 45 | $noise_flags = ['a', 'p', 't', 'u']; 46 | $noise = $noise_types[array_rand($noise_types)]; 47 | $noise_flag = $noise_flags[array_rand($noise_flags)]; 48 | $noise_value = rand(0, 10); 49 | $bitrate = rand(750, 1250); 50 | $command 51 | = "ffmpeg -i {$source} -vf noise={$noise}s={$noise_value}:{$noise}f={$noise_flag} -b:v {$bitrate}K {$dest} >/dev/null"; 52 | shell_exec($command); 53 | } 54 | } 55 | 56 | 57 | ?> -------------------------------------------------------------------------------- /main/modals/addCard.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/assets/css/fonticons.css: -------------------------------------------------------------------------------- 1 | .feather-icon .icon-section { 2 | padding: 30px; 3 | } 4 | .feather-icon .icon-section h4 { 5 | color: #3b3f5c; 6 | font-size: 17px; 7 | font-weight: 600; 8 | margin: 0; 9 | margin-bottom: 16px; 10 | } 11 | .feather-icon .icon-content-container { 12 | padding: 0 16px; 13 | width: 86%; 14 | margin: 0 auto; 15 | border: 1px solid #bfc9d4; 16 | border-radius: 6px; 17 | } 18 | .feather-icon .icon-section p.fs-text { 19 | padding-bottom: 30px; 20 | margin-bottom: 30px; 21 | } 22 | .feather-icon .icon-container { cursor: pointer; } 23 | .feather-icon .icon-container svg { 24 | color: #3b3f5c; 25 | margin-right: 6px; 26 | vertical-align: middle; 27 | width: 20px; 28 | height: 20px; 29 | fill: rgba(0, 23, 55, 0.08); 30 | } 31 | .feather-icon .icon-container:hover svg { 32 | color: #1b55e2; 33 | fill: rgba(27, 85, 226, 0.23921568627450981); 34 | } 35 | .feather-icon .icon-container span { display: none; } 36 | .feather-icon .icon-container:hover span { color: #1b55e2; } 37 | .feather-icon .icon-link { 38 | color: #1b55e2; 39 | font-weight: 600; 40 | font-size: 14px; 41 | } 42 | 43 | 44 | /*FAB*/ 45 | .fontawesome .icon-section { 46 | padding: 30px; 47 | } 48 | .fontawesome .icon-section h4 { 49 | color: #3b3f5c; 50 | font-size: 17px; 51 | font-weight: 600; 52 | margin: 0; 53 | margin-bottom: 16px; 54 | } 55 | .fontawesome .icon-content-container { 56 | padding: 0 16px; 57 | width: 86%; 58 | margin: 0 auto; 59 | border: 1px solid #bfc9d4; 60 | border-radius: 6px; 61 | } 62 | .fontawesome .icon-section p.fs-text { 63 | padding-bottom: 30px; 64 | margin-bottom: 30px; 65 | } 66 | .fontawesome .icon-container { cursor: pointer; } 67 | .fontawesome .icon-container i { 68 | font-size: 20px; 69 | color: #3b3f5c; 70 | vertical-align: middle; 71 | margin-right: 10px; 72 | } 73 | .fontawesome .icon-container:hover i { color: #1b55e2; } 74 | .fontawesome .icon-container span { color: #888ea8; display: none; } 75 | .fontawesome .icon-container:hover span { color: #1b55e2; } 76 | .fontawesome .icon-link { 77 | color: #1b55e2; 78 | font-weight: 600; 79 | font-size: 14px; 80 | } -------------------------------------------------------------------------------- /main/modals/deleteGroup.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/modals/deleteProxy.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "php-curl-class/php-curl-class", 4 | "version": "8.8.0", 5 | "version_normalized": "8.8.0.0", 6 | "source": { 7 | "type": "git", 8 | "url": "https://github.com/php-curl-class/php-curl-class.git", 9 | "reference": "180273b577148090a62bb7333201d17e0b6efb75" 10 | }, 11 | "dist": { 12 | "type": "zip", 13 | "url": "https://api.github.com/repos/php-curl-class/php-curl-class/zipball/180273b577148090a62bb7333201d17e0b6efb75", 14 | "reference": "180273b577148090a62bb7333201d17e0b6efb75", 15 | "shasum": "" 16 | }, 17 | "require": { 18 | "ext-curl": "*", 19 | "php": ">=5.3" 20 | }, 21 | "require-dev": { 22 | "ext-gd": "*", 23 | "phpunit/phpunit": "*", 24 | "squizlabs/php_codesniffer": "*" 25 | }, 26 | "suggest": { 27 | "ext-mbstring": "*" 28 | }, 29 | "time": "2020-04-20T03:39:57+00:00", 30 | "type": "library", 31 | "installation-source": "dist", 32 | "autoload": { 33 | "psr-4": { 34 | "Curl\\": "src/Curl/" 35 | } 36 | }, 37 | "notification-url": "https://packagist.org/downloads/", 38 | "license": [ 39 | "Unlicense" 40 | ], 41 | "authors": [ 42 | { 43 | "name": "Zach Borboa" 44 | } 45 | ], 46 | "description": "PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.", 47 | "homepage": "https://github.com/php-curl-class/php-curl-class", 48 | "keywords": [ 49 | "API-Client", 50 | "api", 51 | "class", 52 | "client", 53 | "curl", 54 | "framework", 55 | "http", 56 | "http-client", 57 | "http-proxy", 58 | "json", 59 | "php", 60 | "php-curl", 61 | "php-curl-library", 62 | "proxy", 63 | "requests", 64 | "restful", 65 | "web-scraper", 66 | "web-scraping ", 67 | "web-service", 68 | "xml" 69 | ] 70 | } 71 | ] 72 | -------------------------------------------------------------------------------- /main/assets/css/myStyle.css: -------------------------------------------------------------------------------- 1 | .success { 2 | width: 400px; 3 | } 4 | .error { 5 | width: 400px; 6 | } 7 | .warning { 8 | width: 400px; 9 | } 10 | 11 | .addGroupForm { 12 | max-width: 300px; 13 | } 14 | 15 | .addProxyForm { 16 | max-width: 500px; 17 | } 18 | 19 | .mainSettings { 20 | height: 85px; 21 | padding: 10% 0%; 22 | } 23 | 24 | .select2-selection--multiple { 25 | overflow-y: scroll; 26 | height: 45px; 27 | } 28 | 29 | textarea { 30 | overflow: hidden; 31 | text-overflow: ellipsis; 32 | white-space: nowrap; 33 | } 34 | 35 | .checkbox-column{ 36 | width: 10%; 37 | } 38 | 39 | .account_state{ 40 | width: 10%; 41 | } 42 | 43 | .account_action{ 44 | width: 10%; 45 | } 46 | 47 | .accounts_action > .btn-group{ 48 | width: 40% !important; 49 | } 50 | 51 | form { 52 | background: #fff; 53 | } 54 | 55 | .nav-link.active { 56 | color: #1461CC !important; 57 | } 58 | 59 | .ad_info { 60 | width: 20%; 61 | } 62 | 63 | .ad_state{ 64 | width: 10%; 65 | } 66 | 67 | .addfpForm { 68 | max-width: 300px; 69 | } 70 | 71 | .changeCurrencyForm { 72 | max-width: 250px; 73 | } 74 | 75 | .addCardForm { 76 | max-width: 900px; 77 | } 78 | 79 | 80 | 81 | 82 | .devices { 83 | width: 270px; 84 | } 85 | 86 | 87 | table { 88 | width: 100%; /* Ширина таблицы */ 89 | } 90 | 91 | tr { 92 | text-align: center; 93 | } 94 | 95 | 96 | .template_form { 97 | float: left; 98 | width: 230px; 99 | margin: 0px 20px; 100 | } 101 | .template_form11 { 102 | word-break:break-all; 103 | /*width: 350px;*/ 104 | margin: 0px 30px; 105 | } 106 | .template_form111 { 107 | float: right; 108 | /*width: 350px;*/ 109 | margin: 0px 30px; 110 | } 111 | 112 | .template_form1 { 113 | float: left; 114 | width: 280px; 115 | margin: 0px 5px; 116 | } 117 | 118 | .template_form2 { 119 | float: left; 120 | width: 350px; 121 | margin: 0px 30px; 122 | } 123 | 124 | .template_form0 { 125 | float: left; 126 | width: 260px; 127 | margin: 0px 10px; 128 | } 129 | 130 | .template_form3 { 131 | float: left; 132 | width: 260px; 133 | margin: 0px 10px; 134 | } 135 | 136 | 137 | .card_form { 138 | float: left; 139 | width: 350px; 140 | margin: 0px 20px; 141 | } -------------------------------------------------------------------------------- /main/modals/deleteTemplate.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/modals/changeCurrency.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /main/assets/css/perfect-scrollbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | /* 12 | * Container style 13 | */ 14 | .ps { 15 | overflow: hidden !important; 16 | overflow-anchor: none; 17 | -ms-overflow-style: none; 18 | touch-action: auto; 19 | -ms-touch-action: auto; } 20 | 21 | /* 22 | * Scrollbar rail styles 23 | */ 24 | .ps__rail-x { 25 | display: none; 26 | opacity: 0; 27 | transition: background-color .2s linear, opacity .2s linear; 28 | -webkit-transition: background-color .2s linear, opacity .2s linear; 29 | height: 10px; 30 | /* there must be 'bottom' or 'top' for ps__rail-x */ 31 | bottom: 0px; 32 | /* please don't change 'position' */ 33 | position: absolute; } 34 | 35 | .ps__rail-y { 36 | display: none; 37 | opacity: 0; 38 | transition: background-color .2s linear, opacity .2s linear; 39 | -webkit-transition: background-color .2s linear, opacity .2s linear; 40 | width: 10px; 41 | /* there must be 'right' or 'left' for ps__rail-y */ 42 | right: 0; 43 | /* please don't change 'position' */ 44 | position: absolute; } 45 | 46 | .ps--active-x > .ps__rail-x, .ps--active-y > .ps__rail-y { 47 | display: block; 48 | background-color: transparent; } 49 | 50 | .ps:hover > .ps__rail-x, .ps:hover > .ps__rail-y { 51 | opacity: 0.6; } 52 | 53 | .ps--focus > .ps__rail-x, .ps--focus > .ps__rail-y { 54 | opacity: 0.6; } 55 | 56 | .ps--scrolling-x > .ps__rail-x, .ps--scrolling-y > .ps__rail-y { 57 | opacity: 0.6; } 58 | 59 | .ps .ps__rail-x:hover, .ps .ps__rail-y:hover, .ps .ps__rail-x:focus, .ps .ps__rail-y:focus, .ps .ps__rail-x.ps--clicking, .ps .ps__rail-y.ps--clicking { 60 | background-color: #eee; 61 | opacity: 0.9; } 62 | 63 | /* 64 | * Scrollbar thumb styles 65 | */ 66 | .ps__thumb-x { 67 | background-color: #d3d3d3; 68 | border-radius: 6px; 69 | transition: background-color .2s linear, height .2s ease-in-out; 70 | -webkit-transition: background-color .2s linear, height .2s ease-in-out; 71 | height: 4px; 72 | /* there must be 'bottom' for ps__thumb-x */ 73 | bottom: 2px; 74 | /* please don't change 'position' */ 75 | position: absolute; } 76 | 77 | .ps__thumb-y { 78 | background-color: #d3d3d3; 79 | border-radius: 6px; 80 | transition: background-color .2s linear, width .2s ease-in-out; 81 | -webkit-transition: background-color .2s linear, width .2s ease-in-out; 82 | width: 4px; 83 | /* there must be 'right' for ps__thumb-y */ 84 | right: 2px; 85 | /* please don't change 'position' */ 86 | position: absolute; } 87 | 88 | .ps__rail-x:hover > .ps__thumb-x, .ps__rail-x:focus > .ps__thumb-x, .ps__rail-x.ps--clicking .ps__thumb-x { 89 | background-color: #acb0c3; 90 | height: 6px; } 91 | 92 | .ps__rail-y:hover > .ps__thumb-y, .ps__rail-y:focus > .ps__thumb-y, .ps__rail-y.ps--clicking .ps__thumb-y { 93 | background-color: #acb0c3; 94 | width: 6px; } 95 | 96 | /* MS supports */ 97 | @supports (-ms-overflow-style: none) { 98 | .ps { 99 | overflow: auto !important; } } 100 | 101 | @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { 102 | .ps { 103 | overflow: auto !important; } } 104 | -------------------------------------------------------------------------------- /main/modals/addAccount copy.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/additional_load/adset_buttons_reload.js: -------------------------------------------------------------------------------- 1 | $("button[name=refreshAdset]").click(function(e) { 2 | e.preventDefault(); 3 | var arr = [] 4 | arr.push(this.value); 5 | 6 | SuccessAlert.innerHTML = 'Обновляем адсеты...'; 7 | $('.success').show(); 8 | $.ajax({ 9 | type : 'POST', 10 | data : { 11 | numbers: arr, 12 | date: "lifetime", 13 | first: "1" 14 | }, 15 | url : 'scripts/refreshAdsets.php', 16 | success : function(data) { 17 | data = JSON.parse(data); 18 | reloadTables(); 19 | $('.success').hide(); 20 | SuccessAlert.innerHTML = 'Адсеты успешно обновлены!'; 21 | $('.success').show(); 22 | setTimeout(function(){ $('.success').hide(); }, 5000); 23 | }, 24 | error : function(xhr, err) { 25 | } 26 | }); 27 | 28 | }); 29 | 30 | $("button[name=startAdset]").click(function(e) { 31 | e.preventDefault(); 32 | var arr = [] 33 | arr.push(this.value); 34 | 35 | SuccessAlert.innerHTML = 'Запускаем адсеты...'; 36 | $('.success').show(); 37 | $.ajax({ 38 | type : 'POST', 39 | data : { 40 | numbers: arr, 41 | first: "1" 42 | }, 43 | url : 'scripts/startAdsets.php', 44 | success : function(data) { 45 | data = JSON.parse(data); 46 | reloadTables(); 47 | $('.success').hide(); 48 | if(!data['error']) { 49 | SuccessAlert.innerHTML = 'Адсеты успешно запущены!'; 50 | $('.success').show(); 51 | setTimeout(function(){ $('.success').hide(); }, 5000); 52 | } 53 | else { 54 | WarningAlert.innerHTML = 'Часть адсетов не были запущены, из-за ошибок!'; 55 | $('.warning').show(); 56 | setTimeout(function(){ $('.warning').hide(); }, 5000); 57 | } 58 | 59 | }, 60 | error : function(xhr, err) { 61 | } 62 | }); 63 | 64 | }); 65 | 66 | 67 | $("button[name=stopAdset]").click(function(e) { 68 | e.preventDefault(); 69 | var arr = [] 70 | arr.push(this.value); 71 | 72 | SuccessAlert.innerHTML = 'Останавливаем адсеты...'; 73 | $('.success').show(); 74 | $.ajax({ 75 | type : 'POST', 76 | data : { 77 | numbers: arr, 78 | first: "1" 79 | }, 80 | url : 'scripts/stopAdsets.php', 81 | success : function(data) { 82 | data = JSON.parse(data); 83 | reloadTables(); 84 | $('.success').hide(); 85 | if(!data['error']) { 86 | SuccessAlert.innerHTML = 'Адсеты успешно остановлены!'; 87 | $('.success').show(); 88 | setTimeout(function(){ $('.success').hide(); }, 5000); 89 | } 90 | else { 91 | WarningAlert.innerHTML = 'Часть адсетов не были остановлены, из-за ошибок!'; 92 | $('.warning').show(); 93 | setTimeout(function(){ $('.warning').hide(); }, 5000); 94 | } 95 | 96 | }, 97 | error : function(xhr, err) { 98 | } 99 | }); 100 | 101 | }); 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /main/additional_load/ad_buttons_reload.js: -------------------------------------------------------------------------------- 1 | $("button[name=refreshAd]").click(function(e) { 2 | e.preventDefault(); 3 | var arr = [] 4 | arr.push(this.value); 5 | 6 | SuccessAlert.innerHTML = 'Обновляем объявления...'; 7 | $('.success').show(); 8 | $.ajax({ 9 | type : 'POST', 10 | data : { 11 | numbers: arr, 12 | date: "lifetime", 13 | first: "1" 14 | }, 15 | url : 'scripts/refreshAds.php', 16 | success : function(data) { 17 | data = JSON.parse(data); 18 | reloadTables(); 19 | $('.success').hide(); 20 | SuccessAlert.innerHTML = 'Объявления успешно обновлены!'; 21 | $('.success').show(); 22 | setTimeout(function(){ $('.success').hide(); }, 5000); 23 | }, 24 | error : function(xhr, err) { 25 | } 26 | }); 27 | 28 | }); 29 | 30 | $("button[name=startAd]").click(function(e) { 31 | e.preventDefault(); 32 | var arr = [] 33 | arr.push(this.value); 34 | 35 | SuccessAlert.innerHTML = 'Запускаем объявления...'; 36 | $('.success').show(); 37 | $.ajax({ 38 | type : 'POST', 39 | data : { 40 | numbers: arr, 41 | first: "1" 42 | }, 43 | url : 'scripts/startAds.php', 44 | success : function(data) { 45 | data = JSON.parse(data); 46 | reloadTables(); 47 | $('.success').hide(); 48 | if(!data['error']) { 49 | SuccessAlert.innerHTML = 'Объявления успешно запущены!'; 50 | $('.success').show(); 51 | setTimeout(function(){ $('.success').hide(); }, 5000); 52 | } 53 | else { 54 | WarningAlert.innerHTML = 'Часть объявлений не были запущены, из-за ошибок!'; 55 | $('.warning').show(); 56 | setTimeout(function(){ $('.warning').hide(); }, 5000); 57 | } 58 | 59 | }, 60 | error : function(xhr, err) { 61 | } 62 | }); 63 | 64 | }); 65 | 66 | 67 | $("button[name=stopAd]").click(function(e) { 68 | e.preventDefault(); 69 | var arr = [] 70 | arr.push(this.value); 71 | 72 | SuccessAlert.innerHTML = 'Останавливаем объявления...'; 73 | $('.success').show(); 74 | $.ajax({ 75 | type : 'POST', 76 | data : { 77 | numbers: arr, 78 | first: "1" 79 | }, 80 | url : 'scripts/stopAds.php', 81 | success : function(data) { 82 | data = JSON.parse(data); 83 | reloadTables(); 84 | $('.success').hide(); 85 | if(!data['error']) { 86 | SuccessAlert.innerHTML = 'Объявления успешно остановлены!'; 87 | $('.success').show(); 88 | setTimeout(function(){ $('.success').hide(); }, 5000); 89 | } 90 | else { 91 | WarningAlert.innerHTML = 'Часть объявлений не были остановлены, из-за ошибок!'; 92 | $('.warning').show(); 93 | setTimeout(function(){ $('.warning').hide(); }, 5000); 94 | } 95 | 96 | }, 97 | error : function(xhr, err) { 98 | } 99 | }); 100 | 101 | }); 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /main/assets/css/custom_dt_custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | .widget-content-area { 12 | box-shadow: none !important; } 13 | 14 | table.dataTable { 15 | border-collapse: separate !important; 16 | border-spacing: 0 5px; 17 | margin-top: 50px !important; 18 | margin-bottom: 50px !important; 19 | border-collapse: collapse !important; } 20 | 21 | .table-hover:not(.table-dark) tbody tr td:first-child { 22 | border-left: none !important; 23 | border-left: none !important; } 24 | 25 | .table-hover:not(.table-dark) tbody tr:hover .new-control.new-checkbox .new-control-indicator { 26 | border: 2px solid #1b55e2; } 27 | 28 | /*Style. 1*/ 29 | .style-1 .user-name { 30 | font-size: 15px; 31 | font-weight: 600; 32 | color: #e2a03f; } 33 | 34 | .style-1 .profile-img img { 35 | width: 50px; 36 | height: 50px; 37 | border: 2px solid #d3d3d3; 38 | border-radius: 6px; 39 | box-shadow: 0px 0px 14px 3px rgba(126, 142, 177, 0.24); } 40 | 41 | /*Style. 2*/ 42 | .style-2 .new-control.new-checkbox .new-control-indicator { 43 | top: 1px; } 44 | 45 | .style-2 .user-name { 46 | font-size: 15px; 47 | font-weight: 600; 48 | color: #e2a03f; } 49 | 50 | .style-2 img.profile-img { 51 | width: 50px; 52 | height: 50px; 53 | border: 2px solid #d3d3d3; 54 | box-shadow: 0px 0px 14px 3px rgba(126, 142, 177, 0.24); } 55 | 56 | .style-2 .badge { 57 | background: transparent; 58 | transform: none; } 59 | 60 | .style-2 .badge-primary { 61 | color: #00bf1f; 62 | border: 2px dashed #00bf1f; } 63 | 64 | .style-2 .badge-warning { 65 | color: #e2a03f; 66 | border: 2px dashed #e2a03f; } 67 | 68 | .style-2 .badge-danger { 69 | color: #e7515a; 70 | border: 2px dashed #e7515a; } 71 | 72 | /*Style. 3*/ 73 | .style-3 .new-control.new-checkbox .new-control-indicator { 74 | top: 1px; } 75 | 76 | .style-3 .user-name { 77 | font-size: 15px; 78 | font-weight: 600; 79 | color: #e2a03f; } 80 | 81 | .style-3 img.profile-img { 82 | width: 50px; 83 | height: 50px; 84 | border: 2px solid #d3d3d3; 85 | border-radius: 6px; 86 | box-shadow: 0px 0px 14px 3px rgba(126, 142, 177, 0.24); } 87 | 88 | .style-3 .badge { 89 | background: transparent; 90 | transform: none; } 91 | 92 | .style-3 .badge-primary { 93 | color: #1b55e2; 94 | border: 2px dashed #1b55e2; } 95 | 96 | .style-3 .badge-warning { 97 | color: #e2a03f; 98 | border: 2px dashed #e2a03f; } 99 | 100 | .style-3 .badge-danger { 101 | color: #e7515a; 102 | border: 2px dashed #e7515a; } 103 | 104 | .style-3 .table-controls { 105 | padding: 0; } 106 | .style-3 .table-controls li { 107 | list-style: none; 108 | display: inline; } 109 | .style-3 .table-controls li svg { 110 | color: #888ea8; 111 | vertical-align: middle; 112 | width: 28px; 113 | height: 28px; 114 | fill: rgba(0, 23, 55, 0.08); 115 | cursor: pointer; } 116 | 117 | .style-3.table-hover:not(.table-dark) tbody tr:hover .table-controls li svg { 118 | color: #e7515a; 119 | fill: rgba(231, 81, 90, 0.219608); } 120 | 121 | .style-3.table-hover:not(.table-dark) tbody tr:hover td:first-child { 122 | color: #1b55e2 !important; } 123 | -------------------------------------------------------------------------------- /main/additional_load/campaign_buttons_reload.js: -------------------------------------------------------------------------------- 1 | $("button[name=refreshCampaign]").click(function(e) { 2 | e.preventDefault(); 3 | var arr = [] 4 | arr.push(this.value); 5 | 6 | SuccessAlert.innerHTML = 'Обновляем кампании...'; 7 | $('.success').show(); 8 | $.ajax({ 9 | type : 'POST', 10 | data : { 11 | numbers: arr, 12 | date: "lifetime", 13 | first: "1" 14 | }, 15 | url : 'scripts/refreshCampaigns.php', 16 | success : function(data) { 17 | data = JSON.parse(data); 18 | reloadTables(); 19 | $('.success').hide(); 20 | SuccessAlert.innerHTML = 'Кампании успешно обновлены!'; 21 | $('.success').show(); 22 | setTimeout(function(){ $('.success').hide(); }, 5000); 23 | }, 24 | error : function(xhr, err) { 25 | } 26 | }); 27 | 28 | }); 29 | 30 | $("button[name=startCampaign]").click(function(e) { 31 | e.preventDefault(); 32 | var arr = [] 33 | arr.push(this.value); 34 | 35 | SuccessAlert.innerHTML = 'Запускаем кампании...'; 36 | $('.success').show(); 37 | $.ajax({ 38 | type : 'POST', 39 | data : { 40 | numbers: arr, 41 | first: "1" 42 | }, 43 | url : 'scripts/startCampaigns.php', 44 | success : function(data) { 45 | data = JSON.parse(data); 46 | reloadTables(); 47 | $('.success').hide(); 48 | if(!data['error']) { 49 | SuccessAlert.innerHTML = 'Кампании успешно запущены!'; 50 | $('.success').show(); 51 | setTimeout(function(){ $('.success').hide(); }, 5000); 52 | } 53 | else { 54 | WarningAlert.innerHTML = 'Часть кампаний не были запущены, из-за ошибок!'; 55 | $('.warning').show(); 56 | setTimeout(function(){ $('.warning').hide(); }, 5000); 57 | } 58 | 59 | }, 60 | error : function(xhr, err) { 61 | } 62 | }); 63 | 64 | }); 65 | 66 | 67 | $("button[name=stopCampaign]").click(function(e) { 68 | e.preventDefault(); 69 | var arr = [] 70 | arr.push(this.value); 71 | 72 | SuccessAlert.innerHTML = 'Останавливаем кампании...'; 73 | $('.success').show(); 74 | $.ajax({ 75 | type : 'POST', 76 | data : { 77 | numbers: arr, 78 | first: "1" 79 | }, 80 | url : 'scripts/stopCampaigns.php', 81 | success : function(data) { 82 | data = JSON.parse(data); 83 | reloadTables(); 84 | $('.success').hide(); 85 | if(!data['error']) { 86 | SuccessAlert.innerHTML = 'Кампании успешно остановлены!'; 87 | $('.success').show(); 88 | setTimeout(function(){ $('.success').hide(); }, 5000); 89 | } 90 | else { 91 | WarningAlert.innerHTML = 'Часть кампаний не были остановлены, из-за ошибок!'; 92 | $('.warning').show(); 93 | setTimeout(function(){ $('.warning').hide(); }, 5000); 94 | } 95 | 96 | }, 97 | error : function(xhr, err) { 98 | } 99 | }); 100 | 101 | }); 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /main/assets/css/file-upload-with-preview.min.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | .custom-file-container { 12 | box-sizing: border-box; 13 | position: relative; 14 | display: block; } 15 | .custom-file-container label { 16 | color: #1b55e2; } 17 | .custom-file-container label .custom-file-container__image-clear { 18 | color: #3b3f5c; } 19 | 20 | .custom-file-container__custom-file { 21 | box-sizing: border-box; 22 | position: relative; 23 | display: inline-block; 24 | width: 100%; 25 | height: calc(2.25rem + 2px); 26 | margin-bottom: 0; 27 | margin-top: 5px; } 28 | .custom-file-container__custom-file:hover { 29 | cursor: pointer; } 30 | 31 | .custom-file-container__custom-file__custom-file-input { 32 | box-sizing: border-box; 33 | min-width: 14rem; 34 | max-width: 100%; 35 | height: calc(2.25rem + 2px); 36 | margin: 0; 37 | opacity: 0; } 38 | .custom-file-container__custom-file__custom-file-input:focus ~ span { 39 | outline: 1px dotted #515365; 40 | outline: 5px auto -webkit-focus-ring-color; } 41 | 42 | .custom-file-container__custom-file__custom-file-control { 43 | box-sizing: border-box; 44 | position: absolute; 45 | top: 0; 46 | right: 0; 47 | left: 0; 48 | z-index: 5; 49 | height: auto; 50 | overflow: hidden; 51 | line-height: 1.5; 52 | user-select: none; 53 | background-clip: padding-box; 54 | border-radius: .25rem; 55 | height: auto; 56 | border: 1px solid #f1f2f3; 57 | color: #3b3f5c; 58 | font-size: 15px; 59 | padding: 8px 10px; 60 | letter-spacing: 1px; 61 | background-color: #f1f2f3; } 62 | 63 | .custom-file-container__custom-file__custom-file-control__button { 64 | box-sizing: border-box; 65 | position: absolute; 66 | top: 0; 67 | right: 0; 68 | z-index: 6; 69 | display: block; 70 | height: auto; 71 | padding: 10px 16px; 72 | line-height: 1.25; 73 | background-color: rgba(27, 85, 226, 0.239216); 74 | color: #1b55e2; 75 | border-left: 1px solid #e0e6ed; 76 | box-sizing: border-box; } 77 | 78 | .custom-file-container__image-preview { 79 | box-sizing: border-box; 80 | transition: all 0.2s ease; 81 | margin-top: 54px; 82 | margin-bottom: 40px; 83 | height: 250px; 84 | width: 100%; 85 | border-radius: 4px; 86 | background-size: contain; 87 | background-position: center center; 88 | background-repeat: no-repeat; 89 | background-color: #fff; 90 | overflow: auto; 91 | padding: 15px; } 92 | 93 | .custom-file-container__image-multi-preview { 94 | position: relative; 95 | box-sizing: border-box; 96 | transition: all 0.2s ease; 97 | border-radius: 6px; 98 | background-size: cover; 99 | background-position: center center; 100 | background-repeat: no-repeat; 101 | float: left; 102 | margin: 1.858736%; 103 | width: 29.615861214%; 104 | height: 90px; 105 | box-shadow: 0 4px 10px 0 rgba(51, 51, 51, 0.25); } 106 | 107 | .custom-file-container__image-multi-preview__single-image-clear { 108 | left: -6px; 109 | background: #ffffff; 110 | position: absolute; 111 | width: 20px; 112 | height: 20px; 113 | border-radius: 50%; 114 | text-align: center; 115 | margin-top: -6px; 116 | box-shadow: 0 4px 10px 0 rgba(51, 51, 51, 0.25); } 117 | .custom-file-container__image-multi-preview__single-image-clear:hover { 118 | background: #cbcbbd; 119 | cursor: pointer; } 120 | 121 | .custom-file-container__image-multi-preview__single-image-clear__icon { 122 | color: #1b55e2; 123 | display: block; 124 | margin-top: -2px; } 125 | -------------------------------------------------------------------------------- /main/accounts.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |

Аккаунты

9 |
10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 25 |
26 |
27 |
28 |
29 |
35 |
36 | 43 | 44 |
45 |
46 | 47 |
48 | 49 | 50 | 51 |
52 | 53 |
54 | 55 |
56 |
57 |
-------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Considerations 2 | 3 | ### Url may point to system files 4 | 5 | * Don't blindly accept urls from users as they may point to system files. Curl supports many protocols including `FILE`. 6 | The following would show the contents of `file:///etc/passwd`. 7 | 8 | ```bash 9 | # Attacker. 10 | $ curl https://www.example.com/display_webpage.php?url=file%3A%2F%2F%2Fetc%2Fpasswd 11 | ``` 12 | 13 | ```php 14 | // display_webpage.php 15 | $url = $_GET['url']; // DANGER! 16 | $curl = new Curl(); 17 | $curl->get($url); 18 | echo $curl->response; 19 | ``` 20 | 21 | Safer: 22 | 23 | ```php 24 | function is_allowed_url($url, $allowed_url_schemes = array('http', 'https')) { 25 | $valid_url = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED) !== false; 26 | if ($valid_url) { 27 | $scheme = parse_url($url, PHP_URL_SCHEME); 28 | return in_array($scheme, $allowed_url_schemes, true); 29 | } 30 | $valid_ip = filter_var($url, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false; 31 | return $valid_ip; 32 | } 33 | 34 | $url = $_GET['url']; 35 | if (!is_allowed_url($url)) { 36 | die('Unsafe url detected.'); 37 | } 38 | ``` 39 | 40 | ### Url may point to internal urls 41 | 42 | * Url may point to internal urls including those behind a firewall (e.g. http://192.168.0.1/ or ftp://192.168.0.1/). Use 43 | a whitelist to allow certain urls rather than a blacklist. 44 | 45 | ### Request data may refer to system files 46 | 47 | * Request data prefixed with the `@` character may have special interpretation and read from system files. 48 | 49 | ```bash 50 | # Attacker. 51 | $ curl https://www.example.com/upload_photo.php --data "photo=@/etc/passwd" 52 | ``` 53 | 54 | ```php 55 | // upload_photo.php 56 | $curl = new Curl(); 57 | $curl->post('http://www.anotherwebsite.com/', array( 58 | 'photo' => $_POST['photo'], // DANGER! 59 | )); 60 | ``` 61 | 62 | ### Unsafe response with redirection enabled 63 | 64 | * Requests with redirection enabled may return responses from unexpected sources. 65 | Downloading https://www.example.com/image.png may redirect and download https://www.evil.com/virus.exe 66 | 67 | ```php 68 | $curl = new Curl(); 69 | $curl->setOpt(CURLOPT_FOLLOWLOCATION, true); // DANGER! 70 | $curl->download('https://www.example.com/image.png', 'my_image.png'); 71 | ``` 72 | 73 | ```php 74 | $curl = new Curl(); 75 | $curl->setOpt(CURLOPT_FOLLOWLOCATION, true); // DANGER! 76 | $curl->get('https://www.example.com/image.png'); 77 | ``` 78 | 79 | ### Keep SSL protections enabled 80 | 81 | * Do not disable SSL protections. 82 | 83 | ```php 84 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // DANGER! 85 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // DANGER! 86 | ``` 87 | 88 | ### Prevent XML External Entity injection 89 | 90 | * Set the following when using the default PHP XML parser to prevent XML external entity injection. 91 | 92 | ```php 93 | libxml_disable_entity_loader(true); 94 | ``` 95 | 96 | ### Prevent PHP execution of library files 97 | 98 | PHP files in this library are not intended to be accessible by users browsing websites. Prevent direct access to library files by moving the library folder at least one level higher than the web root directory. Alternatively, configure the server to disable php file execution for all library files. 99 | 100 | #### For WordPress plugin developers 101 | 102 | WordPress plugin developers that wish to incorporate the PHP Curl Class library into their plugin, should take special care to include only the "core" library files. 103 | 104 | Do one of the following: 105 | 106 | Option 1. Download an official release from the [releases page](https://github.com/php-curl-class/php-curl-class/releases) and incorporate the files contained in the compressed file into the plugin. The releases include only the necessary php files for the library to function. 107 | 108 | Option 2. Manually copy only the [src/](https://github.com/php-curl-class/php-curl-class/tree/master/src) directory into your plugin. Be sure not to copy any other php files as they may be executable by users visiting the php files directly. 109 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/src/Curl/ArrayUtil.php: -------------------------------------------------------------------------------- 1 | isArrayAssoc($array); 32 | } 33 | 34 | /** 35 | * Is Array Multidim 36 | * 37 | * @access public 38 | * @param $array 39 | * 40 | * @return boolean 41 | */ 42 | public static function isArrayMultidim($array) 43 | { 44 | if (!is_array($array)) { 45 | return false; 46 | } 47 | 48 | return (bool)count(array_filter($array, 'is_array')); 49 | } 50 | 51 | /** 52 | * Is Array Multidim 53 | * 54 | * @deprecated Use ArrayUtil::isArrayMultidim(). 55 | * @access public 56 | * @param $array 57 | * 58 | * @return boolean 59 | */ 60 | public static function is_array_multidim($array) 61 | { 62 | return $this->isArrayMultidim($array); 63 | } 64 | 65 | /** 66 | * Array Flatten Multidim 67 | * 68 | * @access public 69 | * @param $array 70 | * @param $prefix 71 | * 72 | * @return array 73 | */ 74 | public static function arrayFlattenMultidim($array, $prefix = false) 75 | { 76 | $return = array(); 77 | if (is_array($array) || is_object($array)) { 78 | if (empty($array)) { 79 | $return[$prefix] = ''; 80 | } else { 81 | foreach ($array as $key => $value) { 82 | if (is_scalar($value)) { 83 | if ($prefix) { 84 | $return[$prefix . '[' . $key . ']'] = $value; 85 | } else { 86 | $return[$key] = $value; 87 | } 88 | } else { 89 | if ($value instanceof \CURLFile) { 90 | $return[$key] = $value; 91 | } else { 92 | $return = array_merge( 93 | $return, 94 | self::arrayFlattenMultidim( 95 | $value, 96 | $prefix ? $prefix . '[' . $key . ']' : $key 97 | ) 98 | ); 99 | } 100 | } 101 | } 102 | } 103 | } elseif ($array === null) { 104 | $return[$prefix] = $array; 105 | } 106 | return $return; 107 | } 108 | 109 | /** 110 | * Array Flatten Multidim 111 | * 112 | * @deprecated Use ArrayUtil::arrayFlattenMultidim(). 113 | * @access public 114 | * @param $array 115 | * @param $prefix 116 | * 117 | * @return array 118 | */ 119 | public static function array_flatten_multidim($array, $prefix = false) 120 | { 121 | return $this->arrayFlattenMultidim($array, $prefix); 122 | } 123 | 124 | /** 125 | * Array Random 126 | * 127 | * @access public 128 | * @param $array 129 | * 130 | * @return mixed 131 | */ 132 | public static function arrayRandom($array) 133 | { 134 | return $array[mt_rand(0, count($array) - 1)]; 135 | } 136 | 137 | /** 138 | * Array Random 139 | * 140 | * @deprecated Use ArrayUtil::arrayRandom(). 141 | * @access public 142 | * @param $array 143 | * 144 | * @return mixed 145 | */ 146 | public static function array_random($array) 147 | { 148 | return $this->arrayRandom($array); 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /main/assets/js/custom.js: -------------------------------------------------------------------------------- 1 | /* 2 | ========================================= 3 | | | 4 | | Scroll To Top | 5 | | | 6 | ========================================= 7 | */ 8 | $('.scrollTop').click(function() { 9 | $("html, body").animate({scrollTop: 0}); 10 | }); 11 | 12 | 13 | $('.navbar .dropdown.notification-dropdown > .dropdown-menu, .navbar .dropdown.message-dropdown > .dropdown-menu ').click(function(e) { 14 | e.stopPropagation(); 15 | }); 16 | 17 | /* 18 | ========================================= 19 | | | 20 | | Multi-Check checkbox | 21 | | | 22 | ========================================= 23 | */ 24 | 25 | function checkall(clickchk, relChkbox) { 26 | 27 | var checker = $('#' + clickchk); 28 | var multichk = $('.' + relChkbox); 29 | 30 | 31 | checker.click(function () { 32 | multichk.prop('checked', $(this).prop('checked')); 33 | }); 34 | } 35 | 36 | 37 | /* 38 | ========================================= 39 | | | 40 | | MultiCheck | 41 | | | 42 | ========================================= 43 | */ 44 | 45 | /* 46 | This MultiCheck Function is recommanded for datatable 47 | */ 48 | 49 | function multiCheck(tb_var) { 50 | tb_var.on("change", ".chk-parent", function() { 51 | var e=$(this).closest("table").find("td:first-child .child-chk"), a=$(this).is(":checked"); 52 | $(e).each(function() { 53 | a?($(this).prop("checked", !0), $(this).closest("tr").addClass("active")): ($(this).prop("checked", !1), $(this).closest("tr").removeClass("active")) 54 | }) 55 | }), 56 | tb_var.on("change", "tbody tr .new-control", function() { 57 | $(this).parents("tr").toggleClass("active") 58 | }) 59 | } 60 | 61 | /* 62 | ========================================= 63 | | | 64 | | MultiCheck | 65 | | | 66 | ========================================= 67 | */ 68 | 69 | function checkall(clickchk, relChkbox) { 70 | 71 | var checker = $('#' + clickchk); 72 | var multichk = $('.' + relChkbox); 73 | 74 | 75 | checker.click(function () { 76 | multichk.prop('checked', $(this).prop('checked')); 77 | }); 78 | } 79 | 80 | /* 81 | ========================================= 82 | | | 83 | | Tooltips | 84 | | | 85 | ========================================= 86 | */ 87 | 88 | $('.bs-tooltip').tooltip(); 89 | 90 | /* 91 | ========================================= 92 | | | 93 | | Popovers | 94 | | | 95 | ========================================= 96 | */ 97 | 98 | $('.bs-popover').popover(); 99 | 100 | 101 | /* 102 | ================================================ 103 | | | 104 | | Rounded Tooltip | 105 | | | 106 | ================================================ 107 | */ 108 | 109 | $('.t-dot').tooltip({ 110 | template: '' 111 | }) 112 | 113 | 114 | /* 115 | ================================================ 116 | | IE VERSION Dector | 117 | ================================================ 118 | */ 119 | 120 | function GetIEVersion() { 121 | var sAgent = window.navigator.userAgent; 122 | var Idx = sAgent.indexOf("MSIE"); 123 | 124 | // If IE, return version number. 125 | if (Idx > 0) 126 | return parseInt(sAgent.substring(Idx+ 5, sAgent.indexOf(".", Idx))); 127 | 128 | // If IE 11 then look for Updated user agent string. 129 | else if (!!navigator.userAgent.match(/Trident\/7\./)) 130 | return 11; 131 | 132 | else 133 | return 0; //It is not IE 134 | } -------------------------------------------------------------------------------- /main/scripts/createAd/copyAdset.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 17 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 18 | 19 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 20 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 21 | 22 | 23 | $access_token = $row['access_token']; 24 | if($row['user_agent'] != '') 25 | $user_agent = $row['user_agent']; 26 | if($row['proxy'] != ''){ 27 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 28 | $login_password = explode("@", $row['proxy'])[1]; 29 | } 30 | 31 | 32 | 33 | if((time() - strval($row['reftime'])) > 1800) { 34 | 35 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 36 | 37 | 38 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 39 | 40 | 41 | if($output->error) { 42 | $ERROR = $output->error->message; 43 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 44 | if($output->error->error_subcode == '459') { 45 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 46 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 47 | } 48 | else if($output->error->error_subcode == '452'){ 49 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 50 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 51 | } 52 | $log = "COPY ADSET ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 53 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 54 | header('Location: uploadFile.php'); 55 | exit(); 56 | } 57 | else 58 | $firstoutput = $output; 59 | } 60 | 61 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 62 | 63 | 64 | 65 | 66 | 67 | $_SESSION['stade'][$current_numb][] = 'copyadset'; 68 | 69 | 70 | for($i = 0; $i < (int)$_SESSION['duble']; ++$i) { 71 | 72 | $url = "https://graph.facebook.com/v7.0/".$_SESSION['adset_id']."/copies"; 73 | 74 | $post_data = array ( 75 | "access_token" => $row['access_token'], 76 | "deep_copy" => 'true', 77 | "status_option" => 'INHERITED_FROM_SOURCE' 78 | ); 79 | 80 | 81 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 82 | 83 | if(is_null($output)) 84 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 85 | 86 | $log = "COPY ADSET ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 87 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 88 | 89 | if($output->error) { 90 | $ERROR = $output->error->message; 91 | $_SESSION['error'][$current_numb] = $output; 92 | //$_SESSION['error'][$current_numb] = $output->error->error_subcode; 93 | if($output->error->error_subcode == '459') { 94 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 95 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 96 | } 97 | else if($output->error->error_subcode == '452'){ 98 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 99 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 100 | } 101 | else if($output->error->error_subcode == '1885316'){ 102 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 103 | } 104 | else 105 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 106 | 107 | header('Location: uploadFile.php'); 108 | exit(); 109 | 110 | } 111 | } 112 | 113 | 114 | header('Location: refresh.php'); 115 | exit(); 116 | 117 | 118 | ?> -------------------------------------------------------------------------------- /main/cabs.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |

Рекламные кабинеты

9 |
10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 26 |
27 |
28 |
29 |
30 |
33 |
34 | 44 | 56 |
57 |
58 | 59 |
60 | 61 | 62 | 63 |
64 | 65 |
66 | 67 |
68 |
69 |
-------------------------------------------------------------------------------- /main/scripts/publishFp.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Tokenbase WHERE number='".$_SESSION['info'][$current_numb]."'"); 35 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 36 | $access_token = $row['access_token']; 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | 45 | if((time() - strval($row['reftime'])) > 1800) { 46 | 47 | 48 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 49 | 50 | 51 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 52 | 53 | if($output->error) { 54 | $ERROR = $output->error->message; 55 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 56 | if($output->error->error_subcode == '459') { 57 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 58 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 59 | } 60 | else if($output->error->error_subcode == '452'){ 61 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 62 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 63 | } 64 | } 65 | else 66 | $firstoutput = $output; 67 | } 68 | 69 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 70 | 71 | if($ERROR == '') { 72 | 73 | 74 | $queryFp = $link->query("SELECT * FROM Fp_Id WHERE access_token='".$access_token."'"); 75 | $rowFp = mysqli_fetch_array($queryFp, MYSQLI_ASSOC); 76 | 77 | 78 | 79 | $url = "https://graph.facebook.com/v7.0/".$rowFp['fp_id']."?access_token=".$rowFp['fp_token']."&is_published=true"; 80 | 81 | 82 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 83 | if(is_null($output)) 84 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 85 | 86 | if($output->error) { 87 | $ERROR = $output->error->message; 88 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 89 | } 90 | 91 | 92 | 93 | 94 | $_SESSION['output'][$current_numb] = $output; 95 | 96 | if($output->error) { 97 | $ERROR = $output->error->message; 98 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 99 | if($output->error->error_subcode == '459') { 100 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 101 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 102 | } 103 | else if($output->error->error_subcode == '452'){ 104 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 105 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 106 | } 107 | } 108 | 109 | $log = "PUBLISH FP ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 110 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 111 | 112 | 113 | $queryUp = $link->query("UPDATE Fp_Id SET is_published = '1' WHERE name = '".$rowFp['name']."'"); 114 | $_SESSION['query'][] = $queryAdd; 115 | 116 | } 117 | 118 | header('Location: publishFp.php'); 119 | } 120 | ?> 121 | -------------------------------------------------------------------------------- /main/modals/addAccount.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /main/scripts/stopCampaigns.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Camp_Id WHERE camp_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowCamp['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | if((time() - strval($row['reftime'])) > 1800) { 45 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 46 | 47 | 48 | 49 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 50 | 51 | if($output->error) { 52 | $ERROR = $output->error->message; 53 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 54 | if($output->error->error_subcode == '459') { 55 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 56 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 57 | } 58 | else if($output->error->error_subcode == '452'){ 59 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 60 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 61 | } 62 | } 63 | else 64 | $firstoutput = $output; 65 | } 66 | 67 | 68 | if($ERROR == '') { 69 | 70 | $url = "https://graph.facebook.com/v7.0/".$rowCamp['camp_id']; 71 | 72 | 73 | $post_data = array ( 74 | "access_token" => $row['access_token'], 75 | "status" => 'PAUSED' 76 | ); 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | if($output->error) { 82 | $ERROR = $output->error->message; 83 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 84 | if($output->error->error_subcode == '459') { 85 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 86 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 87 | } 88 | else if($output->error->error_subcode == '452'){ 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '1885316'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | } 95 | else 96 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 97 | 98 | } 99 | } 100 | 101 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 102 | 103 | if($ERROR == '') 104 | if($output->success) 105 | $queryUp = $link->query("UPDATE Camp_Id SET state='PAUSED' WHERE camp_id='".$rowCamp['camp_id']."'"); 106 | else 107 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 108 | 109 | 110 | $log = "STOP CAMPAIGNS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 111 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 112 | 113 | 114 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 115 | $_SESSION['output'][$current_numb] = $output; 116 | 117 | 118 | header('Location: stopCampaigns.php'); 119 | } 120 | 121 | ?> -------------------------------------------------------------------------------- /main/scripts/startCampaigns.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Camp_Id WHERE camp_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowCamp['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | if((time() - strval($row['reftime'])) > 1800) { 45 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 46 | 47 | 48 | 49 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 50 | 51 | if($output->error) { 52 | $ERROR = $output->error->message; 53 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 54 | if($output->error->error_subcode == '459') { 55 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 56 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 57 | } 58 | else if($output->error->error_subcode == '452'){ 59 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 60 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 61 | } 62 | } 63 | else 64 | $firstoutput = $output; 65 | } 66 | 67 | 68 | if($ERROR == '') { 69 | 70 | $url = "https://graph.facebook.com/v7.0/".$rowCamp['camp_id']; 71 | 72 | 73 | $post_data = array ( 74 | "access_token" => $row['access_token'], 75 | "status" => 'ACTIVE' 76 | ); 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | if($output->error) { 82 | $ERROR = $output->error->message; 83 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 84 | if($output->error->error_subcode == '459') { 85 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 86 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 87 | } 88 | else if($output->error->error_subcode == '452'){ 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '1885316'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | } 95 | else 96 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 97 | 98 | } 99 | } 100 | 101 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 102 | 103 | if($ERROR == '') 104 | if($output->success) 105 | $queryUp = $link->query("UPDATE Camp_Id SET state='ACTIVE' WHERE camp_id='".$rowCamp['camp_id']."'"); 106 | else 107 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 108 | 109 | 110 | $log = "START CAMPAIGNS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 111 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 112 | 113 | 114 | 115 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 116 | $_SESSION['output'][$current_numb] = $output; 117 | 118 | 119 | header('Location: startCampaigns.php'); 120 | } 121 | 122 | ?> -------------------------------------------------------------------------------- /main/scripts/changeCurrency.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | 45 | if((time() - strval($row['reftime'])) > 1800) { 46 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 47 | 48 | 49 | 50 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 51 | 52 | if($output->error) { 53 | $ERROR = $output->error->message; 54 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 55 | if($output->error->error_subcode == '459') { 56 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 57 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 58 | } 59 | else if($output->error->error_subcode == '452'){ 60 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 61 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 62 | } 63 | } 64 | else 65 | $firstoutput = $output; 66 | } 67 | 68 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 69 | 70 | if($ERROR == '') { 71 | 72 | $url = "https://graph.facebook.com/v7.0/".$rowRk['rk_id']; 73 | $post_data = array( 74 | "access_token" => $row['access_token'], 75 | "currency" => $_SESSION['currency']); 76 | 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | 82 | if($output->error) { 83 | $ERROR = $output->error->message; 84 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 85 | if($output->error->error_subcode == '459') { 86 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 87 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 88 | } 89 | else if($output->error->error_subcode == '452'){ 90 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 91 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 92 | } 93 | else if($output->error->error_subcode == '1885316'){ 94 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 95 | } 96 | else 97 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 98 | 99 | } 100 | 101 | if($output->success) 102 | $queryUp = $link->query("UPDATE Rk_Id SET currency = '".$_SESSION['currency']."' WHERE rk_id = '".$rowRk['rk_id']."'"); 103 | else 104 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowRk['rk_id']."'"); 105 | 106 | } 107 | 108 | $log = "CHANGE CURRENCY ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 109 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 110 | 111 | 112 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 113 | $_SESSION['output'][$current_numb] = $output; 114 | print_r(json_encode($_SESSION)); 115 | session_unset(); 116 | exit(); 117 | //header('Location: changeCurrency.php'); 118 | } 119 | 120 | ?> -------------------------------------------------------------------------------- /main/scripts/stopAdsets.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Adset_Id WHERE adset_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowAdset = mysqli_fetch_array($queryAdset, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowAdset['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | if((time() - strval($row['reftime'])) > 1800) { 45 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 46 | 47 | 48 | 49 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 50 | 51 | if($output->error) { 52 | $ERROR = $output->error->message; 53 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 54 | if($output->error->error_subcode == '459') { 55 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 56 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 57 | } 58 | else if($output->error->error_subcode == '452'){ 59 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 60 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 61 | } 62 | } 63 | else 64 | $firstoutput = $output; 65 | } 66 | 67 | 68 | if($ERROR == '') { 69 | 70 | $url = "https://graph.facebook.com/v7.0/".$rowAdset['adset_id']; 71 | 72 | 73 | $post_data = array ( 74 | "access_token" => $row['access_token'], 75 | "status" => 'PAUSED' 76 | ); 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | if($output->error) { 82 | $ERROR = $output->error->message; 83 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 84 | if($output->error->error_subcode == '459') { 85 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 86 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 87 | } 88 | else if($output->error->error_subcode == '452'){ 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '1885316'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | } 95 | else 96 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 97 | 98 | } 99 | } 100 | 101 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 102 | 103 | if($ERROR == '') 104 | if($output->success) 105 | $queryUp = $link->query("UPDATE Adset_Id SET state='PAUSED' WHERE adset_id='".$rowAdset['adset_id']."'"); 106 | else { 107 | $queryCamp = $link->query("SELECT * FROM Camp_Id WHERE camp_id='".$rowAdset['camp_id']."'"); 108 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 109 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 110 | } 111 | 112 | 113 | $log = "STOP ADSETS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 114 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 115 | 116 | 117 | 118 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 119 | $_SESSION['output'][$current_numb] = $output; 120 | 121 | 122 | header('Location: stopAdsets.php'); 123 | } 124 | 125 | ?> -------------------------------------------------------------------------------- /main/scripts/startAdsets.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Adset_Id WHERE adset_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowAdset = mysqli_fetch_array($queryAdset, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowAdset['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | if((time() - strval($row['reftime'])) > 1800) { 45 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 46 | 47 | 48 | 49 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 50 | 51 | if($output->error) { 52 | $ERROR = $output->error->message; 53 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 54 | if($output->error->error_subcode == '459') { 55 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 56 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 57 | } 58 | else if($output->error->error_subcode == '452'){ 59 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 60 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 61 | } 62 | } 63 | else 64 | $firstoutput = $output; 65 | } 66 | 67 | 68 | if($ERROR == '') { 69 | 70 | $url = "https://graph.facebook.com/v7.0/".$rowAdset['adset_id']; 71 | 72 | 73 | $post_data = array ( 74 | "access_token" => $row['access_token'], 75 | "status" => 'ACTIVE' 76 | ); 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | if($output->error) { 82 | $ERROR = $output->error->message; 83 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 84 | if($output->error->error_subcode == '459') { 85 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 86 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 87 | } 88 | else if($output->error->error_subcode == '452'){ 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '1885316'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | } 95 | else 96 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 97 | 98 | } 99 | } 100 | 101 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 102 | 103 | if($ERROR == '') 104 | if($output->success) 105 | $queryUp = $link->query("UPDATE Adset_Id SET state='ACTIVE' WHERE adset_id='".$rowAdset['adset_id']."'"); 106 | else { 107 | $queryCamp = $link->query("SELECT * FROM Camp_Id WHERE camp_id='".$rowAdset['camp_id']."'"); 108 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 109 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 110 | } 111 | 112 | 113 | $log = "START ADSETS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 114 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 115 | 116 | 117 | 118 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 119 | $_SESSION['output'][$current_numb] = $output; 120 | 121 | 122 | header('Location: startAdsets.php'); 123 | } 124 | 125 | ?> -------------------------------------------------------------------------------- /main/scripts/stopAds.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Ad_Id WHERE ad_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowAd = mysqli_fetch_array($queryAd, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowAd['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | $access_token = $row['access_token']; 35 | if($row['user_agent'] != '') 36 | $user_agent = $row['user_agent']; 37 | if($row['proxy'] != ''){ 38 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 39 | $login_password = explode("@", $row['proxy'])[1]; 40 | } 41 | 42 | 43 | if((time() - strval($row['reftime'])) > 1800) { 44 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 45 | 46 | 47 | 48 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 49 | 50 | if($output->error) { 51 | $ERROR = $output->error->message; 52 | $_SESSION['error'][$current_numb] = $output; 53 | if($output->error->error_subcode == '459') { 54 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 55 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 56 | } 57 | else if($output->error->error_subcode == '452'){ 58 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 59 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 60 | } 61 | } 62 | else 63 | $firstoutput = $output; 64 | } 65 | 66 | 67 | if($ERROR == '') { 68 | 69 | $url = "https://graph.facebook.com/v7.0/".$rowAd['ad_id']; 70 | 71 | 72 | $post_data = array ( 73 | "access_token" => $row['access_token'], 74 | "status" => 'PAUSED' 75 | ); 76 | 77 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 78 | if(is_null($output)) 79 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 80 | if($output->error) { 81 | $ERROR = $output->error->message; 82 | $_SESSION['error'][$current_numb] = $output; 83 | if($output->error->error_subcode == '459') { 84 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 85 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 86 | } 87 | else if($output->error->error_subcode == '452'){ 88 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 89 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 90 | } 91 | else if($output->error->error_subcode == '1885316'){ 92 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 93 | } 94 | else 95 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 96 | 97 | } 98 | } 99 | 100 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 101 | 102 | if($ERROR == '') 103 | if($output->success) 104 | $queryUp = $link->query("UPDATE Ad_Id SET state='PAUSED' WHERE ad_id='".$rowAd['ad_id']."'"); 105 | else { 106 | $queryAdset = $link->query("SELECT * FROM Adset_Id WHERE adset_id='".$rowAd['adset_id']."'"); 107 | $rowAdset = mysqli_fetch_array($queryAdset, MYSQLI_ASSOC); 108 | $queryCamp = $link->query("SELECT * FROM Camp_Id WHERE camp_id='".$rowAdset['camp_id']."'"); 109 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 110 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 111 | } 112 | 113 | 114 | $log = "STOP ADS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 115 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 116 | 117 | 118 | 119 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 120 | $_SESSION['output'][$current_numb] = $output; 121 | 122 | 123 | header('Location: stopAds.php'); 124 | } 125 | 126 | ?> -------------------------------------------------------------------------------- /main/assets/css/datatables.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | /* 12 | * This combined file was created by the DataTables downloader builder: 13 | * https://datatables.net/download 14 | * 15 | * To rebuild or modify this file with the latest versions of the included 16 | * software please visit: 17 | * https://datatables.net/download/#bs4/dt-1.10.16 18 | * 19 | * Included libraries: 20 | * DataTables 1.10.16 21 | */ 22 | table.dataTable { 23 | clear: both; 24 | width: 100% !important; 25 | margin-top: 6px !important; 26 | margin-bottom: 6px !important; 27 | max-width: none !important; 28 | border-collapse: separate !important; 29 | border: none; } 30 | table.dataTable td, table.dataTable th { 31 | -webkit-box-sizing: content-box; 32 | box-sizing: content-box; 33 | padding: 9px 7px; } 34 | table.dataTable td.dataTables_empty, table.dataTable th.dataTables_empty { 35 | text-align: center; } 36 | table.dataTable.nowrap th, table.dataTable.nowrap td { 37 | white-space: nowrap; } 38 | 39 | div.dataTables_wrapper div.dataTables_length label { 40 | font-weight: normal; 41 | text-align: left; 42 | white-space: nowrap; 43 | color: #888ea8; 44 | font-weight: 600; } 45 | 46 | div.dataTables_wrapper div.dataTables_length select { 47 | width: 75px; 48 | display: inline-block; } 49 | 50 | div.dataTables_wrapper div.dataTables_filter { 51 | text-align: right; } 52 | div.dataTables_wrapper div.dataTables_filter label { 53 | font-weight: normal; 54 | white-space: nowrap; 55 | text-align: left; 56 | color: #888ea8; 57 | font-weight: 600; } 58 | div.dataTables_wrapper div.dataTables_filter input { 59 | margin-left: 0.5em; 60 | display: inline-block; 61 | width: auto; } 62 | 63 | table.dataTable .form-control { 64 | color: #888ea8; 65 | font-size: 0.875rem; } 66 | table.dataTable .form-control::-webkit-input-placeholder, table.dataTable .form-control::-ms-input-placeholder, table.dataTable .form-control::-moz-placeholder { 67 | color: #888ea8; 68 | font-size: 0.875rem; } 69 | 70 | div.dataTables_wrapper div.dataTables_info { 71 | padding-top: 0.85em; 72 | white-space: nowrap; } 73 | 74 | div.dataTables_wrapper div.dataTables_paginate { 75 | margin: 0; 76 | white-space: nowrap; 77 | text-align: right; } 78 | div.dataTables_wrapper div.dataTables_paginate ul.pagination { 79 | margin: 2px 0; 80 | white-space: nowrap; 81 | justify-content: flex-end; } 82 | 83 | div.dataTables_wrapper div.dataTables_processing { 84 | position: absolute; 85 | top: 50%; 86 | left: 50%; 87 | width: 200px; 88 | margin-left: -100px; 89 | margin-top: -26px; 90 | text-align: center; 91 | padding: 1em 0; } 92 | 93 | table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting { 94 | padding-right: 30px; } 95 | 96 | table.dataTable thead > tr > td.sorting_asc, table.dataTable thead > tr > td.sorting_desc, table.dataTable thead > tr > td.sorting { 97 | padding-right: 30px; } 98 | 99 | 100 | table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled { 101 | cursor: pointer; 102 | position: relative; } 103 | 104 | 105 | div.dataTables_scrollHead table.dataTable { 106 | margin-bottom: 0 !important; } 107 | 108 | div.dataTables_scrollBody table { 109 | border-top: none; 110 | margin-top: 0 !important; 111 | margin-bottom: 0 !important; } 112 | 113 | div.dataTables_scrollBody table tbody tr:first-child th, div.dataTables_scrollBody table tbody tr:first-child td { 114 | border-top: none; } 115 | 116 | div.dataTables_scrollFoot > .dataTables_scrollFootInner { 117 | box-sizing: content-box; } 118 | div.dataTables_scrollFoot > .dataTables_scrollFootInner > table { 119 | margin-top: 0 !important; 120 | border-top: none; } 121 | 122 | @media screen and (max-width: 767px) { 123 | div.dataTables_wrapper div.dataTables_length, div.dataTables_wrapper div.dataTables_filter, div.dataTables_wrapper div.dataTables_info, div.dataTables_wrapper div.dataTables_paginate { 124 | text-align: center; } } 125 | 126 | table.dataTable.table-sm > thead > tr > th { 127 | padding-right: 20px; } 128 | 129 | 130 | table.table-bordered.dataTable th, table.table-bordered.dataTable td { 131 | border-left-width: 0; } 132 | 133 | table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable td:last-child { 134 | border-right-width: 0; } 135 | 136 | table.table-bordered.dataTable tbody th, table.table-bordered.dataTable tbody td { 137 | border-bottom-width: 0; } 138 | 139 | div.dataTables_scrollHead table.table-bordered { 140 | border-bottom-width: 0; } 141 | 142 | div.table-responsive > div.dataTables_wrapper > div.row { 143 | margin: 0; } 144 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child { 145 | padding-left: 0; } 146 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child { 147 | padding-right: 0; } 148 | -------------------------------------------------------------------------------- /main/scripts/startAds.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Ad_Id WHERE ad_id='".$_SESSION['numbers'][$current_numb]."'"); 29 | $rowAd = mysqli_fetch_array($queryAd, MYSQLI_ASSOC); 30 | 31 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowAd['access_token']."'"); 32 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 33 | 34 | 35 | $access_token = $row['access_token']; 36 | if($row['user_agent'] != '') 37 | $user_agent = $row['user_agent']; 38 | if($row['proxy'] != ''){ 39 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 40 | $login_password = explode("@", $row['proxy'])[1]; 41 | } 42 | 43 | 44 | if((time() - strval($row['reftime'])) > 1800) { 45 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 46 | 47 | 48 | 49 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 50 | 51 | if($output->error) { 52 | $ERROR = $output->error->message; 53 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 54 | if($output->error->error_subcode == '459') { 55 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 56 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 57 | } 58 | else if($output->error->error_subcode == '452'){ 59 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 60 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 61 | } 62 | } 63 | else 64 | $firstoutput = $output; 65 | } 66 | 67 | 68 | if($ERROR == '') { 69 | 70 | $url = "https://graph.facebook.com/v7.0/".$rowAd['ad_id']; 71 | 72 | 73 | $post_data = array ( 74 | "access_token" => $row['access_token'], 75 | "status" => 'ACTIVE' 76 | ); 77 | 78 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 79 | if(is_null($output)) 80 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 81 | if($output->error) { 82 | $ERROR = $output->error->message; 83 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 84 | if($output->error->error_subcode == '459') { 85 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 86 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 87 | } 88 | else if($output->error->error_subcode == '452'){ 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '1885316'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | } 95 | else 96 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 97 | 98 | } 99 | } 100 | 101 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 102 | 103 | if($ERROR == '') 104 | if($output->success) 105 | $queryUp = $link->query("UPDATE Ad_Id SET state='ACTIVE' WHERE ad_id='".$rowAd['ad_id']."'"); 106 | else { 107 | $queryAdset = $link->query("SELECT * FROM Adset_Id WHERE adset_id='".$rowAd['adset_id']."'"); 108 | $rowAdset = mysqli_fetch_array($queryAdset, MYSQLI_ASSOC); 109 | $queryCamp = $link->query("SELECT * FROM Camp_Id WHERE camp_id='".$rowAdset['camp_id']."'"); 110 | $rowCamp = mysqli_fetch_array($queryCamp, MYSQLI_ASSOC); 111 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowCamp['rk_id']."'"); 112 | } 113 | 114 | 115 | $log = "START ADS ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 116 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 117 | 118 | 119 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 120 | $_SESSION['output'][$current_numb] = $output; 121 | 122 | 123 | header('Location: startAds.php'); 124 | } 125 | 126 | ?> -------------------------------------------------------------------------------- /main/scripts/createPixel.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 28 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 29 | 30 | 31 | if($rowRk['pixel_id'] == '') { 32 | 33 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 34 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 35 | 36 | 37 | $access_token = $row['access_token']; 38 | if($row['user_agent'] != '') 39 | $user_agent = $row['user_agent']; 40 | if($row['proxy'] != ''){ 41 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 42 | $login_password = explode("@", $row['proxy'])[1]; 43 | } 44 | 45 | 46 | if((time() - strval($row['reftime'])) > 1800) { 47 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 48 | 49 | 50 | 51 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 52 | 53 | if($output->error) { 54 | $ERROR = $output->error->message; 55 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 56 | if($output->error->error_subcode == '459') { 57 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 58 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 59 | } 60 | else if($output->error->error_subcode == '452'){ 61 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 62 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 63 | } 64 | } 65 | else 66 | $firstoutput = $output; 67 | } 68 | 69 | 70 | if($ERROR == '') { 71 | 72 | 73 | $url = "https://graph.facebook.com/v7.0/".$rowRk['rk_id']."/adspixels"; 74 | 75 | 76 | $post_data = array ( 77 | "access_token" => $row['access_token'], 78 | "name" => 'Пиксель аккаунта «'.$row['name'].'»' 79 | ); 80 | 81 | 82 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 83 | if(is_null($output)) 84 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 85 | if($output->error) { 86 | $ERROR = $output->error->message; 87 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 88 | if($output->error->error_subcode == '459') { 89 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 90 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 91 | } 92 | else if($output->error->error_subcode == '452'){ 93 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 94 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 95 | } 96 | else if($output->error->error_subcode == '1885316'){ 97 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 98 | } 99 | else 100 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 101 | 102 | } 103 | 104 | 105 | } 106 | 107 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 108 | 109 | if($ERROR == '') 110 | $queryUp = $link->query("UPDATE Rk_Id SET pixel_id = '".$output->id."' WHERE rk_id = '".$rowRk['rk_id']."'"); 111 | else 112 | $queryUp = $link->query("UPDATE Rk_Id SET state = 'ERROR' WHERE rk_id = '".$rowRk['rk_id']."'"); 113 | 114 | 115 | $log = "CREATE PIXEL ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 116 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 117 | 118 | 119 | $_SESSION['firstoutput'][$current_numb] = $firstoutput; 120 | $_SESSION['output'][$current_numb] = $output; 121 | } 122 | 123 | header('Location: createPixel.php'); 124 | } 125 | 126 | ?> -------------------------------------------------------------------------------- /main/scripts/createAd/createAd.php: -------------------------------------------------------------------------------- 1 | $value) 98 | if($value == '') 99 | unset($_SESSION[$key]); 100 | 101 | $_SESSION['camp_name'] = $_POST['camp_name']; 102 | $_SESSION['adset_name'] = $_POST['adset_name']; 103 | $_SESSION['ad_name'] = $_POST['ad_name']; 104 | $_SESSION['age_min'] = $_POST['age_min']; 105 | $_SESSION['age_max'] = $_POST['age_max']; 106 | $_SESSION['duble'] = $_POST['duble']; 107 | $_SESSION['message'] = $_POST['message']; 108 | $_SESSION['title'] = $_POST['title']; 109 | $_SESSION['description'] = $_POST['description']; 110 | 111 | header('Location: uploadFile.php'); 112 | 113 | exit(); 114 | ?> -------------------------------------------------------------------------------- /main/assets/css/dt-global_style.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | .widget-content-area { 12 | -webkit-box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.0901961), 0 1px 20px 0 rgba(0, 0, 0, 0.08), 0px 1px 11px 0px rgba(0, 0, 0, 0.06); 13 | -moz-box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.0901961), 0 1px 20px 0 rgba(0, 0, 0, 0.08), 0px 1px 11px 0px rgba(0, 0, 0, 0.06); 14 | box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.0901961), 0 1px 20px 0 rgba(0, 0, 0, 0.08), 0px 1px 11px 0px rgba(0, 0, 0, 0.06); } 15 | 16 | 17 | .new-control.new-checkbox .new-control-indicator { 18 | top: 0; 19 | height: 22px; 20 | width: 22px; 21 | border-radius: 50%; } 22 | 23 | .table > thead { 24 | border-top: 1px solid #e0e6ed; 25 | border-bottom: 1px solid #e0e6ed; } 26 | 27 | table.dataTable { 28 | border-collapse: separate; 29 | border-spacing: 0 5px; 30 | margin-top: 8px !important; 31 | margin-bottom: 50px !important; 32 | border-collapse: collapse !important; } 33 | 34 | 35 | 36 | 37 | .table > tbody tr { 38 | border-radius: 4px; 39 | -webkit-transition: all 0.1s ease; 40 | transition: all 0.1s ease; 41 | border-bottom: 1px solid #e0e6ed; } 42 | 43 | .table > thead > tr > th { 44 | color: #1b55e2; 45 | font-weight: 700; 46 | font-size: 13px; 47 | border: none; 48 | letter-spacing: 1px; 49 | text-transform: uppercase; } 50 | 51 | .table > tbody > tr > td { 52 | border: none; 53 | color: #888ea8; 54 | font-size: 13px; 55 | letter-spacing: 1px; } 56 | 57 | .table-striped tbody tr:nth-of-type(odd) { 58 | background-color: transparent !important; } 59 | 60 | .table > tfoot > tr > th { 61 | border: none; } 62 | 63 | .table-hover:not(.table-dark) tbody tr:hover { 64 | background-color: transparent !important; 65 | -webkit-transform: translateY(-1px) scale(1.01); 66 | transform: translateY(-1px) scale(1.01); } 67 | 68 | .table-hover.non-hover:not(.table-dark) tbody tr:hover { 69 | -webkit-transform: none; 70 | transform: none; } 71 | 72 | div.dataTables_wrapper div.dataTables_info { 73 | padding-top: 0.85em; 74 | white-space: normal; 75 | color: #1b55e2; 76 | font-weight: 600; 77 | border: 1px solid #e0e6ed; 78 | display: inline-block; 79 | padding: 10px 16px; 80 | border-radius: 6px; 81 | font-size: 13px; } 82 | 83 | div.dataTables_wrapper div.dataTables_filter label { 84 | position: relative; } 85 | 86 | div.dataTables_wrapper div.dataTables_filter svg { 87 | position: absolute; 88 | top: 15px; 89 | right: 14px; 90 | width: 20px; 91 | color: #d3d3d3; } 92 | 93 | .dataTables_wrapper .form-control { 94 | background: #fff; 95 | border: none; 96 | margin-top: 5px; 97 | -webkit-box-shadow: 2px 5px 17px 0 rgba(31, 45, 61, 0.1); 98 | box-shadow: 2px 5px 17px 0 rgba(31, 45, 61, 0.1); 99 | border-radius: 6px; 100 | border: 1px solid #e0e6ed; 101 | padding: 8px 30px 8px 14px; } 102 | 103 | div.dataTables_wrapper div.dataTables_filter input { 104 | width: 150px; } 105 | 106 | .dataTables_wrapper .dataTables_length select.form-control { 107 | padding: 8px 17px 8px 14px; 108 | -moz-appearance: none; 109 | /* Firefox */ 110 | -webkit-appearance: none; 111 | /* Safari and Chrome */ 112 | appearance: none; 113 | background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23d3d3d3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-down'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") 50px 9px no-repeat; } 114 | 115 | div.dataTables_wrapper div.dataTables_paginate { 116 | margin: 0; 117 | white-space: nowrap; 118 | text-align: right; 119 | display: inline-block; } 120 | 121 | .page-link { 122 | margin-right: 5px; 123 | border-radius: 50%; 124 | padding: 8px 12px; 125 | background: rgba(0, 23, 55, 0.08); 126 | border: none; 127 | color: #888ea8; } 128 | .page-link:focus { 129 | box-shadow: none; } 130 | 131 | div.dataTables_wrapper div.dataTables_paginate ul.pagination { 132 | margin: 3px 0; } 133 | 134 | .page-item.disabled .page-link { 135 | background: #f1f2f3; } 136 | .page-item.disabled .page-link svg { 137 | color: #acb0c3; } 138 | 139 | .page-item:first-child .page-link, .page-item:last-child .page-link { 140 | border-radius: 50%; 141 | padding: 5px 9px; } 142 | .page-item:first-child .page-link svg, .page-item:last-child .page-link svg { 143 | width: 17px; } 144 | 145 | .page-item.active .page-link { 146 | background-color: #1b55e2; } 147 | 148 | #alter_pagination_next a, #alter_pagination_previous a { 149 | border-radius: 50%; 150 | padding: 5px 9px; } 151 | 152 | #alter_pagination_next a svg, #alter_pagination_previous a svg { 153 | width: 17px; } 154 | 155 | .table-cancel { 156 | color: #888ea8; 157 | margin-right: 6px; 158 | vertical-align: middle; 159 | fill: rgba(0, 23, 55, 0.08); 160 | cursor: pointer; } 161 | 162 | 163 | 164 | @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { 165 | /* IE10+ CSS styles go here */ 166 | .dataTables_wrapper .dataTables_length select.form-control { 167 | background: transparent; 168 | padding: 8px 10px 8px 14px; } } 169 | 170 | @media (max-width: 767px) { 171 | div.dataTables_wrapper div.dataTables_info { 172 | margin-bottom: 40px; } } 173 | -------------------------------------------------------------------------------- /main/scripts/createAd/campaign.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 17 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 18 | 19 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 20 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 21 | 22 | 23 | $access_token = $row['access_token']; 24 | if($row['user_agent'] != '') 25 | $user_agent = $row['user_agent']; 26 | if($row['proxy'] != ''){ 27 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 28 | $login_password = explode("@", $row['proxy'])[1]; 29 | } 30 | 31 | 32 | 33 | if((time() - strval($row['reftime'])) > 1800) { 34 | 35 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 36 | 37 | 38 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 39 | 40 | 41 | if($output->error) { 42 | $ERROR = $output->error->message; 43 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 44 | if($output->error->error_subcode == '459') { 45 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 46 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 47 | } 48 | else if($output->error->error_subcode == '452'){ 49 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 50 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 51 | } 52 | $log = "CAMPAIGN ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 53 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 54 | header('Location: uploadFile.php'); 55 | exit(); 56 | } 57 | else 58 | $firstoutput = $output; 59 | } 60 | 61 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 62 | 63 | 64 | 65 | 66 | 67 | 68 | $_SESSION['stade'][$current_numb][] = 'campaign'; 69 | $url = "https://graph.facebook.com/v7.0/".$rowRk['rk_id']."/campaigns"; 70 | 71 | 72 | 73 | //Статус 74 | if(isset($_SESSION['campaign_status'])) 75 | $status = 'ACTIVE'; 76 | else 77 | $status = 'PAUSED'; 78 | 79 | if($_SESSION['camp_name'] == '' || !isset($_SESSION['camp_name'])) 80 | $_SESSION['camp_name'] = 'Новая кампания'; 81 | 82 | if($_SESSION['place_daily_budget'] == 'campaign_daily_budget') 83 | $post_data = array ( 84 | "access_token" => $row['access_token'], 85 | "special_ad_categories" => "NONE", 86 | "daily_budget" => (string)(((int)$_SESSION['daily_budget'])*100), 87 | "name" => $_SESSION['camp_name'], 88 | "objective" => $_SESSION['objective'], 89 | "status" => $status 90 | ); 91 | else 92 | $post_data = array ( 93 | "access_token" => $row['access_token'], 94 | "special_ad_categories" => "NONE", 95 | "name" => $_SESSION['camp_name'], 96 | "objective" => $_SESSION['objective'], 97 | "status" => $status 98 | ); 99 | 100 | if($_SESSION['place_daily_budget'] == 'campaign_daily_budget') 101 | $post_data['bid_strategy'] = $_SESSION['bid_strategy']; 102 | 103 | 104 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 105 | if(is_null($output)) 106 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 107 | 108 | $log = "CAMPAIGN ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 109 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 110 | if($output->error) { 111 | $ERROR = $output->error->message; 112 | $_SESSION['error'][$current_numb] = $output; 113 | if($output->error->error_subcode == '459') { 114 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 115 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 116 | } 117 | else if($output->error->error_subcode == '452'){ 118 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 119 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 120 | } 121 | else if($output->error->error_subcode == '1885316'){ 122 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 123 | } 124 | else 125 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 126 | 127 | header('Location: uploadFile.php'); 128 | exit(); 129 | 130 | } 131 | else { 132 | 133 | $_SESSION['campaign_id'] = $output->id; 134 | $queryCamp = $link->query("INSERT INTO Camp_Id (name, camp_id, rk_id, access_token) VALUES ('".$_SESSION['camp_name']."', '".$output->id."', '".$rowRk['rk_id']."', '".$row['access_token']."')"); 135 | 136 | $_SESSION['output'][$current_numb][2] = $output; 137 | header('Location: adset.php'); 138 | exit(); 139 | 140 | } 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | ?> -------------------------------------------------------------------------------- /main/scripts/createAd/preview.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 17 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 18 | 19 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 20 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 21 | 22 | 23 | $access_token = $row['access_token']; 24 | if($row['user_agent'] != '') 25 | $user_agent = $row['user_agent']; 26 | if($row['proxy'] != ''){ 27 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 28 | $login_password = explode("@", $row['proxy'])[1]; 29 | } 30 | 31 | 32 | 33 | if((time() - strval($row['reftime'])) > 1800) { 34 | 35 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 36 | 37 | 38 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 39 | 40 | 41 | if($output->error) { 42 | $ERROR = $output->error->message; 43 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 44 | if($output->error->error_subcode == '459') { 45 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 46 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 47 | } 48 | else if($output->error->error_subcode == '452'){ 49 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 50 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 51 | } 52 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 53 | $log = "PREVIEW ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 54 | header('Location: uploadFile.php'); 55 | exit(); 56 | } 57 | else 58 | $firstoutput = $output; 59 | } 60 | 61 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | $file = 'creo/'.$_SESSION['creos'][0]; 70 | 71 | if(!exif_imagetype($file)) 72 | if(isset($_SESSION['is_preview'])) { 73 | 74 | include('uniq.php'); 75 | 76 | 77 | $fileend = $_SESSION['preview_type']; 78 | $name = $_SESSION['previews']; 79 | $copy_filename 80 | = "preview/".uniqid().".".$fileend; 81 | 82 | if(copy("preview/".$name.".".$fileend, $copy_filename)) 83 | Uniq::image($copy_filename, $copy_filename); 84 | 85 | 86 | $_SESSION['stade'][$current_numb][] = 'preview'; 87 | $url = "https://graph.facebook.com/v7.0/".$rowRk['rk_id']."/adimages"; 88 | 89 | 90 | 91 | $post_data = array ( 92 | "access_token" => $row['access_token'], 93 | "filename" => new CURLFILE($copy_filename) 94 | ); 95 | 96 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 97 | 98 | if(is_null($output)) 99 | include($_SERVER['DOCUMENT_ROOT']."/post.php"); 100 | 101 | $log = "PREVIEW ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 102 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 103 | 104 | if($output->error) { 105 | $ERROR = $output->error->message; 106 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 107 | if($output->error->error_subcode == '459') { 108 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 109 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 110 | } 111 | else if($output->error->error_subcode == '452'){ 112 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 113 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 114 | } 115 | else if($output->error->error_subcode == '1885316'){ 116 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 117 | } 118 | else 119 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 120 | 121 | header('Location: uploadFile.php'); 122 | exit(); 123 | 124 | } 125 | else { 126 | 127 | $output = json_encode($output); 128 | 129 | 130 | $output = str_replace("\"", "", $output); 131 | preg_match('/url:https:.*/', $output, $matches); 132 | $image_url = str_replace("url:", "", $matches[0]); 133 | $image_url = str_replace("}", "", $image_url); 134 | $image_url = str_replace("\\", "", $image_url); 135 | 136 | 137 | 138 | $_SESSION['preview'] = $image_url; 139 | 140 | } 141 | 142 | } 143 | 144 | $_SESSION['output'][$current_numb][1] = $output; 145 | header('Location: campaign.php'); 146 | exit(); 147 | 148 | 149 | ?> -------------------------------------------------------------------------------- /main/scripts/createAd/is_upload.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM Rk_Id WHERE rk_id='".$_SESSION['numbers'][$current_numb]."'"); 16 | $rowRk = mysqli_fetch_array($queryRk, MYSQLI_ASSOC); 17 | 18 | $query = $link->query("SELECT * FROM Tokenbase WHERE access_token='".$rowRk['access_token']."'"); 19 | $row = mysqli_fetch_array($query, MYSQLI_ASSOC); 20 | 21 | 22 | $access_token = $row['access_token']; 23 | if($row['user_agent'] != '') 24 | $user_agent = $row['user_agent']; 25 | if($row['proxy'] != ''){ 26 | $proxy = explode("//", explode("@", $row['proxy'])[0])[1]; 27 | $login_password = explode("@", $row['proxy'])[1]; 28 | } 29 | 30 | 31 | 32 | if((time() - strval($row['reftime'])) > 1800) { 33 | 34 | $url = "https://graph.facebook.com/v7.0/me/?access_token=".$access_token; 35 | 36 | 37 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 38 | 39 | 40 | if($output->error) { 41 | 42 | $ERROR = $output->error->message; 43 | $_SESSION['error'][$current_numb] = $output->error->error_subcode; 44 | if($output->error->error_subcode == '459') { 45 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 46 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 47 | } 48 | else if($output->error->error_subcode == '452'){ 49 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 50 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 51 | } 52 | $log = "IS UPLOAD ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 53 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 54 | header('Location: uploadFile.php'); 55 | exit(); 56 | } 57 | else 58 | $firstoutput = $output; 59 | } 60 | 61 | $queryUp = $link->query("UPDATE Tokenbase SET reftime='".strval(time())."' WHERE access_token='".$access_token."'"); 62 | 63 | 64 | 65 | 66 | 67 | 68 | $file = 'creo/'.$_SESSION['creos'].'.'.$_SESSION['creo_type']; 69 | 70 | 71 | if(!isset($_SESSION['count'])) { 72 | $_SESSION['count'] = 0; 73 | $count = 0; 74 | } 75 | else 76 | $count = (int)$_SESSION['count'] + 1; 77 | 78 | if($count == 30){ 79 | $_SESSION['error'][$current_numb] = 'Видео не загрузилось на фб'; 80 | header('Location: uploadFile.php'); 81 | } 82 | else 83 | if($ERROR == '') 84 | if(!exif_imagetype($file)) { 85 | 86 | sleep(10); 87 | $_SESSION['stade'][$current_numb][] = 'is_upload'; 88 | $url = "https://graph.facebook.com/v7.0/".$_SESSION['file_id']."?fields=status,picture&access_token=".$row['access_token']; 89 | 90 | 91 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 92 | 93 | if(is_null($output)) 94 | include($_SERVER['DOCUMENT_ROOT']."/get.php"); 95 | 96 | if($output->error) { 97 | $ERROR = $output->error->message; 98 | $_SESSION['error'][$current_numb] = $output; 99 | if($output->error->error_subcode == '459') { 100 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 101 | $queryUp = $link->query("UPDATE Tokenbase SET state='Selfy' WHERE access_token='".$access_token."'"); 102 | } 103 | else if($output->error->error_subcode == '452'){ 104 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 105 | $queryUp = $link->query("UPDATE Tokenbase SET state='Check Passwd' WHERE access_token='".$access_token."'"); 106 | } 107 | else if($output->error->error_subcode == '1885316'){ 108 | $queryUp = $link->query("UPDATE Rk_Id SET state='ERROR' WHERE access_token='".$access_token."'"); 109 | } 110 | else 111 | $_SESSION['fatalError'] = $output->error->error_user_title." ".$output->error->error_user_msg; 112 | 113 | $log = "IS UPLOAD ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 114 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 115 | 116 | header('Location: uploadFile.php'); 117 | exit(); 118 | } 119 | else { 120 | if($output->status->video_status == "ready") { 121 | $image_url = $output->picture; 122 | $_SESSION['image_url'] = $image_url; 123 | $log = "IS UPLOAD ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 124 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 125 | header('Location: preview.php'); 126 | exit(); 127 | } 128 | else { 129 | 130 | header('Location: is_upload.php'); 131 | exit(); 132 | } 133 | } 134 | } 135 | else { 136 | $log = "IS UPLOAD ".date("H:i:m d:m:Y")."\n".json_encode($_SESSION)."\n".date("H:i:m d:m:Y", $row['reftime'])."\n".json_encode($firstoutput)."\n".json_encode($output)."\n\n\n"; 137 | file_put_contents($_SERVER['DOCUMENT_ROOT']."/logs.txt", $log, FILE_APPEND); 138 | header('Location: campaign.php'); 139 | exit(); 140 | } 141 | 142 | ?> -------------------------------------------------------------------------------- /main/assets/css/alert.css: -------------------------------------------------------------------------------- 1 | /* 2 | =============================== 3 | @Import Function 4 | =============================== 5 | */ 6 | /* 7 | =============================== 8 | @Import Mixins 9 | =============================== 10 | */ 11 | /* Alert */ 12 | .alert { 13 | position: fixed; 14 | bottom: 0; 15 | right: 0; 16 | margin-right: 30px; 17 | opacity: .7; 18 | z-index: 9999; 19 | 20 | -webkit-border-radius: 5px; 21 | -moz-border-radius: 5px; 22 | border-radius: 5px; 23 | margin-bottom: 15px; 24 | padding: 0.9375rem; } 25 | .alert .btn { 26 | padding: 3px 12px; 27 | margin-right: 20px; } 28 | .alert .btn:hover { 29 | box-shadow: none; } 30 | .alert .alert-icon svg { 31 | vertical-align: middle; 32 | width: 33px; 33 | height: 33px; } 34 | .alert .close { 35 | color: #fff; 36 | opacity: 1; 37 | width: 18px; } 38 | 39 | /*Default Alerts*/ 40 | .alert-primary { 41 | color: #fff; 42 | background-color: #1b55e2; 43 | border-color: #1b55e2; } 44 | 45 | .alert-warning { 46 | color: #fff; 47 | background-color: #e2a03f; 48 | border-color: #e2a03f; } 49 | 50 | .alert-success { 51 | color: #fff; 52 | background-color: #8dbf42; 53 | border-color: #8dbf42; } 54 | 55 | .alert-info { 56 | color: #fff; 57 | background-color: #2196f3; 58 | border-color: #2196f3; } 59 | 60 | .alert-danger { 61 | color: #fff; 62 | background-color: #e7515a; 63 | border-color: #e7515a; } 64 | 65 | .alert-dark { 66 | color: #fff; 67 | background-color: #3b3f5c; 68 | border-color: #3b3f5c; } 69 | 70 | /*Outline Alerts*/ 71 | .alert-outline-primary { 72 | border-color: #1b55e2; 73 | border-radius: 5px; } 74 | 75 | .alert-outline-warning { 76 | border-color: #dea82a; 77 | border-radius: 5px; } 78 | 79 | .alert-outline-success { 80 | border-color: #8dbf42; 81 | border-radius: 5px; } 82 | 83 | .alert-outline-info { 84 | border-color: #009eda; 85 | border-radius: 5px; } 86 | 87 | .alert-outline-danger { 88 | border-color: #e7515a; 89 | border-radius: 5px; } 90 | 91 | .alert-outline-dark { 92 | border-color: #454656; 93 | border-radius: 5px; } 94 | 95 | .alert.alert-light .close { 96 | color: #0e1726; } 97 | 98 | .alert.solid-alert-3 .close, .alert.solid-alert-4 .close { 99 | color: #000; } 100 | 101 | .hide-default { 102 | display: none; } 103 | 104 | /* Light Alert */ 105 | .alert-light-primary { 106 | color: #1b55e2; 107 | background-color: #c2d5ff; 108 | border-color: #1b55e2; } 109 | .alert-light-primary svg.close { 110 | color: #1b55e2; } 111 | 112 | .alert-light-warning { 113 | color: #e2a03f; 114 | background-color: #ffeccb; 115 | border-color: #e2a03f; } 116 | .alert-light-warning svg.close { 117 | color: #e2a03f; } 118 | 119 | .alert-light-success { 120 | color: #8dbf42; 121 | background-color: #e6ffbf; 122 | border-color: #8dbf42; } 123 | .alert-light-success svg.close { 124 | color: #8dbf42; } 125 | 126 | .alert-light-info { 127 | color: #2196f3; 128 | background-color: #bae7ff; 129 | border-color: #2196f3; } 130 | .alert-light-info svg.close { 131 | color: #2196f3; } 132 | 133 | .alert-light-danger { 134 | color: #e7515a; 135 | background-color: #ffe1e2; 136 | border-color: #e7515a; } 137 | .alert-light-danger svg.close { 138 | color: #e7515a; } 139 | 140 | .alert-light-dark { 141 | color: #3b3f5c; 142 | background-color: #acb0c3; 143 | border-color: #3b3f5c; } 144 | .alert-light-dark svg.close { 145 | color: #3b3f5c; } 146 | 147 | /* Background Alerts */ 148 | .alert-background { 149 | color: #fff; 150 | background: #fff url(../../img/ab-1.jpeg) no-repeat center center; 151 | background-size: cover; } 152 | 153 | /* Gradient Alerts */ 154 | .alert-gradient { 155 | color: #fff; 156 | border: none; 157 | background-size: cover; 158 | background-image: linear-gradient(135deg, #bc1a4e 0%, #004fe6 100%); } 159 | 160 | /* Custom Alerts */ 161 | /* Default */ 162 | .custom-alert-1 { 163 | background-color: #5c1ac3; 164 | border-color: #5c1ac3; 165 | border-radius: 5px; 166 | color: #fff; } 167 | .custom-alert-1 .alert-icon { 168 | margin-right: 25px; } 169 | .custom-alert-1 .media-body { 170 | display: flex; 171 | justify-content: space-between; } 172 | .custom-alert-1 .alert-text { 173 | margin-right: 10px; } 174 | .custom-alert-1 .alert-text strong, .custom-alert-1 .alert-text span { 175 | vertical-align: sub; } 176 | 177 | /* Alert with Icon */ 178 | .alert-icon-left { 179 | border-left: 64px solid; } 180 | .alert-icon-left svg:not(.close) { 181 | color: #fff; 182 | width: 4rem; 183 | left: -4rem; 184 | text-align: center; 185 | position: absolute; 186 | top: 50%; 187 | margin-top: -10px; 188 | font-size: 1.25rem; 189 | font-weight: 400; 190 | line-height: 1; 191 | -webkit-font-smoothing: antialiased; 192 | -moz-osx-font-smoothing: grayscale; } 193 | 194 | .alert-icon-right { 195 | border-right: 64px solid; } 196 | .alert-icon-right svg:not(.close) { 197 | color: #fff; 198 | width: 4rem; 199 | right: -4rem; 200 | text-align: center; 201 | position: absolute; 202 | top: 50%; 203 | margin-top: -10px; 204 | font-size: 1.25rem; 205 | font-weight: 400; 206 | line-height: 1; 207 | -webkit-font-smoothing: antialiased; 208 | -moz-osx-font-smoothing: grayscale; } 209 | .alert-icon-right i { 210 | float: left; 211 | margin-right: 7px; } 212 | 213 | .alert[class*=alert-arrow-]:before { 214 | content: ''; 215 | display: inline-block; 216 | position: absolute; 217 | top: 50%; 218 | left: 0; 219 | border-left: 8px solid; 220 | border-top: 8px solid transparent; 221 | border-bottom: 8px solid transparent; 222 | border-left-color: inherit; 223 | margin-top: -8px; } 224 | 225 | .alert.alert-arrow-right:before { 226 | left: auto; 227 | right: 0; 228 | border-left: 0; 229 | border-right: 8px solid; 230 | border-right-color: inherit; } 231 | 232 | @media (max-width: 575px) { 233 | .custom-alert-1 .media-body { 234 | display: block; } 235 | .alert .btn { 236 | margin-top: 8px; } } 237 | -------------------------------------------------------------------------------- /main/vendor/php-curl-class/php-curl-class/src/Curl/CaseInsensitiveArray.php: -------------------------------------------------------------------------------- 1 | $value) { 46 | $this->offsetSet($key, $value); 47 | } 48 | } 49 | } 50 | 51 | /** 52 | * Offset Set 53 | * 54 | * Set data at a specified offset. Converts the offset to lowercase, and 55 | * stores the case-sensitive offset and the data at the lowercase indexes in 56 | * $this->keys and @this->data. 57 | * 58 | * @see https://secure.php.net/manual/en/arrayaccess.offsetset.php 59 | * 60 | * @param string $offset The offset to store the data at (case-insensitive). 61 | * @param mixed $value The data to store at the specified offset. 62 | * 63 | * @return void 64 | * 65 | * @access public 66 | */ 67 | public function offsetSet($offset, $value) 68 | { 69 | if ($offset === null) { 70 | $this->data[] = $value; 71 | } else { 72 | $offsetlower = strtolower($offset); 73 | $this->data[$offsetlower] = $value; 74 | $this->keys[$offsetlower] = $offset; 75 | } 76 | } 77 | 78 | /** 79 | * Offset Exists 80 | * 81 | * Checks if the offset exists in data storage. The index is looked up with 82 | * the lowercase version of the provided offset. 83 | * 84 | * @see https://secure.php.net/manual/en/arrayaccess.offsetexists.php 85 | * 86 | * @param string $offset Offset to check 87 | * 88 | * @return bool If the offset exists. 89 | * 90 | * @access public 91 | */ 92 | public function offsetExists($offset) 93 | { 94 | return (bool) array_key_exists(strtolower($offset), $this->data); 95 | } 96 | 97 | /** 98 | * Offset Unset 99 | * 100 | * Unsets the specified offset. Converts the provided offset to lowercase, 101 | * and unsets the case-sensitive key, as well as the stored data. 102 | * 103 | * @see https://secure.php.net/manual/en/arrayaccess.offsetunset.php 104 | * 105 | * @param string $offset The offset to unset. 106 | * 107 | * @return void 108 | * 109 | * @access public 110 | */ 111 | public function offsetUnset($offset) 112 | { 113 | $offsetlower = strtolower($offset); 114 | unset($this->data[$offsetlower]); 115 | unset($this->keys[$offsetlower]); 116 | } 117 | 118 | /** 119 | * Offset Get 120 | * 121 | * Return the stored data at the provided offset. The offset is converted to 122 | * lowercase and the lookup is done on the data store directly. 123 | * 124 | * @see https://secure.php.net/manual/en/arrayaccess.offsetget.php 125 | * 126 | * @param string $offset Offset to lookup. 127 | * 128 | * @return mixed The data stored at the offset. 129 | * 130 | * @access public 131 | */ 132 | public function offsetGet($offset) 133 | { 134 | $offsetlower = strtolower($offset); 135 | return isset($this->data[$offsetlower]) ? $this->data[$offsetlower] : null; 136 | } 137 | 138 | /** 139 | * Count 140 | * 141 | * @see https://secure.php.net/manual/en/countable.count.php 142 | * 143 | * @param void 144 | * 145 | * @return int The number of elements stored in the array. 146 | * 147 | * @access public 148 | */ 149 | public function count() 150 | { 151 | return (int) count($this->data); 152 | } 153 | 154 | /** 155 | * Current 156 | * 157 | * @see https://secure.php.net/manual/en/iterator.current.php 158 | * 159 | * @param void 160 | * 161 | * @return mixed Data at the current position. 162 | * 163 | * @access public 164 | */ 165 | public function current() 166 | { 167 | return current($this->data); 168 | } 169 | 170 | /** 171 | * Next 172 | * 173 | * @see https://secure.php.net/manual/en/iterator.next.php 174 | * 175 | * @param void 176 | * 177 | * @return void 178 | * 179 | * @access public 180 | */ 181 | public function next() 182 | { 183 | next($this->data); 184 | } 185 | 186 | /** 187 | * Key 188 | * 189 | * @see https://secure.php.net/manual/en/iterator.key.php 190 | * 191 | * @param void 192 | * 193 | * @return mixed Case-sensitive key at current position. 194 | * 195 | * @access public 196 | */ 197 | public function key() 198 | { 199 | $key = key($this->data); 200 | return isset($this->keys[$key]) ? $this->keys[$key] : $key; 201 | } 202 | 203 | /** 204 | * Valid 205 | * 206 | * @see https://secure.php.net/manual/en/iterator.valid.php 207 | * 208 | * @return bool If the current position is valid. 209 | * 210 | * @access public 211 | */ 212 | public function valid() 213 | { 214 | return (bool) (key($this->data) !== null); 215 | } 216 | 217 | /** 218 | * Rewind 219 | * 220 | * @see https://secure.php.net/manual/en/iterator.rewind.php 221 | * 222 | * @param void 223 | * 224 | * @return void 225 | * 226 | * @access public 227 | */ 228 | public function rewind() 229 | { 230 | reset($this->data); 231 | } 232 | } 233 | --------------------------------------------------------------------------------