PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/content/int.php

https://bitbucket.org/baruffaldi/website-be-you-festival
PHP | 312 lines | 212 code | 74 blank | 26 comment | 0 complexity | f8452ded611ed48cb2bc5ba57fe6d2b0 MD5 | raw file
  1. <?php
  2. /* $Id: int.php,v 0.1.3.7 22/11/2004 18:02:07 mdb Exp $
  3. * $Author: mdb $
  4. *
  5. * InsanePHP XHTML Structure/Sitemask's Text Content Generator Script
  6. * php released under PHP License - http://www.php.net/license/3_0.txt
  7. *
  8. * Descrizione
  9. * Descrizione
  10. *
  11. * Copyright (c) 2004 Filippo Baruffaldi <mdb AT insaneminds DOT org> <http://www.insaneminds.org>
  12. * All associated graphics Copyright (c) 2004 Filippo Baruffaldi
  13. *
  14. * You may not reproduce it elsewhere without the prior written permission of the author.
  15. * However, feel free to study the code and use techniques you learn from it elsewhere.
  16. */
  17. /*
  18. * substr('##CONTENT##',$extractfromsqlmaskcontent,$extractfromsqlmaskstruct)
  19. */
  20. include 'includes.php';
  21. $time_start = getmicrotime();
  22. function headerX($site_page, $siteskin)
  23. {
  24. global $site_name, $mhost, $muser, $mpass, $mdb, $mtbgl_i, $mtbmst,
  25. $mtbmct, $site_struct, $soft;
  26. $str = mysql_connect($mhost, $muser, $mpass);
  27. opendb($mdb);
  28. $rslt = select($mtbmst, '`htmlinfo`,`header`,`subtitle`,
  29. `opentitlesmall`,`closetitlesmall`,`opencontentsmall`,
  30. `closecontentsmall`,`opentitlebig`,`closetitlebig`,
  31. `opencontentbig`',
  32. "`structname` = '$site_struct'", $maxn, '`id`');
  33. $site = mysql_fetch_array($rslt, MYSQL_ASSOC);
  34. closedb($rslt, $str);
  35. print str_replace('##SUBS##', $site_name.$site_page, $site['htmlinfo']);
  36. $gh = getclient_style($soft, $siteskin);
  37. $gh = explode('###', $gh);
  38. print $gh[0];
  39. print $site['header']; // Orizontal Header Top Bar
  40. print $site['subtitle']; // Orizontal SubHeader Top Bar
  41. print "\t\t\t <div class='navigation'>\n\n"; // Opening Vertical Left SideBar
  42. print $site['opentitlesmall']; // Opening Title Small Window
  43. print 'iNSANEMiNDS';
  44. print $site['closetitlesmall']; // Closing Title Small Window
  45. print $site['opencontentsmall']; // Opening Content Small Window
  46. echo '
  47. <b>Browse through<br />
  48. the site:</b><br /><br />
  49. <b>[</b><a href="http://www.insaneminds.org/">news</a><b>]</b><br />
  50. <b>[</b><a href="http://www.insaneminds.org/?section=urbani">informatics.laws</a><b>]</b><br />
  51. <b>[</b><a href="http://www.insaneminds.org/?section=revenge">revenge</a><b>]</b><br />
  52. <b>[</b><a href="http://www.insaneminds.org/?section=torino">torino</a><b>]</b><br />
  53. <b>[</b><a href="http://www.insaneminds.org/?section=statespy">the-state</a><b>]</b><br /><br />
  54. <b>[</b><a href="http://www.insaneminds.org/?section=contacts">contacts</a><b>]</b><br /><br />
  55. <b>Insane Services</b>:<br /><br />
  56. <b>[</b><a href="http://www.insaneminds.org/gallery">gallery</a><b>]</b><br />
  57. <b>[</b><a href="http://www.insaneminds.org/no-paste">no-paste</a><b>]</b><br />
  58. <b>[</b><a href="http://www.insaneminds.org/tiny-url">tiny-url</a><b>]</b><br />
  59. <b>[</b><a href="http://www.insaneminds.org/?section=underupdating">fastweb</a><b>]</b><br /><br />
  60. <b>[</b><a href="http://www.insaneminds.org/admin">admin</a><b>]</b><br /><br />
  61. <b>Insane Skins</b>:<br /><br />
  62. <b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&amp;skin=black">black</a><b>]</b>&nbsp;::&nbsp;<b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&amp;skin=white">white</a><b>]</b><br />
  63. <b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&amp;skin=text">text</a><b>]</b><br /><br />
  64. <b>Change language</b><br /><br />
  65. <a href="'; echo '/?section=underupdating">'; // http://insaneminds.org/it/">
  66. echo ' <img src="http://insaneminds.org/imgs/it.gif" height="15" width="25" alt="" style="border:0;" />
  67. </a>&nbsp;
  68. <img src="http://insaneminds.org/imgs/gb.gif" height="15" width="25" alt="" style="border:0;" />&nbsp;
  69. <a href="http://translate.google.com/translate?langpair=en|es&amp;u=http://www.insaneminds.org&amp;hl=en&amp;ie=UTF-8&amp;oe=UTF-8&amp;prev=/language_tools">
  70. <img src="http://insaneminds.org/imgs/es.gif" height="15" width="25" alt="" style="border:0;" />
  71. </a>';
  72. print $site['closecontentsmall']; // Closing Content Small Window
  73. print $site['opentitlesmall']; // Opening Title Small Window
  74. print 'Login';
  75. print $site['closetitlesmall']; // Closing Title Small Window
  76. print $site['opencontentsmall']; // Opening Content Small Window
  77. /*echo ' <form method="get" action="login.php">
  78. <input type="hidden" name="act" value="check">
  79. <b>Username</b><br />
  80. <input class="tbox" type="text" name="username" size="15" maxlength="50">
  81. <b>Password</b><br />
  82. <input class="tbox" type="password" name="passwd" size="15" maxlength="50"><br /><br />
  83. <input id="login" type="submit" value=" .">
  84. </form>';*/
  85. echo 'Click below to enter on registered users zone<br /><br /><a href="/admin"><img style="border: none;" src="/imgs/login.gif" alt="" /></a><br />';
  86. print $site['closecontentsmall']; // Closing Content Small Window
  87. print $site['opentitlesmall']; // Opening Title Small Window
  88. print 'Random Image';
  89. print $site['closetitlesmall']; // Closing Title Small Window
  90. print $site['opencontentsmall']; // Opening Content Small Window
  91. $str = mysql_connect($mhost, $muser, $mpass);
  92. mysql_select_db($mdb);
  93. $min = 0;
  94. $row = mysql_fetch_assoc(mysql_query("SHOW TABLE STATUS LIKE '$mtbgl_i'"));
  95. $max = $row["Auto_increment"];
  96. $random_id = rand($min, $max);
  97. $rslt = select($mtbgl_i, '*', "`id` = '$random_id' AND `perms` = 'Public' OR `id` LIKE '$random_id' AND `perms` = 'Public'", $maxp, '`id`');
  98. $linea = mysql_fetch_array($rslt, MYSQL_ASSOC);
  99. closedb($rslt, $str);
  100. echo "<p style='font-weight: bold; font-size: 12px; margin: 0px;'>".decleantext($linea['name'])."</p><br />
  101. <a href='/gallery/?".$linea['author'].'/'.$linea['album'].'/'.$linea['name']."'>\n
  102. <img src='/gallery/getimage.php?id=".$linea['id']."' alt='".$linea['name']."' title='".$linea['name']."' width='100' />\n
  103. </a><br /><br />\n
  104. Author: <i>".decleantext($linea['author'])."</i><br />
  105. Album: <i>".decleantext($linea['album'])."</i><br /><br />
  106. Uploaded on: ".$linea['date'].'<br />';
  107. print $site['closecontentsmall']; // Closing Content Small Window
  108. print "\t\t\t </div>\n\n"; // Closing Vertical Left SideBar
  109. print "\t\t <!--\n";
  110. print "\t\t Vertical Right Sidebar Informations\n";
  111. print "\t\t -->\n\n";
  112. print "\t\t\t <div class='spot'>\n\n"; // Opening Vertical Right SideBar
  113. print $site['opentitlesmall']; // Opening Title Small Window
  114. print 'Coming Soon';
  115. print $site['closetitlesmall']; // Closing Title Small Window
  116. print $site['opencontentsmall']; // Opening Content Small Window
  117. echo '<b>Hoping soon</b><br /><br /> <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">register</a><b>]</b><br />
  118. <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">blogs</a><b>]</b><br />
  119. <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">about</a><b>]</b><br />
  120. <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">zena</a><b>]</b><br />
  121. <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">dyndns</a><b>]</b><br /><br />';
  122. print $site['closecontentsmall']; // Closing Content Small Window
  123. print $site['opentitlesmall']; // Opening Title Small Window
  124. print 'Powered by';
  125. print $site['closetitlesmall']; // Closing Title Small Window
  126. print $site['opencontentsmall']; // Opening Content Small Window
  127. echo '<br />
  128. <img src="http://insaneminds.biz/imgs/php.gif" alt="" height="31" width="88" /><br /><br />
  129. <img src="http://insaneminds.biz/imgs/mysql.gif" alt="" height="31" width="88" /><br /><br />
  130. <img src="http://insaneminds.biz/imgs/molespot.gif" width="85" alt="" /><br /><br />';
  131. print $site['closecontentsmall']; // Closing Content Small Window
  132. print $site['opentitlesmall']; // Opening Title Small Window
  133. print 'Links';
  134. print $site['closetitlesmall']; // Closing Title Small Window
  135. print $site['opencontentsmall']; // Opening Content Small Window
  136. echo '
  137. [<a href="http://www.nectarine.it/" onclick="window.open(this.href);return false">nectarine</a>]<br />
  138. [<a href="http://www.ottimizzati.com/" onclick="window.open(this.href);return false">web hosting</a>]<br />
  139. [<a href="http://www.be-you.org/" onclick="window.open(this.href);return false">be-you :: festival</a>]<br />
  140. [<a href="http://www.lyrics007.com" onclick="window.open(this.href);return false">lyrics007</a>]<br />';
  141. print $site['closecontentsmall']; // Closing Content Small Window
  142. print $site['opentitlesmall']; // Opening Title Small Window
  143. print 'W3C Validations';
  144. print $site['closetitlesmall']; // Closing Title Small Window
  145. print $site['opencontentsmall']; // Opening Content Small Window
  146. echo '
  147. <p>
  148. <a href="http://validator.w3.org/check?uri=referer"><img
  149. style="border:0;width:88px;height:31px;"
  150. src="http://www.w3.org/Icons/valid-xhtml10"
  151. alt="Valid XHTML 1.0!" height="31" width="88" /></a>
  152. </p>
  153. <p>
  154. <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.insaneminds.org/">
  155. <img style="border:0;width:88px;height:31px;"
  156. src="http://jigsaw.w3.org/css-validator/images/vcss"
  157. alt="Valid CSS!" /></a>
  158. </p>
  159. <p>
  160. <a href="http://www.w3.org/WAI/WCAG1AAA-Conformance"
  161. title="Explanation of Level Triple-A Conformance">
  162. <img style="border:0;width:88px;height:31px;"
  163. src="http://www.w3.org/WAI/wcag1AAA"
  164. alt="Level Triple-A W3C-WAI" /></a>
  165. </p>';
  166. print $site['closecontentsmall']; // Closing Content Small Window
  167. print "\t\t\t</div>\n\n"; // Closing Vertical Right Bar
  168. print "\t\t <!--\n";
  169. print "\t\t Content Central Box Informations\n";
  170. print "\t\t -->\n\n";
  171. print "\t\t\t<div class='content'>\n\n"; // Opening Content Central Box
  172. print $site['opentitlebig']; // Opening Title Big Window
  173. print ':: '.$site_page.' ::';
  174. print $site['closetitlebig']; // Closing Title Big Window
  175. print $site['opencontentbig']; // Opening Content Big Window
  176. return $gh[1];
  177. }
  178. function footerX($pagina, $softw)
  179. {
  180. global $mhost, $muser, $mpass, $mdb, $mtbmst, $mtbmct, $site_struct,
  181. $soft, $time_start;
  182. $str = mysql_connect($mhost, $muser, $mpass);
  183. mysql_select_db($mdb);
  184. $rslt = select($mtbmst, '`closecontentbig`,`footer`',
  185. "`structname` = '$site_struct'", $maxn, '`id`');
  186. $site = mysql_fetch_array($rslt, MYSQL_ASSOC);
  187. closedb($rslt, $str);
  188. print $site['closecontentbig']; // Closing Content Big Window
  189. print "\t\t\t</div>\n"; // Closing Content CentralBox
  190. print $site['footer'];
  191. ?>
  192. </div>
  193. <p><?
  194. $time_end = getmicrotime();
  195. $time = $time_end - $time_start;
  196. echo "Page rendered in: $time seconds</p>";
  197. print '<p style="color: #333333">Best resolution: 1280x1024<br />';
  198. print 'Site tested with: Mozilla(linux,w32), Mozilla-firebird(linux), Mozilla-firefox(linux,w32), Konqueror(linux), Internet Explorer 6(w32).</p>';
  199. ?>
  200. <script type="text/javascript" src="http://codice.shinystat.it/cgi-bin/getcod.cgi?USER=sberla&amp;P=1"></script>
  201. <noscript><p><img src="http://s4.shinystat.it/cgi-bin/shinystat.cgi?USER=sberla&amp;NC=1" alt="Contatore visite" /></p></noscript>
  202. </body>
  203. </html>
  204. <?
  205. }
  206. function fastweb()
  207. {
  208. echo ' Do you have a FastWeb connection ?<br />
  209. [<a href="http://toxic.insaneminds.org">Yes</a>] [<a href="http://www.fastweb.it" onclick="window.open(this.href);return false">No</a>]';
  210. }
  211. function contacts()
  212. {
  213. echo '
  214. Email: mdb@insaneminds.org<br /><br />
  215. IRC: irc.freenode.net #insaneminds<br />
  216. IRC6: Offline:( #insaneminds<br /><br />
  217. WebChat: www.nectarine.it';
  218. }
  219. function underbotta()
  220. {
  221. echo ':: The section is under construction ::';
  222. }
  223. function underbottolone()
  224. {
  225. echo ':: The section is under updating ::';
  226. }
  227. function INSANEFORBIDDEN()
  228. {
  229. echo ':: Permission FORBIDDEN ::';
  230. }
  231. function getmicrotime()
  232. {
  233. list($usec, $sec) = explode(" ",microtime());
  234. return ((float)$usec + (float)$sec);
  235. }
  236. ?>