-
Notifications
You must be signed in to change notification settings - Fork 1
Avance 22 Diciembre 2012 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peverell92
wants to merge
1
commit into
madodela:master
Choose a base branch
from
peverell92:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| <%-- | ||
| Document : bajas | ||
| Created on : 21/12/2012, 05:25:05 PM | ||
| Author : LUIS | ||
| --%> | ||
|
|
||
| <%@page contentType="text/html" pageEncoding="UTF-8"%> | ||
| <jsp:useBean id="dbConn" class="mysql.MySqlConn"/> | ||
| <!DOCTYPE html> | ||
|
|
||
| <% | ||
| //Recoger los datos de la base de datos para construir la matriz | ||
| int n=0; | ||
| String query = "select id,username,email,school,area from users where `id` != '1';"; | ||
| dbConn.Consult(query); | ||
|
|
||
| //Vemos si hubo resultados y contamos cuantos hubo | ||
| if(dbConn.rs != null){ | ||
| try{ | ||
| dbConn.rs.last(); | ||
| n = dbConn.rs.getRow(); | ||
| dbConn.rs.first(); | ||
| } | ||
| catch(Exception e){ | ||
| } | ||
| } | ||
|
|
||
| //Construimos matriz con los resultados obtenidos | ||
| String [][] matriz = new String[n][5]; | ||
|
|
||
| //guarda en la matriz los datos de la base de datos | ||
| int i = 0; | ||
| int index = 0; | ||
| do{ | ||
| matriz[i][0] = dbConn.rs.getString("id"); | ||
| matriz[i][1] = dbConn.rs.getString("username"); | ||
| matriz[i][2] = dbConn.rs.getString("email"); | ||
| matriz[i][3] = dbConn.rs.getString("school"); | ||
| matriz[i][4] = dbConn.rs.getString("area"); | ||
| i++; | ||
| }while(dbConn.rs.next()); | ||
|
|
||
| dbConn.desConnect(); | ||
| %> | ||
|
|
||
| <html> | ||
| <head> | ||
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
| <link rel="StyleSheet" href="stylesheets/alta-Style.css" type="text/css"> | ||
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> | ||
| <script src="signupboxevents.js"></script> | ||
| <title>Feisbun | Bajas</title> | ||
| </head> | ||
| <body> | ||
| <div class="navbar"> | ||
| <div class="navbar-container"> | ||
| <table class="navbar-container"> | ||
| <tr> | ||
| <td><div class="imagelogo"></div></td> | ||
| <td> | ||
| <div class="welcome"> | ||
| <p>Bienvenido <b><%=(String) session.getAttribute("fullname")%></b>!</p> | ||
| </div> | ||
| </td> | ||
| <td> | ||
| <div class="logout"> | ||
| <form action="j_signout.jsp" method="post"> | ||
| <button class="buttonOut signout">Salir</button> | ||
| </form> | ||
| </div> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="barraAdmin"> | ||
| <table> | ||
| <tr> | ||
| <td><a href="altas.jsp">Dar de alta un usuario</a></td><td> </td> | ||
| <td><a href="bajas.jsp">Dar de baja un usuario</a></td><td> </td> | ||
| <td><a href="j_cambios.jsp">Cambiar datos</a></td> | ||
| <td><a href="main.jsp">Inicio</a></td> | ||
| </tr> | ||
| </table> | ||
| </div> | ||
|
|
||
| <div class="content"> | ||
| <div class="container"> | ||
| <div class="slogan floatingblock"> | ||
| <p>Bajas de usuarios</p> | ||
| </div> | ||
|
|
||
| <div class="sign-up-form floatingblock"> | ||
| <div class="error-messages"> | ||
| <%if (request.getParameter("db-error") != null) {%> | ||
| <p class="errordb"><%=request.getParameter("db-error")%></p> | ||
| <%}%> | ||
| <p class="error emailmismatch">Los emails no coinciden</p> | ||
| <p class="error emptyfield">Hay uno o varios cuadros sin llenar</p> | ||
| <p class="error invalidemail">El email es invalido. Debe de terminar en <em>@feisbun.com</em></p> | ||
| </div> | ||
| <br><br> | ||
| <%for(int x=0; x<n; x++){ | ||
| out.print("<br><br><table border=\"5\" width=\"100%\"><tr>"); | ||
| out.print("<td>Usuario: " + matriz[x][1] + "</td>"); | ||
| out.print("<td>e-mail: " + matriz[x][2] + "</td></tr>"); | ||
| out.print("<tr><td>Escuela: " + matriz[x][3] + "</td>"); | ||
| out.print("<td>Area: " + matriz[x][4] + "</td></tr>"); | ||
| out.print("<tr><td colspan=\"2\">"); %> | ||
| <form action="j_deleteUser.jsp" method="post"> | ||
| <%out.print("<input type=\"hidden\" name=\"identif\" value=\"" + | ||
| matriz[x][0] + "\">");%> | ||
| <input type="submit" value="Dar de baja"></form> | ||
| <% out.print("</td></tr>"); | ||
| }%> | ||
|
|
||
| </div> | ||
|
|
||
| </div> | ||
| </div> | ||
|
|
||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <%-- | ||
| Document : j_deleteUser | ||
| Created on : 21-dic-2012, 07:41:39 PM | ||
| Author : LUIS | ||
| --%> | ||
|
|
||
| <%@page contentType="text/html" pageEncoding="UTF-8"%> | ||
| <jsp:useBean id="dbConn" class="mysql.MySqlConn"/> | ||
| <% | ||
| int id_usr = 0; | ||
| if(request.getParameter("identif") != null) | ||
| id_usr = Integer.parseInt(request.getParameter("identif")); | ||
|
|
||
| String query = "delete from `feisbun`.`users` where `id`='" + id_usr + "';"; | ||
|
|
||
| dbConn.Update(query); | ||
| dbConn.desConnect(); | ||
| %> | ||
| <jsp:forward page="bajas.jsp"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Este fue el nuevo nombre que quedo en el comentario aunque el archivo se llama altas?