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

/areariservata/area.php

https://code.google.com/p/bilugcms/
PHP | 225 lines | 196 code | 7 blank | 22 comment | 8 complexity | 524ce5d0077f3aef6822c28d50e1f9ae 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. require_once("auth.php");
  17. $typo = $_SESSION['typo'];
  18. include_once("../utility/versione.php");
  19. include_once("./custom/headadm.html");
  20. include_once("./custom/head.php");
  21. include_once("./custom/scriptadm.html");
  22. $pag = apici( $_GET['pag'] );
  23. $visibile = '';
  24. if ( $typo != 'A' )
  25. $visibile = "AND visibile='si'";
  26. echo "<title>"._SITOADM."</title>";?>
  27. </head>
  28. <div id="contenutoadm">
  29. <div id="testadm">
  30. <div id="logoadm">
  31. <?include_once("./custom/logoadm.html");?>
  32. </div>
  33. </div>
  34. <div id="centrale">
  35. <div id="corpoadm">
  36. <div class="contenitore">
  37. <button class="nascondi">Arrotola</button>
  38. <div class="nascondi">
  39. <div class="azzerafloat"></div>
  40. <div class="float187">
  41. <ul class="tab">
  42. <? if ($typo == "A") { ?>
  43. <li><a title="|Gestione Menu Amministrazione" href="?pag=elenco_menuadmin.php"><img src="./img/utilities.png" class="menu-ico" />Gestione Permessi Admin</a></li>
  44. <?}
  45. $stringamenu="SELECT menu,link,extra,descr FROM menuadmin where colonna=1 $visibile order by ordine";
  46. $menu =mysql_query($stringamenu);
  47. if (mysql_num_rows($menu)>0)
  48. {
  49. while($inserire=mysql_fetch_row($menu))
  50. {
  51. echo "<li><a ";
  52. if ($inserire[3]!="")
  53. echo "class=\"$inserire[3]\" ";
  54. echo "href=\"?pag=$inserire[1]\">".$inserire[0];
  55. if ($inserire[2] !="")
  56. {
  57. echo " (";
  58. @include ($inserire[2]);
  59. echo ")";
  60. }
  61. echo "</a></li>";
  62. }
  63. }
  64. ?>
  65. <li><a title="|Esci dall'area amministrativa" href="exit.php"><img src="./img/exit.png" class="menu-ico" />Exit</a></li>
  66. </ul>
  67. </div>
  68. <div class="float187">
  69. <ul class="tab">
  70. <?
  71. $stringamenu="SELECT menu,link,extra,descr FROM menuadmin where colonna=2 $visibile order by ordine";
  72. $menu =mysql_query($stringamenu);
  73. if (mysql_num_rows($menu)>0)
  74. {
  75. while($inserire=mysql_fetch_row($menu))
  76. {
  77. echo "<li><a ";
  78. if ($inserire[3]!="")
  79. echo "class=\"$inserire[3]\" ";
  80. echo "href=\"?pag=$inserire[1]\">".$inserire[0];
  81. if ($inserire[2] !="")
  82. {
  83. echo " (";
  84. @include ($inserire[2]);
  85. echo ")";
  86. };
  87. echo "</a></li>";
  88. }
  89. }
  90. ?>
  91. </ul>
  92. </div>
  93. <div class="float187">
  94. <ul class="tab">
  95. <?
  96. $stringamenu="SELECT menu,link,extra,descr FROM menuadmin where colonna=3 $visibile order by ordine";
  97. $menu =mysql_query($stringamenu);
  98. if (mysql_num_rows($menu)>0)
  99. {
  100. while($inserire=mysql_fetch_row($menu))
  101. {
  102. echo "<li><a ";
  103. if ($inserire[3]!="")
  104. echo "class=\"$inserire[3]\" ";
  105. echo "href=\"?pag=$inserire[1]\">".$inserire[0];
  106. if ($inserire[2] !="")
  107. {
  108. echo " (";
  109. @include ($inserire[2]);
  110. echo ")";
  111. }
  112. echo "</a></li>";
  113. }
  114. }
  115. ?>
  116. </ul>
  117. </div>
  118. <div class="float187">
  119. <ul class="tab">
  120. <?
  121. $stringamenu="SELECT menu,link,extra,descr FROM menuadmin where colonna=4 $visibile order by ordine";
  122. $menu =mysql_query($stringamenu);
  123. if (mysql_num_rows($menu)>0)
  124. {
  125. while($inserire=mysql_fetch_row($menu))
  126. {
  127. echo "<li><a ";
  128. if ($inserire[3]!="")
  129. echo "class=\"$inserire[3]\" ";
  130. echo "href=\"?pag=$inserire[1]\">".$inserire[0];
  131. if ($inserire[2] !="")
  132. {
  133. echo " (";
  134. @include ($inserire[2]);
  135. echo ")";
  136. };
  137. echo "</a></li>";
  138. }
  139. }
  140. ?>
  141. <li><a target="_blank" title="|Informazioni sulla Versione del Server" href="ver.php">Visualizza Info Server</a></li>
  142. </ul>
  143. </div>
  144. <div class="float187">
  145. <ul class="tab">
  146. <?
  147. $stringamenu="SELECT menu,link,extra,descr FROM menuadmin where colonna=5 $visibile order by ordine";
  148. $menu =mysql_query($stringamenu);
  149. if (mysql_num_rows($menu)>0)
  150. {
  151. while($inserire=mysql_fetch_row($menu))
  152. {
  153. echo "<li><a ";
  154. if ($inserire[3]!="")
  155. echo "class=\"$inserire[3]\" ";
  156. echo "href=\"?pag=$inserire[1]\">".$inserire[0];
  157. if ($inserire[2] !="")
  158. {
  159. echo " (";
  160. @include ($inserire[2]);
  161. echo ")";
  162. }
  163. echo "</a></li>";
  164. }
  165. }
  166. ?>
  167. </ul>
  168. </div>
  169. </div>
  170. <div class="azzerafloat"></div>
  171. </div>
  172. <div class="azzerafloat"></div>
  173. <br/>
  174. <p>
  175. <?
  176. include_once("control.php");
  177. $cont=control($pag);
  178. if($cont=="ok")
  179. {
  180. $inizio = substr($pag,0,1);
  181. if ($pag!="" AND $inizio!="/" AND stristr($pag, 'http://')==FALSE AND stristr($pag, 'ftp://')==FALSE AND stristr($pag, 'https://')==FALSE)
  182. {
  183. //se $pag ? diverso da nullo, allora includiamo il file linkato, sempre se esiste
  184. if (file_exists ($pag))
  185. {
  186. include ($pag);
  187. }
  188. else
  189. //se $pag ? diverso da nullo ma il file linkato non esiste, allora includiamo un file di default
  190. include ("default.html");
  191. }
  192. else
  193. //se $pag ? nullo, includiamo una pagina bianca
  194. include ("benvenuto.php");
  195. }
  196. ?>
  197. </P>
  198. </div>
  199. </div>
  200. <div id="piedeadm">
  201. <?include_once("../custom/piedeadm.html");?>
  202. <p>
  203. <a class="del" href="http://www.bilug.it" title="|Official Site">
  204. <img src="./img/logo-bilug.gif" class="piedelogo" alt="BilugCMS" />
  205. <span class="versione">Admin Ver. <?=$versione?></span>
  206. </a>
  207. </p>
  208. </div>
  209. </div>
  210. </body>
  211. </html>