Skip to content

Commit

Permalink
Event Location
Browse files Browse the repository at this point in the history
  • Loading branch information
gerryagustian97 committed Oct 31, 2017
1 parent 1eb34f1 commit 3b3f030
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
8 changes: 4 additions & 4 deletions nbproject/private/private.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
deploy.ant.properties.file=C:\\Users\\Maulana\\AppData\\Roaming\\NetBeans\\8.2\\tomcat80.properties
deploy.ant.properties.file=C:\\Users\\AGS\\AppData\\Roaming\\NetBeans\\8.2\\tomcat80.properties
j2ee.platform.is.jsr109=true
j2ee.server.domain=C:/Users/Maulana/AppData/Roaming/NetBeans/8.2/apache-tomcat-8.0.27.0_base
j2ee.server.home=C:/Program Files/Apache Software Foundation/Apache Tomcat 8.0.27
j2ee.server.instance=tomcat80:home=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 8.0.27:base=apache-tomcat-8.0.27.0_base
j2ee.server.home=D:/KULIAH/3RD SEMESTER/apache-tomcat-8.5.23-windows-x64/apache-tomcat-8.5.23
j2ee.server.instance=tomcat80:home=D:\\KULIAH\\3RD SEMESTER\\apache-tomcat-8.5.23-windows-x64\\apache-tomcat-8.5.23
j2ee.server.middleware=C:/Program Files/Glassfish/glassfish 4.1.1
javac.debug=true
javadoc.preview=true
selected.browser=Chrome
selected.browser=SL[/Browsers/FirefoxBrowser
user.properties.file=C:\\Users\\Maulana\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ j2ee.compile.on.save=true
j2ee.copy.static.files.on.save=true
j2ee.deploy.on.save=true
j2ee.platform=1.7-web
j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.4.2.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.6.3.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
j2ee.server.type=Tomcat
jar.compress=false
javac.classpath=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws S
tempInt = Integer.parseInt(req.getParameter("event_id"));
objEvent.setEvent_id(tempInt);

tempInt = Integer.parseInt(req.getParameter("traveller_id"));
objEvent.setTraveller_id(tempInt);
//tempInt = Integer.parseInt(req.getParameter("traveller_id"));
objEvent.setTraveller_id(1);

tempString = req.getParameter("event_name");
if(tempString == null) System.out.println("Gagal ambil data dari request event name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public List<Event> getListFromDB(int halaman) throws SQLException{
listEvent = new ArrayList();
//tempInt = (halaman-1) * this.limit;
sql = String.format("SELECT * FROM `event`");
//sql1 = String.format("SELECT TRAVELLER_ID FROM travlendardb.traveller");
//sql = String.format("SELECT `EVENT_NAME`, `START_EVENT`, `END_EVENT`, `NOTE`, `ADDRESS_PLACE` FROM `event`, `location` WHERE `event.LOCATION_ID` = `location.LOCATION_ID`");
//sql1 = String.format("SELECT ADDRESS_PLACE FROM `location`, `event` WHERE `event`.LOCATION_ID = `location`.LOCATION_ID");
super.connect();
Statement statement;
ResultSet resultSet, resultSet1;
Expand Down Expand Up @@ -248,7 +249,7 @@ public Event getDataFromDB(int eventCode) throws SQLException
// mendapatkan data sesuai atribut


tempInt = resultSet.getInt("LOCATION_ID");
tempInt = resultSet.getInt("LOCATION_ID");
event.setLocation_id(tempInt);

tempInt = resultSet.getInt("EVENT_ID");
Expand Down
2 changes: 1 addition & 1 deletion web/Admin-Panel/Assets2/css/styletraveller.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ a:hover{
margin-top: 5px;
margin-bottom: 5px;
padding: 10px;
width: 310px;
width: 100%;
height: 50px;
background: #f4f4f4;
border: none;
Expand Down
18 changes: 16 additions & 2 deletions web/Admin-Panel/Event/list_event.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/Admin-Panel/Assets2/css/styletraveller.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/Admin-Panel/Assets2/css/responsive.css">
<link rel="stylesheet" type="text/css" href="Assets/css/calendar.css">
<title>JSP Page</title>
</head>
<body>
Expand Down Expand Up @@ -42,13 +43,26 @@

<form class="login-form" action="${pageContext.request.contextPath}/Admin-Panel/event?input=baru" method="post">
<input type="text" name="event_id" placeholder="Event ID ..."/>
<input type="text" name="location_id" placeholder="Location ID ..."/>
<input type="text" name="traveller_id" placeholder="Traveller ID ..."/>
<!-- <input type="text" name="location_id" placeholder="Location ID ..."/>-->
<!-- <input type="text" name="traveller_id" placeholder="Traveller ID ..."/>-->
<input type="text" name="event_name" placeholder="Event Name ..."/>
<input type="text" name="start_event" placeholder="Start Event (dd-MM-yyyy HH:mm:ss) ..."/>
<!--<input class="k-event" id="date" type="date" value="2017-09-08" name="start_event" style="float:left"/>-->
<input type="text" name="end_event" placeholder="End Event (dd-MM-yyyy HH:mm:ss) ..."/>
<!--<input class="k-event" id="date" type="date" value="2017-09-08" name="end_event" style="float:left"/>-->
<input type="text" name="note" placeholder="Note ..."/>
<input type="text" name="place" placeholder="Place ..."/>
<select class="dropdown-location" name="location_id">

<option value="">Select...</option>

<c:forEach items="${locationList}" var="location">
<option value="<c:out value="${ location.getLocation_id() }"/>"/> <!-- Saat submit, diisi dg code city -->
<c:out value="${ location.getAddress_place() }"/> <!-- Ditampilan, hanya ditampilkan nama nya doang -->
</option>
</c:forEach>

</select>
<button type="submit"> Save </button>
</form>
</div>
Expand Down

0 comments on commit 3b3f030

Please sign in to comment.