diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..994786a --- /dev/null +++ b/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..bcf6cc5 --- /dev/null +++ b/.project @@ -0,0 +1,36 @@ + + + ruko + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..3a28de0 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c537b63 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..489cc88 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..c0922dd --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..5268289 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,5 @@ +IF3110-Tubes-II +=============== +PETUNJUK INSTALASI + +- Jalankan Eclipse, buka project ini lalu jalankan project ini dengan memilih menu "Run As - Run On Server" diff --git a/MEMBER.md b/MEMBER.md new file mode 100644 index 0000000..0f0a4ba --- /dev/null +++ b/MEMBER.md @@ -0,0 +1,7 @@ +IF3110-Tubes-II +=============== +ANGGOTA KELOMPOK + +- BAHARUDIN AFIF (13511021) - 13511021@std.stei.itb.ac.id - Github ID : baharudinafif +- FATHAN ADI PRANAYA (13511027) - 13511027@std.stei.itb.ac.id - Github ID : fathanpranaya +- RENUSA ANDRA PRAYOGO (13511063) - 13511063@std.stei.itb.ac.id - Github ID : andra49 \ No newline at end of file diff --git a/WebContent/AJS_style.css b/WebContent/AJS_style.css new file mode 100644 index 0000000..954139c --- /dev/null +++ b/WebContent/AJS_style.css @@ -0,0 +1,312 @@ +body { + margin: 0; + padding: 0; + color: #999; + font-family: Tahoma, Geneva, sans-serif; + font-size: 12px; + line-height: 1.4em; + background-color: #665f5f; + background-repeat: repeat; + background-image: url(images/AJS_body.jpg) +} + +a, a:link, a:visited { color: #0299aa; font-weight: normal; text-decoration: none } +a:hover { text-decoration: underline; } + +a.addtocart{ display: inline-block; width: 80px; height: 21px; line-height: 21px; text-align: center; font-size: 10px; font-weight: bold; color: #333; background: url(images/AJS_addtocart.png) } +a.detail{ display: inline-block; width: 64px; height: 20px; line-height: 20px; text-align: center; font-size: 10px; font-weight: bold; color: #333; background: url(images/AJS_detail.png) } + +p { margin: 0 0 10px 0; padding: 0; } +img { border: none; } +blockquote { border: 1px solid #039fb1; border-left: 5px solid #000; padding: 19px; margin: 20px 0 0 0} +cite a, cite a:link, cite a:visited { font-size: 12px; text-decoration: none; font-style: normal } +cite span { font-weight: 400; color: #333; } + +.tmo_list { margin: 10px 0 10px 15px; padding: 0; list-style: none } +.tmo_list li { color:#999; margin: 0 0 5px 0; padding: 0 0 0 15px; background: url(images/AJS_list.png) no-repeat scroll 0 5px } +.tmo_list li a { color: #999; font-weight: normal } +.tmo_list li a:hover { color: #333 } + + +h1, h2, h3, h4, h5, h6 { color: #333; font-weight: normal; } +h1 { font-size: 30px; margin: 0 0 30px; padding: 5px 0 } +h2 { font-size: 26px; margin: 0 0 25px; padding: 5px 0 } +h3 { font-size: 20px; margin: 0 0 20px; padding: 0; } +h4 { font-size: 16px; margin: 0 0 15px; padding: 0; } +h5 { font-size: 14px; margin: 0 0 10px; padding: 0; } +h6 { font-size: 12px; margin: 0 0 5px; padding: 0; } + +.cleaner { clear: both } +.h10 { height: 10px } +.h20 { height: 20px } +.h30 { height: 30px } +.h40 { height: 40px } +.h50 { height: 50px } + +.float_l { float: left } +.float_r { float: right } + +#AJS_body_wrapper { + width: 100%; + background: url(images/AJS_body_top.jpg) repeat-x top +} + +#AJS_wrapper { + width: 980px; + margin: 0 auto; +} + +#AJS_header { + width: 960px; + height: 70px; + padding: 30px 10px; + background: url(images/AJS_header_bg.png) no-repeat bottom; +} + +#AJS_menubar { + width: 980px; + height: 60px; + background: url(images/AJS_menubar.png) no-repeat; +} + +#AJS_main { + width: 940px; + padding: 10px 20px; + background: url(images/AJS_main_bg.png) repeat-y +} + +#content { width: 690px } +#sidebar { width: 220px } + +#AJS_footer { + width: 960px; + padding: 30px 10px; + text-align: center; + background: url(images/AJS_footer.png) no-repeat top +} + +#site_title { float: left; margin-top: 30px; } +#site_title h1 { margin: 0; padding: 0 } +#site_title h1 a { display: block; width: 300px; height: 40px; padding-top: 30px; font-size: 12px; letter-spacing: 4px; color: #2f2f2f; text-align: left; background: url(images/AJS_logo.png) no-repeat top left } + +#header_right { float: right; margin: 35px 240px 0 0; color: #666; } +#header_right a { color: #fff } + +#menu_second_bar { padding: 5px 10px; } +#top_shopping_cart { float: left; padding: 5px 0; font-size: 11px; } + +#AJS_search { float: right; margin: 10px 30px 0; width: 220px; height: 34px; background: url(images/AJS_search_bg.png) } +#AJS_search form { + margin: 0; + padding: 0; +} + +#AJS_search .txt_field { + float: left; + display: block; + height: 22px; + line-height: 22px; + width: 170px; + color: #999; + font-size: 12px; + padding: 5px; + font-variant: normal; + border: none; + background: none; +} + +#AJS_search .sub_btn { + float: right; + display: block; + color: #fff; + height: 33px; + width: 40px; + font-size: 11px; + font-weight: 700; + line-height: 26px; + cursor: pointer; + border: none; + background: none; +} + +.sidebar_box { + position: relative; + background: #f0f0f0; + margin-bottom: 36px; + border: 1px solid #dbdbdb +} +.sidebar_box_icon {width:33px; height:33px; overflow:hidden; display:block; float:left; cursor:default;} +.sidebar_box h3 { font-size: 14px; font-weight: 700; padding: 0 10px 0 35px; margin: 0; width: 173px; height: 33px; line-height: 33px; margin-bottom: 0; background: url(images/AJS_sidebar_header.png) right center no-repeat; color: #2f2f2f; position:relative } + +.sidebar_box h3 a {position:absolute; left:0;} +#sidebar .sidebar_box .content { + padding: 10px 10px 0; +} + +#sidebar .sidebar_list { margin: 0; padding: 0 0 10px; list-style: none; } +#sidebar .sidebar_list li { display: block; margin: 0; padding: 5px 0; border-top: 1px solid #fff; border-bottom: 1px solid #d3d3d3 } +#sidebar .sidebar_list li.first { border-top: none } +#sidebar .sidebar_list li.last { border-bottom: none } +#sidebar .sidebar_list li a { color: #666; } +#sidebar .sidebar_list li a:hover { color: #000; text-decoration: none } + +.bs_box { clear: both; margin-bottom: 20px } +.bs_box img { float: left; margin-right: 10px; border: 4px solid #fff } +.bs_box h4 { margin-bottom: 0 } +.bs_box h4 a { font-size: 11px; color: #000; font-weight: 700} +.bs_box .price { font-size: 12px; font-weight: 700; color: #11bdd1} + +.product_box { + float: left; + width: 220px; + text-align: center; + margin: 0 10px 30px 0; + padding-bottom: 20px; + border-bottom: 1px dotted #ccc +} + +.product_box img { + margin-bottom: 5px; +} +.product_box h3 { + font-size: 11px; + color: #000; + font-weight: 700; + margin-bottom: 10px; +} +.product_box .product_price { + color: #11bdd1; + font-size: 14px; + font-weight: 700; + margin-bottom: 20px; +} +.product_box .detail { + float: right; + display: block; +} +.product_box .addtocart { + float: left; + display: block; +} + +#contact_form { padding: 0; width: 300px; margin-bottom: 40px } +#contact_form form { margin: 0px; padding: 0px; } + +#contact_form form .input_field { + font-family: Arial, Helvetica, sans-serif; + width: 270px; + padding: 5px; + color: #808b98; + background: #fff; + border: 1px solid #dedede; +} + +#contact_form form label { display: block; width: 100px; margin-right: 12px; font-size: 11px } + +#contact_form form textarea { + font-family: Arial, Helvetica, sans-serif; + width: 270px; + height: 200px; + padding: 5px; + color: #808b98; + background: #fff; + border: 1px solid #dedede; +} + +#contact_form form .submit_btn { + display: block; + padding: 5px 12px; + text-align: center; + text-decoration: none; + font-weight: bold; + background-color: #000; + border: 1px solid #fff; + color: #fff; + font-size:11px; + cursor: pointer; +} + +.content_half { width: 320px } +.content_13 { width: 220px; margin-right: 10px } + +.faqs p { margin-bottom: 20px } +.faqs h5 { margin-bottom: 5px } + +#AJS_footer { + color: #999 +} +#AJS_footer a { + color: #fff; +} + +/*============================*/ +/*=== Custom Slider Styles ===*/ +/*============================*/ +#slider-wrapper { + float: left; + width: 680px; + height: 300px; + margin-right: 20px; + margin-bottom: 60px; +} + +#slider { + position:relative; + width: 620px; + height: 300px; + background:url(images/loading.gif) no-repeat 50% 50%; +} +#slider img { + position:absolute; + top:0px; + left:0px; + display:none; +} +#slider a { + border:0; + display:block; +} + +.nivo-controlNav { + position:absolute; + right: 10px; + bottom: -30px; +} +.nivo-controlNav a { + display:block; + width:14px; + height:18px; + background:url(images/bullets.png) no-repeat; + text-indent:-9999px; + border:0; + margin-right:3px; + float:left; +} +.nivo-controlNav a.active { + background-position:0 -18px; +} + +.nivo-directionNav a { + display:block; + width:30px; + height:30px; + background:url(images/arrows.png) no-repeat; + text-indent:-9999px; + border:0; +} +a.nivo-nextNav { + background-position:-30px 0; + right:15px; +} +a.nivo-prevNav { + left:15px; +} + +.nivo-caption { + text-shadow:none; + font-family: Helvetica, Arial, sans-serif; +} +.nivo-caption a { + color:#efe9d1; + text-decoration:underline; +} \ No newline at end of file diff --git a/WebContent/META-INF/MANIFEST.MF b/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/WebContent/WEB-INF/lib/mysql-connector-java-5.1.26-bin.jar b/WebContent/WEB-INF/lib/mysql-connector-java-5.1.26-bin.jar new file mode 100644 index 0000000..79a1fc3 Binary files /dev/null and b/WebContent/WEB-INF/lib/mysql-connector-java-5.1.26-bin.jar differ diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000..63f5680 --- /dev/null +++ b/WebContent/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + ruko + + index + + \ No newline at end of file diff --git a/WebContent/barang.jsp b/WebContent/barang.jsp new file mode 100644 index 0000000..d40db01 --- /dev/null +++ b/WebContent/barang.jsp @@ -0,0 +1,26 @@ + + +
+

Tambah Barang

+
+ Nama Barang :

+ Harga Barang :

+ Kategori Barang :
+

+ Keterangan :


+ Stok :

+ + + +
+
+ + + \ No newline at end of file diff --git a/WebContent/beli.jsp b/WebContent/beli.jsp new file mode 100644 index 0000000..2941a16 --- /dev/null +++ b/WebContent/beli.jsp @@ -0,0 +1,43 @@ +<%@page import="bean.DatabaseAccess"%> +<%@page import="bean.Transaksi"%> +<%@page import="java.util.ArrayList"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + +<% + ArrayList shopList = (ArrayList) session.getAttribute("IT"); + String kartu=(String)request.getParameter("kartuTerpilih"); + DatabaseAccess dbAccess = new DatabaseAccess(); + out.print("

Terima Kasih "+session.getAttribute("username")+"

"); + out.print("

Berikut barang-barang yang Anda telah beli :

"); + int total=0; + int sisa=0; + for(int i=0; i"+shopList.get(i).getBarang().getNama_barang()+" Berjumlah = "+shopList.get(i).getQt()+"
"); + String SQL1 = "UPDATE barang SET stok="+sisa+" WHERE id_barang ="+shopList.get(i).getBarang().getId_barang(); + dbAccess.doQueryUpdate(SQL1); + System.out.println((i+1)+". SQL 1=>"+ SQL1); + if(sisa<=0){ + String SQL2 = "DELETE FROM progin_13511021 WHERE id_barang="+shopList.get(i).getBarang().getId_barang(); + dbAccess.doQueryUpdate(SQL2); + System.out.println((i+1)+". SQL 2=>"+ SQL2); + } + System.out.println("INI SISA, "+sisa+", "+shopList.get(i).getQt()); + if(iAnda membayar dengan kartu kredit bernomor "+kartu+", dengan total pembelian Anda: "+total+""); +%> + + + diff --git a/WebContent/cardregist.jsp b/WebContent/cardregist.jsp new file mode 100644 index 0000000..bb1d0d5 --- /dev/null +++ b/WebContent/cardregist.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + +<% + if(session.getAttribute("username")!=null){ + //punya session atau udah login +%> +
+ Card Number:
+ Name on Card:
+ Expired Date:
+
+ Skip card registration Or +
+<% + }else{ + out.println("

Login dulu bos

"); + } +%> + \ No newline at end of file diff --git a/WebContent/css/ddsmoothmenu.css b/WebContent/css/ddsmoothmenu.css new file mode 100644 index 0000000..accad07 --- /dev/null +++ b/WebContent/css/ddsmoothmenu.css @@ -0,0 +1,116 @@ +.ddsmoothmenu{ + float: left; +} + +.ddsmoothmenu ul{ + z-index:100; + margin: 0; + padding: 0; + list-style-type: none; +} + +/*Top level list items*/ +.ddsmoothmenu ul li{ + position: relative; + display: inline; + float: left; +} + +/*Top level menu link items style*/ +.ddsmoothmenu ul li a { + display: block; + padding: 0 30px; + height: 40px; + line-height: 40px; + font-size: 12px; + color: #2f2f2f; + text-decoration: none; + outline: none; + text-align: center; +} + +* html .ddsmoothmenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/ +display: inline-block; +} + +.ddsmoothmenu ul li a.selected, .ddsmoothmenu ul li a:hover { /*CSS class that's dynamically added to the currently active menu items' LI A element*/ + color: #fff; + background: #2f2f2f; +} + +/*1st sub level menu*/ +.ddsmoothmenu ul li ul { + position: absolute; + left: 0; + padding: 10px 0 0; + display: none; /*collapse all sub menus to begin with*/ + visibility: hidden; + background: #313131; + border-bottom: 4px solid #000 +} + +/*Sub level menu list items (undo style from Top level List Items)*/ +.ddsmoothmenu ul li ul li{ +display: list-item; +float: none; +} + +/*All subsequent sub menu levels vertical offset after 1st level sub menu */ +.ddsmoothmenu ul li ul li ul{ +top: 0; +} + +/* Sub level menu links style */ +.ddsmoothmenu ul li ul li a{ + font-weight: 400; + width: 130px; /*width of sub menus*/ + height: 30px; + padding: 0 30px; + line-height: 30px; + font-size: 11px; + text-align: left; + background: none; + color: #ccc; + border-bottom: 1px solid #222; + border-top: 1px solid #444; +} + +.ddsmoothmenu ul li ul li a.selected, .ddsmoothmenu ul li ul li a:hover { + color: #fff; + font-weight: 700; + background: #222; +} + +/* Holly Hack for IE \*/ +* html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/ + + +/* ######### CSS classes applied to down and right arrow images ######### */ + +.downarrowclass{ +position: absolute; +top: 12px; +right: 7px; +} + +.rightarrowclass{ +position: absolute; +top: 6px; +right: 5px; +} + +/* ######### CSS for shadow added to sub menus ######### */ + +.ddshadow{ +position: absolute; +left: 0; +top: 0; +width: 0; +height: 0; +} + +.toplevelshadow{ /*shadow opacity. Doesn't work in IE*/ +opacity: 0.5; +} + +/* menu */ diff --git a/WebContent/css/layout.css b/WebContent/css/layout.css new file mode 100644 index 0000000..3bfb524 --- /dev/null +++ b/WebContent/css/layout.css @@ -0,0 +1,43 @@ +*{ + margin:0; + padding:0; +} +body { + background-color:#eee; + font:14px/1.3 Arial,sans-serif; +} +header { + background-color:#212121; + box-shadow: 0 -1px 2px #111111; + color:#fff; + display:block; + height:70px; + position:relative; + width:100%; + z-index:100; +} +header h2{ + font-size:22px; + font-weight:normal; + left:50%; + margin-left:-400px; + padding:22px 0; + position:absolute; + width:540px; +} +header a.stuts,a.stuts:visited{ + border:none; + text-decoration:none; + color:#fcfcfc; + font-size:14px; + left:50%; + line-height:31px; + margin:23px 0 0 110px; + position:absolute; + top:0; +} +header .stuts span { + font-size:22px; + font-weight:bold; + margin-left:5px; +} \ No newline at end of file diff --git a/WebContent/css/modal.css b/WebContent/css/modal.css new file mode 100644 index 0000000..3b34009 --- /dev/null +++ b/WebContent/css/modal.css @@ -0,0 +1,143 @@ +.main { + background: #aaa url(../images/bg.jpg) no-repeat; + width: 800px; + height: 600px; + margin: 50px auto; +} +.panel { + background-color: #444; + height: 34px; + padding: 10px; +} +.panel a#login_pop, .panel a#join_pop { + border: 2px solid #aaa; + color: #fff; + display: block; + float: right; + margin-right: 10px; + padding: 5px 10px; + text-decoration: none; + text-shadow: 1px 1px #000; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; +} +a#login_pop:hover, a#join_pop:hover { + border-color: #eee; +} +.overlay { + background-color: rgba(0, 0, 0, 0.6); + bottom: 0; + cursor: default; + left: 0; + opacity: 0; + position: fixed; + right: 0; + top: 0; + visibility: hidden; + z-index: 1; + + -webkit-transition: opacity .5s; + -moz-transition: opacity .5s; + -ms-transition: opacity .5s; + -o-transition: opacity .5s; + transition: opacity .5s; +} +.overlay:target { + visibility: visible; + opacity: 1; +} +.popup { + background-color: #fff; + border: 3px solid #fff; + display: inline-block; + left: 50%; + opacity: 0; + padding: 15px; + position: fixed; + text-align: justify; + top: 40%; + visibility: hidden; + z-index: 10; + + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + -o-border-radius: 10px; + border-radius: 10px; + + -webkit-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset; + -moz-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset; + -ms-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset; + -o-box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset; + box-shadow: 0 1px 1px 2px rgba(0, 0, 0, 0.4) inset; + + -webkit-transition: opacity .5s, top .5s; + -moz-transition: opacity .5s, top .5s; + -ms-transition: opacity .5s, top .5s; + -o-transition: opacity .5s, top .5s; + transition: opacity .5s, top .5s; +} +.overlay:target+.popup { + top: 50%; + opacity: 1; + visibility: visible; +} +.close { + background-color: rgba(0, 0, 0, 0.8); + height: 30px; + line-height: 30px; + position: absolute; + right: 0; + text-align: center; + text-decoration: none; + top: -15px; + width: 30px; + + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + -ms-border-radius: 15px; + -o-border-radius: 15px; + border-radius: 15px; +} +.close:before { + color: rgba(255, 255, 255, 0.9); + content: "X"; + font-size: 24px; + text-shadow: 0 -1px rgba(0, 0, 0, 0.9); +} +.close:hover { + background-color: rgba(64, 128, 128, 0.8); +} +.popup p, .popup div { + margin-bottom: 10px; +} +.popup label { + display: inline-block; + text-align: left; + width: 120px; +} +.popup input[type="text"], .popup input[type="password"] { + border: 1px solid; + border-color: #999 #ccc #ccc; + margin: 0; + padding: 2px; + + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; +} +.popup input[type="text"]:hover, .popup input[type="password"]:hover { + border-color: #555 #888 #888; +} \ No newline at end of file diff --git a/WebContent/detail.jsp b/WebContent/detail.jsp new file mode 100644 index 0000000..a9d261e --- /dev/null +++ b/WebContent/detail.jsp @@ -0,0 +1,19 @@ +<%@page import="bean.Barang"%> + +<% Barang br = (Barang) request.getAttribute("selected"); %> + +

<% out.print(br.getNama_barang()); %>


'; + <% + out.println("
"); + out.println("

Deskripsi :

"+br.getKeterangan()+"


"); + out.println("Request tambahan :
"); + %> +
+
+ + Quantity :
+ +
+
'; + + \ No newline at end of file diff --git a/WebContent/editbarang.jsp b/WebContent/editbarang.jsp new file mode 100644 index 0000000..c5c894c --- /dev/null +++ b/WebContent/editbarang.jsp @@ -0,0 +1,43 @@ +<%@page import="java.util.ArrayList"%> +<%@page import="bean.Barang"%> + + + +<% + if (session.getAttribute("role")!= null) { + if (session.getAttribute("role").equals("admin")){ +%> +
+

Edit Barang

+
+ + + Kategori Barang :
+

+ +
+
+<% if (request.getAttribute("barang") != null) { %> +

Daftar barang :

+ <% + ArrayList barang = (ArrayList)request.getAttribute("barang"); + for (int i = 0; i < barang.size(); i++){ + out.println("Nama : "+barang.get(i).getNama_barang()); + } + %> +<% } %> +<% + } else { + out.println("

You must logged on as Admin

"); + } + } else { + out.println("

403 Forbidden

"); + } +%> + \ No newline at end of file diff --git a/WebContent/editbarangkategori.jsp b/WebContent/editbarangkategori.jsp new file mode 100644 index 0000000..7b4dd6c --- /dev/null +++ b/WebContent/editbarangkategori.jsp @@ -0,0 +1,70 @@ +<%@page import="bean.Barang"%> +<%@page import="java.util.ArrayList"%> + +<% + ArrayList barang = (ArrayList) request + .getAttribute("barang"); + int pages = Integer.parseInt(request.getParameter("page")); + String id = request.getParameter("id"); + String order = request.getParameter("order"); + int n_item = 30; +%> +
+ <% + for (int i = 0; i < barang.size(); i++) { + %> +
+

+ <% out.println(barang.get(i).getNama_barang());%> +

+ + + +

+ Harga : Rp + <% out.print(barang.get(i).getHarga_barang()); %>
+ Stok : + <% out.print(barang.get(i).getStok()); %>
+

+ +
+
+

+
+
+
+ + +
+

+
+ + <% + } + %> + + <% + if (pages == 1) { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else if (pages >= n_item/10) { + out.println("
  • <<

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + out.println("
  • <<

  • "); + } + out.println("

    Sort By :

    "); + out.println("
  • Nama Barang

  • "); + out.println("
  • Harga Barang

  • "); + %> + +
    + \ No newline at end of file diff --git a/WebContent/editprofile.jsp b/WebContent/editprofile.jsp new file mode 100644 index 0000000..ad0b725 --- /dev/null +++ b/WebContent/editprofile.jsp @@ -0,0 +1,175 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + +<%@page import="bean.DatabaseAccess"%> +<%@page import="java.sql.ResultSet"%> + + +<% // Validasi SESSION +if (session.getAttribute("username") == null){ + out.println("

    Login dulu bos

    "); +} else { + String fullname = null; + String password = null; + String phonenum = null; + String address = null; + String province = null; + String state = null; + String postalcode = null; + + DatabaseAccess dbAccess = new DatabaseAccess(); + String SQL = "SELECT * FROM `user` WHERE username = '" + session.getAttribute("username") + "'"; + System.out.println(SQL); + ResultSet rs = dbAccess.doQuery(SQL); + while (rs.next()) { + fullname = rs.getObject(2).toString(); + password = rs.getObject(3).toString(); + phonenum = rs.getObject(5).toString(); + address = rs.getObject(6).toString(); + province = rs.getObject(7).toString(); + state = rs.getObject(8).toString(); + postalcode = rs.getObject(9).toString(); + } +%> +
    + Change Password: +
    +
    Confirm Password: +
    +
    Nama Lengkap: +
    +
    Nomor Hand Phone: +
    +
    Alamat : +
    Provinsi : +
    Kecamatan : +
    Kode Pos : +
    +
    +
    +<% } %> + + \ No newline at end of file diff --git a/WebContent/footer.jsp b/WebContent/footer.jsp new file mode 100644 index 0000000..6a6b888 --- /dev/null +++ b/WebContent/footer.jsp @@ -0,0 +1,14 @@ +
    + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/header.jsp b/WebContent/header.jsp new file mode 100644 index 0000000..05a11f7 --- /dev/null +++ b/WebContent/header.jsp @@ -0,0 +1,138 @@ +<%@page import="java.util.ArrayList"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +RUko SERba imBA + + + + + + + + +
    +
    +
    + <% + if (session.getAttribute("username") == null) { + out.print(""); + } else { + out.print(""); + } + %> +
    +

    +
    +
    +
    + + +
    +
    + +
    +
    + +
    + + + + + +
    + + + \ No newline at end of file diff --git a/WebContent/images/AJS_body.jpg b/WebContent/images/AJS_body.jpg new file mode 100644 index 0000000..aa5fa81 Binary files /dev/null and b/WebContent/images/AJS_body.jpg differ diff --git a/WebContent/images/AJS_body_top.jpg b/WebContent/images/AJS_body_top.jpg new file mode 100644 index 0000000..5473868 Binary files /dev/null and b/WebContent/images/AJS_body_top.jpg differ diff --git a/WebContent/images/AJS_footer.png b/WebContent/images/AJS_footer.png new file mode 100644 index 0000000..00b2429 Binary files /dev/null and b/WebContent/images/AJS_footer.png differ diff --git a/WebContent/images/AJS_header_bg.png b/WebContent/images/AJS_header_bg.png new file mode 100644 index 0000000..d828f3e Binary files /dev/null and b/WebContent/images/AJS_header_bg.png differ diff --git a/WebContent/images/AJS_list.png b/WebContent/images/AJS_list.png new file mode 100644 index 0000000..549acc8 Binary files /dev/null and b/WebContent/images/AJS_list.png differ diff --git a/WebContent/images/AJS_logo.png b/WebContent/images/AJS_logo.png new file mode 100644 index 0000000..fd9a554 Binary files /dev/null and b/WebContent/images/AJS_logo.png differ diff --git a/WebContent/images/AJS_main_bg.png b/WebContent/images/AJS_main_bg.png new file mode 100644 index 0000000..9c0179a Binary files /dev/null and b/WebContent/images/AJS_main_bg.png differ diff --git a/WebContent/images/AJS_menubar.png b/WebContent/images/AJS_menubar.png new file mode 100644 index 0000000..82aca7b Binary files /dev/null and b/WebContent/images/AJS_menubar.png differ diff --git a/WebContent/images/AJS_search_bg.png b/WebContent/images/AJS_search_bg.png new file mode 100644 index 0000000..c8029bf Binary files /dev/null and b/WebContent/images/AJS_search_bg.png differ diff --git a/WebContent/images/AJS_sidebar_header.png b/WebContent/images/AJS_sidebar_header.png new file mode 100644 index 0000000..4e7c41a Binary files /dev/null and b/WebContent/images/AJS_sidebar_header.png differ diff --git a/WebContent/images/ArsenalA.png b/WebContent/images/ArsenalA.png new file mode 100644 index 0000000..baad746 Binary files /dev/null and b/WebContent/images/ArsenalA.png differ diff --git a/WebContent/images/ArsenalH.png b/WebContent/images/ArsenalH.png new file mode 100644 index 0000000..aad85c7 Binary files /dev/null and b/WebContent/images/ArsenalH.png differ diff --git a/WebContent/images/Ayam.png b/WebContent/images/Ayam.png new file mode 100644 index 0000000..e4ccc54 Binary files /dev/null and b/WebContent/images/Ayam.png differ diff --git a/WebContent/images/BarcaA.png b/WebContent/images/BarcaA.png new file mode 100644 index 0000000..c55aab0 Binary files /dev/null and b/WebContent/images/BarcaA.png differ diff --git a/WebContent/images/BarcaH.png b/WebContent/images/BarcaH.png new file mode 100644 index 0000000..f69a5bf Binary files /dev/null and b/WebContent/images/BarcaH.png differ diff --git a/WebContent/images/Beras.png b/WebContent/images/Beras.png new file mode 100644 index 0000000..39b63f1 Binary files /dev/null and b/WebContent/images/Beras.png differ diff --git a/WebContent/images/Bola.png b/WebContent/images/Bola.png new file mode 100644 index 0000000..1577f4f Binary files /dev/null and b/WebContent/images/Bola.png differ diff --git a/WebContent/images/ChelseaA.png b/WebContent/images/ChelseaA.png new file mode 100644 index 0000000..d2da81f Binary files /dev/null and b/WebContent/images/ChelseaA.png differ diff --git a/WebContent/images/ChelseaH.png b/WebContent/images/ChelseaH.png new file mode 100644 index 0000000..23cb7e5 Binary files /dev/null and b/WebContent/images/ChelseaH.png differ diff --git a/WebContent/images/Kompor.png b/WebContent/images/Kompor.png new file mode 100644 index 0000000..e533b40 Binary files /dev/null and b/WebContent/images/Kompor.png differ diff --git a/WebContent/images/Kursi.png b/WebContent/images/Kursi.png new file mode 100644 index 0000000..c786815 Binary files /dev/null and b/WebContent/images/Kursi.png differ diff --git a/WebContent/images/Lemari.png b/WebContent/images/Lemari.png new file mode 100644 index 0000000..115c7a1 Binary files /dev/null and b/WebContent/images/Lemari.png differ diff --git a/WebContent/images/MUA.png b/WebContent/images/MUA.png new file mode 100644 index 0000000..7243bcc Binary files /dev/null and b/WebContent/images/MUA.png differ diff --git a/WebContent/images/MUH.png b/WebContent/images/MUH.png new file mode 100644 index 0000000..452a785 Binary files /dev/null and b/WebContent/images/MUH.png differ diff --git a/WebContent/images/Meja.png b/WebContent/images/Meja.png new file mode 100644 index 0000000..c8cdcdf Binary files /dev/null and b/WebContent/images/Meja.png differ diff --git a/WebContent/images/Mesin Cuci.png b/WebContent/images/Mesin Cuci.png new file mode 100644 index 0000000..0a24dc8 Binary files /dev/null and b/WebContent/images/Mesin Cuci.png differ diff --git a/WebContent/images/Panci.png b/WebContent/images/Panci.png new file mode 100644 index 0000000..4bb244e Binary files /dev/null and b/WebContent/images/Panci.png differ diff --git a/WebContent/images/Pisau.png b/WebContent/images/Pisau.png new file mode 100644 index 0000000..c97a7a4 Binary files /dev/null and b/WebContent/images/Pisau.png differ diff --git a/WebContent/images/Radio.png b/WebContent/images/Radio.png new file mode 100644 index 0000000..d33d75b Binary files /dev/null and b/WebContent/images/Radio.png differ diff --git a/WebContent/images/Raket.png b/WebContent/images/Raket.png new file mode 100644 index 0000000..3156970 Binary files /dev/null and b/WebContent/images/Raket.png differ diff --git a/WebContent/images/RealA.png b/WebContent/images/RealA.png new file mode 100644 index 0000000..f5cdac2 Binary files /dev/null and b/WebContent/images/RealA.png differ diff --git a/WebContent/images/RealH.png b/WebContent/images/RealH.png new file mode 100644 index 0000000..fac020a Binary files /dev/null and b/WebContent/images/RealH.png differ diff --git a/WebContent/images/Sapi.png b/WebContent/images/Sapi.png new file mode 100644 index 0000000..191d3a9 Binary files /dev/null and b/WebContent/images/Sapi.png differ diff --git a/WebContent/images/SenarRaket.png b/WebContent/images/SenarRaket.png new file mode 100644 index 0000000..23c5b87 Binary files /dev/null and b/WebContent/images/SenarRaket.png differ diff --git a/WebContent/images/SepatuBadminton.png b/WebContent/images/SepatuBadminton.png new file mode 100644 index 0000000..b65e750 Binary files /dev/null and b/WebContent/images/SepatuBadminton.png differ diff --git a/WebContent/images/SepatuFutsal.png b/WebContent/images/SepatuFutsal.png new file mode 100644 index 0000000..68c11d7 Binary files /dev/null and b/WebContent/images/SepatuFutsal.png differ diff --git a/WebContent/images/ShuttleCock.png b/WebContent/images/ShuttleCock.png new file mode 100644 index 0000000..2e2833f Binary files /dev/null and b/WebContent/images/ShuttleCock.png differ diff --git a/WebContent/images/Siomay.png b/WebContent/images/Siomay.png new file mode 100644 index 0000000..bac42cd Binary files /dev/null and b/WebContent/images/Siomay.png differ diff --git a/WebContent/images/Tahu.png b/WebContent/images/Tahu.png new file mode 100644 index 0000000..e155d5f Binary files /dev/null and b/WebContent/images/Tahu.png differ diff --git a/WebContent/images/Tempe.png b/WebContent/images/Tempe.png new file mode 100644 index 0000000..98e1ff2 Binary files /dev/null and b/WebContent/images/Tempe.png differ diff --git a/WebContent/images/Thumbs.db b/WebContent/images/Thumbs.db new file mode 100644 index 0000000..b6ebb1c Binary files /dev/null and b/WebContent/images/Thumbs.db differ diff --git a/WebContent/images/arrows.png b/WebContent/images/arrows.png new file mode 100644 index 0000000..8f562bd Binary files /dev/null and b/WebContent/images/arrows.png differ diff --git a/WebContent/images/bullets.png b/WebContent/images/bullets.png new file mode 100644 index 0000000..5b5ce73 Binary files /dev/null and b/WebContent/images/bullets.png differ diff --git a/WebContent/images/cutbray.png b/WebContent/images/cutbray.png new file mode 100644 index 0000000..616d041 Binary files /dev/null and b/WebContent/images/cutbray.png differ diff --git a/WebContent/images/hairdrier.png b/WebContent/images/hairdrier.png new file mode 100644 index 0000000..c20ba9a Binary files /dev/null and b/WebContent/images/hairdrier.png differ diff --git a/WebContent/images/hp.png b/WebContent/images/hp.png new file mode 100644 index 0000000..a94bd8f Binary files /dev/null and b/WebContent/images/hp.png differ diff --git a/WebContent/images/jaket.png b/WebContent/images/jaket.png new file mode 100644 index 0000000..954a567 Binary files /dev/null and b/WebContent/images/jaket.png differ diff --git a/WebContent/images/jeanspendek.png b/WebContent/images/jeanspendek.png new file mode 100644 index 0000000..616d041 Binary files /dev/null and b/WebContent/images/jeanspendek.png differ diff --git a/WebContent/images/jeanspjg.png b/WebContent/images/jeanspjg.png new file mode 100644 index 0000000..616d041 Binary files /dev/null and b/WebContent/images/jeanspjg.png differ diff --git a/WebContent/images/kaos.png b/WebContent/images/kaos.png new file mode 100644 index 0000000..4ede951 Binary files /dev/null and b/WebContent/images/kaos.png differ diff --git a/WebContent/images/laptop.png b/WebContent/images/laptop.png new file mode 100644 index 0000000..724f211 Binary files /dev/null and b/WebContent/images/laptop.png differ diff --git a/WebContent/images/loading.gif b/WebContent/images/loading.gif new file mode 100644 index 0000000..f864d5f Binary files /dev/null and b/WebContent/images/loading.gif differ diff --git a/WebContent/images/logo.png b/WebContent/images/logo.png new file mode 100644 index 0000000..dcd55dd Binary files /dev/null and b/WebContent/images/logo.png differ diff --git a/WebContent/images/nextlabel.gif b/WebContent/images/nextlabel.gif new file mode 100644 index 0000000..6c40e51 Binary files /dev/null and b/WebContent/images/nextlabel.gif differ diff --git a/WebContent/images/paypal.gif b/WebContent/images/paypal.gif new file mode 100644 index 0000000..f45b632 Binary files /dev/null and b/WebContent/images/paypal.gif differ diff --git a/WebContent/images/powerbank.png b/WebContent/images/powerbank.png new file mode 100644 index 0000000..951660e Binary files /dev/null and b/WebContent/images/powerbank.png differ diff --git a/WebContent/images/prevlabel.gif b/WebContent/images/prevlabel.gif new file mode 100644 index 0000000..51a31c2 Binary files /dev/null and b/WebContent/images/prevlabel.gif differ diff --git a/WebContent/images/remove_x.gif b/WebContent/images/remove_x.gif new file mode 100644 index 0000000..831541d Binary files /dev/null and b/WebContent/images/remove_x.gif differ diff --git a/WebContent/images/rompi.png b/WebContent/images/rompi.png new file mode 100644 index 0000000..6cc2841 Binary files /dev/null and b/WebContent/images/rompi.png differ diff --git a/WebContent/images/skinny.png b/WebContent/images/skinny.png new file mode 100644 index 0000000..616d041 Binary files /dev/null and b/WebContent/images/skinny.png differ diff --git a/WebContent/images/tv.png b/WebContent/images/tv.png new file mode 100644 index 0000000..235d6a6 Binary files /dev/null and b/WebContent/images/tv.png differ diff --git a/WebContent/index.jsp b/WebContent/index.jsp new file mode 100644 index 0000000..bc11707 --- /dev/null +++ b/WebContent/index.jsp @@ -0,0 +1,3 @@ + + + diff --git a/WebContent/js/ddsmoothmenu.js b/WebContent/js/ddsmoothmenu.js new file mode 100644 index 0000000..db3078e --- /dev/null +++ b/WebContent/js/ddsmoothmenu.js @@ -0,0 +1,137 @@ +//** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com +//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/ +//** Menu created: Nov 12, 2008 + +//** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level) contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth + +//** Feb 11th, 09" (v1.02): The currently active main menu item (LI A) now gets a CSS class of ".selected", including sub menu items. + +//** May 1st, 09" (v1.3): +//** 1) Now supports vertical (side bar) menu mode- set "orientation" to 'v' +//** 2) In IE6, shadows are now always disabled + +//** July 27th, 09" (v1.31): Fixed bug so shadows can be disabled if desired. +//** Feb 2nd, 10" (v1.4): Adds ability to specify delay before sub menus appear and disappear, respectively. See showhidedelay variable below + +var ddsmoothmenu={ + +//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs): +arrowimages: {down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']}, +transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds +shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow? +showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively + +///////Stop configuring beyond here/////////////////////////// + +detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc) +detectie6: document.all && !window.XMLHttpRequest, + +getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs + var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu + $menucontainer.html("Loading Menu...") + $.ajax({ + url: setting.contentsource[1], //path to external menu file + async: true, + error:function(ajaxrequest){ + $menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText) + }, + success:function(content){ + $menucontainer.html(content) + ddsmoothmenu.buildmenu($, setting) + } + }) +}, + + +buildmenu:function($, setting){ + var smoothmenu=ddsmoothmenu + var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL + $mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu" + var $headers=$mainmenu.find("ul").parent() + $headers.hover( + function(e){ + $(this).children('a:eq(0)').addClass('selected') + }, + function(e){ + $(this).children('a:eq(0)').removeClass('selected') + } + ) + $headers.each(function(i){ //loop through each LI header + var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header + var $subul=$(this).find('ul:eq(0)').css({display:'block'}) + $subul.data('timers', {}) + this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()} + this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header? + $subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0}) + if (smoothmenu.shadow.enable){ + this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets + if (this.istopheader) + $parentshadow=$(document.body) + else{ + var $parentLi=$curobj.parents("li:eq(0)") + $parentshadow=$parentLi.get(0).$shadow + } + this.$shadow=$('
    ').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'}) //insert shadow DIV and set it to parent node for the next shadow div + } + $curobj.hover( + function(e){ + var $targetul=$subul //reference UL to reveal + var header=$curobj.get(0) //reference header LI as DOM object + clearTimeout($targetul.data('timers').hidetimer) + $targetul.data('timers').showtimer=setTimeout(function(){ + header._offsets={left:$curobj.offset().left, top:$curobj.offset().top} + var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w + menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent + if ($targetul.queue().length<=1){ //if 1 or less queued animations + $targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime) + if (smoothmenu.shadow.enable){ + var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft + var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y + if (!header.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full + header.$shadow.css({opacity:1}) + } + header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime) + } + } + }, ddsmoothmenu.showhidedelay.showdelay) + }, + function(e){ + var $targetul=$subul + var header=$curobj.get(0) + clearTimeout($targetul.data('timers').showtimer) + $targetul.data('timers').hidetimer=setTimeout(function(){ + $targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime) + if (smoothmenu.shadow.enable){ + if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them + header.$shadow.children('div:eq(0)').css({opacity:0}) + } + header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime) + } + }, ddsmoothmenu.showhidedelay.hidedelay) + } + ) //end hover + }) //end $headers.each() + $mainmenu.find("ul").css({display:'none', visibility:'visible'}) +}, + +init:function(setting){ + if (typeof setting.customtheme=="object" && setting.customtheme.length==2){ //override default menu colors (default/hover) with custom set? + var mainmenuid='#'+setting.mainmenuid + var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid + document.write('') + } + this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow + jQuery(document).ready(function($){ //ajax menu? + if (typeof setting.contentsource=="object"){ //if external ajax menu + ddsmoothmenu.getajaxmenu($, setting) + } + else{ //else if markup menu + ddsmoothmenu.buildmenu($, setting) + } + }) +} + +} //end ddsmoothmenu variable diff --git a/WebContent/js/jquery-1.4.3.min.js b/WebContent/js/jquery-1.4.3.min.js new file mode 100644 index 0000000..c941a5f --- /dev/null +++ b/WebContent/js/jquery-1.4.3.min.js @@ -0,0 +1,166 @@ +/*! + * jQuery JavaScript Library v1.4.3 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Oct 14 23:10:06 2010 -0400 + */ +(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;nd)break;a.currentTarget=f.elem;a.data=f.handleObj.data; +a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b, +e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)} +function ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)? +e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a, +1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false, +q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i= +[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i); +else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ": +"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r, +y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready, +1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i== +null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i); +if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()=== +r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div"); +s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="
    ";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="
    t
    ";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight=== +0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength", +cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]= +c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b= +c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e=== +"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c.data(a,b);if(!d)return e|| +[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this, +a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this, +a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d-1)return true;return false}, +val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&& +h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l=== +"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[]; +if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b|| +typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h=0){a.type= +f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)=== +false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e; +d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= +A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]=== +0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,j,o,m,p,q){p=0;for(var t=m.length;p0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3]; +break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr, +t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= +k;g.sort(w);if(h)for(var j=1;j0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o, +m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return jo[3]-0},nth:function(g,j,o){return o[3]- +0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]]; +if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o, +g);else if(typeof g.length==="number")for(var p=g.length;m";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g); +o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&& +function(){var g=l,j=u.createElement("div");j.innerHTML="

    ";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o]; +j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== +0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g, +j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p0)for(var h=d;h0},closest:function(a, +b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h|| +!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}}); +c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling", +d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}}); +c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var xa=/ jQuery\d+="(?:\d+|null)"/g, +$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/\s]+\/)>/g,O={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "], +area:[1,"",""],_default:[0,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this, +d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})}, +unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= +c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*")); +c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($, +"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone|| +!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h= +d.length;f0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default, +s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]===""&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&& +c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]? +c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this; +return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]|| +h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]= +e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"": +b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b], +h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/)<[^<]*)*<\/script>/gi, +mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d= +b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("
    ").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src= +b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+ +"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a, +b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag"); +if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr= +function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a= +0;for(b=this.length;a=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)} +this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/WebContent/js/jquery.min.js b/WebContent/js/jquery.min.js new file mode 100644 index 0000000..b1ae21d --- /dev/null +++ b/WebContent/js/jquery.min.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"
    ","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/WebContent/kategori.jsp b/WebContent/kategori.jsp new file mode 100644 index 0000000..1b15d88 --- /dev/null +++ b/WebContent/kategori.jsp @@ -0,0 +1,71 @@ +<%@page import="bean.Barang"%> +<%@page import="java.util.ArrayList"%> + +<% + ArrayList barang = (ArrayList) request + .getAttribute("barang"); + int pages = Integer.parseInt(request.getParameter("page")); + String id = request.getParameter("id"); + String order = request.getParameter("order"); + int n_item = 30; +%> +
    + <% + for (int i = 0; i < barang.size(); i++) { + %> +
    +

    + <% + out.println(barang.get(i).getNama_barang()); + %> +

    + + + +

    + Harga : Rp + <% + out.print(barang.get(i).getHarga_barang()); + %>
    Stok : + <% + out.print(barang.get(i).getStok()); + %> +
    +

    + Quantity +
    +

    +
    + <% + } + %> + + <% + if (pages == 1) { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else if (pages >= n_item/10) { + out.println("
  • <<

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + out.println("
  • <<

  • "); + } + out.println("

    Sort By :

    "); + out.println("
  • Nama Barang

  • "); + out.println("
  • Harga Barang

  • "); + %> + +
    + \ No newline at end of file diff --git a/WebContent/listbarang.jsp b/WebContent/listbarang.jsp new file mode 100644 index 0000000..8d769c9 --- /dev/null +++ b/WebContent/listbarang.jsp @@ -0,0 +1,111 @@ +<%@page import="bean.Barang"%> +<%@page import="java.util.ArrayList"%> +<% + ArrayList pangan = (ArrayList) request.getAttribute("pangan"); + ArrayList pakaian = (ArrayList) request.getAttribute("pakaian"); + ArrayList elektronik = (ArrayList) request.getAttribute("elektronik"); + ArrayList rumahtangga = (ArrayList) request.getAttribute("rumahtangga"); + ArrayList olahraga = (ArrayList) request.getAttribute("olahraga"); +%> + +
    +<% if (pangan!=null) { %> +

    TOP Pangan

    + <% for (int x = 0; x < 3; x++) { %> +
    +

    <% out.print(pangan.get(x).getNama_barang()); %>

    + + +

    + Harga : Rp <% out.print(pangan.get(x).getHarga_barang()); %>
    + Stok : <% out.print(pangan.get(x).getStok()); %>
    +

    + + Quantity + + +
    +

    +
    + <% } %> +

    TOP Pakaian

    + <% for (int x = 0; x < 3; x++) { %> +
    +

    <% out.print(pakaian.get(x).getNama_barang()); %>

    + + +

    + Harga : Rp <% out.print(pakaian.get(x).getHarga_barang()); %>
    + Stok : <% out.print(pakaian.get(x).getStok()); %>
    +

    + + Quantity + + +
    +

    +
    + <% } %> +

    TOP Elektronik

    + <% for (int x = 0; x < 3; x++) { %> +
    +

    <% out.print(elektronik.get(x).getNama_barang()); %>

    + + +

    + Harga : Rp <% out.print(elektronik.get(x).getHarga_barang()); %>
    + Stok : <% out.print(elektronik.get(x).getStok()); %>
    +

    + + Quantity + + +
    +

    +
    + <% } %> + +

    TOP Rumah Tangga

    + <% for (int x = 0; x < 3; x++) { %> +
    +

    <% out.print(rumahtangga.get(x).getNama_barang()); %>

    + + +

    + Harga : Rp <% out.print(rumahtangga.get(x).getHarga_barang()); %>
    + Stok : <% out.print(rumahtangga.get(x).getStok()); %>
    +

    + + Quantity + + +
    +

    +
    + <% } %> +

    TOP Olahraga

    + <% for (int x = 0; x < 3; x++) { %> +
    +

    <% out.print(olahraga.get(x).getNama_barang()); %>

    + + +

    + Harga : Rp <% out.print(olahraga.get(x).getHarga_barang()); %>
    + Stok : <% out.print(olahraga.get(x).getStok()); %>
    +

    + + Quantity + + +
    +

    +
    + <% } %> +<% } %> +
    + diff --git a/WebContent/loginresponse.jsp b/WebContent/loginresponse.jsp new file mode 100644 index 0000000..2f5a00d --- /dev/null +++ b/WebContent/loginresponse.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +

    + ANDA + <% + if (((String) request.getAttribute("status")).equals("berhasil")) { + out.println("Berhasil login, silahkan tunggu 3 detik."); + out.print("Jika tidak ada respon, close aja browsernya, cacad tuh!!!"); + } else { + out.print(" Gagal Login"); + } + //allow access only if session exists + + String user = null; + if (session.getAttribute("username") == null) { + System.out.println("Nggak ada session"); + } else { + user = (String) session.getAttribute("username"); + System.out.println("YESS ADA SESSION"); + } + response.sendRedirect("/ruko/"); + %> +

    + + \ No newline at end of file diff --git a/WebContent/logout.jsp b/WebContent/logout.jsp new file mode 100644 index 0000000..98dd163 --- /dev/null +++ b/WebContent/logout.jsp @@ -0,0 +1,10 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<% + if(session.getAttribute("username")!=null){ + System.out.println("emang udah login nih"); + session.setAttribute("IT", null); + session.invalidate(); + } + response.sendRedirect("/ruko/"); +%> diff --git a/WebContent/profile.jsp b/WebContent/profile.jsp new file mode 100644 index 0000000..730b5ae --- /dev/null +++ b/WebContent/profile.jsp @@ -0,0 +1,23 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + +<% + if (session.getAttribute("username") != null) { + out.print("

    " + request.getAttribute("fullname") + "

    "); + out.print("

    Nama :" + request.getAttribute("username") + + "

    "); + out.print("

    No.HP :" + request.getAttribute("mobile") + + "

    "); + out.print("

    Alamat :" + request.getAttribute("address") + + "

    "); + out.print("

    Provinsi :" + request.getAttribute("province") + + "

    "); + out.print("

    Kota :" + request.getAttribute("state") + "

    "); + out.print("

    Kode Pos :" + request.getAttribute("postalcode") + + "

    "); + out.print(" Edit Profile "); + } else { + out.println("

    Login dulu bos

    "); + } +%> + \ No newline at end of file diff --git a/WebContent/progin_13511021.sql b/WebContent/progin_13511021.sql new file mode 100644 index 0000000..822924d --- /dev/null +++ b/WebContent/progin_13511021.sql @@ -0,0 +1,255 @@ +-- phpMyAdmin SQL Dump +-- version 4.0.4.1 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Generation Time: Nov 27, 2013 at 10:16 AM +-- Server version: 5.6.11 +-- PHP Version: 5.5.3 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `progin_13511021` +-- +CREATE DATABASE IF NOT EXISTS `progin_13511021` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; +USE `progin_13511021`; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `barang` +-- + +CREATE TABLE IF NOT EXISTS `barang` ( + `id_barang` varchar(10) NOT NULL DEFAULT '', + `nama_barang` varchar(30) NOT NULL, + `gambar_barang` varchar(100) NOT NULL, + `harga_barang` int(11) NOT NULL, + `kategori_barang` int(11) NOT NULL, + `n_beli` int(100) NOT NULL, + `keterangan` varchar(500) NOT NULL, + `stok` int(10) NOT NULL, + PRIMARY KEY (`id_barang`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `barang` +-- + +INSERT INTO `barang` (`id_barang`, `nama_barang`, `gambar_barang`, `harga_barang`, `kategori_barang`, `n_beli`, `keterangan`, `stok`) VALUES +('101', 'Tahu Sumedang', './images/Tahu.png', 1000, 1, 10, 'tahu dari sumedang. wuenak', 10), +('102', 'Tahu Bandung', './images/Tahu.png', 2000, 1, 9, 'tahu dari Bandung. wuenak', 10), +('103', 'Tahu Medan', './images/Tahu.png', 3000, 1, 8, 'tahu dari Medan. wuenak', 10), +('104', 'Tahu Palembang', './images/Tahu.png', 4000, 1, 7, 'tahu dari Palembang. wuenak', 10), +('105', 'Tahu Jakarta', './images/Tahu.png', 5000, 1, 6, 'tahu dari Jakarta. wuenak', 10), +('106', 'Siomay Sumedang', './images/Siomay.png', 1000, 1, 11, 'Siomay dari sumedang. wuenak', 10), +('107', 'Siomay Bandung', './images/Siomay.png', 2000, 1, 19, 'Siomay dari Bandung. wuenak', 10), +('108', 'Siomay Medan', './images/Siomay.png', 3000, 1, 18, 'Siomay dari Medan. wuenak', 10), +('109', 'Siomay Palembang', './images/Siomay.png', 4000, 1, 17, 'Siomay dari Palembang. wuenak', 10), +('110', 'Siomay Jakarta', './images/Siomay.png', 5000, 1, 6, 'Siomay dari Jakarta. wuenak', 10), +('111', 'Beras Sumedang', './images/Beras.png', 10000, 1, 1, 'Beras dari sumedang. wuenak', 10), +('112', 'Beras Bandung', './images/Beras.png', 20000, 1, 9, 'Beras dari Bandung. wuenak', 10), +('113', 'Beras Medan', './images/Beras.png', 30000, 1, 8, 'Beras dari Medan. wuenak', 10), +('114', 'Beras Palembang', './images/Beras.png', 40000, 1, 7, 'Beras dari Palembang. wuenak', 10), +('115', 'Beras Jakarta', './images/Beras.png', 50000, 1, 6, 'Beras dari Jakarta. wuenak', 10), +('116', 'Tempe Sumedang', './images/Tempe.png', 1000, 1, 1, 'Tempe dari sumedang. wuenak', 10), +('117', 'Tempe Bandung', './images/Tempe.png', 2000, 1, 9, 'Tempe dari Bandung. wuenak', 10), +('118', 'Tempe Medan', './images/Tempe.png', 3000, 1, 8, 'Tempe dari Medan. wuenak', 10), +('119', 'Tempe Palembang', './images/Tempe.png', 4000, 1, 7, 'Tempe dari Palembang. wuenak', 10), +('120', 'Tempe Jakarta', './images/Tempe.png', 5000, 1, 6, 'Tempe dari Jakarta. wuenak', 10), +('121', 'Ayam Sumedang', './images/Ayam.png', 10000, 1, 1, 'Ayam dari sumedang. wuenak', 10), +('122', 'Ayam Bandung', './images/Ayam.png', 20000, 1, 9, 'Ayam dari Bandung. wuenak', 10), +('123', 'Ayam Medan', './images/Ayam.png', 30000, 1, 8, 'Ayam dari Medan. wuenak', 10), +('124', 'Ayam Palembang', './images/Ayam.png', 40000, 1, 7, 'Ayam dari Palembang. wuenak', 10), +('125', 'Ayam Jakarta', './images/Ayam.png', 50000, 1, 6, 'Ayam dari Jakarta. wuenak', 10), +('126', 'Sapi Sumedang', './images/Sapi.png', 1000, 1, 1, 'Sapi dari sumedang. wuenak', 10), +('127', 'Sapi Bandung', './images/Sapi.png', 2000, 1, 9, 'Sapi dari Bandung. wuenak', 10), +('128', 'Sapi Medan', './images/Sapi.png', 3000, 1, 8, 'Sapi dari Medan. wuenak', 10), +('129', 'Sapi Palembang', './images/Sapi.png', 4000, 1, 7, 'Sapi dari Palembang. wuenak', 10), +('130', 'Sapi Jakarta', './images/Sapi.png', 5000, 1, 6, 'Sapi dari Jakarta. wuenak', 10), +('201', 'jersey MU Home', './images/MUH.png', 100000, 2, 13, 'jersey MU homeyang keren KW Thailand', 5), +('202', 'jersey Chelsea Home', './images/ChelseaH.png', 75000, 2, 7, 'jersey Chelsea home yang keren KW Thailand', 10), +('203', 'jersey Barcelona Home', './images/BarcaH.png', 100000, 2, 8, 'jersey Barcelona home yang keren KW Thailand', 10), +('204', 'jersey Arsenal Home', './images/ArsenalH.png', 75000, 2, 7, 'jersey Arsenal home yang keren KW Thailand', 10), +('205', 'jersey Real Madrid H', './images/RealH.png', 100000, 2, 8, 'jersey real madrid home yang keren KW Thailand', 10), +('206', 'jersey MU away', './images/MUA.png', 100000, 2, 8, 'jersey MU away yang keren KW Thailand', 10), +('207', 'jersey Chelsea away', './images/ChelseaA.png', 75000, 2, 7, 'jersey Chelsea away yang keren KW Thailand', 10), +('208', 'jersey Barcelona away', './images/BarcaA.png', 100000, 2, 8, 'jersey Barcelona away yang keren KW Thailand', 10), +('209', 'jersey Arsenal away', './images/ArsenalA.png', 75000, 2, 7, 'jersey Arsenal away yang keren KW Thailand', 10), +('210', 'jersey Real Madrid A', './images/RealA.png', 100000, 2, 8, 'jersey real madrid away yang keren KW Thailand', 10), +('211', 'kaos1 T-Shirt ', './images/kaos.png', 75000, 2, 7, 'kaos T-shirt bergambar ...', 10), +('212', 'kaos1 T-Shirt v-neck', './images/kaos.png', 100000, 2, 8, 'kaos T-shirt bergambar ...model v-neck', 10), +('213', 'kaos2 T-Shirt', './images/kaos.png', 75000, 2, 7, 'kaos T-shirt bergambar ...', 10), +('214', 'kaos2 T-Shirt v-neck', './images/kaos.png', 100000, 2, 8, 'kaos T-shirt bergambar ...model v-neck', 10), +('215', 'kaos3 T-Shirt', './images/kaos.png', 75000, 2, 7, 'kaos T-shirt bergambar ...', 10), +('216', 'kaos3 T-Shirt v-neck', './images/kaos.png', 100000, 2, 8, 'kaos T-shirt bergambar ... model v-neck', 10), +('217', 'kaos4 T-Shirt', './images/kaos.png', 75000, 2, 7, 'kaos T-shirt bergambar ...', 10), +('218', 'kaos4 T-Shirt v-neck', './images/kaos.png', 75000, 2, 7, 'kaos T-shirt bergambar ... model v-neck', 10), +('219', 'kaos5 T-Shirt', './images/ArsenalA.png', 75000, 2, 7, 'jersey Arsenal away yang keren KW Thailand', 10), +('220', 'kaos5 T-Shirt v-neck', './images/RealA.png', 100000, 2, 8, 'jersey real madrid away yang keren KW Thailand', 10), +('221', 'jaket1 ', './images/jaket.png', 75000, 2, 7, 'jaket model 1 yang kece abis', 10), +('222', 'jaket2', './images/jaket.png', 100000, 2, 8, 'jaket model 2 yang kece abis', 10), +('223', 'jaket3', './images/jaket.png', 150000, 2, 8, 'jaket model 3 yang kece abis', 10), +('224', 'rompi1', './images/rompi.png', 100000, 2, 8, 'rompi model 1 yang kece abis', 10), +('225', 'rompi2', './images/rompi.png', 75000, 2, 7, 'rompi model 2 yang kece abis', 10), +('226', 'rompi3', './images/rompi.png', 100000, 2, 8, 'rompi model 3 yang kece abis', 10), +('227', 'jeans1 pendek', './images/jeanspendek.png', 75000, 2, 7, 'jeans pendek yang sangat gaol', 10), +('228', 'jeans2 panjang', './images/jeanspjg.png', 75000, 2, 7, 'jeans panjang yang sangat gaol', 10), +('229', 'jeans3 skinny', './images/skinny.png', 75000, 2, 7, 'jeans skinny yang sangat gaol', 10), +('230', 'jeans4 cut-bray', './images/cutbray.png', 75000, 2, 7, 'jeans cut-bray yang sangat gaol', 10), +('301', 'TV1 Sony', './images/tv.png', 500000, 3, 7, 'TV layar cembung berukuran 15 inch', 10), +('302', 'TV1 Sony flat', './images/tv.png', 1750000, 3, 7, 'TV layar flat berukuran 21 inch', 10), +('303', 'TV2 Sony', './images/tv.png', 1000000, 3, 7, 'TV layar cembung berukuran 15 inch', 10), +('304', 'TV2 Sony flat', './images/tv.png', 2500000, 3, 7, 'TV layar flat berukuran 21 inch', 10), +('305', 'TV3 LG', './images/tv.png', 2000000, 3, 7, 'TV layar flat berukuran 21 inch', 10), +('306', 'TV4 LG', './images/tv.png', 3000000, 3, 7, 'TV layar flat berukuran 28 inch', 10), +('307', 'hp Samsung', './images/hp.png', 500000, 3, 17, 'hp merk samsung yang keren ', 10), +('308', 'hp Nokia', './images/hp.png', 1750000, 3, 7, 'hp merk nokia yang sangat keren', 10), +('309', 'hp Soni', './images/hp.png', 1000000, 3, 7, 'hp merk soni yang sangat keren', 10), +('310', 'hp LG', './images/hp.png', 2500000, 3, 7, 'hp merk LG yang sangat keren', 10), +('311', 'hp Mito', './images/hp.png', 2000000, 3, 7, 'hp merk mito yang sangat keren', 10), +('312', 'hp Asus', './images/hp.png', 3000000, 3, 7, 'hp merk asus yang sangat keren', 10), +('313', 'laptop Samsung', './images/laptop.png', 500000, 3, 7, 'laptop merk samsung yang keren ', 10), +('314', 'laptop Nokia', './images/laptop.png', 1750000, 3, 7, 'laptop merk nokia yang sangat keren', 10), +('315', 'laptop Soni', './images/laptop.png', 1000000, 3, 7, 'laptop merk soni yang sangat keren', 10), +('316', 'laptop LG', './images/laptop.png', 2500000, 3, 7, 'laptop merk LG yang sangat keren', 10), +('317', 'laptop Mito', './images/laptop.png', 2000000, 3, 7, 'laptop merk mito yang sangat keren', 10), +('318', 'laptop Asus', './images/laptop.png', 3000000, 3, 7, 'laptop merk asus yang sangat keren', 10), +('319', 'hair dryer', './images/hairdrier.png', 500000, 3, 7, 'hair dryer yang dapat mengeringkan rambut anda super cepat', 10), +('320', 'power bank', './images/powerbank.png', 1750000, 3, 7, 'power bank dengan kapasitas yang besar', 10), +('321', 'Radio Sony', './images/Radio.png', 250000, 3, 12, 'Radio canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('322', 'Radio LG', './images/Radio.png', 150000, 3, 10, 'Radio canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('323', 'Radio Samsung', './images/Radio.png', 350000, 3, 16, 'Radio canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('324', 'Radio Mito', './images/Radio.png', 450000, 3, 20, 'Radio canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('325', 'Radio Cross', './images/Radio.png', 200000, 3, 35, 'Radio canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('326', 'Mesin Cuci Sony', './images/Mesin Cuci.png', 5000000, 3, 2, 'Mesin Cuci canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('327', 'Mesin Cuci LG', './images/Mesin Cuci.png', 4000000, 3, 0, 'Mesin Cuci canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('328', 'Mesin Cuci Samsung', './images/Mesin Cuci.png', 3500000, 3, 6, 'Mesin Cuci canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('329', 'Mesin Cuci Mito', './images/Mesin Cuci.png', 4500000, 3, 2, 'Mesin Cuci canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('330', 'Mesin Cuci Cross', './images/Mesin Cuci.png', 2000000, 3, 3, 'Mesin Cuci canggih, sangat cocok untuk anda yang mengikuti teknologi masa kini', 10), +('401', 'Pisau krisbow', './images/Pisau.png', 50000, 4, 6, 'Pisau kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('402', 'Pisau olympic', './images/Pisau.png', 35000, 4, 5, 'Pisau olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('403', 'Pisau index', './images/Pisau.png', 35000, 4, 4, 'Pisau index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('404', 'Pisau lionstar', './images/Pisau.png', 45000, 4, 3, 'Pisau lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('405', 'Pisau matahari', './images/Pisau.png', 75000, 4, 1, 'Pisau matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('406', 'Lemari krisbow', './images/Lemari.png', 60000, 4, 6, 'Lemari kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('407', 'Lemari olympic', './images/Lemari.png', 75000, 4, 5, 'Lemari olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('408', 'Lemari index', './images/Lemari.png', 85000, 4, 4, 'Lemari index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('409', 'Lemari lionstar', './images/Lemari.png', 55000, 4, 3, 'Lemari lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('410', 'Lemari matahari', './images/Lemari.png', 95000, 4, 1, 'Lemari matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('411', 'Kompor krisbow', './images/Kompor.png', 500000, 4, 1, 'Kompor kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('412', 'Kompor olympic', './images/Kompor.png', 350000, 4, 1, 'Kompor olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('413', 'Kompor index', './images/Kompor.png', 350000, 4, 1, 'Kompor index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('414', 'Kompor lionstar', './images/Kompor.png', 450000, 4, 2, 'Kompor lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('415', 'Kompor matahari', './images/Kompor.png', 750000, 4, 1, 'Kompor matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('416', 'Meja krisbow', './images/Meja.png', 30000, 4, 7, 'Meja kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('417', 'Meja olympic', './images/Meja.png', 25000, 4, 3, 'Meja olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('418', 'Meja index', './images/Meja.png', 55000, 4, 9, 'Meja index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('419', 'Meja lionstar', './images/Meja.png', 41000, 4, 2, 'Meja lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('420', 'Meja matahari', './images/Meja.png', 35000, 4, 9, 'Meja matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('421', 'Panci krisbow', './images/Panci.png', 50000, 4, 6, 'Panci kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('422', 'Panci olympic', './images/Panci.png', 35000, 4, 7, 'Panci olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('423', 'Panci index', './images/Panci.png', 30000, 4, 6, 'Panci index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('424', 'Panci lionstar', './images/Panci.png', 45000, 4, 3, 'Panci lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('425', 'Panci matahari', './images/Panci.png', 75000, 4, 5, 'Panci matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('426', 'Kursi krisbow', './images/Kursi.png', 15000, 4, 17, 'Kursi kribow sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('427', 'Kursi olympic', './images/Kursi.png', 20000, 4, 13, 'Kursi olyimpic sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('428', 'Kursi index', './images/Kursi.png', 25000, 4, 10, 'Kursi index sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('429', 'Kursi lionstar', './images/Kursi.png', 20000, 4, 12, 'Kursi lionstar sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('430', 'Kursi matahari', './images/Kursi.png', 17000, 4, 16, 'Kursi matahari sangat awet, sangat bagus, cocok untuk keharmonisan rumah tangga anda', 10), +('501', 'raket lingling', './images/Raket.png', 1000000, 5, 9, 'raket merk lingling sangat bagus antimaling', 10), +('502', 'raket yonex', './images/Raket.png', 1500000, 5, 6, 'raket merk yonex sangat bagus antimaling', 10), +('503', 'raket wilson', './images/Raket.png', 17500000, 5, 5, 'raket merk wilson sangat bagus antimaling', 10), +('504', 'raket astec', './images/Raket.png', 1800000, 5, 3, 'raket merk astec sangat bagus antimaling', 10), +('505', 'raket flypower', './images/Raket.png', 1200000, 5, 2, 'raket merk flypower sangat bagus antimaling', 10), +('506', 'sepatu badminton lingling', './images/SepatuBadminton.png', 100000, 5, 4, 'sepatu badminton merk lingling sangat bagus antimaling', 10), +('507', 'sepatu badminton yonex', './images/SepatuBadminton.png', 150000, 5, 2, 'sepatu badminton merk yonex sangat bagus antimaling', 10), +('508', 'sepatu badminton wilson', './images/SepatuBadminton.png', 1750000, 5, 1, 'sepatu badminton merk wilson sangat bagus antimaling', 10), +('509', 'sepatu badminton astec', './images/SepatuBadminton.png', 180000, 5, 0, 'sepatu badminton merk astec sangat bagus antimaling', 10), +('510', 'sepatu badminton flypower', './images/SepatuBadminton.png', 120000, 5, 11, 'sepatu badminton merk flypower sangat bagus antimaling', 10), +('511', 'shuttle cock lingling', './images/ShuttleCock.png', 10000, 5, 9, 'shuttle cock merk lingling sangat bagus antimaling', 10), +('512', 'shuttle cock yonex', './images/ShuttleCock.png', 15100, 5, 6, 'shuttle cock merk yonex sangat bagus antimaling', 10), +('513', 'shuttle cock wilson', './images/ShuttleCock.png', 17500, 5, 5, 'shuttle cock merk wilson sangat bagus antimaling', 10), +('514', 'shuttle cock astec', './images/ShuttleCock.png', 18000, 5, 3, 'shuttle cock merk astec sangat bagus antimaling', 10), +('515', 'shuttle cock flypower', './images/ShuttleCock.png', 12000, 5, 2, 'shuttle cock merk flypower sangat bagus antimaling', 10), +('516', 'senar raket lingling', './images/SenarRaket.png', 40000, 5, 4, 'senar raket merk lingling sangat bagus antimaling', 10), +('517', 'senar raket yonex', './images/SenarRaket.png', 50000, 5, 2, 'senar raket merk yonex sangat bagus antimaling', 10), +('518', 'senar raket wilson', './images/SenarRaket.png', 70000, 5, 1, 'senar raket merk wilson sangat bagus antimaling', 10), +('519', 'senar raket astec', './images/SenarRaket.png', 80000, 5, 0, 'senar raket merk astec sangat bagus antimaling', 10), +('520', 'senar raket flypower', './images/SenarRaket.png', 90000, 5, 11, 'senar raket merk flypower sangat bagus antimaling', 10), +('521', 'sepatu futsal lingling', './images/SepatuFutsal.png', 300000, 5, 9, 'sepatu futsal merk lingling sangat bagus antimaling', 10), +('522', 'sepatu futsal yonex', './images/SepatuFutsal.png', 452000, 5, 6, 'sepatu futsal merk yonex sangat bagus antimaling', 10), +('523', 'sepatu futsal wilson', './images/SepatuFutsal.png', 520000, 5, 5, 'sepatu futsal merk wilson sangat bagus antimaling', 10), +('524', 'sepatu futsal astec', './images/SepatuFutsal.png', 800000, 5, 3, 'sepatu futsal merk astec sangat bagus antimaling', 10), +('525', 'sepatu futsal flypower', './images/SepatuFutsal.png', 200000, 5, 2, 'sepatu futsal merk flypower sangat bagus antimaling', 10), +('526', 'bola lingling', './images/Bola.png', 40000, 5, 5, 'bola merk lingling sangat bagus antimaling', 10), +('527', 'bola yonex', './images/Bola.png', 50000, 5, 4, 'bola merk yonex sangat bagus antimaling', 10), +('528', 'bola wilson', './images/Bola.png', 70000, 5, 3, 'bola merk wilson sangat bagus antimaling', 10), +('529', 'bola astec', './images/Bola.png', 80000, 5, 2, 'bola merk astec sangat bagus antimaling', 10), +('530', 'bola flypower', './images/Bola.png', 90000, 5, 1, 'bola merk flypower sangat bagus antimaling', 10); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `creditcard` +-- + +CREATE TABLE IF NOT EXISTS `creditcard` ( + `card_id` int(11) NOT NULL, + `card_nameon` varchar(100) NOT NULL, + `card_expdate` datetime NOT NULL, + `card_owner` varchar(50) NOT NULL, + PRIMARY KEY (`card_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `creditcard` +-- + +INSERT INTO `creditcard` (`card_id`, `card_nameon`, `card_expdate`, `card_owner`) VALUES +(91, 'dasa', '2013-11-13 00:00:00', 'fathan'), +(123111, 'Yogi Salomo Mangontang Pratama', '2013-10-23 00:00:00', 'codename'), +(123355, 'pya pya', '2014-01-01 00:00:00', 'codename'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `user` +-- + +CREATE TABLE IF NOT EXISTS `user` ( + `username` varchar(25) NOT NULL, + `nama_lengkap` varchar(50) NOT NULL, + `password` varchar(16) NOT NULL, + `email` varchar(30) NOT NULL, + `handphone` int(15) NOT NULL, + `address` varchar(40) NOT NULL, + `province` text NOT NULL, + `state` text NOT NULL, + `postcode` int(10) NOT NULL, + `role` varchar(50) NOT NULL, + PRIMARY KEY (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tabel Anggota Website'; + +-- +-- Dumping data for table `user` +-- + +INSERT INTO `user` (`username`, `nama_lengkap`, `password`, `email`, `handphone`, `address`, `province`, `state`, `postcode`, `role`) VALUES +('admin', 'fathan pranaya', 'admin', 'fathan.pranaya@yahoo.com', 0, '', '', '', 0, 'admin'), +('banggapardana', 'Gerangga Anggaparaldi', 'tangga', 'tangga@bangga.com', 0, '', '', '', 0, 'user'), +('codename', 'Yogi Salomo Mangontang Pratama', '12345678', 'itu@gimal.com', 12, 'sana', 'sini', 'situ', 12345, 'user'), +('fathan', 'Fathan Adi', '123', 'fathan@gmail.com', 12345, 'beke', 'keke', 'okok', 1111, 'user'), +('pya', 'pya pya', 'pya', '1@2.com', 987, 'sana', 'sini', 'keca', 0, 'user'); + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/WebContent/registration.jsp b/WebContent/registration.jsp new file mode 100644 index 0000000..47478b7 --- /dev/null +++ b/WebContent/registration.jsp @@ -0,0 +1,178 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<%@page import="java.util.ArrayList"%> + + + +
    + Username: +
    +
    Password: +
    +
    Re-type Password: +
    +
    Nama Lengkap: +
    +
    Nomor Hand Phone: +
    + +
    Alamat : +
    Provinsi : +
    Kecamatan : +
    Kode Pos : +
    + +
    Email : +
    +
    +
    +
    + \ No newline at end of file diff --git a/WebContent/search.jsp b/WebContent/search.jsp new file mode 100644 index 0000000..71dec46 --- /dev/null +++ b/WebContent/search.jsp @@ -0,0 +1,81 @@ +<%@page import="bean.Barang"%> +<%@page import="java.util.ArrayList"%> + +<% + ArrayList res = (ArrayList) request.getAttribute("search_result"); + int pages = Integer.parseInt(request.getParameter("page")); + String nama_barang = request.getParameter("nama_barang"); + String kategori = request.getParameter("kategori"); + String harga = request.getParameter("harga"); + String order = request.getParameter("order"); + int n_item = Integer.parseInt(request.getAttribute("n_item").toString()); +%> +
    + <% + for (int i = 0; i < res.size(); i++) { + %> +
    +

    + <% + out.println(res.get(i).getNama_barang()); + %> +

    + + + +

    + Harga : Rp + <% + out.print(res.get(i).getHarga_barang()); + %>
    Stok : + <% + out.print(res.get(i).getStok()); + %> +
    +

    + Quantity +
    +

    +
    + <% + } + %> + + <% + if(n_item > 10) { + if (pages == 1) { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else if (pages >= n_item/10) { + out.println("
  • <<

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + } else { + out.println("
  • Berikutnya>>>

  • "); + for (int x=1;x<=n_item/10;x++) { + out.println("
  • "+x+"

  • "); + } + out.println("
  • <<

  • "); + } + out.println("

    Sort By :

    "); + out.println("
  • Nama Barang

  • "); + out.println("
  • Harga Barang

  • "); + } + %> + +
    + \ No newline at end of file diff --git a/WebContent/shoppingbag.jsp b/WebContent/shoppingbag.jsp new file mode 100644 index 0000000..b75f986 --- /dev/null +++ b/WebContent/shoppingbag.jsp @@ -0,0 +1,55 @@ +<%@page import="bean.Barang"%> +<%@page import="bean.Transaksi"%> +<%@page import="java.util.ArrayList"%> + + +

    Your Shopping Cart

    + +<% + ArrayList shopList = (ArrayList)request.getAttribute("arrayTransaksi"); + if (session.getAttribute("username") != null) { + ArrayList kartu = new ArrayList(); + kartu=(ArrayList) request.getAttribute("card"); + shopList = (ArrayList) session.getAttribute("IT"); + + if (shopList != null) { + int totalPengeluaran = 0; + for (int i = 0; i < shopList.size(); i++) { + totalPengeluaran += (shopList.get(i).getBarang().getHarga_barang() * shopList.get(i).getQt()); + out.print("

    " + (i + 1) + ". "+ shopList.get(i).getBarang().getNama_barang()+ "

    "); + out.print("

    Quantity : "+ shopList.get(i).getQt() + "

    "); + out.print("

    __Total Harga ____: "+ (shopList.get(i).getBarang().getHarga_barang() * shopList.get(i).getQt()) + "

    "); + out.print("

    Request Tambahan = "+ shopList.get(i).getRequest_tambahan()+ "

    "); + } + out.print("

    Total harga barang yang Anda pesan adalah ==================================> "+ totalPengeluaran); + out.print("

    Silahkan pilih kartu kredit Anda :

    "); + out.print("
    "); + out.print("Silahkan mendaftarkan kartu kredit Anda dahulu"); + }else{ + out.print(" "); + } + + } else { + shopList = new ArrayList(); + out.print("

    Maaf, Keranjang Anda Masih Kosong

    "); + } + } else { + System.out.println("Belum LOGIN WOII!!!"); + response.sendRedirect("/ruko/"); + } +%> + + diff --git a/WebContent/sukses.jsp b/WebContent/sukses.jsp new file mode 100644 index 0000000..5efcfde --- /dev/null +++ b/WebContent/sukses.jsp @@ -0,0 +1,9 @@ + +
    +

    OPERASI SUKSES !!!

    + Klik di sini untuk kembali + +
    + + + \ No newline at end of file diff --git a/bin/bean/Barang.class b/bin/bean/Barang.class new file mode 100644 index 0000000..d65f06f Binary files /dev/null and b/bin/bean/Barang.class differ diff --git a/bin/bean/DatabaseAccess.class b/bin/bean/DatabaseAccess.class new file mode 100644 index 0000000..86e4e42 Binary files /dev/null and b/bin/bean/DatabaseAccess.class differ diff --git a/bin/bean/Transaksi.class b/bin/bean/Transaksi.class new file mode 100644 index 0000000..4635f0f Binary files /dev/null and b/bin/bean/Transaksi.class differ diff --git a/bin/servlets/Card.class b/bin/servlets/Card.class new file mode 100644 index 0000000..25f884c Binary files /dev/null and b/bin/servlets/Card.class differ diff --git a/bin/servlets/DeleteBarang.class b/bin/servlets/DeleteBarang.class new file mode 100644 index 0000000..aaa24cd Binary files /dev/null and b/bin/servlets/DeleteBarang.class differ diff --git a/bin/servlets/EditBarang.class b/bin/servlets/EditBarang.class new file mode 100644 index 0000000..28e4f7b Binary files /dev/null and b/bin/servlets/EditBarang.class differ diff --git a/bin/servlets/EditBarangKategori.class b/bin/servlets/EditBarangKategori.class new file mode 100644 index 0000000..42ef018 Binary files /dev/null and b/bin/servlets/EditBarangKategori.class differ diff --git a/bin/servlets/EditProfile.class b/bin/servlets/EditProfile.class new file mode 100644 index 0000000..c550e83 Binary files /dev/null and b/bin/servlets/EditProfile.class differ diff --git a/bin/servlets/Profile.class b/bin/servlets/Profile.class new file mode 100644 index 0000000..4e3f602 Binary files /dev/null and b/bin/servlets/Profile.class differ diff --git a/bin/servlets/RegisterFormServlet.class b/bin/servlets/RegisterFormServlet.class new file mode 100644 index 0000000..479cdd2 Binary files /dev/null and b/bin/servlets/RegisterFormServlet.class differ diff --git a/bin/servlets/Registration.class b/bin/servlets/Registration.class new file mode 100644 index 0000000..d8fb046 Binary files /dev/null and b/bin/servlets/Registration.class differ diff --git a/bin/servlets/Shoppingbag.class b/bin/servlets/Shoppingbag.class new file mode 100644 index 0000000..714a7f2 Binary files /dev/null and b/bin/servlets/Shoppingbag.class differ diff --git a/bin/servlets/VerLoginServlet.class b/bin/servlets/VerLoginServlet.class new file mode 100644 index 0000000..d42dd4a Binary files /dev/null and b/bin/servlets/VerLoginServlet.class differ diff --git a/bin/servlets/addcart.class b/bin/servlets/addcart.class new file mode 100644 index 0000000..2cf3b31 Binary files /dev/null and b/bin/servlets/addcart.class differ diff --git a/bin/servlets/barang.class b/bin/servlets/barang.class new file mode 100644 index 0000000..24c2deb Binary files /dev/null and b/bin/servlets/barang.class differ diff --git a/bin/servlets/detail.class b/bin/servlets/detail.class new file mode 100644 index 0000000..f9c23ae Binary files /dev/null and b/bin/servlets/detail.class differ diff --git a/bin/servlets/index.class b/bin/servlets/index.class new file mode 100644 index 0000000..28f57cf Binary files /dev/null and b/bin/servlets/index.class differ diff --git a/bin/servlets/kategori.class b/bin/servlets/kategori.class new file mode 100644 index 0000000..c49db4d Binary files /dev/null and b/bin/servlets/kategori.class differ diff --git a/bin/servlets/search.class b/bin/servlets/search.class new file mode 100644 index 0000000..702fd47 Binary files /dev/null and b/bin/servlets/search.class differ diff --git a/src/bean/Barang.java b/src/bean/Barang.java new file mode 100644 index 0000000..1f3a4fd --- /dev/null +++ b/src/bean/Barang.java @@ -0,0 +1,104 @@ +package bean; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public class Barang { + private String id_barang; + private String nama_barang; + private String gambar_barang; + private int harga_barang; + private int kategori_barang; + private int n_beli; + private String keterangan; + private int stok; + + public Barang(String id_barang, String nama_barang, String gambar_barang, + int harga_barang, int kategori_barang, int n_beli, + String keterangan, int stok) { + super(); + this.id_barang = id_barang; + this.nama_barang = nama_barang; + this.gambar_barang = gambar_barang; + this.harga_barang = harga_barang; + this.kategori_barang = kategori_barang; + this.n_beli = n_beli; + this.keterangan = keterangan; + this.stok = stok; + } + + public Barang(ResultSet rs) throws SQLException { + id_barang = rs.getObject(1).toString(); + nama_barang = rs.getObject(2).toString(); + gambar_barang = rs.getObject(3).toString(); + harga_barang = Integer.parseInt(rs.getObject(4).toString()); + kategori_barang = Integer.parseInt(rs.getObject(5).toString()); + n_beli = Integer.parseInt(rs.getObject(6).toString()); + keterangan = rs.getObject(7).toString(); + stok = Integer.parseInt(rs.getObject(8).toString()); + } + + public String getId_barang() { + return id_barang; + } + + public void setId_barang(String id_barang) { + this.id_barang = id_barang; + } + + public String getNama_barang() { + return nama_barang; + } + + public void setNama_barang(String nama_barang) { + this.nama_barang = nama_barang; + } + + public String getGambar_barang() { + return gambar_barang; + } + + public void setGambar_barang(String gambar_barang) { + this.gambar_barang = gambar_barang; + } + + public int getHarga_barang() { + return harga_barang; + } + + public void setHarga_barang(int harga_barang) { + this.harga_barang = harga_barang; + } + + public int getKategori_barang() { + return kategori_barang; + } + + public void setKategori_barang(int kateori_barang) { + this.kategori_barang = kateori_barang; + } + + public int getN_beli() { + return n_beli; + } + + public void setN_beli(int n_beli) { + this.n_beli = n_beli; + } + + public String getKeterangan() { + return keterangan; + } + + public void setKeterangan(String keterangan) { + this.keterangan = keterangan; + } + + public int getStok() { + return stok; + } + + public void setStok(int stok) { + this.stok = stok; + } +} diff --git a/src/bean/DatabaseAccess.java b/src/bean/DatabaseAccess.java new file mode 100644 index 0000000..df9c109 --- /dev/null +++ b/src/bean/DatabaseAccess.java @@ -0,0 +1,59 @@ +package bean; + +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; + +import com.mysql.jdbc.Connection; +import com.mysql.jdbc.Statement; + +public class DatabaseAccess { + private static final long serialVersionUID = 1L; + + public DatabaseAccess() { + } + + public Connection getConnection() { + Connection conn = null; + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = (Connection) DriverManager.getConnection(url, userName, + password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + return conn; + } + + public ResultSet doQuery(String SQL) { + + Statement stmt; + ResultSet rs = null; + try { + stmt = (Statement) getConnection().createStatement(); + // rs = + // stmt.executeQuery("SELECT * FROM barang WHERE kategori_barang = 1 ORDER BY n_beli DESC LIMIT 0,3"); + rs = stmt.executeQuery(SQL); + } catch (SQLException e) { + e.printStackTrace(); + } + return rs; + } + + public int doQueryUpdate(String SQL) { + + Statement stmt; + int rs=-1; // -1 ketika terjadi SQLException + try { + stmt=(Statement)getConnection().createStatement(); + rs = stmt.executeUpdate(SQL); + } catch (SQLException e) { + e.printStackTrace(); + } + return rs; + } + +} diff --git a/src/bean/Transaksi.java b/src/bean/Transaksi.java new file mode 100644 index 0000000..31a6405 --- /dev/null +++ b/src/bean/Transaksi.java @@ -0,0 +1,41 @@ +package bean; + +import java.util.ArrayList; + +public class Transaksi { + private Barang barang; + private Integer qt; + private String request_tambahan; + + public Transaksi(Barang barang, Integer qt, String request_tambahan) { + super(); + this.barang = barang; + this.qt = qt; + this.request_tambahan = request_tambahan; + } + + public Barang getBarang() { + return barang; + } + + public void setBarang(Barang barang) { + this.barang = barang; + } + + public Integer getQt() { + return qt; + } + + public void setQt(Integer qt) { + this.qt = qt; + } + + public String getRequest_tambahan() { + return request_tambahan; + } + + public void setRequest_tambahan(String request_tambahan) { + this.request_tambahan = request_tambahan; + } + +} diff --git a/src/servlets/Card.java b/src/servlets/Card.java new file mode 100644 index 0000000..8841755 --- /dev/null +++ b/src/servlets/Card.java @@ -0,0 +1,79 @@ +package servlets; + +import java.io.IOException; +import java.sql.SQLException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.mysql.jdbc.interceptors.SessionAssociationInterceptor; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class Card + */ +@WebServlet("/Card") +public class Card extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public Card() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO : cek user aktif + HttpSession session = request.getSession(); + if (session.getAttribute("username") != null) { + String cardnumber = (String) request.getParameter("cardnum"); + String nameoncard = (String) request.getParameter("namecard"); + String expdate = (String) request.getParameter("expdate"); + String cardowner = (String) session.getAttribute("username"); + + String query = "INSERT INTO creditcard (card_id, card_nameon, card_expdate, card_owner) VALUES ('" + + cardnumber + + "','" + + nameoncard + + "','" + + expdate + + "','" + + cardowner + "')"; + + System.out.println("woii -> " + query); + + // Run the query + DatabaseAccess dbAccess = new DatabaseAccess(); + System.out.print("UPDATE : " + dbAccess.doQueryUpdate(query)); + + + } else { + System.out.print("Gag Ada Session [Card.java : 69]"); + } + response.sendRedirect(""); + System.out.print("PINDAH WOIII"); + } +} diff --git a/src/servlets/DeleteBarang.java b/src/servlets/DeleteBarang.java new file mode 100644 index 0000000..ba1eebd --- /dev/null +++ b/src/servlets/DeleteBarang.java @@ -0,0 +1,51 @@ +package servlets; + +import java.io.IOException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class DeleteBarang + */ +@WebServlet("/DeleteBarang") +public class DeleteBarang extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public DeleteBarang() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { +DatabaseAccess dbAccess = new DatabaseAccess(); + + String id_barang = request.getParameter("id_barang"); + + String query = "DELETE FROM `barang` WHERE id_barang="+id_barang; + + dbAccess.doQueryUpdate(query); + RequestDispatcher view = request.getRequestDispatcher("sukses.jsp"); + view.forward(request, response); + } + +} diff --git a/src/servlets/EditBarang.java b/src/servlets/EditBarang.java new file mode 100644 index 0000000..1750c5d --- /dev/null +++ b/src/servlets/EditBarang.java @@ -0,0 +1,71 @@ +package servlets; + +import java.io.IOException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class EditBarang + */ +@WebServlet("/EditBarang") +public class EditBarang extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public EditBarang() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + doPost(request, response); + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + HttpSession session = request.getSession(); + + DatabaseAccess dbAccess = new DatabaseAccess(); + + String id_barang = request.getParameter("id_barang"); + String nama_barang = request.getParameter("new_name"); + String stok_barang = request.getParameter("new_stock"); + String harga_barang = request.getParameter("new_price"); + + String query = "UPDATE `barang` SET " + + "harga_barang = \"" + + harga_barang + + "\"," + + "nama_barang = '" + + nama_barang + + "'," + + "harga_barang = '" + + harga_barang + + "'," + + "stok = '" + + stok_barang + + "'" + + "WHERE id_barang = '" + + id_barang + + "'"; + + dbAccess.doQueryUpdate(query); + RequestDispatcher view = request.getRequestDispatcher("sukses.jsp"); + view.forward(request, response); + } +} diff --git a/src/servlets/EditBarangKategori.java b/src/servlets/EditBarangKategori.java new file mode 100644 index 0000000..e5c06bd --- /dev/null +++ b/src/servlets/EditBarangKategori.java @@ -0,0 +1,94 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.Barang; + +/** + * Servlet implementation class EditBarangKategori + */ +@WebServlet("/EditBarangKategori") +public class EditBarangKategori extends HttpServlet { + private static final long serialVersionUID = 1L; + private ArrayList barang = new ArrayList(); + + /** + * @see HttpServlet#HttpServlet() + */ + public EditBarangKategori() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + PrintWriter out = response.getWriter(); + + Connection conn = null; + Statement stmt = null; + barang.clear(); + + String id = request.getParameter("id"); + String page = request.getParameter("page"); + String order = request.getParameter("order"); + int limit = (Integer.parseInt(page) - 1) * 10; + System.out.println("id : "+id+"--page : "+page+"--limit : "+limit); + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + ResultSet rs_barang = null; + String q = "SELECT * FROM `progin_13511021`.barang WHERE kategori_barang = "+id; + + try { + stmt = conn.createStatement(); + rs_barang = stmt.executeQuery(q); + + while (rs_barang.next()) { + Barang temp = new Barang(rs_barang); + barang.add(temp); + } + + rs_barang.close(); + stmt.close(); + conn.close(); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + request.setAttribute("barang", barang); + RequestDispatcher view = request.getRequestDispatcher("/editbarangkategori.jsp"); + view.forward(request, response); + } + +} diff --git a/src/servlets/EditProfile.java b/src/servlets/EditProfile.java new file mode 100644 index 0000000..4f5a9c1 --- /dev/null +++ b/src/servlets/EditProfile.java @@ -0,0 +1,88 @@ +package servlets; + +import java.io.IOException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class EditProfile + */ +@WebServlet("/EditProfile") +public class EditProfile extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public EditProfile() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + HttpSession session = request.getSession(); + + DatabaseAccess dbAccess = new DatabaseAccess(); + String username = (String) session.getAttribute("username"); + String password = (String) request.getParameter("password"); + String fullname = (String) request.getParameter("fullname"); + String phonenum = (String) request.getParameter("hpnum"); + String address = (String) request.getParameter("address"); + String province = (String) request.getParameter("province"); + String kecamatan = (String) request.getParameter("kecamatan"); + String postalcode = (String) request.getParameter("postalcode"); + + String query = "UPDATE `user` SET " + + "nama_lengkap = \"" + + fullname + + "\"," + + "password = '" + + password + + "'," + + "handphone = '" + + phonenum + + "'," + + "address = '" + + address + + "'," + + "province ='" + + province + + "'," + + "state = '" + + kecamatan + + "'," + + "postcode = '" + + postalcode + + "'" + + "WHERE username = '" + + username + + "'"; + + System.out.println("INI SQL[EDIT PROFILE]=>"+query); + // Run the query + int hasil = dbAccess.doQueryUpdate(query); + + //RequestDispatcher view = request.getRequestDispatcher(""); + //view.forward(request, response); + response.sendRedirect(""); + } +} diff --git a/src/servlets/Profile.java b/src/servlets/Profile.java new file mode 100644 index 0000000..961d285 --- /dev/null +++ b/src/servlets/Profile.java @@ -0,0 +1,109 @@ +package servlets; + +import java.io.IOException; +import java.sql.ResultSet; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.mysql.jdbc.interceptors.SessionAssociationInterceptor; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class Profile + */ +@WebServlet("/Profile") +public class Profile extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public Profile() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + HttpSession session = request.getSession(); + if(session.getAttribute("username")==null){ + ServletContext context = getServletContext(); + RequestDispatcher dispatcher = context + .getRequestDispatcher("/index"); + dispatcher.forward(request, response); + }else{ + String ID = request.getParameter("id"); + + DatabaseAccess dbAccess = new DatabaseAccess(); + String SQL = "SELECT * FROM `progin_13511021`.user WHERE username = '" + + ID + "'"; + System.out.println(SQL); + ResultSet rs = dbAccess.doQuery(SQL); + + try { + if (!rs.next()) { + System.out.println("Cannot Access Profile Right Now"); + } else { + request.setAttribute("fullname", rs.getObject("nama_lengkap")); + request.setAttribute("username", rs.getObject("username")); + request.setAttribute("email", rs.getObject("email")); + request.setAttribute("mobile", rs.getObject("handphone")); + request.setAttribute("address", rs.getObject("address")); + request.setAttribute("province", rs.getObject("province")); + request.setAttribute("state", rs.getObject("state")); + request.setAttribute("postalcode", rs.getObject("postcode")); + } + } catch (Exception e) { + // TODO: handle exception + } + // $profile_query = + // "SELECT * FROM `progin_13511059`.user WHERE username = '".$id."'"; + // $profile_hasil = mysql_query($profile_query,$con); + // if(!$profile_hasil){ + // echo "Cannot Access Profile Right Now"; + // } + // else{ + // $profile_row = mysql_fetch_array($profile_hasil); + // echo ' + //

    ',$profile_row['nama_lengkap'],'


    + //

    username :',$profile_row['username'],'


    + //

    email :',$profile_row['email'],'


    + //

    Mobile :',$profile_row['handphone'],'


    + //

    Address :',$profile_row['address'],'


    + //

    Province :',$profile_row['province'],'


    + //

    State : ',$profile_row['state'],'


    + //

    Postal Code :',$profile_row['postcode'],'


    + // Edit Profile + // '; + // } + + ServletContext context = getServletContext(); + RequestDispatcher dispatcher = context + .getRequestDispatcher("/profile.jsp"); + dispatcher.forward(request, response); + } + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + +} diff --git a/src/servlets/RegisterFormServlet.java b/src/servlets/RegisterFormServlet.java new file mode 100644 index 0000000..e88ed84 --- /dev/null +++ b/src/servlets/RegisterFormServlet.java @@ -0,0 +1,79 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.sql.SQLException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class RegisterFormServlet + */ +@WebServlet("/RegisterFormServlet") +public class RegisterFormServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public RegisterFormServlet() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + try { + System.out.println("MASUK HLLOOO"); + // Obtain value of Catalog Id field to ve validated. + String newUsername = request.getParameter("newusername"); + + // Obtain Connection + DatabaseAccess dbAccess = new DatabaseAccess(); + String SQL = "SELECT * FROM `user` WHERE USERNAME=\"" + newUsername; + System.out.println(SQL); + ResultSet rs = dbAccess.doQuery(SQL); + + // set headers before accessing the Writer + response.setContentType("text/xml"); + response.setHeader("Cache-Control", "no-cache"); + + PrintWriter out = response.getWriter(); + + // then write the response + // If result set is empty set valid element to true + if (rs.next()) { + System.out.println("TELAH ADA"); + out.println("" + "false"); + } else { + System.out.println("BELUM ADA"); + out.println("true"); + } + } catch (SQLException e) { + e.printStackTrace(); + } + + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + +} diff --git a/src/servlets/Registration.java b/src/servlets/Registration.java new file mode 100644 index 0000000..6b36093 --- /dev/null +++ b/src/servlets/Registration.java @@ -0,0 +1,107 @@ +package servlets; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.catalina.Session; + +/** + * Servlet implementation class Registration + */ +@WebServlet("/Registration") +public class Registration extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public Registration() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + Connection conn = null; + Statement statement; + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + String username = (String) request.getParameter("username"); + String password = (String) request.getParameter("password"); + String fullname = (String) request.getParameter("fullname"); + String phonenum = (String) request.getParameter("hpnum"); + String address = (String) request.getParameter("address"); + String province = (String) request.getParameter("province"); + String kecamatan = (String) request.getParameter("kecamatan"); + String postalcode = (String) request.getParameter("postalcode"); + String email = (String) request.getParameter("Email"); + + String query = "INSERT INTO user (username, nama_lengkap, password, email, handphone, address, province, state, postcode) VALUES ('" + + username + + "','" + + fullname + + "','" + + password + + "','" + + email + + "','" + + phonenum + + "','" + + address + + "','" + + province + + "','" + + kecamatan + + "','" + + postalcode + "')"; + + // Run the query + try { + statement = conn.createStatement(); + statement.executeUpdate(query); + System.out.println("Insert data succesfull"); + } catch (SQLException e) { + e.printStackTrace(); + } + + HttpSession session = request.getSession(); + session.setAttribute("username",username); + RequestDispatcher view = request.getRequestDispatcher("cardregist.jsp"); + view.forward(request, response); + } + +} diff --git a/src/servlets/Shoppingbag.java b/src/servlets/Shoppingbag.java new file mode 100644 index 0000000..4b25e20 --- /dev/null +++ b/src/servlets/Shoppingbag.java @@ -0,0 +1,90 @@ +package servlets; + +import java.awt.image.RescaleOp; +import java.io.IOException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.DatabaseAccess; +import bean.Transaksi; + +/** + * Servlet implementation class Shoppingbag + */ +@WebServlet("/Shoppingbag") +public class Shoppingbag extends HttpServlet { + private static final long serialVersionUID = 1L; + + /** + * @see HttpServlet#HttpServlet() + */ + public Shoppingbag() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + + HttpSession session = request.getSession(true); + ArrayList shopList = new ArrayList(); + if (session.getAttribute("username") != null) { + ArrayList card = new ArrayList(); + DatabaseAccess dbAccess = new DatabaseAccess(); + + String SQL = "SELECT * FROM `creditcard` WHERE card_owner=\"" + + session.getAttribute("username") + "\""; + System.out.println("INI SQL [SHOPPINGBAG] ->" + SQL); + ResultSet rs = dbAccess.doQuery(SQL); + + try { + while (rs.next()) { + card.add(rs.getString("card_id")); + System.out.print("<>" + rs.getString("card_id")); + } + request.setAttribute("card", card); + } catch (SQLException e) { + e.printStackTrace(); + } + + if (session.getAttribute("IT") != null) { + shopList = (ArrayList) session.getAttribute("IT"); + request.setAttribute("arrayTransaksi", shopList); + } else { + shopList = new ArrayList(); + } + ServletContext context = getServletContext(); + RequestDispatcher dispatcher = context.getRequestDispatcher("/shoppingbag.jsp"); + dispatcher.forward(request, response); + } else { + ServletContext context = getServletContext(); + RequestDispatcher dispatcher = context + .getRequestDispatcher("/ruko"); + dispatcher.forward(request, response); + } + } + + /** + * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse + * response) + */ + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } +} diff --git a/src/servlets/VerLoginServlet.java b/src/servlets/VerLoginServlet.java new file mode 100644 index 0000000..89e131a --- /dev/null +++ b/src/servlets/VerLoginServlet.java @@ -0,0 +1,89 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.ResultSet; +import java.sql.SQLException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.DatabaseAccess; + +/** + * Servlet implementation class VerLoginServlet + */ +@WebServlet("/VerLoginServlet") +public class VerLoginServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + public VerLoginServlet() { + super(); + // TODO Auto-generated constructor stub + } + + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + String username; + String password; + PrintWriter out = response.getWriter(); + username = request.getParameter("username"); + password = request.getParameter("password"); + + String nilai = "awal"; + DatabaseAccess dbAccess = new DatabaseAccess(); + String SQL = "SELECT * FROM `user` WHERE USERNAME=\"" + username + "\" AND PASSWORD =\"" + password + "\";"; + System.out.println(SQL); + ResultSet rs = dbAccess.doQuery(SQL); + + if (rs == null) { + nilai = "gagal"; + System.out.println("gagal login kakak"); + } + + int i = 0; + try { + System.out.println("masuk"); + while (rs.next()) { + String role = rs.getObject(10).toString(); + System.out.println("role : "+role); + i++; + nilai = "berhasil"; + System.out.println("berhasil login" + i); + // session handling + HttpSession session = request.getSession(); + session.setAttribute("IT", null); + session.setAttribute("username",username); + session.setAttribute("role", role); + System.out.println("Session :"+((String)session.getAttribute("username"))); +// +// if (session.isNew()) { +// session.setAttribute("username", username); +// System.out.println("Session BARU :"+((String)session.getAttribute("username"))); +// }else{ +// System.out.println("Session LAMA :"+((String)session.getAttribute("username"))); +// } + System.out.println("SESSION ID :"+session.getId()); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + request.setAttribute("status", nilai); + ServletContext context = getServletContext(); + RequestDispatcher dispatcher = context + .getRequestDispatcher("/loginresponse.jsp"); + dispatcher.forward(request, response); + } +} diff --git a/src/servlets/addcart.java b/src/servlets/addcart.java new file mode 100644 index 0000000..938b849 --- /dev/null +++ b/src/servlets/addcart.java @@ -0,0 +1,90 @@ +package servlets; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.Barang; +import bean.Transaksi; + +@WebServlet("/addcart") +public class addcart extends HttpServlet { + private static final long serialVersionUID = 1L; + private ArrayList IT = new ArrayList(); + private Barang barang; + + public addcart() { + super(); + // TODO Auto-generated constructor stub + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + HttpSession session = request.getSession(true); + if (session.getAttribute("IT") == null) { + IT.clear(); + } + int qt = Integer.parseInt(request.getParameter("qt")); + String id_barang = request.getParameter("id_barang"); + String request_tambahan = request.getParameter("request_tambahan"); + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; + Barang barang = null; + String q = "SELECT * FROM `progin_13511021`.barang WHERE id_barang="+id_barang; + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + try { + stmt = conn.createStatement(); + rs = stmt.executeQuery(q); + + while (rs.next()) { + barang = new Barang(rs); + } + + rs.close(); + stmt.close(); + conn.close(); + } catch (SQLException e) { + System.out.println(e.getMessage()); + } + if (qt > 0) { + System.out.println("Quantity positif"); + Transaksi temp = new Transaksi(barang,qt,request_tambahan); + IT.add(temp); + session.setAttribute("IT", IT); + + ArrayList req = (ArrayList) session.getAttribute("IT"); + System.out.println(req.get(0).getRequest_tambahan()); + System.out.println(""+req.size()); + + request.setAttribute("arrayTransaksi", req); + System.out.print("MASUK"); + } + response.sendRedirect(""); + } + +} diff --git a/src/servlets/barang.java b/src/servlets/barang.java new file mode 100644 index 0000000..4e7e3fd --- /dev/null +++ b/src/servlets/barang.java @@ -0,0 +1,108 @@ +package servlets; + +import java.io.IOException; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.sql.Connection; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction; + +import bean.Barang; + +@WebServlet("/barang") +public class barang extends HttpServlet { + private static final long serialVersionUID = 1L; + private String id_barang; + private String nama_barang; + private String gambar_barang; + private String harga_barang; + private String kategori_barang; + private String n_beli; + private String keterangan; + private String stok; + + public barang() { + super(); + // TODO Auto-generated constructor stub + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + HttpSession session = request.getSession(); + id_barang = session.getAttribute("n_barang").toString(); + nama_barang = request.getParameter("nama_barang"); + harga_barang = request.getParameter("harga_barang"); + kategori_barang = request.getParameter("kategori_barang"); + n_beli = request.getParameter("n_beli"); + keterangan = request.getParameter("keterangan"); + stok = request.getParameter("stok"); + gambar_barang = request.getParameter("gambar_barang"); + + Connection conn = null; + Statement stmt = null; + Statement stmt1 = null; + ResultSet rs = null; + System.out.println("select nama_barang from barang where nama_barang = '" + nama_barang +"'"); + String validation = "select nama_barang from barang where nama_barang = '" + nama_barang +"'"; + + String query = "insert into barang (id_barang, nama_barang, gambar_barang, harga_barang, kategori_barang, n_beli, keterangan, stok) VALUES ('" + + id_barang + + "','" + + nama_barang + + "','" + + "./images/Tahu.png" + + "','" + + harga_barang + + "','" + + kategori_barang + + "','" + + n_beli + + "','" + + keterangan + + "','" + + stok + "')"; + + System.out.print(query); + System.out.print(validation); + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + try { + stmt = conn.createStatement(); + stmt1 = conn.createStatement(); + rs = stmt1.executeQuery(validation); + if (rs == null) { + stmt.executeUpdate(query); + } + stmt.close(); + stmt1.close(); + conn.close(); + System.out.println("SUkses"); + } catch (SQLException e) { + e.printStackTrace(); + } + RequestDispatcher view = request.getRequestDispatcher("/sukses.jsp"); + view.forward(request, response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + doGet(request,response); + } + +} diff --git a/src/servlets/detail.java b/src/servlets/detail.java new file mode 100644 index 0000000..db8a291 --- /dev/null +++ b/src/servlets/detail.java @@ -0,0 +1,75 @@ +package servlets; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.Barang; + +/** + * Servlet implementation class detail + */ +@WebServlet("/detail") +public class detail extends HttpServlet { + private static final long serialVersionUID = 1L; + private String id; + private Barang selected; + + public detail() { + super(); + // TODO Auto-generated constructor stub + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + Connection conn = null; + Statement stmt = null; + id = request.getParameter("id"); + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + String q = "SELECT * FROM `progin_13511021`.barang WHERE id_barang = "+id; + ResultSet rs = null; + System.out.println(q); + try { + stmt = conn.createStatement(); + rs = stmt.executeQuery(q); + + while (rs.next()) { + selected = new Barang(rs); + } + System.out.println(selected.getNama_barang()); + rs.close(); + stmt.close(); + conn.close(); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + request.setAttribute("selected", selected); + RequestDispatcher view = request.getRequestDispatcher("/detail.jsp"); + view.forward(request, response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + +} diff --git a/src/servlets/index.java b/src/servlets/index.java new file mode 100644 index 0000000..3a81ebd --- /dev/null +++ b/src/servlets/index.java @@ -0,0 +1,139 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import bean.Barang; + +@WebServlet("/index") +public class index extends HttpServlet { + private static final long serialVersionUID = 1L; + private ArrayList pangan = new ArrayList(); + private ArrayList pakaian = new ArrayList(); + private ArrayList elektronik = new ArrayList(); + private ArrayList rumahtangga = new ArrayList(); + private ArrayList olahraga = new ArrayList(); + private int n_barang; + + public index() { + } + + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + pangan.clear(); + pakaian.clear(); + elektronik.clear(); + rumahtangga.clear(); + olahraga.clear(); + HttpSession session = request.getSession(); + PrintWriter out = response.getWriter(); + Connection conn = null; + Statement stmt[] = new Statement[6]; + for (int i = 0; i < 6; i++) + stmt[i] = null; + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + ResultSet rs_pangan = null; + ResultSet rs_pakaian = null; + ResultSet rs_elektronik = null; + ResultSet rs_rumahtangga = null; + ResultSet rs_olahraga = null; + ResultSet rs = null; + + String q_pangan = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = 1 ORDER BY n_beli DESC LIMIT 0,3"; + String q_pakaian = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = 2 ORDER BY n_beli DESC LIMIT 0,3"; + String q_elektronik = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = 3 ORDER BY n_beli DESC LIMIT 0,3"; + String q_rumahtangga = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = 4 ORDER BY n_beli DESC LIMIT 0,3"; + String q_olahraga = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = 5 ORDER BY n_beli DESC LIMIT 0,3"; + String q = "SELECT COUNT(nama_barang) from `barang`"; + + System.out.println("asdksakdjlsjdlsjaldjlsa"); + + try { + for (int i = 0; i < 6; i++) stmt[i] = conn.createStatement(); + rs_pangan = stmt[0].executeQuery(q_pangan); + rs_pakaian = stmt[1].executeQuery(q_pakaian); + rs_elektronik = stmt[2].executeQuery(q_elektronik); + rs_rumahtangga = stmt[3].executeQuery(q_rumahtangga); + rs_olahraga = stmt[4].executeQuery(q_olahraga); + rs = stmt[5].executeQuery(q); + + while (rs_pangan.next()) { + Barang temp = new Barang(rs_pangan); + pangan.add(temp); + System.out.println("lalalalalala"); + } + + while (rs_pakaian.next()) { + Barang temp = new Barang(rs_pakaian); + pakaian.add(temp); + } + + while (rs_elektronik.next()) { + Barang temp = new Barang(rs_elektronik); + elektronik.add(temp); + } + + while (rs_rumahtangga.next()) { + Barang temp = new Barang(rs_rumahtangga); + rumahtangga.add(temp); + } + + while (rs_olahraga.next()) { + Barang temp = new Barang(rs_olahraga); + olahraga.add(temp); + } + + while (rs.next()) { + n_barang = Integer.parseInt(rs.getObject(1).toString()); + } + + rs_pangan.close(); + rs_pakaian.close(); + rs_elektronik.close(); + rs_rumahtangga.close(); + rs_olahraga.close(); + rs.close(); + + for (int i = 0; i < 6; i++) + stmt[i].close(); + conn.close(); + } catch (SQLException e) { + System.out.println(e.getMessage()); + } + + request.setAttribute("pangan", pangan); + request.setAttribute("pakaian", pakaian); + request.setAttribute("elektronik", elektronik); + request.setAttribute("rumahtangga", rumahtangga); + request.setAttribute("olahraga", olahraga); + session.setAttribute("n_barang", n_barang+1000); + System.out.println("n_barang : "+n_barang); + RequestDispatcher view = request.getRequestDispatcher("index.jsp"); + view.forward(request, response); + } + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + } +} diff --git a/src/servlets/kategori.java b/src/servlets/kategori.java new file mode 100644 index 0000000..ad96cde --- /dev/null +++ b/src/servlets/kategori.java @@ -0,0 +1,86 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.Barang; + + +@WebServlet("/kategori") +public class kategori extends HttpServlet { + private static final long serialVersionUID = 1L; + private ArrayList barang = new ArrayList(); + + public kategori() { + super(); + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + PrintWriter out = response.getWriter(); + + Connection conn = null; + Statement stmt = null; + barang.clear(); + + String id = request.getParameter("id"); + String page = request.getParameter("page"); + String order = request.getParameter("order"); + int limit = (Integer.parseInt(page) - 1) * 10; + System.out.println("id : "+id+"--page : "+page+"--limit : "+limit); + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + ResultSet rs_barang = null; + + String q = "SELECT Distinct * FROM `progin_13511021`.barang WHERE kategori_barang = "+id+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + + try { + stmt = conn.createStatement(); + rs_barang = stmt.executeQuery(q); + + while (rs_barang.next()) { + Barang temp = new Barang(rs_barang); + barang.add(temp); + } + + rs_barang.close(); + stmt.close(); + conn.close(); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + request.setAttribute("barang", barang); + RequestDispatcher view = request.getRequestDispatcher("/kategori.jsp"); + view.forward(request, response); + + } + + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + +} diff --git a/src/servlets/search.java b/src/servlets/search.java new file mode 100644 index 0000000..f8f4e1d --- /dev/null +++ b/src/servlets/search.java @@ -0,0 +1,156 @@ +package servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import bean.Barang; + +@WebServlet("/search") +public class search extends HttpServlet { + private static final long serialVersionUID = 1L; + private String page; + private String nama_barang; + private String kategori; + private String harga; + private String order; + private ArrayList search_result = new ArrayList(); + private String n_item_query, search_query; + private Integer n_item; + + public search() { + super(); + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { +PrintWriter out = response.getWriter(); + + Connection conn = null; + Statement stmt1 = null; + Statement stmt2 = null; + search_result.clear(); + + page = request.getParameter("page"); + nama_barang = request.getParameter("nama_barang"); + kategori = request.getParameter("kategori"); + harga = request.getParameter("harga"); + order = request.getParameter("order"); + + int limit = (Integer.parseInt(page) - 1) * 10; + + try { + String userName = "root"; + String password = ""; + String url = "jdbc:mysql://localhost/progin_13511021"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + conn = DriverManager.getConnection(url, userName, password); + } catch (Exception e) { + System.out.println("Cannot connect to database server"); + } + + if (!nama_barang.isEmpty()) { //ada nama + if(!harga.isEmpty()){ //ada harga + if(!kategori.isEmpty()){ + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang "+ + "WHERE nama_barang like '%"+nama_barang+"%' AND harga_barang BETWEEN 0 AND "+harga+ + " AND kategori_barang = "+kategori; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang "+ + "WHERE nama_barang like '%"+nama_barang+"%' AND harga_barang BETWEEN 0 AND "+harga+ + " AND kategori_barang = "+kategori+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + }else { //kategori kosong + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%' AND harga_barang BETWEEN 0 AND "+harga; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%' AND harga_barang BETWEEN 0 AND "+harga+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + } + }else{ //harga kosong + if(!kategori.isEmpty()) { + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%' AND kategori_barang = "+kategori; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%' AND kategori_barang = "+kategori+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + } else { + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%'"; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE nama_barang like '%"+nama_barang+"%' ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + } + } + }else{// nama kosong + if(!harga.isEmpty()){ //ada harga + if(!kategori.isEmpty()){ //ada kategori + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE harga_barang BETWEEN 0 AND "+harga+" AND kategori_barang = "+kategori; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE harga_barang BETWEEN 0 AND "+harga+" AND kategori_barang = "+kategori+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + }else { //kategori kosong + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE harga_barang BETWEEN 0 AND "+harga; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE harga_barang BETWEEN 0 AND "+harga+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + } + } else { //gak ada harga + if(!kategori.isEmpty()) { + n_item_query = "SELECT COUNT(nama_barang) AS n_item FROM `progin_13511021`.barang " + + "WHERE kategori_barang="+kategori; + search_query = "SELECT Distinct * FROM `progin_13511021`.barang " + + "WHERE kategori_barang="+kategori+" ORDER BY "+order+" ASC LIMIT "+limit+", 10"; + } + } + } + + ResultSet rs_barang = null; + ResultSet n_barang = null; + System.out.println(n_item_query); + System.out.println(search_query); + try { + stmt1 = conn.createStatement(); + stmt2 = conn.createStatement(); + n_barang = stmt1.executeQuery(n_item_query); + rs_barang = stmt2.executeQuery(search_query); + + while (rs_barang.next()) { + Barang temp = new Barang(rs_barang); + search_result.add(temp); + } + + while (n_barang.next()) { + n_item = Integer.parseInt(n_barang.getObject(1).toString()); + } + + System.out.println("n_item : "+n_item); + + rs_barang.close(); + n_barang.close(); + stmt1.close(); + stmt2.close(); + conn.close(); + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + request.setAttribute("search_result", search_result); + request.setAttribute("n_item", n_item); + RequestDispatcher view = request.getRequestDispatcher("search.jsp"); + view.forward(request, response); + } + + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + +}