Advertisement
Guest User

Untitled

a guest
Nov 10th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I have a website, where I uploaded an [index.html](http://www.destiny-craft.com/index.html) which is completely made of HTML code (no PHP).
  2.  
  3. I copied this code over to an PHP file (`index.php`), and made 1 seperate php file for my header. When I cleaned up the new `index.php` file, I just used an `include()` to include the header, like so:
  4.  
  5. <? include("TopNote.php"); ?>
  6.  
  7. So the difference between `index.html` and `index.php` is that the HTML code is directly in the `index.html` and in the PHP file, it is included from a seperate PHP file.
  8.  
  9. Now the index.php file give a strange button, where the index.html displays it all the way i want it to display.
  10.  
  11.  
  12. `index.html`:
  13.  
  14. <!doctype html>
  15. <html lang="us">
  16. <head>
  17. <meta charset="utf-8">
  18. <title>Destiny-Craft</title>
  19. <link rel="stylesheet" type="text/css" href="web/style.css">
  20. <link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
  21. <style>
  22. .ui-menu { position: absolute; width: 100px; }
  23. </style>
  24. <script src="js/jquery-1.9.1.js"></script>
  25. <script src="js/jquery-ui-1.10.3.custom.js"></script>
  26. <script>
  27. $(function() {
  28.  
  29. $( "#menu" ).buttonset();
  30.  
  31. $( "#regdialog" ).dialog({
  32. autoOpen: false,
  33. closeOnEscape: false,
  34. show: {
  35. effect: "blind",
  36. duration: 1000
  37. },
  38. hide: {
  39. effect: "blind",
  40. duration: 1000
  41. }
  42. });
  43.  
  44. $( "#buttonregister" ).click(function() {
  45. $( "#regdialog" ).dialog( "open" );
  46. });
  47. });
  48. $(function() {
  49. $( "#StaffLogin" )
  50. .button()
  51. .click(function() {
  52. alert( "Here Staff Could Login, If That Would Work :)" );
  53. })
  54. .next()
  55. .button({
  56. text: false,
  57. icons: {
  58. primary: "ui-icon-triangle-1-s"
  59. }
  60. })
  61. .click(function() {
  62. var menu = $( this ).parent().next().show().position({
  63. my: "left top",
  64. at: "left bottom",
  65. of: this
  66. });
  67. $( document ).one( "click", function() {
  68. menu.hide();
  69. });
  70. return false;
  71. })
  72. .parent()
  73. .buttonset()
  74. .next()
  75. .hide()
  76. .menu();
  77. });
  78. </script>
  79.  
  80. <!-- Start of the headers for CoffeeCup Web Form Builder -->
  81. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  82. <link rel="stylesheet" href="http://destiny-craft.coffeecup.com/forms/ApplyForm/colorbox/colorbox.css" />
  83. <script src="http://destiny-craft.coffeecup.com/forms/ApplyForm/common/libs_js/jquery-1.4.4.min.js"></script>
  84. <script src="http://destiny-craft.coffeecup.com/forms/ApplyForm/colorbox/jquery.colorbox.js"></script>
  85. <script>
  86. var $fb_pop = jQuery.noConflict();
  87.  
  88. $fb_pop(document).ready(function(){
  89. // Fallback for Safari browser
  90. if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1 ) {
  91. $fb_pop('.fb_iframe').click( function(){
  92. var temp_window = window.open('http://destiny-craft.coffeecup.com/forms/ApplyForm/','ApplyForm','width=0,height=0');
  93. window.focus();
  94. setTimeout(function() {temp_window.close();},1000);
  95. } );
  96. }
  97. $fb_pop(".fb_iframe").colorbox({iframe:true, innerWidth:"788px", height:"80%", maxHeight:"1157px", fixed:true });
  98. });
  99. </script>
  100. <!-- End of the headers for CoffeeCup Web Form Builder -->
  101. </head>
  102. <body bgcolor="#aaaaaa">
  103. <img src="http://destiny-craft.com/img/Logo_Resized.png" alt="" style="padding-left:20px" />
  104. <div align="right" style="padding-right:20px">
  105. <div>
  106. <button id="StaffLogin">Staff Login</button>
  107.  
  108. <button id="select">Select an action</button>
  109. </div>
  110. <ul>
  111. <li><a href="#">Log Out</a></li>
  112. <li id="buttonregister"><a href="#">Register</a></li>
  113. </ul>
  114. </div>
  115. <form style="margin-top: 1em;">
  116. <div id="menu" align="center">
  117. <input type="radio" id="buttonhome" name="radio" checked="checked"><label for="buttonhome">Home</label>
  118. <input type="radio" id="buttonforums" name="radio"><label for="buttonforums"><a href="http://forums.destiny-craft.com">Forums</a></label>
  119. <input type="radio" id="buttonapply" name="radio"><label for="buttonapply"><a class='fb_iframe' href="http://destiny-craft.coffeecup.com/forms/ApplyForm/">Apply</a></label>
  120. <input type="radio" id="buttonabout" name="radio"><label for="buttonabout">About Us</label>
  121. <input type="radio" id="select" name="radio">
  122. </div>
  123. </form>
  124.  
  125.  
  126.  
  127. <br />
  128. <div class="ui-widget">
  129. <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
  130. <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
  131. <strong>Alert:</strong> The Site Is No Where Near Completed, Please go to our <a href="http://forums.destiny-craft.com/">Forums</a></p>
  132. </div>
  133. </div>
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. <!-- POP UP -->
  141. <div id="regdialog" title="Register">
  142. <form action="#" method="post">
  143. <div class="ui-widget">
  144. <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
  145. <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span
  146.  
  147. >
  148. Registrations are not working!</p>
  149. </div>
  150. </div>
  151. <h5>Username:</h5>
  152. <input type="text" name="reg_name">
  153. <h5>Password:</h5>
  154. <input type="password" name="reg_pass">
  155. <h5>Confirm Password:</h5>
  156. <input type="password" name="reg_pass_conf">
  157. <input type="submit">
  158. </form>
  159. </div>
  160. </body>
  161. </html>
  162.  
  163.  
  164.  
  165. `index.php`:
  166.  
  167. <!doctype html>
  168. <html lang="us">
  169. <head>
  170. <meta charset="utf-8">
  171. <title>Destiny-Craft</title>
  172. <link rel="stylesheet" type="text/css" href="web/style.css">
  173. <link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
  174. <script src="js/jquery-1.9.1.js"></script>
  175. <script src="js/jquery-ui-1.10.3.custom.js"></script>
  176.  
  177. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  178. </head>
  179. <body bgcolor="#aaaaaa">
  180. <? include("TopNote.php"); ?>
  181. </body>
  182. </html>
  183.  
  184. `topnote.php`
  185.  
  186. <!doctype html>
  187. <html lang="us">
  188. <head>
  189. <meta charset="utf-8">
  190. <title>Destiny-Craft</title>
  191. <link rel="stylesheet" type="text/css" href="web/style.css">
  192. <link href="css/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
  193. <style>
  194. .ui-menu { position: absolute; width: 100px; }
  195. </style>
  196. <script src="js/jquery-1.9.1.js"></script>
  197. <script src="js/jquery-ui-1.10.3.custom.js"></script>
  198. <script>
  199. $(function() {
  200. $( "#menu" ).buttonset();
  201.  
  202. $( "#regdialog" ).dialog({
  203. autoOpen: false,
  204. closeOnEscape: false,
  205. show: {
  206. effect: "blind",
  207. duration: 1000
  208. },
  209. hide: {
  210. effect: "blind",
  211. duration: 1000
  212. }
  213. });
  214.  
  215. $( "#buttonregister" ).click(function() {
  216. $( "#regdialog" ).dialog( "open" );
  217. });
  218. });
  219. $(function() {
  220. $( "#StaffLogin" )
  221. .button()
  222. .click(function() {
  223. alert( "Here Staff Could Login, If That Would Work :)" );
  224. })
  225. .next()
  226. .button({
  227. text: false,
  228. icons: {
  229. primary: "ui-icon-triangle-1-s"
  230. }
  231. })
  232. .click(function() {
  233. var menu = $( this ).parent().next().show().position({
  234. my: "left top",
  235. at: "left bottom",
  236. of: this
  237. });
  238. $( document ).one( "click", function() {
  239. menu.hide();
  240. });
  241. return false;
  242. })
  243. .parent()
  244. .buttonset()
  245. .next()
  246. .hide()
  247. .menu();
  248. });
  249. </script>
  250.  
  251. <!-- Start of the headers for CoffeeCup Web Form Builder -->
  252. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  253. <link rel="stylesheet" href="http://destiny-craft.coffeecup.com/forms/ApplyForm/colorbox/colorbox.css" />
  254. <script src="http://destiny-craft.coffeecup.com/forms/ApplyForm/common/libs_js/jquery-1.4.4.min.js"></script>
  255. <script src="http://destiny-craft.coffeecup.com/forms/ApplyForm/colorbox/jquery.colorbox.js"></script>
  256. <script>
  257. var $fb_pop = jQuery.noConflict();
  258.  
  259. $fb_pop(document).ready(function(){
  260. // Fallback for Safari browser
  261. if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1 ) {
  262. $fb_pop('.fb_iframe').click( function(){
  263. var temp_window = window.open('http://destiny-craft.coffeecup.com/forms/ApplyForm/','ApplyForm','width=0,height=0');
  264. window.focus();
  265. setTimeout(function() {temp_window.close();},1000);
  266. } );
  267. }
  268. $fb_pop(".fb_iframe").colorbox({iframe:true, innerWidth:"788px", height:"80%", maxHeight:"1157px", fixed:true });
  269. });
  270. </script>
  271. <!-- End of the headers for CoffeeCup Web Form Builder -->
  272. </head>
  273. <body bgcolor="#aaaaaa">
  274. <img src="http://destiny-craft.com/img/Logo_Resized.png" alt="" style="padding-left:20px" />
  275. <div align="right" style="padding-right:20px">
  276. <div>
  277. <button id="StaffLogin">Staff Login</button>
  278.  
  279. <button id="select">Select an action</button>
  280. </div>
  281. <ul>
  282. <li><a href="#">Log Out</a></li>
  283. <li id="buttonregister"><a href="#">Register</a></li>
  284. </ul>
  285. </div>
  286. <form style="margin-top: 1em;">
  287. <div id="menu" align="center">
  288. <input type="radio" id="buttonhome" name="radio" checked="checked"><label for="buttonhome">Home</label>
  289. <input type="radio" id="buttonforums" name="radio"><label for="buttonforums"><a href="http://forums.destiny-craft.com">Forums</a></label>
  290. <input type="radio" id="buttonapply" name="radio"><label for="buttonapply"><a class='fb_iframe' href="http://destiny-craft.coffeecup.com/forms/ApplyForm/">Apply</a></label>
  291. <input type="radio" id="buttonabout" name="radio"><label for="buttonabout">About Us</label>
  292. <input type="radio" id="select" name="radio">
  293. </div>
  294. </form>
  295.  
  296.  
  297.  
  298. <br />
  299. <div class="ui-widget">
  300. <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
  301. <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
  302. <strong>Alert:</strong> The Site Is No Where Near Completed, Please go to our <a href="http://forums.destiny-craft.com/">Forums</a></p>
  303. </div>
  304. </div>
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311. <!-- POP UP -->
  312. <div id="regdialog" title="Register">
  313. <form action="#" method="post">
  314. <div class="ui-widget">
  315. <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
  316. <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
  317. Registrations are not working!</p>
  318. </div>
  319. </div>
  320. <h5>Username:</h5>
  321. <input type="text" name="reg_name">
  322. <h5>Password:</h5>
  323. <input type="password" name="reg_pass">
  324. <h5>Confirm Password:</h5>
  325. <input type="password" name="reg_pass_conf">
  326. <input type="submit">
  327. </form>
  328. </div>
  329. </body>
  330. </html>
  331.  
  332. What is the difference, and how do i solve it?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement