Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
Asistencia
Commits
3eebd824
Commit
3eebd824
authored
Sep 14, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX detalleMontosAdministrativos, referencia a js y css ahora apuntan a la raiz del proyecto]
parent
01801e82
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
360 additions
and
340 deletions
+360
-340
RequestsFilter.java
src/main/java/asistencia/filters/RequestsFilter.java
+199
-199
GeneralUtils.java
src/main/java/asistencia/utilities/GeneralUtils.java
+29
-13
__template.jsp
src/main/webapp/vistas/__template.jsp
+17
-16
main.jsp
src/main/webapp/vistas/main.jsp
+22
-22
detalleMontosAdministrativos.jsp
...os/montosAdministrativos/detalleMontosAdministrativos.jsp
+11
-11
footer-body.jsp
src/main/webapp/vistas/templates/footer-body.jsp
+17
-17
header-body.jsp
src/main/webapp/vistas/templates/header-body.jsp
+9
-9
header.jsp
src/main/webapp/vistas/templates/header.jsp
+13
-12
navbar.jsp
src/main/webapp/vistas/templates/navbar.jsp
+39
-38
sidebar.jsp
src/main/webapp/vistas/templates/sidebar.jsp
+2
-2
validar.jsp
src/main/webapp/vistas/templates/validar.jsp
+2
-1
No files found.
src/main/java/asistencia/filters/RequestsFilter.java
View file @
3eebd824
...
@@ -35,236 +35,236 @@ import org.json.JSONObject;
...
@@ -35,236 +35,236 @@ import org.json.JSONObject;
*/
*/
public
class
RequestsFilter
implements
Filter
{
public
class
RequestsFilter
implements
Filter
{
private
FilterConfig
filterConfig
=
null
;
private
FilterConfig
filterConfig
=
null
;
public
RequestsFilter
()
{
public
RequestsFilter
()
{
}
}
private
void
doBeforeProcessing
(
ServletRequest
req
,
ServletResponse
resp
,
FilterChain
chain
)
private
void
doBeforeProcessing
(
ServletRequest
req
,
ServletResponse
resp
,
FilterChain
chain
)
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
HttpServletRequest
request
=
(
HttpServletRequest
)
req
;
HttpServletRequest
request
=
(
HttpServletRequest
)
req
;
HttpServletResponse
response
=
(
HttpServletResponse
)
resp
;
HttpServletResponse
response
=
(
HttpServletResponse
)
resp
;
String
uri
=
request
.
getRequestURI
();
String
uri
=
request
.
getRequestURI
();
if
(
uri
.
contains
(
"vistas/modals/"
))
{
if
(
uri
.
contains
(
"vistas/modals/"
))
{
chain
.
doFilter
(
req
,
resp
);
chain
.
doFilter
(
req
,
resp
);
return
;
return
;
}
}
if
(
uri
.
endsWith
(
"vistas/index.jsp"
))
{
if
(
uri
.
endsWith
(
"vistas/index.jsp"
))
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
response
.
sendRedirect
(
"main.jsp"
);
response
.
sendRedirect
(
"main.jsp"
);
return
;
return
;
}
}
chain
.
doFilter
(
req
,
resp
);
chain
.
doFilter
(
req
,
resp
);
}
else
{
}
else
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
if
(
request
.
getSession
().
getAttribute
(
"codigo"
)
!=
null
)
{
if
(
uri
.
endsWith
(
".jsp"
))
{
if
(
uri
.
endsWith
(
".jsp"
))
{
HttpSession
session
=
request
.
getSession
();
HttpSession
session
=
request
.
getSession
();
HttpRequest
httpRequest
=
new
HttpRequest
();
HttpRequest
httpRequest
=
new
HttpRequest
();
JSONObject
valid
=
null
;
JSONObject
valid
=
null
;
String
respuesta
=
""
;
String
respuesta
=
""
;
String
auth
=
""
;
String
auth
=
""
;
try
{
try
{
if
(
session
.
getAttribute
(
"Authorization"
)
!=
null
)
{
if
(
session
.
getAttribute
(
"Authorization"
)
!=
null
)
{
auth
=
(
String
)
session
.
getAttribute
(
"Authorization"
);
auth
=
(
String
)
session
.
getAttribute
(
"Authorization"
);
}
else
{
}
else
{
setError
(
response
);
setError
(
response
);
}
}
respuesta
=
httpRequest
.
getRespuesta
(
RequestPath
.
VERIFICAR_LOGIN
,
HttpRequest
.
POST
,
new
JSONObject
(
"{}"
),
auth
);
respuesta
=
httpRequest
.
getRespuesta
(
RequestPath
.
VERIFICAR_LOGIN
,
HttpRequest
.
POST
,
new
JSONObject
(
"{}"
),
auth
);
valid
=
new
JSONObject
(
respuesta
);
valid
=
new
JSONObject
(
respuesta
);
if
(
valid
.
getBoolean
(
"status"
))
{
if
(
valid
.
getBoolean
(
"status"
))
{
JSONObject
menu
=
new
JSONObject
(
valid
.
getString
(
"menu"
));
//Obtiene el menu
JSONObject
menu
=
new
JSONObject
(
valid
.
getString
(
"menu"
));
//Obtiene el menu
List
<
Object
>
vistas
=
new
ArrayList
<>();
List
<
Object
>
vistas
=
new
ArrayList
<>();
JSONObject
rolvista
=
valid
.
getJSONObject
(
"rolvista"
);
JSONObject
rolvista
=
valid
.
getJSONObject
(
"rolvista"
);
JSONArray
urls
=
rolvista
.
getJSONArray
(
"vistas"
);
JSONArray
urls
=
rolvista
.
getJSONArray
(
"vistas"
);
for
(
int
i
=
0
;
i
<
urls
.
length
();
i
++)
{
for
(
int
i
=
0
;
i
<
urls
.
length
();
i
++)
{
vistas
.
add
(
urls
.
get
(
i
));
vistas
.
add
(
urls
.
get
(
i
));
}
}
vistas
.
add
(
"main.jsp"
);
vistas
.
add
(
"main.jsp"
);
String
ruta
=
request
.
getRequestURI
();
String
ruta
=
request
.
getRequestURI
();
int
indice
=
GeneralUtils
.
obtenerIndex
(
ruta
);
String
rutaJsp
=
GeneralUtils
.
obtenerURIvista
(
ruta
);
String
rutaJsp
=
ruta
.
substring
(
indice
,
ruta
.
length
()
);
boolean
acceso
=
vistas
.
contains
(
rutaJsp
);
boolean
acceso
=
vistas
.
contains
(
rutaJsp
);
if
(!
acceso
)
{
if
(!
acceso
)
{
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene acceso a la vista solicitada"
);
//Esta session se elimina en el jsp (para que no ocupe memoria)
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene acceso a la vista solicitada"
);
//Esta session se elimina en el jsp (para que no ocupe memoria)
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
)
;
return
;
return
;
}
}
session
.
setAttribute
(
"menu"
,
menu
.
toString
());
session
.
setAttribute
(
"menu"
,
menu
.
toString
());
}
else
{
}
else
{
deleteCredenciales
(
response
,
request
);
deleteCredenciales
(
response
,
request
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene credenciales validas"
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene credenciales validas"
);
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
)
;
return
;
return
;
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
request
.
getSession
().
setAttribute
(
"error"
,
ex
.
getMessage
());
request
.
getSession
().
setAttribute
(
"error"
,
ex
.
getMessage
()
);
request
.
getRequestDispatcher
(
request
.
getContextPath
()
+
"/vistas/error.jsp"
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
)
;
return
;
return
;
}
}
}
}
chain
.
doFilter
(
request
,
response
);
chain
.
doFilter
(
request
,
response
);
}
else
{
}
else
{
deleteCredenciales
(
response
,
request
);
deleteCredenciales
(
response
,
request
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene una sesion activa"
);
request
.
getSession
().
setAttribute
(
"error"
,
"no tiene una sesion activa"
);
// request.getRequestDispatcher(request.getContextPath() + "/vistas/error.jsp").forward(request, response
);
request
.
getRequestDispatcher
(
"/vistas/error.jsp"
).
forward
(
request
,
response
);
response
.
sendRedirect
(
request
.
getContextPath
()
+
"/index.jsp"
);
}
}
}
}
}
}
private
void
deleteCredenciales
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
private
void
deleteCredenciales
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
request
.
getSession
().
invalidate
();
request
.
getSession
().
invalidate
();
Cookie
cookieAuth
=
new
Cookie
(
"Authorization"
,
""
);
Cookie
cookieAuth
=
new
Cookie
(
"Authorization"
,
""
);
cookieAuth
.
setMaxAge
(
0
);
cookieAuth
.
setMaxAge
(
0
);
response
.
addCookie
(
cookieAuth
);
response
.
addCookie
(
cookieAuth
);
}
}
private
void
sendError
(
HttpServletResponse
response
)
throws
IOException
{
private
void
sendError
(
HttpServletResponse
response
)
throws
IOException
{
response
.
setStatus
(
HttpServletResponse
.
SC_UNAUTHORIZED
);
response
.
setStatus
(
HttpServletResponse
.
SC_UNAUTHORIZED
);
response
.
sendError
(
401
);
response
.
sendError
(
401
);
}
}
public
void
setError
(
HttpServletResponse
response
)
throws
IOException
{
public
void
setError
(
HttpServletResponse
response
)
throws
IOException
{
Response
.
ResponseBuilder
builder
=
null
;
Response
.
ResponseBuilder
builder
=
null
;
sendError
(
response
);
sendError
(
response
);
builder
=
Response
.
status
(
Response
.
Status
.
UNAUTHORIZED
).
entity
(
response
);
builder
=
Response
.
status
(
Response
.
Status
.
UNAUTHORIZED
).
entity
(
response
);
throw
new
WebApplicationException
(
builder
.
build
());
throw
new
WebApplicationException
(
builder
.
build
());
}
}
private
void
doAfterProcessing
(
ServletRequest
request
,
ServletResponse
response
)
private
void
doAfterProcessing
(
ServletRequest
request
,
ServletResponse
response
)
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
// Write code here to process the request and/or response after
// Write code here to process the request and/or response after
// the rest of the filter chain is invoked.
// the rest of the filter chain is invoked.
// For example, a logging filter might log the attributes on the
// For example, a logging filter might log the attributes on the
// request object after the request has been processed.
// request object after the request has been processed.
/*
/*
for (Enumeration en = request.getAttributeNames(); en.hasMoreElements(); ) {
for (Enumeration en = request.getAttributeNames(); en.hasMoreElements(); ) {
String name = (String)en.nextElement();
String name = (String)en.nextElement();
Object value = request.getAttribute(name);
Object value = request.getAttribute(name);
log("attribute: " + name + "=" + value.toString());
log("attribute: " + name + "=" + value.toString());
}
}
*/
*/
// For example, a filter might append something to the response.
// For example, a filter might append something to the response.
/*
/*
PrintWriter respOut = new PrintWriter(response.getWriter());
PrintWriter respOut = new PrintWriter(response.getWriter());
respOut.println("<P><B>This has been appended by an intrusive filter.</B>");
respOut.println("<P><B>This has been appended by an intrusive filter.</B>");
*/
*/
}
}
/**
/**
*
*
* @param request The servlet request we are processing
* @param request The servlet request we are processing
* @param response The servlet response we are creating
* @param response The servlet response we are creating
* @param chain The filter chain we are processing
* @param chain The filter chain we are processing
*
*
* @exception IOException if an input/output error occurs
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
* @exception ServletException if a servlet error occurs
*/
*/
public
void
doFilter
(
ServletRequest
request
,
ServletResponse
response
,
public
void
doFilter
(
ServletRequest
request
,
ServletResponse
response
,
FilterChain
chain
)
FilterChain
chain
)
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
doBeforeProcessing
(
request
,
response
,
chain
);
doBeforeProcessing
(
request
,
response
,
chain
);
// chain.doFilter(request, response);
// chain.doFilter(request, response);
doAfterProcessing
(
request
,
response
);
doAfterProcessing
(
request
,
response
);
}
}
/**
/**
* Return the filter configuration object for this filter.
* Return the filter configuration object for this filter.
*/
*/
public
FilterConfig
getFilterConfig
()
{
public
FilterConfig
getFilterConfig
()
{
return
(
this
.
filterConfig
);
return
(
this
.
filterConfig
);
}
}
/**
/**
* Set the filter configuration object for this filter.
* Set the filter configuration object for this filter.
*
*
* @param filterConfig The filter configuration object
* @param filterConfig The filter configuration object
*/
*/
public
void
setFilterConfig
(
FilterConfig
filterConfig
)
{
public
void
setFilterConfig
(
FilterConfig
filterConfig
)
{
this
.
filterConfig
=
filterConfig
;
this
.
filterConfig
=
filterConfig
;
}
}
/**
/**
* Destroy method for this filter
* Destroy method for this filter
*/
*/
public
void
destroy
()
{
public
void
destroy
()
{
}
}
/**
/**
* Init method for this filter
* Init method for this filter
*/
*/
public
void
init
(
FilterConfig
filterConfig
)
{
public
void
init
(
FilterConfig
filterConfig
)
{
this
.
filterConfig
=
filterConfig
;
this
.
filterConfig
=
filterConfig
;
if
(
filterConfig
!=
null
)
{
if
(
filterConfig
!=
null
)
{
}
}
}
}
/**
/**
* Return a String representation of this object.
* Return a String representation of this object.
*/
*/
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
if
(
filterConfig
==
null
)
{
if
(
filterConfig
==
null
)
{
return
(
"RequestsFilter()"
);
return
(
"RequestsFilter()"
);
}
}
StringBuffer
sb
=
new
StringBuffer
(
"RequestsFilter("
);
StringBuffer
sb
=
new
StringBuffer
(
"RequestsFilter("
);
sb
.
append
(
filterConfig
);
sb
.
append
(
filterConfig
);
sb
.
append
(
")"
);
sb
.
append
(
")"
);
return
(
sb
.
toString
());
return
(
sb
.
toString
());
}
}
private
void
sendProcessingError
(
Throwable
t
,
ServletResponse
response
)
{
private
void
sendProcessingError
(
Throwable
t
,
ServletResponse
response
)
{
String
stackTrace
=
getStackTrace
(
t
);
String
stackTrace
=
getStackTrace
(
t
);
if
(
stackTrace
!=
null
&&
!
stackTrace
.
equals
(
""
))
{
if
(
stackTrace
!=
null
&&
!
stackTrace
.
equals
(
""
))
{
try
{
try
{
response
.
setContentType
(
"text/html"
);
response
.
setContentType
(
"text/html"
);
PrintStream
ps
=
new
PrintStream
(
response
.
getOutputStream
());
PrintStream
ps
=
new
PrintStream
(
response
.
getOutputStream
());
PrintWriter
pw
=
new
PrintWriter
(
ps
);
PrintWriter
pw
=
new
PrintWriter
(
ps
);
pw
.
print
(
"<html>\n<head>\n<title>Error</title>\n</head>\n<body>\n"
);
//NOI18N
pw
.
print
(
"<html>\n<head>\n<title>Error</title>\n</head>\n<body>\n"
);
//NOI18N
// PENDING! Localize this for next official release
// PENDING! Localize this for next official release
pw
.
print
(
"<h1>The resource did not process correctly</h1>\n<pre>\n"
);
pw
.
print
(
"<h1>The resource did not process correctly</h1>\n<pre>\n"
);
pw
.
print
(
stackTrace
);
pw
.
print
(
stackTrace
);
pw
.
print
(
"</pre></body>\n</html>"
);
//NOI18N
pw
.
print
(
"</pre></body>\n</html>"
);
//NOI18N
pw
.
close
();
pw
.
close
();
ps
.
close
();
ps
.
close
();
response
.
getOutputStream
().
close
();
response
.
getOutputStream
().
close
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
}
}
else
{
}
else
{
try
{
try
{
PrintStream
ps
=
new
PrintStream
(
response
.
getOutputStream
());
PrintStream
ps
=
new
PrintStream
(
response
.
getOutputStream
());
t
.
printStackTrace
(
ps
);
t
.
printStackTrace
(
ps
);
ps
.
close
();
ps
.
close
();
response
.
getOutputStream
().
close
();
response
.
getOutputStream
().
close
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
}
}
}
}
}
public
static
String
getStackTrace
(
Throwable
t
)
{
public
static
String
getStackTrace
(
Throwable
t
)
{
String
stackTrace
=
null
;
String
stackTrace
=
null
;
try
{
try
{
StringWriter
sw
=
new
StringWriter
();
StringWriter
sw
=
new
StringWriter
();
PrintWriter
pw
=
new
PrintWriter
(
sw
);
PrintWriter
pw
=
new
PrintWriter
(
sw
);
t
.
printStackTrace
(
pw
);
t
.
printStackTrace
(
pw
);
pw
.
close
();
pw
.
close
();
sw
.
close
();
sw
.
close
();
stackTrace
=
sw
.
getBuffer
().
toString
();
stackTrace
=
sw
.
getBuffer
().
toString
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
}
return
stackTrace
;
return
stackTrace
;
}
}
public
void
log
(
String
msg
)
{
public
void
log
(
String
msg
)
{
filterConfig
.
getServletContext
().
log
(
msg
);
filterConfig
.
getServletContext
().
log
(
msg
);
}
}
}
}
src/main/java/asistencia/utilities/GeneralUtils.java
View file @
3eebd824
...
@@ -5,22 +5,38 @@
...
@@ -5,22 +5,38 @@
*/
*/
package
asistencia
.
utilities
;
package
asistencia
.
utilities
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
/**
*
*
* @author sistem08user
* @author sistem08user
*/
*/
public
class
GeneralUtils
{
public
class
GeneralUtils
{
public
static
int
obtenerIndex
(
String
ruta
){
char
[]
c
=
ruta
.
toCharArray
();
public
static
int
obtenerIndex
(
String
ruta
)
{
int
salida
=
0
;
char
[]
c
=
ruta
.
toCharArray
();
for
(
int
i
=
c
.
length
-
1
;
i
>=
0
;
i
--)
{
int
salida
=
0
;
String
help
=
c
[
i
]+
""
;
for
(
int
i
=
c
.
length
-
1
;
i
>=
0
;
i
--)
{
if
(!
help
.
equals
(
"/"
)){
String
help
=
c
[
i
]
+
""
;
salida
=
i
;
if
(!
help
.
equals
(
"/"
))
{
}
else
{
salida
=
i
;
break
;
}
else
{
}
break
;
}
}
return
salida
;
}
}
return
salida
;
}
public
static
String
obtenerURIvista
(
String
ruta
)
{
String
rutaVista
=
""
;
String
patron
=
".*/vistas/(.*)"
;
Pattern
pattern
=
Pattern
.
compile
(
patron
);
Matcher
matcher
=
pattern
.
matcher
(
ruta
);
if
(
matcher
.
find
())
{
rutaVista
=
matcher
.
group
(
1
);
}
return
rutaVista
;
}
}
}
src/main/webapp/vistas/__template.jsp
View file @
3eebd824
<
%@
include
file=
"templates/validar.jsp"
%
>
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<
%@
include
file=
"templates/header.jsp"
%
>
<jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<!--template-core-->
<!--template-core-->
<!--css de la pagina-->
<!--css de la pagina-->
<!--css-->
<!--css-->
</head>
</head>
<body>
<body>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<!-- content -->
<!-- content -->
<!-- / content -->
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<!--js-->
<!--js-->
</body>
</body>
</html>
</html>
\ No newline at end of file
src/main/webapp/vistas/main.jsp
View file @
3eebd824
<
%@
include
file=
"templates/validar.jsp"
%
>
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<
%@
include
file=
"templates/header.jsp"
%
>
<jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<!--template-core-->
<!--template-core-->
<!--css-->
<!--css-->
<!--css-->
<!--css-->
</head>
</head>
<body>
<body>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<!-- content -->
<!-- content -->
<!-- / content -->
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<!--js-->
<!--js-->
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/selects/bootstrap_select.min.js"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/forms/selects/bootstrap_select.min.js"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/pages/form_bootstrap_select.js"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/pages/form_bootstrap_select.js"
></script>
<script>
<script>
((
window
)
=>
{
((
window
)
=>
{
window
.
history
.
replaceState
({},
''
,
'main.jsp'
);
window
.
history
.
replaceState
({},
''
,
'main.jsp'
);
})(
window
);
})(
window
);
</script>
</script>
</body>
</body>
</html>
</html>
src/main/webapp/vistas/modals/administrativos/montosAdministrativos/detalleMontosAdministrativos.jsp
View file @
3eebd824
<
%
--
<%@
include
file=
"templates/validar.jsp"
%
>
--%
>
<
jsp:include
page=
"/vistas/templates/validar.jsp"
/
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<
%@
include
file=
"templates/header.jsp"
%
>
<
jsp:include
page=
"/vistas/templates/header.jsp"
/
>
<!--template-core-->
<!--template-core-->
<!--css de la pagina-->
<!--css de la pagina-->
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
<!--css-->
</head>
</head>
<body>
<body>
<
%@
include
file=
"../../templates/header-body.jsp"
%
>
<
jsp:include
page=
"/vistas/templates/header-body.jsp"
/
>
<!-- content -->
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel panel-primary"
>
...
@@ -55,15 +55,15 @@
...
@@ -55,15 +55,15 @@
</div>
</div>
<!-- / content -->
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<
jsp:include
page=
"/vistas/templates/footer-body.jsp"
/
>
<!--js de la pagina-->
<!--js de la pagina-->
<script
src=
"
..
/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/pickers/datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/pickers/datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/js/lib/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"
..
/js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"
..
/js/pages/detalle_montos_administrativos.js"
type=
"text/javascript"
></script>
<script
src=
"
${pageContext.request.contextPath}
/js/pages/detalle_montos_administrativos.js"
type=
"text/javascript"
></script>
<!--js-->
<!--js-->
</body>
</body>
...
...
src/main/webapp/vistas/templates/footer-body.jsp
View file @
3eebd824
<!-- Footer -->
<!-- Footer -->
<div class="footer text-muted">
<div class="footer text-muted">
© 2018. <a href="#">Trismegisto Asistencia</a> <a href="#"></a>
© 2018. <a href="#">Trismegisto Asistencia</a> <a href="#"></a>
</div>
</div>
<!-- /footer -->
<!-- /footer -->
...
@@ -17,25 +17,25 @@
...
@@ -17,25 +17,25 @@
</div>
</div>
<!-- /page container -->
<!-- /page container -->
<!-- Core JS files -->
<!-- Core JS files -->
<script
type="text/javascript" src="..
/plantilla/assets/js/plugins/loaders/pace.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/plugins/loaders/pace.min.js"></script>
<script
type="text/javascript" src="..
/plantilla/assets/js/core/libraries/jquery.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/core/libraries/jquery.min.js"></script>
<script src="
..
/js/lib/jquery.cookie.js" type="text/javascript"></script>
<script src="
${pageContext.request.contextPath}
/js/lib/jquery.cookie.js" type="text/javascript"></script>
<script
type="text/javascript" src="..
/plantilla/assets/js/core/libraries/bootstrap.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/core/libraries/bootstrap.min.js"></script>
<script
type="text/javascript" src="..
/plantilla/assets/js/plugins/loaders/blockui.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/plugins/loaders/blockui.min.js"></script>
<script
type="text/javascript" src="..
/plantilla/assets/js/plugins/forms/styling/switchery.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/plugins/forms/styling/switchery.min.js"></script>
<script
type="text/javascript" src="..
/plantilla/assets/js/plugins/forms/styling/uniform.min.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/plugins/forms/styling/uniform.min.js"></script>
<!--<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>-->
<!--<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>-->
<script
type="text/javascript" src="..
/plantilla/assets/js/core/app.js"></script>
<script
src="${pageContext.request.contextPath}
/plantilla/assets/js/core/app.js"></script>
<!-- /core JS files -->
<!-- /core JS files -->
<!--axios-->
<!--axios-->
<script src="
..
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
<script src="
${pageContext.request.contextPath}
/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
<script src="
..
/js/lib/axios.min.js" type="text/javascript"></script>
<script src="
${pageContext.request.contextPath}
/js/lib/axios.min.js" type="text/javascript"></script>
<script src="
..
/js/lib/sweetalert2.min.js" type="text/javascript"></script>
<script src="
${pageContext.request.contextPath}
/js/lib/sweetalert2.min.js" type="text/javascript"></script>
<!-- /Generales -->
<!-- /Generales -->
<script src="../js/general.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/general.js" type="text/javascript"></script>
<script src="../js/pages/navbar.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/pages/navbar.js" type="text/javascript"></script>
<script src="../js/pages/sidebar.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/pages/sidebar.js" type="text/javascript"></script>
\ No newline at end of file
\ No newline at end of file
src/main/webapp/vistas/templates/header-body.jsp
View file @
3eebd824
<
%@include file="navbar.jsp" %
>
<
jsp:include page="navbar.jsp" /
>
<!-- Page container -->
<!-- Page container -->
<div class="page-container">
<div class="page-container">
<!-- Page content -->
<!-- Page content -->
<div class="page-content">
<div class="page-content">
<%@include file="sidebar.jsp" %
>
<jsp:include page="sidebar.jsp" /
>
<!-- Main content -->
<!-- Main content -->
<div class="content-wrapper">
<div class="content-wrapper">
<!-- Content area -->
<!-- Content area -->
<div class="content">
<div class="content">
\ No newline at end of file
\ No newline at end of file
src/main/webapp/vistas/templates/header.jsp
View file @
3eebd824
...
@@ -4,22 +4,22 @@
...
@@ -4,22 +4,22 @@
<title>Trismegisto Asistencia</title>
<title>Trismegisto Asistencia</title>
<!-- Global stylesheets -->
<!-- Global stylesheets -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="
..
/plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="
${pageContext.request.contextPath}
/plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="
..
/css/general.css" rel="stylesheet" type="text/css"/>
<link href="
${pageContext.request.contextPath}
/css/general.css" rel="stylesheet" type="text/css"/>
<!-- /global stylesheets -->
<!-- /global stylesheets -->
<script src="
..
/js/lib/cookies.js" type="text/javascript"></script>
<script src="
${pageContext.request.contextPath}
/js/lib/cookies.js" type="text/javascript"></script>
<!--<script src="../js/pages/validate.js" type="text/javascript"></script>-->
<!--<script src="../js/pages/validate.js" type="text/javascript"></script>-->
<script>
<script>
var sidebar = <%=(String) request.getSession().getAttribute("menu")%>;
var sidebar = <%=(String) request.getSession().getAttribute("menu")%>;
var nombreUsuario = "<%=(String) request.getSession().getAttribute("nombre")%>";
var nombreUsuario = "<%=(String) request.getSession().getAttribute("nombre")%>";
var rolesUsuario = "<%=(String) request.getSession().getAttribute("roles")%>";
var rolesUsuario = "<%=(String) request.getSession().getAttribute("roles")%>";
var contextPath = "${pageContext.request.contextPath}/";
var contextPath = "${pageContext.request.contextPath}/";
</script>
</script>
\ No newline at end of file
src/main/webapp/vistas/templates/navbar.jsp
View file @
3eebd824
<!-- Main navbar -->
<!-- Main navbar -->
<div class="navbar navbar-default header-highlight">
<div class="navbar navbar-default header-highlight">
<div class="navbar-header">
<div class="navbar-header">
<a class="navbar-brand" href="..
/vistas/main.jsp"><img src="${pageContext.request.contextPath}/plantilla/assets/images/logo_light.png" alt=""></a>
<a class="navbar-brand" href="${pageContext.request.contextPath}
/vistas/main.jsp"><img src="${pageContext.request.contextPath}/plantilla/assets/images/logo_light.png" alt=""></a>
<ul class="nav navbar-nav visible-xs-block">
<ul class="nav navbar-nav visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
</ul>
</ul>
</div>
</div>
<div class="navbar-collapse collapse" id="navbar-mobile">
<div class="navbar-collapse collapse" id="navbar-mobile">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav">
<li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>
<li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>
</ul>
</ul>
<ul class="nav navbar-nav navbar-right">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown language-switch">
<li class="dropdown language-switch">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="${pageContext.request.contextPath}/plantilla/assets/images/flags/gb.png" class="position-left " alt="">
<img src="${pageContext.request.contextPath}/plantilla/assets/images/flags/gb.png" class="position-left " alt="">
Sistemas
Sistemas
<span class="caret"></span>
<span class="caret"></span>
</a>
</a>
<ul class="dropdown-menu" id="proyectos">
<ul class="dropdown-menu" id="proyectos">
</ul>
</ul>
</li>
</li>
<li class="dropdown dropdown-user">
<li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown">
<img src="" class="avatar" alt="" >
<img src="" class="avatar" alt="" >
<span class="usuario-nombre"></span>
<span class="usuario-nombre"></span>
<i class="caret"></i>
<i class="caret"></i>
</a>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<ul class="dropdown-menu dropdown-menu-right">
<li>
<li>
<a id="logOut">
<a id="logOut">
<i class="fa fa-sign-out"></i> Salir
<i class="fa fa-sign-out"></i> Salir
</a>
</a>
</li>
</li>
<!--<li><a href="#" id="logOut"><i class="icon-switch2"></i> Logout</a></li>-->
<!--<li><a href="#" id="logOut"><i class="icon-switch2"></i> Logout</a></li>-->
</ul>
</ul>
</li>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
<!-- /main navbar -->
<!-- /main navbar -->
\ No newline at end of file
src/main/webapp/vistas/templates/sidebar.jsp
View file @
3eebd824
<!-- Main sidebar -->
<!-- Main sidebar -->
<div class="sidebar sidebar-main">
<div class="sidebar sidebar-main">
<div class="sidebar-content">
<div class="sidebar-content">
<!-- User menu -->
<!-- User menu -->
<div class="sidebar-user">
<div class="sidebar-user">
<div class="category-content tp-sidebar-category-content">
<div class="category-content tp-sidebar-category-content">
<a href="main.jsp" class="media-left" style="padding-right: 0px;">
<a href="
${pageContext.request.contextPath}/
main.jsp" class="media-left" style="padding-right: 0px;">
<!--box-shadow: 0px 0px 13px 0px rgba(0,0,0,0.75);-->
<!--box-shadow: 0px 0px 13px 0px rgba(0,0,0,0.75);-->
<img alt="Avatar usuario" class="avatar" style=" border-radius: 50%; border:2px solid white;">
<img alt="Avatar usuario" class="avatar" style=" border-radius: 50%; border:2px solid white;">
</a>
</a>
...
...
src/main/webapp/vistas/templates/validar.jsp
View file @
3eebd824
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
System.out.println("Validando...");
System.out.println("Validando...");
if (session.getAttribute("usuario") == null) {
if (session.getAttribute("usuario") == null) {
response.sendRedirect(
"
main.jsp");
response.sendRedirect(
request.getContextPath() + "/vistas/
main.jsp");
}
}
%>
%>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment