-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.jsp
120 lines (106 loc) · 4.1 KB
/
index.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<%--
% Copyright 2011 - Kementerian Pendidikan Nasional - Dit.PSMP
%
% Author(s):
% + x10c-Lab
% - agus sugianto ([email protected])
--%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.Properties" %>
<%@ page import="java.io.FileInputStream" %>
<%@ page import="java.io.File" %>
<%
Properties props = new Properties();
props.load(new FileInputStream(application.getRealPath("WEB-INF"+File.separator+"web.properties")));
String db_url = props.getProperty("db")+"user="+props.getProperty("user")+"&password="+props.getProperty("pass");
try {
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
} catch (SQLException e) {
System.out.println(e.getMessage());
}
Connection db_con = DriverManager.getConnection(db_url);
Statement db_stmt = db_con.createStatement();
session.setAttribute("db.url", (Object) db_url);
session.setAttribute("db.con", (Object) db_con);
// get user session, redirect to main page if user already logged in
Object user = session.getAttribute("user.id");
String cpath = request.getContextPath();
if (user != null) {
response.sendRedirect(cpath +"/module/main/index.jsp");
return;
}
%>
<html>
<head>
<title> Bank Jateng </title>
<link rel='shortcut icon' href='<%=cpath%>/images/icon.png'/>
<script>
var _g_root = '<%= cpath %>';
</script>
<link rel='icon' href='<%=cpath%>/images/icon.png' />
<link rel='stylesheet' type='text/css' href='<%=cpath%>/css/index.css'/>
<%--
<link rel='stylesheet' type='text/css' href='<%=cpath%>/extjs/resources/css/ext-all.css'/>
<link rel='stylesheet' type='text/css' href='<%=cpath%>/extjs/resources/css/xtheme-gray.css'/>
<link rel='stylesheet' type='text/css' href='<%=cpath%>/css/style.css'/>
--%>
<%--
<script type='text/javascript' src='<%=cpath%>/extjs/adapter/ext/ext-base.js'></script>
<script type='text/javascript' src='<%=cpath%>/extjs/ext-all.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/jquery-1.4.2.min.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/jquery.cycle.all.min.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/jquery_ease.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/jquery.Scroller-1.0.min.js'></script>
--%>
<script type='text/javascript' src='<%=cpath%>/js/index-all.js'></script>
<%-- Highcharts --%>
<script type='text/javascript' src='<%=cpath%>/extjs/adapter/highcharts/extjs-highcharts-adapter.js'></script>
<script type='text/javascript' src='<%=cpath%>/highcharts/highcharts.js'></script>
<script type='text/javascript' src='<%=cpath%>/highcharts/modules/exporting.js'></script>
<!--[if IE]><script type="text/javascript" src="<%=cpath%>/highcharts/excanvas.compiled.js"></script><![endif]-->
<script type='text/javascript' src='<%=cpath%>/extjs/ux/HighChart.js'></script>
<script type='text/javascript' src='<%=cpath%>/extjs/ux/Spotlight.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/SHA256.js'></script>
<script type='text/javascript' src='<%=cpath%>/js/all.js'></script>
<script type='text/javascript' src='<%=cpath%>/layout.js'></script>
</head>
<body>
<div id="back" class="clearfloat">
<div id="header" class="clearfloat">
<!--
<h1> PAKET APLIKASI SEKOLAH </h1>
-->
</div>
<div id="wrap" class="clearfloat">
<div id="top">
<div class="horizontal_scroller">
</div>
</div>
<div id="main">
<div class='image-display'>
<img src="<%=cpath%>/images/image.png"/>
</div>
</div><!--end main-->
<div id="sidebar" class="clearfloat">
<div class="login-section">
<h3>User Login</h3>
<form name="login_form">
<label>Nama User:</label>
<input type="text" name="user" id="user_login" value="" size="23" />
<label>Kata Kunci:</label>
<input type="password" name="password" id="user_pass" size="23" onKeyDown="form_pass_on_keydown(event)" />
<center>
<input type="button" name="login" value="Login" class="bt_login" onClick="call_do_login()"/>
</center>
</form>
</div>
</div>
<div id="footer" class="clearfloat">
<div class="right">
<p>Sistem Inventori © 2011 Bank Jateng.</p>
</div>
</div><!--end #footer-->
</div><!--end wrap-->
</div><!--end back-->
</body>
</html>