<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <table class="imagelist" border="1"> <tr> <td>Изображение</td> <td>Название</td> <td>Заголовок</td> <td>Название поста</td> <td>Удалить из базы</td> <td>Удалить полностью</td> <td>Статус</td> </tr> <?php $article_id = clear_string($_GET["article_id"]); $query_img = mysql_query("SELECT * FROM uploads_images where item_id = '{$article_id}' order by image", $db); if (mysql_num_rows($query_img) > 0) { $result_img = mysql_fetch_array($query_img); do { $item_id = $result_img['item_id']; if (strlen($result_img["image"]) > 0 && file_exists("../uploads_images/" . $result_img["image"])) { $img_path = '../uploads_images/' . $result_img["image"]; $max_width = 100; $max_height = 100; list($width, $height) = getimagesize($img_path); $ratioh = $max_height / $height; $ratiow = $max_width / $width; $ratio = min($ratioh, $ratiow); //new demensions $width = intval($ratio * $width); $height = intval($ratio * $height); } else { $img_path = "./uploads_images/no-image-90.png";
<?php include 'include/connection.php'; include 'include/functions.php'; $id = clear_string($_GET["id"]); $result = mysql_query("SELECT * FROM articles WHERE id='{$id}' AND visible='1'", $db); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $title = $row["title"]; $title1 = ftranslite($row["title"]); $keywords = $row['meta_key']; $description = $row['meta_desc']; $id = $row['id']; $img = $row['main_image']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>WEIRD WORLD | <?php echo $title; ?> </title> <?php include 'include/assets.php'; ?> <meta property="og:type" content="article"> <meta property="og:title" content="<?php
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { include "db_connect.php"; include "../functions/functions.php"; $email = clear_string($_POST["email"]); if ($email != "") { $result = mysql_query("SELECT email FROM reg_user WHERE email='{$email}'", $link); if (mysql_num_rows($result) > 0) { // Генерация пароля. $newpass = fungenpass(); // Шифрование пароля. $pass = md5($newpass); $pass = strrev($pass); $pass = strtolower("9nm2rv8q" . $pass . "2yo6z"); // Обновление пароля на новый. $update = mysql_query("UPDATE reg_user SET pass='******' WHERE email='{$email}'", $link); // Отправка нового пароля. send_mail('*****@*****.**', $email, 'Новый пароль для сайта MyShop.ru', 'Ваш пароль: ' . $newpass); echo 'yes'; } else { echo 'Данный E-mail не найден!'; } } else { echo 'Укажите свой E-mail'; } }
<?php include "include/db_connect.php"; include "functions/functions.php"; session_start(); include "include/auth_cookie.php"; $cat = clear_string($_GET["cat"]); $type = clear_string($_GET["type"]); $sorting = $_GET["sort"]; switch ($sorting) { case 'price-asc': $sorting = 'price ASC'; $sort_name = 'От дешевых к дорогим'; break; case 'price-desc': $sorting = 'price DESC'; $sort_name = 'От дорогих к дешевым'; break; case 'popular': $sorting = 'count DESC'; $sort_name = 'Популярное'; break; case 'news': $sorting = 'datetime DESC'; $sort_name = 'Новинки'; break; case 'brand': $sorting = 'brand'; $sort_name = 'От дешевых к дорогим'; break; default:
<?php define('myeshop', true); include "include/db_connect.php"; include "functions/functions.php"; session_start(); include "include/auth_cookie.php"; $go = clear_string($_GET["go"]); switch ($go) { case "news": $query_aystopper = " WHERE visible = '1' AND new = '1'"; $name_aystopper = "New goods"; break; case "leaders": $query_aystopper = " WHERE visible = '1' AND leader = '1'"; $name_aystopper = "Best sels"; break; case "sale": $query_aystopper = " WHERE visible = '1' AND sale = '1'"; $name_aystopper = "Sale of goods"; break; default: $query_aystopper = ""; break; } $sorting = $_GET["sort"]; switch ($sorting) { case 'price-asc': $sorting = 'price ASC'; $sort_name = 'From cheap to expensive'; break;
if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myyshop', true); session_start(); define('myeshop', true); include "../include/db_connect.php"; include "../functions/functions.php"; $error = array(); $login = iconv("UTF-8", "cp1251", strtolower(clear_string($_POST['reg_login']))); $pass = iconv("UTF-8", "cp1251", strtolower(clear_string($_POST['reg_pass']))); $surname = iconv("UTF-8", "cp1251", clear_string($_POST['reg_surname'])); $name = iconv("UTF-8", "cp1251", clear_string($_POST['reg_name'])); $patronymic = iconv("UTF-8", "cp1251", clear_string($_POST['reg_patronymic'])); $email = iconv("UTF-8", "cp1251", clear_string($_POST['reg_email'])); $phone = iconv("UTF-8", "cp1251", clear_string($_POST['reg_phone'])); $address = iconv("UTF-8", "cp1251", clear_string($_POST['reg_address'])); if (strlen($login) < 5 or strlen($login) > 15) { $error[] = "Логин должен быть от 5 до 15 символов!"; } else { $result = mysql_query("SELECT login FROM reg_user WHERE login = '******'", $link); if (mysql_num_rows($result) > 0) { $error[] = "Логин занят!"; } } if (strlen($pass) < 7 or strlen($pass) > 15) { $error[] = "Укажите пароль от 7 до 15 символов!"; } if (strlen($surname) < 3 or strlen($surname) > 20) { $error[] = "Укажите Фамилию от 3 до 20 символов!"; } if (strlen($name) < 3 or strlen($name) > 15) {
<?php session_start(); define('myeshop', true); include 'include/db_connect.php'; include 'include/functions.php'; if ($_POST["submit_enter"]) { $login = clear_string($_POST["input_login"]); $pass = clear_string($_POST["input_pass"]); if ($login && $pass) { /* $pass = md5($pass); $pass = strrev($pass);*/ $pass = md5($pass); $pass = strrev($pass); $pass = strtolower("8md7udyd" . $pass . "2ui6z"); $result = mysql_query("SELECT * FROM reg_admin WHERE login = '******' AND pass = '******'", $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $_SESSION['auth_admin'] = 'yes_auth'; $_SESSION['auth_admin_login'] = $row["login"]; // Должность $_SESSION['admin_role'] = $row["role"]; // Привилегии // Заказы $_SESSION['accept_orders'] = $row["accept_orders"]; $_SESSION['delete_orders'] = $row["delete_orders"]; $_SESSION['view_orders'] = $row["view_orders"]; // Товары $_SESSION['delete_tovar'] = $row["delete_tovar"]; $_SESSION['add_tovar'] = $row["add_tovar"];
} $array = clear_string(CATEGORIES_IMAGE_THUMBNAIL_ELLIPSE); if (CATEGORIES_IMAGE_THUMBNAIL_ELLIPSE !== '') { $a->ellipse($array[0]); } $array = clear_string(CATEGORIES_IMAGE_THUMBNAIL_ROUND_EDGES); if (CATEGORIES_IMAGE_THUMBNAIL_ROUND_EDGES != '') { $a->round_edges($array[0], $array[1], $array[2]); } $string = str_replace("'", '', CATEGORIES_IMAGE_THUMBNAIL_MERGE); $string = str_replace(')', '', $string); $string = str_replace('(', DIR_FS_CATALOG_IMAGES, $string); $array = explode(',', $string); //$array=clear_string(); if (CATEGORIES_IMAGE_THUMBNAIL_MERGE != '') { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(CATEGORIES_IMAGE_THUMBNAIL_FRAME); if (CATEGORIES_IMAGE_THUMBNAIL_FRAME != '') { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(CATEGORIES_IMAGE_THUMBNAIL_DROP_SHADOW); if (CATEGORIES_IMAGE_THUMBNAIL_DROP_SHADOW != '') { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(CATEGORIES_IMAGE_THUMBNAIL_MOTION_BLUR); if (CATEGORIES_IMAGE_THUMBNAIL_MOTION_BLUR != '') { $a->motion_blur($array[0], $array[1]); } $a->create(); }
$a->greyscale($array[0], $array[1], $array[2]); } $array = clear_string(CATEGORY_IMAGE_ELLIPSE); if (CATEGORY_IMAGE_ELLIPSE != '') { $a->ellipse($array[0]); } $array = clear_string(CATEGORY_IMAGE_ROUND_EDGES); if (CATEGORY_IMAGE_ROUND_EDGES != '') { $a->round_edges($array[0], $array[1], $array[2]); } $string = str_replace("'", '', CATEGORY_IMAGE_MERGE); $string = str_replace(')', '', $string); $string = str_replace('(', DIR_FS_CATALOG_IMAGES, $string); $array = explode(',', $string); //$array=clear_string(); if (CATEGORY_IMAGE_MERGE != '') { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(CATEGORY_IMAGE_FRAME); if (CATEGORY_IMAGE_FRAME != '') { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(CATEGORY_IMAGE_DROP_SHADOW); if (CATEGORY_IMAGE_DROP_SHADOW != '') { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(CATEGORY_IMAGE_MOTION_BLUR); if (CATEGORY_IMAGE_MOTION_BLUR != '') { $a->motion_blur($array[0], $array[1]); } $a->create();
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include "db_connect.php"; include "../functions/functions.php"; $search = iconv("UTF-8", "cp1251", strtolower(clear_string($_POST['text']))); $result = mysql_query("SELECT * FROM table_products WHERE title LIKE '%{$search}%' AND visible = '1'", $link); if (mysql_num_rows($result) > 0) { $result = mysql_query("SELECT * FROM table_products WHERE title LIKE '%{$search}%' AND visible = '1' LIMIT 10", $link); $row = mysql_fetch_array($result); do { echo ' <li><a href="search.php?q=' . $row["title"] . '">' . $row["title"] . '</a></li> '; } while ($row = mysql_fetch_array($result)); } }
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include "db_connect.php"; include "../functions/functions.php"; $search = strtolower(clear_string($_POST['text'])); $result = mysql_query("SELECT * FROM table_products WHERE title LIKE '%{$search}%' AND visible = '1'", $link); if (mysql_num_rows($result) > 0) { $result = mysql_query("SELECT * FROM table_products WHERE title LIKE '%{$search}%' AND visible = '1' LIMIT 10", $link); $row = mysql_fetch_array($result); do { echo '<li><a href="search.php?q=' . $row["title"] . '">' . $row["title"] . '</a></li>'; } while ($row = mysql_fetch_array($result)); } }
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include 'db_connect.php'; include '../functions/functions.php'; $id = clear_string($_POST['id']); $name = clear_string($_POST['name']); $good = clear_string($_POST['good']); $bad = clear_string($_POST['bad']); $comment = clear_string($_POST['comment']); mysql_query("INSERT INTO table_reviews(products_id,name,good_reviews,bad_reviews,comment,date)\n\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t'" . $id . "',\n\t\t\t\t\t\t\t'" . $name . "',\n\t\t\t\t\t\t\t'" . $good . "',\n\t\t\t\t\t\t\t'" . $bad . "',\n\t\t\t\t\t\t\t'" . $comment . "',\n\t\t\t\t\t\t\t\tNOW()\n\t\t\t\t\t\t)", $link); echo 'yes'; }
$a->greyscale($array[0], $array[1], $array[2]); } $array = clear_string(PRODUCT_IMAGE_THUMBNAIL_ELLIPSE); if (PRODUCT_IMAGE_THUMBNAIL_ELLIPSE !== '') { $a->ellipse($array[0]); } $array = clear_string(PRODUCT_IMAGE_THUMBNAIL_ROUND_EDGES); if (PRODUCT_IMAGE_THUMBNAIL_ROUND_EDGES != '') { $a->round_edges($array[0], $array[1], $array[2]); } $string = str_replace("'", '', PRODUCT_IMAGE_THUMBNAIL_MERGE); $string = str_replace(')', '', $string); $string = str_replace('(', DIR_FS_CATALOG_IMAGES, $string); $array = explode(',', $string); //$array=clear_string(); if (PRODUCT_IMAGE_THUMBNAIL_MERGE != '') { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(PRODUCT_IMAGE_THUMBNAIL_FRAME); if (PRODUCT_IMAGE_THUMBNAIL_FRAME != '') { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(PRODUCT_IMAGE_THUMBNAIL_DROP_SHADOW); if (PRODUCT_IMAGE_THUMBNAIL_DROP_SHADOW != '') { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(PRODUCT_IMAGE_THUMBNAIL_MOTION_BLUR); if (PRODUCT_IMAGE_THUMBNAIL_MOTION_BLUR != '') { $a->motion_blur($array[0], $array[1]); } $a->create();
$cat = "WHERE type_tovara='mobile'"; break; case 'notebook': $cat_name = 'Ноутбуки'; $url = "cat=notebook&"; $cat = "WHERE type_tovara='notebook'"; break; case 'notepad': $cat_name = 'Планшеты'; $url = "cat=notepad&"; $cat = "WHERE type_tovara='notepad'"; break; default: $cat_name = $cat; $url = "type=" . clear_string($type) . "&cat=" . clear_string($cat) . "&"; $cat = "WHERE type_tovara='" . clear_string($type) . "' AND brand='" . clear_string($cat) . "'"; break; } } else { $cat_name = 'Все товары'; $url = ""; $cat = ""; } $action = $_GET["action"]; if (isset($action)) { $id = (int) $_GET["id"]; switch ($action) { case 'delete': if ($_SESSION['delete_tovar'] == '1') { $delete = mysql_query("DELETE FROM table_products WHERE products_id = '{$id}'", $link); } else {
<?php include "db_connect.php"; include "escaping.php"; $book_id = (int) clear_string($_GET['id']); $result = mysql_query("SELECT * FROM books WHERE id = {$book_id} LIMIT 1", $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); } else { header("HTTP/1.1 404 Not Found"); include "error.php"; exit; } $genre = $row["genre"]; $genrem_result = mysql_query("SELECT name FROM genres WHERE id = '{$genre}'", $link); $genrem_mark_row = mysql_fetch_array($genrem_result); $genre_name = $genrem_mark_row["name"]; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Скачать «<?php echo $row["title"]; ?> » бесплатно и без регистрации в pdf</title> <title>Дмитрий Глуховский: книга Метро 2035, скачать книгу в fb2, txt, epub, pdf или читать онлaйн, 978-5-17-090538-6</title><meta name="description" content="В электронной библиотеке ЛитРес можно скачать книгу «Метро 2035» в форматах fb2, txt, epub, pdf, а также скачать другие книги Дмитрия Глуховского! Отставляете и читайте отзывы о книге на ЛитРес!"> <link rel="shortcut icon" href="img/favicon.png" type="image/png"> <link rel="stylesheet" href="css/reset.css">
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include 'db_connect.php'; include '../functions/functions.php'; $login = clear_string($_POST["login"]); $pass = md5(clear_string($_POST["pass"])); $pass = strrev($pass); $pass = strtolower("9nm2rv8q" . $pass . "2yo6z"); if ($_POST["rememberme"] == "yes") { setcookie('rememberme', $login . '+' . $pass, time() + 3600 * 24 * 31, "/"); } $result = mysql_query("SELECT * FROM reg_user WHERE (login = '******' OR email = '{$login}') AND pass = '******'", $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); session_start(); $_SESSION['auth'] = 'yes_auth'; $_SESSION['auth_pass'] = $row["pass"]; $_SESSION['auth_login'] = $row["login"]; $_SESSION['auth_surname'] = $row["surname"]; $_SESSION['auth_name'] = $row["name"]; $_SESSION['auth_patronymic'] = $row["patronymic"]; $_SESSION['auth_address'] = $row["address"]; $_SESSION['auth_phone'] = $row["phone"]; $_SESSION['auth_email'] = $row["email"]; echo 'yes_auth'; } else { echo 'no_auth'; } }
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include "../include/db_connect.php"; include "../functions/functions.php"; $login = clear_string($_POST['reg_login']); $result = mysql_query("SELECT login FROM reg_user WHERE login = '******'", $link); if (mysql_num_rows($result) > 0) { echo 'false'; } else { echo 'true'; } }
$string = str_replace(APOS, '', MERGE); $string = str_replace(RPAREN, '', $string); $string = str_replace('(', DIR_WS_CATALOG_IMAGES, $string); $array = explode(',', $string); if (MERGE) { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(FRAME); if (FRAME) { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(DROP_SHADOW); if (DROP_SHADOW) { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(MOTION_BLUR); if (MOTION_BLUR) { $a->motion_blur($array[0], $array[1]); } $a->create(); } else { $create_jpeg = $image_type == 2 || $image_type == 1 && $gif_as_jpeg; if (!$create_jpeg) { $create_gif = $image_type == 1 && function_exists('imagegif'); if (!$create_gif) { $create_png = $image_type == 3 || $image_type == 1; } } // Create a new, empty image based on settings: if ($use_truecolor && ($image_type == 2 || $image_type == 3)) { $tmp_img = imagecreatetruecolor($image_target_width, $image_target_height);
<?php define('myyshop', true); include "include/db_connect.php"; include "functions/functions.php"; session_start(); include "include/auth_cookie.php"; //unset($_SESSION['auth']); $search = clear_string($_GET["q"]); $sorting = $_GET["sort"]; switch ($sorting) { case 'price-asc': $sorting = 'price ASC'; $sort_name = 'От дешевых к дорогим'; break; case 'price-desc': $sorting = 'price DESC'; $sort_name = 'От дорогих к дешевым'; break; case 'popular': $sorting = 'count DESC'; $sort_name = 'Популярное'; break; case 'news': $sorting = 'datetime DESC'; $sort_name = 'Новинки'; break; case 'brand': $sorting = 'brand'; $sort_name = 'От дешевых к дорогим'; break;
<?php include "db_connect.php"; include "escaping.php"; $genre = (int) clear_string($_GET['genre']); $name_result = mysql_query("SELECT id, name FROM genres WHERE id = '{$genre}'", $link); if (mysql_num_rows($name_result) > 0) { $genre_name = mysql_fetch_array($name_result); } else { header("HTTP/1.1 404 Not Found"); include "error.php"; exit; } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Ёпрст — книги скачать бесплатно и без ригистрации</title> <link rel="shortcut icon" href="img/favicon.png" type="image/png"> <link rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/books.css"> </head> <body> <div class="wrapper"> <?include("header.php");?> <main> <div id="breadcrumbs"> <ul itemscope itemtype="http://schema.org/BreadcrumbList">
$_POST["info_patronymic"] = clear_string($_POST["info_patronymic"]); $_POST["info_address"] = clear_string($_POST["info_address"]); $_POST["info_phone"] = clear_string($_POST["info_phone"]); $_POST["info_email"] = clear_string($_POST["info_email"]); $error = array(); $pass = md5($_POST["info_pass"]); $pass = strrev($pass); $pass = "******" . $pass . "2yo6z"; if ($_SESSION['auth_pass'] != $pass) { $error[] = 'Неверный текущий пароль!'; } else { if ($_POST["info_new_pass"] != "") { if (strlen($_POST["info_new_pass"]) < 7 || strlen($_POST["info_new_pass"]) > 15) { $error[] = 'Укажите новый пароль от 7 до 15 символов!'; } else { $newpass = md5(clear_string($_POST["info_new_pass"])); $newpass = strrev($newpass); $newpass = "******" . $newpass . "2yo6z"; $newpassquery = "pass='******',"; } } if (strlen($_POST["info_surname"]) < 3 || strlen($_POST["info_surname"]) > 15) { $error[] = 'Укажите Фамилию от 3 до 15 символов!'; } if (strlen($_POST["info_name"]) < 3 || strlen($_POST["info_name"]) > 15) { $error[] = 'Укажите Имя от 3 до 15 символов!'; } if (strlen($_POST["info_patronymic"]) < 3 || strlen($_POST["info_patronymic"]) > 25) { $error[] = 'Укажите Отчество от 3 до 25 символов!'; } if (!preg_match("/^(?:[a-z0-9]+(?:[-_.]?[a-z0-9]+)?@[a-z0-9_.-]+(?:\\.?[a-z0-9]+)?\\.[a-z]{2,5})\$/i", trim($_POST["info_email"]))) {
$a->greyscale($array[0], $array[1], $array[2]); } $array = clear_string(PRODUCT_IMAGE_POPUP_ELLIPSE); if (PRODUCT_IMAGE_POPUP_ELLIPSE != '') { $a->ellipse($array[0]); } $array = clear_string(PRODUCT_IMAGE_POPUP_ROUND_EDGES); if (PRODUCT_IMAGE_POPUP_ROUND_EDGES != '') { $a->round_edges($array[0], $array[1], $array[2]); } $string = str_replace("'", '', PRODUCT_IMAGE_POPUP_MERGE); $string = str_replace(')', '', $string); $string = str_replace('(', DIR_FS_CATALOG_IMAGES, $string); $array = explode(',', $string); //$array=clear_string(); if (PRODUCT_IMAGE_POPUP_MERGE != '') { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(PRODUCT_IMAGE_POPUP_FRAME); if (PRODUCT_IMAGE_POPUP_FRAME != '') { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(PRODUCT_IMAGE_POPUP_DROP_SHADOW); if (PRODUCT_IMAGE_POPUP_DROP_SHADOW != '') { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(PRODUCT_IMAGE_POPUP_MOTION_BLUR); if (PRODUCT_IMAGE_POPUP_MOTION_BLUR != '') { $a->motion_blur($array[0], $array[1]); } $a->create();
<?php defined('myyshop') or die('Доступа нет!'); if ($_SESSION['auth'] != 'yes_auth' && $_COOKIE["rememberme"]) { $str = $_COOKIE["rememberme"]; // Вся длина строки $all_len = strlen($str); // Длина логина $login_len = strpos($str, '+'); // Обрезаем строку до Плюса и получаем Логин $login = clear_string(substr($str, 0, $login_len)); // Получаем пароль $pass = clear_string(substr($str, $login_len + 1, $all_len)); $result = mysql_query("SELECT * FROM reg_user WHERE (login = '******' or email = '{$login}') AND pass = '******'", $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); session_start(); $_SESSION['auth'] = 'yes_auth'; $_SESSION['auth_pass'] = $row["pass"]; $_SESSION['auth_login'] = $row["login"]; $_SESSION['auth_surname'] = $row["surname"]; $_SESSION['auth_name'] = $row["name"]; $_SESSION['auth_patronymic'] = $row["patronymic"]; $_SESSION['auth_address'] = $row["address"]; $_SESSION['auth_phone'] = $row["phone"]; $_SESSION['auth_email'] = $row["email"]; } }
include "include/db_connect.php"; include "include/functions.php"; if ($_POST["submit_cat"]) { if ($_SESSION['add_category'] == '1') { $error = array(); if (!$_POST["cat_type"]) { $error[] = "Укажите тип товара!"; } if (!$_POST["cat_brand"]) { $error[] = "Укажите название категории!"; } if (count($error)) { $_SESSION['message'] = "<p id='form-error'>" . implode('<br />', $error) . "</p>"; } else { $cat_type = clear_string($_POST["cat_type"]); $cat_brand = clear_string($_POST["cat_brand"]); mysql_query("INSERT INTO category(type,brand)\n\t\t\t\t\t\tVALUES(\t\t\t\t\t\t\n '" . $cat_type . "',\n '" . $cat_brand . "' \n\t\t\t\t\t\t)", $link); $_SESSION['message'] = "<p id='form-success'>Категория успешно добавлена!</p>"; } } else { $msgerror = 'У вас нет прав на добавление категории'; } } ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html" /> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
if (!$_POST["admin_fio"]) { $error[] = "Укажите ФИО!"; } if (!$_POST["admin_role"]) { $error[] = "Укажите должность!"; } if (!$_POST["admin_email"]) { $error[] = "Укажите E-mail!"; } if (count($error)) { $_SESSION['message'] = "<p id='form-error'>" . implode('<br />', $error) . "</p>"; } else { $pass = md5(clear_string($_POST["admin_pass"])); $pass = strrev($pass); $pass = strtolower("mb03foo51" . $pass . "qj2jjdp9"); mysql_query("INSERT INTO reg_admin(login,pass,fio,role,email,phone,view_orders,accept_orders,delete_orders,add_tovar,edit_tovar,delete_tovar,accept_reviews,delete_reviews,view_clients,delete_clients,add_news,delete_news,add_category,delete_category,view_admin)\r\n\t\t\t\t\t\tVALUES(\t\t\t\t\t\t\r\n '" . clear_string($_POST["admin_login"]) . "',\r\n '" . $pass . "',\r\n '" . clear_string($_POST["admin_fio"]) . "',\r\n '" . clear_string($_POST["admin_role"]) . "',\r\n '" . clear_string($_POST["admin_email"]) . "',\r\n '" . clear_string($_POST["admin_phone"]) . "',\r\n '" . $_POST["view_orders"] . "',\r\n '" . $_POST["accept_orders"] . "',\r\n '" . $_POST["delete_orders"] . "',\t\t\t\t\t\t\t\r\n '" . $_POST["add_tovar"] . "',\r\n '" . $_POST["edit_tovar"] . "', \r\n\t\t\t\t\t\t\t'" . $_POST["delete_tovar"] . "',\r\n '" . $_POST["accept_reviews"] . "',\r\n '" . $_POST["delete_reviews"] . "',\r\n\t\t\t\t\t\t\t'" . $_POST["view_clients"] . "',\r\n '" . $_POST["delete_clients"] . "',\r\n\t\t\t\t\t\t\t'" . $_POST["add_news"] . "',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'" . $_POST["delete_news"] . "',\r\n\t\t\t\t\t\t\t'" . $_POST["add_category"] . "',\r\n\t\t\t\t\t\t\t'" . $_POST["delete_category"] . "',\r\n '" . $_POST["view_admin"] . "'\r\n \r\n \r\n\t\t\t\t\t\t)", $link); $_SESSION['message'] = "<p id='form-success'>Пользователь успешно добавлен!</p>"; } } else { $msgerror = 'У вас нет прав на добавление администраторов!'; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="jquery_confirm/jquery_confirm.css" rel="stylesheet" type="text/css" />
<body> <div id="block-body"> <?php include "include/block-header.php"; ?> <div id="block-right"> <?php include "include/block-category.php"; include "include/block-parameter.php"; include "include/block-news.php"; ?> </div> <div id="block-content"> <?php $action = clear_string($_GET["action"]); switch ($action) { case 'oneclick': echo ' <div id="block-step"> <div id="name-step"> <ul> <li><a class="active" >1. Корзина товаров</a></li> <li><span>→</span></li> <li><a>2. Контактная информация</a></li> <li><span>→</span></li> <li><a>3. Завершение</a></li> </ul> </div> <p>шаг 1 из 3</p> <a href="cart.php?action=clear" >Очистить</a>
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include "db_connect.php"; include "../functions/functions.php"; $id = clear_string($_POST["id"]); $result = mysql_query("SELECT * FROM cart WHERE cart_ip = '{$_SERVER['REMOTE_ADDR']}' AND cart_id_product = '{$id}'", $link); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $new_count = $row["cart_count"] + 1; $update = mysql_query("UPDATE cart SET cart_count='{$new_count}' WHERE cart_ip = '{$_SERVER['REMOTE_ADDR']}' AND cart_id_product ='{$id}'", $link); } else { $result = mysql_query("SELECT * FROM table_products WHERE products_id = '{$id}'", $link); $row = mysql_fetch_array($result); mysql_query("INSERT INTO cart(cart_id_product,cart_price,cart_datetime,cart_ip)\r\n\t\t\t\t\t\tVALUES(\t\r\n '" . $row['products_id'] . "',\r\n '" . $row['price'] . "',\t\t\t\t\t\r\n\t\t\t\t\t\t\tNOW(),\r\n '" . $_SERVER['REMOTE_ADDR'] . "' \r\n\t\t\t\t\t\t )", $link); } }
if (isset($_GET["logout"])) { unset($_SESSION['auth_admin']); header("Location: login.php"); } $_SESSION['urlpage'] = "<a href='index.php'>Главная</a> \\ <a href='edit_administrators.php'>Изменение администратора</a>"; include 'include/db_connect.php'; include 'include/functions.php'; $id = clear_string($_GET["id"]); if ($_POST["submit_edit"]) { if ($_SESSION['auth_admin_login'] == 'pwnz22') { $error = array(); if (!$_POST["admin_login"]) { $error[] = "Укажите логин!"; } if ($_POST["admin_pass"]) { $pass = md5(clear_string($_POST["admin_pass"])); $pass = strrev($pass); $pass = "******"; } if (!$_POST["admin_fio"]) { $error[] = "Укажите ФИО!"; } if (!$_POST["admin_role"]) { $error[] = "Укажите должность!"; } if (!$_POST["admin_email"]) { $error[] = "Укажите E-mail!"; } if (count($error)) { $_SESSION['message'] = "<p id='form-error'>" . implode('<br />', $error) . "</p>"; } else {
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { define('myeshop', true); include "db_connect.php"; include "../functions/functions.php"; $id = clear_string($_POST['id']); $name = iconv("UTF-8", "cp1251", clear_string($_POST['name'])); $good = iconv("UTF-8", "cp1251", clear_string($_POST['good'])); $bad = iconv("UTF-8", "cp1251", clear_string($_POST['bad'])); $comment = iconv("UTF-8", "cp1251", clear_string($_POST['comment'])); mysql_query("INSERT INTO table_reviews(products_id,name,good_reviews,bad_reviews,comment,date)\r\n\t\t\t\t\t\tVALUES(\t\t\t\t\t\t\r\n '" . $id . "',\r\n '" . $name . "',\r\n '" . $good . "',\r\n '" . $bad . "',\r\n '" . $comment . "',\r\n NOW()\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t)", $link); echo 'yes'; }
} $array = clear_string(PRODUCT_IMAGE_INFO_ELLIPSE); if (PRODUCT_IMAGE_INFO_ELLIPSE != '') { $a->ellipse($array[0]); } $array = clear_string(PRODUCT_IMAGE_INFO_ROUND_EDGES); if (PRODUCT_IMAGE_INFO_ROUND_EDGES != '') { $a->round_edges($array[0], $array[1], $array[2]); } $string = str_replace("'", '', PRODUCT_IMAGE_INFO_MERGE); $string = str_replace(')', '', $string); $string = str_replace('(', DIR_FS_CATALOG_IMAGES, $string); $array = explode(',', $string); //$array=clear_string(); if (PRODUCT_IMAGE_INFO_MERGE != '') { $a->merge($array[0], $array[1], $array[2], $array[3], $array[4]); } $array = clear_string(PRODUCT_IMAGE_INFO_FRAME); if (PRODUCT_IMAGE_INFO_FRAME != '') { $a->frame($array[0], $array[1], $array[2], $array[3]); } $array = clear_string(PRODUCT_IMAGE_INFO_DROP_SHADOW); if (PRODUCT_IMAGE_INFO_DROP_SHADOW != '') { $a->drop_shadow($array[0], $array[1], $array[2]); } $array = clear_string(PRODUCT_IMAGE_INFO_MOTION_BLUR); if (PRODUCT_IMAGE_INFO_MOTION_BLUR != '') { $a->motion_blur($array[0], $array[1]); } $a->create(); }