@@ -0,0 +1 @@ | |||||
config.php |
@@ -0,0 +1,2 @@ | |||||
# MisterMoral.github.io | |||||
GET OUT OF THERE |
@@ -0,0 +1,61 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
$textt = ""; | |||||
if (isset($_POST["name"]) && isset($_POST["cost"]) && isset($_POST["imageid"])) { | |||||
$query = "INSERT INTO menu(name, cost, imageid) VALUES ('" . $_POST["name"] . "', '" . $_POST["cost"] . "', '" . $_POST["imageid"] . "')"; | |||||
mysqli_query($db, $query); | |||||
$textt = "Вы успешно добавили товар в базу данных!"; | |||||
} | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Добавление товара в базу данных</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="worker.php">Admin</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="view.php">Просмотр заказов</a> | |||||
<a class="nav-link" href="add-item.php">Добавить товар в базу данных</a> | |||||
<a class="nav-link" href="cons.php">Заявки на перезвон</a> | |||||
</div> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<div class="row" style="text-align: center"> | |||||
<div class="col-12"> | |||||
<span><?php echo $textt ?></span> | |||||
</div> | |||||
</div> | |||||
<div class="send"> | |||||
<h3>Добавить товар в базу данных</h3> | |||||
<form action="add-item.php" method="post"> | |||||
<input type="text" required name="name" placeholder="Название товара" /> <br> | |||||
<input type="number" required name="cost" placeholder="Стоимость" /> <br> | |||||
<input type="text" required name="imageid" placeholder="URL к фотографии товара" /><br> | |||||
<input class="btn btn-success" type="submit" value="Добавить в БД" /> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,38 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
if (isset($_GET["itemid"])) { | |||||
if (isset($_SESSION["cart"])) { | |||||
$ok = -1; | |||||
foreach ($_SESSION["cart"] as $keys => $values) { | |||||
if ($values["item_id"] == $_GET["itemid"]) { | |||||
$ok = $keys; | |||||
} | |||||
} | |||||
if ($ok == -1) { | |||||
$count = count($_SESSION["cart"]); | |||||
$itemlol = mysqli_query($db, "SELECT * FROM menu WHERE id=" . $_GET["itemid"] . ""); | |||||
$myrow = mysqli_fetch_array($itemlol); | |||||
$item_array = array( | |||||
'item_id' => $_GET["itemid"], | |||||
'item_name' => $myrow["name"], | |||||
'item_quantity' => $_GET["quan"], | |||||
'item_price' => $myrow["cost"] | |||||
); | |||||
$_SESSION["cart"][$count] = $item_array; | |||||
} else { | |||||
$_SESSION["cart"][$ok]["item_quantity"] = $_SESSION["cart"][$ok]["item_quantity"] + $_GET["quan"]; | |||||
} | |||||
} else { | |||||
$itemlol = mysqli_query($db, "SELECT * FROM menu WHERE id=" . $_GET["itemid"] . ""); | |||||
$myrow = mysqli_fetch_array($itemlol); | |||||
$item_array = array( | |||||
'item_id' => $_GET["itemid"], | |||||
'item_name' => $myrow["name"], | |||||
'item_quantity' => $_GET["quan"], | |||||
'item_price' => $myrow["cost"] | |||||
); | |||||
$_SESSION["cart"][0] = $item_array; | |||||
} | |||||
} |
@@ -0,0 +1,56 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<div class="itemlist"> | |||||
<div class="proj-info col-12"> | |||||
<img class="proj-image" src="https://images.kz.prom.st/56942948_w440_h440_stroitelnaya-brigada.jpg" title="Строительная бригада" width="100%"><br> | |||||
<div class="proj-name"> | |||||
<h3>Заказать строительную бригаду</h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
Заказ строительной бригады на адрес. Все детали по телефону. | |||||
</div> | |||||
<div class="proj-contacts"><a href="phone.php" class="btn btn-success">Вы можете оставить заявку на сайте. Мы вам перезвоним!</a></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,118 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Cart</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link active" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<table class="table table-bordered"> | |||||
<tr> | |||||
<th>Товар</th> | |||||
<th>Кол.</th> | |||||
<th>Итого</th> | |||||
<th></th> | |||||
</tr> | |||||
<?php | |||||
if (!empty($_SESSION["cart"])) { | |||||
$total = 0; | |||||
foreach ($_SESSION["cart"] as $keys => $values) { | |||||
?> | |||||
<tr> | |||||
<td><?php echo $values["item_name"] ?></td> | |||||
<td><?php echo $values["item_quantity"] ?></td> | |||||
<td><?php echo $values["item_price"] * $values["item_quantity"] ?> ₸</td> | |||||
<td><button onclick="delitem(<?php echo $values['item_id'] ?>)" class="btn btn-danger">X </button></td> | |||||
</tr> | |||||
<?php | |||||
$total = $total + ($values["item_price"] * $values["item_quantity"]); | |||||
} | |||||
?> | |||||
<tr> | |||||
<td colspan="2" style="text-align:right">Итого</td> | |||||
<td style="text-align:right"><?php echo $total ?> ₸</td> | |||||
<td></td> | |||||
</tr> | |||||
<?php | |||||
} | |||||
?> | |||||
</table> | |||||
<button onclick="destr()" class="btn btn-danger">Очистить корзину</button> | |||||
<div class="send"> | |||||
<h3>Подать заявку</h3> | |||||
<form action="submit.php" method="post"> | |||||
<input id="fname" required type="text" name="name" placeholder="Ваше полное имя" /> <br> | |||||
<input id="fadress" required type="text" name="adress" placeholder="Ваш адрес" /> <br> | |||||
<input id="fcontacts" required type="text" name="contacts" placeholder="Ваши контакты" /> <br> | |||||
<input class="btn btn-success" type="submit" value="Подать заявку" /> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
function delitem(idid) { | |||||
jQuery(document).ready(function($) { | |||||
$.ajax({ | |||||
type: 'GET', | |||||
url: 'delete.php', | |||||
data: { | |||||
action: "delete", | |||||
del: idid | |||||
}, | |||||
success: function(res) { | |||||
location.reload(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
function destr() { | |||||
jQuery(document).ready(function($) { | |||||
$.ajax({ | |||||
type: 'GET', | |||||
url: 'destroy.php', | |||||
data: {}, | |||||
success: function(res) { | |||||
location.reload(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
</script> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,82 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
if (isset($_POST["del"])) { | |||||
mysqli_query($db, "DELETE FROM cons WHERE `id`='" . $_POST["del"] . "'"); | |||||
} | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Заказы</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="worker.php">Admin</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="view.php">Просмотр заказов</a> | |||||
<a class="nav-link" href="add-item.php">Добавить товар в базу данных</a> | |||||
<a class="nav-link" href="cons.php">Заявки на перезвон</a> | |||||
</div> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<input class="form-control" id="myInput" type="text" placeholder="Поиск.."> <br> | |||||
<div id="itemlist"> | |||||
<?php | |||||
$result = mysqli_query($db, "SELECT * FROM cons"); | |||||
while ($myrow = mysqli_fetch_array($result)) { ?> | |||||
<div class="proj-info col-12"> | |||||
<div class="proj-name"> | |||||
<h3>ID заявки: <?php echo $myrow["id"] ?></h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
<span>ФИО: <?php echo $myrow["name"] ?></span><br> | |||||
<span>Телефон: <?php echo $myrow["phone"] ?></span> | |||||
<form action="cons.php" method="post"> | |||||
<input type="hidden" name="del" value="<?php echo $myrow["id"] ?>"> | |||||
<input type="submit" class="btn btn-danger" value="Удалить" /> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<?php | |||||
} | |||||
?> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
$(document).ready(function() { | |||||
$("#myInput").on("keyup", function() { | |||||
var value = $(this).val().toLowerCase(); | |||||
$("#itemlist .proj-info").filter(function() { | |||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) | |||||
}); | |||||
}); | |||||
}); | |||||
</script> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding. | |||||
</div> | |||||
</footer> | |||||
</body> | |||||
</html> |
@@ -0,0 +1,113 @@ | |||||
* { | |||||
font-family: Open Sans; | |||||
} | |||||
.send { | |||||
border-radius: 8px; | |||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); | |||||
padding: 10px; | |||||
margin-top: 50px; | |||||
text-align: center; | |||||
} | |||||
input[type="text"] { | |||||
text-align: left; | |||||
margin-top: 20px; | |||||
} | |||||
input[type="number"] { | |||||
text-align: left; | |||||
margin-top: 20px; | |||||
} | |||||
input[type="submit"] { | |||||
margin-top: 10px; | |||||
} | |||||
label { | |||||
margin-bottom: 0; | |||||
} | |||||
.item-info { | |||||
display: inline-block; | |||||
/*border: 1px solid ;*/ | |||||
border-radius: 8px; | |||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); | |||||
padding: 10px; | |||||
margin-top: 10px; | |||||
text-align: center; | |||||
} | |||||
.item-info input[type="number"] { | |||||
text-align: center; | |||||
} | |||||
.proj-info { | |||||
display: inline-block; | |||||
position: relative; | |||||
/*border: 1px solid ;*/ | |||||
border-radius: 8px; | |||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); | |||||
padding: 10px; | |||||
margin-top: 10px; | |||||
text-align: center; | |||||
} | |||||
.proj-name { | |||||
/* border-bottom-left-radius: 10px; | |||||
border-bottom-right-radius: 10px;*/ | |||||
margin-top: 10px; | |||||
margin-left: 10px; | |||||
text-align: left; | |||||
color: #575759; | |||||
} | |||||
.proj-description { | |||||
text-align: left; | |||||
margin-left: 10px; | |||||
} | |||||
.proj-contacts { | |||||
text-align: left; | |||||
margin-left: 10px; | |||||
margin-top: 15px; | |||||
} | |||||
.proj-image { | |||||
border-radius: 5px; | |||||
display: inline-block; | |||||
} | |||||
.add-to-cart { | |||||
background-image: url("https://simg.marwin.kz/static/version1586431003/frontend/Astrio/komfort/ru_RU/images/cart.png"); | |||||
background-position: center; | |||||
background-repeat: no-repeat; | |||||
width: 76px; | |||||
height: 40px; | |||||
background-size: 33px; | |||||
padding-left: 3px; | |||||
padding-right: 3px; | |||||
} | |||||
.item-name { | |||||
color: #007bff; | |||||
} | |||||
.container { | |||||
margin-top: 100px; | |||||
margin-bottom: 100px; | |||||
} | |||||
.rightimg { | |||||
float: right; | |||||
margin: 7px 0 7px 7px; | |||||
} | |||||
li { | |||||
margin-top: 15px; | |||||
} | |||||
.page-footer { | |||||
background-color: #f5f5f5; | |||||
margin-top: 400px; | |||||
} |
@@ -0,0 +1,11 @@ | |||||
<?php | |||||
session_start(); | |||||
if (isset($_GET["action"])) { | |||||
if ($_GET["action"] == "delete") { | |||||
foreach ($_SESSION["cart"] as $keys => $values) { | |||||
if ($values["item_id"] == $_GET["del"]) { | |||||
unset($_SESSION["cart"][$keys]); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,3 @@ | |||||
<?php | |||||
session_start(); | |||||
session_destroy(); |
@@ -0,0 +1,70 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<h1>FutureBuilding</h1> | |||||
<img src="https://i.ibb.co/fdL3KrG/Future-Building.png" alt="Future-Building" class="rightimg" width="40%"> | |||||
<p>FutureBuilding - крупный строительный холдинг, лидер на рынке строительства Казахстана. Холдинг работает с 2003 года и за это время заслужил репутацию профессионала и надежного партнера.</p> | |||||
<p>FutureBuilding сегодня – многопрофильный холдинг, структуру которой составляют дивизионы и дирекции в различных сферах прадажи строительных материалов, строительства, девелопмента и инжиниринга.</p> | |||||
<p> | |||||
Наша Компания (16 лет в строительном рынке) | |||||
<ul> | |||||
<li>Успешно развивается, создаёт тысячи рабочих мест, оказывает значительное влияние на развитие экономики Казахстана</li> | |||||
<li>Строит жилье всех уровней комфортности</li> | |||||
<li>Управляет десятками строительными бригадами</li> | |||||
<li>Развивает строительство за пределами Казахстана</li> | |||||
<li>Реализует проекты повышенной сложности для международных нефтегазовых компаний и осваивает рынки ближнего зарубежья</li> | |||||
<li>Участвует в масштабных государственных программах в сфере строительства</li> | |||||
<li>Заботится о профессиональном росте своих сотрудников и их постоянном обучении</li> | |||||
<li>Сдает свои объекты в срок</li> | |||||
<li>Активно занимается благотворительной деятельностью</li> | |||||
<li>Построено более 4,5 миллионов квадратных метров: жилые комплексы, коттеджные поселки, коммерческая недвижимость, инфраструктурные и промышленные объекты</li> | |||||
<li>Продано строительных материалов на 11.6 млрд тенге.</li> | |||||
<li>Присутствие в сегментах строительной отрасли</li> | |||||
<li>В холдинге работает 8000 высококвалифицированных сотрудников, объединенных предпринимательской корпоративной культурой.</li> | |||||
</ul> | |||||
</p> | |||||
<p>Холдинг ориентируется на лучшие мировые практики корпоративного управления, придерживаясь международных стандартов финансовой прозрачности, этических принципов ведения бизнеса, командного корпоративного духа.</p> | |||||
<p>Холдинг работает по принципу «Выбирай лучшее»: проект, команду, технологии, менеджмент. Более 20 руководителей Future Building получили степень MBA.</p> | |||||
<h2>"Мы строим будущее!"</h2> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,8 @@ | |||||
<script> | |||||
var delayInMilliseconds = 2000; //1 second | |||||
setTimeout(function() { | |||||
window.close(); | |||||
}, delayInMilliseconds); | |||||
</script> |
@@ -0,0 +1,66 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
$textt = ""; | |||||
if (isset($_POST["name"]) && isset($_POST["phone"])) { | |||||
$query = "INSERT INTO cons(name, phone) VALUES ('" . $_POST["name"] . "', '" . $_POST["phone"] . "')"; | |||||
mysqli_query($db, $query); | |||||
$textt = "Вы успешно отправили заявку!"; | |||||
} | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<div class="row" style="text-align: center"> | |||||
<div class="col-12"> | |||||
<span><?php echo $textt ?></span> | |||||
<div class="send"> | |||||
<h3>Оставьте заявку. Мы вам обязательно перезвоним!</h3> | |||||
<form action="phone.php" method="post"> | |||||
<input type="text" required name="name" placeholder="Ваше Имя" /> <br> | |||||
<input type="text" required name="phone" placeholder="Номер телефона" /> <br> | |||||
<input class="btn btn-success" type="submit" value="Отправить заявку" /> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> | |||||
</html> |
@@ -0,0 +1,76 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Cart</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<div class="itemlist"> | |||||
<div class="proj-info col-12"> | |||||
<img class="proj-image" src="https://cdn.esoft.digital/640480/photos/f1d746c78e96888b918cef08a5a9e41e.jpg" title="Дом" width="100%"><br> | |||||
<div class="proj-name"> | |||||
<h3>ЖК Future-80085</h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
ЖК Future-80085 это новый, многофункциональный жилой комплекс комфорт класса. | |||||
</div> | |||||
<div class="proj-contacts"><a href="phone.php" class="btn btn-success">Вы можете оставить заявку на сайте. Мы вам перезвоним!</a></div> | |||||
</div> | |||||
<div class="proj-info col-12"> | |||||
<img class="proj-image" src="https://homsters.cdnvideo.ru/eUwzdlJCamdrK05xWVlBSlNNdWNhR2JJT1BsOU5tT0l4TkdrOFBhYWE5RG9ZSmJkS09GMTZySXJ1MURoRUl6dHRvL2c1T1BWQTdZRlRhTXRLS2h5Zy9xdVpPNmg1RW56ei9iSHB4dVRkMkE9.png" title="Дом" width="100%"><br> | |||||
<div class="proj-name"> | |||||
<h3>ЖК Future-D34DM4U5</h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
Hoвый 10-этaжный дoм в клaccичecкoм cтилe вoзвoдит cтpoитeльнaя кoмпaния «FutureBuilding». | |||||
</div> | |||||
<div class="proj-contacts"><a href="phone.php" class="btn btn-success">Вы можете оставить заявку на сайте. Мы вам перезвоним!</a></div> | |||||
</div> | |||||
<div class="proj-info col-12"> | |||||
<img class="proj-image" src="https://s.inaktau.kz/s/117/section/doska/upload/pers/117/img/doska/000/000/098/whatsapp-image-2020-02-27-at-172017_5e68c46ee4778.jpeg" title="Дом" width="100%"><br> | |||||
<div class="proj-name"> | |||||
<h3>ЖК Future-M4R4-M4U5</h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
Новый и огромный жилой комплекс премиум класса от застройщика «FutureBuilding». | |||||
</div> | |||||
<div class="proj-contacts"><a href="phone.php" class="btn btn-success">Вы можете оставить заявку на сайте. Мы вам перезвоним!</a></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,131 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<div id="myModal" class="modal bd-example-modal-sm" tabindex="-1" role="alert" aria-hidden="true"> | |||||
<div class="modal-dialog modal-md"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header">Внимание!</div> | |||||
<div class="modal-body"><span id="axaxa">Вы добавили товар в корзину.</span></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<input class="form-control" id="myInput" type="text" placeholder="Поиск.."> | |||||
<div id="itemlist"> | |||||
<?php | |||||
$result = mysqli_query($db, "SELECT * FROM menu"); | |||||
while ($myrow = mysqli_fetch_array($result)) { ?> | |||||
<div class="item-info col-12"> | |||||
<img width="200px" src="<?php echo $myrow['imageid'] ?>"> | |||||
<br> | |||||
<span class="item-name"><?php echo $myrow['name'] ?></span> <br> | |||||
<span class="item-cost"><?php echo $myrow['cost'] ?> ₸</span> <br> | |||||
<input class="col-6" min="1" type="number" name="Количество" id="<?php echo $myrow['id'] ?>" value=1> | |||||
<button onclick="myFunction(<?php echo $myrow['id'] ?>)" class="btn btn-primary add-to-cart col-4"></button> | |||||
</div> | |||||
<?php } ?> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
<script> | |||||
$(document).ready(function() { | |||||
$("#myInput").on("keyup", function() { | |||||
var value = $(this).val().toLowerCase(); | |||||
$("#itemlist div").filter(function() { | |||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) | |||||
}); | |||||
}); | |||||
}); | |||||
function myFunction(idid) { | |||||
var x = document.getElementById(idid).value; | |||||
if (x > 0) { | |||||
jQuery(document).ready(function($) { | |||||
$.ajax({ | |||||
type: 'GET', | |||||
url: 'add.php', | |||||
data: { | |||||
itemid: idid, | |||||
quan: x | |||||
}, | |||||
success: function(res) { | |||||
$('#myModal').modal('show') | |||||
} | |||||
}); | |||||
}); | |||||
} else { | |||||
alert("Нужно положительное количество товаров!"); | |||||
} | |||||
} | |||||
function delitem(idid) { | |||||
jQuery(document).ready(function($) { | |||||
$.ajax({ | |||||
type: 'GET', | |||||
url: 'delete.php', | |||||
data: { | |||||
action: "delete", | |||||
del: idid | |||||
}, | |||||
success: function(res) { | |||||
location.reload(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
function destr() { | |||||
jQuery(document).ready(function($) { | |||||
$.ajax({ | |||||
type: 'GET', | |||||
url: 'destroy.php', | |||||
data: {}, | |||||
success: function(res) { | |||||
location.reload(); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
</script> | |||||
</body> | |||||
</html> |
@@ -0,0 +1,66 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
$textt = "Вы успешно отправили заявку! Ожидайте звонка."; | |||||
if (!isset($_SESSION["cart"])) { | |||||
$textt = "Корзина пуста!"; | |||||
} else if (isset($_POST["name"]) && isset($_POST["adress"]) && isset($_POST["contacts"])) { | |||||
$query = "INSERT INTO req(name, adress, contacts, cart) VALUES ("; | |||||
$query .= "'" . $_POST["name"] . "'" . ", "; | |||||
$query .= "'" . $_POST["adress"] . "'" . ", "; | |||||
$query .= "'" . $_POST["contacts"] . "'" . ", "; | |||||
$query .= "'" . json_encode($_SESSION["cart"], JSON_UNESCAPED_UNICODE) . "')"; | |||||
mysqli_query($db, $query); | |||||
session_destroy(); | |||||
} else { | |||||
$textt = "Произошла ошибка. Ваш заявка не обработана."; | |||||
} | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="index.php">FutureBuilding</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="shop.php">Каталог товаров</a> | |||||
<a class="nav-link" href="projects.php">Наши проекты</a> | |||||
<a class="nav-link" href="brigade.php">Строительная бригада</a> | |||||
</div> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="cart.php">Корзина</a> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<div class="row" style="text-align: center"> | |||||
<div class="col-12"> | |||||
<span><?php echo $textt ?></span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> | |||||
</html> |
@@ -0,0 +1,3 @@ | |||||
<script> | |||||
window.open('lol.php') | |||||
</script> |
@@ -0,0 +1,86 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
if (isset($_POST["del"])) { | |||||
mysqli_query($db, "DELETE FROM req WHERE `id`='" . $_POST["del"] . "'"); | |||||
} | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Заказы</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="worker.php">Admin</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="view.php">Просмотр заказов</a> | |||||
<a class="nav-link" href="add-item.php">Добавить товар в базу данных</a> | |||||
<a class="nav-link" href="cons.php">Заявки на перезвон</a> | |||||
</div> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<input class="form-control" id="myInput" type="text" placeholder="Поиск.."> <br> | |||||
<div id="itemlist"> | |||||
<?php | |||||
$result = mysqli_query($db, "SELECT * FROM req"); | |||||
while ($myrow = mysqli_fetch_array($result)) { ?> | |||||
<div class="proj-info col-12"> | |||||
<div class="proj-name"> | |||||
<h3>ID заказа: <?php echo $myrow["id"] ?></h3> | |||||
</div> | |||||
<div class="proj-description"> | |||||
<span>ФИО: <?php echo $myrow["name"] ?></span><br> | |||||
<span>Адрес: <?php echo $myrow["adress"] ?></span><br> | |||||
<span>Контакты: <?php echo $myrow["contacts"] ?></span><br> | |||||
<form style="display: inline-block" action="viewcart.php" method="get"> | |||||
<input type="hidden" name="id" value="<?php echo $myrow["id"] ?>"> | |||||
<input type="submit" class="btn btn-info" value="Перейти к заказу" /> | |||||
</form> | |||||
<form style="display: inline-block" action="view.php" method="post"> | |||||
<input type="hidden" name="del" value="<?php echo $myrow["id"] ?>"> | |||||
<input type="submit" class="btn btn-danger" value="Выполнен/Удалить" /> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<?php | |||||
} | |||||
?> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
$(document).ready(function() { | |||||
$("#myInput").on("keyup", function() { | |||||
var value = $(this).val().toLowerCase(); | |||||
$("#itemlist .proj-info").filter(function() { | |||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) | |||||
}); | |||||
}); | |||||
}); | |||||
</script> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding. | |||||
</div> | |||||
</footer> | |||||
</body> | |||||
</html> |
@@ -0,0 +1,78 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Обзор заказа</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="worker.php">Admin</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="view.php">Просмотр заказов</a> | |||||
<a class="nav-link" href="add-item.php">Добавить товар в базу данных</a> | |||||
<a class="nav-link" href="cons.php">Заявки на перезвон</a> | |||||
</div> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<h1>ID заказа: <?php echo $_GET["id"] ?></h1> | |||||
<table class="table table-bordered"> | |||||
<tr> | |||||
<th>ID</th> | |||||
<th>Товар</th> | |||||
<th>Кол.</th> | |||||
<th>Цена</th> | |||||
<th>Итого</th> | |||||
</tr> | |||||
<?php | |||||
$result = mysqli_query($db, "SELECT * FROM req WHERE id=" . $_GET["id"] . ""); | |||||
$myrow = mysqli_fetch_array($result); | |||||
$cart = json_decode($myrow["cart"], true); | |||||
//echo $cart[0][0]; | |||||
if (!empty($cart)) { | |||||
$total = 0; | |||||
foreach ($cart as $keys => $values) { | |||||
?> | |||||
<tr> | |||||
<td><?php echo $values["item_id"] ?></td> | |||||
<td><?php echo $values["item_name"] ?></td> | |||||
<td><?php echo $values["item_quantity"] ?></td> | |||||
<td><?php echo $values["item_price"] ?> ₸</td> | |||||
<td><?php echo $values["item_price"] * $values["item_quantity"] ?> ₸</td> | |||||
</tr> | |||||
<?php | |||||
$total = $total + ($values["item_price"] * $values["item_quantity"]); | |||||
} | |||||
?> | |||||
<tr> | |||||
<td colspan="4" style="text-align:right">Итого</td> | |||||
<td style="text-align:right"><?php echo $total ?> ₸</td> | |||||
</tr> | |||||
<?php | |||||
} | |||||
?> | |||||
</table> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding | |||||
</div> | |||||
</footer> | |||||
</body> |
@@ -0,0 +1,49 @@ | |||||
<?php | |||||
session_start(); | |||||
header('Content-Type: text/html; charset=UTF-8'); | |||||
$db = include("config.php"); | |||||
?> | |||||
<html> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>FutureBuilding Shop - Панель управления</title> | |||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script> | |||||
<script src="js/bootstrap.js"></script> | |||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |||||
<link rel="stylesheet" type="text/css" href="css/style.css"> | |||||
</head> | |||||
<body> | |||||
<nav class="navbar fixed-top navbar-light bg-light navbar-expand border"> | |||||
<a class="navbar-brand" href="worker.php">Admin</a> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item dropdown"> | |||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |||||
Меню | |||||
</a> | |||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | |||||
<a class="nav-link" href="view.php">Просмотр заказов</a> | |||||
<a class="nav-link" href="add-item.php">Добавить товар в базу данных</a> | |||||
<a class="nav-link" href="cons.php">Заявки на перезвон</a> | |||||
</div> | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
<div class="container"> | |||||
<h2>Панель управления компанией</h2> | |||||
<p>Здесь работники могут управлять базой данных товаров, смотреть заказы и заявки на перезвон.</p> | |||||
<p>Навигация по панели управления находится выше.</p> | |||||
<p>Удачной работы!</p> | |||||
</div> | |||||
<footer class="page-footer font-small blue border"> | |||||
<div class="footer-copyright text-center py-3"> | |||||
©FutureBuilding. | |||||
</div> | |||||
</footer> | |||||
</body> | |||||
</html> |