mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Added authentication includes to all files
This commit is contained in:
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
67
admin/auth-admin.php
Normal file
67
admin/auth-admin.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Session based authentication using the Limesurvey database (administrator)
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS 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 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* queXS 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 queXS; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @copyright Australian Consortium for Social and Political Research Incorporated (ACSPRI) 2013
|
||||
* @package queXS
|
||||
* @subpackage user
|
||||
* @link http://www.acspri.org.au/ queXS was writen for ACSPRI
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include_once(dirname(__FILE__) . "/../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include_once(dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
|
||||
//get session name from DB
|
||||
//
|
||||
$sql = "SELECT stg_value
|
||||
FROM " . LIME_PREFIX . "settings_global
|
||||
WHERE stg_name = 'SessionName'";
|
||||
|
||||
session_name($db->GetOne($sql));
|
||||
|
||||
//check if the session exists or loginID not set
|
||||
if (session_id() == "" || !isset($_SESSION['loginID']))
|
||||
{
|
||||
//need to log in
|
||||
header('Location: ../include/limesurvey/admin/admin.php');
|
||||
die();
|
||||
}
|
||||
|
||||
if ($_SESSION['USER_RIGHT_SUPERADMIN'] != 1)
|
||||
{
|
||||
include_once(dirname(__FILE__) . "/../lang.inc.php");
|
||||
include_once(dirname(__FILE__) . "/../functions/functions.xhtml.php");
|
||||
xhtml_head();
|
||||
print "<p>" . T_("You do not have permission to access this area") . "</p>";
|
||||
print "<p><a href='../include/limesurvey/admin/admin.php?action=logout'>" . T_("Logout") . "</a></p>";
|
||||
xhtml_foot();
|
||||
}
|
||||
@@ -39,6 +39,12 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,11 @@ include ("../functions/functions.xhtml.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/**
|
||||
* Output data as a fixed width ASCII file
|
||||
*
|
||||
*
|
||||
@@ -43,6 +44,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
/**
|
||||
* Display an index of Admin tools
|
||||
*
|
||||
*
|
||||
@@ -37,9 +36,15 @@ include ("../lang.inc.php");
|
||||
/**
|
||||
* Config file
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
include ("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
include ("../functions/functions.xhtml.php");
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
$username = $_SESSION['loginID'];
|
||||
$g = 0;
|
||||
if (isset($_GET['g']))
|
||||
$g = intval($_GET['g']);
|
||||
@@ -75,11 +80,11 @@ include ("../lang.inc.php");
|
||||
<i class="fa fa-user fa fa-fw "></i><?php print T_("Logged as:") . " " . $username ;?>
|
||||
</a>
|
||||
<!--- User menu // not connected to pages so not working yet // could be hidden -->
|
||||
<!--- <ul class="dropdown-menu" role="menu">
|
||||
<li><a href="?page=settings.php"><i class="fa fa-cogs fa-fw "></i> <?php print T_("Settings"); ?></a></li>
|
||||
<li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php print T_("Lock Screen"); ?></a></li>
|
||||
<li><a href="../logout.php"><i class="fa fa-sign-out fa-fw "></i> <?php print T_("Logout"); ?> </a></li>
|
||||
</ul> -->
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="../include/limesurvey/admin/admin.php?action=editusers"><i class="fa fa-cogs fa-fw "></i> <?php print T_("Settings"); ?></a></li>
|
||||
<!--- <li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php print T_("Lock Screen"); ?></a></li> -->
|
||||
<li><a href="../include/limesurvey/admin/admin.php?action=logout"><i class="fa fa-sign-out fa-fw "></i> <?php print T_("Logout"); ?> </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
@@ -378,4 +383,4 @@ else { ?>
|
||||
|
||||
<?php
|
||||
xhtml_foot($js_foot);//
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -39,6 +39,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include (dirname(__FILE__) . "/../config.inc.php");
|
||||
*/
|
||||
include (dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/**
|
||||
* Display sample call attempt report (A listing of how many attempts made for cases within a sample)
|
||||
*
|
||||
*
|
||||
@@ -38,6 +39,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/**
|
||||
* List and edit reports on shifts
|
||||
*
|
||||
*
|
||||
@@ -38,6 +39,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include (dirname(__FILE__) . "/../config.inc.php");
|
||||
*/
|
||||
include (dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,11 @@ include("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ include ("../config.inc.php");
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user