elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18
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

Código
  1. <!DOCTYPE HTML>
  2. <html lang="en">
  3. <meta charset="UTF-8">
  4. <title>Admin</title>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="stylesheet" href="css/bootstrap.css">
  7. <link rel="stylesheet" href="css/login.css">
  8. </head>
  9. <nav class="navbar navbar-default">
  10.  <div class="container-fluid">
  11.    <!-- Brand and toggle get grouped for better mobile display -->
  12.    <div class="navbar-header">
  13.      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  14.        <span class="icon-bar"></span>
  15.        <span class="icon-bar"></span>
  16.        <span class="icon-bar"></span>
  17.      </button>
  18.      <a class="navbar-brand" href="#">Daycare</a>
  19.    </div>
  20.    <ul class="nav navbar-nav navbar-right">
  21.        <li class="dropdown">
  22.          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user">Profile</span><span class="caret"></span></a>
  23.          <ul class="dropdown-menu" role="menu">
  24.            <li><a href="#"><span class="glyphicon glyphicon-cog"></span>Settings</a></li>
  25.            <li><a href="#"><span class="glyphicon glyphicon-edit"></span>Edit</a></li>
  26.            <li><a href="#"><span class="glyphicon glyphicon-repeat"></span>Change your password</a></li>
  27.            <li class="divider"></li>
  28.            <li><a href="#"><span class="glyphicon glyphicon-off">Sign out</span></a></li>
  29.          </ul>
  30.        </li>
  31.      </ul>
  32.      <ul class="nav navbar-nav navbar-right">
  33.        <li class="dropdown">
  34.          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-flag">Reports</span><span class="caret"></span></a>
  35.          <ul class="dropdown-menu" role="menu">
  36.            <li><a href="#">Top seller list</a></li>
  37.            <li><a href="#">Top seller list</a></li>
  38.          </ul>
  39.        </li>
  40.      </ul>
  41.      <ul>
  42.      <ul class="nav navbar-nav navbar-right">
  43.        <li><a href="#"><span class="glyphicon glyphicon-home">Parents</span></a></li>
  44.        <li><a href="#"><span class="glyphicon glyphicon-home">Category</span></a></li>
  45.      <ul>
  46. </nav>
  47.     <div class="container">
  48.    <div class="row">
  49.        <div class="col-md-3">
  50.            <ul class="nav nav-pills nav-stacked">
  51.                <li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span>Home</a></li>
  52.                <li><a href="#">Home</a></li>
  53.                 <li><a href="#">Home</a></li>
  54.                  <li><a href="#">Home</a></li>
  55.                   <li><a href="#">Home</a></li>
  56.                    <li><a href="#">Home</a></li>
  57.                     <li><a href="#">Users</a></li>
  58.            </ul>
  59.        </div>
  60.        <div class="col-md-9 well">
  61.           <div>
  62.              <form class="navbar-form navbar-left" role="search">
  63.                <input type="submit" id="add" class="btn btn-success" value="add kids">
  64.                <input type="text" class="form-control" placeholder="search">
  65.           </div>
  66.           </div>
  67.        </div>
  68.    </div>
  69. </div>
  70.  
  71.  <script src="js/jquery.js"></script>
  72.    <script src="js/bootstrap.min.js"></script>
  73. </body>
  74. </html>
  75.  
  76.  


Código
  1. *
  2. {
  3.  /*#5cb85c*/
  4. margin: 0%;
  5. padding: 0%;
  6. }
  7.  
  8. html,body
  9. {
  10.  
  11. }
  12. nav
  13. {
  14. display:block;
  15. }
  16.  
  17. .navbar-default
  18. {
  19. background-color: #5cb85c;
  20. border-color:#e7e7e7;
  21. }
  22.  
  23. .navbar-collapse
  24. {
  25. border-color:red;
  26. }
  27. .navbar-default .navbar-brand
  28. {
  29. color:white;
  30. }
  31.  
  32. .navbar-default .navbar-brand:hover,
  33. .navbar-default .navbar-brand:focus
  34. {
  35.  color: #3498db;
  36.  background-color: transparent;
  37. }
  38.  
  39. .navbar-default .navbar-nav > li > a {
  40.  color: white;
  41. }
  42.  
  43. .navbar-default .navbar-nav > li > a:hover,
  44. .navbar-default .navbar-nav > li > a:focus {
  45.  color: #3498db;
  46.  background-color: transparent;
  47. }
  48. .container {
  49.  padding-right: -7%;
  50.  padding-left: -7%;
  51.  margin-right: auto;
  52.  margin-left: auto;
  53. }
  54. @media (min-width: 768px) {
  55.  .container {
  56.    width: 750px;
  57.  }
  58. }
  59. @media (min-width: 992px) {
  60.  .container {
  61.    width: 970px;
  62.  }
  63. }
  64. @media (min-width: 1200px) {
  65.  .container {
  66.    width: 80%;
  67.  }
  68. }
  69.  
  70. @media (min-width: 2560px) {
  71.  .container {
  72.    width: 80%;
  73.  }
  74. }
  75.  
  76. @media (min-width: 1024px) {
  77.  .container {
  78.    width: 80%;
  79.  }
  80. }
  81.  
  82. .row {
  83.  margin-right: 6%;
  84.  margin-left: -10%;
  85. }
  86.  
  87. @media (min-width: 992px) {
  88.   .col-md-3
  89.  {
  90.    float: left;
  91.  }
  92.  
  93.  .col-md-3
  94.  {
  95.  position: relative;
  96.  min-height: 1px;
  97.  padding-right: 15px;
  98.  padding-left: 15px;
  99. }
  100.  
  101. .col-md-3 {
  102.    width: 25%;
  103.  }
  104.  
  105. .nav-pills > li.active > a,
  106. .nav-pills > li.active > a:hover,
  107. .nav-pills > li.active > a:focus{
  108.  color: #fff;
  109.  background-color: #5cb85c;
  110. }
  111.  
  112. .form-control {
  113.  display: block;
  114.  width: 100%;
  115.  height: 6%;
  116.  padding: 4px 12px;
  117.  font-size: 14px;
  118.  margin-left: 10em;
  119.  line-height: 1.42857143;
  120.  color: #555;
  121.  background-color: #fff;
  122.  background-image: none;
  123.  border: 1px solid #ccc;
  124.  border-radius: 4px;
  125. }
  126.  
  127. .well {
  128.  min-height: 5%;
  129.  padding: 0.7%;
  130.  margin-bottom: 5%;
  131. }
  132.  
  133.  

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

Código
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <windows.h>
  4. #include <conio.h>
  5. #include <string.h>
  6. /*malloc-free-alloc-realloc unsigned*/
  7. struct nodo{//DEFINE LA ESTRUCTURA
  8. char nombre[128];
  9. char fecha[10];
  10. int cuenta;
  11. float saldo;
  12. struct nodo  *ant, *sig; //SE CREA EL APUNTADOR DEL TAMAÑO DE UN NODO SIMILAR
  13. };
  14. typedef struct nodo NODO;//DEFINE TIPO DE DATO A PARTIR DE LA ESTRUCTURA DE nodo
  15. typedef NODO *NODOPTR;//DEFINE UN TIPO DE APUNTADOR BASADO EN EL TAMAÑO DE NODO
  16. int isEmpty(NODOPTR cima){//RECIBE LA CIMA PARA LA COMPARACION
  17. return (cima == NULL);
  18. }
  19. void add(NODOPTR * cima,char nombre[128],char fecha[10],int cuenta,float saldo){
  20. system("cls");
  21. NODOPTR nuevo;//APUNTADOR PARA EL NUEVO DATO
  22. NODOPTR actual;//APUNTADOR TEMPORAL QUE SE UTILIZA CUANDO EXISTE AL MENOS UN DATO
  23. nuevo = (NODO *) malloc(sizeof(NODO));//REGRESA LA DIRECCION DE UN BLOQUE DE MEMORIA EN EL CUAL SE ASIGNARAN LOS VALORES
  24. if(nuevo==NULL){
  25. printf("No se puede agregar");
  26. }else{
  27. if(isEmpty(*cima)){//SE ASIGNAN LOS VALORES RECIBIDOS POR LA FUNCION
  28. strcpy(nuevo->nombre,nombre);
  29. strcpy(nuevo->fecha,fecha);
  30. nuevo->cuenta = cuenta;
  31. nuevo->saldo = saldo;
  32. nuevo->sig = NULL;//SE ASIGNA NULO POR QUE EL PRIMERO
  33. *cima = nuevo;//AL SER EL PRIMERO SE ESTABLECE COMO LA CIMA
  34. }else{
  35. actual = *cima;//SE ALMACENA EL APUNTADOR DE LA CIMA ACTUAL
  36. while(actual->sig != NULL){//SE RECORREN TODOS LOS ELEMENTOS DE LA COLA HASTA ENCONTRAR UN VALOR "NULL" EN LA PROPIEDAD DE SIGUIENTE
  37. actual = actual->sig;//SE ASIGNA LA ESTRUCTURA SIGUIENTE A LA ACTUAL
  38. }
  39. strcpy(nuevo->nombre,nombre);
  40. strcpy(nuevo->fecha,fecha);
  41. nuevo->cuenta = cuenta;
  42. nuevo->saldo = saldo;
  43. nuevo->sig = NULL;
  44. actual->sig = nuevo;//SE ASIGNA EL APUNTADOR DEL NUEVO ELEMENTO AL ULTIMO
  45. }
  46. }
  47. }
  48. void remove(NODOPTR *cima){//RECIBE EL APUNTADOR DONDE SE ENCUENTRA LA CIMA
  49. NODOPTR temp;//SE CREA UN NODO TEMPORAL
  50. temp = *cima;//ALMACENA EL APUNTADOR DE LA CIMA
  51. *cima = (*cima)->sig;//SE ALMACENA EL APUNTADOR DEL SIGUIENTE ELEMENTO EN LA LOCACION DE LA CIMA
  52. free(temp);//SE LIBERA LA LOCACION DE MEMORIA TEMPORAL DONDE SE ENCONTRABA LA CIMA ACTUAL
  53. }
  54. void show(NODOPTR cima){//RECIBE LA CIMA
  55. system("cls");
  56. if(cima == NULL){
  57. printf("La cola esta vacia");
  58. }else{
  59. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  60. printf("-----------------------------------------------------\n");
  61. printf("Numero de cuenta:%d\n",cima->cuenta);
  62. printf("Nombre:%s\n",cima->nombre);
  63. printf("Fecha de nacimiento:%s\n",cima->fecha);
  64. printf("Saldo:%f:\n",cima->saldo);
  65. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  66. }
  67. }
  68. getch();
  69. }
  70. int find(NODOPTR cima,int cuenta){//RECIBE LA CIMA
  71. int found = 0;
  72. if(cima == NULL){
  73. printf("La cola esta vacia");
  74. }else{
  75. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  76. if(cima->cuenta == cuenta){
  77. found = 1;
  78. break;
  79. }
  80. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  81. }
  82. }
  83. return found;
  84. }
  85. int edit(NODOPTR cima,int cuenta,char nombre[128],char fecha[10]){//RECIBE LA CIMA
  86. int success = 0;
  87. if(cima == NULL){
  88. printf("La cola esta vacia");
  89. }else{
  90. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  91. if(cima->cuenta == cuenta){
  92. strcpy(cima->nombre,nombre);
  93. strcpy(cima->fecha,fecha);
  94. success = 1;
  95. break;
  96. }
  97. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  98. }
  99. }
  100. return success;
  101. }
  102. int deposito(NODOPTR cima,int cuenta,int cantidad){//RECIBE LA CIMA
  103. int success = 0;
  104. if(cima == NULL){
  105. printf("La cola esta vacia");
  106. }else{
  107. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  108. if(cima->cuenta == cuenta){
  109. cima->saldo+=cantidad;
  110. success = 1;
  111. break;
  112. }
  113. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  114. }
  115. }
  116. return success;
  117. }
  118. int retirar(NODOPTR cima,int cuenta,int cantidad){//RECIBE LA CIMA
  119. int success = 0;
  120. if(cima == NULL){
  121. printf("La cola esta vacia");
  122. }else{
  123. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  124. if(cima->cuenta == cuenta){
  125. if(cima->saldo>=cantidad){
  126. cima->saldo-=cantidad;
  127. success = 1;
  128. break;
  129. }else
  130. printf("No cuenta con el saldo suficiente\n");
  131. }
  132. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  133. }
  134. }
  135. return success;
  136. }
  137. //RETORNO DE APUNTADOR
  138. NODOPTR findptr(NODOPTR cima,int cuenta){//RECIBE LA CIMA
  139. NODOPTR found = NULL;
  140. if(cima == NULL){
  141. printf("La cola esta vacia");
  142. }else{
  143. while(cima != NULL){//RECORRE HASTA ENCONTRAR EL ULTIMO ELEMENTO
  144. if(cima->cuenta == cuenta){
  145. found = cima;
  146. break;
  147. }
  148. cima = cima->sig;//SE ASIGNA EL SIGUIENTE A LA CIMA ACTUAL
  149. }
  150. }
  151. return found;
  152. }
  153.  
  154. int borrar(NODOPTR *ptr,int cuenta,NODOPTR *sig)
  155. {
  156. NODOPTR antesptr, actualptr, tempptr;
  157. if(cuenta == (*ptr)-> cuenta)
  158. {
  159. tempptr = *ptr;
  160. *ptr = (*ptr)->sig;
  161. (*ptr)-> ant = NULL;
  162. free(tempptr);
  163. return cuenta;
  164. }
  165. else
  166. {
  167. antesptr = *ptr;
  168. actualptr = (*ptr)->sig;
  169. while(actualptr != NULL && actualptr->cuenta != cuenta)
  170. {
  171. antesptr = actualptr;
  172. actualptr = actualptr->sig;
  173. }
  174. if(actualptr != NULL)
  175. {
  176. tempptr = actualptr;
  177. antesptr->sig = actualptr->sig;
  178. actualptr = actualptr->sig;
  179. actualptr->ant = antesptr;
  180. free(tempptr);
  181.  
  182.         return cuenta;
  183. }
  184. }
  185. return -1;
  186. }
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193. int main()
  194. {
  195. NODOPTR cima = NULL;
  196. NODOPTR inicio = NULL, actual = NULL;
  197. /*NODOPTR cuenta_1 = NULL;
  198. NODOPTR cuenta_2 = NULL;*/
  199. int cuenta_1,cuenta_2;
  200. int x = 0;
  201. //Variables
  202. char nombre[128];
  203. char fecha[10];
  204. int cuenta;
  205. float cantidad;
  206. strcpy(nombre,"Roberto");
  207. strcpy(fecha,"1991-06-07");
  208. add(&cima,nombre,fecha,1,1000.00);
  209. strcpy(nombre,"Saul");
  210. strcpy(fecha,"1996-09-30");
  211. add(&cima,nombre,fecha,2,1900.00);
  212. //show(cima);
  213. /*cuenta_1 = findptr(cima,1);
  214. cuenta_2 = findptr(cima,2);
  215. printf("%f\n",cuenta_1->saldo);
  216. printf("%f\n",cuenta_2->saldo);
  217. return 0; */
  218. do{
  219. system("cls");
  220. printf("Seleccione una opcion\n");
  221. printf("1.Agregar\n");
  222. printf("2.Modificar\n");
  223. printf("3.Desplegar cuentas\n");
  224. printf("4.Deposito\n");
  225. printf("5.Retiro\n");
  226. printf("6.Transferencia\n");
  227. printf("7.Eliminar\n");
  228. printf("0.Salir\n");
  229. scanf("%d",&x);
  230. switch(x){
  231. case 1:
  232. system("cls");
  233. printf("Ingrese el nombre del titular:\n");
  234. fflush(stdin);
  235. gets(nombre);//fgets(nombre,sizeof(nombre),stdin);
  236. system("cls");
  237. printf("Ingrese la fecha de nacimiento del titular:\n");
  238. fflush(stdin);
  239. gets(fecha);//fgets(fecha,sizeof(fecha),stdin);
  240. do{
  241. system("cls");
  242. printf("Ingrese el numero de cuenta del titular:\n");
  243. scanf("%d",&cuenta);
  244. }while(find(cima,cuenta)==1);
  245. add(&cima,nombre,fecha,cuenta,0.00);
  246. system("pause");
  247. break;
  248. case 2:
  249. do{
  250. system("cls");
  251. printf("Ingrese el numero de cuenta:\n");
  252. scanf("%d",&cuenta);
  253. }while((find(cima,cuenta))==0);
  254. if(cuenta != 0){
  255. system("cls");
  256. printf("Ingrese el nombre del titular:\n");
  257. fflush(stdin);
  258. gets(nombre);
  259. system("cls");
  260. printf("Ingrese la fecha de nacimiento del titular:\n");
  261. fflush(stdin);
  262. gets(fecha);
  263. if(edit(cima,cuenta,nombre,fecha)==1)
  264. printf("Sus datos fueron almacenados\n");
  265. else
  266. printf("Hubo un error al almacenar sus datos\n");
  267. }
  268. system("pause");
  269. break;
  270. case 3:
  271. show(cima);
  272. system("pause");
  273. break;
  274. case 4:
  275. do{
  276. system("cls");
  277. printf("Ingrese el numero de cuenta:\n");
  278. scanf("%d",&cuenta);
  279. }while((find(cima,cuenta))==0);
  280. if(cuenta != 0){
  281. system("cls");
  282. printf("Ingrese la cantidad a depositar:\n");
  283. scanf("%f",&cantidad);
  284. if(deposito(cima,cuenta,cantidad)==1)
  285. printf("Deposito realizado con exito\n");
  286. else
  287. printf("Hubo un error al depositar\n");
  288. }
  289. system("pause");
  290. break;
  291. case 5:
  292. do{
  293. system("cls");
  294. printf("Ingrese el numero de cuenta:\n");
  295. scanf("%d",&cuenta);
  296. }while((find(cima,cuenta))==0);
  297. if(cuenta != 0){
  298. system("cls");
  299. printf("Ingrese la cantidad a retirar:\n");
  300. scanf("%f",&cantidad);
  301. if(retirar(cima,cuenta,cantidad)==1)
  302. printf("Retiro realizado con exito\n");
  303. else
  304. printf("Hubo un error al retirar\n");
  305. }
  306. system("pause");
  307. break;
  308. case 6:
  309. do{
  310. system("cls");
  311. printf("Ingrese el numero de cuenta benefactora:\n");
  312. scanf("%d",&cuenta_1);
  313. }while((find(cima,cuenta_1))==0);
  314. do{
  315. system("cls");
  316. printf("Ingrese el numero de cuenta beneficiario:\n");
  317. scanf("%d",&cuenta_2);
  318. }while((find(cima,cuenta_2))==0);
  319. if(cuenta_1 != 0 && cuenta_2 != 0){
  320. system("cls");
  321. printf("Ingrese la cantidad a transferir:\n");
  322. scanf("%f",&cantidad);
  323. if(retirar(cima,cuenta_1,cantidad)==1){
  324. if(deposito(cima,cuenta_2,cantidad))
  325. printf("Transferencia realizada con exito\n");
  326. }else
  327. printf("Hubo un error al retirar\n");
  328. }
  329. system("pause");
  330. break;
  331. case 7:
  332.   if(!isEmpy(inicio))
  333. {
  334. printf("\n Cual cuenta sera borrado ?");
  335. scanf("%d",&cuenta);
  336. if(borrar(&actual,cuenta,&actual))
  337. {
  338. printf("\n %d ha sido borrado",cuenta);
  339. show(cima);
  340. }
  341. else
  342. printf("\n %d no pudo ser borrado",cuenta);
  343. }
  344. else
  345. printf("\n La lista esta vacia ");
  346. getch();
  347.   break;
  348. }
  349. }while(x!=0);
  350.  
  351. return 0;
  352. }
  353.  
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

Código
  1. <meta charset="UTF-8">
  2. <title>Software - Daycare</title>
  3. <link rel="stylesheet" href="css/main.css"/>
  4. <link rel="stylesheet" href="css/fonts/style.css">
  5. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
  6.    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.  
  8. </head>
  9. <body id="fade4">
  10. <div class="container">
  11. <nav class="main_menu">
  12. <ul>
  13. <li><span class="icon-home"></span>category</li>
  14. <li><span class="icon-home"></span>products</li>
  15. <li><span class="icon-flag"></span>reports<i aria-hidden="true" class="icon-chevron-down"></i></li>
  16. <li><span class="icon-user"></span>profile<i aria-hidden="true" class="icon-chevron-down"></i>
  17.             <ul class="sub-menu">
  18.             <li>user stats</li>
  19.             <li>messages</li>
  20.             <li><span class="icon-level-down"></span>sign out</li>
  21.             </ul>
  22. </li>
  23. </ul>
  24. </nav>
  25. <div class="sideright">
  26. <h2>soy employee</h2>
  27. <ul>
  28. <li><span class="icon-home"></span>category</li>
  29. <li><span class="icon-list"></span>presentation</li>
  30. <li><span class="icon-shopping-bag"></span>products</li>
  31. <li><span class="icon-network"></span>providers</li>
  32. <li><span class="icon-shopping-cart"></span>shopping</li>
  33. <li><span class="icon-folder"></span>customers</li>
  34. <li><span class="icon-price-tag"></span>sales</li>
  35. <li><span class="icon-text-document"></span>reports</li>
  36. <li><span class="icon-user"></span>users</li>
  37. </ul>
  38. </div>
  39.    </div>
  40. </html>
  41.  


Código
  1. /*Universal*/
  2. *{
  3. margin:0px;
  4. padding:0px;
  5. font-family: helvetica Neue;
  6. font-weight: lighter;
  7. }
  8.  
  9. html,body{
  10. background: #16A085;
  11. }
  12.  
  13. div#applicationform{
  14. position: absolute;
  15. top:50%;
  16. left: 50%;
  17. margin-left: -15%;
  18. margin-top:  -13%;
  19. width:30%;
  20. min-height: 30%;
  21. background: #dcdcdc;
  22. overflow: hidden;
  23. border-radius: 4%;
  24.  
  25. }
  26. .sub-menu {
  27.    display:none;
  28.    position:absolute;
  29. }
  30.  
  31. .main_menu li ul {
  32. display:none;
  33. }
  34.  
  35. .main_menu li:hover > ul {
  36. display: inline-block;
  37. margin-left: -4%;
  38. width: 10%;
  39. padding: 0;
  40. background: #0D5488;
  41. }
  42.  
  43. .main_menu
  44. {
  45.  
  46. text-align:left;
  47. line-height: 290%;
  48. padding-left: 66%;
  49. background-color: #0D5488;
  50.  
  51.  
  52. }
  53.  
  54. .main_menu li
  55. {
  56. display: inline-block;
  57. padding:  0 10px 0;
  58. font-family:arial;
  59. font-size: 100%;
  60. color:white;
  61. }
  62.  
  63. .sideright
  64. {
  65. background-color:  #e5e4d7;
  66. margin:3%;
  67. margin-left:1%;
  68. padding: 2%;
  69. font-size: 82%;
  70. float: left;
  71. max-width: 18%;
  72. }
  73.  
  74. p#title{
  75. font-size: 1.6em;
  76. text-align: center;
  77. margin-top: 20px;
  78. }
  79.  
  80. input[type="text"], input[type="password"], input[type="mail"]{
  81. width: 69%;
  82. height: 2.1em;
  83. margin-left: 15%;
  84. margin-top: 3%;
  85. padding-left: 3%;
  86. font-size: 1.1em;
  87. outline: none;
  88. border:0px;
  89. background-color: #ECF0F1;
  90. border-radius: 5px;
  91. }
  92.  
  93. .login{
  94. margin:4%;
  95. margin-left: 15%;
  96. margin-bottom: 10%;
  97. width:71%;
  98. height: 2.1em;
  99. outline: none;
  100. border: 0em;
  101. background-color: #16A085;
  102. color: white;
  103. font-size: 1.2em;
  104. border-radius: 5px;
  105. -webkit-box-shadow:0em 0em 0em;
  106. }
  107.  
  108. .login:hover
  109. {
  110. background-color: #1abc9c;
  111. }
  112.  
  113. .separator
  114. {
  115.  
  116. }
  117. ol , ul
  118. {
  119. list-style: none;
  120. }
  121.  
  122. .main_menu li:hover
  123. {
  124. background-color: #3498DB;
  125.  
  126. }
  127.  
  128. body,html#fade4
  129. {
  130. background-color: white;
  131. }
  132.  
  133. .container
  134. {
  135.  width: 100%;
  136.  margin: 0px auto;
  137.  max-width: 100%;
  138.  min-height: 20px;
  139.  overflow: hidden;
  140.  
  141. }
  142.  
  143. i
  144. {
  145. padding:1%;
  146. }
  147.  
  148.  






164  Programación / PHP / Re: como puedo validar el login en: 7 Junio 2015, 17:34 pm
si me sirvieron pero ya lo hize lo del login ya bien pero ahora quiero acomodarlos y no sacarlos directos del method post para que no hagan sql
165  Programación / PHP / Re: como puedo validar el login en: 7 Junio 2015, 04:28 am
osea poder acomoderlos y no sacarlos del method POST
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

Código
  1. <?php
  2.    $User = $_REQUEST['User'];
  3.    $Pass = $_REQUEST['Pass'];
  4.  
  5.    $conexion = mysql_connect("localhost","root") or die ("PROBLEMAS AL CONECTA EL SERVIDOR");
  6.    mysql_select_db("db_login",$conexion) or die ("PROBLEMAS A CONECTAR CON LA DB");
  7.  
  8.    $estandar = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion);
  9.    $admin    = mysql_query("SELECT * FROM usuario where login = '".$User."' and adminpass = '".$Pass."'",$conexion);
  10.  
  11.    if(mysql_num_rows($estandar)==0)
  12.    {
  13.       header("Location: index.html");
  14.  
  15.    }else
  16.         {
  17.          header("Location: index_employee.html");
  18.         }
  19.  
  20.    if(mysql_num_rows($admin)==0)
  21.    {
  22.      header("Location: index.html");
  23.  
  24.    }else
  25.         {
  26.          header("Location: index_admin.html");
  27.         }
  28. ?>
  29.  
  30.  
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

Código
  1. <!doctype html>
  2. <html lang="en" >
  3.    <meta charset ="UTF-8">
  4. <title>formulario flat design</title>
  5. <link rel="stylesheet" href="css/main.css"/>
  6. </head>
  7. <body>  
  8.  <div id="applicationform">
  9. <p id="title">Welcome to </p>
  10.  
  11. <form action="login.php" methos="POST">  
  12. <input type="mail" id="user" name="User" placeholder="Username" autocomplete="off">
  13. <input type="password" id="pass" name="Pass"  placeholder="Password">
  14. <input type="submit" id="fade2" value="login" class="login" href="index.html">
  15. </form>
  16. </div>
  17. </body>
  18. </html>
  19.  
  20.  

Código
  1. <?php
  2.    $User = $_REQUEST['User'];
  3.    $Pass = $_REQUEST['Pass'];
  4.  
  5.    $conexion = mysql_connect("localhost","root") or die ("PROBLEMAS AL CONECTA EL SERVIDOR");
  6.    mysql_select_db("adsu",$conexion) or die ("PROBLEMAS A CONECTAR CON LA DB");
  7.  
  8.    $estandar = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion);
  9.    $admin    = mysql_query("SELECT * FROM usuario where login = '".$User."' and pass = '".$Pass."'",$conexion);
  10.  
  11.    if($row = mysql_fetch_array($estandar))
  12.    {
  13.      header("Location: index_empleado.html");
  14.  
  15.    }else if($row = mysql_fetch_array($admin))
  16.         {
  17.            header("Location: index_admin.html");
  18.  
  19.         }
  20.  
  21. ?>
  22.  
169  Programación / Programación C/C++ / quien me ayuda hacer el de modificar en: 6 Abril 2015, 02:47 am
Código
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <conio.h>
  4. #include <windows.h>
  5.  
  6. int ca=0;
  7. int buscar = 0;
  8. int x=0;
  9. int resp=0;
  10. int r3,m=0;
  11. char r[2]={0};
  12.  
  13.  
  14.  
  15. void gotoxy(int x, int y)
  16. {
  17. HANDLE hCon;
  18. hCon = GetStdHandle(STD_OUTPUT_HANDLE);
  19.  
  20. COORD dwPos;
  21.  
  22. dwPos.X = x;
  23. dwPos.Y= y;
  24.  
  25. SetConsoleCursorPosition(hCon,dwPos);
  26. }
  27.  
  28.  
  29. struct salmunos
  30. {
  31.  int matricula;
  32.  char nom[15],pat[15],mat[15];
  33. }alum[10];
  34.  
  35. struct scalif
  36. {
  37.  int matricula;
  38.  char materia[20];
  39.  float corte1,corte2,corte3,prom;
  40. }calif[10];
  41.  
  42.  
  43. void registrar_alumnos()
  44. {
  45.  do
  46.   {
  47.    printf("\n\tAlumno: ");
  48.    scanf("%s", &alum[ca].nom);
  49.    printf("\n\tApeido Paterno: ");
  50.    scanf("%s", &alum[ca].pat);
  51.    printf("\n\tApeido Materno: ");
  52.    scanf("%s", &alum[ca].mat);
  53.    printf("\n\tMatricula: ");
  54.    scanf("%d", &alum[ca].matricula);
  55.    ca++;
  56.    system("cls");
  57.    gotoxy(5,0);printf("\n\tDesea almacenar mas datos? YES[1]/NO[2]: ");
  58.    scanf("%d",&resp);
  59.   }while(resp!=2);
  60.  
  61. }
  62.  
  63.  
  64. void mostrar_alumnos()
  65. {
  66.  printf("\n\nlista de Alumnos\n");
  67.  if (ca == 0)
  68.  {
  69.   printf("\n\tLista vacia..!");
  70.  }else
  71.      {
  72.       for(int i=0; i < ca; i++)
  73.       {
  74.       printf("\nAlumno: %s %s %s ",alum[i].nom, alum[i].pat, alum[i].mat);
  75.       printf("Matricula: %d\n\n",alum[i].matricula);
  76.    }
  77.  }
  78. }
  79.  
  80. void buscar_alumnos()
  81. {    
  82. int b = 0, c= 0;
  83. do
  84.   {
  85. printf("Ingrese matricula: ");
  86. scanf("%d", &buscar);
  87. for(int i = 0; i<ca; i++)
  88.     {
  89.      if(alum[i].matricula == buscar)
  90.       {
  91.   b = 1;
  92. c = i;
  93.         break;
  94.       }
  95.    }
  96. if(b == 1)
  97. {
  98. printf("\nEl nombre: %s", alum[c].nom);
  99.        printf("\nEl apellido paterno: %s", alum[c].pat);
  100.        printf("\nEl apellido materno: %s", alum[c].mat);
  101. }
  102. else
  103. {
  104. printf("Datos no encontrados");
  105. system("pause > null");
  106. }
  107.  printf("\nDesea salir? YES[1]/NO[2]: ");
  108.  scanf("%d",&resp);
  109.    }while(resp!=1);
  110.  }  
  111.  
  112. void eleminar_alumnos()
  113. {  
  114.  
  115.     do{
  116.                int b=0;            
  117.                system("cls");
  118.                printf("Ingrese la matricula: ");
  119.                scanf("%d",&m);
  120.                for(int y=0;y<10;y++)
  121.                {
  122.                 if(alum[y].matricula==m)
  123.                 {
  124.                 system("cls");
  125.                  printf("\nDatos a borrar...\n");
  126.                  printf("\nMatricula:%d",alum[y].matricula);
  127.                  printf("\nNombre:%s",&alum[y].nom);
  128.                  printf("\nApellido Paterno:%s",&alum[y].pat);
  129.                  printf("\nApellido Materno:%s\n",&alum[y].mat);                      
  130.                  printf("\nDeseas dar de baja?");
  131.                  scanf("%s",&r);
  132.                  if(strcmp(r,"si")==0)
  133.                  {          
  134.                    alum[y].matricula=alum[y+1].matricula;
  135.                    strcpy(alum[y].nom,alum[y+1].nom);
  136.                    strcpy(alum[y].pat,alum[y+1].pat);
  137.                    strcpy(alum[y].mat,alum[y+1].mat);
  138.                    ca--;
  139.                    alum[y].matricula=0;
  140.                    strcpy(alum[y].nom,"");
  141.                    strcpy(alum[y].pat,"");
  142.                    strcpy(alum[y].mat,"");
  143.                    printf("\nDatos Borrados...\n");  
  144.                   }
  145.                  }
  146.                   else
  147.                   {
  148.                    b++;  
  149.                       }
  150.                  }
  151.                  if(b==10)
  152.                  {
  153.                     printf("\nLa matricula ingresada no existe...\n");      
  154.                           }
  155.                   printf("\nDesea salir?");
  156.                   printf("\n[1]=SI");
  157.                   printf("\n[2]=NO\n");
  158.                   scanf("%d",&r3);                                      
  159.                }while(r3!=2);                                                              
  160.                system("pause");
  161.  
  162. }
  163. void modificar()
  164. {
  165. }                  
  166. void menu1()
  167. {
  168.     system("color 0F");
  169.     system("cls");
  170.     printf("\n\t\tREGISTRO DE ALMUNOS\n\n");
  171.     printf(" 1. Registrar \n");
  172.     printf(" 2. Mostrar registro de matriculas y almunos \n");
  173.     printf(" 3. Mostrar datos de un alumno \n");
  174.     printf(" 4. Modificar \n");
  175.     printf(" 5. Eliminar alumno del registro \n");
  176.     printf(" 6. Buscar nombre del alumno por matricula \n");
  177.     printf(" 7. Salir \n");
  178.  
  179.     printf("\n Ingrese opcion : ");
  180. }
  181.  
  182.  
  183. /*                      MAIN
  184. ------------------------------------------------------------------------------*/
  185.  
  186. int main()
  187. {
  188.  int op;
  189.  
  190.  do
  191.  {
  192.  menu1();
  193.  scanf("%d",&op);
  194.      switch(op)
  195.      {
  196.        case 1:
  197.               system("cls");
  198.               registrar_alumnos();
  199.  
  200.               break;
  201.        case 2:
  202.               system("cls");
  203.               mostrar_alumnos();
  204.               system("pause > NUL");
  205.               break;
  206.  
  207.  
  208.       case 5:
  209.              system("cls");
  210.              eleminar_alumnos();
  211.              printf("\n\n\t\tAlumno eliminado ..!");
  212.              system("pause > null");
  213.              break;
  214.  
  215.  
  216.        case 6:
  217.             system("cls");
  218.             buscar_alumnos();
  219.             system("pause > null");
  220.             break;
  221.  
  222.      }
  223.  
  224.  
  225.    } while(op!=7);
  226.  
  227.  return 0;  
  228. }
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
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines