コード例 #1
0
ファイル: functions.inc.php プロジェクト: JeromeDevome/GRR
function page_accueil($param = 'no')
{
    // Definition de $defaultroom
    if (isset($_SESSION['default_room']) && $_SESSION['default_room'] > 0) {
        $defaultroom = $_SESSION['default_room'];
    } else {
        $defaultroom = Settings::get("default_room");
    }
    // Definition de $defaultsite
    if (isset($_SESSION['default_site']) && $_SESSION['default_site'] > 0) {
        $defaultsite = $_SESSION['default_site'];
    } else {
        if (Settings::get("default_site") > 0) {
            $defaultsite = Settings::get("default_site");
        } else {
            $defaultsite = get_default_site();
        }
    }
    // Definition de $defaultarea
    if (isset($_SESSION['default_area']) && $_SESSION['default_area'] > 0) {
        $defaultarea = $_SESSION['default_area'];
    } else {
        if (Settings::get("default_area") > 0) {
            $defaultarea = Settings::get("default_area");
        } else {
            $defaultarea = get_default_area($defaultsite);
        }
    }
    // Calcul de $page_accueil
    if ($defaultarea == -1) {
        $page_accueil = 'day.php?noarea=';
    } else {
        if ($defaultroom == -1) {
            $page_accueil = 'day.php?area=' . $defaultarea;
        } else {
            if ($defaultroom == -2) {
                $page_accueil = 'week_all.php?area=' . $defaultarea;
            } else {
                if ($defaultroom == -3) {
                    $page_accueil = 'month_all.php?area=' . $defaultarea;
                } else {
                    if ($defaultroom == -4) {
                        $page_accueil = 'month_all2.php?area=' . $defaultarea;
                    } else {
                        $page_accueil = 'week.php?area=' . $defaultarea . '&room=' . $defaultroom;
                    }
                }
            }
        }
    }
    if (Settings::get("module_multisite") == "Oui" && $defaultsite > 0) {
        $page_accueil .= '&id_site=' . $defaultsite;
    }
    if ($param == 'yes') {
        $page_accueil .= '&';
    }
    return $page_accueil;
}
コード例 #2
0
ファイル: admin_admin_site.php プロジェクト: rhertzog/lcs
 * Revision 1.3  2008-11-16 22:00:58  grr
 * *** empty log message ***
 *
 * Revision 1.2  2008-11-13 21:32:51  grr
 * *** empty log message ***
 *
 * Revision 1.1  2008-11-06 21:59:06  grr
 * *** empty log message ***
 *
 *
 */

include "include/admin.inc.php";
$grr_script_name = "admin_admin_site.php";
$id_site = isset($_POST["id_site"]) ? $_POST["id_site"] : (isset($_GET["id_site"]) ? $_GET["id_site"] : NULL);
if (empty($id_site)) $id_site = get_default_site();
if (!isset($id_site)) settype($id_site,"integer");


$back = '';
if (isset($_SERVER['HTTP_REFERER'])) $back = grr_htmlSpecialChars($_SERVER['HTTP_REFERER']);
if(authGetUserLevel(getUserName(),-1) < 6)
{
    $day   = date("d");
    $month = date("m");
    $year  = date("Y");
    showAccessDenied($day, $month, $year, '',$back);
    exit();
}
if (getSettingValue("module_multisite") != "Oui")
{
コード例 #3
0
 * (at your option) any later version.
 *
 * GRR is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GRR; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
include "../include/admin.inc.php";
$grr_script_name = "admin_admin_site.php";
$id_site = isset($_POST["id_site"]) ? $_POST["id_site"] : (isset($_GET["id_site"]) ? $_GET["id_site"] : NULL);
if (empty($id_site)) {
    $id_site = get_default_site();
}
if (!isset($id_site)) {
    settype($id_site, "integer");
}
$back = '';
if (isset($_SERVER['HTTP_REFERER'])) {
    $back = htmlspecialchars($_SERVER['HTTP_REFERER']);
}
check_access(6, $back);
if (Settings::get("module_multisite") != "Oui") {
    showAccessDenied($back);
    exit;
}
# print the page header
print_header("", "", "", $type = "with_session");
コード例 #4
0
ファイル: functions.inc.php プロジェクト: rhertzog/lcs
function page_accueil($param='no') {
   // Definition de $defaultroom
   if (isset($_SESSION['default_room']) and ($_SESSION['default_room'] >0)) {
      $defaultroom = $_SESSION['default_room'];
   } else {
      $defaultroom = getSettingValue("default_room");
   }

   // Definition de $defaultsite
   if (isset($_SESSION['default_site']) and ($_SESSION['default_site'] >0)) {
      $defaultsite = $_SESSION['default_site'];
   } else if (getSettingValue("default_site") > 0) {
      $defaultsite = getSettingValue("default_site");
   } else
      $defaultsite = get_default_site();

   // Definition de $defaultarea
   if (isset($_SESSION['default_area']) and ($_SESSION['default_area'] >0)) {
      $defaultarea = $_SESSION['default_area'];
   } else if (getSettingValue("default_area") > 0) {
      $defaultarea = getSettingValue("default_area");
   } else
      $defaultarea = get_default_area($defaultsite);

   // Calcul de $page_accueil
   if ($defaultarea == -1) {
      $page_accueil="day.php?noarea="; // le paramètre noarea ne sert à rien, il est juste là pour éviter un cas particulier à traiter avec &amp;id_site= et $param
   } else if ($defaultroom == -1) {
      $page_accueil="day.php?area=$defaultarea";
   } else if ($defaultroom == -2) {
      $page_accueil="week_all.php?area=$defaultarea";
   } else if ($defaultroom == -3) {
      $page_accueil="month_all.php?area=$defaultarea";
   } else if ($defaultroom == -4) {
      $page_accueil="month_all2.php?area=$defaultarea";
   } else {
      $page_accueil="week.php?area=$defaultarea&amp;room=$defaultroom";
   }
   if ((getSettingValue("module_multisite") == "Oui") and ($defaultsite>0))
       $page_accueil .= "&amp;id_site=".$defaultsite;
   if ($param=='yes') $page_accueil .= "&amp;";
   return $page_accueil ;
}