Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'include/connect.php';
- $checku = $_COOKIE['user'];
- $checkp = $_COOKIE['pass'];
- $get = mysqli_query($link, "SELECT * FROM `admin` WHERE name='$checku'");
- $ass = mysqli_fetch_assoc($get);
- if ($ass['lvl'] < 4){
- if (($ass['name'] == $checku) AND ($ass['password'] == $checkp)){
- $settings = mysqli_query($link, "SELECT * FROM `settings` WHERE id='1'");
- $coun = mysqli_fetch_assoc($settings);
- $country1 = $coun['map1'];
- $country2 = $coun['map2'];
- $country3 = $coun['map3'];
- $country4 = $coun['map4'];
- $country5 = $coun['map5'];
- $country6 = $coun['map6'];
- $country7 = $coun['map7'];
- $country8 = $coun['map8'];
- $country9 = $coun['map9'];
- $country10 = $coun['map10'];
- $country11 = $coun['map11'];
- $country12 = $coun['map12'];
- if ((isset($_POST['link'])) AND (isset($_POST['money'])) AND (isset($_POST['zap1'])) AND (isset($_POST['zap2'])) AND (isset($_POST['zap3'])) AND (isset($_POST['country']))){
- $country = $_POST['country'];
- if ($country=='1'){
- $cgo = $country1;
- } elseif ($country=='2'){
- $cgo = $country2;
- }elseif ($country=='3'){
- $cgo = $country3;
- }elseif ($country=='4'){
- $cgo = $country4;
- }elseif ($country=='5'){
- $cgo = $country5;
- }elseif ($country=='6'){
- $cgo = $country6;
- }elseif ($country=='7'){
- $cgo = $country7;
- }elseif ($country=='8'){
- $cgo = $country8;
- }elseif ($country=='9'){
- $cgo = $country9;
- }elseif ($country=='10'){
- $cgo = $country10;
- }elseif ($country=='11'){
- $cgo = $country11;
- }elseif ($country=='12'){
- $cgo = $country12;
- } else{
- die();
- }
- $checku = $_COOKIE['user'];
- $link = $_POST['link'];
- $money = $_POST['money'];
- $zap1 = $_POST['zap1'];
- $zap2 = $_POST['zap2'];
- $zap3 = $_POST['zap3'];
- $add = mysqli_query($link, "INSERT INTO `tovars` (country, tovar, value, zapros, zapros2, zapros3, editor) VALUES ('$cgo','$link', '$money', '$zap1', '$zap2', '$zap3', '$checku')");
- if ($add == true){
- echo "<html>
- <head>
- <title>Функции администратора</title>
- <link rel='stylesheet' href='style/style.css'>
- </head>
- <body>
- <div class='box'>
- <!-- Лево -->";
- include 'part/left.php';
- echo "<!-- Право -->
- <div class='right'>
- <div class='work'>
- <div class='name'><span class='n_rasdel'>Мониторинг</span></div>
- <br>
- <div class='civ'>
- <form action='add.php' method='post'>
- <div class='input'>
- <span class='help'>Ссылка на скачивание файла - </span><input type='text' class='add' required name='link' placeholder='Можно загрузить на mega.nz'><br>
- <span class='help'>Цена - </span><input class='add' type='text' name='money' required placeholder='В рублях'><br>
- <span class='help'>Запрос 1 - </span><input class='add' type='text' name='zap1' required placeholder='paypal.com'><br>
- <span class='help'>Запрос 2 - </span><input class='add' type='text' name='zap2' required placeholder='amazon.com'><br>
- <span class='help'>Запрос 3 - </span><input class='add' type='text' name='zap3' required placeholder='blockhain.com'><br>
- </div>
- <span class='help'>Выбери Раздел - </span> <br>
- $country1<input class='add_country' type='radio' name='country' value='1' required>
- $country2<input class='add_country' type='radio' name='country' value='2' required>
- $country3<input class='add_country' type='radio' name='country' value='3' required>
- $country4<input class='add_country' type='radio' name='country' value='4' required>
- $country5<input class='add_country' type='radio' name='country' value='5' required>
- $country6<input class='add_country' type='radio' name='country' value='6' required>
- $country7<input class='add_country' type='radio' name='country' value='7' required>
- $country8<input class='add_country' type='radio' name='country' value='8' required>
- $country9<input class='add_country' type='radio' name='country' value='9' required>
- $country10<input class='add_country' type='radio' name='country' value='10' required>
- $country11<input class='add_country' type='radio' name='country' value='11' required>
- $country12<input class='add_country' type='radio' name='country' value='12' required>
- <br> <input class='add_bt' type='submit' >
- </form>
- <span style='color: green'> Добавлено </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>";
- }else {
- echo "<html>
- <head>
- <title>Функции администратора</title>
- <link rel='stylesheet' href='style/style.css'>
- </head>
- <body>
- <div class='box'>
- <!-- Лево -->";
- include 'part/left.php';
- echo "<!-- Право -->
- <div class='right'>
- <div class='work'>
- <div class='name'><span class='n_rasdel'>Мониторинг</span></div>
- <br>
- <div class='civ'>
- <form action='add.php' method='post'>
- <div class='input'>
- <span class='help'>Ссылка на скачивание файла - </span><input type='text' class='add' required name='link' placeholder='Можно загрузить на mega.nz'><br>
- <span class='help'>Цена - </span><input class='add' type='text' name='money' required placeholder='В рублях'><br>
- <span class='help'>Запрос 1 - </span><input class='add' type='text' name='zap1' required placeholder='paypal.com'><br>
- <span class='help'>Запрос 2 - </span><input class='add' type='text' name='zap2' required placeholder='amazon.com'><br>
- <span class='help'>Запрос 3 - </span><input class='add' type='text' name='zap3' required placeholder='blockhain.com'><br>
- </div>
- <span class='help'>Выбери Раздел - </span> <br>
- $country1<input class='add_country' type='radio' name='country' value='1' required>
- $country2<input class='add_country' type='radio' name='country' value='2' required>
- $country3<input class='add_country' type='radio' name='country' value='3' required>
- $country4<input class='add_country' type='radio' name='country' value='4' required>
- $country5<input class='add_country' type='radio' name='country' value='5' required>
- $country6<input class='add_country' type='radio' name='country' value='6' required>
- $country7<input class='add_country' type='radio' name='country' value='7' required>
- $country8<input class='add_country' type='radio' name='country' value='8' required>
- $country9<input class='add_country' type='radio' name='country' value='9' required>
- $country10<input class='add_country' type='radio' name='country' value='10' required>
- $country11<input class='add_country' type='radio' name='country' value='11' required>
- $country12<input class='add_country' type='radio' name='country' value='12' required>
- <br> <input class='add_bt' type='submit' >
- </form>
- <span style='color: red'> Ошибка $cgo ; $link ; $money ; $zap1 ; $zap2 ; $zap3 ; $checku <br> MYSQL ошибка -"; echo mysqli_errno($add) . ": " . mysqli_error($add);
- echo ";</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>";
- }
- }else {
- echo "<html>
- <head>
- <title>Функции администратора</title>
- <link rel='stylesheet' href='style/style.css'>
- </head>
- <body>
- <div class='box'>
- <!-- Лево -->";
- include 'part/left.php';
- echo "<!-- Право -->
- <div class='right'>
- <div class='work'>
- <div class='name'><span class='n_rasdel'>Мониторинг</span></div>
- <br>
- <div class='civ'>
- <form action='add.php' method='post'>
- <div class='input'>
- <span class='help'>Ссылка на скачивание файла - </span><input type='text' class='add' required name='link' placeholder='Можно загрузить на mega.nz'><br>
- <span class='help'>Цена - </span><input class='add' type='text' name='money' required placeholder='В рублях'><br>
- <span class='help'>Запрос 1 - </span><input class='add' type='text' name='zap1' required placeholder='paypal.com'><br>
- <span class='help'>Запрос 2 - </span><input class='add' type='text' name='zap2' required placeholder='amazon.com'><br>
- <span class='help'>Запрос 3 - </span><input class='add' type='text' name='zap3' required placeholder='blockhain.com'><br>
- </div>
- <span class='help'>Выбери Раздел - </span> <br>
- $country1<input class='add_country' type='radio' name='country' value='1' required>
- $country2<input class='add_country' type='radio' name='country' value='2' required>
- $country3<input class='add_country' type='radio' name='country' value='3' required>
- $country4<input class='add_country' type='radio' name='country' value='4' required>
- $country5<input class='add_country' type='radio' name='country' value='5' required>
- $country6<input class='add_country' type='radio' name='country' value='6' required>
- $country7<input class='add_country' type='radio' name='country' value='7' required>
- $country8<input class='add_country' type='radio' name='country' value='8' required>
- $country9<input class='add_country' type='radio' name='country' value='9' required>
- $country10<input class='add_country' type='radio' name='country' value='10' required>
- $country11<input class='add_country' type='radio' name='country' value='11' required>
- $country12<input class='add_country' type='radio' name='country' value='12' required>
- <br> <input class='add_bt' type='submit' >
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>";
- }
- }else{
- $redirect_url = 'login.php';
- header('Location: http://groupy.pro/admin/admin.php');
- }
- } else {
- echo "У вас нету доступа к этому разделу";
- }
- include 'include/close.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement