Source:

text/plain: .php
  1. <?php
  2.  
  3. /**
  4.  * @author Joachim M. Giæver
  5.  * @access public
  6.  *
  7.  * Some constants that is uses variuous places. Not required to any of the classes;
  8.  * just to make a programmers day easier! :p
  9.  *
  10.  * @license WTFPL: http://en.wikipedia.org/wiki/WTFPL
  11.  * @version 1
  12.  */
  13.  
  14. /**
  15.  * Remove html tags and enteties stuff from a value ment to a tag inside the <head>
  16.  *
  17.  * @param string $Str
  18.  * @return string
  19.  */
  20. function htmlHeadData( $Str ) {
  21. return htmlspecialchars( strip_tags( htmlspecialchars_decode( $Str ) ) );
  22. }
  23.  
  24. /**
  25.  * Include som required constans
  26.  * Ie. PUBLIC_BASE
  27.  */
  28.  
  29. require_once '.' . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Constants.php';
  30.  
  31. // prevent running from pastebin.... It want do the trick there...
  32. if ( strstr( $_SERVER['REQUEST_URI'], 'pastebin' ) )
  33. die( '<a href="http://development.giaever.org/brreg/" target="__blank">Visit site here instead</a>' );
  34.  
  35. ?>
  36. <!DOCTYPE HTML>
  37. <html>
  38. <head>
  39. <title><?=htmlHeadData( 'Fetch content from Brreg' );?> &bull; developement.giaever.org </title>
  40. <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
  41. <meta name="description" content="<?=htmlHeadData( 'Fetch content from Brreg' );?>" />
  42. <meta name="keywords" content="<?=htmlHeadData( 'Fetch,content,from,Brreg' );?>" />
  43. <link rel="stylesheet" href="/brreg<?=PUBLIC_BASE;?>/CSS/Standard.css" type="text/css" media="all" />
  44. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  45. <script type="text/javascript" src="/brreg<?=PUBLIC_BASE;?>/JS/HandleAjaxRequest.js"></script>
  46. <script type="text/javascript" src="http://development.giaever.org/pastebin/nukleuz/Pastebin/javascript/jquery.cookie.js?Show"></script>
  47. <script type="text/javascript" src="/brreg<?=PUBLIC_BASE;?>/JS/PastebinInfo.js"></script>
  48. </head>
  49. <body>
  50. <div>
  51. <form method="post" action="?">
  52. <fieldset>
  53. <legend class="RoundedCorners ShadowLow">Automatisk utfylling av data fra BrReg.no (Brønnøysundregisteret)</legend>
  54. <ol>
  55. <li>
  56. <label for="OrgNo">Org. nr</label>
  57. <input maxlength="15" name="OrgNo" id="OrgNo" />
  58. </li>
  59. <li>
  60. <label for="OrgName">Firmanavn</label>
  61. <input maxlength="40" name="OrgName" id="OrgName" />
  62. </li>
  63. <li >
  64. <label for="FirstName">Fornavn</label>
  65. <input maxlength="40" name="FirstName" id="FirstName" />
  66. </li>
  67. <li>
  68. <label for="SurName">Etternavn</label>
  69. <input maxlength="40" name="SurName" id="SurName" />
  70. </li>
  71. <li>
  72. <label for="EMail">E-post</label>
  73. <input maxlength="40" name="Email" id="Email" />
  74. </li>
  75. <li>
  76. <label for="PhoneNo">Telefon</label>
  77. <input maxlength="10" name="PhoneNo" id="PhoneNo" />
  78. </li>
  79. <li>
  80. <label for="Address">Adresse</label>
  81. <input maxlength="50" name="Address" id="Address" />
  82. </li>
  83. <li>
  84. <label for="Zip">Post&nbsp;nr</label>
  85. <input maxlength="7" name="Zip" id="Zip" />
  86. </li>
  87. <li>
  88. <label for="City">Poststed</label>
  89. <input maxlength="30" name="City" id="City" />
  90. </li>
  91. <li>
  92. <label for="Submit"></label>
  93. <input id="Submit" name="reg_submit_btn" type="submit" value="REGISTRER"/>
  94. <span></span>
  95. </li>
  96. </ol>
  97. </fieldset>
  98. </form>
  99. </div>
  100. <div id="Modal" class="Opacity7"> </div>
  101. <noscript>
  102. <div id="NoScript" class="Opacity7"> </div>
  103. <span class="RoundedCorners ShadowLow">Her må du ha Javascript på for å få noe ut av :-)</span>
  104. </noscript>
  105. </body>
  106. </html>