001.
<?php
include
(
'header.php'
); ?>
002.
003.
<style type=
"text/css"
>
004.
.CSSTableGenerator {
005.
margin:0px;padding:0px;
006.
width:100%;
007.
box-shadow: 10px 10px 5px #888888;
008.
border:1px solid #000000;
009.
010.
-moz-border-radius-bottomleft:0px;
011.
-webkit-border-bottom-left-radius:0px;
012.
border-bottom-left-radius:0px;
013.
014.
-moz-border-radius-bottomright:0px;
015.
-webkit-border-bottom-right-radius:0px;
016.
border-bottom-right-radius:0px;
017.
018.
-moz-border-radius-topright:0px;
019.
-webkit-border-top-right-radius:0px;
020.
border-top-right-radius:0px;
021.
022.
-moz-border-radius-topleft:0px;
023.
-webkit-border-top-left-radius:0px;
024.
border-top-left-radius:0px;
025.
}.CSSTableGenerator table{
026.
border-collapse: collapse;
027.
border-spacing: 0;
028.
width:100%;
029.
height:100%;
030.
margin:0px;padding:0px;
031.
}.CSSTableGenerator tr:last-child td:last-child {
032.
-moz-border-radius-bottomright:0px;
033.
-webkit-border-bottom-right-radius:0px;
034.
border-bottom-right-radius:0px;
035.
}
036.
.CSSTableGenerator table tr:first-child td:first-child {
037.
-moz-border-radius-topleft:0px;
038.
-webkit-border-top-left-radius:0px;
039.
border-top-left-radius:0px;
040.
}
041.
.CSSTableGenerator table tr:first-child td:last-child {
042.
-moz-border-radius-topright:0px;
043.
-webkit-border-top-right-radius:0px;
044.
border-top-right-radius:0px;
045.
}.CSSTableGenerator tr:last-child td:first-child{
046.
-moz-border-radius-bottomleft:0px;
047.
-webkit-border-bottom-left-radius:0px;
048.
border-bottom-left-radius:0px;
049.
}.CSSTableGenerator tr:hover td{
050.
051.
}
052.
.CSSTableGenerator tr:nth-child(odd){ background-color:#aad4ff; }
053.
.CSSTableGenerator tr:nth-child(even) { background-color:#ffffff; }.CSSTableGenerator td{
054.
vertical-align:middle;
055.
056.
057.
border:1px solid #000000;
058.
border-width:0px 1px 1px 0px;
059.
text-align:center;
060.
padding:9px;
061.
font-size:12px;
062.
font-family:Arial;
063.
font-weight:normal;
064.
color:#000000;
065.
}.CSSTableGenerator tr:last-child td{
066.
border-width:0px 1px 0px 0px;
067.
}.CSSTableGenerator tr td:last-child{
068.
border-width:0px 0px 1px 0px;
069.
}.CSSTableGenerator tr:last-child td:last-child{
070.
border-width:0px 0px 0px 0px;
071.
}
072.
.CSSTableGenerator tr:first-child td{
073.
background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) );
074.
background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% );
075.
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=
"#005fbf"
, endColorstr=
"#003f7f"
); background: -o-linear-gradient(top,#005fbf,003f7f);
076.
077.
background-color:#005fbf;
078.
border:0px solid #000000;
079.
text-align:center;
080.
border-width:0px 0px 1px 1px;
081.
font-size:14px;
082.
font-family:Arial;
083.
font-weight:bold;
084.
color:#ffffff;
085.
}
086.
.CSSTableGenerator tr:first-child:hover td{
087.
background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) );
088.
background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% );
089.
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=
"#005fbf"
, endColorstr=
"#003f7f"
); background: -o-linear-gradient(top,#005fbf,003f7f);
090.
091.
background-color:#005fbf;
092.
}
093.
.CSSTableGenerator tr:first-child td:first-child{
094.
border-width:0px 0px 1px 0px;
095.
}
096.
.CSSTableGenerator tr:first-child td:last-child{
097.
border-width:0px 0px 1px 1px;
098.
}
099.
</style>
100.
101.
<!-- เนื้อหา -->
102.
<div
class
=
"content-wrapper"
>
103.
<!-- Content Header (Page header) -->
104.
105.
106.
107.
<section
class
=
"content-header"
>
108.
<h1>
109.
เพิ่มประเภทสินค้า
110.
111.
</h1>
112.
113.
</section>
114.
115.
<!-- Main content -->
116.
<section
class
=
"content"
>
117.
118.
<form
class
=
"form-horizontal"
method=
"post"
action=
"insert_type.php"
>
119.
<div
class
=
"box-body"
>
120.
121.
<div
class
=
"form-group"
>
122.
<label
for
=
"type_name"
class
=
"col-sm-2 control-label"
>ชื่อประเภทสินค้า</label>
123.
<div
class
=
"col-sm-10"
>
124.
<input type=
"text"
class
=
"form-control"
name=
"type_name"
id=
"type_name"
placeholder=
"ชื่อประเภทสินค้า"
>
125.
</div>
126.
</div>
127.
128.
129.
</div><!-- /.box-body -->
130.
131.
132.
<center>
133.
<button type=
"submit"
name=
"submit"
class
=
"btn btn-info"
>บันทึก</button>
134.
<button type=
"reset"
name=
"reset"
class
=
"btn btn-warning"
>ยกเลิก</button>
135.
</center>
136.
</form>
137.
138.
139.
<?php
140.
if
(isset(
$_POST
[
'submit'
]))
141.
{
142.
$type_name
=
$_POST
[
'type_name'
];
143.
$sql
=
" insert into tb_type(type_name)"
;
144.
$sql
.=
" values ('$type_name')"
;
145.
146.
if
(
$cls_con
->write_base(
$sql
)==true){
147.
echo
$cls_con
->show_message(
'บันทึกข้อมูลสำเร็จ'
);
148.
echo
$cls_con
->goto_page(1,
'show_type.php'
);
149.
150.
}
151.
else
{
152.
echo
$cls_con
->show_message(
'บันทึกข้อมูลไม่สำเร็จ'
);
153.
154.
}
155.
156.
}
157.
158.
159.
?>
160.
161.
162.
</section><!-- /.content -->
163.
</div>
164.
<!-- เนื้อหา -->
165.
166.
<?php
include
(
'footer.php'
); ?>