/content/int.php
PHP | 312 lines | 212 code | 74 blank | 26 comment | 0 complexity | f8452ded611ed48cb2bc5ba57fe6d2b0 MD5 | raw file
- <?php
- /* $Id: int.php,v 0.1.3.7 22/11/2004 18:02:07 mdb Exp $
- * $Author: mdb $
- *
- * InsanePHP XHTML Structure/Sitemask's Text Content Generator Script
- * php released under PHP License - http://www.php.net/license/3_0.txt
- *
- * Descrizione
- * Descrizione
- *
- * Copyright (c) 2004 Filippo Baruffaldi <mdb AT insaneminds DOT org> <http://www.insaneminds.org>
- * All associated graphics Copyright (c) 2004 Filippo Baruffaldi
- *
- * You may not reproduce it elsewhere without the prior written permission of the author.
- * However, feel free to study the code and use techniques you learn from it elsewhere.
- */
- /*
- * substr('##CONTENT##',$extractfromsqlmaskcontent,$extractfromsqlmaskstruct)
- */
- include 'includes.php';
- $time_start = getmicrotime();
- function headerX($site_page, $siteskin)
- {
- global $site_name, $mhost, $muser, $mpass, $mdb, $mtbgl_i, $mtbmst,
- $mtbmct, $site_struct, $soft;
- $str = mysql_connect($mhost, $muser, $mpass);
- opendb($mdb);
- $rslt = select($mtbmst, '`htmlinfo`,`header`,`subtitle`,
- `opentitlesmall`,`closetitlesmall`,`opencontentsmall`,
- `closecontentsmall`,`opentitlebig`,`closetitlebig`,
- `opencontentbig`',
- "`structname` = '$site_struct'", $maxn, '`id`');
- $site = mysql_fetch_array($rslt, MYSQL_ASSOC);
- closedb($rslt, $str);
- print str_replace('##SUBS##', $site_name.$site_page, $site['htmlinfo']);
- $gh = getclient_style($soft, $siteskin);
- $gh = explode('###', $gh);
- print $gh[0];
- print $site['header']; // Orizontal Header Top Bar
- print $site['subtitle']; // Orizontal SubHeader Top Bar
- print "\t\t\t <div class='navigation'>\n\n"; // Opening Vertical Left SideBar
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'iNSANEMiNDS';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- echo '
- <b>Browse through<br />
- the site:</b><br /><br />
- <b>[</b><a href="http://www.insaneminds.org/">news</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=urbani">informatics.laws</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=revenge">revenge</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=torino">torino</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=statespy">the-state</a><b>]</b><br /><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=contacts">contacts</a><b>]</b><br /><br />
- <b>Insane Services</b>:<br /><br />
- <b>[</b><a href="http://www.insaneminds.org/gallery">gallery</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/no-paste">no-paste</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/tiny-url">tiny-url</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=underupdating">fastweb</a><b>]</b><br /><br />
- <b>[</b><a href="http://www.insaneminds.org/admin">admin</a><b>]</b><br /><br />
- <b>Insane Skins</b>:<br /><br />
- <b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&skin=black">black</a><b>]</b> :: <b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&skin=white">white</a><b>]</b><br />
- <b>[</b><a href="http://'; echo $_SERVER['HTTP_HOST'].'/?section=changeskin&skin=text">text</a><b>]</b><br /><br />
- <b>Change language</b><br /><br />
- <a href="'; echo '/?section=underupdating">'; // http://insaneminds.org/it/">
- echo ' <img src="http://insaneminds.org/imgs/it.gif" height="15" width="25" alt="" style="border:0;" />
- </a>
- <img src="http://insaneminds.org/imgs/gb.gif" height="15" width="25" alt="" style="border:0;" />
- <a href="http://translate.google.com/translate?langpair=en|es&u=http://www.insaneminds.org&hl=en&ie=UTF-8&oe=UTF-8&prev=/language_tools">
- <img src="http://insaneminds.org/imgs/es.gif" height="15" width="25" alt="" style="border:0;" />
- </a>';
- print $site['closecontentsmall']; // Closing Content Small Window
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'Login';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- /*echo ' <form method="get" action="login.php">
- <input type="hidden" name="act" value="check">
- <b>Username</b><br />
- <input class="tbox" type="text" name="username" size="15" maxlength="50">
- <b>Password</b><br />
- <input class="tbox" type="password" name="passwd" size="15" maxlength="50"><br /><br />
- <input id="login" type="submit" value=" .">
- </form>';*/
- 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 />';
- print $site['closecontentsmall']; // Closing Content Small Window
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'Random Image';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- $str = mysql_connect($mhost, $muser, $mpass);
- mysql_select_db($mdb);
- $min = 0;
- $row = mysql_fetch_assoc(mysql_query("SHOW TABLE STATUS LIKE '$mtbgl_i'"));
- $max = $row["Auto_increment"];
- $random_id = rand($min, $max);
-
- $rslt = select($mtbgl_i, '*', "`id` = '$random_id' AND `perms` = 'Public' OR `id` LIKE '$random_id' AND `perms` = 'Public'", $maxp, '`id`');
- $linea = mysql_fetch_array($rslt, MYSQL_ASSOC);
- closedb($rslt, $str);
- echo "<p style='font-weight: bold; font-size: 12px; margin: 0px;'>".decleantext($linea['name'])."</p><br />
- <a href='/gallery/?".$linea['author'].'/'.$linea['album'].'/'.$linea['name']."'>\n
- <img src='/gallery/getimage.php?id=".$linea['id']."' alt='".$linea['name']."' title='".$linea['name']."' width='100' />\n
- </a><br /><br />\n
- Author: <i>".decleantext($linea['author'])."</i><br />
- Album: <i>".decleantext($linea['album'])."</i><br /><br />
- Uploaded on: ".$linea['date'].'<br />';
- print $site['closecontentsmall']; // Closing Content Small Window
- print "\t\t\t </div>\n\n"; // Closing Vertical Left SideBar
- print "\t\t <!--\n";
- print "\t\t Vertical Right Sidebar Informations\n";
- print "\t\t -->\n\n";
- print "\t\t\t <div class='spot'>\n\n"; // Opening Vertical Right SideBar
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'Coming Soon';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- echo '<b>Hoping soon</b><br /><br /> <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">register</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">blogs</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">about</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">zena</a><b>]</b><br />
- <b>[</b><a href="http://www.insaneminds.org/?section=underconstruction">dyndns</a><b>]</b><br /><br />';
- print $site['closecontentsmall']; // Closing Content Small Window
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'Powered by';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- echo '<br />
- <img src="http://insaneminds.biz/imgs/php.gif" alt="" height="31" width="88" /><br /><br />
- <img src="http://insaneminds.biz/imgs/mysql.gif" alt="" height="31" width="88" /><br /><br />
- <img src="http://insaneminds.biz/imgs/molespot.gif" width="85" alt="" /><br /><br />';
- print $site['closecontentsmall']; // Closing Content Small Window
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'Links';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- echo '
- [<a href="http://www.nectarine.it/" onclick="window.open(this.href);return false">nectarine</a>]<br />
- [<a href="http://www.ottimizzati.com/" onclick="window.open(this.href);return false">web hosting</a>]<br />
- [<a href="http://www.be-you.org/" onclick="window.open(this.href);return false">be-you :: festival</a>]<br />
- [<a href="http://www.lyrics007.com" onclick="window.open(this.href);return false">lyrics007</a>]<br />';
- print $site['closecontentsmall']; // Closing Content Small Window
- print $site['opentitlesmall']; // Opening Title Small Window
- print 'W3C Validations';
- print $site['closetitlesmall']; // Closing Title Small Window
- print $site['opencontentsmall']; // Opening Content Small Window
- echo '
- <p>
- <a href="http://validator.w3.org/check?uri=referer"><img
- style="border:0;width:88px;height:31px;"
- src="http://www.w3.org/Icons/valid-xhtml10"
- alt="Valid XHTML 1.0!" height="31" width="88" /></a>
- </p>
- <p>
- <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.insaneminds.org/">
- <img style="border:0;width:88px;height:31px;"
- src="http://jigsaw.w3.org/css-validator/images/vcss"
- alt="Valid CSS!" /></a>
- </p>
- <p>
- <a href="http://www.w3.org/WAI/WCAG1AAA-Conformance"
- title="Explanation of Level Triple-A Conformance">
- <img style="border:0;width:88px;height:31px;"
- src="http://www.w3.org/WAI/wcag1AAA"
- alt="Level Triple-A W3C-WAI" /></a>
- </p>';
- print $site['closecontentsmall']; // Closing Content Small Window
- print "\t\t\t</div>\n\n"; // Closing Vertical Right Bar
- print "\t\t <!--\n";
- print "\t\t Content Central Box Informations\n";
- print "\t\t -->\n\n";
- print "\t\t\t<div class='content'>\n\n"; // Opening Content Central Box
- print $site['opentitlebig']; // Opening Title Big Window
- print ':: '.$site_page.' ::';
- print $site['closetitlebig']; // Closing Title Big Window
- print $site['opencontentbig']; // Opening Content Big Window
- return $gh[1];
- }
- function footerX($pagina, $softw)
- {
- global $mhost, $muser, $mpass, $mdb, $mtbmst, $mtbmct, $site_struct,
- $soft, $time_start;
- $str = mysql_connect($mhost, $muser, $mpass);
- mysql_select_db($mdb);
- $rslt = select($mtbmst, '`closecontentbig`,`footer`',
- "`structname` = '$site_struct'", $maxn, '`id`');
- $site = mysql_fetch_array($rslt, MYSQL_ASSOC);
- closedb($rslt, $str);
- print $site['closecontentbig']; // Closing Content Big Window
- print "\t\t\t</div>\n"; // Closing Content CentralBox
- print $site['footer'];
- ?>
- </div>
- <p><?
- $time_end = getmicrotime();
- $time = $time_end - $time_start;
- echo "Page rendered in: $time seconds</p>";
- print '<p style="color: #333333">Best resolution: 1280x1024<br />';
- print 'Site tested with: Mozilla(linux,w32), Mozilla-firebird(linux), Mozilla-firefox(linux,w32), Konqueror(linux), Internet Explorer 6(w32).</p>';
- ?>
- <script type="text/javascript" src="http://codice.shinystat.it/cgi-bin/getcod.cgi?USER=sberla&P=1"></script>
- <noscript><p><img src="http://s4.shinystat.it/cgi-bin/shinystat.cgi?USER=sberla&NC=1" alt="Contatore visite" /></p></noscript>
- </body>
- </html>
- <?
- }
- function fastweb()
- {
- echo ' Do you have a FastWeb connection ?<br />
- [<a href="http://toxic.insaneminds.org">Yes</a>] [<a href="http://www.fastweb.it" onclick="window.open(this.href);return false">No</a>]';
- }
- function contacts()
- {
- echo '
- Email: mdb@insaneminds.org<br /><br />
- IRC: irc.freenode.net #insaneminds<br />
- IRC6: Offline:( #insaneminds<br /><br />
- WebChat: www.nectarine.it';
- }
- function underbotta()
- {
- echo ':: The section is under construction ::';
- }
- function underbottolone()
- {
- echo ':: The section is under updating ::';
- }
- function INSANEFORBIDDEN()
- {
- echo ':: Permission FORBIDDEN ::';
- }
- function getmicrotime()
- {
- list($usec, $sec) = explode(" ",microtime());
- return ((float)$usec + (float)$sec);
- }
- ?>