PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/custom/main.php

https://code.google.com/p/bilugcms/
PHP | 120 lines | 99 code | 2 blank | 19 comment | 9 complexity | 39f98e2bb29958390275a19dd0b34eb2 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception
  1. <? /* license
  2. BilugCMS (http://www.bilug.it) - Content Management System for dynamic web sites
  3. Copyright (C) 2005-2008 Federico Villa and Alessio Loro Piana
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. For reference, contact bilugcms@vilnet.it
  14. license */ ?>
  15. <?
  16. $stringa="SELECT ID,sez,voce FROM menu order by sez";
  17. $risulta=mysql_query($stringa);
  18. if (mysql_num_rows($risulta)>0)
  19. {
  20. $i=0;
  21. while ($control=mysql_fetch_row($risulta))
  22. {
  23. $titolo[$i++]= $control[2];
  24. $str1="SELECT voce,link,stat FROM menuvoci where IDmenu='$control[0]' order by ordine";
  25. $risultato1=mysql_query($str1);
  26. if (mysql_num_rows($risultato1)>0)
  27. {
  28. $j=0;
  29. while ($control1 = mysql_fetch_row($risultato1))
  30. {
  31. $menu[$control[1]][$j]= $control1[0];
  32. if ($control1[2]=='si')
  33. {
  34. $link[$control[1]][$j]= "index.php?pag=static.php&amp;stat=".$control1[1] ;
  35. }
  36. else
  37. $link[$control[1]][$j]= $control1[1];
  38. $j++;
  39. }
  40. }
  41. }
  42. }
  43. ?>
  44. <div class="contenitore">
  45. <div class="float354">
  46. <div id="menucd">
  47. <div id="cdalto">
  48. <div class="bordic">
  49. <h2><?=$titolo[0]?></h2>
  50. <div id="menua">
  51. <ul>
  52. <?
  53. for($i=0;$i<count($menu['a']);$i++)
  54. echo "<li><a href=\"".$link['a'][$i]."\">".$menu['a'][$i]."</a></li>";
  55. ?>
  56. </ul>
  57. </div>
  58. </div>
  59. </div>
  60. <div id="cdsin">
  61. <div class="bordil">
  62. <h2><?=$titolo[3]?></h2>
  63. <div id="menub">
  64. <ul>
  65. <?
  66. for($i=0;$i<count($menu['d']);$i++)
  67. echo "<li><a href=\"".$link['d'][$i]."\">".$menu['d'][$i]."</a></li>";
  68. ?>
  69. </ul>
  70. </div>
  71. </div>
  72. </div>
  73. <div id="cddes">
  74. <div class="bordil">
  75. <h2><?=$titolo[1]?></h2>
  76. <div id="menuc">
  77. <ul>
  78. <?
  79. for($i=0;$i<count($menu['b']);$i++)
  80. echo "<li><a href=\"".$link['b'][$i]."\">".$menu['b'][$i]."</a></li>";
  81. ?>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <div id="cdbasso">
  87. <div class="bordic">
  88. <h2><?=$titolo[2]?></h2>
  89. <div id="menud">
  90. <ul>
  91. <?
  92. for($i=0;$i<count($menu['c']);$i++)
  93. echo "<li><a href=\"".$link['c'][$i]."\">".$menu['c'][$i]."</a></li>";
  94. ?>
  95. </ul>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="dati">
  102. </div>
  103. <br/>
  104. <br/>
  105. <div class="float168">
  106. <ul id="news">
  107. <li><h2>Demo</h2>Demo</li>
  108. </ul>
  109. </div>
  110. <div class="azzerafloat"></div>
  111. </div>