2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

merged rev. 486

This commit is contained in:
Alex
2015-09-10 02:10:45 +03:00
156 changed files with 5533 additions and 4493 deletions

View File

@@ -1,5 +0,0 @@
AuthType Basic
AuthName "queXS CATI: Authentication Required"
AuthUserFile /var/opt/quexs/htpasswd
AuthGroupFile /var/opt/quexs/htgroup
require group admin

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

70
admin/auth-admin.php Normal file
View File

@@ -0,0 +1,70 @@
<?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));
session_start();
//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();
die();
}

View File

@@ -39,6 +39,12 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -44,6 +44,11 @@ include ("../functions/functions.xhtml.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* Operator functions
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -100,18 +105,21 @@ if ($operator_id)
if (!isset($_GET['csv']))
$sql .= " LIMIT 500";
else $sql .= " LIMIT 5000";
// else $sql .= " LIMIT 5000"; no limit when using CSV
$rs = $db->Execute($sql);
if (empty($rs))
{
xhtml_head(T_("Call History List"),true,$css,$js_head);
print "<div class='alert alert-warning col-sm-6'><p>" . T_("No calls ever made") . "</p></div>";
}
else
{
if (isset($_GET['csv']))
{
$qds = str_replace(' ','_',$_GET['dq']); $smpds = str_replace(' ','_',$_GET['ds']);
{
$qds = $smpds = "";
if (isset($_GET['dq'])) $qds = str_replace(' ','_',$_GET['dq']);
if (isset($_GET['ds'])) $smpds = str_replace(' ','_',$_GET['ds']);
$fn = "callhistory-" . $qds . $smpds . date("_d-M-Y_H-i") . ".csv";
header("Content-Type: text/csv");
@@ -160,7 +168,17 @@ if ($operator_id)
print "<h3><small>" . T_("Sample") . "&emsp;ID: $sid</small>&emsp;" . $ds . "</h3>";
unset($datacol[5]); unset($headers[5]); }
print "&nbsp;<a href='?csv=csv&amp;questionnaire_id=$qid&amp;dq=" . $dq . "&amp;sample_import_id=$sid&amp;ds=" . $ds . "' class='btn btn-default pull-right'><i class='fa fa-download fa-lg text-primary'></i>&emsp;" . T_("Download Call History List") . "</a>
print "&nbsp;<a href='?csv=csv";
if (isset($qid))
print "&amp;questionnaire_id=$qid";
if (isset($dq))
print "&amp;dq=" . $dq;
if (isset($sid))
print "&amp;sample_import_id=$sid";
if (isset($ds))
print "&amp;ds=" . $ds;
print "' class='btn btn-default pull-right'><i class='fa fa-download fa-lg text-primary'></i>&emsp;" . T_("Download Call History List") . "</a>
"; //<a href='../../admin/config.php' target='_blank' class='btn btn-default col-sm-offset-6 '><i class='fa fa-link fa-lg text-primary'></i>&emsp;" . T_("Go to Call History Report") . "</a>&nbsp;
xhtml_table($rs,$datacol,$headers,"tclass",false,false,"bs-table");

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -12,6 +12,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -42,6 +42,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -56,6 +61,7 @@ if (isset($_POST['client']))
{
$client = $db->qstr($_POST['client'],get_magic_quotes_gpc());
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
$email = $db->qstr($_POST['email'],get_magic_quotes_gpc());
$lastname = $db->qstr($_POST['lastname'],get_magic_quotes_gpc());
$time_zone_name = $db->qstr($_POST['Time_zone_name'],get_magic_quotes_gpc());
@@ -67,17 +73,15 @@ if (isset($_POST['client']))
if ($db->Execute($sql))
{
if (HTPASSWD_PATH !== false && HTGROUP_PATH !== false)
{
//Get password and add it to the configured htpassword
include_once("../functions/functions.htpasswd.php");
$htp = New Htpasswd(HTPASSWD_PATH);
$htg = New Htgroup(HTGROUP_PATH);
$htp->addUser($_POST['client'],$_POST['password']);
$htg->addUserToGroup($_POST['client'],HTGROUP_CLIENT);
}
include_once("../include/limesurvey/admin/classes/core/sha256.php");
//Insert into lime_users
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`email`,`lang`)
VALUES ($client, '" . SHA256::hashing($_POST['password']) . "',$firstname,1,0,$email,'auto')";
$db->Execute($sql);
$a = T_("Added: $client");
}
else
@@ -142,23 +146,20 @@ function generate() {
<div class="well">
<p><?php echo T_("Adding a client here will allow them to access project information in the client subdirectory. You can assign a client to a particular project using the"); ?> <a href="clientquestionnaire.php"><?php echo T_("Assign client to Questionnaire"); ?></a> <?php echo T_("tool."); ?></p>
<p><?php echo T_("Use this form to enter the username of a user based on your directory security system. For example, if you have secured the base directory of queXS using Apache file based security, enter the usernames of the users here."); ?></p></div>
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal" name="addclient" >
<div class="form-group form-inline">
<label class="control-label col-sm-3"><?php echo T_("Enter the username of a client to add:"); ?></label>
<input name="client" type="text" class="form-control pull-left" required size="40" />
</div>
<?php if (HTPASSWD_PATH !== false && HTGROUP_PATH !== false) { ?>
<div class="form-group form-inline">
<label class="control-label col-sm-3"><?php echo T_("Enter the password of a client to add:"); ?></label>
<input name="password" type="text" class="form-control pull-left" size="40" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" />
<input name="password" type="text" class="form-control pull-left" size="40" required />
<div class="form-inline">&emsp;&emsp;
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" />&emsp;<?php echo T_("Password with");?>&ensp;
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" />&ensp;<?php echo T_("characters");?>
</div>
</div>
<?php } ?>
<div class="form-group form-inline">
<label class="control-label col-sm-3"><?php echo T_("Enter the first name of a client to add:"); ?></label>
<input name="firstname" type="text" class="form-control pull-left" size="40" />
@@ -166,7 +167,11 @@ function generate() {
<div class="form-group form-inline">
<label class="control-label col-sm-3"><?php echo T_("Enter the surname of a client to add:"); ?></label>
<input name="lastname" type="text" class="form-control pull-left" size="40"/>
</div>
</div>
<div class="form-group form-inline">
<label class="col-sm-3 control-label"><?php echo T_("Email") . ": ";?></label>
<input name="email" type="text" class="form-control pull-left"/>
</div>
<div class="form-group form-inline">
<label class="control-label col-sm-3"><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of a client to add:"); echo "</a></label>";
display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE")),true,"pull-left"); ?>

View File

@@ -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
*/

View File

@@ -12,6 +12,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -38,6 +38,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -180,7 +185,7 @@ if (isset($_GET['edit']) || isset($_GET['addext']))
WHERE extension_id = " . intval($_GET['edit']);
$rs = $db->GetRow($sql);
}
} else $rs = array();
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
?>

View File

@@ -8,6 +8,11 @@
*/
include ("../config.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -1,6 +1,5 @@
<?php
/*
/**
* Display an index of Admin tools
*
*
@@ -37,9 +36,24 @@ include ("../lang.inc.php");
/**
* Config file
*/
include ("../config.inc.php");
include ("../functions/functions.xhtml.php");
$username = $_SERVER['PHP_AUTH_USER'];
include ("../config.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/*
* XHTML file
*/
include ("../functions/functions.xhtml.php");
/*
* Operator functions
*/
include ("../functions/functions.operator.php");
$username = $_SESSION['user'];
$g = 0;
if (isset($_GET['g']))
$g = intval($_GET['g']);
@@ -75,11 +89,11 @@ include ("../lang.inc.php");
<i class="fa fa-user fa fa-fw "></i><?php print T_("Logged as:") . "&ensp;" . $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>&ensp;<?php print T_("Settings"); ?></a></li>
<li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i>&ensp;<?php print T_("Lock Screen"); ?></a></li>
<li><a href="../logout.php"><i class="fa fa-sign-out fa-fw "></i>&ensp;<?php print T_("Logout"); ?> </a></li>
</ul> -->
<ul class="dropdown-menu" role="menu">
<li><a href="?g=5&amp;page=operatorlist.php?edit=<?php print get_operator_id(); ?>"><i class="fa fa-cogs fa-fw "></i>&ensp;<?php print T_("Settings"); ?></a></li>
<!--- <li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i>&ensp;<?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>&ensp;<?php print T_("Logout"); ?> </a></li>
</ul>
</li>
</ul>

View File

@@ -11,6 +11,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -394,4 +399,4 @@ else { ?>
<?php
xhtml_foot($js_foot);//
?>
?>

View File

@@ -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
*/
@@ -50,30 +55,50 @@ $msg = "";
if (isset($_POST['submit']))
{
$operator_id = intval($_POST['operator_id']);
$chat_enable = $voip = $enabled = 0;
$superadmin = $chat_enable = $voip = $enabled = 0;
if (isset($_POST['voip'])) $voip = 1;
if (isset($_POST['chat_enable'])) $chat_enable = 1;
if (isset($_POST['enabled'])) $enabled = 1;
if (isset($_POST['admin'])) $superadmin = 1;
if (HTPASSWD_PATH !== false && $_POST['existing_username'] != $_POST['username'] && empty($_POST['password']))
{
$msg = "<div class='alert alert-danger'><h3>" . T_("If changing usernames, you must specify a new password") . "</h3></div>";
}
else
{
$sql = "UPDATE operator
SET username = " . $db->qstr($_POST['username']) . ",
lastName = " . $db->qstr($_POST['lastName']) . ",
firstName = " . $db->qstr($_POST['firstName']) . ",
chat_user = " . $db->qstr($_POST['chat_user']) . ",
chat_password = " . $db->qstr($_POST['chat_password']) . ",
Time_zone_name = " . $db->qstr($_POST['timezone']) . ",
voip = $voip, enabled = $enabled, chat_enable = $chat_enable
WHERE operator_id = $operator_id";
//get username
$sql = "SELECT username
FROM operator
WHERE operator_id = $operator_id";
$rs = $db->Execute($sql);
$uname = $db->GetOne($sql);
if (!empty($rs))
$sql = "UPDATE " . LIME_PREFIX . "users
SET users_name = " . $db->qstr($_POST['username']) . ",
email = " . $db->qstr($_POST['email']) . ",
full_name = " . $db->qstr($_POST['firstName']) . ",
superadmin = $superadmin";
if (!empty($_POST['password']))
{
include_once("../include/limesurvey/admin/classes/core/sha256.php");
$sql .= ", password = '" . SHA256::hashing($_POST['password']) . "' ";
}
$sql .= " WHERE users_name = '$uname'";
$rs = $db->Execute($sql);
if (!empty($rs))
{
$sql = "UPDATE operator
SET username = " . $db->qstr($_POST['username']) . ",
lastName = " . $db->qstr($_POST['lastName']) . ",
firstName = " . $db->qstr($_POST['firstName']) . ",
chat_user = " . $db->qstr($_POST['chat_user']) . ",
chat_password = " . $db->qstr($_POST['chat_password']) . ",
Time_zone_name = " . $db->qstr($_POST['timezone']) . ",
voip = $voip, enabled = $enabled, chat_enable = $chat_enable
WHERE operator_id = $operator_id";
$rs = $db->Execute($sql);
if (!empty($rs))
{
//only update extension if we aren't on a case
$sql = "SELECT case_id
@@ -89,38 +114,28 @@ if (isset($_POST['submit']))
WHERE current_operator_id= $operator_id";
$db->Execute($sql);
if (!empty($_POST['extension_id']))
{
$sql = "UPDATE extension
SET current_operator_id = $operator_id
WHERE extension_id = " . intval($_POST['extension_id']);
$db->Execute($sql);
}
}
if (HTPASSWD_PATH !== false && !empty($_POST['password']))
{
//update password in htaccess
include_once(dirname(__FILE__).'/../functions/functions.htpasswd.php');
$htp = New Htpasswd(HTPASSWD_PATH);
$htp->deleteUser($_POST["existing_username"]);
$htp->deleteUser($_POST["username"]);
$htp->addUser($_POST["username"],$_POST["password"]);
$htg = New Htgroup(HTGROUP_PATH);
$htg->deleteUserFromGroup($_POST["existing_username"],HTGROUP_INTERVIEWER);
$htg->addUserToGroup($_POST["username"],HTGROUP_INTERVIEWER);
}
$msg = "<div class='alert alert-info'><h3>" . T_("Successfully updated user") . ": " . $_POST['username'] . "</h3></div>";
}
else
{
$msg = "<div class='alert alert-danger'><h3>" . T_("Failed to update user") . ": " . $_POST['username'] . " " . T_("Please make sure the username is unique") . "</h3></div>";
}
}
$_GET['edit'] = $operator_id;
$msg = "<div class='alert alert-info'><h3>" . T_("Successfully updated user") . ": " . $_POST['username'] . "</h3></div>";
}
else
{
$msg = "<div class='alert alert-danger'><h3>" . T_("Failed to update user") . ": " . $_POST['username'] . " " . T_("Please make sure the username is unique") . "</h3></div>";
}
}
else
{
$msg = "<div class='alert alert-danger'><h3>" . T_("Failed to update user") . ": " . $_POST['username'] . " " . T_("Please make sure the username is unique") . "</h3></div>";
}
$_GET['edit'] = $operator_id;
}
@@ -130,9 +145,10 @@ if (isset($_GET['edit']))
$operator_id = intval($_GET['edit']);
$sql = "SELECT *
FROM operator
WHERE operator_id = $operator_id";
$sql = "SELECT o.*,l.superadmin,l.email,l.parent_id
FROM operator as o, " . LIME_PREFIX ."users as l
WHERE o.operator_id = $operator_id
AND l.users_name = o.username";
$rs = $db->GetRow($sql);
@@ -200,7 +216,6 @@ function generate() {
<label for="username" class="col-sm-3 control-label"><?php echo T_("Username") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='username' class="form-control" value="<?php echo $rs['username'];?>"/></div>
</div>
<?php if (HTPASSWD_PATH !== false) { ?>
<div class="form-group">
<label for="password" class="col-sm-3 control-label"><?php echo T_("Password") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='password' class="form-control" placeholder="<?php echo T_("leave blank to keep existing password");?>"/></div>
@@ -209,7 +224,6 @@ function generate() {
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" />&ensp;<?php echo T_("characters");?>
</div>
</div>
<?php } ?>
<div class="form-group">
<label for="firstName" class="col-sm-3 control-label"><?php echo T_("First name") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='firstName' class="form-control" value="<?php echo $rs['firstName'];?>"/></div>
@@ -218,6 +232,10 @@ function generate() {
<label for="lastName" class="col-sm-3 control-label"><?php echo T_("Last name") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='lastName' class="form-control" value="<?php echo $rs['lastName'];?>"/></div>
</div>
<div class="form-group">
<label for="email" class="col-sm-3 control-label"><?php echo T_("Email") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='email' class="form-control" value="<?php echo $rs['email'];?>"/></div>
</div>
<div class="form-group">
<label for="timezone" class="col-sm-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
<div class="col-sm-3"><?php display_chooser($tz,"timezone","timezone",false,false,false,true,array("value",$rs['Time_zone_name']),true,"form-inline"); ?></div>
@@ -245,6 +263,10 @@ function generate() {
<div class="form-group">
<label for="chat_password" class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": "; ?></label>
<div class="col-sm-3"><input type='text' name='chat_password' class="form-control" value="<?php echo $rs['chat_password'];?>"/></div>
</div>
<div class="form-group">
<label for="admin" class="col-sm-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
<div class="col-sm-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="primary" data-onstyle="danger" <?php if ($rs['superadmin'] || ($rs['parent_id'] == 0)) echo " checked=\"checked\" "; if ($rs['parent_id'] == 0) echo " disabled=\"disabled\" "; ?> value="1"/></div>
</div>
<div class="form-group">
<label for="chat_enable" class="col-sm-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
@@ -380,11 +402,11 @@ if ($display)
$titles[] = T_("Win file");//Windows VoIP
$titles[] = T_("*nix flle");//*nix VoIP
}
echo "<div class=' col-sm-10'><div class=' panel-body'>";
echo "<div class='col-sm-9'><div class='panel-body'>";
xhtml_table($rs,$columns,$titles);
echo "</div></div>";
echo "<div class='form-group col-sm-2'>
echo "<div class='form-group col-sm-3'>
<div class='panel-body'><a href='operators.php?add=add' class='btn btn-default btn-block'><i class='fa fa-lg fa-user-plus'></i>&emsp;" . T_("Add an operator") . "</a></div>
<div class='panel-body'><a href='extensionstatus.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-whatsapp'></i>&emsp;" . T_("Extensions") . "</a></div>
<div class='panel-body'><a href='operatorquestionnaire.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-link'></i> " . T_("Assign to questionnaire") . "</a></div>

View File

@@ -38,6 +38,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -159,7 +164,7 @@ xhtml_head(T_("Assign operators to questionnaires"),true,array("../include/boots
print "questionnaire_id = new Array(";
$s = "";
$q = array();
foreach($questionnaires as $q)
{
$s .= "'{$q['questionnaire_id']}',";
@@ -246,7 +251,7 @@ foreach($questionnaires as $q)
}
print "</tr></thead>";
$v = array();
foreach($operators as $v)
{

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -52,6 +57,8 @@ $a = false;
if (isset($_POST['operator']) && isset($_POST['adduser']))
{
$operator = $db->qstr($_POST['operator'],get_magic_quotes_gpc());
$email= $db->qstr($_POST['email'],get_magic_quotes_gpc());
$password = $db->qstr($_POST['password'],get_magic_quotes_gpc());
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
$lastname = $db->qstr($_POST['lastname'],get_magic_quotes_gpc());
$chat_user = $db->qstr($_POST['chat_user'],get_magic_quotes_gpc());
@@ -91,12 +98,14 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
}
$supervisor = 0;
$temporary = 0;
$admin = 0;
$refusal = 0;
$voip = 0;
$chat = 0;
if (isset($_POST['supervisor']) && $_POST['supervisor'] == "on") $supervisor = 1;
if (isset($_POST['refusal']) && $_POST['refusal'] == "on") $refusal = 1;
if (isset($_POST['temporary']) && $_POST['temporary'] == "on") $temporary = 1;
if (isset($_POST['admin']) && $_POST['admin'] == "on") $admin = 1;
if (isset($_POST['voip']) && $_POST['voip'] == "on") $voip = 1;
if (isset($_POST['chat_enable']) && $_POST['chat_enable'] == "on") $chat = 1;
@@ -108,7 +117,15 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
if ($db->Execute($sql))
{
$oid = $db->Insert_ID();
$oid = $db->Insert_ID();
include_once("../include/limesurvey/admin/classes/core/sha256.php");
//Insert into lime_users
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`email`,`lang`)
VALUES ($operator, '" . SHA256::hashing($_POST['password']) . "',$firstname,1,$admin,$email,'auto')";
$db->Execute($sql);
if (FREEPBX_PATH !== false)
{
@@ -130,20 +147,6 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
$db->Execute($sql);
}
if (HTPASSWD_PATH !== false && HTGROUP_PATH !== false)
{
//Get password and add it to the configured htpassword
include_once("../functions/functions.htpasswd.php");
$htp = New Htpasswd(HTPASSWD_PATH);
$htg = New Htgroup(HTGROUP_PATH);
$htp->addUser($_POST['operator'],$_POST['password']);
$htg->addUserToGroup($_POST['operator'],HTGROUP_INTERVIEWER);
if ($supervisor)
$htg->addUserGroup(HTGROUP_ADMIN);
}
$a = "<div class='alert alert-info'><h3>" . T_("Added operator :") . " " . $operator . "</h3>";
if (FREEPBX_PATH !== false)
@@ -183,7 +186,7 @@ if ($a) {
else {
echo "<div class='well'>";
//echo "<p>" . T_("Adding an operator here will give the user the ability to call cases") . "<a href='operatorquestionnaire.php'>" . T_("Assign Operator to Questionnaire") . "</a>" . T_("tool") . ".</p>";
echo "<p>" . T_("Use this form to enter the username of a user based on your directory security system. For example, if you have secured the base directory of queXS using Apache file based security, enter the usernames of the users here.") . "</p>";
//echo "<p>" . T_("Use this form to enter the username of a user based on your directory security system. For example, if you have secured the base directory of queXS using Apache file based security, enter the usernames of the users here.") . "</p>";
echo "<p>" . T_("The username and extension must be unique for each operator.") . "</p>";
echo "</div>";
}
@@ -242,16 +245,14 @@ function generate() {
<label class="col-sm-3 control-label"><?php echo T_("Username") . ": ";?></label>
<div class="col-sm-3"><input name="operator" type="text" class="form-control" required /></div>
</div>
<?php if (HTPASSWD_PATH !== false && HTGROUP_PATH !== false) { ?>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("Password") . ": ";?></label>
<div class="col-sm-3"><input name="password" id="password" type="text" class="form-control" /></div>
<div class="col-sm-3"><input name="password" id="password" type="text" class="form-control" required /></div>
<div class="col-sm-6 form-inline">&emsp;
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" />&emsp;<?php echo T_("Password with");?>&ensp;
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" />&ensp;<?php echo T_("characters");?>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("First name") . ": ";?></label>
<div class="col-sm-3"><input name="firstname" type="text" class="form-control" required/></div>
@@ -260,6 +261,10 @@ function generate() {
<label class="col-sm-3 control-label"><?php echo T_("Last name") . ": ";?></label>
<div class="col-sm-3"><input name="lastname" type="text" class="form-control"/></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("Email") . ": ";?></label>
<div class="col-sm-3"><input name="email" type="text" class="form-control"/></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
<div class="col-sm-3"><?php display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,true,array("value",get_setting("DEFAULT_TIME_ZONE")),true,"form-inline");?></div>
@@ -295,6 +300,10 @@ function generate() {
<label class="col-sm-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
<div class="col-sm-3"><input name="chat_enable" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" /></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
<div class="col-sm-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="primary" data-onstyle="danger"/></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a normal interviewer?");?></label>
<div class="col-sm-3"><input name="temporary" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="danger" checked="checked"/></div>

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View 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
*/

View File

@@ -39,6 +39,11 @@ include (dirname(__FILE__) . "/../config.inc.php");
*/
include (dirname(__FILE__) . "/../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* Process
*/

View File

@@ -39,6 +39,11 @@ include("../config.inc.php");
*/
include("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -533,7 +538,7 @@ else if (isset($_GET['delete']))
}
else
{
xhtml_head(T_("Questionnaire management"),true,$css,$js_head, false, false, false, "Questionnaire list");
xhtml_head(T_("Questionnaire management"),true,$css,$js_head, false, false, false,T_("Questionnaire list"));
echo "<div class='form-group'>
<a href='' onclick='history.back();return false;' class='btn btn-default'><i class='fa fa-chevron-left fa-lg text-primary'></i>&emsp;" . T_("Go back") . "</a>
<a href='new.php' class='btn btn-default col-sm-offset-6' ><i class='fa fa-file-text-o fa-lg'></i>&emsp;" . T_("Create a new questionnaire") . "</a>

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -41,6 +41,11 @@ include_once(dirname(__FILE__).'/../config.inc.php');
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -41,6 +41,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -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
*/

View File

@@ -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
*/
@@ -111,7 +116,7 @@ if (isset($_POST['ed']))
if (isset($_POST['type'])){
//check that we have correct var types and quantity
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0;
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0; $ln =0;
foreach($_POST['type'] as $key => $val) {
if ($val == 3) $prph++;
else if ($val == 5) $pcd++;
@@ -288,17 +293,17 @@ if (isset($_GET['edit']) )
$sql = "SELECT * FROM sample_import WHERE sample_import_id = $sample_import_id";
$sd = $db->GetRow($sql);
if($sd['enabled'] == 1) $dis = disabled; // -> disable edit and delete if sample is enabled
if($sd['enabled'] == 1) $dis = "disabled"; else $dis = false;// -> disable edit and delete if sample is enabled
$sql = "SELECT type, description
FROM sample_var_type";
$rd = $db->GetAll($sql);
$selected = "selected=\"selected\"";
$sql = "SELECT sir.var_id,
CONCAT('<input type=\"text\" onInput=\"$(this).attr(\'name\',\'var[',sir.var_id,']\');\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
$selected = "selected=\"selected\"";
foreach($rd as $r)
{
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
@@ -468,7 +473,7 @@ $sql = "SELECT
CASE WHEN enabled = 0 THEN
CONCAT('<a href=\'?sampleenable=',sample_import_id,'\' class=\'btn btn-default col-sm-12\'>" . TQ_("Enable") . "&emsp;<i class=\'fa fa-play fa-lg\' style=\'color:blue;\'></i></a>')
ELSE
CONCAT('<a href=\'\' class=\'btn btn-default col-sm-12\' data-toggle=\'confirmation\' data-href=\'?sampledisable=',sample_import_id,'\' data-title=\'" . TQ_("ARE YOU SHURE?") . "\' data-btnOkLabel=\'" . TQ_("Yes") . "\' data-btnCancelLabel=\'" . TQ_("Cancel") . "\'><i class=\'fa fa-ban fa-lg\' style=\'color:red;\'></i>&ensp;&nbsp;" . TQ_("Disable") . "</a> ')
CONCAT('<a href=\'\' class=\'btn btn-default col-sm-12\' data-toggle=\'confirmation\' data-href=\'?sampledisable=',sample_import_id,'\' data-title=\'" . TQ_("ARE YOU SURE?") . "\' data-btnOkLabel=\'" . TQ_("Yes") . "\' data-btnCancelLabel=\'" . TQ_("Cancel") . "\'><i class=\'fa fa-ban fa-lg\' style=\'color:red;\'></i>&ensp;&nbsp;" . TQ_("Disable") . "</a> ')
END
as enabledisable,
CASE WHEN enabled = 1 THEN
@@ -479,7 +484,7 @@ $sql = "SELECT
CASE WHEN enabled = 1 THEN
CONCAT('<a href=\'\' class=\'btn btn-default disabled\'><i class=\'fa fa-trash fa-lg fa-fw\' style=\'color:grey;\'></i></a>')
ELSE
CONCAT('<a href=\'\' class=\'btn btn-default \' data-toggle=\'confirmation\' data-href=\'?delete_sample=',sample_import_id,'\' data-title=\'" . TQ_("ARE YOU SHURE?") . "\' data-btnOkLabel=\'" . TQ_("Yes") . "\' data-btnCancelLabel=\'" . TQ_("Cancel") . "\' ><i class=\'fa fa-trash fa-lg fa-fw text-danger \' data-toggle=\'tooltip\' title=\'" . TQ_("DELETE SAMPLE") . "\'></i></a>')
CONCAT('<a href=\'\' class=\'btn btn-default \' data-toggle=\'confirmation\' data-href=\'?delete_sample=',sample_import_id,'\' data-title=\'" . TQ_("ARE YOU SURE?") . "\' data-btnOkLabel=\'" . TQ_("Yes") . "\' data-btnCancelLabel=\'" . TQ_("Cancel") . "\' ><i class=\'fa fa-trash fa-lg fa-fw text-danger \' data-toggle=\'tooltip\' title=\'" . TQ_("DELETE SAMPLE") . "\'></i></a>')
END as delsample,
CONCAT('<a href=\'samplesearch.php?sample_import_id=',sample_import_id,'\' class=\'btn btn-default\' data-toggle=\'tooltip\' title=\'" . TQ_("Search the sample") . "',sample_import_id,'\'><i class=\'fa fa-search fa-lg fa-fw text-primary\'></i></a>') as ssearch,
CONCAT('<a href=\'callhistory.php?sample_import_id=',sample_import_id,'\' class=\'btn btn-default\' data-toggle=\'tooltip\' title=\'" . TQ_("Call history"). "&ensp;\n" . TQ_("sample"). "&ensp;',sample_import_id,'\'><i class=\'fa fa-phone fa-lg text-primary\'></i></a>') as calls,

View File

@@ -41,6 +41,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -89,7 +94,7 @@ xhtml_head(T_("Search the sample"),true,$css,$js_head);
<h4 class="modal-title text-danger " ><?php echo T_("WARNING !");?></h4>
</div>
<div class="modal-body">
<p><?php echo T_("Are you shure you want to delete") . "&ensp;" . T_("Sample ID") . "&ensp;<b class='text-danger'>" . "</b>?";?></p>
<p><?php echo T_("Are you sure you want to delete") . "&ensp;" . T_("Sample ID") . "&ensp;<b class='text-danger'>" . "</b>?";?></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo T_("NOOOO...");?></button>

View File

@@ -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
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -13,6 +13,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -131,9 +136,14 @@ xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);//array("../css/ta
<?php
$sql = "SELECT c.case_id as value, c.case_id as description, CASE WHEN c.case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
FROM `case` as c, `outcome` as o
FROM `case` AS c, `outcome` AS o, `questionnaire` AS q, `sample` AS s, `sample_import` AS si
WHERE c.current_outcome_id = o.outcome_id
AND o.outcome_type_id = 2";
AND q.questionnaire_id = c.questionnaire_id
AND s.sample_id = c.sample_id
AND s.import_id = si.sample_import_id
AND q.enabled = 1
AND si.enabled =1
AND o.outcome_type_id =2";
$rs = $db->GetAll($sql);
@@ -153,14 +163,14 @@ if (!empty($rs))
</div><form method="get" action="?" class="form-inline ">
<div class="modal-body">
<?php
$call_id = bigintval($_GET['call_id']);
if (isset($_GET['call_id'])){ $call_id = bigintval($_GET['call_id']);
$sql = "SELECT o.outcome_id as value,description, CASE WHEN o.outcome_id = c.outcome_id THEN 'selected=\'selected\'' ELSE '' END AS selected
FROM outcome as o, `call` as c
WHERE c.call_id = '$call_id'";
$rs2 = $db->GetAll($sql);
translate_array($rs2,array("description"));
display_chooser($rs2, "set_outcome_id", "set_outcome_id",true,false,false,false); ?>
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/> <?php } ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo T_("Cancel"); ?></button>
@@ -178,7 +188,7 @@ if (!empty($rs))
<h4 class="modal-title text-danger " ><?php echo T_("WARNING !");?></h4>
</div>
<div class="modal-body">
<p><?php echo T_("Are you shure you want to delete") . "&ensp;" . T_("Sample ID") . "&ensp;<b class='text-danger'>" . "</b>?";?></p>
<p><?php echo T_("Are you sure you want to delete") . "&ensp;" . T_("Sample ID") . "&ensp;<b class='text-danger'>" . "</b>?";?></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal"><?php echo T_("NOOOO...");?></button>
@@ -375,7 +385,7 @@ if ($case_id != false)
print "<div class='alert text-danger col-sm-6' role='alert'><b>" . T_("No appointments for this case") . "</b></div>";
// * disable appointment creation if no sample_id
if ($r[0]['sample_id']){
if (isset($r[0]['sample_id'])){
$rtz= $r[0]['Time_zone_name'];
print "&emsp;<a href='displayappointments.php?case_id=$case_id&rtz=$rtz&new=new' class='btn btn-default'><i class='fa fa-clock-o fa-lg'></i>&emsp;" . T_("Create appointment") . "</a>"; }
@@ -454,7 +464,7 @@ if ($case_id != false)
print "<div class='clearfix '></div><div class='col-sm-6'>";
if ($r[0]['sample_id']){ //if sample data exists assign this to an operator for their next case
if (isset($r[0]['sample_id'])){ //if sample data exists assign this to an operator for their next case
print "<div class='panel-body'><h4><i class='fa fa-link'></i>&emsp;" . T_("Assign this case to operator (will appear as next case for them)") . "</h4>";
?>
@@ -483,7 +493,7 @@ if ($case_id != false)
print "<div class='alert text-danger' role='alert'>" . T_("Case not yet started in Limesurvey") . "</div>";
print "</div></div>";
if ($r[0]['sample_id']){ // if sample data exists view availability
if (isset($r[0]['sample_id'])){ // if sample data exists view availability
print "<div class='panel-body col-sm-6'><h4 class=''><i class='fa fa-calendar'></i>&emsp;" . T_("Availability groups") . "</h4>";
if (is_using_availability($case_id))
@@ -501,15 +511,15 @@ if ($case_id != false)
//Display all availability groups as checkboxes
print "<form action='?' method='get' class='form-horizontal '>";
print "<h5 class=''>" . T_("Select groups to limit availability (Selecting none means always available)") . "</h5><div class='col-sm-6'>";
foreach ($rs as $r)
foreach ($rs as $g)
{
$checked = "";
//if ($allselected || $r['availability_group_id'] == $r['selected_group_id'])
if ($r['availability_group_id'] == $r['selected_group_id'])
//if ($allselected || $g['availability_group_id'] == $g['selected_group_id'])
if ($g['availability_group_id'] == $g['selected_group_id'])
$checked = "checked='checked'";
print "&ensp;<input type='checkbox' name='ag{$r['availability_group_id']}' id='ag{$r['availability_group_id']}' value='{$r['availability_group_id']}' $checked />&ensp; <label class='control-label' for='ag{$r['availability_group_id']}'>{$r['description']}</label></br>";
print "&ensp;<input type='checkbox' name='ag{$g['availability_group_id']}' id='ag{$g['availability_group_id']}' value='{$g['availability_group_id']}' $checked />&ensp; <label class='control-label' for='ag{$g['availability_group_id']}'>{$g['description']}</label></br>";
}
?> </div>
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
@@ -541,7 +551,7 @@ if ($case_id != false)
<?php
print "</div>";
if ($r[0]['sample_id']){ // if sample data exists deidentify record
if (isset($r[0]['sample_id'])){ // if sample data exists deidentify record
print "<div class='panel-body col-sm-6 pull-right'><h4 class ='text-danger'><i class='fa fa-trash-o fa-lg'></i>&emsp;" . T_("Deidentify") . "</h4>";
print "<div class='well'>" . T_("Remove all sample details and contact numbers from this case") . "</div>";
?>

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* Process
*/
@@ -96,13 +101,14 @@ else
{
xhtml_head(T_("Monitor system wide case sorting"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
//print "<h2>" . T_("Monitor system wide case sorting") . "</h2>";
print "<p><a href='?watch=watch'>" . T_("Click here to enable and begin system wide case sorting") . "</a></p>";
print "<div class='well pull-right col-sm-4'><p>" . T_("System wide case sorting is periodically (via SYSTEM_SORT_MINUTES configuration directive) sorting cases on a system wide basis instead of finding the most appropriate case each time an operator requests a new case. This may increase performance where there are a large number of cases or complex quotas in place. If you are not experiencing any performance problems, it is not recommended to use this feature.") . "</p></div>";
print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
print "<div class='col-sm-6'></br></br><a href='?watch=watch' class = 'btn btn-danger btn-lg'>" . T_("Click here to enable and begin system wide case sorting") . "</a></div>";
print "<div class='well pull-right col-sm-6'><p>" . T_("System wide case sorting is periodically (via SYSTEM_SORT_MINUTES configuration directive) sorting cases on a system wide basis instead of finding the most appropriate case each time an operator requests a new case. This may increase performance where there are a large number of cases or complex quotas in place. If you are not experiencing any performance problems, it is not recommended to use this feature.") . "</p></div>";
$d = process_get_last_data(2);
if ($d !== false)
{
xhtml_table($d,array('process_log_id','datetime','data'),array(T_("Log id"), T_("Date"), T_("Log entry")));
print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
xhtml_table($d,array('process_log_id','datetime','data'),array(T_("Log id"), T_("Date"), T_("Log entry")));
}
}
xhtml_foot();

View File

@@ -39,6 +39,11 @@ include (dirname(__FILE__) . "/../config.inc.php");
*/
include (dirname(__FILE__) . "/../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* Process
*/

View File

@@ -40,6 +40,11 @@ include("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* XHTML functions
*/
@@ -101,7 +106,7 @@ $tzl = $db->GetAll($sql);
if (empty($tzl) || !$tzl)
{
print "<div class='alert alert-danger'>" . T_("Your database does not have timezones installed, please see here for details") . "<a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'> ... </a></div>";
print "<div class='alert alert-danger'>" . T_("Your database does not have timezones installed, please see here for details") . "<a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'> ... </a></br>" .T_("or") . "</br>" . T_("Check that you have granted relevant permissions on 'time_zone_...' tables in database named 'mysql'.") . "</div>";
}
print "<div class='col-sm-4 '><h3 class=''>" . T_("Default Timezone: ") . "&emsp;<b class='text-primary'>$dtz</b></h3>";//<div class='panel-body'>

View File

@@ -39,6 +39,11 @@ include ("../config.inc.php");
*/
include ("../db.inc.php");
/**
* Authentication file
*/
include ("auth-admin.php");
/**
* Process
*/