|
161
|
Programación / Desarrollo Web / alguien que me ayude o guie php botton agregar
|
en: 17 Junio 2015, 02:02 am
|
como puedo hacer para que mi botton de add kids ya funcione con php oh bien quien me lo haga seria util necesito saber como hacerlo uno <!DOCTYPE HTML> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/login.css"> <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <a class="navbar-brand" href="#">Daycare </a> <ul class="nav navbar-nav navbar-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user">Profile </span><span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#"><span class="glyphicon glyphicon-cog"></span>Settings </a></li> <li><a href="#"><span class="glyphicon glyphicon-edit"></span>Edit </a></li> <li><a href="#"><span class="glyphicon glyphicon-repeat"></span>Change your password </a></li> <li class="divider"></li> <li><a href="#"><span class="glyphicon glyphicon-off">Sign out </span></a></li> <ul class="nav navbar-nav navbar-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-flag">Reports </span><span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="#">Top seller list </a></li> <li><a href="#">Top seller list </a></li> <ul class="nav navbar-nav navbar-right"> <li><a href="#"><span class="glyphicon glyphicon-home">Parents </span></a></li> <li><a href="#"><span class="glyphicon glyphicon-home">Category </span></a></li> </nav> <ul class="nav nav-pills nav-stacked"> <li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span>Home </a></li> <li><a href="#">Users </a></li> <div class="col-md-9 well"> <form class="navbar-form navbar-left" role="search"> <input type="submit" id="add" class="btn btn-success" value="add kids"> <input type="text" class="form-control" placeholder="search">
* { /*#5cb85c*/ margin: 0%; padding: 0%; } html,body { } nav { display:block; } .navbar-default { background-color: #5cb85c; border-color:#e7e7e7; } .navbar-collapse { border-color:red; } .navbar-default .navbar-brand { color:white; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #3498db; background-color: transparent; } .navbar-default .navbar-nav > li > a { color: white; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #3498db; background-color: transparent; } .container { padding-right: -7%; padding-left: -7%; margin-right: auto; margin-left: auto; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 80%; } } @media (min-width: 2560px) { .container { width: 80%; } } @media (min-width: 1024px) { .container { width: 80%; } } .row { margin-right: 6%; margin-left: -10%; } @media (min-width: 992px) { .col-md-3 { float: left; } .col-md-3 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col-md-3 { width: 25%; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus{ color: #fff; background-color: #5cb85c; } .form-control { display: block; width: 100%; height: 6%; padding: 4px 12px; font-size: 14px; margin-left: 10em; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; } .well { min-height: 5%; padding: 0.7%; margin-bottom: 5%; }
me falta como hacer el script para agregar y me vaya desplegando uno por uno como tabla
|
|
|
162
|
Programación / Programación C/C++ / quien me puede ayudar en el error
|
en: 15 Junio 2015, 01:44 am
|
quien me puede ayudar en el error de la parte de eliminar #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <conio.h> #include <string.h> /*malloc-free-alloc-realloc unsigned*/ struct nodo{//DEFINE LA ESTRUCTURA char nombre[128]; char fecha[10]; int cuenta; float saldo; struct nodo *ant, *sig; //SE CREA EL APUNTADOR DEL TAMAÑO DE UN NODO SIMILAR }; typedef struct nodo NODO;//DEFINE TIPO DE DATO A PARTIR DE LA ESTRUCTURA DE nodo typedef NODO *NODOPTR;//DEFINE UN TIPO DE APUNTADOR BASADO EN EL TAMAÑO DE NODO int isEmpty(NODOPTR cima){//RECIBE LA CIMA PARA LA COMPARACION return (cima == NULL); } void add(NODOPTR * cima,char nombre[128],char fecha[10],int cuenta,float saldo){ NODOPTR nuevo;//APUNTADOR PARA EL NUEVO DATO NODOPTR actual;//APUNTADOR TEMPORAL QUE SE UTILIZA CUANDO EXISTE AL MENOS UN DATO nuevo = (NODO *) malloc(sizeof(NODO ));//REGRESA LA DIRECCION DE UN BLOQUE DE MEMORIA EN EL CUAL SE ASIGNARAN LOS VALORES if(nuevo==NULL){ printf("No se puede agregar"); }else{ if(isEmpty(*cima)){//SE ASIGNAN LOS VALORES RECIBIDOS POR LA FUNCION nuevo->cuenta = cuenta; nuevo->saldo = saldo; nuevo->sig = NULL;//SE ASIGNA NULO POR QUE EL PRIMERO *cima = nuevo;//AL SER EL PRIMERO SE ESTABLECE COMO LA CIMA }else{ actual = *cima;//SE ALMACENA EL APUNTADOR DE LA CIMA ACTUAL while(actual->sig != NULL){//SE RECORREN TODOS LOS ELEMENTOS DE LA COLA HASTA ENCONTRAR UN VALOR "NULL" EN LA PROPIEDAD DE SIGUIENTE actual = actual->sig;//SE ASIGNA LA ESTRUCTURA SIGUIENTE A LA ACTUAL } nuevo->cuenta = cuenta; nuevo->saldo = saldo; nuevo->sig = NULL; actual->sig = nuevo;//SE ASIGNA EL APUNTADOR DEL NUEVO ELEMENTO AL ULTIMO } } } void remove(NODOPTR *cima ){//RECIBE EL APUNTADOR DONDE SE ENCUENTRA LA CIMA NODOPTR temp;//SE CREA UN NODO TEMPORAL temp = *cima;//ALMACENA EL APUNTADOR DE LA CIMA *cima = (*cima)->sig;//SE ALMACENA EL APUNTADOR DEL SIGUIENTE ELEMENTO EN LA LOCACION DE LA CIMA free(temp );//SE LIBERA LA LOCACION DE MEMORIA TEMPORAL DONDE SE ENCONTRABA LA CIMA ACTUAL } void show(NODOPTR cima){//RECIBE LA CIMA if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO printf("-----------------------------------------------------\n"); printf("Numero de cuenta:%d\n",cima ->cuenta ); printf("Nombre:%s\n",cima ->nombre ); printf("Fecha de nacimiento:%s\n",cima ->fecha ); printf("Saldo:%f:\n",cima ->saldo ); cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } } int find(NODOPTR cima,int cuenta){//RECIBE LA CIMA int found = 0; if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO if(cima->cuenta == cuenta){ found = 1; break; } cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } return found; } int edit(NODOPTR cima,int cuenta,char nombre[128],char fecha[10]){//RECIBE LA CIMA int success = 0; if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO if(cima->cuenta == cuenta){ success = 1; break; } cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } return success; } int deposito(NODOPTR cima,int cuenta,int cantidad){//RECIBE LA CIMA int success = 0; if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO if(cima->cuenta == cuenta){ cima->saldo+=cantidad; success = 1; break; } cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } return success; } int retirar(NODOPTR cima,int cuenta,int cantidad){//RECIBE LA CIMA int success = 0; if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO if(cima->cuenta == cuenta){ if(cima->saldo>=cantidad){ cima->saldo-=cantidad; success = 1; break; }else printf("No cuenta con el saldo suficiente\n"); } cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } return success; } //RETORNO DE APUNTADOR NODOPTR findptr(NODOPTR cima,int cuenta){//RECIBE LA CIMA NODOPTR found = NULL; if(cima == NULL){ }else{ while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO if(cima->cuenta == cuenta){ found = cima; break; } cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL } } return found; } int borrar(NODOPTR *ptr,int cuenta,NODOPTR *sig) { NODOPTR antesptr, actualptr, tempptr; if(cuenta == (*ptr)-> cuenta) { tempptr = *ptr; *ptr = (*ptr)->sig; (*ptr)-> ant = NULL; return cuenta; } else { antesptr = *ptr; actualptr = (*ptr)->sig; while(actualptr != NULL && actualptr->cuenta != cuenta) { antesptr = actualptr; actualptr = actualptr->sig; } if(actualptr != NULL) { tempptr = actualptr; antesptr->sig = actualptr->sig; actualptr = actualptr->sig; actualptr->ant = antesptr; return cuenta; } } return -1; } int main() { NODOPTR cima = NULL; NODOPTR inicio = NULL, actual = NULL; /*NODOPTR cuenta_1 = NULL; NODOPTR cuenta_2 = NULL;*/ int cuenta_1,cuenta_2; int x = 0; //Variables char nombre[128]; char fecha[10]; int cuenta; float cantidad; add(&cima,nombre,fecha,1,1000.00); add(&cima,nombre,fecha,2,1900.00); //show(cima); /*cuenta_1 = findptr(cima,1); cuenta_2 = findptr(cima,2); printf("%f\n",cuenta_1->saldo); printf("%f\n",cuenta_2->saldo); return 0; */ do{ printf("Seleccione una opcion\n"); printf("3.Desplegar cuentas\n"); switch(x){ case 1: printf("Ingrese el nombre del titular:\n"); gets(nombre );//fgets(nombre,sizeof(nombre),stdin); printf("Ingrese la fecha de nacimiento del titular:\n"); gets(fecha );//fgets(fecha,sizeof(fecha),stdin); do{ printf("Ingrese el numero de cuenta del titular:\n"); }while(find(cima,cuenta)==1); add(&cima,nombre,fecha,cuenta,0.00); break; case 2: do{ printf("Ingrese el numero de cuenta:\n"); }while((find(cima,cuenta))==0); if(cuenta != 0){ printf("Ingrese el nombre del titular:\n"); printf("Ingrese la fecha de nacimiento del titular:\n"); if(edit(cima,cuenta,nombre,fecha)==1) printf("Sus datos fueron almacenados\n"); else printf("Hubo un error al almacenar sus datos\n"); } break; case 3: show(cima); break; case 4: do{ printf("Ingrese el numero de cuenta:\n"); }while((find(cima,cuenta))==0); if(cuenta != 0){ printf("Ingrese la cantidad a depositar:\n"); if(deposito(cima,cuenta,cantidad)==1) printf("Deposito realizado con exito\n"); else printf("Hubo un error al depositar\n"); } break; case 5: do{ printf("Ingrese el numero de cuenta:\n"); }while((find(cima,cuenta))==0); if(cuenta != 0){ printf("Ingrese la cantidad a retirar:\n"); if(retirar(cima,cuenta,cantidad)==1) printf("Retiro realizado con exito\n"); else printf("Hubo un error al retirar\n"); } break; case 6: do{ printf("Ingrese el numero de cuenta benefactora:\n"); }while((find(cima,cuenta_1))==0); do{ printf("Ingrese el numero de cuenta beneficiario:\n"); }while((find(cima,cuenta_2))==0); if(cuenta_1 != 0 && cuenta_2 != 0){ printf("Ingrese la cantidad a transferir:\n"); if(retirar(cima,cuenta_1,cantidad)==1){ if(deposito(cima,cuenta_2,cantidad)) printf("Transferencia realizada con exito\n"); }else printf("Hubo un error al retirar\n"); } break; case 7: if(!isEmpy(inicio)) { printf("\n Cual cuenta sera borrado ?"); if(borrar(&actual,cuenta,&actual)) { printf("\n %d ha sido borrado",cuenta ); show(cima); } else printf("\n %d no pudo ser borrado",cuenta ); } else printf("\n La lista esta vacia "); break; } }while(x!=0); return 0; }
|
|
|
163
|
Programación / Desarrollo Web / alguien me puede ayudar con el nav bar
|
en: 13 Junio 2015, 00:55 am
|
alguien me puede ayudar con el nav bar para que sea adptable a cual monitor resposive disgn <link rel="stylesheet" href="css/main.css"/> <link rel="stylesheet" href="css/fonts/style.css"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <nav class="main_menu"> <li><span class="icon-flag"></span>reports <i aria-hidden="true" class="icon-chevron-down"></i></li> <li><span class="icon-user"></span>profile <i aria-hidden="true" class="icon-chevron-down"></i> </nav>
/*Universal*/ *{ margin:0px; padding:0px; font-family: helvetica Neue; font-weight: lighter; } html,body{ background: #16A085; } div#applicationform{ position: absolute; top:50%; left: 50%; margin-left: -15%; margin-top: -13%; width:30%; min-height: 30%; background: #dcdcdc; overflow: hidden; border-radius: 4%; } .sub-menu { display:none; position:absolute; } .main_menu li ul { display:none; } .main_menu li:hover > ul { display: inline-block; margin-left: -4%; width: 10%; padding: 0; background: #0D5488; } .main_menu { text-align:left; line-height: 290%; padding-left: 66%; background-color: #0D5488; } .main_menu li { display: inline-block; padding: 0 10px 0; font-family:arial; font-size: 100%; color:white; } .sideright { background-color: #e5e4d7; margin:3%; margin-left:1%; padding: 2%; font-size: 82%; float: left; max-width: 18%; } p#title{ font-size: 1.6em; text-align: center; margin-top: 20px; } input[type="text"], input[type="password"], input[type="mail"]{ width: 69%; height: 2.1em; margin-left: 15%; margin-top: 3%; padding-left: 3%; font-size: 1.1em; outline: none; border:0px; background-color: #ECF0F1; border-radius: 5px; } .login{ margin:4%; margin-left: 15%; margin-bottom: 10%; width:71%; height: 2.1em; outline: none; border: 0em; background-color: #16A085; color: white; font-size: 1.2em; border-radius: 5px; -webkit-box-shadow:0em 0em 0em; } .login:hover { background-color: #1abc9c; } .separator { } ol , ul { list-style: none; } .main_menu li:hover { background-color: #3498DB; } body,html#fade4 { background-color: white; } .container { width: 100%; margin: 0px auto; max-width: 100%; min-height: 20px; overflow: hidden; } i { padding:1%; }
|
|
|
166
|
Programación / PHP / Re: como puedo validar el login
|
en: 7 Junio 2015, 01:10 am
|
alguine me puede ayudar como puedo arreglar mi codigo php para no pasar los datos directos por POST <?php $User = $_REQUEST['User']; $Pass = $_REQUEST['Pass']; $conexion = mysql_connect("localhost","root") or die ("PROBLEMAS AL CONECTA EL SERVIDOR"); $estandar = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion); $admin = mysql_query("SELECT * FROM usuario where login = '".$User."' and adminpass = '".$Pass."'",$conexion); { header("Location: index.html"); }else { header("Location: index_employee.html"); } { header("Location: index.html"); }else { header("Location: index_admin.html"); } ?>
|
|
|
167
|
Programación / PHP / Re: como puedo validar el login
|
en: 6 Junio 2015, 00:49 am
|
como le puedo hacer porque al momento que intento meter el login de usuario normal me sale error y el de admin no
<?php $User = $_REQUEST['User']; $Pass = $_REQUEST['Pass'];
$conexion = mysql_connect("localhost","root") or die ("PROBLEMAS AL CONECTA EL SERVIDOR"); mysql_select_db("db_login",$conexion) or die ("PROBLEMAS A CONECTAR CON LA DB");
$employee = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion); $admin = mysql_query("SELECT * FROM usuario where login = '".$User."' and adminpass = '".$Pass."'",$conexion); if(mysql_num_rows($employee)==0) { header("Location: index.html");
}else { header("Location: index_employee.html"); } if(mysql_num_rows($admin)==0) { header("Location: index.html"); }else { header("Location: index_admin.html"); } ?>
|
|
|
168
|
Programación / PHP / como puedo validar el login
|
en: 4 Junio 2015, 23:05 pm
|
alguien me puede ayudar o guia como validad el login de php para cuando pongo la contraseña mal o usuario que no me deje pasar a otra pagina como esta osea que me mande una alerta o meensaje <!doctype html> <link rel="stylesheet" href="css/main.css"/> <div id="applicationform"> <p id="title">Welcome to </p> <form action="login.php" methos="POST"> <input type="mail" id="user" name="User" placeholder="Username" autocomplete="off"> <input type="password" id="pass" name="Pass" placeholder="Password"> <input type="submit" id="fade2" value="login" class="login" href="index.html">
<?php $User = $_REQUEST['User']; $Pass = $_REQUEST['Pass']; $conexion = mysql_connect("localhost","root") or die ("PROBLEMAS AL CONECTA EL SERVIDOR"); $estandar = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion); $admin = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion); { header("Location: index_empleado.html"); { header("Location: index_admin.html"); } ?>
|
|
|
169
|
Programación / Programación C/C++ / quien me ayuda hacer el de modificar
|
en: 6 Abril 2015, 02:47 am
|
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <windows.h> int ca=0; int buscar = 0; int x=0; int resp=0; int r3,m=0; char r[2]={0}; void gotoxy(int x, int y) { HANDLE hCon; hCon = GetStdHandle(STD_OUTPUT_HANDLE); COORD dwPos; dwPos.X = x; dwPos.Y= y; SetConsoleCursorPosition(hCon,dwPos); } struct salmunos { int matricula; char nom[15],pat[15],mat[15]; }alum[10]; struct scalif { int matricula; char materia[20]; float corte1,corte2,corte3,prom; }calif[10]; void registrar_alumnos() { do { scanf("%s", &alum [ca ]. nom); printf("\n\tApeido Paterno: "); scanf("%s", &alum [ca ]. pat); printf("\n\tApeido Materno: "); scanf("%s", &alum [ca ]. mat); scanf("%d", &alum [ca ]. matricula); ca++; gotoxy(5,0);printf("\n\tDesea almacenar mas datos? YES[1]/NO[2]: "); }while(resp!=2); } void mostrar_alumnos() { printf("\n\nlista de Alumnos\n"); if (ca == 0) { }else { for(int i=0; i < ca; i++) { printf("\nAlumno: %s %s %s ",alum [i ]. nom, alum [i ]. pat, alum [i ]. mat); printf("Matricula: %d\n\n",alum [i ]. matricula); } } } void buscar_alumnos() { int b = 0, c= 0; do { printf("Ingrese matricula: "); for(int i = 0; i<ca; i++) { if(alum[i].matricula == buscar) { b = 1; c = i; break; } } if(b == 1) { printf("\nEl nombre: %s", alum [c ]. nom); printf("\nEl apellido paterno: %s", alum [c ]. pat); printf("\nEl apellido materno: %s", alum [c ]. mat); } else { printf("Datos no encontrados"); } printf("\nDesea salir? YES[1]/NO[2]: "); }while(resp!=1); } void eleminar_alumnos() { do{ int b=0; printf("Ingrese la matricula: "); for(int y=0;y<10;y++) { if(alum[y].matricula==m) { printf("\nDatos a borrar...\n"); printf("\nMatricula:%d",alum [y ]. matricula); printf("\nNombre:%s",&alum [y ]. nom); printf("\nApellido Paterno:%s",&alum [y ]. pat); printf("\nApellido Materno:%s\n",&alum [y ]. mat); printf("\nDeseas dar de baja?"); { alum[y].matricula=alum[y+1].matricula; strcpy(alum [y ]. nom,alum [y +1]. nom); strcpy(alum [y ]. pat,alum [y +1]. pat); strcpy(alum [y ]. mat,alum [y +1]. mat); ca--; alum[y].matricula=0; printf("\nDatos Borrados...\n"); } } else { b++; } } if(b==10) { printf("\nLa matricula ingresada no existe...\n"); } }while(r3!=2); } void modificar() { } void menu1() { printf("\n\t\tREGISTRO DE ALMUNOS\n\n"); printf(" 2. Mostrar registro de matriculas y almunos \n"); printf(" 3. Mostrar datos de un alumno \n"); printf(" 5. Eliminar alumno del registro \n"); printf(" 6. Buscar nombre del alumno por matricula \n"); printf("\n Ingrese opcion : "); } /* MAIN ------------------------------------------------------------------------------*/ int main() { int op; do { menu1(); switch(op) { case 1: registrar_alumnos(); break; case 2: mostrar_alumnos(); break; case 5: eleminar_alumnos(); printf("\n\n\t\tAlumno eliminado ..!"); break; case 6: buscar_alumnos(); break; } } while(op!=7); return 0; }
|
|
|
170
|
Seguridad Informática / Hacking / alguien me ayuda con kali linux
|
en: 24 Marzo 2015, 02:10 am
|
al casi terminar de instalar kali linux me salio esto como lo puedo solucionar tengo windows xp 32bits me salio esto guru meditation virtualbox error critico
proporcione los contenidos del log Vbox.log y el archivo Vbox.png que puede encontrar en c:\documents and settings\XP\virtualBox\kali linux\logs
|
|
|
|
|
|
|