Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][HTML][PHP]Element nie zmieniający pozycji.
Forum PHP.pl > Forum > Przedszkole
Michcio_
Witam,
Dlaczego element zaznaczony na obrazku:
http://iv.pl/images/19889539381280226826.png
Nie schodzi na dół?

index.php
  1. <?php
  2. if (!isset($_SESSION['spannell'])){
  3. $_SESSION['adres_ip'] = $_SERVER['REMOTE_ADDR'];
  4. }
  5. if($_SESSION['adres_ip'] !== $_SERVER['REMOTE_ADDR']){
  6. echo 'Błąd: Próba przejęcia sesji';
  7. }
  8. include ("include/messages.php");
  9. include ("include/function.php");
  10. include ("include/config.php");
  11. mysql_connect("$host", "$user", "$pass")or die("Nie można nawiązać połączenia z bazą");
  12. mysql_select_db("$baza")or die("Wystąpił błąd podczas wybierania bazy danych");
  13. ?>
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  15. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  18. <meta name="Description" content="panel administracyjny, panel, panel gier" />
  19. <meta name="Keywords" content="panel administracyjny, panel, panel gier" />
  20. <link rel="Stylesheet" type="text/css" href="style.css" />
  21. <title>SPanel</title>
  22. </head>
  23. <body background="images/bg.png">
  24. <div id="center">
  25. <div id="logo"></div>
  26. <div id="a1"></div>
  27. <div id="b1"></div>
  28. <div id="c1">
  29. <div id="text">
  30. &nbsp;&nbsp;&nbsp;<?php if ($_SESSION['spannella'] == "1") Menu(admin); else { if ($_SESSION['spannell']) Menu(user); } ?>
  31. </div>
  32. </div>
  33. <div id="d1"></div>
  34. <div id="e1">
  35. <div id="text1"><center>
  36. <?php
  37. $p = $_GET["p"];
  38. if ($p=="")
  39. {
  40. if (empty($_SESSION['spannell'])) include ("ps/login.php"); else include("ps/start.php");
  41. }
  42. else {
  43. if (is_file("ps/$p.php"))
  44. {
  45. include("ps/".basename ($_GET['p']).".php");
  46. }
  47. else
  48. {
  49. include ("ps/start.php");
  50. }
  51. }
  52. ?></center>
  53. </div>
  54. </div>
  55. <div id="f1"></div>
  56. </div>
  57. </body>
  58. </html>


style.css
  1. body {
  2. margin: 0;
  3. padding: 0;
  4. text-align: center;
  5. }
  6. a {
  7. text-decoration: none;
  8. }
  9.  
  10. #link {
  11. color: white;
  12. text-decoration: none;
  13. }
  14. #center {
  15. margin: 0 auto;
  16. width: 800px;
  17. text-align: left;
  18. }
  19. #text {
  20. margin: 6px;
  21. font-family: Tahoma;
  22. }
  23. #text1 {
  24. margin-left: 9px;
  25. }
  26. #logo {
  27. float: left;
  28. position: relative;
  29. width: 785px;
  30. height: 176px;
  31. background: url(images/logo.png);
  32. padding: 0;
  33. margin: 0;
  34. }
  35. #a1 {
  36. float: left;
  37. position: relative;
  38. width: 785px;
  39. height: 18px;
  40. background: url(images/a1.png);
  41. padding: 0;
  42. margin: 0;
  43. }
  44. #b1 {
  45. float: left;
  46. position: relative;
  47. width: 785px;
  48. height: 9px;
  49. background: url(images/b1.png);
  50. padding: 0;
  51. margin: 0;
  52. }
  53. #c1 {
  54. float: left;
  55. position: relative;
  56. width: 785px;
  57. height: 43px;
  58. background: url(images/c1.png);
  59. padding: 0;
  60. margin: 0;
  61. }
  62. #d1 {
  63. float: left;
  64. position: relative;
  65. width: 762px;
  66. height: 8px;
  67. background: url(images/d1.png);
  68. padding: 0;
  69. margin: 0 0 0 12px;
  70. }
  71. #e1 {
  72. float: left;
  73. font-family: Verdana;
  74. font-size: small;
  75. background-color: #FFFFFF;
  76. width: 762px;
  77. padding: 0; margin: 0 0 0 45px;
  78. margin: 0 0 0 12px;
  79. }
  80. #f1 {
  81. float: left;
  82. position: relative;
  83. width: 762px;
  84. height: 5px;
  85. background: url(images/f1.png);
  86. padding: 0;
  87. margin: 0 0 0 12px;
  88. }


Załączona podstrona:
  1. <?php
  2. if (empty($_SESSION['spannell'])) { echo "$session"; exit; }
  3. if ($_GET["add"])
  4. {
  5. if ($_POST["send"]==1)
  6. {
  7. if (empty($_POST["ip"]) || empty($_POST["port"]) || empty($_POST["login"]) || empty($_POST["haslo"]) || empty($_POST["nazwa"])) AddMach("$logform1"); else
  8. {
  9. if (ereg("^[0-9/.]+$", "".$_POST["ip"].""))
  10. {
  11. if (ereg("^[0-9]+$", "".$_POST["port"].""))
  12. {
  13. mysql_query("insert into machines values(NULL, '".htmlspecialchars($_POST["ip"])."', '".htmlspecialchars($_POST["port"])."', '".htmlspecialchars($_POST["login"])."', '".htmlspecialchars($_POST["haslo"])."', '".htmlspecialchars($_POST["nazwa"])."')");
  14. AddMach("$addmachine");
  15. }
  16. else AddMach("$portmach");
  17. }
  18. else AddMach("$macherr");
  19. }
  20.  
  21. }
  22. else AddMach();
  23.  
  24. }
  25. else
  26. {
  27. if ($_GET["delete"])
  28. {
  29. $zap=mysql_fetch_array(mysql_query("select * from machines where id='".$_GET["delete"]."'"));
  30. if ($zap["id"])
  31. {
  32. mysql_query("delete from machines where id=".$_GET["delete"]);
  33. echo "$passdelmach";
  34. }
  35. else echo "$error";
  36. }
  37. else
  38. {
  39. if ($_GET["edit"])
  40. {
  41. if ($_GET["edit"])
  42. {
  43. if ($_POST["send"]==1)
  44. {
  45. if (empty($_POST["ip"]) || empty($_POST["port"]) || empty($_POST["login"]) || empty($_POST["haslo"]) || empty($_POST["nazwa"])) AddMach("$logform1"); else
  46. {
  47. if (ereg("^[0-9/.]+$", "".$_POST["ip"].""))
  48. {
  49. if (ereg("^[0-9]+$", "".$_POST["port"].""))
  50. {
  51. mysql_query("update machines set ip='".$_POST["ip"]."', port='".$_POST["port"]."', login='".$_POST["login"]."', haslo='".$_POST["haslo"]."', nazwa='".$_POST["nazwa"]."' where id=".$_GET["edit"]);
  52.  
  53. EdiMach("$editmachine");
  54. }
  55. else EdiMach("$portmach");
  56. }
  57. else EdiMach("$macherr");
  58. }
  59.  
  60. }
  61. else EdiMach();
  62. }
  63. else
  64. {
  65. echo "$error";
  66. }
  67. }
  68. else
  69. {
  70. if (empty($_GET["id"]))
  71. {
  72. echo "<a href='index.php?p=amachines&add=1'>Dodaj maszynę</a><br>";
  73. $zapp=mysql_fetch_array(mysql_query("select * from machines"));
  74. if (empty($zapp)) echo "$nomachines"; else {
  75. echo "<table width='450'>";
  76. echo "<tr><th>IP</th><th>Port</th><th>Login</th><th>Hasło</th><th>Nazwa</th><th>Akcja</th><th>Akcja</th></tr>";
  77. $zap=mysql_query("select * from machines order by id");
  78. while($zap1=mysql_fetch_array($zap)){
  79. echo "<tr><td>".$zap1["ip"]."</td><td>".$zap1["port"]."</td><td>".$zap1["login"]."</td><td>".$zap1["haslo"]."</td><td>".$zap1["nazwa"]."</td><td><a href='index.php?p=amachines&edit=".$zap1["id"]."'>Edytuj</a></td><td><a href='index.php?p=amachines&delete=".$zap1["id"]."'>Usuń</a></td></tr>";
  80. }
  81. }
  82. }
  83. else
  84. {
  85.  
  86. }
  87. }
  88. }
  89. }
  90. ?>
kreciko
Zainstaluj sobie firebuga w firefoxie czy tam chromie. I zacznij go używać, w końcu dojdziesz dlaczego ten element nie schodzi na dół. A jeżeli dajesz tyle linii kodu, to nikomu się nie będzie chciało tego przeczytać.
Michcio_
Rozwiązane.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.