User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 429,888 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,293 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 600 | Replies: 6 | Solved
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation: Aeneassan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Aeneassan's Avatar
Aeneassan Aeneassan is offline Offline
Newbie Poster

Very annoying gap...

  #1  
Apr 10th, 2008
Ok this is not to advertise my site at all (it's quite empty right now as i'm still working on the layout.

If you go to http://www.pektop.be you'll see a black gap between my top section and my middle section, I've literally been searching for hours why it does this but i can't seem to find it please help.

(you can right-click source code for it)

There is some php in it


  1. <?php
  2.  
  3.  
  4. @(include('config.php')) OR die ('<b>config.php not found!</b>');
  5.  
  6. $links = '<b>News</b>';
  7. $news = get_news();
  8. krsort($news);
  9.  
  10. htmlhead($links);
  11.  
  12. if (!empty($news))
  13. {
  14. print ' <TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0>
  15. <TR>
  16. <TD colspan=7><br></TD>
  17. </TR>
  18. ';
  19.  
  20. foreach ($news as $text )
  21. {
  22. ?>
  23.  
  24. <TR>
  25. <TD WIDTH=40></TD>
  26. <TD WIDTH=670 valign=top>
  27. <br>
  28. <?=$text ?>
  29. <br>
  30. </TD>
  31. <TD WIDTH=40></TD>
  32. </TR>
  33.  
  34. <TR>
  35. <TD></TD>
  36. <TD>
  37. <br><hr>
  38. </TD>
  39. <TD></TD>
  40. </TR>
  41. <?php
  42. }
  43. print '</table>';
  44. }
  45. else print '';
  46.  
  47. htmlfooter();
  48. ?>


and the include file


  1. <?php
  2.  
  3. $web = 'http://www.webfire.biz';
  4.  
  5.  
  6. define('USERNAME', 'username');
  7. define('PASSWORD', 'password');
  8. define('PAGE_TITLE', 'Pektop');
  9. define('DATA_FILE', 'content.dat');
  10. define('NO_NEWS', 'There is currently no news');
  11. define('WELCOME', '<b>Newswriter Administration</b>');
  12.  
  13.  
  14.  
  15. if (!is_writable(DATA_FILE)) die ('<b>'.DATA_FILE.' is not writable or does not exist!</b>');
  16.  
  17. function htmlhead($links='')
  18. {
  19. ?>
  20.  
  21. <?php
  22. if ( $links == 'on')
  23. {
  24. ?>
  25. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=new" class="subnavi">Create News</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  26. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=show" class="subnavi">Show News</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  27. <a href="#" onClick="help();" class="subnavi">Help</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
  28. <a href="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>?action=logout" class="subnavi">Logout</a>
  29. <?php
  30. }
  31. else { print '<span class="subnavi">'.$links.'</span>'; }
  32. ?>
  33.  
  34. <?php
  35. }
  36.  
  37. function htmlfooter($links='')
  38. {
  39. ?>
  40.  
  41. <?php
  42. }
  43.  
  44. function loginscreen()
  45. {
  46. ?>
  47. <TABLE height=200 WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF>
  48. <TR>
  49. <TD height=35></TD>
  50. </TR>
  51. <TR>
  52. <TD WIDTH=370>
  53. <form action="<?=$_SERVER['file:///MacHD/Users/adriaan/Downloads/newswriter-1.5/PHP_SELF'] ?>" method="POST">
  54. <input type="hidden" name="action" value="login">
  55. </TD>
  56. <TD valign="middle" WIDTH=50>
  57.  
  58. <b>Name:</b>
  59. </TD>
  60. <TD valign="middle" WIDTH=350>
  61.  
  62. <input style="width:120px" type="text" size="20" maxlength="15" name="name">
  63. </TD>
  64. </TR>
  65. <TR>
  66. <TD WIDTH=370></TD>
  67.  
  68. <TD valign="middle" WIDTH=50>
  69.  
  70. <b>Pass:</b>
  71. </TD>
  72. <TD valign="middle" WIDTH=550>
  73.  
  74. <input style="width:120px" type="password" size="20" maxlength="15" name="pass">
  75. </TD>
  76. </TR>
  77. <TR>
  78. <TD></TD>
  79. <TD></TD>
  80. <TD valign="middle" WIDTH=550>
  81.  
  82. <input style="width:120px" type="submit" value="Login">
  83. </form>
  84. </TD>
  85. </TR>
  86. </TABLE>
  87. <?php
  88. }
  89.  
  90. function get_news()
  91. {
  92. $serialized = file_get_contents(DATA_FILE);
  93. return (empty($serialized))? FALSE : unserialize($serialized);
  94. }
  95.  
  96. function save_news()
  97. {
  98. global $news;
  99. ksort ($news);
  100.  
  101. $data = serialize(array_values($news));
  102. $fp = fopen(DATA_FILE,"w+");
  103. fputs($fp,$data);
  104. fclose($fp);
  105.  
  106. header("Location: ".$_SERVER['PHP_SELF']."?action=show");
  107. }
  108.  
  109. ?>


ofcourse the username/password are changed here :p
Last edited by peter_budo : Apr 10th, 2008 at 4:10 pm. Reason: [icode] is for one line of code, [code] is for multiple lines
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:44 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC