Style.Css
body{
width:100%;
margin: 0 auto;
background-image: url("images/body2.png");
background-repeat: no-repeat;
}
#header{
width: 1024px;
height: 250px;
background-image: url("images/header.png");
background-repeat: no-repeat;
}
#reg{
position:relative;
top:110px;
left:1130px;
width:240px;
height:90px;
font-family:Segoe Script;
font-size: 16px;
color: #7a531c;
}
#header #reg form {
text-align:left;
height:90px;
}
#header #reg form table{
border-bottom: 2px solid #582515;
border-right: 1px solid #582515;
text-align:left;
font-weight:bolder;
}
#header #reg form table tr td{
height: 30px;
width:100px;
}
#header #reg form table a{
background-image: url("images/header_.png");
background-repeat: no-repeat;
color: #853b25;
text-decoration: none;
}
#header #reg form table a:active{
color: #c06217;
}
#menu_adm{
width: 1024px;
font-family:Segoe Script;
font-size: 20px;
height:5px;
margin: 0 auto;
}
#menu_adm ul{
list-style:none;
width:1024px;
height: inherit;
padding: 0;
margin: 3px;
}
#menu_adm ul li{
float:left;
width:33%;
text-align:center;
height:30px;
}
#menu_adm ul li a{
border-bottom: 2px solid #582515;
display:block;
background-color: none;
text-decoration:none;
color: #7a531c;
}
#menu_adm ul li a:hover{
background-image: url("images/link_adm.png");
}
#menu{
width: 1024px;
font-family:Segoe Script;
font-size: 20px;
height:5px;
margin: 0 auto;
}
#menu ul{
list-style:none;
width:1024px;
height: inherit;
padding: 0;
margin: 3px;
}
#menu ul li{
float:left;
width:25%;
text-align:center;
height:30px;
}
#menu ul li a{
border-bottom: 2px solid #582515;
display:block;
background-color: none;
text-decoration:none;
color: #7a531c;
}
#menu ul li a:hover{
background-image: url("images/link.png");
}
#content{
min-height:370px;
width: 1024px;
margin: 20px auto;
height: auto;
color: #582515;
text-decoration: none;
font-weight:bolder;
font-family:Segoe Script;
font-size: 18px;
}
#content form{
width: 1024px;
margin: 20px auto;
height: auto;
color: #582515;
text-align:center;
text-decoration: none;
font-weight:lighter;
font-family:Segoe Script;
font-size: 18px;
}
.description{
margin: 0 auto;
background-image: url("images/content_.png");
background-repeat: no-repeat;
font-family:Segoe Script;
font-size: 15px;
font-weight:bolder;
}
#content a{
background-image: url("images/header_.png");
background-repeat: no-repeat;
font-family:Segoe Script;
font-size: 23px;
color: #853b25;
font-weight:bolder;
text-decoration: none;
}
#content a:active{
color: #c06217;
}
#content table {
text-align:left;
margin: 0 auto;
background-image: url("images/content.png");
background-repeat: no-repeat;
font-weight:bolder;
}
#content table tr td{
height: 50px;
padding-right: 20px;
}
#content #form_order{
text-align:left;
}
.form_error{
color:red;
}
#footer{
margin: auto auto 0;
position: relative;
width: 1024px;
color: #582515;
height: 30px;
text-align:center;
}
change_status.php
<?php
if(!isset($_POST['change']))
{
header('Location: ../');
exit();
}
$id = $_POST['id'];
$status = $_POST['status'];
include_once('../actions/database.php');
$db = db_connection();
$query = $db->prepare("UPDATE orders
SET status = ?
WHERE id = ?");
$query->execute(array($status, $id));
header('Location: ./orders.php?id='.$id);
?>
database.php
<?php
define('DB_DRIVER','mysql');
define('DB_HOST','localhost');
define('DB_NAME','samorodok_art');
define('DB_USER','root');
define('DB_PASS','');
function db_connection()
{
try
{ $db = new PDO
(DB_DRIVER.':host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASS);
$db->query("SET NAMES 'cp1251'");
return $db;
}
catch(PDOException $e)
{
die($e->getMessage());
}
}
?>
<?php
session_start();
?>
