From 6524aae115c6d471ad439697639b31160a1cfe1f Mon Sep 17 00:00:00 2001 From: andryeyev Date: Fri, 4 Mar 2016 18:11:39 +0200 Subject: [PATCH] + правки по пользователям (admin, Veronika, Natalia) 2ч --- account/admin/orders.php | 257 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------- css/admin.css | 448 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------- 2 files changed, 474 insertions(+), 231 deletions(-) diff --git a/account/admin/orders.php b/account/admin/orders.php index 1db5107..1ef6541 100644 --- a/account/admin/orders.php +++ b/account/admin/orders.php @@ -24,7 +24,7 @@ include_once ($_SERVER['DOCUMENT_ROOT'] . "/account/func/func.php"); } elseif (isset ($_GET['label'])) { - $sql = sprintf ("UPDATE catalogs_orders SET label=%d WHERE id=%d", $_GET['label'], $_GET['orderID']); + $sql = sprintf ("UPDATE catalogs_orders SET label='%s' WHERE id=%d", $_GET['label'], $_GET['orderID']); mysql_query ($sql); @@ -584,7 +584,7 @@ if (! isset ($_GET['action'])) // ============= $th = array ( - "id" => " ", + "id" => " ", "username" => "", "email" => "email", "tel" => "", @@ -654,13 +654,10 @@ if (! isset ($_GET['action'])) $WHERE[] = $WHERE_DATE; } } - - // ***** ***** - if (in_array ($_SESSION['admin']['id'], array (1, 19, 20))) - { - // ============= - // === ==== - // ============= + + // ============== + // === ==== + // ============== echo " "; + // ============= + // === ==== + // ============= + + // ***** ***** + if (in_array ($_SESSION['admin']['id'], array (1, 19, 20))) + { echo "
@@ -714,13 +718,13 @@ if (! isset ($_GET['action'])) } ); '; + } echo "
"; - } // =========== =========== $lll = ""; @@ -809,25 +813,8 @@ if (! isset ($_GET['action'])) echo "
"; echo "
"; - $array_label = array ( - 0 => " ", - 1 => "", - 110 => "", - 2 => "", - 3 => "", - 4 => "", - 5 => "5", - 510 => "510", - 6 => "6", - 610 => "610", - 7 => "", - 8 => "8", - 9 => "", - 10 => "", - ); - print ' -
+
@@ -838,17 +825,29 @@ if (! isset ($_GET['action'])) '; - $WHERE = array (); + // =============== + // ==== LABEL ==== + // =============== + + echo '
'; - foreach ($array_label as $label_id => $label_title) + $sql_label = ' + SELECT * + FROM `catalogs_orders_label` + ORDER BY sortorder ASC + '; + $result_label = mysql_query ($sql_label) or die (mysql_error ()); + while ($label = mysql_fetch_assoc ($result_label)) { // ***** ***** - if (in_array ($label_id, array (9, 10)) && ! in_array ($_SESSION['admin']['id'], array (1, 19, 20))) + if (in_array ($label['label_id'], array (9, 10)) && ! in_array ($_SESSION['admin']['id'], array (1, 19, 20))) { CONTINUE; } - $WHERE[] = "o.`label` = " . $label_id; + $WHERE = array (); + + $WHERE[] = "o.`label` = " . $label['label_id']; if (! empty ($WHERE_DATE)) { @@ -857,57 +856,84 @@ if (! isset ($_GET['action'])) // $sql = " - SELECT count(*) as count + SELECT count(*) as total FROM catalogs_orders o WHERE " . (! empty ($WHERE) ? implode (' AND ', $WHERE) : ''); $r = mysql_query ($sql) or die (mysql_error ()); - $count = mysql_result ($r, 0); + $row = mysql_fetch_assoc ($r); + $count = $row['total']; $checked = ''; foreach ($_GET['lab'] as $id) { - if ($label_id == $id) + if ($label['label_id'] == $id) { $checked = 'checked=checked'; break; } } + echo '
'; + echo ''; + echo ''; + echo '
'; + } - $label_id = ($label_id == 110) ? 1.1 : $label_id; - $label_id = ($label_id == 510) ? 5.1 : $label_id; - $label_id = ($label_id == 610) ? 6.1 : $label_id; + echo '
'; - print ''; - } + // ================== + // ==== ==== + // ================== - print "


"; + echo '
'; - print ""; - print ""; + echo ""; $result_1 = mysql_query ("select * from zlo_admin"); + while ($row = mysql_fetch_assoc ($result_1)) { echo ""; } - print ""; - $sql = "select * from zlo_book_delivery"; - $r = mysql_query ($sql) or die (mysql_error ()); - $i = 0; - while ($row = mysql_fetch_assoc ($r)) - { - print '"; + + echo '
'; + + // ================== + // ==== ==== + // ================== + + echo '
'; + + $sql = "select * from zlo_book_delivery"; + $r = mysql_query ($sql) or die (mysql_error ()); + $i = 0; + while ($delivery = mysql_fetch_assoc ($r)) { - if ($l == $row['id']) - print 'checked'; + $checked = ''; + + foreach ($_GET['delivery'] as $l) + { + if ($l == $delivery['id']) + { + $checked = 'checked=checked'; + break; + } + } + + echo '
'; + echo ''; + echo ''; + echo '
'; + + $i ++; } - print ' onclick="document.form.submit();"/>'; - $i ++; - } + + echo '
'; + print '
'; $tim = (time () - 86400); @@ -931,13 +957,17 @@ if (! isset ($_GET['action'])) // ***** ***** if (in_array ($_SESSION['admin']['id'], array (1, 19, 20))) { - echo " -
"; + echo '
'; - echo " -
- -
"; + echo " +
"; + + echo " +
+ +
"; + + echo '
'; } echo " @@ -1014,52 +1044,39 @@ if (! isset ($_GET['action'])) {$order['tel']}
CMC {$order['city']}, {$order['address']} "; - // if($_SESSION['admin']['group']==1 || $_SESSION['admin']['group']==4){ - if ($_SESSION['admin']['group'] == 2 and ($order['label'] == 9 or $order['label'] == 10)) + + // =============== + // ==== LABEL ==== + // =============== + + if (in_array ($order['label'], array (9, 10)) && ! in_array ($_SESSION['admin']['id'], array (1, 19, 20))) { print $order['label']; } else { - echo " "; + + $sql_label = ' + SELECT * + FROM `catalogs_orders_label` + ORDER BY sortorder ASC + '; + $result_label = mysql_query ($sql_label) or die (mysql_error ()); + while ($label = mysql_fetch_assoc ($result_label)) { // ***** ***** - if (in_array ($i, array (9, 10)) && ! in_array ($_SESSION['admin']['id'], array (1, 19, 20))) + if (in_array ($label['label_id'], array (9, 10)) && ! in_array ($_SESSION['admin']['id'], array (1, 19, 20))) { CONTINUE; } - if (($_SESSION['admin']['group'] == 2) && ($i == 9 || $i == 10) && ($_SESSION['admin']['id'] != 17)) - { - } - elseif ($i == 10 && $_SESSION['admin']['id'] == 19) - { - } - else - print ''; - - - if ($i == 1) - { - print ''; - } - if ($i == 5) - { - print ''; - } - if ($i == 6) - { - print ''; - } + echo ''; } + echo ""; } - // }else{ - // print $order['label']; - // } - $s = "select * from catalogs_orders_products where order_id=" . $order['order_id']; $r = mysql_query ($s) or die (mysql_error ()); $status = array (); @@ -1172,48 +1189,38 @@ if (! isset ($_GET['action'])) echo ""; } - echo "
+ echo "
"; + + // =============== + // ==== LABEL ==== + // =============== -
+ echo " +
"; - // ////////if($_SESSION['admin']['group']==1 || $_SESSION['admin']['group']==4){ echo ""; - // //////////}else{ - // ////////////echo $order['label']; - // ///} echo "
diff --git a/css/admin.css b/css/admin.css index 3cf5b24..2978d37 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,71 +1,199 @@ -BODY,FORM{margin:0px;padding:0px;font-family: Arial, Tahoma, Helvetica, sans-serif;font-size:12px;color:#575757;} -TABLE{font-family:arial;font-size:12px;color:#737373;} -.submit_red{border:1px solid #898987;background-image: url("/img/admin/submit_bg_red.jpg");background-repeat:repeat-x;height:20px;font-family:arial;font-size:11px;color:#ffffff;font-weight:normal;padding-bottom:4px;} -.submit_blue{border:1px solid #898987;background-image: url("/img/admin/submit_bg_blue.jpg");background-repeat:repeat-x;height:20px;font-family:arial;font-size:11px;color:#ffffff;font-weight:normal;padding-bottom:4px;} -.submit_green{border:1px solid #898987;background-image: url("/img/admin/submit_bg_green.jpg");background-repeat:repeat-x;height:20px;font-family:arial;font-size:11px;color:#ffffff;font-weight:normal;padding-bottom:4px;} -.submit_orange{border:1px solid #898987;background-image: url("/img/admin/submit_bg_orange.jpg");background-repeat:repeat-x;height:20px;font-family:arial;font-size:11px;color:#ffffff;font-weight:normal;padding-bottom:4px;} +BODY, FORM { + margin: 0px; + padding: 0px; + font-family: Arial, Tahoma, Helvetica, sans-serif; + font-size: 12px; + color: #575757; +} + +TABLE { + font-family: arial; + font-size: 12px; + color: #737373; +} + +.submit_red { + border: 1px solid #898987; + background-image: url("/img/admin/submit_bg_red.jpg"); + background-repeat: repeat-x; + height: 20px; + font-family: arial; + font-size: 11px; + color: #ffffff; + font-weight: normal; + padding-bottom: 4px; +} -.input_form{border:1px solid #898987;background:#ffffff;background-image: url("/img/admin/input_ten.jpg");background-position:top;background-repeat:repeat-x;font-family:arial;font-size:12px;} +.submit_blue { + border: 1px solid #898987; + background-image: url("/img/admin/submit_bg_blue.jpg"); + background-repeat: repeat-x; + height: 20px; + font-family: arial; + font-size: 11px; + color: #ffffff; + font-weight: normal; + padding-bottom: 4px; +} + +.submit_green { + border: 1px solid #898987; + background-image: url("/img/admin/submit_bg_green.jpg"); + background-repeat: repeat-x; + height: 20px; + font-family: arial; + font-size: 11px; + color: #ffffff; + font-weight: normal; + padding-bottom: 4px; +} + +.submit_orange { + border: 1px solid #898987; + background-image: url("/img/admin/submit_bg_orange.jpg"); + background-repeat: repeat-x; + height: 20px; + font-family: arial; + font-size: 11px; + color: #ffffff; + font-weight: normal; + padding-bottom: 4px; +} + +.input_form { + border: 1px solid #898987; + background: #ffffff; + background-image: url("/img/admin/input_ten.jpg"); + background-position: top; + background-repeat: repeat-x; + font-family: arial; + font-size: 12px; +} + +a:visited { + font-family: arial; + font-size: 12px; + font-weight: normal; + color: #1B5393; + text-decoration: underline; +} + +a:link { + font-family: arial; + font-size: 12px; + font-weight: normal; + color: #1B5393; + text-decoration: underline; +} -a:visited{font-family:arial;font-size:12px;font-weight:normal;color: #1B5393;text-decoration: underline;} -a:link{font-family:arial;font-size:12px;font-weight:normal;color: #1B5393;text-decoration: underline;} /*a:hover {font-family:arial;font-size:12px;font-weight:normal;color:#1B5393;text-decoration: underline;}*/ -.bord{background:#1372C6;height:25px;padding-left:5px;padding-right:5px;} -.left_hot{padding-left:15px; padding-right:15px; padding-top:10px;} +.bord { + background: #1372C6; + height: 25px; + padding-left: 5px; + padding-right: 5px; +} -#link1{font-family:arial;font-size:12px;font-weight:bold;color:#ffffff;text-decoration: underline;} -.content_site{border-left:1px solid #6D6C71;padding:7px;} +.left_hot { + padding-left: 15px; + padding-right: 15px; + padding-top: 10px; +} -h1{font-family:arial;font-size:18px;} +#link1 { + font-family: arial; + font-size: 12px; + font-weight: bold; + color: #ffffff; + text-decoration: underline; +} + +.content_site { + border-left: 1px solid #6D6C71; + padding: 7px; +} + +h1 { + font-family: arial; + font-size: 18px; +} + +p { + margin: 0px; +} + +.k_l_bg { + background-image: url('img/admin/k_l_bg.jpg'); + background-repeat: repeat-y; + width: 14px; +} + +.k_t_bg { + background-image: url('img/admin/k_t_bg.jpg'); + background-repeat: repeat-x; + height: 14px; +} -p{margin:0px;} +.k_b_bg { + background-image: url('img/admin/k_b_bg.jpg'); + background-repeat: repeat-x; + height: 14px; +} + +.k_r_bg { + background-image: url('img/admin/k_r_bg.jpg'); + background-repeat: repeat-y; + width: 14px; +} -.k_l_bg{background-image: url('img/admin/k_l_bg.jpg');background-repeat: repeat-y;width:14px;} -.k_t_bg{background-image: url('img/admin/k_t_bg.jpg');background-repeat: repeat-x;height:14px;} -.k_b_bg{background-image: url('img/admin/k_b_bg.jpg');background-repeat: repeat-x;height:14px;} -.k_r_bg{background-image: url('img/admin/k_r_bg.jpg');background-repeat: repeat-y;width:14px;} +.questioning { + border: 1px solid #B4D2ED; + background: #F9FBFE; +} -.questioning{border:1px solid #B4D2ED;background:#F9FBFE;} -.topic{border:1px solid #D1D1D1;background:#EDEDED;padding:5px;} +.topic { + border: 1px solid #D1D1D1; + background: #EDEDED; + padding: 5px; +} -.content_site .H1Title {margin-bottom:20px;} -.H1Title { +.content_site .H1Title { + margin-bottom: 20px; +} + +.H1Title { margin: 0 10px 0 0; - list-style:none; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - color: #ffffff; - padding: 6px 12px; - background: -moz-linear-gradient( - top, - #c1d99e 0%, - #81b52d); - background: -webkit-gradient( - linear, left top, left bottom, - from(#c1d99e), - to(#81b52d)); - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border: 1px solid #7db327; - -moz-box-shadow: - 0px 1px 3px rgba(000,000,000,0.5), - inset 0px 0px 1px rgba(255,255,255,1); - -webkit-box-shadow: - 0px 1px 3px rgba(000,000,000,0.5), - inset 0px 0px 1px rgba(255,255,255,1); - text-shadow: - 1px 1px 2px rgba(000,000,000,0.4), - 0px 1px 0px rgba(255,255,255,0.3); + list-style: none; + font-family: Arial, Helvetica, sans-serif; + font-size: 22px; + color: #ffffff; + padding: 6px 12px; + background: -moz-linear-gradient( + top, + #c1d99e 0%, + #81b52d); + background: -webkit-gradient( + linear, left top, left bottom, + from(#c1d99e), + to(#81b52d)); + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #7db327; + -moz-box-shadow: 0px 1px 3px rgba(000, 000, 000, 0.5), + inset 0px 0px 1px rgba(255, 255, 255, 1); + -webkit-box-shadow: 0px 1px 3px rgba(000, 000, 000, 0.5), + inset 0px 0px 1px rgba(255, 255, 255, 1); + text-shadow: 1px 1px 2px rgba(000, 000, 000, 0.4), + 0px 1px 0px rgba(255, 255, 255, 0.3); - } - +} /* - =================== - ==== adminMenu ==== - =================== + =================== + ==== adminMenu ==== + =================== */ div.adminMenu { @@ -73,94 +201,202 @@ div.adminMenu { } div.adminMenu ul { - padding: 0; - margin: 0; - background: #4f85bb; - background: -moz-linear-gradient(top, #4f85bb 0%, #4f85bb 100%); - background: -webkit-linear-gradient(top, #4f85bb 0%,#4f85bb 100%); - background: linear-gradient(to bottom, #4f85bb 0%,#4f85bb 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4f85bb', endColorstr='#4f85bb',GradientType=0 ); + padding: 0; + margin: 0; + background: #4f85bb; + background: -moz-linear-gradient(top, #4f85bb 0%, #4f85bb 100%); + background: -webkit-linear-gradient(top, #4f85bb 0%, #4f85bb 100%); + background: linear-gradient(to bottom, #4f85bb 0%, #4f85bb 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f85bb', endColorstr='#4f85bb', GradientType=0); } -div.adminMenu ul ul li { - border-bottom: 1px solid #6096cc; +div.adminMenu ul ul li { + border-bottom: 1px solid #6096cc; } div.adminMenu ul ul a { - padding-left: 20px; + padding-left: 20px; } div.adminMenu ul li.main-menu { - font-size: 14px; - background: #2c539e; - background: -moz-linear-gradient(top, #2c539e 0%, #2c539e 100%); - background: -webkit-linear-gradient(top, #2c539e 0%,#2c539e 100%); - background: linear-gradient(to bottom, #2c539e 0%,#2c539e 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2c539e', endColorstr='#2c539e',GradientType=0 ); + font-size: 14px; + background: #2c539e; + background: -moz-linear-gradient(top, #2c539e 0%, #2c539e 100%); + background: -webkit-linear-gradient(top, #2c539e 0%, #2c539e 100%); + background: linear-gradient(to bottom, #2c539e 0%, #2c539e 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2c539e', endColorstr='#2c539e', GradientType=0); } -div.adminMenu ul li { - font-size: 12px; +div.adminMenu ul li { + font-size: 12px; border-radius: 0; color: #ffffff; text-align: left; list-style: none; - transition: all 0.5s ease 0s; + transition: all 0.5s ease 0s; } - div.adminMenu ul a { padding: 10px; display: block; - text-decoration: none; - color: #FFFFFF; - position: relative; + text-decoration: none; + color: #FFFFFF; + position: relative; text-shadow: -1px -1px 2px #4c4c4c; } - div.adminMenu ul li:hover, -div.adminMenu .activeMenu { - background: #2c539e; - background: -moz-linear-gradient(top, #001560 0%, #103782 100%); - background: -webkit-linear-gradient(top, #001560 0%,#103782 100%); - background: linear-gradient(to bottom, #001560 0%,#103782 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#001560', endColorstr='#103782',GradientType=0 ); +div.adminMenu .activeMenu { + background: #2c539e; + background: -moz-linear-gradient(top, #001560 0%, #103782 100%); + background: -webkit-linear-gradient(top, #001560 0%, #103782 100%); + background: linear-gradient(to bottom, #001560 0%, #103782 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#001560', endColorstr='#103782', GradientType=0); } /* - =============== - ==== Extra ==== - =============== + =============== + ==== ORDER ==== + =============== +*/ + + .label-block { + column-count: 6; + -webkit-column-count: 6; + -moz-column-count: 6; + column-gap: 20px; + -moz-column-gap: 20px; + -webkit-column-gap: 20px; + } + + .label-block .line { + display: block; + } + + .manager-block { + margin: 15px 0; + } + + .delivery-block { + column-count: 3; + -webkit-column-count: 3; + -moz-column-count: 3; + column-gap: 30px; + -moz-column-gap: 30px; + -webkit-column-gap: 30px; + } + + .delivery-block .line { + display: block; + } + + #button-block { + display: block; + } + + .info.label { + float: left; + padding-right: 20px; + width: 100px; + } + +/* + =============== + ==== Extra ==== + =============== */ #Extra .line .label { - text-transform: uppercase; - color: #000; - margin: 0 1px 0 0; - text-align: center; - text-decoration: none; - white-space: nowrap; - width: 100px; + text-transform: uppercase; + color: #000; + margin: 0 1px 0 0; + text-align: center; + text-decoration: none; + white-space: nowrap; + width: 100px; } #Extra .line > div { display: inline-block; } -.td_top {background-color:#296da4; color:#ffffff;} -.td_1 {background-color:#f6f6f6; color:#000000;} -.td_2 {background-color:#e7e7e7; color:#000000;} -.td_3 {color:#ff0000;} -.td_4 {background-color:#67afe9; color:#000000;} -.td_5 {background-color:#e9de67; color:#000000;} -.td_6 {font-weight:bold;} +.td_top { + background-color: #296da4; + color: #ffffff; +} + +.td_1 { + background-color: #f6f6f6; + color: #000000; +} + +.td_2 { + background-color: #e7e7e7; + color: #000000; +} + +.td_3 { + color: #ff0000; +} + +.td_4 { + background-color: #67afe9; + color: #000000; +} + +.td_5 { + background-color: #e9de67; + color: #000000; +} + +.td_6 { + font-weight: bold; +} -.win a{color:red;} -.win{position:absolute;padding:10px;border:1px solid #dbdcdc;background:#f6f6f6;color:#ffffff;width:450px;top:50px;left:50px;z-index:20;color:#666666;} -.close_win{float:right;width:9px;height:9px;background:url('/img/admin/close.png') no-repeat;cursor:pointer;position:absolute;top:5px;right:5px;margin-left:10px;} +.win a { + color: red; +} + +.win { + position: absolute; + padding: 10px; + border: 1px solid #dbdcdc; + background: #f6f6f6; + color: #ffffff; + width: 450px; + top: 50px; + left: 50px; + z-index: 20; + color: #666666; +} -a.button-edit2,a.button-save2{display:block;} -.button-save2,a.button-edit2,a.button-save2{width:78px;height:26px;line-height:26px;border:none;background:url('/img/admin/sub24.jpg') no-repeat;color:#badffc;cursor:pointer;text-align:center;text-decoration:none;margin-bottom:3px;} +.close_win { + float: right; + width: 9px; + height: 9px; + background: url('/img/admin/close.png') no-repeat; + cursor: pointer; + position: absolute; + top: 5px; + right: 5px; + margin-left: 10px; +} + +a.button-edit2, a.button-save2 { + display: block; +} + +.button-save2, a.button-edit2, a.button-save2 { + width: 78px; + height: 26px; + line-height: 26px; + border: none; + background: url('/img/admin/sub24.jpg') no-repeat; + color: #badffc; + cursor: pointer; + text-align: center; + text-decoration: none; + margin-bottom: 3px; +} -- libgit2 0.21.4