Location: PHPKode > projects > Spacemarc News > spacemarc-news/admin/menu.php
<?php

/*****************************************************************
*  Spacemarc News
*  Version: 1.2.0
*  Author and copyright (C): Marcello Vitagliano
*  Web site: http://www.spacemarc.it
*  License: GNU General Public License
*
*  This program is free software: you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation, either version 3
*  of the License, or (at your option) any later version.
*
*  Current file: menu.php
*****************************************************************/

if (session_id() == "") {
    session_start();
}

if (!defined('IN_NEWS')) {
    die("Internal file");
}

//includo i file di configurazione
require_once (dirname(__FILE__) . '/../config.php');
require_once (dirname(__FILE__) . '/../lang/lang.php');

//se non c'รจ la sessione 'loggato' rimando alla pagina di login

if (!isset($_SESSION['loggato']) || $_SESSION['loggato'] != 'login_ok') {
    header("Location: " . $dir_admin . "/login.php");
    exit();
}

if ($_SESSION['livello_id'] == 1) {

    //menu di navigazione amministratore
    echo "<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" align=\"center\">
    <tr> 
      <td width=\"15%\" align=\"left\"><img src=\"$img_path/logonews.gif\" border=\"0\" alt=\"Logo\" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class=\"text2\" align=\"right\">" . $_SESSION['nome_cognome_sess'] . "<br /><a href=\"logout.php\" class=\"piccolo\" title=\"Esci dall'applicazione\"><b>Logout</b></a></td>
    </tr>
    <tr>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/insert.png\" border=\"0\" alt=\"Inserisci\" /> <a href=\"inserisci.php\">" . $lang['inserisci'] . "</a></td>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/news.png\" border=\"0\" alt=\"Modifica\" /> <a href=\"gestione_news.php\">" . $lang['gestione_news'] . "</a></td>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/utenti.png\" border=\"0\" alt=\"Utenti\" /> <a href=\"utenti.php\">" . $lang['elenco_utenti'] . "</a></td>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/search.png\" border=\"0\" alt=\"Cerca\" /> <a href=\"searchadmin.php\">" . $lang['ricerca_news'] . "</a></td>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/profilo.png\" border=\"0\" alt=\"Profilo\" /> <a href=\"profilo_admin.php?user_id=" . $_SESSION['user_id'] . "\">" . $lang['profilo_admin'] . "</a></td>
      <td class=\"toprow\" align=\"center\"><img src=\"$img_path/impost.png\" border=\"0\" alt=\"Control\" /> <a href=\"impostazioni.php\">" . $lang['impostazioni'] . "</a></td>
    </tr>
  </table>
<br />";
}
else {

    //menu di navigazione utente
    echo "<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" align=\"center\">
    <tr> 
      <td width=\"20%\" align=\"left\"><img src=\"$img_path/logonews.gif\" border=\"0\" alt=\"Logo\" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td width=\"20%\" class=\"text2\" align=\"right\">" . $_SESSION['nome_cognome_sess'] . "<br /><a href=\"logout.php\" class=\"piccolo\" title=\"Esci dall'applicazione\"><b>Logout</b></a></td>
    </tr>
    <tr>
      <td width=\"20%\" class=\"toprow\" align=\"center\"><img src=\"$img_path/insert.png\" border=\"0\" alt=\"Inserisci\" /> <a href=\"inserisci.php\">" . $lang['inserisci'] . "</a></td>
      <td width=\"20%\" class=\"toprow\" align=\"center\"><img src=\"$img_path/news.png\" border=\"0\" alt=\"Modifica\" /> <a href=\"elenco_news.php\">" . $lang['gestione_news'] . "</a></td>
      <td width=\"20%\" class=\"toprow\" align=\"center\"><img src=\"$img_path/search.png\" border=\"0\" alt=\"Cerca\" /> <a href=\"searchadmin.php\">" . $lang['ricerca_news'] . "</a></td>
      <td width=\"20%\" class=\"toprow\" align=\"center\"><img src=\"$img_path/profilo.png\" border=\"0\" alt=\"Profilo\" /> <a href=\"profilo_utente.php\">" . $lang['profilo_utente'] . "</a></td>
   </tr>
  </table>
<br />";
}
?>
Return current item: Spacemarc News