mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merged feature branch from Alex (thank you for your hard work!)
This commit is contained in:
1
.bzrignore
Normal file
1
.bzrignore
Normal file
@@ -0,0 +1 @@
|
||||
no vars
|
||||
42
CHANGELOG
42
CHANGELOG
@@ -1,3 +1,45 @@
|
||||
queXS 1.13.0 - Changes since 1.12.0
|
||||
|
||||
|
||||
|
||||
Database updates:
|
||||
|
||||
/* New outcomes */
|
||||
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(42, '3.13', 'Max call attempts reached', 0, 4, 0, 1, 0, 1, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(43, '3.13', 'Max calls reached', 0, 4, 0, 1, 0, 1, 0, 'UH');
|
||||
|
||||
|
||||
/* Add var_id sample var identifier */
|
||||
ALTER TABLE `sample_import_var_restrict` DROP PRIMARY KEY, CHANGE var var CHAR(128);
|
||||
ALTER TABLE `sample_import_var_restrict` ADD `var_id` BIGINT( 20 ) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT AFTER `sample_import_id`;
|
||||
ALTER TABLE `sample_import_var_restrict` ADD `type` SMALLINT( 10 ) UNSIGNED NOT NULL AFTER `var`;
|
||||
|
||||
ALTER TABLE `sample_var` ADD `var_id` BIGINT( 20 ) UNSIGNED NOT NULL AFTER `sample_id`;
|
||||
|
||||
UPDATE `sample_var` as sv ,`sample`as s, `sample_import_var_restrict` as sivr SET sv.`var_id`=sivr.`var_id` WHERE sv.`var` LIKE sivr.`var` AND sv.`sample_id`=s.`sample_id` AND s.`import_id`=sivr.`sample_import_id`;
|
||||
|
||||
UPDATE `sample_import_var_restrict` ,
|
||||
`sample_var` SET `sample_import_var_restrict`.`type` = `sample_var`.`type` WHERE `sample_import_var_restrict`.`var_id` = `sample_var`.`var_id`;
|
||||
|
||||
ALTER TABLE `qsqr_sample` ADD `exclude_var_id` BIGINT( 20 ) NOT NULL AFTER `questionnaire_sample_quota_row_id`;
|
||||
|
||||
UPDATE `qsqr_sample` as qsqr, `sample_import_var_restrict` as sivr, questionnaire_sample_quota_row as qq SET qsqr.exclude_var_id = sivr.var_id WHERE qq.questionnaire_sample_quota_row_id = qsqr.questionnaire_sample_quota_row_id AND qq.sample_import_id = sivr.sample_import_id and qsqr.exclude_var = sivr.var;
|
||||
|
||||
ALTER TABLE `sample_var` DROP PRIMARY KEY;
|
||||
ALTER TABLE `sample_var` DROP `var`;
|
||||
ALTER TABLE `sample_var` DROP `type`;
|
||||
ALTER TABLE `sample_var` ADD PRIMARY KEY (`sample_id`,`var_id`);
|
||||
|
||||
/* OPTIONAL */
|
||||
|
||||
/* De-identify sample table completely where attempted previously */
|
||||
UPDATE `sample` LEFT JOIN `sample_var` ON (`sample`.sample_id = `sample_var`.sample_id) SET `Time_zone_name`= '',`phone`= '' WHERE `sample_var`.sample_id IS NULL;
|
||||
|
||||
/* Delete de-identified sample columns */
|
||||
DELETE FROM `sample_import_var_restrict` WHERE `type` =0;
|
||||
|
||||
|
||||
queXS 1.12.0 - Changes since 1.11.1
|
||||
|
||||
New Feature: Complex row quotas (see: https://blueprints.launchpad.net/quexs/+spec/complexquota) - Thank you Marco for sponsoring this feature
|
||||
|
||||
@@ -137,14 +137,14 @@ if (isset($_POST['submit']))
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Add shifts"),true,array("../css/shifts.css"),array("../js/window.js"));
|
||||
|
||||
xhtml_head(T_("Shift management"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/clockpicker/dist/bootstrap-clockpicker.min.css","../include/bootstrap-toggle/css/bootstrap-toggle.min.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/bootstrap/js/bootstrap.min.js","../include/clockpicker/dist/bootstrap-clockpicker.js","../include/bootstrap-toggle/js/bootstrap-toggle.min.js","../js/window.js"));
|
||||
//"../css/shifts.css",
|
||||
/**
|
||||
* Display warning if timezone data not installed
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'Australia/Victoria','UTC') as t";
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM','UTC') as t";
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (empty($rs) || !$rs || empty($rs['t']))
|
||||
@@ -160,37 +160,37 @@ if (empty($rs) || !$rs || empty($rs['t']))
|
||||
* @todo Use javascript to add shifts if necessarry outside the template
|
||||
*/
|
||||
|
||||
print "<h2>" . T_("Add shifts in your Time Zone") . "</h2>";
|
||||
print "<h3 class='col-sm-4'>" . T_("Add shifts in your Time Zone") . "</h3>";
|
||||
|
||||
|
||||
print "<p>" . T_("Shifts allow you to restrict appointments being made, and interviewers to working on a particlar project at defined times.") . "</p>";
|
||||
print "<p class='well col-sm-8'>" . T_("Shifts allow you to restrict appointments being made, and interviewers to working on a particlar project at defined times.") . "</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
print "<div class='clearfix form-group'><h3 class='col-sm-4 text-right'>" . T_("Select a questionnaire") . ":</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id,false, "form-inline", "form-control");
|
||||
print "</div><div class='panel-body'>";
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<p>" . T_("Select year") . ": ";
|
||||
print "<h4>" . T_("Select year") . ":  ";
|
||||
for ($i = $year - 1; $i < $year + 4; $i++)
|
||||
{
|
||||
if ($i == $year)
|
||||
print "$i ";
|
||||
print "<span class='btn-lg btn btn-default'><b class='fa text-danger '>$i</b></span>";
|
||||
else
|
||||
print "<a href=\"?year=$i&woy=$woy&questionnaire_id=$questionnaire_id\">$i</a> ";
|
||||
print "<a href=\"?year=$i&woy=$woy&questionnaire_id=$questionnaire_id\"> $i </a> ";
|
||||
}
|
||||
print "</p>";
|
||||
print "</h4>";
|
||||
|
||||
|
||||
print "<p>" . T_("Select week of year") . ": ";
|
||||
print "<h4>" . T_("Select week") . ": ";
|
||||
for ($i = 1; $i <= 53; $i++)
|
||||
{
|
||||
if ($i == $woy)
|
||||
print "$i ";
|
||||
print "<span class='btn-lg btn btn-default'><b class='fa text-danger '>$i</b></span>";
|
||||
else
|
||||
print "<a href=\"?woy=$i&year=$year&questionnaire_id=$questionnaire_id\">$i</a> ";
|
||||
print "<a href=\"?woy=$i&year=$year&questionnaire_id=$questionnaire_id\"> $i </a> ";
|
||||
}
|
||||
print "</p>";
|
||||
|
||||
print "</h4>";
|
||||
|
||||
$sql = "SELECT shift_id, dt, dta,start,end
|
||||
FROM (
|
||||
@@ -232,10 +232,10 @@ if ($questionnaire_id != false)
|
||||
$daysofweek[$key]['description'] = $val['dtd'] . " " . $val['dto'];
|
||||
|
||||
?>
|
||||
<form method="post" action="">
|
||||
<table>
|
||||
<form method="post" action="" class="panel-body">
|
||||
<table class="table-bordered table-condensed table-hover">
|
||||
<?php
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th><th>" . T_("Use shift?") . "</th></tr>";
|
||||
print "<thead><tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th> <th>" . T_("End") . "</th><th>" . T_("Use shift?") . "</th></tr></thead>";
|
||||
$count = 1;
|
||||
foreach($shifts as $shift)
|
||||
{
|
||||
@@ -253,21 +253,26 @@ if ($questionnaire_id != false)
|
||||
}
|
||||
print "<tr><td>";
|
||||
display_chooser($daysofweek, $prefix . "dow_$shift_id", false, true, false, false, false, array("dt",$shift['dt']));
|
||||
print "</td><td><input size=\"8\" name=\"" . $prefix ."start_$shift_id\" maxlength=\"8\" type=\"text\" value=\"{$shift['start']}\"/></td><td><input name=\"" . $prefix ."end_$shift_id\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$shift['end']}\"/></td><td><input name=\"" . $prefix ."use_$shift_id\" type=\"checkbox\" $checked/></td></tr>";
|
||||
print "</td><td><div class=\"input-group clockpicker\"><input readonly size=\"8\" name=\"" . $prefix ."start_$shift_id\" maxlength=\"8\" type=\"time\" value=\"{$shift['start']}\" class=\"form-control \"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td><td><div class=\"input-group clockpicker\"><input readonly name=\"" . $prefix ."end_$shift_id\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$shift['end']}\" class=\"form-control\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td><td class=\"text-center\"><input name=\"" . $prefix ."use_$shift_id\" type=\"checkbox\" class=\"form-control fa\" data-toggle=\"toggle\" data-size=\"\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " $checked/></td></tr>";
|
||||
$count++;
|
||||
}
|
||||
?>
|
||||
<!--<tr><td/><td/><td/><td>Select all</td></tr>-->
|
||||
</table>
|
||||
</table></br>
|
||||
<!--<p><input type="submit" name="addshift" value="Add Shift"/></p>-->
|
||||
<p><input type="submit" name="submit" value="<?php echo T_("Submit changes"); ?>"/></p>
|
||||
<p><input type="hidden" name="year" value="<?php echo $year; ?>"/></p>
|
||||
<p><input type="hidden" name="woy" value="<?php echo $woy; ?>"/></p>
|
||||
<p><input type="hidden" name="qid" value="<?php echo $questionnaire_id; ?>"/></p>
|
||||
<input type="submit" name="submit" value="<?php echo T_("Save changes"); ?>" class="btn btn-primary"/>
|
||||
<input type="hidden" name="year" value="<?php echo $year; ?>"/>
|
||||
<input type="hidden" name="woy" value="<?php echo $woy; ?>"/>
|
||||
<input type="hidden" name="qid" value="<?php echo $questionnaire_id; ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('.clockpicker').clockpicker({
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -55,9 +55,25 @@ include("../functions/functions.display.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
"../js/window.js"
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample']) && isset($_GET['call_max']) && isset($_GET['call_attempt_max']))
|
||||
{
|
||||
//need to add sample to questionnaire
|
||||
@@ -76,13 +92,11 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['sample']) && isset($_GET['
|
||||
VALUES('$questionnaire_id','$sid','$cm','$cam','$selecttype','$am', '$an')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['edit']))
|
||||
{
|
||||
//need to add sample to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_POST['questionnaire_id']);
|
||||
$sid = bigintval($_POST['sample_import_id']);
|
||||
$cm = bigintval($_POST['call_max']);
|
||||
@@ -93,8 +107,6 @@ if (isset($_POST['edit']))
|
||||
$an = 0;
|
||||
if (isset($_POST['allownew'])) $an = 1;
|
||||
|
||||
|
||||
|
||||
$sql = "UPDATE questionnaire_sample
|
||||
SET call_max = '$cm',
|
||||
call_attempt_max = '$cam',
|
||||
@@ -105,7 +117,6 @@ if (isset($_POST['edit']))
|
||||
AND sample_import_id = '$sid'";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +128,8 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['rsid']))
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
{
|
||||
xhtml_head(T_("Assign Sample: Select sample to assign"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
$subtitle = T_("Edit assignment parameters");
|
||||
xhtml_head(T_("Assign samples to questionnaire: "),true,$css,$js_head,false,false,false,$subtitle);//array("../css/table.css"),array("../js/window.js")
|
||||
|
||||
$sql = "SELECT si.description as description,
|
||||
qr.description as qdescription,
|
||||
@@ -134,31 +146,42 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['rsid']))
|
||||
|
||||
$qs = $db->GetRow($sql);
|
||||
|
||||
print "<h1>" . T_("Edit sample details") . "<h1>";
|
||||
print "<h2>" . T_("Questionnaire") . ": " . $qs['qdescription'] . "</h2>";
|
||||
print "<h2>" . T_("Sample") . ": " . $qs['description'] . "</h2>";
|
||||
|
||||
print "<p><a href='?questionnaire_id=$questionnaire_id'>" . T_("Go back") . "</a></p>";
|
||||
//print "<h1>" . T_("Edit sample details") . "<h1>";
|
||||
print " <p><a href='?questionnaire_id=$questionnaire_id' class='btn btn-default '><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a></p>
|
||||
<h2 class='col-sm-6'>" . T_("Questionnaire") . ": <span class='text-primary'>" . $qs['qdescription'] . "</span></h2>
|
||||
<h2 class='col-sm-6'>" . T_("Sample") . ": <span class='text-primary'>" . $qs['description'] . "</span></h2>
|
||||
<div class='panel-body form-group'>";
|
||||
|
||||
$allownew = $selected ="";
|
||||
if ($qs['random_select'] == 1)
|
||||
$selected = "checked=\"checked\"";
|
||||
if ($qs['allow_new'] == 1)
|
||||
$allownew = "checked=\"checked\"";
|
||||
|
||||
?>
|
||||
<form action="?questionnaire_id=<?php echo $questionnaire_id;?>" method="post">
|
||||
<label for="call_max"><?php echo T_("Max calls (0 for unlimited)"); ?></label><input type="text" name="call_max" id="call_max" value="<?php echo $qs['call_max'];?>"/><br/>
|
||||
<label for="call_attempt_max"><?php echo T_("Max call attempts (0 for unlimited)"); ?></label><input type="text" name="call_attempt_max" id="call_attempt_max" value="<?php echo $qs['call_attempt_max'];?>"/> <br/>
|
||||
<label for="answering_machine_messages"><?php echo T_("Number of answering machine messages to leave per case (0 for never)"); ?></label><input type="text" name="answering_machine_messages" id="answering_machine_messages" value="<?php echo $qs['answering_machine_messages'];?>"/> <br/>
|
||||
<label for="selecttype"><?php echo T_("Select from sample randomly? (otherwise sequentially)"); ?></label><input type="checkbox" id = "selecttype" name="selecttype" <?php echo $selected;?> /> <br/>
|
||||
<label for="allownew"><?php echo T_("Allow new numbers to be drawn?"); ?></label><input type="checkbox" id = "allownew" name="allownew" <?php echo $allownew;?> /> <br/>
|
||||
<form action="?questionnaire_id=<?php echo $questionnaire_id;?>" method="post" class="form-horizontal">
|
||||
|
||||
<label for="call_max" class="control-label col-sm-4"><?php echo T_("Max calls");?></label>
|
||||
<div class="col-sm-1"><input type="number" min="0" max="20" style="width:6em;" name="call_max" id="call_max" value="<?php echo $qs['call_max'];?>" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Unlimited");?></label><br/><br/>
|
||||
<label for="call_attempt_max" class="control-label col-sm-4"><?php echo T_("Max call attempts");?></label>
|
||||
<div class="col-sm-1"><input type="number" min="0" max="20" style="width:6em;" name="call_attempt_max" id="call_attempt_max" value="<?php echo $qs['call_attempt_max'];?>" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Unlimited");?></label><br/><br/>
|
||||
<label for="answering_machine_messages" class="control-label col-sm-4"><?php echo T_("Number of answering machine messages to leave per case");?></label>
|
||||
<div class="col-sm-1"> <input type="number" min="0" max="20" style="width:6em;" name="answering_machine_messages" id="answering_machine_messages" value="<?php echo $qs['answering_machine_messages'];?>" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Never");?></label><br/><br/>
|
||||
<label for="selecttype" class="control-label col-sm-4"><?php echo T_("Select from sample randomly?");?></label>
|
||||
<div class="col-sm-1"><input type="checkbox" id = "selecttype" name="selecttype" <?php echo $selected;?> data-toggle="toggle" data-size="small" data-on="<?php echo T_("Yes");?>" data-off="<?php echo T_("No");?>" data-width="85"/></div>
|
||||
<label class="control-label text-info"><?php echo T_("No") ." = ". T_("Sequentially");?></label><br/><br/>
|
||||
<label for="allownew" class="control-label col-sm-4"><?php echo T_("Allow new numbers to be drawn?");?></label>
|
||||
<div class="col-sm-1"><input type="checkbox" id = "allownew" name="allownew" <?php echo $allownew;?> class="col-sm-1" data-toggle="toggle" data-size="small" data-on="<?php echo T_("Yes");?>" data-off="<?php echo T_("No");?>" data-width="85"/></div><br/><br/><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sid); ?>"/>
|
||||
<input type="submit" name="edit" value="<?php echo T_("Edit"); ?>"/></p>
|
||||
</form>
|
||||
<div class="col-sm-offset-4 col-sm-3"><button type="submit" name="edit" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> <?php echo T_("Save changes");?></button></div>
|
||||
</form></div>
|
||||
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
die();
|
||||
}
|
||||
else
|
||||
@@ -172,27 +195,29 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['rsid']))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$subtitle = T_("List & Add Sample");
|
||||
xhtml_head(T_("Assign samples to questionnaire: "),true,$css,$js_head,false,false,false,$subtitle);//array("../css/table.css"),array("../js/window.js")
|
||||
|
||||
xhtml_head(T_("Assign Sample: Select sample to assign"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
print "<h1>" . T_("Select a questionnaire from the list below") . "</h1>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
print "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left'><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a>";
|
||||
print "<h3 class='col-sm-4 text-right'>" . T_("Select a questionnaire") . ":</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id,false, "pull-left", "form-control");
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<h1>" . T_("Samples selected for this questionnaire") . "</h1>";
|
||||
|
||||
print "<div class='clearfix '></div><div class='panel-body'>
|
||||
<h3 class='text-primary'>". T_("Samples selected for this questionnaire") .":</h3>";
|
||||
|
||||
$sql = "SELECT si.description as description,
|
||||
CASE WHEN q.call_max = 0 THEN '" . TQ_("Unlimited") . "' ELSE q.call_max END as call_max,
|
||||
CASE WHEN q.call_attempt_max = 0 THEN '" . TQ_("Unlimited") . "' ELSE q.call_attempt_max END AS call_attempt_max,
|
||||
CASE WHEN q.random_select = 0 THEN '" . TQ_("Sequential") . "' ELSE '". TQ_("Random") . "' END as random_select,
|
||||
CASE WHEN q.answering_machine_messages = 0 THEN '" . TQ_("Never") . "' ELSE q.answering_machine_messages END as answering_machine_messages,
|
||||
CASE WHEN q.allow_new = 0 THEN '" . TQ_("No") . "' ELSE '".TQ_("Yes")."' END as allow_new,
|
||||
CONCAT('<a href=\"?edit=edit&questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . TQ_("Edit") ."</a>') as edit,
|
||||
CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . TQ_("Click to unassign") ."</a>') as unassign
|
||||
CASE WHEN q.call_max = 0 THEN '". TQ_("Unlimited") ."' ELSE q.call_max END as call_max,
|
||||
CASE WHEN q.call_attempt_max = 0 THEN '". TQ_("Unlimited") . "' ELSE q.call_attempt_max END AS call_attempt_max,
|
||||
CASE WHEN q.random_select = 0 THEN '". TQ_("Sequential") ."' ELSE '". TQ_("Random") . "' END as random_select,
|
||||
CASE WHEN q.answering_machine_messages = 0 THEN '". TQ_("Never") . "' ELSE q.answering_machine_messages END as answering_machine_messages,
|
||||
CASE WHEN q.allow_new = 0 THEN '". TQ_("No") ."' ELSE '".TQ_("Yes")."' END as allow_new,
|
||||
CONCAT('<a href=\"?edit=edit&questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\" data-toggle=\'tooltip\' title=\'". TQ_("Edit") ."\' class=\'btn center-block\'><i class=\'fa fa-pencil-square-o fa-lg\'></i></a>') as edit,
|
||||
CONCAT('<a href=\'\' data-toggle=\'confirmation\' data-placement=\'top\' data-href=\"?questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\" class=\'btn center-block\'><i class=\'fa fa-chain-broken fa-lg\' data-toggle=\'tooltip\' title=\'". TQ_("Click to unassign") ."\'></i></a>') as unassign
|
||||
FROM questionnaire_sample as q, sample_import as si
|
||||
WHERE q.sample_import_id = si.sample_import_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
@@ -200,9 +225,9 @@ if ($questionnaire_id != false)
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
xhtml_table($qs,array("description","call_max","call_attempt_max","answering_machine_messages","random_select","allow_new","edit","unassign"),array(T_("Sample"), T_("Max calls"), T_("Max call attempts"), T_("Answering machine messages"), T_("Selection type"), T_("Allow new numbers to be drawn?"), T_("Edit"), T_("Unassign sample") ));
|
||||
xhtml_table($qs,array("description","call_max","call_attempt_max","answering_machine_messages","random_select","allow_new","edit","unassign"),array(T_("Sample"), T_("Max calls"), T_("Max call attempts"), T_("Answering machine messages"), T_("Selection type"), T_("Allow new numbers to be drawn?"), T_("Edit"), T_("Unassign sample")));
|
||||
else
|
||||
print "<p>" . T_("No samples selected for this questionnaire") . "</p>";
|
||||
print "<div class='alert text-danger'><h4>". T_("No samples selected for this questionnaire") ."</h4></div>";
|
||||
|
||||
$sql = "SELECT si.sample_import_id,si.description
|
||||
FROM sample_import as si
|
||||
@@ -211,36 +236,47 @@ if ($questionnaire_id != false)
|
||||
AND si.enabled = 1";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
print"</div>";
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h1>" . T_("Add a sample to this questionnaire:") . "</h1>";
|
||||
print "<div class='clearfix '></div>";
|
||||
print "<div class='panel-body form-group'><h3 class='text-primary'>" . T_("Add a sample to this questionnaire:") . "</h3>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="sample"><?php echo T_("Select sample:"); ?></label><select name="sample" id="sample">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['sample_import_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<label for="call_max"><?php echo T_("Max calls (0 for unlimited)"); ?></label><input type="text" name="call_max" id="call_max" value="0"/><br/>
|
||||
<label for="call_attempt_max"><?php echo T_("Max call attempts (0 for unlimited)"); ?></label><input type="text" name="call_attempt_max" id="call_attempt_max" value="0"/> <br/>
|
||||
<label for="answering_machine_messages"><?php echo T_("Number of answering machine messages to leave per case (0 for never)"); ?></label><input type="text" name="answering_machine_messages" id="answering_machine_messages" value="1"/> <br/>
|
||||
<label for="selecttype"><?php echo T_("Select from sample randomly? (otherwise sequentially)"); ?></label><input type="checkbox" id = "selecttype" name="selecttype" /> <br/>
|
||||
<label for="allownew"><?php echo T_("Allow new numbers to be drawn?"); ?></label><input type="checkbox" id = "allownew" name="allownew" checked="checked" /> <br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="submit" name="add_sample" value="<?php echo T_("Add sample");?>"/></p>
|
||||
</form>
|
||||
<form action="" method="get" class="form-horizontal">
|
||||
<label for="sample" class="control-label col-sm-4"><?php echo T_("Select sample:");?></label>
|
||||
<div class="col-sm-3"><select name="sample" id="sample" class="form-control " >
|
||||
<?php foreach($qs as $q) { print "<option value=\"{$q['sample_import_id']}\">{$q['description']}</option>"; } ?> </select></div><br/><br/>
|
||||
|
||||
<label for="call_max" class="control-label col-sm-4"><?php echo T_("Max calls");?></label>
|
||||
<div class="col-sm-1"><input type="number" min="0" max="20" style="width:6em;" name="call_max" id="call_max" value="0" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Unlimited");?></label><br/><br/>
|
||||
|
||||
<label for="call_attempt_max" class="control-label col-sm-4"><?php echo T_("Max call attempts");?></label>
|
||||
<div class="col-sm-1"><input type="number" min="0" max="20" style="width:6em;" name="call_attempt_max" id="call_attempt_max" value="0" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Unlimited");?></label><br/><br/>
|
||||
|
||||
<label for="answering_machine_messages" class="control-label col-sm-4"><?php echo T_("Number of answering machine messages to leave per case");?></label>
|
||||
<div class="col-sm-1"><input type="number" min="0" max="20" style="width:6em;" name="answering_machine_messages" id="answering_machine_messages" value="0" class="form-control"/></div>
|
||||
<label class="control-label text-info"><?php echo "0 = " . T_("Never");?></label><br/><br/>
|
||||
|
||||
<label for="selecttype" class="control-label col-sm-4"><?php echo T_("Select from sample randomly?");?></label>
|
||||
<div class="col-sm-1"><input type="checkbox" id = "selecttype" name="selecttype" data-toggle="toggle" data-size="small" data-on="<?php echo T_("Yes");?>" data-off="<?php echo T_("No");?>" data-width="85"/></div>
|
||||
<label class="control-label text-info"><?php echo T_("No") ." = ". T_("Sequentially");?></label><br/><br/>
|
||||
|
||||
<label for="allownew" class="control-label col-sm-4"><?php echo T_("Allow new numbers to be drawn?");?></label>
|
||||
<div class="col-sm-1"><input type="checkbox" id = "allownew" name="allownew" checked="checked" class="col-sm-1" data-toggle="toggle" data-size="small" data-on="<?php echo T_("Yes");?>" data-off="<?php echo T_("No");?>" data-width="85"/></div><br/><br/><br/>
|
||||
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id);?>"/>
|
||||
|
||||
<div class="col-sm-offset-4 col-sm-3"><button type="submit" name="add_sample" class="btn btn-primary"><i class="fa fa-plus-circle fa-lg"></i> <?php echo T_("Add sample");?></button></div>
|
||||
|
||||
</form></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('[data-toggle="confirmation"]').confirmation()
|
||||
</script>
|
||||
|
||||
313
admin/assigntimeslots.php
Normal file
313
admin/assigntimeslots.php
Normal file
@@ -0,0 +1,313 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign availability groups to a questionnaire
|
||||
*
|
||||
*
|
||||
* 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 Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @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("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
//"../include/font-awesome/css/font-awesome.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/window.js",
|
||||
//"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
//block availability
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['av_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['av_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_availability(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['av_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['av_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_availability
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
//block call_attempts
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ca_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ca_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_timeslot(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ca_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ca_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
//block call_attempts by sample
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['qs_availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['qs_availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_timeslot (questionnaire_id,sample_import_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$sample_import_id','$availability_group')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['qs_ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['qs_ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_sample_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND sample_import_id = '$sample_import_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
xhtml_head(T_("Assign Time slots"),true,$css,$js_head);//false,array("../js/window.js")
|
||||
|
||||
print "<div class='clearfix form-group'><h3 class='col-sm-6 text-right text-uppercase'>" . T_("Select a questionnaire") . ":</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id,false, "form-inline", "form-control");
|
||||
print "</div>";
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
//page questionnaireavailability.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Time slot groups") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning an availability group to a questionnaire will allow interviewers to select from those groups to restrict calls to a particular case to the times within the group") ."</div>";
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&av_ravailability_group=', a.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
FROM questionnaire_availability as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
print "</br></br></br><div class='panel-body'>";
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no time slots groups selected for this questionnaire") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Time slots groups selected for this questionnaire") . "</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
print "</div>";
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_availability as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add time slot to this questionnaire:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='av_availability_group' id='av_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
 <input type='submit' class='btn btn-default' name='add_av_availability' value='" . T_("Add time slot group") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
//page questionnairecatimeslots.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Call attempt time slots") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</div>";
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&ca_ravailability_group=', q.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
|
||||
FROM questionnaire_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
print "</br><div class='panel-body'>";
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no call attempt time slots selected for this questionnaire") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Call attempt time slots selected for this questionnaire") . "</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_timeslot as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add a call attempt time slot to this questionnaire:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='ca_availability_group' id='ca_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
 <input type='submit' class='btn btn-default' name='add_ca_availability' value='" . TQ_("Add call attempt time slot") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
//page questionnairetimeslosample.php
|
||||
print "<div class=col-sm-4><h2>" . T_("Call attempt time slots for sample") . "</h2>";
|
||||
print "<div class='well'>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</div>";
|
||||
|
||||
print "<h3 class='pull-left'>" . T_("Sample") . ": </h3>";
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false, "form-inline", "form-control");
|
||||
|
||||
if ($sample_import_id !== false)
|
||||
{
|
||||
$sql = "SELECT q.availability_group_id,a.description as description, CONCAT('<a href=\'?sample_import_id=$sample_import_id&questionnaire_id=$questionnaire_id&qs_ravailability_group=', q.availability_group_id,'\' >" . T_("Click to unassign") . "</a>') as link
|
||||
FROM questionnaire_sample_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
AND q.sample_import_id = '$sample_import_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h4 class='alert text-danger'>" . T_("There are no call attempt time slots selected for this questionnaire sample") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h4>" . T_("Call attempt time slots selected for this sample") . ":</h4>";
|
||||
xhtml_table ($qs,array("availability_group_id","description","link"),false,"table table-hover");
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_sample_timeslot as q ON (q.sample_import_id = '$sample_import_id' AND q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
print "<div class='panel-body'>";
|
||||
//print "<h3>" . T_("Add a call attempt time slot to this questionnaire sample:") . "</h3>";
|
||||
print "<form action='' method='get'><div class='pull-left'><select class='form-control ' name='qs_availability_group' id='qs_availability_group'>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
print "</select></div>
|
||||
<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/>
|
||||
<input type='hidden' name='sample_import_id' value='$sample_import_id'/>
|
||||
 <input type='submit' name='add_qs_availability' class='btn btn-default' value='" . T_("Add call attempt time slot for sample") . "'/>
|
||||
</form></div>";
|
||||
}
|
||||
}
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
@@ -44,6 +44,22 @@ include ("../db.inc.php");
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css",
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../js/addrow-v2.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
$year="2008";
|
||||
@@ -63,7 +79,6 @@ if (isset($_POST['day']))
|
||||
|
||||
$sql = "DELETE FROM availability
|
||||
WHERE availability_group_id = $availability_group";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
foreach($_POST['day'] as $key => $val)
|
||||
@@ -78,7 +93,6 @@ if (isset($_POST['day']))
|
||||
|
||||
$sql = "INSERT INTO availability (day_of_week,start,end,availability_group_id)
|
||||
VALUES ('$val',$start,$end,$availability_group)";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
}
|
||||
@@ -86,27 +100,25 @@ if (isset($_POST['day']))
|
||||
$sql = "UPDATE availability_group
|
||||
SET description = " . $db->qstr($_POST['description']) . "
|
||||
WHERE availability_group_id= $availability_group";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Modify time slots"),true,array("../css/shifts.css"),array("../js/addrow-v2.js"));
|
||||
xhtml_head(T_("Modify time slots"),true,$css,$js_head);//,true,array("../css/shifts.css"),array("../js/addrow-v2.js")
|
||||
|
||||
/**
|
||||
* Display warning if timezone data not installed
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'Australia/Victoria','UTC') as t";
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'" . DEFAULT_TIME_ZONE . "','UTC') as t";//'Australia/Victoria'
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (empty($rs) || !$rs || empty($rs['t']))
|
||||
print "<div class='warning'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
print "<div class='alert alert-danger'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
|
||||
|
||||
print "<div><a href='availabilitygroup.php'>" . T_("Go back") . "</a></div>";
|
||||
print "<div><a class='btn btn-default' href='availabilitygroup.php'>" . T_("Go back") . "</a></div><br/>";
|
||||
|
||||
|
||||
$sql = "SELECT description
|
||||
@@ -117,9 +129,8 @@ $rs = $db->GetRow($sql);
|
||||
|
||||
$description = $rs['description'];
|
||||
|
||||
print "<h2>" . $rs['description'] . "</h2>";
|
||||
print "<h3>" . T_("Time slot") . " : <span class = 'text-primary '>" . $rs['description'] . "</span></h3>";
|
||||
|
||||
print "<h3>" . T_("Enter the start and end times for each day of the week to restrict calls within") . "</h3>";
|
||||
/**
|
||||
* Begin displaying currently loaded restriction times
|
||||
*/
|
||||
@@ -138,36 +149,42 @@ $daysofweek = $db->GetAll($sql);
|
||||
translate_array($daysofweek,array("description"));
|
||||
|
||||
?>
|
||||
<form method="post" action="">
|
||||
<table>
|
||||
<div class=" panel-body col-sm-4"><form method="post" action="">
|
||||
<p><label class="control-label"for="description"><?php echo T_("Edit Time slot group name"); ?>: </label><input class="form-control" type="text" name="description" id="description" value="<?php echo $description;?>"/></p>
|
||||
<table class="table-hover table-condensed "><thead class="highlight">
|
||||
<?php
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th></tr>";
|
||||
|
||||
print "<div class='well text-info'>" . T_("Enter the start and end times for each day of the week to restrict calls within") . "</div>";
|
||||
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th></tr></thead><tbody>";
|
||||
$count = 0;
|
||||
foreach($availabilitys as $availability)
|
||||
{
|
||||
print "<tr id='row-$count' class='row_to_clone'><td>";
|
||||
print "<tr id='row-$count' ><td>";//class='row_to_clone'
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, array("description",$availability['dt']));
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"{$availability['start']}\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$availability['end']}\"/></td></tr>";
|
||||
print "</td><td><input class=\"form-control clockpicker\" size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"{$availability['start']}\"/></td><td><input class=\"form-control clockpicker\" name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$availability['end']}\"/></td></tr>";
|
||||
$count++;
|
||||
}
|
||||
print "<tr class='row_to_clone' id='row-$count'><td>";
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, false);
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"00:00:00\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"00:00:00\"/></td></tr>";
|
||||
print "</td><td><input class=\"form-control clockpicker\" size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"08:00:00\"/></td><td><input class=\"form-control clockpicker\" name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"20:00:00\"/></td></tr>";
|
||||
|
||||
|
||||
?>
|
||||
</table>
|
||||
<p><a onclick="addRow(); return false;" href="#"><?php echo T_("Add row"); ?></a></p>
|
||||
<p><label for="description"><?php echo T_("Time slot group name"); ?>: </label><input type="text" name="description" id="description" value="<?php echo $description;?>"/></p>
|
||||
<p><input type="submit" name="submit" value="<?php echo T_("Save changes to time slot group"); ?>"/></p>
|
||||
</tbody></table>
|
||||
<a class="btn btn-default btn-sm" onclick="addRow(); return false;" href="#"><?php echo T_("Add row"); ?></a><br/><br/>
|
||||
<input class="btn btn-primary" type="submit" name="submit" value="<?php echo T_("Save changes to time slot group"); ?>"/>
|
||||
<input type="hidden" name="availability_group" value="<?php echo $availability_group;?>"/>
|
||||
</form>
|
||||
</form><br/><br/>
|
||||
<form method="post" action="availabilitygroup.php">
|
||||
<p><input type="submit" name="subdel" value="<?php echo T_("Delete this time slot group"); ?>"/></p>
|
||||
<input class="btn btn-danger pull-right" type="submit" name="subdel" value="<?php echo T_("Delete this time slot group"); ?>"/>
|
||||
<input type="hidden" name="availability_group" value="<?php echo $availability_group;?>"/>
|
||||
</form>
|
||||
</form></div>
|
||||
<?php
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('.clockpicker').clockpicker({
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -65,9 +65,19 @@ include("../functions/functions.operator.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/window.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
global $db;
|
||||
|
||||
xhtml_head(T_("Time slots"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Time slots"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
|
||||
if (isset($_POST['subdel']))
|
||||
{
|
||||
@@ -103,33 +113,29 @@ else if (isset($_POST['availability_group']))
|
||||
}
|
||||
|
||||
//view groups
|
||||
$sql = "SELECT description,
|
||||
$sql = "SELECT availability_group_id,description,
|
||||
CONCAT('<a href=\'availability.php?availability_group=', availability_group_id, '\'>". TQ_("Modify") . "</a>') as link
|
||||
FROM availability_group";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h3>" . T_("Time slots")."</h3>";
|
||||
|
||||
print "<p>" . T_("Time slots define periods of time during particular days of the week. These are used for the availability function and also the call attempt time slot function.") . "</p>";
|
||||
print "<div class='well'>" . T_("Time slots define periods of time during particular days of the week. These are used for the availability function and also the call attempt time slot function.") . "</div>";
|
||||
|
||||
if (empty($rs))
|
||||
print "<p>" . T_("No time slots") . "</p>";
|
||||
else
|
||||
xhtml_table($rs,array("description","link"),array(T_("Time slot"),T_("Modify")));
|
||||
print "<div class='alert alert-danger'>" . T_("No time slots") . "</div>";
|
||||
else{
|
||||
print "<div class='panel-body col-sm-6'>";
|
||||
xhtml_table($rs,array("availability_group_id","description","link"),array(T_("ID"),T_("Time slot name"),T_("Modify")),"table table-hover");
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
//add an availablity group
|
||||
print "<h3>" . T_("Add time slot") . "</h3>";
|
||||
//add a time slot (ex- availablity group)
|
||||
?>
|
||||
<form method="post" action="?">
|
||||
<p><label for="availability_group"><?php echo T_("Time slot name"); ?>: </label><input type="text" class="textclass" name="availability_group" id="availability_group"/></p>
|
||||
<p><input class="submitclass" type="submit" name="submit" value="<?php echo T_("Add time slot"); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<div class=" panel-body col-sm-4"><form method="post" action="?">
|
||||
<h3><?php echo T_("Add new time slot")," :";?></h3>
|
||||
<p><input type="text" class="textclass form-control" name="availability_group" id="availability_group" placeholder="<?php echo T_("Enter")," ",T_("new")," ",T_("Time slot name"); ?>"/></p>
|
||||
<p><input class="submitclass btn btn-default" type="submit" name="submit" value="<?php echo T_("Add time slot"); ?>"/></p>
|
||||
</form></div>
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
|
||||
@@ -125,7 +125,8 @@ function validate_bulk_appointment($tmpfname)
|
||||
|
||||
if (isset($_POST['tmpfname']))
|
||||
{
|
||||
xhtml_head("queXS",true,array("../css/table.css"));
|
||||
$subtitle = T_("Result");
|
||||
xhtml_head(T_("Bulk appointment generator"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),false,false,false,false,$subtitle);
|
||||
$todo = validate_bulk_appointment($_POST['tmpfname']);
|
||||
|
||||
if (is_array($todo))
|
||||
@@ -213,60 +214,76 @@ if (isset($_POST['tmpfname']))
|
||||
else if (isset($_POST['import_file']))
|
||||
{
|
||||
//file has been submitted
|
||||
|
||||
xhtml_head("queXS",true,array("../css/table.css"));
|
||||
$subtitle = T_("Check data to submit");
|
||||
xhtml_head(T_("Bulk appointment generator"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),false,false,false,false,$subtitle);
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<form action="" method="post" >
|
||||
<?php
|
||||
|
||||
$tmpfname = tempnam(TEMPORARY_DIRECTORY, "FOO");
|
||||
|
||||
move_uploaded_file($_FILES['file']['tmp_name'],$tmpfname);
|
||||
|
||||
$todo = validate_bulk_appointment($tmpfname);
|
||||
|
||||
if (is_array($todo))
|
||||
{
|
||||
print "<p>" . T_("Please check the case id's, appointment start and end times and notes are correct before accepting below") . "</p>";
|
||||
|
||||
if (is_array($todo) && !empty($todo)) {
|
||||
|
||||
print "<p class='well'>" . T_("Please check the case id's, appointment start and end times and notes are correct before accepting below") . "</p>";
|
||||
$todoh = array(T_("Case id"), T_("Start time"), T_("End time"), T_("Note"));
|
||||
xhtml_table($todo,array(0,1,2,3),$todoh);
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<p><input type="hidden" name="tmpfname" value="<?php echo $tmpfname; ?>" /></p>
|
||||
<p><input type="submit" name="import_file" value="<?php echo T_("Accept and generate bulk appointments"); ?>"/></p>
|
||||
<input type="hidden" name="tmpfname" value="<?php echo $tmpfname; ?>" />
|
||||
<input type="submit" name="import_file" value="<?php echo T_("Accept and generate bulk appointments"); ?>" class="btn btn-primary"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("The file does not contain at least caseid, starttime and endtime columns. Please try again.") ."</p>";
|
||||
|
||||
print "<p class='well text-danger'>" . T_("The file does not contain at least caseid, starttime and endtime columns. Please try again.") ."</p>";
|
||||
|
||||
print "</form>";
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//need to supply file to upload
|
||||
xhtml_head(T_("Import: Select file to upload"),true,array("../css/table.css"));
|
||||
$subtitle = T_("Import: Select file to upload");
|
||||
xhtml_head(T_("Bulk appointment generator"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/font-awesome/css/font-awesome.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../js/bootstrap-filestyle.min.js"),false,false,false,$subtitle );
|
||||
|
||||
$ua = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (preg_match('/Firefox/i', $ua)) $csv= "text/csv"; else $csv= ".csv";
|
||||
|
||||
?>
|
||||
<h1><?php echo T_("Bulk appointment generator"); ?></h1>
|
||||
<p><?php echo T_("Provide a headered CSV file containing at least 3 columns - caseid, starttime and endtime. Optionally you can include a note column to attach a note to the case in addition to setting an appointment. Only cases that have temporary (non final) outcomes will have appointments generated, and the outcome of the case will be updated to an appointment outcome."); ?><p>
|
||||
<p><?php echo T_("Example CSV file:"); ?></p>
|
||||
<div><table class="tclass">
|
||||
<tr><th>caseid</th><th>starttime</th><th>endtime</th><th>note</th></tr>
|
||||
<tr><td>1</td><td>2012-08-15 11:00:00</td><td>2012-08-15 13:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
<tr><td>2</td><td>2012-08-15 12:00:00</td><td>2012-08-15 14:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
<tr><td>3</td><td>2012-08-15 13:00:00</td><td>2012-08-15 15:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
</table></div>
|
||||
|
||||
<p class="well"><?php echo T_("Provide a headered CSV file containing at least 3 columns - caseid, starttime and endtime. </br> Optionally you can include a note column to attach a note to the case in addition to setting an appointment. </br>Only cases that have temporary (non final) outcomes will have appointments generated, and the outcome of the case will be updated to an appointment outcome."); ?><p>
|
||||
|
||||
<div class="panel-body">
|
||||
<h5><u><?php echo T_("Example CSV file:"); ?></u></h5>
|
||||
<table class="table-bordered table-condensed form-group">
|
||||
<tr><th>caseid</th><th>starttime</th><th>endtime</th><th>note</th></tr>
|
||||
<tr><td>1</td><td>2012-08-15 11:00:00</td><td>2012-08-15 13:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
<tr><td>2</td><td>2012-08-15 12:00:00</td><td>2012-08-15 14:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
<tr><td>3</td><td>2012-08-15 13:00:00</td><td>2012-08-15 15:00:00</td><td>Appointment automatically generated</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><input type="hidden" name="MAX_FILE_SIZE" value="1000000000" /></p>
|
||||
<p><?php echo T_("Choose the CSV file to upload:"); ?><input name="file" type="file" /></p>
|
||||
<p><input type="submit" name="import_file" value="<?php echo T_("Load bulk appointment CSV"); ?>"/></p>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
|
||||
|
||||
<h4 class="pull-left" ><?php echo T_("Select bulk appointment CSV file to upload"); ?>: </h4>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<input name="file" class="filestyle" type="file" required data-buttonBefore="true" data-iconName="fa fa-folder-open fa-lg text-primary " data-buttonText="<?php echo T_("Select file"); ?>" type="file" accept="<?php echo $csv; ?>"/> 
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="import_file" value=""><i class='fa fa-upload fa-lg'></i> <?php echo T_("Upload file"); ?></button>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -49,42 +49,70 @@ include ("../functions/functions.xhtml.php");
|
||||
*/
|
||||
include("../functions/functions.operator.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bs-data-table/css/jquery.bdt.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js"
|
||||
);
|
||||
$js_foot = array(
|
||||
"../include/bs-data-table/js/vendor/jquery.sortelements.js",
|
||||
"../include/bs-data-table/js/jquery.bdt.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
//List the case call history
|
||||
$operator_id = get_operator_id();
|
||||
/*
|
||||
Modified Call history list to have more information more suitable way with filtering, soring, paging and submenu for Cse history with asterisk records....
|
||||
Need to be linked with cdr records from asterisk!! for monitoring (requires addtional field for call_attempt table to request and store asterisk UniqueID as a reference to CDR .wav file list at /var/spool/asterisk/monitor/ )
|
||||
*/
|
||||
|
||||
if ($operator_id)
|
||||
{
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as start,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as des, (CONCAT(r.firstName,' ',r.lastName)) as firstName, opp.firstName as opname, ";
|
||||
if (isset($_GET['questionnaire_id'])) $qid = $_GET['questionnaire_id'];
|
||||
if (isset($_GET['sample_import_id'])) $sid = $_GET['sample_import_id'];
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, opp.firstName as opname,
|
||||
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '</br>¶ ' ) FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,";
|
||||
|
||||
if (isset($_GET['csv']))
|
||||
$sql .= " c.case_id ";
|
||||
else
|
||||
$sql .= " CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') ";
|
||||
if (isset($_GET['csv'])) $sql .= " c.case_id ";
|
||||
else $sql .= " CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') ";
|
||||
|
||||
$sql .= " as case_id, q.description as qd
|
||||
$sql .= " as case_id, q.description as qd , contact_phone.phone as cpi, sample_import.description as spl
|
||||
FROM `call` as c
|
||||
JOIN (operator as op, respondent as r) on (op.operator_id = '$operator_id' and r.respondent_id = c.respondent_id)
|
||||
JOIN (`case` as ca, questionnaire as q) ON (ca.case_id = c.case_id AND q.questionnaire_id = ca.questionnaire_id)
|
||||
JOIN (operator as op, respondent as r) on (op.operator_id = '$operator_id' and r.respondent_id = c.respondent_id)";
|
||||
if ($qid) $quest = "$qid and q.questionnaire_id= $qid"; else $quest = "q.questionnaire_id";
|
||||
if ($sid) $samimpid = "$sid and sample_import.sample_import_id=$sid"; else $samimpid = "sample_import.sample_import_id";
|
||||
|
||||
$sql .= "
|
||||
JOIN (`case` as ca, questionnaire as q) ON (ca.case_id = c.case_id AND ca.questionnaire_id = $quest)
|
||||
LEFT JOIN (outcome as o) on (c.outcome_id = o.outcome_id)
|
||||
LEFT JOIN (operator as opp) on (opp.operator_id = c.operator_id)
|
||||
LEFT JOIN (operator as opp) on (opp.operator_id = c.operator_id),
|
||||
contact_phone, sample_import, sample
|
||||
WHERE c.contact_phone_id = contact_phone.contact_phone_id AND sample.import_id = $samimpid
|
||||
AND sample.sample_id = ca.sample_id
|
||||
ORDER BY c.start DESC";
|
||||
|
||||
if (!isset($_GET['csv']))
|
||||
$sql .= " LIMIT 500";
|
||||
|
||||
$rs = $db->Execute($sql);
|
||||
else $sql .= " LIMIT 5000";
|
||||
|
||||
$rs = $db->Execute($sql);
|
||||
if (empty($rs))
|
||||
{
|
||||
xhtml_head(T_("Call History List"),true,array("../css/table.css"));
|
||||
print "<p>" . T_("No calls ever made") . "</p>";
|
||||
print "<div class='alert alert-warning col-sm-6'><p>" . T_("No calls ever made") . "</p></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($_GET['csv']))
|
||||
{
|
||||
$fn = "callhistory.csv";
|
||||
{
|
||||
$qds = str_replace(' ','_',$_GET['dq']); $smpds = str_replace(' ','_',$_GET['ds']);
|
||||
$fn = "callhistory-" . $qds . $smpds . date("_d-M-Y_H-i") . ".csv";
|
||||
|
||||
header("Content-Type: text/csv");
|
||||
header("Content-Disposition: attachment; filename=$fn");
|
||||
@@ -92,33 +120,62 @@ if ($operator_id)
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
Header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
||||
header("Pragma: no-cache"); // HTTP/1.0
|
||||
|
||||
echo(T_("Date/Time call start") . "," . T_("Time end") . "," . T_("Case ID") . "," . T_("Questionnaire") . "," . T_("Operator") . "," . T_("Outcome") . "," . T_("Respondent") . "\n");
|
||||
|
||||
echo(T_("Date") . ",".T_("Start time") . "," . T_("End time") . "," . T_("Case ID") . "," . T_("Questionnaire") . "," . T_("Sample") . "," . T_("Phone number") . "," . T_("Operator") . "," . T_("Outcome") . ",".T_("Case notes")."," . T_("Respondent") . "\n");
|
||||
|
||||
while ($r = $rs->FetchRow())
|
||||
{
|
||||
translate_array($r,array("des"));
|
||||
echo $r['start'] . "," . $r['end'] . "," . $r['case_id'] . "," . $r['qd'] . "," . $r['opname'] . ",\"" . $r['des'] . "\"," . $r['firstName'] . "\n";
|
||||
echo $r['start_date'] . "," .$r['start_time'] . "," . $r['end'] . "," . $r['case_id'] . "," . $r['qd'] . "," . $r['spl'] . "," . $r['cpi'] . "," . $r['opname'] . "," . $r['descr'] . "," . $r['casenotes'] . "," . $r['firstName'] . "\n";
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Call History List"),true,$css,$js_head);
|
||||
echo "<div class='form-group col-sm-2'><a href='' onclick='history.back();return false;' class='btn btn-default'><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a></div>";
|
||||
|
||||
$rs = $rs->GetArray();
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_head(T_("Call History List"),true,array("../css/table.css"));
|
||||
print "<p><a href='?csv=csv'>" . T_("Download Call History List") . "</a></p>";
|
||||
xhtml_table($rs,array("start","end","case_id","qd","opname","des","firstName"),array(T_("Date/Time call start"),T_("Time end"),T_("Case ID"),T_("Questionnaire"),T_("Operator"),T_("Outcome"),T_("Respondent")));
|
||||
if (count($rs) ==0)
|
||||
{
|
||||
print "<div class='alert alert-info col-sm-6'><h3>" . T_("NO Call history records for Your query") . "</h3></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
|
||||
$datacol = array("start_date", "start_time","end","case_id","qd","spl","cpi","opname","descr","casenotes","firstName");
|
||||
$headers = array(T_("Date"), T_("Start time"), T_("End time"),T_("Case ID"),T_("Questionnaire"),T_("Sample"),T_("Phone number"),T_("Operator"),T_("Outcome"),T_("Case notes"),T_("Respondent"));
|
||||
|
||||
if (isset($_GET['questionnaire_id'])){
|
||||
$sql = "SELECT description FROM `questionnaire` WHERE `questionnaire_id` = $qid ";
|
||||
$dq = $db->GetOne($sql);
|
||||
print "<h3><small>" . T_("Questionnaire") . " ID: $qid</small> " . $dq . "</h3>";
|
||||
unset($datacol[4]); unset($headers[4]); }
|
||||
|
||||
if (isset($_GET['sample_import_id'])){
|
||||
$sql = "SELECT description FROM `sample_import` WHERE `sample_import_id` = $sid ";
|
||||
$ds = $db->GetOne($sql);
|
||||
print "<h3><small>" . T_("Sample") . " ID: $sid</small> " . $ds . "</h3>";
|
||||
unset($datacol[5]); unset($headers[5]); }
|
||||
|
||||
print " <a href='?csv=csv&questionnaire_id=$qid&dq=" . $dq . "&sample_import_id=$sid&ds=" . $ds . "' class='btn btn-default pull-right'><i class='fa fa-download fa-lg text-primary'></i> " . 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> " . T_("Go to Call History Report") . "</a>
|
||||
|
||||
xhtml_table($rs,$datacol,$headers,"tclass",false,false,"bs-table");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Call History List"),true,array("../css/table.css"));
|
||||
print "<p>" . T_("No operator") . "</p>";
|
||||
print "<div class='alert alert-warning col-sm-6'>" . T_("No operator") . "</div>";
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('#bs-table').bdt();
|
||||
</script>
|
||||
|
||||
@@ -44,6 +44,23 @@ include ("../db.inc.php");
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css",
|
||||
//"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../js/addrow-v2.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
$year="2008";
|
||||
@@ -79,21 +96,21 @@ if (isset($_POST['day']))
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Modify call restriction times"),true,array("../css/shifts.css"),array("../js/addrow-v2.js"));
|
||||
xhtml_head(T_("Set call restriction times"),true,$css,$js_head);//,array("../css/shifts.css"),array("../js/addrow-v2.js")
|
||||
|
||||
/**
|
||||
* Display warning if timezone data not installed
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'Australia/Victoria','UTC') as t";
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'" . DEFAULT_TIME_ZONE . "','UTC') as t";//'Australia/Victoria'
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (empty($rs) || !$rs || empty($rs['t']))
|
||||
print "<div class='warning'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
print "<div class='alert alert-danger'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
|
||||
|
||||
print "<h2>" . T_("Enter the start and end times for each day of the week to restrict calls within") . "</h2>";
|
||||
print "<div class='well'>" . T_("Enter the start and end times for each day of the week to restrict calls within") . "</div>";
|
||||
|
||||
/**
|
||||
* Begin displaying currently loaded restriction times
|
||||
@@ -112,30 +129,35 @@ $daysofweek = $db->GetAll($sql);
|
||||
translate_array($daysofweek,array("description"));
|
||||
|
||||
?>
|
||||
<form method="post" action="">
|
||||
<table>
|
||||
<div class=" panel-body col-sm-4"><form method="post" action="">
|
||||
<table class="table-hover table-condensed " id="restrict"><thead class="highlight">
|
||||
<?php
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th></tr>";
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th></tr></thead><tbody>";
|
||||
$count = 0;
|
||||
foreach($shifts as $shift)
|
||||
{
|
||||
print "<tr id='row-$count' class='row_to_clone'><td>";
|
||||
print "<tr id='row-$count' ><td>";//class='row_to_clone' /* these are not the rows to clone...*/
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, array("description",$shift['dt']));
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"{$shift['start']}\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$shift['end']}\"/></td></tr>";
|
||||
print "</td><td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"{$shift['start']}\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td>
|
||||
<td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$shift['end']}\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td></tr>";
|
||||
$count++;
|
||||
}
|
||||
print "<tr class='row_to_clone' id='row-$count'><td>";
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, false);
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"00:00:00\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"00:00:00\"/></td></tr>";
|
||||
print "</td><td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"08:00:00\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td>
|
||||
<td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"20:00:00\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td></tr>";
|
||||
|
||||
|
||||
?>
|
||||
</table>
|
||||
<div><a onclick="addRow(); return false;" href="#"><?php echo T_("Add row"); ?></a></div>
|
||||
<p><input type="submit" name="submit" value="<?php echo T_("Save changes to restriction times"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
</tbody></table>
|
||||
<a class="btn btn-default btn-sm" onclick="addRow(); return false;" href=""><?php echo T_("Add row"); ?></a><br/><br/>
|
||||
<input class="btn btn-default " type="submit" name="submit" value="<?php echo T_("Save changes to restriction times"); ?>"/>
|
||||
</form></div>
|
||||
<?php
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('.clockpicker').clockpicker({
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,9 @@ include ("../functions/functions.xhtml.php");
|
||||
*/
|
||||
include("../functions/functions.operator.php");
|
||||
|
||||
xhtml_head(T_("Cases by outcome"),true,array("../css/table.css"));
|
||||
xhtml_head(T_("Cases by outcome"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
|
||||
print "<div class='col-sm-3'><a onclick='history.back();return false;' href='' class='btn btn-default'> " . T_("Go back") . " </a></div>";
|
||||
|
||||
//List the cases by outcome
|
||||
$operator_id = get_operator_id();
|
||||
@@ -59,27 +61,48 @@ if ($operator_id)
|
||||
//get the outcome and the questionnaire
|
||||
$outcome_id = intval($_GET['outcome_id']);
|
||||
$questionnaire_id = intval($_GET['questionnaire_id']);
|
||||
|
||||
$sql = "SELECT o.description, q.description as qd
|
||||
$sql = "SELECT o.description, q.description as qd
|
||||
FROM `outcome` as o, questionnaire as q
|
||||
WHERE o.outcome_id = '$outcome_id'
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
print "<h1>" . T_("Project") . ": {$rs['qd']}</h1>";
|
||||
print "<h2>". T_("Current outcome:") ." " . T_($rs['description']) . "</h2>";
|
||||
if (!empty($rs)){
|
||||
print "<h2 class=' '>" . T_("Project") . ": <span class='text-primary'>{$rs['qd']}</span></h2>";
|
||||
if($sample_import_id=intval($_GET['sample_import_id'])){
|
||||
$sql = "SELECT si.description as sd
|
||||
FROM `sample_import` as si
|
||||
WHERE si.sample_import_id = '$sample_import_id' ;";
|
||||
$sd = $db->GetRow($sql);
|
||||
print "<h3>". T_("Sample:") ." <span class='text-primary'>" . T_($sd['sd']) . "</span></h3>";
|
||||
$sid = "AND s.import_id= '$sample_import_id'";
|
||||
}
|
||||
else{$sid = " ";};
|
||||
|
||||
if($oper_id= intval($_GET['oper_id'])){
|
||||
$sql = "SELECT CONCAT(op.firstname, op.lastname) as opname
|
||||
FROM `operator` as op
|
||||
WHERE op.operator_id = '$oper_id' ;";
|
||||
$on = $db->GetRow($sql);
|
||||
print "<h3>". T_("Operator") ." : " . T_($on['opname']) . "</h3> oper_id = $oper_id ";
|
||||
$opn = "AND c.current_operator_id= '$oper_id'";
|
||||
}
|
||||
else{$opn = " ";};
|
||||
|
||||
print "<h3 class=' '>". T_("Current outcome:") ." <span class='text-primary'>" . T_($rs['description']) . "</span></h3>";
|
||||
|
||||
$sql = "SELECT CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id
|
||||
FROM `case` as c
|
||||
LEFT JOIN `sample` as s ON ( s.sample_id = c.sample_id )
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
AND c.current_outcome_id = '$outcome_id'
|
||||
$sid
|
||||
$opn
|
||||
LIMIT 500";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div class='panel-body col-sm-4' style='max-height:750px; overflow:auto;'>";
|
||||
if (empty($rs))
|
||||
print "<p>" . T_("No cases with this outcome") . "</p>";
|
||||
else
|
||||
@@ -92,8 +115,7 @@ if ($operator_id)
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No operator") . "</p>";
|
||||
print "</div>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
<?php /**
|
||||
* Display a list of cases including status. Allow for assigning to operators in a queue
|
||||
*
|
||||
* 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 admin
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -52,6 +27,26 @@ include("../functions/functions.display.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bs-data-table/css/jquery.bdt.css",
|
||||
//"../include/iCheck/skins/square/blue.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js"
|
||||
);
|
||||
$js_foot = array(
|
||||
"../include/bs-data-table/js/vendor/jquery.sortelements.js",
|
||||
"../include/bs-data-table/js/jquery.bdt.js",
|
||||
"../include/iCheck/icheck.min.js",
|
||||
"../js/window.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
/**
|
||||
* Generate the case status report
|
||||
*
|
||||
@@ -63,6 +58,8 @@ include("../functions/functions.input.php");
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @since 2012-10-02
|
||||
*/
|
||||
|
||||
|
||||
function case_status_report($questionnaire_id = false, $sample_id = false, $outcome_id = false)
|
||||
{
|
||||
global $db;
|
||||
@@ -78,38 +75,49 @@ function case_status_report($questionnaire_id = false, $sample_id = false, $outc
|
||||
$o = "";
|
||||
if ($outcome_id !== false)
|
||||
$o = "AND c.current_outcome_id = $outcome_id";
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
o.description as outcomes,
|
||||
si.description as samples,
|
||||
CASE WHEN ca.end IS NULL THEN '" . TQ_("Now") . "'
|
||||
WHEN TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) < 0 THEN '" . TQ_("Now") . "'
|
||||
ELSE ROUND(TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) / 60)
|
||||
si.description as samples, s.Time_zone_name as timezone, TIME_FORMAT(CONVERT_TZ(NOW(),@@session.time_zone,s.Time_zone_name),'". TIME_FORMAT ."') as time, (SELECT COUNT(*) FROM `call` WHERE `call`.case_id = c.case_id) as nrcalls, (SELECT COUNT(*) FROM call_attempt WHERE call_attempt.case_id = c.case_id) as nrattempts,
|
||||
CASE WHEN ca.end IS NULL THEN '" . TQ_("Available") . "'
|
||||
WHEN TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) < 0 THEN '" . TQ_("Available") . "'
|
||||
ELSE CONCAT(ROUND(TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) / 60),' " . TQ_("minutes") . "')
|
||||
END AS availableinmin,
|
||||
CASE WHEN oq.operator_id IS NULL THEN CONCAT('". TQ_("Not assigned, select to assign") ." ','<input type=\"checkbox\" name=\"c', c.case_id, '\" value=\"', c.case_id, '\"/>')
|
||||
ELSE CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id&unassign=', cq.case_queue_id, '\"/>". TQ_("Assigned to") . ": ', oq.firstName, ' " . TQ_("Order") . ":', cq.sortorder , ' (". TQ_("Click to unassign") .")</a>')
|
||||
END AS assignedoperator
|
||||
CASE WHEN oq.operator_id IS NULL THEN
|
||||
CONCAT('')
|
||||
ELSE CONCAT('<span class=\'text-info\'>', oq.firstName,' ',oq.lastName,'</span>')
|
||||
END AS assignedoperator,
|
||||
CASE WHEN oq.operator_id IS NULL THEN
|
||||
CONCAT('')
|
||||
ELSE CONCAT('   ', cq.sortorder ,' ')
|
||||
END AS ordr,
|
||||
CASE WHEN oq.operator_id IS NULL THEN
|
||||
CONCAT('<span data-toggle=\'tooltip\' title=\'" . TQ_("Not assigned, select to assign") . "\'><input type=\'checkbox\' name=\'c', c.case_id, '\' value=\'', c.case_id, '\' /></span>')
|
||||
ELSE CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id&unassign=', cq.case_queue_id, '\" data-toggle=\'tooltip\' title=\'" . TQ_("Click to unassign") ."\'><i class=\'fa fa-trash-o fa-lg text-danger\'></i></a>')
|
||||
END AS flag
|
||||
FROM `case` as c
|
||||
JOIN questionnaire as q ON (q.questionnaire_id = c.questionnaire_id and q.enabled = 1)
|
||||
JOIN outcome as o ON (o.outcome_id = c.current_outcome_id AND o.outcome_type_id = 1)
|
||||
JOIN sample as s ON (s.sample_id = c.sample_id $s)
|
||||
JOIN sample_import as si ON (s.import_id = si.sample_import_id AND si.enabled = 1)
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = q.questionnaire_id AND qs.sample_import_id = s.import_id)
|
||||
JOIN sample_import as si ON (s.import_id = si.sample_import_id AND si.enabled = 1)
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = $questionnaire_id AND qs.sample_import_id = s.import_id)
|
||||
LEFT JOIN `call` as ca ON (ca.call_id = c.last_call_id)
|
||||
LEFT JOIN outcome as co ON (co.outcome_id = ca.outcome_id)
|
||||
LEFT JOIN case_queue as cq ON (cq.case_id = c.case_id)
|
||||
LEFT JOIN operator as oq ON (cq.operator_id = oq.operator_id)
|
||||
WHERE c.current_operator_id IS NULL $q $o
|
||||
ORDER BY availableinmin ASC";
|
||||
ORDER BY c.case_id ASC";
|
||||
|
||||
// print $sql;
|
||||
|
||||
print ("<form method=\"post\" action=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id\">");
|
||||
|
||||
xhtml_table($db->GetAll($sql),array('case_id','outcomes','samples','availableinmin','assignedoperator'),array(T_("Case id"),T_("Outcome"),T_("Sample"),T_("Case available in x minutes"),T_("Assigned to operator")));
|
||||
$datacol = array('case_id','samples','timezone','time','nrattempts','nrcalls','outcomes','availableinmin','assignedoperator','ordr','flag');
|
||||
$headers = array(T_("Case id"),T_("Sample"),T_("Timezone"),T_("Time NOW"),T_("Call attempts"),T_("Calls"),T_("Outcome"),T_("Available in"),T_("Assigned to"),T_("Order"),"<i class='fa fa-check-square-o fa-lg'></i>");
|
||||
|
||||
if (isset($_GET['sample_import_id'])){ unset($datacol[1]); unset($headers[1]); }
|
||||
|
||||
xhtml_table($db->GetAll($sql),$datacol,$headers,"tclass",false,false,"bs-table");
|
||||
|
||||
$sql = "SELECT operator_id as value,CONCAT(firstName,' ', lastName) as description, '' selected
|
||||
FROM operator
|
||||
@@ -117,11 +125,11 @@ function case_status_report($questionnaire_id = false, $sample_id = false, $outc
|
||||
|
||||
$rs3 = $db->GetAll($sql);
|
||||
|
||||
print "<label for=\"operator_id\">" . T_("Choose operator to assign selected cases to") . ": </label>";
|
||||
display_chooser($rs3, "operator_id", "operator_id",true,false,false);
|
||||
print "<h4 class='col-sm-offset-5 pull-left text-right control-label'>" . T_("Assign selected cases to") . " " . T_("operator") . " : </h4> ";
|
||||
display_chooser($rs3, "operator_id", "operator_id",true,false,false,true,false,true,"pull-left");
|
||||
|
||||
print ("<input type=\"submit\" value=\"" . T_("Assign cases to operator queue") . "\"/>");
|
||||
print ("</form>");
|
||||
print " <button class='btn btn-default' type='submit' data-toggle='tooltip' title='" . T_("Assign cases to operator queue") . "'><i class='fa fa-link fa-lg text-primary'></i> " . T_("Assign") . "</button>";
|
||||
print "</form></br>";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -190,14 +198,29 @@ if (isset($_GET['unassign']))
|
||||
$sortorder++;
|
||||
}
|
||||
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
}
|
||||
|
||||
xhtml_head(T_("Case status and assignment"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("List cases by questionnaire and sample with the ability to assign them to be called next in a queue by a particular operator. If you assign cases to an operator, it will override the normal scheduling process and call them as soon as the operator is available.") . "</p>";
|
||||
xhtml_head(T_("Case status and assignment"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>
|
||||
<i class='fa fa-question-circle fa-3x text-primary pull-right btn' data-toggle='modal' data-target='.inform'></i>";
|
||||
?>
|
||||
<div class="modal fade inform" id="inform" tabindex="-1" role="dialog" aria-labelledby="inform" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"><small class="text-info"><?php echo T_("INFORMATION");?></small></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php echo T_("List cases by questionnaire and sample with the ability to assign them to be called next in a queue by a particular operator. <br/>If you assign cases to an operator, it will override the normal scheduling process and call them as soon as the operator is available.");?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-info" data-dismiss="modal"><?php echo T_("OK");?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
@@ -205,15 +228,25 @@ $sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id']) && !empty($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$outcome_id = false;
|
||||
|
||||
print "<label for='questionnaire'>" . T_("Questionnaire") . ":</label>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
print "<label for='sample'>" . T_("Sample") . ":</label>";
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false);
|
||||
|
||||
if ($questionnaire_id)
|
||||
print "<div class='form-group '><h3 class=' col-sm-2 text-right'>" . T_("Questionnaire") . ":</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id, false, "pull-left", "form-control");
|
||||
if ($questionnaire_id){
|
||||
print "<h3 class=' col-sm-2 text-right'>" . T_("Sample") . ":</h3>";
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false, "pull-left", "form-control");
|
||||
print "</div>
|
||||
<div class='clearfix'></div>";
|
||||
|
||||
case_status_report($questionnaire_id,$sample_import_id,$outcome_id);
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
}
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('#bs-table').bdt();
|
||||
$('input').iCheck({
|
||||
//checkboxClass: 'icheckbox_square-blue',
|
||||
//increaseArea: '30%'
|
||||
checkboxClass: 'fa fa-lg ', // text-primary
|
||||
checkedCheckboxClass: 'fa-check-square-o text-primary',
|
||||
uncheckedCheckboxClass: 'fa-square-o'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -60,15 +60,13 @@ if (isset($_POST['information']))
|
||||
set_setting("information",$_POST['information']);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Set centre information"),true,false,array("../js/window.js"));
|
||||
|
||||
?>
|
||||
<form action="" method="post"><p>
|
||||
<label for="information"><?php echo T_("Set centre information: "); ?></label><?php echo $CKEditor->editor("information",get_setting("information")); ?>
|
||||
<input type="submit" name="update" value="<?php echo T_("Update centre information"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_head(T_("Set centre information"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
?>
|
||||
<form action="" method="post" class="panel-body">
|
||||
<!-- <label for="information"><?php //echo T_("Set centre information: "); ?></label> -->
|
||||
<?php echo $CKEditor->editor("information",get_setting("information")); ?>
|
||||
<br/><input class="btn btn-primary" type="submit" name="update" value="<?php echo T_("Update centre information"); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
xhtml_foot();
|
||||
?>
|
||||
|
||||
@@ -106,8 +106,6 @@ function vqd($client_id,$questionnaire_id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
@@ -132,7 +130,6 @@ if (isset($_POST['submit']))
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT questionnaire_id,description
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1
|
||||
@@ -140,14 +137,14 @@ $sql = "SELECT questionnaire_id,description
|
||||
|
||||
$questionnaires = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT client_id,firstname as description
|
||||
$sql = "SELECT client_id, CONCAT(firstName,' ', lastName ) as description, username
|
||||
FROM client
|
||||
ORDER by client_id ASC";
|
||||
|
||||
$clients = $db->GetAll($sql);
|
||||
|
||||
|
||||
xhtml_head(T_("Assign clients to questionnaires"),false,array("../css/table.css"));
|
||||
xhtml_head(T_("Assign clients to questionnaires"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/iCheck/icheck.min.js"));
|
||||
|
||||
?>
|
||||
|
||||
@@ -206,7 +203,6 @@ function checkQid(q)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkVid(v)
|
||||
{
|
||||
|
||||
@@ -229,51 +225,50 @@ function checkVid(v)
|
||||
VidOn = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
print "<form action=\"\" method=\"post\" class=''><table class='table-bordered table-hover table-condensed form-group'><thead>";
|
||||
|
||||
|
||||
print "<form action=\"\" method=\"post\"><table>";
|
||||
|
||||
print "<tr><th></th>";
|
||||
print "<tr><th> " . T_("Username") . " </th><th> " . T_("Client") . " </th>";
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
print "<th><a href=\"javascript:checkQid({$q['questionnaire_id']})\">{$q['description']}</a></th>";
|
||||
}
|
||||
print "</tr>";
|
||||
print "</tr></thead>";
|
||||
|
||||
$class = 0;
|
||||
|
||||
foreach($clients as $v)
|
||||
{
|
||||
print "<tr class='";
|
||||
if ($class == 0) {$class = 1; print "even";} else {$class = 0; print "odd";}
|
||||
print "'>";
|
||||
print "<th><a href=\"javascript:checkVid({$v['client_id']})\">{$v['description']}</a></th>";
|
||||
print "<tr class=''>
|
||||
<th> {$v['username']} </th>
|
||||
<th> <a href=\"javascript:checkVid({$v['client_id']})\">{$v['description']}</a> </th>";
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
$checked = "";
|
||||
if (vq($v['client_id'],$q['questionnaire_id'])) $checked="checked=\"checked\"";
|
||||
print "<td><input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" id=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" $checked></input></td>";
|
||||
print "<td class='text-center'><input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" id=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" $checked></input></td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
|
||||
print "</table><p><input type=\"submit\" name=\"submit\" value=\"" . T_("Assign clients to questionnaires") . "\"/></p></form>";
|
||||
print "</table><input type=\"submit\" class='btn btn-default fa' name=\"submit\" value=\"" . T_("Assign clients to questionnaires") . "\"/></form>";
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
increaseArea: '30%'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -78,7 +78,7 @@ if (isset($_POST['client']))
|
||||
$htg->addUserToGroup($_POST['client'],HTGROUP_CLIENT);
|
||||
}
|
||||
|
||||
$a = T_("Added: $client");
|
||||
$a = T_("Added: $client");
|
||||
}
|
||||
else
|
||||
$a = T_("Could not add") . " " . $client . ". " . T_("There may already be a client of this name");
|
||||
@@ -86,7 +86,7 @@ if (isset($_POST['client']))
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Add a client"));
|
||||
xhtml_head(T_("Add a client"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
|
||||
$sql = "SELECT Time_zone_name as value, Time_zone_name as description
|
||||
FROM timezone_template";
|
||||
@@ -97,27 +97,83 @@ $rs = $db->GetAll($sql);
|
||||
if ($a)
|
||||
{
|
||||
?>
|
||||
<h3><?php echo $a; ?></h3>
|
||||
<div class='alert alert-info'><?php echo $a; ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<h1><?php echo T_("Add a client"); ?></h1>
|
||||
<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>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><?php echo T_("Enter the username of a client to add:"); ?> <input name="client" type="text"/></p>
|
||||
<?php if (HTPASSWD_PATH !== false && HTGROUP_PATH !== false) { ?>
|
||||
<p><?php echo T_("Enter the password of a client to add:"); ?> <input name="password" type="text"/></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
//Password generator
|
||||
upp = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
|
||||
low = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
|
||||
dig = new Array('0','1','2','3','4','5','6','7','8','9');
|
||||
sym = new Array('~','!','@','#','$','%','^','&','*','(',')','_','+','=','|',';','.','/','?','<','>','{','}','[',']');
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function rnd(x,y,z) {
|
||||
var num;
|
||||
do {
|
||||
num = parseInt(Math.random()*z);
|
||||
if (num >= x && num <= y) break;
|
||||
} while (true);
|
||||
return(num);
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function generate() {
|
||||
var pwd = '';
|
||||
var res, s;
|
||||
var k = 0;
|
||||
var n = document.addclient.number.value;
|
||||
var pass = new Array();
|
||||
var w = rnd(30,80,100);
|
||||
for (var r = 0; r < w; r++) {
|
||||
res = rnd(1,25,100); pass[k] = upp[res]; k++;
|
||||
res = rnd(1,25,100); pass[k] = low[res]; k++;
|
||||
res = rnd(1,9,100); pass[k] = dig[res]; k++;
|
||||
res = rnd(1,24,100); pass[k] = sym[res]; k++;
|
||||
}
|
||||
for (var i = 0; i < n; i++) {
|
||||
s = rnd(1,k-1,100);
|
||||
pwd+= pass[s];
|
||||
}
|
||||
document.addclient.password.value = pwd;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<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,}" />
|
||||
<div class="form-inline">  
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<p><?php echo T_("Enter the first name of a client to add:"); ?> <input name="firstname" type="text"/></p>
|
||||
<p><?php echo T_("Enter the surname of a client to add:"); ?> <input name="lastname" type="text"/></p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of a client to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE"))); ?> </p>
|
||||
<p><input type="submit" value="<?php echo T_("Add user"); ?>" /></p>
|
||||
<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" />
|
||||
</div>
|
||||
<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 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"); ?>
|
||||
</div>
|
||||
<input type="submit" value="<?php echo T_("Add a client"); ?>" class="btn btn-primary col-sm-offset-3 col-sm-3"/>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -88,5 +88,7 @@ T_("Respondent last name");
|
||||
T_("Email address");
|
||||
T_("Self completion email invitation sent");
|
||||
T_("Self completed online");
|
||||
T_("Max call attempts reached");
|
||||
T_("Max calls reached");
|
||||
|
||||
?>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
@@ -59,16 +58,16 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
$sql = "SELECT sv.var as value
|
||||
FROM `sample_var` as sv
|
||||
WHERE sv.sample_id = (SELECT sample_id FROM sample WHERE import_id = '$sample_import_id' LIMIT 1)";
|
||||
$sql = "SELECT sivr.var as value, sivr.var_id as var_id
|
||||
FROM `sample_import_var_restrict` as sivr
|
||||
WHERE sivr.sample_import_id = $sample_import_id";
|
||||
|
||||
$svars = $db->GetAll($sql);
|
||||
|
||||
$fn = "key_all_";
|
||||
if (isset($_GET['sample'])) $fn = "sample_all_";
|
||||
$fn = "key_";
|
||||
if (isset($_GET['sample'])) $fn = "sample_";
|
||||
|
||||
$fn .= $questionnaire_id . "_" . $sample_import_id .".csv";
|
||||
$fn .= T_("ALL") . "_Qid=" . $questionnaire_id . "_Sid=" . $sample_import_id .".csv";
|
||||
|
||||
header("Content-Type: text/csv");
|
||||
header("Content-Disposition: attachment; filename=$fn");
|
||||
@@ -77,21 +76,32 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
Header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
||||
header("Pragma: no-cache"); // HTTP/1.0
|
||||
|
||||
echo("token,caseid");
|
||||
echo("token,".T_("Case ID")."");
|
||||
foreach($svars as $s)
|
||||
{
|
||||
echo("," . $s['value']);
|
||||
}
|
||||
|
||||
if (isset($_GET['sample']))
|
||||
{
|
||||
echo(",Outcome,AAPOR");
|
||||
echo(",".T_("Current Outcome").",".T_("Number of call attempts").",".T_("Number of calls").",".T_("Case notes").",".T_("Total interview time over all calls (mins)").",".T_("Interview time for last call (mins)").",".T_("Last number dialled").",".T_("DATE/TIME Last number dialled").",".T_("Operator username for last call").",".T_("Shift report").", AAPOR");
|
||||
}
|
||||
|
||||
|
||||
echo("\n");
|
||||
|
||||
$sql = "SELECT c.token,c.case_id ";
|
||||
|
||||
if (isset($_GET['sample'])) $sql .= ", o.description, o.aapor_id ";
|
||||
if (isset($_GET['sample'])) $sql .= ", o.description,
|
||||
(SELECT COUNT(ca.call_attempt_id) FROM `call_attempt` as ca WHERE ca.case_id = c.case_id ) as callattempts,
|
||||
(SELECT COUNT(cl.call_id) FROM `call` as cl WHERE cl.case_id = c.case_id ) as calls,
|
||||
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '|') FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,
|
||||
(SELECT ROUND(SUM( TIMESTAMPDIFF(SECOND , cl2.start,IFNULL(cl2.end,CONVERT_TZ(NOW(),'System','UTC'))))/60,2) FROM `call_attempt` as cl2 WHERE cl2.case_id = c.case_id) as interviewtimec,
|
||||
(SELECT ROUND(TIMESTAMPDIFF(SECOND , cl3.start,IFNULL(cl3.end,CONVERT_TZ(NOW(),'System','UTC')))/60,2) FROM `call_attempt` as cl3 WHERE cl3.case_id = c.case_id ORDER BY cl3.call_attempt_id DESC LIMIT 1) as interviewtimel,
|
||||
(SELECT cp1.phone FROM `call` as cl4, `contact_phone` as cp1 WHERE cl4.call_id = c.last_call_id AND cp1.contact_phone_id = cl4.contact_phone_id ) as lastnumber,
|
||||
(SELECT cl55.start FROM `call` as cl55 WHERE cl55.call_id = c.last_call_id ) as lastcallstart,
|
||||
(SELECT op1.username FROM `call` as cl5, `operator` as op1 WHERE cl5.call_id = c.last_call_id AND op1.operator_id = cl5.operator_id) as operatoru,
|
||||
(SELECT GROUP_CONCAT(DISTINCT sr1.report SEPARATOR '|') FROM `call` as cl6, `shift` as sh1, `shift_report` as sr1 WHERE cl6.case_id = c.case_id AND sr1.shift_id = sh1.shift_id AND sh1.questionnaire_id = c.questionnaire_id AND cl6.start >= sh1.start AND cl6.end < sh1.end GROUP BY sr1.shift_id) as shiftr,
|
||||
o.aapor_id ";
|
||||
|
||||
$i = 0;
|
||||
foreach ($svars as $s)
|
||||
@@ -105,22 +115,21 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
//left join if getting whole sample file
|
||||
if (isset($_GET['sample'])) $sql .= "LEFT ";
|
||||
|
||||
$sql .= "JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id' AND c.sample_id = sample.sample_id) ";
|
||||
$sql .= "JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id' AND c.sample_id = `sample`.sample_id) ";
|
||||
|
||||
if (isset($_GET['sample'])) $sql .= " LEFT JOIN `outcome` as o ON (o.outcome_id = c.current_outcome_id) ";
|
||||
if (isset($_GET['sample'])) $sql .= " LEFT JOIN `outcome` as o ON (o.outcome_id = c.current_outcome_id)";
|
||||
|
||||
$i = 0;
|
||||
foreach ($svars as $s)
|
||||
{
|
||||
$sql .= " LEFT JOIN sample_var AS sv$i ON (sv$i.sample_id = sample.sample_id AND sv$i.var = '{$s['value']}') ";
|
||||
$sql .= " LEFT JOIN sample_var AS sv$i ON (sv$i.sample_id = `sample`.sample_id AND sv$i.var_id = '{$s['var_id']}') ";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$sql .= " WHERE sample.import_id = '$sample_import_id'";
|
||||
$sql .= " WHERE `sample`.import_id = '$sample_import_id'";
|
||||
|
||||
$list = $db->GetAll($sql);
|
||||
|
||||
|
||||
if (!empty($list))
|
||||
{
|
||||
foreach($list as $l)
|
||||
@@ -134,32 +143,31 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
}
|
||||
if (isset($_GET['sample']))
|
||||
{
|
||||
echo "," . str_replace(","," ",$l['description']) . "," . $l['aapor_id'];
|
||||
echo "," . str_replace(","," ",$l['description']) . "," .$l['callattempts']."," .$l['calls']."," .$l['casenotes'].",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_GET['sample_var']))
|
||||
{
|
||||
if (isset($_GET['sample_var'])){
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$sample_var = $db->quote($_GET['sample_var']);
|
||||
$varid = intval($_GET['sample_var']);
|
||||
|
||||
$sql = "SELECT c.token,c.case_id, sv.val
|
||||
FROM sample, `case` as c, sample_var as sv
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
AND sample.import_id = '$sample_import_id'
|
||||
AND c.sample_id = sample.sample_id
|
||||
AND sv.sample_id = sample.sample_id
|
||||
AND sv.var = $sample_var";
|
||||
$sql = "SELECT c.token, c.case_id, sv.val, sivr.var
|
||||
FROM `case` as c, `sample_import_var_restrict` as sivr, `sample_var` as sv
|
||||
WHERE c.questionnaire_id = $questionnaire_id
|
||||
AND sivr.sample_import_id = $sample_import_id
|
||||
AND c.sample_id = sv.sample_id
|
||||
AND sivr.var_id = sv.var_id
|
||||
AND sivr.var_id = $varid";
|
||||
|
||||
$list = $db->GetAll($sql);
|
||||
$sample_var = $list[0]['var'];
|
||||
|
||||
$fn = "key_$questionnaire_id" . "_" . $sample_import_id .".csv";
|
||||
$fn = "key-" . $sample_var . "_Qid=$questionnaire_id" . "_Sid=" . $sample_import_id .".csv";
|
||||
|
||||
header("Content-Type: text/csv");
|
||||
header("Content-Disposition: attachment; filename=$fn");
|
||||
@@ -182,13 +190,12 @@ if (isset($_GET['sample_var']))
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Data output"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
|
||||
xhtml_head(T_("Data output"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<h3>" . T_("Please select a questionnaire") . "</h3>";
|
||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a questionnaire") . ": </h3>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
||||
|
||||
if ($questionnaire_id)
|
||||
{
|
||||
@@ -199,38 +206,37 @@ if ($questionnaire_id)
|
||||
$ls = $db->GetRow($sql);
|
||||
$lsid = $ls['lime_sid'];
|
||||
|
||||
print "<p><a href='" . LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid'>". T_("Download data for this questionnaire via Limesurvey") . "</a></p>";
|
||||
print " <a href='" . LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid' class='btn btn-default fa btn-lime'>". T_("Download data for this questionnaire via Limesurvey") . "</a></div>";
|
||||
|
||||
print "<h3>" . T_("Please select a sample") . "</h3>";
|
||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a sample") . ": </h3>";
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
||||
|
||||
if ($sample_import_id)
|
||||
{
|
||||
print "<p><a href='" .LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid&quexsfilterinc=$questionnaire_id:$sample_import_id'>" . T_("Download data for this sample via Limesurvey") . "</a></p>";
|
||||
print " <a href='" .LIME_URL . "admin/admin.php?action=exportresults&sid=$lsid&quexsfilterinc=$questionnaire_id:$sample_import_id' class='btn btn-default fa btn-lime'>" . T_("Download data for this sample via Limesurvey") . "</a></div>";
|
||||
//get sample vars
|
||||
$sql = "SELECT sv.var as value, sv.var as description
|
||||
FROM `sample_var` as sv
|
||||
WHERE sv.sample_id = (SELECT sample_id FROM sample WHERE import_id = '$sample_import_id' LIMIT 1)";
|
||||
$sql = "SELECT sivr.var_id as value, sivr.var as description
|
||||
FROM `sample_import_var_restrict` as sivr
|
||||
WHERE sivr.sample_import_id = $sample_import_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//download a key file linking the caseid to the sample
|
||||
print "<h3>" . T_("Download key file: select sample var") . "</h3>";
|
||||
print "<div class='form-group '><h3 class='col-sm-4 text-right'>" . T_("Download key file: select sample var") . ": </h3>";
|
||||
|
||||
display_chooser($db->GetAll($sql),"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id");
|
||||
display_chooser($rs,"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-inline col-sm-3 pull-left");
|
||||
|
||||
print "</div><div class=' col-sm-4'>";
|
||||
|
||||
//download complete key file
|
||||
print "<p><a href='?key=key&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . T_("Download complete key file") . "</a></p>";
|
||||
print "<a href='?key=key&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default fa'>" . T_("Download complete key file") . "</a></br></br>";
|
||||
|
||||
//download complete sample file with outcomes
|
||||
print "<p><a href='?sample=sample&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . T_("Download complete sample file with current outcomes") . "</a></p>";
|
||||
|
||||
|
||||
print "<a href='?sample=sample&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default fa'>" . T_("Download complete sample file with current outcomes") . "</a></div>";
|
||||
}
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,31 +1,5 @@
|
||||
<?php /**
|
||||
* Display appointments
|
||||
*
|
||||
*
|
||||
* 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@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -58,63 +32,31 @@ include ("../functions/functions.input.php");
|
||||
*/
|
||||
include ("../functions/functions.calendar.php");
|
||||
|
||||
//Create a new blank appointment and then edit it
|
||||
if (isset($_GET['new']) && isset($_GET['case_id']))
|
||||
{
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
//First create a call attempt
|
||||
$operator_id = get_operator_id();
|
||||
|
||||
if ($operator_id == false) die();
|
||||
|
||||
//get the first respondent id for this case
|
||||
$sql = "SELECT respondent_id
|
||||
FROM respondent
|
||||
WHERE case_id = '$case_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
|
||||
//get the first contact_phone_id for this case
|
||||
$sql = "SELECT contact_phone_id
|
||||
FROM contact_phone
|
||||
WHERE case_id = '$case_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
|
||||
$sql = "INSERT INTO call_attempt (call_attempt_id,case_id,operator_id,respondent_id,start,end)
|
||||
VALUES (NULL,$case_id,$operator_id,$respondent_id,CONVERT_TZ(NOW(),'System','UTC'),CONVERT_TZ(NOW(),'System','UTC'))";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$call_attempt_id = $db->Insert_ID();
|
||||
|
||||
|
||||
$sql = "INSERT INTO `appointment`
|
||||
(appointment_id,case_id,contact_phone_id,call_attempt_id,start,end,require_operator_id,respondent_id,completed_call_id)
|
||||
VALUES (NULL,'$case_id','$contact_phone_id','$call_attempt_id',CONVERT_TZ(NOW() + INTERVAL 1 DAY,'System','UTC'),CONVERT_TZ(NOW() + INTERVAL 1 DAY,'System','UTC'),NULL,$respondent_id,NULL)";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
|
||||
$appointment_id = $db->Insert_ID();
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
$_GET['appointment_id'] = $appointment_id;
|
||||
}
|
||||
|
||||
|
||||
//update appointment
|
||||
if (isset($_GET['start']) && isset($_GET['appointment_id']))
|
||||
{
|
||||
$appointment_id = bigintval($_GET['appointment_id']);
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/jquery-ui/jquery-ui.min.css",
|
||||
"../include/timepicker/jquery-ui.min.css",
|
||||
"../include/timepicker/jquery-ui-timepicker-addon.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/timepicker/jquery-ui.min.js",
|
||||
//"../include/jquery-ui/jquery-ui.min.js",
|
||||
"../include/timepicker/jquery-ui-timepicker-addon.js",
|
||||
"../include/timepicker/jquery-ui-timepicker-ru.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
//create new or update appointment
|
||||
if (isset($_GET['start']) && isset($_GET['end']) && isset($_GET['update']))
|
||||
{
|
||||
$start = $db->qstr($_GET['start']);
|
||||
$end = $db->qstr($_GET['end']);
|
||||
$contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
@@ -122,19 +64,46 @@ if (isset($_GET['start']) && isset($_GET['appointment_id']))
|
||||
$require_operator_id = "NULL";
|
||||
if ($_GET['require_operator_id'] > 1) $require_operator_id = bigintval($_GET['require_operator_id']);
|
||||
|
||||
//Edit this appointment in the database
|
||||
$sql = "UPDATE appointment as a, respondent as r
|
||||
SET a.start = CONVERT_TZ($start,r.Time_zone_name,'UTC'), a.end = CONVERT_TZ($end,r.Time_zone_name,'UTC'), a.contact_phone_id = $contact_phone_id, a.respondent_id = $respondent_id,
|
||||
a.require_operator_id = $require_operator_id
|
||||
if ($_GET['new'] == 'create'){
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
$operator_id = get_operator_id();
|
||||
if ($operator_id == false) die();
|
||||
$sql = "SELECT Time_zone_name FROM respondent WHERE respondent_id = '$respondent_id'";
|
||||
$respondent_tz = $db->GetOne($sql);
|
||||
|
||||
// create a call attempt
|
||||
$sql = "INSERT INTO call_attempt (call_attempt_id,case_id,operator_id,respondent_id,start,end)
|
||||
VALUES (NULL,$case_id,$operator_id,$respondent_id,CONVERT_TZ(NOW(),@@session.time_zone,'UTC'),CONVERT_TZ(NOW(),@@session.time_zone,'UTC'))";
|
||||
$db->Execute($sql);
|
||||
|
||||
$call_attempt_id = $db->Insert_ID();
|
||||
|
||||
$sql = "INSERT INTO `appointment` (appointment_id,case_id,contact_phone_id,call_attempt_id,start,end,require_operator_id,respondent_id,completed_call_id)
|
||||
VALUES(NULL,$case_id,$contact_phone_id,$call_attempt_id,CONVERT_TZ($start,'$respondent_tz','UTC'),CONVERT_TZ($end,'$respondent_tz','UTC'),$require_operator_id,$respondent_id,NULL)";
|
||||
$db->Execute($sql);
|
||||
|
||||
$appointment_id = $db->Insert_ID();
|
||||
|
||||
$_GET['appointment_id'] = $appointment_id;
|
||||
$appointment_id = bigintval($_GET['appointment_id']);
|
||||
|
||||
} else {
|
||||
|
||||
$appointment_id = bigintval($_GET['appointment_id']);
|
||||
|
||||
//Edit this appointment in the database
|
||||
$sql = "UPDATE appointment as a, respondent as r
|
||||
SET a.start = CONVERT_TZ($start,r.Time_zone_name,'UTC'), a.end = CONVERT_TZ($end,r.Time_zone_name,'UTC'), a.contact_phone_id = $contact_phone_id, a.respondent_id = $respondent_id, a.require_operator_id = $require_operator_id
|
||||
WHERE a.appointment_id = $appointment_id
|
||||
AND r.respondent_id = $respondent_id";
|
||||
|
||||
$db->Execute($sql);
|
||||
$db->Execute($sql);
|
||||
}
|
||||
unset ($_GET['start'],$_GET['end'],$_GET['appointment_id'],$_GET['case_id'],$_GET['new'],$_GET['update']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($_GET['appointment_id']) && isset($_GET['case_id']))
|
||||
if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(($_GET['new'] == 'new') && isset($_GET['case_id'])))
|
||||
{
|
||||
$appointment_id = bigintval($_GET['appointment_id']);
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
@@ -143,57 +112,94 @@ if (isset($_GET['appointment_id']) && isset($_GET['case_id']))
|
||||
{
|
||||
$sql = "DELETE FROM appointment
|
||||
WHERE appointment_id = '$appointment_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
xhtml_head(T_("Now modify case outcome"));
|
||||
xhtml_head(T_("Now modify case outcome"),true,$css,$js_head);
|
||||
|
||||
print "<p>" . T_("The appointment has been deleted. Now you must modify the case outcome") . "</p>";
|
||||
print "<p><a href='supervisor.php?case_id=$case_id'>" . T_("Modify case outcome") . "</a></p>";
|
||||
print "<div class='col-sm-6'><p class='well'>" . T_("The appointment has been deleted. Now you must modify the case outcome") . "</p>
|
||||
<a href='supervisor.php?case_id=$case_id' class='btn btn-default'>" . T_("Modify case outcome") . "</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display an edit form
|
||||
$css = array("../css/timepicker.css","../include/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css");
|
||||
$js = array("../include/jquery-ui/js/jquery-1.4.2.min.js","../include/jquery-ui/js/jquery-ui-1.8.2.custom.min.js","../include/timepicker/jquery-ui-timepicker-addon.js");
|
||||
xhtml_head(T_("Edit appointment"),false,$css,$js);
|
||||
print "<script type='text/javascript'>$(document).ready(function() { $('#start').datetimepicker({timeFormat: 'hh:mm:ss', dateFormat: 'yy-mm-dd'}); $('#end').datetimepicker({timeFormat: 'hh:mm:ss', dateFormat: 'yy-mm-dd'});});</script>";
|
||||
|
||||
$sql = "SELECT a.contact_phone_id,a.call_attempt_id,CONVERT_TZ(a.start,'UTC',r.Time_zone_name) as start,CONVERT_TZ(a.end,'UTC',r.Time_zone_name) as end,a.respondent_id,a.require_operator_id
|
||||
FROM appointment as a, respondent as r
|
||||
if ($_GET['new'] == 'new'){$title = T_("Create NEW appointment");} else{$title = T_("Edit appointment"); $subtitle = "ID " . $appointment_id;}
|
||||
|
||||
xhtml_head($title,true,$css,$js_head,false,false,false,$subtitle);
|
||||
$lang = DEFAULT_LOCALE;
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM',r.Time_zone_name) as startdate, CONVERT_TZ(s.end,'UTC',r.Time_zone_name) as enddate FROM `shift` as s, `case` as c, `respondent` as r WHERE s.questionnaire_id = c.questionnaire_id AND c.case_id = $case_id AND r.case_id = c.case_id ORDER BY s.end DESC LIMIT 1";
|
||||
$rs = $db->GetRow($sql); $startdate = $rs['startdate'];$enddate = $rs['enddate'];
|
||||
|
||||
print "<script type='text/javascript'>
|
||||
$(document).ready(function() { var startDateTextBox = $('#start'); var endDateTextBox = $('#end');
|
||||
$.timepicker.datetimeRange(
|
||||
startDateTextBox,endDateTextBox,{
|
||||
minInterval: (1000*60*15), // 15min
|
||||
numberOfMonths: 2,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: 'HH:mm:ss',
|
||||
showSecond: false,
|
||||
regional: '$lang',
|
||||
hourMin: 9,
|
||||
hourMax: 21,
|
||||
stepMinute: 5,
|
||||
hourGrid: 2,
|
||||
minuteGrid: 10,
|
||||
minDate: '$startdate',
|
||||
maxDate: '$enddate',
|
||||
});});</script>";
|
||||
|
||||
if ($_GET['new'] =='new'){
|
||||
$start = $startdate;
|
||||
$end = $enddate;
|
||||
$rtz = $_GET['rtz'];
|
||||
}
|
||||
if (isset($_GET['appointment_id'])) {
|
||||
|
||||
$sql = "SELECT a.contact_phone_id,a.call_attempt_id, CONVERT_TZ(a.start,'UTC',r.Time_zone_name) as `start`, CONVERT_TZ(a.end,'UTC',r.Time_zone_name) as `end`, a.respondent_id, a.require_operator_id, r.Time_zone_name as rtz
|
||||
FROM `appointment` as a, respondent as r
|
||||
WHERE a.appointment_id = '$appointment_id'
|
||||
AND a.case_id = '$case_id'
|
||||
AND r.respondent_id = a.respondent_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
$require_operator_id = $rs['require_operator_id'];
|
||||
$start = $rs['start'];
|
||||
$end = $rs['end'];
|
||||
|
||||
print "<p><form action='?' method='get'>";
|
||||
print "<div><label for='respondent_id'>" . T_("Respondent") . "</label>";
|
||||
display_chooser($db->GetAll("SELECT respondent_id as value, firstname as description, CASE when respondent_id = '$respondent_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM respondent
|
||||
WHERE case_id = '$case_id'"),"respondent_id","respondent_id",false,false,false,false);
|
||||
if (!empty($rs)){
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
$require_operator_id = $rs['require_operator_id'];
|
||||
$start = $rs['start'];
|
||||
$end = $rs['end'];
|
||||
$rtz = $rs['rtz'];
|
||||
}
|
||||
}
|
||||
print "<form action='?' method='get' class='form-horizontal'>";
|
||||
print "<label class='pull-left text-right control-label col-sm-2' for='respondent_id'>" . T_("Respondent") . "</label>";
|
||||
|
||||
display_chooser($db->GetAll("SELECT respondent_id as value, CONCAT(firstName,' ',lastName) as description,
|
||||
CASE when respondent_id = '$respondent_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM respondent
|
||||
WHERE case_id = '$case_id'"),"respondent_id","respondent_id",false,false,false,true,false,true,"pull-left");
|
||||
|
||||
print "</div><div><label for='contact_phone_id'>" . T_("Contact phone") . "</label>";
|
||||
display_chooser($db->GetAll("SELECT contact_phone_id as value,
|
||||
phone as description,
|
||||
CASE when contact_phone_id = '$contact_phone_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
print "<br/><br/><label for='contact_phone_id' class='pull-left text-right control-label col-sm-2'>" . T_("Contact phone") . "</label>";
|
||||
display_chooser($db->GetAll("SELECT contact_phone_id as value, phone as description,
|
||||
CASE when contact_phone_id = '$contact_phone_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM contact_phone
|
||||
WHERE case_id = '$case_id'"),
|
||||
"contact_phone_id","contact_phone_id",false,false,false,false);
|
||||
|
||||
print "</div><div><label for='start'>" . T_("Start time") . "</label><input type='text' value='$start' id='start' name='start'/></div>";
|
||||
print "<div><label for='end'>" . T_("End time") . "</label><input type='text' value='$end' id='end' name='end'/></div>";
|
||||
print "<div><label for='require_operator_id'>" . T_("Appointment with") . "</label>";
|
||||
$ops = $db->GetAll(" SELECT o.operator_id as value,
|
||||
"contact_phone_id","contact_phone_id",false,false,false,true,false,true,"pull-left");
|
||||
|
||||
print "<div class='clearfix'></div></br><div class='alert alert-info col-sm-6 '>". T_("ATTENTION! Keep in mind that you're setting 'Start' & 'End' appoinment times in RESPONDENT LOCAL TIME !!!") . "</div><div class='clearfix'></div>";
|
||||
date_default_timezone_set($rtz);
|
||||
print "<label class='text-right col-sm-2 control-label'>" . T_("Respondent TimeZone") . ":</label>
|
||||
<h4 class='col-sm-2 text-danger text-uppercase fa-lg'>" . $rtz . "</h4>
|
||||
<label class=''>" . T_("Respondent Time") . ": <b class='fa fa-2x '>" . date("H:i:s") . "</b></label>";
|
||||
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='start'>" . T_("Start time") . "</label>
|
||||
<div class='pull-left'><input class='form-control' type='text' value='$start' id='start' name='start'/></div>";
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='end'>" . T_("End time") . "</label>
|
||||
<div class='pull-left'><input class='form-control' type='text' value='$end' id='end' name='end'/></div>";
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='require_operator_id'>" . T_("Appointment with") . "</label>";
|
||||
$ops = $db->GetAll("SELECT o.operator_id as value,
|
||||
CONCAT(o.firstName, ' ', o.lastName) as description,
|
||||
CASE WHEN o.operator_id = '$require_operator_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM operator as o");
|
||||
@@ -207,45 +213,67 @@ if (isset($_GET['appointment_id']) && isset($_GET['case_id']))
|
||||
}
|
||||
}
|
||||
array_unshift($ops,array('value'=>0,'description'=>T_("Any operator"),'selected'=>$selected));
|
||||
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,false);
|
||||
print "<input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/>";
|
||||
print "<div><input type='submit' value=\"" . T_("Edit appointment") . "\"/></div>";
|
||||
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,true,false,true,"pull-left");
|
||||
print "<input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/><input type='hidden' value='update' id='update' name='update'/>";
|
||||
|
||||
if ($_GET['new'] == 'new') { print "<input type='hidden' value='create' id='new' name='new'/><input type='hidden' value='$case_id' id='case_id' name='case_id'/>";}
|
||||
|
||||
print "</form></p>";
|
||||
print "<p><a href='?'>" . T_("Cancel edit") . "</a></p>";
|
||||
print "<p><a href='?delete=delete&appointment_id=$appointment_id&case_id=$case_id'>" . T_("Delete this appointment") . "</a></p>";
|
||||
}
|
||||
print "<div class='clearfix'></div><br/><br/>
|
||||
<div class='col-sm-2'><a href='' onclick='history.back();return false;' class='btn btn-default pull-left'><i class='fa fa-ban fa-lg'></i> " . T_("Cancel edit") . "</a></div>";
|
||||
|
||||
print "<div class='col-sm-2'><button type='submit' class='btn btn-primary btn-block'><i class='fa fa-floppy-o fa-lg'></i> " . T_("Save changes") . "</button></div>";
|
||||
|
||||
print "<div class='col-sm-2'><a href='' class='btn btn-default pull-right' toggle='confirmation' data-placement='left' data-href='?delete=delete&appointment_id=$appointment_id&case_id=$case_id' ><i class='fa fa-trash fa-lg text-danger'></i> " . T_("Delete this appointment") . "</a></div>";
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
else {
|
||||
$operator_id = get_operator_id();
|
||||
$subtitle = T_("Appointments");
|
||||
xhtml_head(T_("Display Appointments"),true,$css,$js_head,false,30); //array("../css/table.css")
|
||||
print "<h3>" . T_("All appointments (with times displayed in your time zone)") . "</h3>";
|
||||
|
||||
xhtml_head(T_("Display Appointments"),true,array("../css/table.css"));
|
||||
|
||||
print "<h1>" . T_("Appointments") . "</h1><h2>" . T_("All appointments (with times displayed in your time zone)") . "</h2>";
|
||||
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, IFNULL(ou.description,'" . TQ_("Not yet called") . "') as outcome, oo.firstName as makerName, ooo.firstName as callerName, CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id, CONCAT('<a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". TQ_("Delete") . "</a>') as link, CONCAT('<a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". TQ_("Edit") . "</a>') as edit,IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho
|
||||
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as o, operator as oo, call_attempt as cc) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and o.operator_id = '$operator_id' and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
||||
LEFT JOIN operator AS ao ON ao.operator_id = a.require_operator_id
|
||||
WHERE a.end >= CONVERT_TZ(NOW(),'System','UTC')
|
||||
ORDER BY a.start ASC";
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end,CONCAT(r.firstName, ' ', r.lastName) as resp, IFNULL(ou.description,'" . TQ_("Not yet called") . "') as outcome, oo.firstName as makerName, ooo.firstName as callerName,
|
||||
CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
CONCAT(' <a href=\'\'><i class=\'fa fa-trash-o fa-lg text-danger\' toggle=\'confirmation\' data-placement=\'left\' data-href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\' ></i></a> ') as link,
|
||||
CONCAT(' <a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'><i class=\'fa fa-pencil-square-o fa-lg\' ></i></a> ') as edit,IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
||||
LEFT JOIN operator AS ao ON ao.operator_id = a.require_operator_id
|
||||
WHERE a.end >= CONVERT_TZ(NOW(),'System','UTC') AND c.current_outcome_id !=10
|
||||
ORDER BY a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
if (!empty($rs)) {
|
||||
translate_array($rs,array("outcome"));
|
||||
xhtml_table($rs,array("description","case_id","start","end","makerName","witho","firstName","lastName","outcome","callerName","link","edit"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End"),T_("Operator Name"),T_("Appointment with"),T_("Respondent Name"),T_("Surname"),T_("Current outcome"),T_("Operator who called"),T_("Delete"),T_("Edit")));
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No appointments in the future") . "</p>";
|
||||
xhtml_table($rs,array("description","case_id","start","end","edit","makerName","witho","resp","outcome","callerName","link"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Created by"),T_("Appointment with"),T_("Respondent"),T_("Current outcome"),T_("Operator who called")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
|
||||
} else print "<h4 class='well text-info'>" . T_("No future appointments") . "</h4>";
|
||||
|
||||
print "<h3 style='color:red'>" . T_("Missed appointments (with times displayed in your time zone)") . "</h3>";
|
||||
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end, CONCAT(r.firstName, ' ', r.lastName) as resp,
|
||||
CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
CONCAT(' <a href=\'\'><i class=\'fa fa-trash-o fa-lg text-danger\' toggle=\'confirmation\' data-placement=\'left\' data-href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\' ></i></a> ') as link,
|
||||
CONCAT(' <a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'><i class=\'fa fa-pencil-square-o fa-lg\' ></i></a> ') as edit
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, `sample` as s, sample_import as si) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and s.sample_id = c.sample_id and s.import_id= si.sample_import_id)
|
||||
LEFT JOIN (`call` as ca) ON (ca.call_id = a.completed_call_id)
|
||||
WHERE q.enabled=1 AND si.enabled = 1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id !=10
|
||||
GROUP BY c.case_id
|
||||
ORDER BY a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
if (!empty($rs)) {
|
||||
xhtml_table($rs,array("description","case_id","start","end","edit","resp","link"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Respondent")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
|
||||
} else print "<h4 class='well text-info'>" . T_("No appointments missed") . "</h4>";
|
||||
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('[toggle="confirmation"]').confirmation()
|
||||
</script>
|
||||
|
||||
@@ -130,40 +130,96 @@ if (isset($_GET['unassign']))
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Display extension status"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Extensions & status"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//Password generator
|
||||
upp = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
|
||||
low = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
|
||||
dig = new Array('0','1','2','3','4','5','6','7','8','9');
|
||||
//sym = new Array('~','!','@','#','$','%','^','&','*','(',')','_','+','=','|',';','.','/','?','<','>','{','}','[',']');
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function rnd(x,y,z) {
|
||||
var num;
|
||||
do {
|
||||
num = parseInt(Math.random()*z);
|
||||
if (num >= x && num <= y) break;
|
||||
} while (true);
|
||||
return(num);
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function generate() {
|
||||
var pwd = '';
|
||||
var res, s;
|
||||
var k = 0;
|
||||
var n = document.editext.number.value;
|
||||
var pass = new Array();
|
||||
var w = rnd(30,80,100);
|
||||
for (var r = 0; r < w; r++) {
|
||||
res = rnd(1,25,100); pass[k] = upp[res]; k++;
|
||||
res = rnd(1,25,100); pass[k] = low[res]; k++;
|
||||
res = rnd(1,9,100); pass[k] = dig[res]; k++;
|
||||
//res = rnd(1,24,100); pass[k] = sym[res]; k++;
|
||||
}
|
||||
for (var i = 0; i < n; i++) {
|
||||
s = rnd(1,k-1,100);
|
||||
pwd+= pass[s];
|
||||
}
|
||||
document.editext.password.value = pwd;
|
||||
}
|
||||
</script>
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
<?php
|
||||
|
||||
if (isset($_GET['edit']) || isset($_GET['addext']))
|
||||
{
|
||||
$sql = "SELECT extension,password,current_operator_id
|
||||
if (isset($_GET['edit'])){
|
||||
|
||||
$sql = "SELECT extension,password,current_operator_id
|
||||
FROM extension
|
||||
WHERE extension_id = " . intval($_GET['edit']);
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
print "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
$rs = $db->GetRow($sql);
|
||||
}
|
||||
|
||||
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
|
||||
?>
|
||||
<form enctype="multipart/form-data" action="?" method="post">
|
||||
<p><?php echo T_("Extension name (such as SIP/1000):"); ?> <input name="extension" type="text" value="<?php echo $rs['extension'];?>"/></p>
|
||||
<p><?php echo T_("Extension password:"); ?> <input name="password" type="text" value="<?php echo $rs['password'];?>"/></p>
|
||||
<input name="extensionid" type="hidden" value="<?php echo intval($_GET['edit']);?>"/></p>
|
||||
<p><input type="submit" value="<?php echo T_("Edit extension"); ?>" /></p>
|
||||
<?php
|
||||
if (empty($rs['current_operator_id']))
|
||||
{
|
||||
?>
|
||||
<br/>
|
||||
<p><input type="submit" name="delete" value="<?php echo T_("Delete extension"); ?>" /></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("Unassign the operator from this extension to be able to delete it") . "</p>";
|
||||
<div class="panel-body ">
|
||||
<h3 class="col-sm-offset-3"><?php if (isset($_GET['edit']))echo T_("Edit extension"); else echo T_("Add an extension");?></h3>
|
||||
<form enctype="multipart/form-data" action="?" method="post" name="editext" class="form-horizontal">
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Extension name: ");?></label>
|
||||
<input name="extension" type="text" placeholder="<?php echo T_("such as SIP/1000");?>" maxlength="12" required value="<?php echo $rs['extension'];?>" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Extension password: ");?></label>
|
||||
<input name="password" type="text" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" style="width:20em;" maxlength="50" value="<?php echo $rs['password'];?>" class="form-control pull-left" placeholder="<?php echo T_("Enter New Password");?>"/>  <?php echo T_(" or ");?> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("New password");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters long");?>
|
||||
</div>
|
||||
|
||||
<div class=" col-sm-offset-3 ">
|
||||
<input type="submit" class="btn btn-primary " value="<?php if (isset($_GET['edit'])) echo T_("Save changes"); else echo T_("Add extension"); ?>" />
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['edit'])){?>
|
||||
|
||||
<input name="extensionid" type="hidden" value="<?php echo intval($_GET['edit']);?>"/>
|
||||
|
||||
<?php if (empty($rs['current_operator_id'])) { ?>
|
||||
|
||||
<input type="submit" name="delete" class="btn btn-danger " data-toggle="confirmation" value="<?php echo T_("Delete extension"); ?>" />
|
||||
|
||||
<?php } else
|
||||
print "</br></br><b class='well text-danger'>" . T_("Unassign the operator from this extension to be able to delete it") . "</b>";
|
||||
}
|
||||
|
||||
print "</form></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql= "SELECT CONCAT('<a href=\'operatorlist.php?edit=',o.operator_id,'\'>',o.firstName,'</a>') as firstName,
|
||||
CONCAT('<a href=\'?edit=',e.extension_id,'\'>',e.extension,'</a>') as extension,
|
||||
$sql= "SELECT CONCAT('<a href=\'operatorlist.php?edit=',o.operator_id,'\'>',o.firstName,' ', o.lastname,'</a>') as firstName,
|
||||
CONCAT('<a href=\'?edit=',e.extension_id,'\' class=\'\'>',e.extension,'</a>') as extension,
|
||||
IF(c.case_id IS NULL,IF(e.current_operator_id IS NULL,'list'
|
||||
,CONCAT('<a href=\'?unassign=',e.extension_id,'\'>". TQ_("Unassign") ."</a>')),'". TQ_("End case to change assignment")."') as assignment,
|
||||
CASE e.status WHEN 0 THEN '" . TQ_("VoIP Offline") . "' ELSE '" . TQ_("VoIP Online") . "' END as status,
|
||||
@@ -197,21 +253,15 @@ else
|
||||
if ($rs[$i]['assignment'] == "list")
|
||||
$rs[$i]['assignment'] = display_chooser($ers,"operator_id_" . $rs[$i]["extension_id"],"operator_id_" . $rs[$i]["extension_id"],true,"extension_id=".$rs[$i]["extension_id"],true,false,false,false);
|
||||
}
|
||||
print "<div class='panel-body'>";
|
||||
xhtml_table($rs,array("extension","firstName","assignment","status","case_id","state","calltime"),array(T_("Extension"),T_("Operator"),T_("Assignment"),T_("VoIP Status"),T_("Case ID"),T_("Call state"),T_("Time on call")),"tclass",array("vs" => "1"));
|
||||
print "</div>";
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No extensions") . "</p>";
|
||||
|
||||
print "<h2>" . T_("Add an extension") . "</h2>";
|
||||
?>
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><?php echo T_("Extension name (such as SIP/1000):"); ?> <input name="extension" type="text"/></p>
|
||||
<p><?php echo T_("Extension password:"); ?> <input name="password" type="text"/></p>
|
||||
<p><input type="submit" value="<?php echo T_("Add extension"); ?>" /></p>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
print "<div class='col-sm-3'><a href='?addext=addext' class='btn btn-default '>" . T_("Add extension") . "</a></div>";
|
||||
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
136
admin/import.php
136
admin/import.php
@@ -1,32 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Import a sample from a Headered CSV file
|
||||
*
|
||||
*
|
||||
* 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@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -44,11 +18,30 @@ include ("../functions/functions.xhtml.php");
|
||||
*/
|
||||
include("../functions/functions.import.php");
|
||||
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/bootstrap-filestyle.min.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
if (isset($_POST['import_form']))
|
||||
{
|
||||
//form has been submitted
|
||||
xhtml_head(T_("Import: Validating and uploading"));
|
||||
$subtitle = T_("Validating and uploading");
|
||||
xhtml_head(T_("Import sample") . ":",true,$css,$js_head,false,false,false,$subtitle);
|
||||
echo "<a href='?' class='btn btn-default pull-left' ><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a>";
|
||||
|
||||
|
||||
//verify each GET field is unique (except import_form)
|
||||
$sfields = array();
|
||||
@@ -64,66 +57,99 @@ if (isset($_POST['import_form']))
|
||||
{ //verified so upload
|
||||
if (import_file($_POST['filename'],$description,$sfields))
|
||||
{
|
||||
print "<p>" . T_("Successfully imported file") . "</p>";
|
||||
print "<div class='well text-primary col-md-offset-2'><p>" . T_("Successfully imported sample") . " <h3>$description</h3></p></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<p>" . T_("Error importing file. Please try again") . "</p>";
|
||||
print -"<div class='alert alert-danger col-md-offset-2'><p>" . T_("Error importing file. Please try again") . "</p></div>";
|
||||
}
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("Error:") . " $error </p><p>" . T_("Please go back in your browser and fix the problem") . "</p>";
|
||||
print "<div class='alert alert-danger col-md-offset-2'><p>" . T_("Error:") . " $error </p><p>" . T_("Please check imported file, go back in your browser and fix the problem") . "</p></div>";
|
||||
|
||||
//verifiy that exactly one primary phone number is selected
|
||||
//upload to database
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
|
||||
}
|
||||
else if (isset($_POST['import_file']))
|
||||
{
|
||||
//file has been submitted
|
||||
$subtitle = T_("Select columns to import");
|
||||
xhtml_head(T_("Import sample") . ":",true,$css,$js_head,false,false,false,$subtitle);
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a>";
|
||||
|
||||
xhtml_head(T_("Import: Select columns to import"));
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<?php
|
||||
|
||||
print "<form action='' method='post' class='col-md-10 form-group col-md-offset-1'>";
|
||||
|
||||
$tmpfname = tempnam(TEMPORARY_DIRECTORY, "FOO");
|
||||
move_uploaded_file($_FILES['file']['tmp_name'],$tmpfname);
|
||||
|
||||
display_table(get_first_row($tmpfname));
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<p><input type="hidden" name="description" value="<?php if (isset($_POST['description'])) print($_POST['description']); ?>"/></p>
|
||||
<p><input type="hidden" name="filename" value="<?php echo $tmpfname; ?>"/></p>
|
||||
<p><input type="submit" name="import_form"/></p>
|
||||
<input type="hidden" name="description" value="<?php if (isset($_POST['description'])) print($_POST['description']); ?>"/>
|
||||
<input type="hidden" name="filename" value="<?php echo $tmpfname; ?>"/>
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label" for="submit"></label>
|
||||
<div class="col-md-4">
|
||||
<button id="submit" type="submit" name="import_form" class="btn btn-primary"><i class="fa fa-plus-square-o fa-lg"></i> <?php echo T_("Add sample"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
<?php
|
||||
xhtml_foot($js_foot);
|
||||
}
|
||||
else
|
||||
{
|
||||
//need to supply file to upload
|
||||
xhtml_head(T_("Import: Select file to upload"));
|
||||
$subtitle = T_("Select file to upload");
|
||||
xhtml_head(T_("Import sample") .":",true,$css,$js_head,false,false,false,$subtitle);
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default'><i class='fa fa-chevron-left fa-lg text-primary'></i> " . T_("Go back") . "</a>";
|
||||
|
||||
$ua = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (preg_match('/Firefox/i', $ua)) $csv= "text/csv"; else $csv= ".csv";
|
||||
//print "ua=" . $_SERVER['HTTP_USER_AGENT'];
|
||||
?>
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><input type="hidden" name="MAX_FILE_SIZE" value="1000000000" /></p>
|
||||
<p><?php echo T_("Choose the CSV sample file to upload:"); ?><input name="file" type="file" /></p>
|
||||
<p><?php echo T_("Description for file:"); ?><input name="description" type="text" /></p>
|
||||
<p><input type="submit" name="import_file" value="<?php echo T_("Add sample"); ?>"/></p>
|
||||
<form class="form-horizontal col-sm-12 " enctype="multipart/form-data" action="" method="post">
|
||||
<fieldset>
|
||||
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
|
||||
|
||||
<!-- File Button -->
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-md-4 control-label" for="file"><?php echo T_("Choose the CSV sample file to upload"); ?>:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="file" name="file" class="filestyle" required data-buttonBefore="true" data-iconName="fa fa-folder-open fa-lg text-primary " data-buttonText="<?php echo T_("Select file"); ?>..." type="file" accept="<?php echo $csv; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label" for="description"><?php echo T_("Sample description"); ?>:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="description" name="description" type="text" required placeholder="<?php echo T_("Enter new sample name..."); ?>" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label" for="submit"></label>
|
||||
<div class="col-md-4">
|
||||
<button id="submit" type="submit" name="import_file" class="btn btn-primary"><i class="fa fa-plus-square-o fa-lg"></i> <?php echo T_("Add sample"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
<?php
|
||||
xhtml_foot($js_foot);
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
235
admin/index.php
235
admin/index.php
@@ -1,4 +1,6 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/*
|
||||
|
||||
* Display an index of Admin tools
|
||||
*
|
||||
*
|
||||
@@ -25,7 +27,6 @@
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -36,96 +37,162 @@ include ("../lang.inc.php");
|
||||
/**
|
||||
* Config file
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
include ("../config.inc.php");
|
||||
include ("../functions/functions.xhtml.php");
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" style="" class=" " >
|
||||
<head>
|
||||
<meta charset="utf-8" >
|
||||
<title><?php echo T_("Administrative Tools") ;?> </title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
<link rel="stylesheet" href="../include/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="../include/font-awesome/css/font-awesome.css" />
|
||||
<link rel="stylesheet" href="../css/style.css" />
|
||||
|
||||
xhtml_head(T_("Administrative Tools"),true,array("../css/table.css","../css/admin.css","../css/timepicker.css"));
|
||||
</head>
|
||||
<body>
|
||||
|
||||
print "<div id='menu'><ul class='navmenu'>";
|
||||
<div class="page-header-fixed navbar navbar-fixed-top " role="banner">
|
||||
<div class="container" style=" width: auto; padding-left: 1px;">
|
||||
<div class="navbar-header">
|
||||
<a class="pull-left menubutton " href="#" style="width: 50px; padding-left: 10px;" data-toggle="tooltip" data-placement="right" title="<?php echo T_("Click to Collapse / Expand Sidebar MENU ");?>">
|
||||
<i class="fa fa-globe fa-2x"></i></a>
|
||||
<a class="navbar-brand" href="index.php"><?php echo COMPANY_NAME ;?> <span class="bold"><?php echo ADMIN_PANEL_NAME ;?></span></a>
|
||||
</div >
|
||||
|
||||
print "<li><h3>" . T_("Questionnaire creation and management") . "</h3>";
|
||||
print "<ul><li><a href='?page=" . LIME_URL ."admin/admin.php?action=newsurvey'>" . T_("Create an instrument in Limesurvey") . "</a></li>";
|
||||
print "<li><a href=\"?page=new.php\">" . T_("Create a new questionnaire") . "</a></li>";
|
||||
print "<li><a href=\"?page=questionnairelist.php\">" . T_("Questionnaire management") . "</a></li>";
|
||||
print "<li><a href=\"?page=" . LIME_URL . "admin/admin.php\">" . T_("Administer instruments with Limesurvey") . "</a></li></ul></li>";
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown pull-right user-data">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" min-width: 160px;">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
print "<li><h3>" . T_("Sample/List management") . "</h3><ul>";
|
||||
print "<li><a href=\"?page=import.php\">" . T_("Import a sample file (in CSV form)") . "</a></li>";
|
||||
print "<li><a href=\"?page=samplelist.php\">" . T_("Sample management") . "</a></li>";
|
||||
print "<li><a href=\"?page=assignsample.php\">" . T_("Assign samples to questionnaires") . "</a></li>";
|
||||
print "<li><a href=\"?page=questionnaireprefill.php\">" . T_("Set values in questionnaire to pre fill") . "</a></li></ul></li>";
|
||||
<div class="content ">
|
||||
|
||||
print "<li><h3>" . T_("Quota management") . "</h3><ul>";
|
||||
print "<li><a href=\"?page=quota.php\">" . T_("Quota management") . "</a></li>";
|
||||
print "<li><a href=\"?page=quotarow.php\">" . T_("Quota row management") . "</a></li></ul></li>";
|
||||
<!-- Sidebar menu -->
|
||||
<div class="sidebar" >
|
||||
<ul class="panel-group nav" id="nav">
|
||||
<li><a class="" href="?page=dashboard.php"><i class="fa fa-tachometer fa-lg"></i><span><?php print T_("Dashboard") ;?></span></a></li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-list-alt fa-lg"></i><span class="arrow"><?php print T_("Questionnairies") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-file-text-o lime fa-fw"></i><?php print T_("Create an instrument in Limesurvey") ;?></a></li>
|
||||
<li><a href="?page=new.php"><i class="fa fa-plus-circle fa-fw"></i><?php print T_("Create a new questionnaire") ;?></a></li>
|
||||
<li><a href="?page=questionnairelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Questionnaire management") ;?></a></li>
|
||||
<li><a href="?page=<?php echo LIME_URL ;?>admin/admin.php"><i class="fa fa-lemon-o lime fa-fw"></i><?php print T_("Administer instruments with Limesurvey") ;?></a></li>
|
||||
<li><a href="?page=questionnaireprefill.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Pre-fill questionnaire") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-book fa-lg"></i><span><?php print T_("Samples") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=import.php"><i class="fa fa-upload fa-fw"></i><?php print T_("Import a sample file") ;?></a></li>
|
||||
<li><a href="?page=samplelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Sample management") ;?></a></li>
|
||||
<li><a href="?page=samplesearch.php"><i class="fa fa-search fa-fw"></i><?php print T_("Search the sample") ;?></a></li>
|
||||
<li><a href="?page=assignsample.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign samples to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-calendar fa-lg"></i><span><?php print T_("Time slots and shifts") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=assigntimeslots.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign Time slots") ;?></a></li>
|
||||
<!-- <li><a href="?page=questionnaireavailability.php"><i class="fa fa-thumb-tack fa-fw"></i><?php // print T_("Assign Time slots to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslots.php"><i class="fa fa-link fa-fw"></i><?php // print T_("Assign call attempt time slots to questionnaire") ; ?></a></li>
|
||||
<li><a href="?page=questionnairecatimeslotssample.php"><i class="fa fa-link fa-fw"></i><?php // print T_("Assign call attempt time slots to questionnaire sample") ; ?></a></li> -->
|
||||
<li><a href="?page=addshift.php"><i class="fa fa-calendar-o fa-fw"></i><?php print T_("Shift management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-filter fa-lg"></i><span><?php print T_("Quotas") ;?></span></a>
|
||||
<ul style="">
|
||||
<li><a href="?page=quota.php"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Quota management") ;?></a></li>
|
||||
<li><a href="?page=quotarow.php"><i class="fa fa-list-ul fa-fw "></i><?php print T_("Quota row management") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-users"></i><span><?php print T_("Operators") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=operators.php"><i class="fa fa-user-plus fa-fw"></i><?php print T_("Add operators to the system") ;?></a></li>
|
||||
<li><a href="?page=operatorlist.php"><i class="fa fa-user fa-fw"></i><?php print T_("Operator management") ;?></a></li>
|
||||
<li><a href="?page=extensionstatus.php "><i class="fa fa-phone fa-fw"></i><?php print T_("Extension status") ;?></a></li>
|
||||
<li><a href="?page=operatorquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign operators to questionnaires") ;?></a></li>
|
||||
<li><a href="?page=operatorskill.php"><i class="fa fa-user-md fa-fw"></i><?php print T_("Modify operator skills") ;?></a></li>
|
||||
<li><a href="?page=operatorperformance.php"><i class="fa fa-signal fa-fw"></i><?php print T_("Operator performance") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-line-chart"></i><span><?php print T_("Results") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=displayappointments.php"><i class="fa fa-clock-o fa-fw"></i><span><?php print T_("Display all future appointments") ;?></span></a></li>
|
||||
<li><a href="?page=samplecallattempts.php"><i class="fa fa-table fa-fw"></i><?php print T_("Sample call attempts report") ;?></a></li>
|
||||
<li><a href="?page=callhistory.php" class=""><i class="fa fa-history fa-fw"></i><?php print T_("Call history") ;?></a></li>
|
||||
<li><a href="?page=shiftreport.php"><i class="fa fa-th-large fa-fw"></i><?php print T_("Shift reports") ;?></a></li>
|
||||
<li><a href="?page=quotareport.php" ><i class="fa fa-filter fa-fw"></i><?php print T_("Quota report") ;?></a></li>
|
||||
<li><a href="?page=outcomes.php"><i class="fa fa-bar-chart fa-fw"></i><?php print T_("Questionnaire outcomes") ;?></a></li>
|
||||
<li><a href="?page=dataoutput.php"><i class="fa fa-download fa-fw"></i><?php print T_("Data output") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-user-secret fa-fw"></i><span><?php print T_("Clients") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=clients.php"><i class="fa fa-lg fa-user-plus fa-fw"></i><?php print T_("Add clients to the system") ;?></a></li>
|
||||
<li><a href="?page=clientquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign clients to questionnaires") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-briefcase"></i><span><?php print T_("Supervisor functions") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=supervisor.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign outcomes to cases") ;?></a></li>
|
||||
<li><a href="?page=casestatus.php"><i class="fa fa-question-circle fa-fw"></i><?php print T_("Case status and assignment") ;?></a></li>
|
||||
<li><a href="?page=bulkappointment.php"><i class="fa fa-th-list fa-fw"></i><?php print T_("Bulk appointment generator") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-gear"></i><span><?php print T_("System settings") ;?></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=timezonetemplate.php"><i class="fa fa-globe fa-fw"></i><?php print T_("Set default timezone list") ;?></a></li>
|
||||
<li><a href="?page=availabilitygroup.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Manage Time slots") ;?></a></li>
|
||||
<li><a href="?page=shifttemplate.php"><i class="fa fa-calendar fa-fw"></i><?php print T_("Set default shift times") ;?></a></li>
|
||||
<li><a href="?page=callrestrict.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Set call restriction times") ;?></a></li>
|
||||
<li><a href="?page=centreinfo.php"><i class="fa fa-university fa-fw"></i><?php print T_("Set centre information") ;?></a></li>
|
||||
<li><a href="?page=supervisorchat.php"><i class="fa fa-comments-o fa-fw"></i><?php print T_("Supervisor chat") ;?></a></li>
|
||||
<li><a href="?page=systemsort.php"><i class="fa fa-sort fa-fw"></i><?php print T_("System wide case sorting") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
print "<li><h3>" . T_("Operator management") . "</h3><ul>";
|
||||
print "<li><a href=\"?page=operators.php\">" . T_("Add operators to the system") . "</a></li>";
|
||||
print "<li><a href=\"?page=operatorlist.php\">" . T_("Operator management") . "</a></li>";
|
||||
print "<li><a href=\"?page=operatorquestionnaire.php\">" . T_("Assign operators to questionnaires") . "</a></li>";
|
||||
print "<li><a href=\"?page=operatorskill.php\">" . T_("Modify operator skills") . "</a></li></ul></li>";
|
||||
<?php
|
||||
if (VOIP_ENABLED == true )
|
||||
{ ; ?>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP");?><i class="fa fa-toggle-on pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a>
|
||||
<ul class="" style="">
|
||||
<li><a href="?page=voipmonitor.php"><i class="fa fa-power-off v"></i><?php print T_("Start and monitor VoIP") ;?></a></li>
|
||||
<!-- <li><a href="?page=extensionstatus.php"><i class="fa fa-asterisk fa-fw"></i><?php //print T_("Extension status") ;?></a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php } else {; ?>
|
||||
<li class=""><a href="" class=""><i class="fa fa-lg fa-tty"></i><span><?php print T_("VoIP") . " " . T_("Disabled") ;?><i class="fa fa-toggle-off pull-right" style="font-size:1.5em !important; margin-right:20px;"></i></span></a></li>
|
||||
<?php }; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
print "<li><h3>" . T_("Availability and shift management") . "</h3><ul>";
|
||||
print "<li><a href=\"?page=availabilitygroup.php\">" . T_("Manage time slots") . "</a></li>";
|
||||
print "<li><a href=\"?page=questionnaireavailability.php\">" . T_("Assign availabilities to questionnaires") . "</a></li>";
|
||||
print "<li><a href=\"?page=questionnairecatimeslots.php\">" . T_("Assign call attempt time slots to questionnaire") . "</a></li>";
|
||||
print "<li><a href=\"?page=questionnairecatimeslotssample.php\">" . T_("Assign call attempt time slots to questionnaire sample") . "</a></li>";
|
||||
print "<li><a href=\"?page=addshift.php\">" . T_("Shift management (add/remove)") . "</a></li></ul></li>";
|
||||
<!-- Main page container -->
|
||||
<?php $page = "questionnairelist.php"; if (isset($_GET['page'])) $page = $_GET['page']; ?>
|
||||
<div class="mainbar" id=" "><?php xhtml_object($page,' '); ?></div>
|
||||
|
||||
print "<li><h3>" . T_("Questionnaire progress") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=displayappointments.php\">" . T_("Display all future appointments") . "</a></li>";
|
||||
print "<li><a href=\"?page=samplecallattempts.php\">" . T_("Sample call attempts report") . "</a></li>";
|
||||
print "<li><a href=\"?page=quotareport.php\">" . T_("Quota report") . "</a></li>";
|
||||
print "<li><a href=\"?page=outcomes.php\">" . T_("Questionnaire outcomes") . "</a></li>";
|
||||
print "<li><a href=\"?page=dataoutput.php\">" . T_("Data output") . "</a></li></ul></li>";
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
print "<li><h3>" . T_("Performance") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=operatorperformance.php\">" . T_("Operator performance") . "</a></li></ul></li>";
|
||||
<script src="../include/jquery/jquery.min.js"></script>
|
||||
<script src="../include/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../js/admin.js"></script>
|
||||
|
||||
print "<li><h3>" . T_("Client management") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=clients.php\">" . T_("Add clients to the system") . "</a></li>";
|
||||
print "<li><a href=\"?page=clientquestionnaire.php\">" . T_("Assign clients to questionnaires") . "</a></li></ul></li>";
|
||||
|
||||
print "<li><h3>" . T_("Supervisor functions") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=supervisor.php\">" . T_("Assign outcomes to cases") . "</a></li>";
|
||||
print "<li><a href=\"?page=samplesearch.php\">" . T_("Search the sample") . "</a></li>";
|
||||
print "<li><a href=\"?page=callhistory.php\">" . T_("Call history") . "</a></li>";
|
||||
print "<li><a href=\"?page=shiftreport.php\">" . T_("Shift reports") . "</a></li>";
|
||||
print "<li><a href=\"?page=casestatus.php\">" . T_("Case status and assignment") . "</a></li>";
|
||||
print "<li><a href=\"?page=bulkappointment.php\">" . T_("Bulk appointment generator") . "</a></li></ul></li>";
|
||||
|
||||
print "<li><h3>" . T_("System settings") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=timezonetemplate.php\">" . T_("Set default timezone list") . "</a></li>";
|
||||
print "<li><a href=\"?page=shifttemplate.php\">" . T_("Set default shift times") . "</a></li>";
|
||||
print "<li><a href=\"?page=callrestrict.php\">" . T_("Set call restriction times") . "</a></li>";
|
||||
print "<li><a href=\"?page=centreinfo.php\">" . T_("Set centre information") . "</a></li>";
|
||||
print "<li><a href=\"?page=supervisorchat.php\">" . T_("Supervisor chat") . "</a></li>";
|
||||
print "<li><a href=\"?page=systemsort.php\">" . T_("Start and monitor system wide case sorting") . "</a></li></ul></li>";
|
||||
|
||||
if (VOIP_ENABLED)
|
||||
{
|
||||
print "<li><h3>" . T_("VoIP") . "</h3>";
|
||||
print "<ul><li><a href=\"?page=voipmonitor.php\">" . T_("Start and monitor VoIP") . "</a></li>";
|
||||
print "<li><a href=\"?page=operatorlist.php\">" . T_("Operator management") . "</a></li>";
|
||||
print "<li><a href=\"?page=extensionstatus.php\">" . T_("Extension status") . "</a></li></ul></li>";
|
||||
}
|
||||
|
||||
print "</ul></div>";
|
||||
|
||||
$page = "new.php";
|
||||
|
||||
if (isset($_GET['page']))
|
||||
$page = $_GET['page'];
|
||||
|
||||
print "<div id='main'>";
|
||||
xhtml_object($page,"mainobj");
|
||||
print "</div>";
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
387
admin/new.php
387
admin/new.php
@@ -1,33 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* Create a queXS questionnaire and link it to a LimeSurvey questionnaire
|
||||
*
|
||||
*
|
||||
* 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@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
@@ -49,20 +21,29 @@ include ("../functions/functions.xhtml.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
/**
|
||||
* CKEditor
|
||||
*/
|
||||
include("../include/ckeditor/ckeditor.php");
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/new.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
global $db;
|
||||
|
||||
global $db;
|
||||
|
||||
xhtml_head(T_("New: Create new questionnaire"),true,false,array("../js/new.js"));
|
||||
xhtml_head(T_("Create a new questionnaire"),true,$css,$js_head);
|
||||
|
||||
if (isset($_POST['import_file']))
|
||||
{
|
||||
//file has been submitted
|
||||
global $db;
|
||||
|
||||
//file has been submitted
|
||||
$ras =0;
|
||||
$rws = 0;
|
||||
$testing = 0;
|
||||
@@ -115,61 +96,189 @@ if (isset($_POST['import_file']))
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
print "<p>" . T_("Successfully inserted") . " $name " . T_("as questionnaire") . " $qid, " . T_("linked to") . " $lime_sid</p>";
|
||||
}else
|
||||
{
|
||||
print "<p>" . T_("Error: Failed to insert questionnaire") . "</p>";
|
||||
$cl = info;
|
||||
$message = T_("Successfully inserted") . " " . T_("with ID") . "  $qid, </h4><h4>" . T_("linked to survey") . "  $lime_sid ";
|
||||
|
||||
}
|
||||
else{
|
||||
$cl = danger;
|
||||
$message = T_("Error: Failed to insert questionnaire");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<script type="text/javascript" >
|
||||
$(function() {
|
||||
$('#modal-confirm').modal('show');
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$_POST['import_file'] = false;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Modal window confirmation start -->
|
||||
<div class="modal fade " id="modal-confirm">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header" style="border-bottom:none;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-header"><?php echo T_("Questionnaire");?>  <strong class="text-<?php echo $cl;?>"> <?php echo $name; ?></strong></h4>
|
||||
</div>
|
||||
<div class="modal-body ">
|
||||
<div class="alert alert-<?php echo $cl;?> text-center" role="alert">
|
||||
<h4> <?php print $message ;?></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="borfer-top:none">
|
||||
<button class="btn btn-default pull-left" data-dismiss="modal" style="width: 250px;" ><i class="fa fa-check fa-2x pull-right text-<?php echo $cl;?>"></i> <?php echo T_("Create another ?");?><br><?php echo T_("Questionnaire");?></button>  
|
||||
<a href="questionnairelist.php" class="btn btn-default pull-right" style="width: 250px;" ><i class="fa fa-list text-<?php echo $cl;?> fa-2x pull-left"></i><?php echo T_("No, Thank you, go to");?> <br><?php echo T_("Questionnaire management");?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /modal end -->
|
||||
|
||||
<!-- create new questionnaire -->
|
||||
<body>
|
||||
|
||||
|
||||
<a href="questionnairelist.php" class="btn btn-default pull-left" ><i class="fa fa-list text-primary"></i> <?php echo T_("Go to");?> <?php echo T_("Questionnaire management");?> </a>
|
||||
|
||||
|
||||
}
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal col-lg-12" >
|
||||
|
||||
//create new questionnaire
|
||||
?>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><input type="hidden" name="MAX_FILE_SIZE" value="1000000000" /></p>
|
||||
<p><?php echo T_("Name for questionnaire:"); ?> <input type="text" name="description"/></p>
|
||||
<p><?php echo T_("Select limesurvey instrument:");
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label" ><?php echo T_("Name for questionnaire:"); ?> </label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" name="description" class="form-control" required placeholder="<?php echo T_("Enter New questionnaire name..");?>" title="<?php echo T_("Name for questionnaire:") ; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
||||
FROM " . LIME_PREFIX . "surveys AS s
|
||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
||||
WHERE s.active = 'Y'
|
||||
GROUP BY s.sid";
|
||||
|
||||
$surveys = $db->GetAll($sql);
|
||||
?>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Select limesurvey instrument:");?> </label>
|
||||
<div class='col-sm-4'>
|
||||
<?php if (!empty($surveys)){?>
|
||||
<select name="select" class="form-control">
|
||||
<?php foreach($surveys as $s){?>
|
||||
<option value="<?php echo $s['sid'];?>"><?php echo T_("Existing instrument:"), " ", $s['title'] ;?></option><?php } ?>
|
||||
</select>
|
||||
<?php } else { ?>
|
||||
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a> <?php } ?>
|
||||
</div>
|
||||
<div class='col-sm-4'>
|
||||
<strong><?php echo T_("or") ;?> </strong>
|
||||
<a class="btn btn-lime" href="<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-lemon-o text-danger"></i> <?php echo T_("Create an instrument in Limesurvey") ;?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Respondent selection type:"); ?> </label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="selectrs" id="selectrs" onchange="if(this.value == 'old') show(this,'rstext'); else hide(this,'rstext')">
|
||||
<option value="none"><?php echo T_("No respondent selection (go straight to questionnaire)"); ?></option>
|
||||
<option value="old" ><?php echo T_("Use basic respondent selection text (below)"); ?></option>
|
||||
<?php
|
||||
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
||||
FROM " . LIME_PREFIX . "surveys AS s
|
||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
||||
WHERE s.active = 'Y'";
|
||||
$surveys = $db->GetAll($sql);
|
||||
|
||||
if (!empty($surveys)){ foreach($surveys as $s){ ?>
|
||||
<option value="<?php echo $s['sid'];?>"><?php echo T_("Existing instrument:") ," ", $s['title'] ;?></option>
|
||||
<?php } } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Restrict appointments to shifts?"); ?></label>
|
||||
<div class="col-sm-4" style="height: 30px;">
|
||||
<input name="ras" type="checkbox" checked="checked" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Restrict work to shifts?"); ?></label>
|
||||
<div class="col-sm-4"style="height: 30px;">
|
||||
<input name="rws" type="checkbox" checked="checked" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire for testing only?"); ?></label>
|
||||
<div class="col-sm-4"style="height: 30px;">
|
||||
<input name="testing" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-width="80" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow operators to generate referrals?"); ?></label>
|
||||
<div class="col-sm-4"style="height: 30px;">
|
||||
<input name="referral" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||
<div class="col-sm-4"style="height: 30px;">
|
||||
<input name="respsc" type="checkbox" onchange="if(this.checked==true) {show(this,'limesc'); $('#url').attr('required','required');} else{ hide(this,'limesc'); $('#url').removeAttr('required');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="limesc" style="display:none" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire display mode for respondent");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="lime_mode">
|
||||
<option value="survey"><?php echo T_("All in one"); ?></option>
|
||||
<option value="question"><?php echo T_("Question by question"); ?></option>
|
||||
<option value="group"><?php echo T_("Group at a time"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Limesurvey template for respondent");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="lime_template">
|
||||
<?php
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\">$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" name="lime_endurl" id="url" type="url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
if (!empty($surveys))
|
||||
{
|
||||
print "<select name='select'>";
|
||||
foreach($surveys as $s)
|
||||
{
|
||||
print "<option value=\"{$s['sid']}\">" . T_("Existing instrument:") . " {$s['title']}</option>";
|
||||
}
|
||||
print "</select>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<a href='" . LIME_URL ."admin/admin.php?action=newsurvey'>" . T_("Create an instrument in Limesurvey") ."</a>";
|
||||
}
|
||||
?></p>
|
||||
<p><?php echo T_("Respondent selection type:"); ?>
|
||||
<select name="selectrs" onchange="if(this.value=='old') show(this,'rstext'); else hide(this,'rstext');"><option value="none"><?php echo T_("No respondent selection (go straight to questionnaire)"); ?></option><option value="old"><?php echo T_("Use basic respondent selection text (below)"); ?></option>
|
||||
<?php
|
||||
$sql = "SELECT s.sid as sid, sl.surveyls_title AS title
|
||||
FROM " . LIME_PREFIX . "surveys AS s
|
||||
LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id)
|
||||
WHERE s.active = 'Y'";
|
||||
|
||||
$surveys = $db->GetAll($sql);
|
||||
|
||||
if (!empty($surveys))
|
||||
{
|
||||
foreach($surveys as $s)
|
||||
{
|
||||
print "<option value=\"{$s['sid']}\">" . T_("Existing instrument:") . " {$s['title']}</option>";
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/* CKEditor */
|
||||
|
||||
include("../include/ckeditor/ckeditor.php");
|
||||
|
||||
$CKEditor = new CKEditor();
|
||||
$CKEditor->basePath = "../include/ckeditor/";
|
||||
@@ -177,55 +286,93 @@ $CKEditor->basePath = "../include/ckeditor/";
|
||||
$ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
||||
array("Cut","Copy","Paste","PasteText","PasteFromWord","-","Print","SpellChecker"),
|
||||
array("Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"),
|
||||
array('Link','Unlink','Anchor'),
|
||||
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
||||
array('About'),
|
||||
"/",
|
||||
array("Bold","Italic","Underline","Strike","-","Subscript","Superscript"),
|
||||
array("NumberedList","BulletedList","-","Outdent","Indent","Blockquote"),
|
||||
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
|
||||
array('BidiLtr', 'BidiRtl'),
|
||||
array('Link','Unlink','Anchor'),
|
||||
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
||||
"/",
|
||||
array('Styles','Format','Font','FontSize'),
|
||||
array('TextColor','BGColor'),
|
||||
array('About')),
|
||||
array('TextColor','BGColor')),
|
||||
"extraPlugins" => "tokens");
|
||||
|
||||
|
||||
?></select></p>
|
||||
<p><?php echo T_("Restrict appointments to shifts?"); ?> <input name="ras" type="checkbox" checked="checked"/></p>
|
||||
<p><?php echo T_("Restrict work to shifts?"); ?> <input name="rws" type="checkbox" checked="checked"/></p>
|
||||
<p><?php echo T_("Questionnaire for testing only?"); ?> <input name="testing" type="checkbox"/></p>
|
||||
<p><?php echo T_("Allow operators to generate referrals?"); ?> <input name="referral" type="checkbox"/></p>
|
||||
<p><?php echo T_("Allow for respondent self completion via email invitation?"); ?> <input name="respsc" type="checkbox" onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" /></p>
|
||||
<div id='limesc' style='display:none;'>
|
||||
<p><?php echo T_("Questionnaire display mode for respondent");?>: <select name="lime_mode"><option value="survey"><?php echo T_("All in one"); ?></option><option value="question"><?php echo T_("Question by question"); ?></option><option value="group"><?php echo T_("Group at a time"); ?></option></select></p>
|
||||
<p><?php echo T_("Limesurvey template for respondent");?>: <select name="lime_template">
|
||||
<?php
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\">$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
</select></p>
|
||||
<p><?php echo T_("URL to forward respondents on self completion (required)");?>: <input name="lime_endurl" type="text" value="http://www.acspri.org.au/"/></p>
|
||||
|
||||
<div id="rstext" class=" " style="display:none ">
|
||||
|
||||
<div class="panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection introduction:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_intro","",$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection project introduction:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_project_intro","",$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary"><?php echo T_("Respondent selection callback (already started questionnaire):");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_callback","",$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title "><?php echo T_("Message to leave on an answering machine:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_answeringmachine","",$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='rstext' style='display:none;'>
|
||||
<p><?php echo T_("Respondent selection introduction:"); echo $CKEditor->editor("rs_intro","",$ckeditorConfig);?></p>
|
||||
<p><?php echo T_("Respondent selection project introduction:"); echo $CKEditor->editor("rs_project_intro","",$ckeditorConfig);?></p>
|
||||
<p><?php echo T_("Respondent selection callback (already started questionnaire):"); echo $CKEditor->editor("rs_callback","",$ckeditorConfig);?> </p>
|
||||
<p><?php echo T_("Message to leave on an answering machine:"); echo $CKEditor->editor("rs_answeringmachine","",$ckeditorConfig);?> </p>
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title "><?php echo T_("Project end text (thank you screen):");?></h3>
|
||||
</div>
|
||||
<div class="content" >
|
||||
<?php echo $CKEditor->editor("rs_project_end","",$ckeditorConfig); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default ">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title"><?php echo T_("Project information for interviewers/operators:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("info","",$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-4 ">
|
||||
<a href="questionnairelist.php" class="btn btn-default pull-right" ><i class="fa fa-list text-primary"></i> <?php echo T_("Go to");?> <?php echo T_("Questionnaire management");?></a>
|
||||
</div>
|
||||
<div class="col-sm-4 ">
|
||||
<button type="submit" class="btn btn-default pull-right" name="import_file" ><i class="fa fa-check-square-o fa-lg text-primary"></i> <?php echo T_("Create Questionnaire"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<p><?php echo T_("Project end text (thank you screen):");echo $CKEditor->editor("rs_project_end","",$ckeditorConfig); ?></p>
|
||||
<p><?php echo T_("Project information for interviewers/operators:");echo $CKEditor->editor("info","",$ckeditorConfig);?></p>
|
||||
<p><input type="submit" name="import_file" value="<?php echo T_("Create Questionnaire"); ?>"/></p>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
|
||||
xhtml_foot($js_foot);//
|
||||
?>
|
||||
|
||||
@@ -57,7 +57,7 @@ if (isset($_POST['submit']))
|
||||
|
||||
if (HTPASSWD_PATH !== false && $_POST['existing_username'] != $_POST['username'] && empty($_POST['password']))
|
||||
{
|
||||
$msg = T_("If changing usernames, you must specify a new password");
|
||||
$msg = "<div class='alert alert-danger'><h3>" . T_("If changing usernames, you must specify a new password") . "</h3></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -113,11 +113,11 @@ if (isset($_POST['submit']))
|
||||
$htg->addUserToGroup($_POST["username"],HTGROUP_INTERVIEWER);
|
||||
}
|
||||
|
||||
$msg = T_("Successfully updated user");
|
||||
$msg = "<div class='alert alert-info'><h3>" . T_("Successfully updated user") . ": " . $_POST['username'] . "</h3></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = T_("Failed to update user. Please make sure the username is unique");
|
||||
$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;
|
||||
@@ -126,7 +126,7 @@ if (isset($_POST['submit']))
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
{
|
||||
xhtml_head(T_("Operator edit"),true,array("../css/table.css"));
|
||||
xhtml_head(T_("Edit Operator settings"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/bootstrap-toggle/css/bootstrap-toggle.min.css", "../css/custom.css"),array("../include/jquery/jquery.min.js","../include/bootstrap/js/bootstrap.min.js","../include/bootstrap-toggle/js/bootstrap-toggle.min.js"));
|
||||
|
||||
$operator_id = intval($_GET['edit']);
|
||||
|
||||
@@ -140,10 +140,51 @@ if (isset($_GET['edit']))
|
||||
FROM timezone_template";
|
||||
|
||||
$tz = $db->GetAll($sql);
|
||||
?>
|
||||
|
||||
print "<h2>" . T_("Edit") . ": " . $rs['username'] . "</h2>";
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
if (!empty($msg)) print "<h3>$msg</h3>";
|
||||
<script type="text/javascript">
|
||||
//Password generator
|
||||
upp = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
|
||||
low = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
|
||||
dig = new Array('0','1','2','3','4','5','6','7','8','9');
|
||||
sym = new Array('~','!','@','#','$','%','^','&','*','(',')','_','+','=','|',';','.','/','?','<','>','{','}','[',']');
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function rnd(x,y,z) {
|
||||
var num;
|
||||
do {
|
||||
num = parseInt(Math.random()*z);
|
||||
if (num >= x && num <= y) break;
|
||||
} while (true);
|
||||
return(num);
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function generate() {
|
||||
var pwd = '';
|
||||
var res, s;
|
||||
var k = 0;
|
||||
var n = document.operform.number.value;
|
||||
var pass = new Array();
|
||||
var w = rnd(30,80,100);
|
||||
for (var r = 0; r < w; r++) {
|
||||
res = rnd(1,25,100); pass[k] = upp[res]; k++;
|
||||
res = rnd(1,25,100); pass[k] = low[res]; k++;
|
||||
res = rnd(1,9,100); pass[k] = dig[res]; k++;
|
||||
res = rnd(1,24,100); pass[k] = sym[res]; k++;
|
||||
}
|
||||
for (var i = 0; i < n; i++) {
|
||||
s = rnd(1,k-1,100);
|
||||
pwd+= pass[s];
|
||||
}
|
||||
document.operform.password.value = pwd;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="form-group clearfix"><div class="col-sm-3"><a href='?' class="btn btn-default"><?php echo T_("Go back") ;?></a></div><div class="col-sm-6">
|
||||
<?php
|
||||
print "<h3>" . T_("Operator") . ": " . $rs['username'] . "</h3>";
|
||||
echo "</div></div>";
|
||||
|
||||
if (!empty($msg)) echo $msg;
|
||||
|
||||
$sql = "SELECT extension_id as value, extension as description,
|
||||
CASE WHEN current_operator_id = $operator_id THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
@@ -152,38 +193,79 @@ if (isset($_GET['edit']))
|
||||
OR current_operator_id = $operator_id";
|
||||
|
||||
$ers = $db->GetAll($sql);
|
||||
|
||||
?>
|
||||
<form action="?" method="post">
|
||||
<div><label for="username"><?php echo T_("Username") . ": "; ?></label><input type='text' name='username' value="<?php echo $rs['username'];?>"/></div>
|
||||
<?php
|
||||
if (HTPASSWD_PATH !== false)
|
||||
{ ?>
|
||||
<div><label for="password"><?php echo T_("Update password (leave blank to keep existing password)") . ": "; ?></label><input type='text' name='password'/></div>
|
||||
<?php }
|
||||
?>
|
||||
<div><label for="firstName"><?php echo T_("First name") . ": "; ?></label><input type='text' name='firstName' value="<?php echo $rs['firstName'];?>"/></div>
|
||||
<div><label for="lastName"><?php echo T_("Last name") . ": "; ?></label><input type='text' name='lastName' value="<?php echo $rs['lastName'];?>"/></div>
|
||||
<div><label for="extension_id"><?php echo T_("Extension"); echo "</label>"; display_chooser($ers,"extension_id","extension_id",true,false,false,false); ?> </div>
|
||||
<div><label for="chat_user"><?php echo T_("Jabber/XMPP chat user") . ": "; ?></label><input type='text' name='chat_user' value="<?php echo $rs['chat_user'];?>"/></div>
|
||||
<div><label for="chat_password"><?php echo T_("Jabber/XMPP chat password") . ": "; ?></label><input type='text' name='chat_password' value="<?php echo $rs['chat_password'];?>"/></div>
|
||||
<div><label for="chat_enable"><?php echo T_("Uses chat") . "? ";?></label><input type="checkbox" name="chat_enable" <?php if ($rs['chat_enable'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
<div><label for="timezone"><?php echo T_("Timezone") . ": ";?></label><?php display_chooser($tz,"timezone","timezone",false,false,false,false,array("value",$rs['Time_zone_name'])); ?></div>
|
||||
<div><label for="enabled"><?php echo T_("Enabled") . "? ";?></label><input type="checkbox" name="enabled" <?php if ($rs['enabled'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
<div><label for="voip"><?php echo T_("Uses VoIP") . "? ";?></label><input type="checkbox" name="voip" <?php if ($rs['voip'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
|
||||
?>
|
||||
<form action="?" method="post" class="form-horizontal panel-body" name="operform">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
<div class="col-sm-6 form-inline"> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default"/> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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="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>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='timezonetemplate.php' class="btn btn-default"><?php echo T_("TimeZones list");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="extension_id" class="col-sm-3 control-label"><?php echo T_("Extension") . ": "; ?></label>
|
||||
<div class="col-sm-3"><?php echo display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline"); ?> </div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='extensionstatus.php' class="btn btn-default"><?php echo T_("Extensions");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="voip" class="col-sm-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="voip" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['voip'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="chat_user" class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='chat_user' class="form-control" value="<?php echo $rs['chat_user'];?>"/></div>
|
||||
</div>
|
||||
<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="chat_enable" class="col-sm-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="chat_enable" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['chat_enable'] == 1) echo "checked=\"checked\"";?> value="1"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="enabled" class="col-sm-3 control-label"><?php echo T_("Enabled") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="enabled" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['enabled'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
</div>
|
||||
<div><input type='hidden' name='operator_id' value='<?php echo $operator_id;?>'/></div>
|
||||
<div><input type='hidden' name='existing_username' value="<?php echo $rs['username'];?>"/></div>
|
||||
<div><input type="submit" name="submit" value="<?php echo T_("Update operator");?>"/></div>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
<div class="form-group"><div class="col-sm-3 col-sm-offset-3"><input type="submit" name="submit" class="btn btn-primary btn-block" value="<?php echo T_("Update operator");?>"/></div></div>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($_GET['voipdisable']))
|
||||
{
|
||||
$operator_id = intval($_GET['voipdisable']);
|
||||
@@ -206,7 +288,6 @@ if (isset($_GET['voipenable']))
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
if (isset($_GET['disable']))
|
||||
{
|
||||
$operator_id = intval($_GET['disable']);
|
||||
@@ -264,52 +345,62 @@ if (isset($_GET['operator_id']))
|
||||
|
||||
if ($display)
|
||||
{
|
||||
$sql = "SELECT
|
||||
CONCAT(firstName, ' ', lastName) as name,
|
||||
e.extension,
|
||||
CONCAT('<a href=\'?winbat=winbat&operator_id=',operator_id,'\'>" . TQ_("Windows bat file") . "</a>') as winbat,
|
||||
CONCAT('<a href=\'?sh=sh&operator_id=',operator_id,'\'>" . TQ_("*nix script file") . "</a>') as sh,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<a href=\'?enable=',operator_id,'\'>" . TQ_("Enable") . "</a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?disable=',operator_id,'\'>" . TQ_("Disable") . "</a>')
|
||||
END
|
||||
as enabledisable,
|
||||
CASE WHEN voip = 0 THEN
|
||||
CONCAT('<a href=\'?voipenable=',operator_id,'\'>" . TQ_("Enable VoIP") . "</a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?voipdisable=',operator_id,'\'>" . TQ_("Disable VoIP") . "</a>')
|
||||
END as voipenabledisable,
|
||||
CONCAT('<a href=\'?edit=',operator_id,'\'>" . TQ_("Edit") . "</a>') as edit,
|
||||
username
|
||||
FROM operator
|
||||
LEFT JOIN `extension` as e ON (e.current_operator_id = operator_id)";
|
||||
|
||||
$sql = "SELECT operator_id,
|
||||
CONCAT(firstName, ' ', lastName) as name,
|
||||
CONCAT ('<a href=\'extensionstatus.php?edit=',e.extension_id,'\'>', e.extension ,'</a>') as `extension`,
|
||||
CONCAT('<a href=\'?winbat=winbat&operator_id=',operator_id,'\'>" . TQ_("Win .bat file") . "</a>') as winbat,
|
||||
CONCAT('<a href=\'?sh=sh&operator_id=',operator_id,'\'>" . TQ_("*nix script file") . "</a>') as sh,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT(' <a href=\'?enable=',operator_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Enable") . "\' class=\'fa fa-toggle-off fa-2x\' style=\'color:grey;\'></i></a> ')
|
||||
ELSE
|
||||
CONCAT(' <a href=\'?disable=',operator_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Disable") . "\' class=\'fa fa-toggle-on fa-2x\'></i></a> ')
|
||||
END as enabledisable,
|
||||
CASE WHEN voip = 0 THEN
|
||||
CONCAT('<a href=\'?voipenable=',operator_id,'\'>" . TQ_("Enable VoIP") . "</a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?voipdisable=',operator_id,'\'>" . TQ_("Disable VoIP") . "</a>')
|
||||
END as voipenabledisable,
|
||||
CONCAT(' <a href=\'?edit=',operator_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Edit") . "\' class=\'fa fa-pencil-square-o fa-lg\'></i></a> ') as edit, username
|
||||
FROM operator
|
||||
LEFT JOIN `extension` as e ON (e.current_operator_id = operator_id)";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
xhtml_head(T_("Operator list"),true,array("../css/table.css"));
|
||||
xhtml_head(T_("Operator list"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/font-awesome/css/font-awesome.css","../css/custom.css"));
|
||||
|
||||
$columns = array("operator_id","name","username","extension","enabledisable","edit");
|
||||
$titles = array("ID",T_("Operator"),T_("Username"),T_("Extension")," <i class='fa fa-lg fa-power-off '></i>"," <i class='fa fa-lg fa-pencil-square-o'></i>");
|
||||
|
||||
$columns = array("name","username","extension","enabledisable","edit");
|
||||
$titles = array(T_("Operator"),T_("Username"),T_("Extension"),T_("Enable/Disable"),T_("Edit"));
|
||||
|
||||
if (VOIP_ENABLED)
|
||||
{
|
||||
print "<p>" . T_("Download the file for each user and save in the same folder as the voip.exe executable. When the file is executed, it will run the voip.exe program with the correct connection details to connect the operator to the VoIP server") . "</p>";
|
||||
|
||||
print "<p><a href='../voipclient.exe'>" . T_("Download Windows VoIP Executable") . "</a></p>";
|
||||
print "<p><a href='../voipclient'>" . T_("Download Linux VoIP Executable") . "</a></p>";
|
||||
|
||||
$columns[] = "voipenabledisable";
|
||||
$columns[] = "winbat";
|
||||
$columns[] = "sh";
|
||||
$titles[] = T_("Enable/Disable VoIP");
|
||||
$titles[] = T_("Windows VoIP");
|
||||
$titles[] = T_("*nix VoIP");
|
||||
$titles[] = T_("VoIP ON/Off");
|
||||
$titles[] = T_("Win file");//Windows VoIP
|
||||
$titles[] = T_("*nix flle");//*nix VoIP
|
||||
}
|
||||
|
||||
echo "<div class=' col-sm-10'><div class=' panel-body'>";
|
||||
xhtml_table($rs,$columns,$titles);
|
||||
|
||||
echo "</div></div>";
|
||||
|
||||
echo "<div class='form-group col-sm-2'>
|
||||
<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> " . 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> " . 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>
|
||||
<div class='panel-body'><a href='operatorskill.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-user-md'></i> " . T_("Operator skills") . "</a></div>
|
||||
<div class='panel-body'><a href='operatorperformance.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-signal'></i> " . T_("Operator performance") . "</a></div>";
|
||||
|
||||
if (VOIP_ENABLED)
|
||||
{
|
||||
print "<div class='well'>" . T_("Download the file for each user and save in the same folder as the voip.exe executable. When the file is executed, it will run the voip.exe program with the correct connection details to connect the operator to the VoIP server"). "</br></br>";
|
||||
|
||||
print "<a href='../voip/voipclient.exe' class='btn btn-default btn-block' title='" . T_("Download Windows VoIP Client Executable file") . "'><i class='fa fa-lg fa-download'></i> " . T_("Download Win file") . "</a></br>";
|
||||
print "<a href='../voip/voipclient' class='btn btn-default btn-block' title='" . T_("Download Linux VoIP Executable file") . "'><i class='fa fa-lg fa-download'></i> " . T_("Download Linux file") . "</a></div>";
|
||||
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
xhtml_foot();
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -63,16 +63,16 @@ include("../functions/functions.input.php");
|
||||
*/
|
||||
include("../functions/functions.operator.php");
|
||||
|
||||
xhtml_head(T_("Operator Performance"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Operator Performance"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
|
||||
//$rs = get_stats_total(get_stats());
|
||||
//print "<h2>" . T_("Overall") . "</h2>";
|
||||
//xhtml_table($rs,array("firstName","completions","totalcalls","time","callt","CPH","CALLSPH","effectiveness"),array(T_("Operator"),T_("Completions"),T_("Calls"),T_("Total time"),T_("Call time"),T_("Completions p/h"),T_("Calls p/h"),T_("Effectiveness")));
|
||||
|
||||
$questionnaire_id = false;
|
||||
print "<h3>" . T_("Please select a questionnaire") . "</h3>";
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Please select a questionnaire") . " </h3>";
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline clearfix", "form-control");
|
||||
|
||||
if ($questionnaire_id)
|
||||
{
|
||||
@@ -93,9 +93,9 @@ if ($questionnaire_id)
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h3>" . T_("Please select a shift") . "</h3>";
|
||||
print "</br><h3 class='form-inline pull-left'>" . T_("Please select a shift") . " </h3>";
|
||||
|
||||
display_chooser($rs,"shift_id","shift_id",true,"questionnaire_id=$questionnaire_id");
|
||||
display_chooser($rs,"shift_id","shift_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"form-inline form-group");//,false,true,false,true,"pull-left"
|
||||
|
||||
if ($shift_id)
|
||||
{
|
||||
@@ -106,8 +106,5 @@ if ($questionnaire_id)
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -106,8 +106,6 @@ function vqd($operator_id,$questionnaire_id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
@@ -136,7 +134,6 @@ if (isset($_POST['submit']))
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT questionnaire_id,description
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1
|
||||
@@ -144,7 +141,7 @@ $sql = "SELECT questionnaire_id,description
|
||||
|
||||
$questionnaires = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT operator_id,firstname as description
|
||||
$sql = "SELECT operator_id, CONCAT(firstName,' ', lastName ) as opname, username
|
||||
FROM operator
|
||||
WHERE enabled = 1
|
||||
ORDER by operator_id ASC";
|
||||
@@ -152,7 +149,7 @@ $sql = "SELECT operator_id,firstname as description
|
||||
$operators = $db->GetAll($sql);
|
||||
|
||||
|
||||
xhtml_head(T_("Assign operators to questionnaires"),false,array("../css/table.css"));
|
||||
xhtml_head(T_("Assign operators to questionnaires"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/iCheck/icheck.min.js"));
|
||||
|
||||
?>
|
||||
|
||||
@@ -210,8 +207,6 @@ function checkQid(q)
|
||||
QidOn = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkVid(v)
|
||||
{
|
||||
|
||||
@@ -234,51 +229,51 @@ function checkVid(v)
|
||||
VidOn = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
print "<form action=\"\" method=\"post\" class=''><table class='table-bordered table-hover table-condensed form-group'><thead>";
|
||||
|
||||
|
||||
print "<form action=\"\" method=\"post\"><table>";
|
||||
|
||||
print "<tr><th></th>";
|
||||
print "<tr><th> " . T_("Username") . " </th><th> " . T_("Operator") . " </th>";
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
print "<th><a href=\"javascript:checkQid({$q['questionnaire_id']})\">{$q['description']}</a></th>";
|
||||
}
|
||||
print "</tr>";
|
||||
print "</tr></thead>";
|
||||
|
||||
$class = 0;
|
||||
|
||||
foreach($operators as $v)
|
||||
{
|
||||
print "<tr class='";
|
||||
if ($class == 0) {$class = 1; print "even";} else {$class = 0; print "odd";}
|
||||
print "'>";
|
||||
print "<th><a href=\"javascript:checkVid({$v['operator_id']})\">{$v['description']}</a></th>";
|
||||
|
||||
print "<tr class=''>
|
||||
<th> {$v['username']} </th>
|
||||
<th style=\"text-align: left;\";> <a href=\"javascript:checkVid({$v['operator_id']})\" >{$v['opname']}</a> </th>";
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
$checked = "";
|
||||
if (vq($v['operator_id'],$q['questionnaire_id'])) $checked="checked=\"checked\"";
|
||||
print "<td><input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['operator_id']}\" id=\"cb_{$q['questionnaire_id']}_{$v['operator_id']}\" $checked></input></td>";
|
||||
print "<td class='text-center'><input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['operator_id']}\" id=\"cb_{$q['questionnaire_id']}_{$v['operator_id']}\" $checked style=\"width: 16px; height: 16px; margin-top: 5px;\"></input></td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
|
||||
print "</table><p><input type=\"submit\" name=\"submit\" value=\"" . T_("Assign operators to questionnaires") . "\"/></p></form>";
|
||||
print "</table><input class='btn btn-default fa' type='submit' name='submit' value='" . T_("Assign operators to questionnaires") . "'/></form>";
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
increaseArea: '30%'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,7 @@ global $db;
|
||||
|
||||
$a = false;
|
||||
|
||||
if (isset($_POST['operator']))
|
||||
if (isset($_POST['operator']) && isset($_POST['adduser']))
|
||||
{
|
||||
$operator = $db->qstr($_POST['operator'],get_magic_quotes_gpc());
|
||||
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
|
||||
@@ -68,8 +68,8 @@ if (isset($_POST['operator']))
|
||||
|
||||
$laste = $db->GetRow($sql);
|
||||
|
||||
$extensionn = "1000";
|
||||
$extension = "'IAX2/1000'";
|
||||
$extensionn = "2000";
|
||||
$extension = "'IAX2/2000'";
|
||||
|
||||
//increment if exists
|
||||
if (!empty($laste))
|
||||
@@ -80,10 +80,10 @@ if (isset($_POST['operator']))
|
||||
|
||||
//generate random 8 length password
|
||||
$extensionnp = "";
|
||||
$length = 12;
|
||||
$length = 25;
|
||||
$chars = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
for ($i = 0; $i < $length; $i++)
|
||||
$extensionnp .= $chars[(rand() % strlen($chars))];
|
||||
$extensionnp .= $chars[(mt_rand() % strlen($chars))];
|
||||
|
||||
//quote for SQL
|
||||
$extensionp = "'$extensionnp'";
|
||||
@@ -144,11 +144,12 @@ if (isset($_POST['operator']))
|
||||
$htg->addUserGroup(HTGROUP_ADMIN);
|
||||
}
|
||||
|
||||
$a = T_("Added:") . " " . $operator;
|
||||
$a = "<div class='alert alert-info'><h3>" . T_("Added operator :") . " " . $operator . "</h3>";
|
||||
|
||||
if (FREEPBX_PATH !== false)
|
||||
$a .= "<br/>" . T_("FreePBX has been reloaded for the new VoIP extension to take effect");
|
||||
|
||||
|
||||
print "</div>";
|
||||
|
||||
if ($temporary)
|
||||
{
|
||||
@@ -165,27 +166,26 @@ if (isset($_POST['operator']))
|
||||
if ($refusal)
|
||||
$db->Execute(" INSERT INTO operator_skill (operator_id,outcome_type_id)
|
||||
VALUES ('$oid','3')");
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$a = T_("Could not add operator. There may already be an operator of this name:") . " $operator ";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Add an operator"));
|
||||
xhtml_head(T_("Add an operator"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/bootstrap-toggle/css/bootstrap-toggle.min.css", "../css/custom.css"), array("../include/jquery/jquery.min.js", "../include/bootstrap/js/bootstrap.min.js","../include/bootstrap-toggle/js/bootstrap-toggle.min.js"));
|
||||
|
||||
if ($a)
|
||||
{
|
||||
?>
|
||||
<h3><?php echo $a; ?></h3>
|
||||
<?php
|
||||
if ($a) {
|
||||
echo $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_("The username and extension must be unique for each operator.") . "</p>";
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
$sql = "SELECT Time_zone_name as value, Time_zone_name as description
|
||||
@@ -198,35 +198,119 @@ $sql = "SELECT extension_id as value, extension as description
|
||||
WHERE current_operator_id IS NULL";
|
||||
|
||||
$ers = $db->GetAll($sql);
|
||||
|
||||
?>
|
||||
<h1><?php echo T_("Add an operator"); ?></h1>
|
||||
<p><?php echo T_("Adding an operator here will give the user the ability to call cases"); ?> <a href="operatorquestionnaire.php"><?php echo T_("Assign Operator 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>
|
||||
<p><?php echo T_("The username and extension must be unique for each operator.")?></p>
|
||||
<form enctype="multipart/form-data" action="" method="post">
|
||||
<p><?php echo T_("Enter the username of an operator to add:"); ?> <input name="operator" type="text"/></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
//Password generator
|
||||
upp = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
|
||||
low = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
|
||||
dig = new Array('0','1','2','3','4','5','6','7','8','9');
|
||||
sym = new Array('~','!','@','#','$','%','^','&','*','(',')','_','+','=','|',';','.','/','?','<','>','{','}','[',']');
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function rnd(x,y,z) {
|
||||
var num;
|
||||
do {
|
||||
num = parseInt(Math.random()*z);
|
||||
if (num >= x && num <= y) break;
|
||||
} while (true);
|
||||
return(num);
|
||||
}
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
function generate() {
|
||||
var pwd = '';
|
||||
var res, s;
|
||||
var k = 0;
|
||||
var n = document.operform.number.value;
|
||||
var pass = new Array();
|
||||
var w = rnd(30,80,100);
|
||||
for (var r = 0; r < w; r++) {
|
||||
res = rnd(1,25,100); pass[k] = upp[res]; k++;
|
||||
res = rnd(1,25,100); pass[k] = low[res]; k++;
|
||||
res = rnd(1,9,100); pass[k] = dig[res]; k++;
|
||||
res = rnd(1,24,100); pass[k] = sym[res]; k++;
|
||||
}
|
||||
for (var i = 0; i < n; i++) {
|
||||
s = rnd(1,k-1,100);
|
||||
pwd+= pass[s];
|
||||
}
|
||||
document.operform.password.value = pwd;
|
||||
}
|
||||
</script>
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal panel-body" name="operform">
|
||||
<div class="form-group">
|
||||
<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) { ?>
|
||||
<p><?php echo T_("Enter the password of an operator to add:"); ?> <input name="password" type="text"/></p>
|
||||
<?php } ?>
|
||||
<p><?php echo T_("Enter the first name of an operator to add:"); ?> <input name="firstname" type="text"/></p>
|
||||
<p><?php echo T_("Enter the surname of an operator to add:"); ?> <input name="lastname" type="text"/></p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of an operator to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE"))); ?> </p>
|
||||
<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" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" /></div>
|
||||
<div class="col-sm-6 form-inline"> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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_("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>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='timezonetemplate.php' class="btn btn-default fa"><?php echo T_("TimeZones list");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (FREEPBX_PATH == false) { ?>
|
||||
<p><a href='extensionstatus.php'><?php echo T_("Select an extension for this operator:"); echo "</a>"; display_chooser($ers,"extension_id","extension_id",true,false,false,false); ?> </p>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Extension") . ": ";?></label>
|
||||
<div class="col-sm-3"><?php display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline");?></div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='extensionstatus.php' class="btn btn-default fa"><?php echo T_("Extensions");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<p><?php echo T_("Will this operator be using VoIP?"); ?> <input name="voip" type="checkbox" checked="checked"/></p>
|
||||
<p><?php echo T_("Jabber/XMPP chat user"); ?>: <input name="chat_user" type="text"/></p>
|
||||
<p><?php echo T_("Jabber/XMPP chat password"); ?>: <input name="chat_password" type="text"/></p>
|
||||
<p><?php echo T_("Will this operator be using chat?"); ?> <input name="chat_enable" type="checkbox"/></p>
|
||||
<p><?php echo T_("Is the operator a normal interviewer?"); ?> <input name="temporary" type="checkbox" checked="checked"/></p>
|
||||
<p><?php echo T_("Is the operator a supervisor?"); ?> <input name="supervisor" type="checkbox"/></p>
|
||||
<p><?php echo T_("Is the operator a refusal converter?"); ?> <input name="refusal" type="checkbox"/></p>
|
||||
<p><input type="submit" value="<?php echo T_("Add user"); ?>" /></p>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-sm-3"><input name="voip" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" checked="checked"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="chat_user" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="chat_password" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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 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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a supervisor?");?></label>
|
||||
<div class="col-sm-3"><input name="supervisor" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-offstyle="primary"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a refusal converter?");?></label>
|
||||
<div class="col-sm-3"><input name="refusal" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-offstyle="primary"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"><div class="col-sm-3 col-sm-offset-3"><input type="submit" name="adduser" class="btn btn-primary btn-block" value="<?php echo T_("Add an operator"); ?>" /></div></div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
@@ -105,8 +105,6 @@ function vqd($operator_id,$outcome_type_id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
@@ -138,7 +136,7 @@ $sql = "SELECT outcome_type_id,description
|
||||
|
||||
$outcome_types = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT operator_id,firstname as description
|
||||
$sql = "SELECT operator_id, CONCAT(firstName,' ', lastName) as description, username
|
||||
FROM operator
|
||||
WHERE enabled = 1
|
||||
ORDER by operator_id ASC";
|
||||
@@ -146,9 +144,10 @@ $sql = "SELECT operator_id,firstname as description
|
||||
$operators = $db->GetAll($sql);
|
||||
|
||||
|
||||
xhtml_head(T_("Assign operators to Skills"),false,array("../css/table.css"));
|
||||
xhtml_head(T_("Assign operators to Skills"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/iCheck/icheck.min.js"));
|
||||
|
||||
print "<div class='well'>" . T_("Set which types of cases will be made available to each operator. </br> Please note that all operators will be allowed to assign all possible outcomes to a case. This restricts which ones will be assigned to an operator.") . "</div>";
|
||||
|
||||
print "<p>" . T_("Set which types of cases will be made available to each operator. Please note that all operators will be allowed to assign all possible outcomes to a case. This restricts which ones will be assigned to an operator.") . "</p>";
|
||||
|
||||
?>
|
||||
|
||||
@@ -207,7 +206,6 @@ function checkQid(q)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkVid(v)
|
||||
{
|
||||
|
||||
@@ -230,51 +228,52 @@ function checkVid(v)
|
||||
VidOn = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
|
||||
//$country_code = 'RU'; // Nederlandse Antillen
|
||||
//print_r(DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $country_code));
|
||||
|
||||
|
||||
print "<form action=\"\" method=\"post\"><table class='table-bordered table-hover table-condensed form-group'><thead>";
|
||||
|
||||
print "<form action=\"\" method=\"post\"><table>";
|
||||
|
||||
print "<tr><th></th>";
|
||||
print "<tr><th> " . T_("Username") . " </th><th> " . T_("Operator") . " </th>";
|
||||
foreach($outcome_types as $q)
|
||||
{
|
||||
print "<th><a href=\"javascript:checkQid({$q['outcome_type_id']})\">" . T_($q['description']) . "</a></th>";
|
||||
print "<th> <a href=\"javascript:checkQid({$q['outcome_type_id']})\">" . T_($q['description']) . "</a> </th>";
|
||||
}
|
||||
print "</tr>";
|
||||
print "</tr></thead>";
|
||||
|
||||
$ct = 1;
|
||||
|
||||
foreach($operators as $v)
|
||||
{
|
||||
print "<tr class='";
|
||||
if ($ct == 1) {$ct = 0; print "even";} else {$ct = 1; print "odd";}
|
||||
print "'>";
|
||||
print "<th><a href=\"javascript:checkVid({$v['operator_id']})\">{$v['description']}</a></th>";
|
||||
print "<tr class=''>
|
||||
<th> {$v['username']} </th>
|
||||
<th> <a href=\"javascript:checkVid({$v['operator_id']})\">{$v['description']}</a> </th>";
|
||||
foreach($outcome_types as $q)
|
||||
{
|
||||
$checked = "";
|
||||
if (vq($v['operator_id'],$q['outcome_type_id'])) $checked="checked=\"checked\"";
|
||||
print "<td><input type=\"checkbox\" name=\"cb_{$q['outcome_type_id']}_{$v['operator_id']}\" id=\"cb_{$q['outcome_type_id']}_{$v['operator_id']}\" $checked></input></td>";
|
||||
print "<td class='text-center'><input type=\"checkbox\" name=\"cb_{$q['outcome_type_id']}_{$v['operator_id']}\" id=\"cb_{$q['outcome_type_id']}_{$v['operator_id']}\" $checked></input></td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
|
||||
print "</table><p><input type=\"submit\" name=\"submit\" value=\"" . T_("Modify operator skills") ."\"/></p></form>";
|
||||
|
||||
print "</table><input type=\"submit\" class='btn btn-default fa' name=\"submit\" value=\"" . T_("Modify operator skills") ."\"/></form>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
increaseArea: '30%'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,31 +1,5 @@
|
||||
<?php /**
|
||||
* Display outcomes by questionnaire
|
||||
*
|
||||
*
|
||||
* 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@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -36,7 +10,7 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -73,19 +47,31 @@ $admin_operator_id = get_operator_id();
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/window.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
print "<h3 class='col-sm-4 pull-left text-right'>" . T_("Select a questionnaire") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id, false, "pull-left col-sm-4", "form-control");
|
||||
print "<div class='clearfix form-group'></div>";
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<h1>" . T_("Outcomes") . "</h1>";
|
||||
|
||||
print "<p>" . T_("Sample status") . "</p>";
|
||||
//print "<h1>" . T_("Outcomes") . "</h1>";
|
||||
print "<div class='col-sm-4'><div class='panel panel-body'><h5>" . T_("Sample status") . "</h5>";
|
||||
|
||||
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . TQ_("Drawn from sample") . "' ELSE '" . TQ_("Remain in sample") . "' END as drawn,
|
||||
count(*) as count
|
||||
@@ -93,34 +79,35 @@ if ($questionnaire_id != false)
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||
LEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id)
|
||||
GROUP BY (c.sample_id is not null)";
|
||||
|
||||
xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")));
|
||||
|
||||
print "<p>" . T_("Case availability (cases with temporary or appointment outcomes)") ."</p>";
|
||||
if ($db->GetAll($sql)) xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")), "table-hover table table-condensed", false, array("count"));
|
||||
else print "<div class='alert text-danger'>" . T_("No samples assigned") . ". </div>";
|
||||
print "</div>";
|
||||
|
||||
print "<div class='panel panel-body'><h5>" . T_("Case availability (cases with temporary or appointment outcomes)") ."</h5>";
|
||||
|
||||
$sql = "SELECT count(c.case_id) as available, si.description
|
||||
FROM `case` as c
|
||||
LEFT JOIN `call` as a on (a.call_id = c.last_call_id)
|
||||
JOIN (sample as s, sample_import as si) on (s.sample_id = c.sample_id and si.sample_import_id = s.import_id)
|
||||
JOIN (questionnaire_sample as qs, questionnaire as q, outcome as ou) on (q.questionnaire_id = $questionnaire_id and c.questionnaire_id = q.questionnaire_id and qs.sample_import_id = s.import_id and qs.questionnaire_id = q.questionnaire_id and ou.outcome_id = c.current_outcome_id)
|
||||
LEFT JOIN shift as sh on (sh.questionnaire_id = q.questionnaire_id and (CONVERT_TZ(NOW(),'System','UTC') >= sh.start) AND (CONVERT_TZ(NOW(),'System','UTC') <= sh.end))
|
||||
LEFT JOIN appointment as ap on (ap.case_id = c.case_id AND ap.completed_call_id is NULL AND (ap.start > CONVERT_TZ(NOW(),'System','UTC')))
|
||||
LEFT JOIN appointment as apn on (apn.case_id = c.case_id AND apn.completed_call_id is NULL AND (CONVERT_TZ(NOW(),'System','UTC') >= apn.start) AND (CONVERT_TZ(NOW(),'System','UTC') <= apn.end))
|
||||
LEFT JOIN call_restrict as cr on (cr.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) and TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= cr.start and TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= cr.end)
|
||||
LEFT JOIN questionnaire_sample_exclude_priority AS qsep ON (qsep.questionnaire_id = c.questionnaire_id AND qsep.sample_id = c.sample_id)
|
||||
LEFT JOIN case_availability AS casa ON (casa.case_id = c.case_id)
|
||||
LEFT JOIN availability AS ava ON (ava.availability_group_id = casa.availability_group_id)
|
||||
WHERE c.current_operator_id IS NULL
|
||||
AND ou.outcome_type_id IN (1,5)
|
||||
AND (casa.case_id IS NULL OR (ava.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= ava.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= ava.end ))
|
||||
AND (a.call_id is NULL or (a.end < CONVERT_TZ(DATE_SUB(NOW(), INTERVAL ou.default_delay_minutes MINUTE),'System','UTC')))
|
||||
AND ap.case_id is NULL
|
||||
AND ((qsep.questionnaire_id is NULL) or qsep.exclude = 0)
|
||||
AND !(q.restrict_work_shifts = 1 AND sh.shift_id IS NULL AND ou.outcome_type_id != 2)
|
||||
AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL AND ou.outcome_type_id != 2)
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_attempt_max = 0 or ((SELECT count(*) FROM call_attempt WHERE case_id = c.case_id) < qs.call_attempt_max))
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_max = 0 or ((SELECT count(*) FROM `call` WHERE case_id = c.case_id) < qs.call_max))
|
||||
AND (SELECT count(*) FROM `questionnaire_sample_quota` WHERE questionnaire_id = c.questionnaire_id AND sample_import_id = s.import_id AND quota_reached = 1) = 0
|
||||
FROM `case` as c
|
||||
LEFT JOIN `call` as a on (a.call_id = c.last_call_id)
|
||||
JOIN (sample as s, sample_import as si) on (s.sample_id = c.sample_id and si.sample_import_id = s.import_id)
|
||||
JOIN (questionnaire_sample as qs, questionnaire as q, outcome as ou) on (q.questionnaire_id = $questionnaire_id and c.questionnaire_id = q.questionnaire_id and qs.sample_import_id = s.import_id and qs.questionnaire_id = q.questionnaire_id and ou.outcome_id = c.current_outcome_id)
|
||||
LEFT JOIN shift as sh on (sh.questionnaire_id = q.questionnaire_id and (CONVERT_TZ(NOW(),'System','UTC') >= sh.start) AND (CONVERT_TZ(NOW(),'System','UTC') <= sh.end))
|
||||
LEFT JOIN appointment as ap on (ap.case_id = c.case_id AND ap.completed_call_id is NULL AND (ap.start > CONVERT_TZ(NOW(),'System','UTC')))
|
||||
LEFT JOIN appointment as apn on (apn.case_id = c.case_id AND apn.completed_call_id is NULL AND (CONVERT_TZ(NOW(),'System','UTC') >= apn.start) AND (CONVERT_TZ(NOW(),'System','UTC') <= apn.end))
|
||||
LEFT JOIN call_restrict as cr on (cr.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) and TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= cr.start and TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= cr.end)
|
||||
LEFT JOIN questionnaire_sample_exclude_priority AS qsep ON (qsep.questionnaire_id = c.questionnaire_id AND qsep.sample_id = c.sample_id)
|
||||
LEFT JOIN case_availability AS casa ON (casa.case_id = c.case_id)
|
||||
LEFT JOIN availability AS ava ON (ava.availability_group_id = casa.availability_group_id)
|
||||
WHERE c.current_operator_id IS NULL
|
||||
AND ou.outcome_type_id IN (1,5)
|
||||
AND (casa.case_id IS NULL OR (ava.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= ava.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= ava.end ))
|
||||
AND (a.call_id is NULL or (a.end < CONVERT_TZ(DATE_SUB(NOW(), INTERVAL ou.default_delay_minutes MINUTE),'System','UTC')))
|
||||
AND ap.case_id is NULL
|
||||
AND ((qsep.questionnaire_id is NULL) or qsep.exclude = 0)
|
||||
AND !(q.restrict_work_shifts = 1 AND sh.shift_id IS NULL AND ou.outcome_type_id != 2)
|
||||
AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL AND ou.outcome_type_id != 2)
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_attempt_max = 0 or ((SELECT count(*) FROM call_attempt WHERE call_attempt.case_id = c.case_id) < qs.call_attempt_max))
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_max = 0 or ((SELECT count(*) FROM `call` WHERE `call`.case_id = c.case_id) < qs.call_max))
|
||||
AND (SELECT count(*) FROM `questionnaire_sample_quota` WHERE `questionnaire_sample_quota`.questionnaire_id = c.questionnaire_id AND sample_import_id = s.import_id AND `questionnaire_sample_quota`.quota_reached = 1) = 0
|
||||
|
||||
group by s.import_id";
|
||||
|
||||
@@ -128,19 +115,19 @@ group by s.import_id";
|
||||
|
||||
if (empty($rs))
|
||||
{
|
||||
print "<div>" . T_("No cases currently available to call") . "</div>";
|
||||
print "<div class='alert text-danger'>" . T_("No cases currently available to call") . "</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_table($rs,array("description","available"),array(T_("Sample"),T_("Cases currently available to call")),"tclass",false,array("available"));
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
|
||||
$atime = get_average_time_questionnaire(10,$questionnaire_id);
|
||||
$mins = intval($atime / 60);
|
||||
$secs = $atime % 60;
|
||||
|
||||
print "<p>" . T_("Average time on a completed questionnaire") . ": $mins " . T_("Min") . " $secs " . T_("Secs") . "</p>";
|
||||
|
||||
print "<div class='panel panel-body'><h5>" . T_("Average time on a completed questionnaire") . ":<b> $mins " . T_("Min") . " $secs " . T_("Secs") . "</b></h5>";
|
||||
|
||||
$sql = "SELECT o.calc, count( c.case_id )
|
||||
FROM `case` AS c, `outcome` AS o
|
||||
@@ -151,16 +138,17 @@ group by s.import_id";
|
||||
$a = $db->GetAssoc($sql);
|
||||
$a = aapor_clean($a);
|
||||
|
||||
|
||||
print "<table><tr><th>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr>";
|
||||
print "<table class='col-sm-10'><thead><tr><th class='col-sm-8'>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr></thead>"; // table-hover table table-condensed
|
||||
print "<tr><td>" . T_("Response Rate 1") . "</td><td>" . round(aapor_rr1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Refusal Rate 1") . "</td><td>" . round(aapor_ref1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Cooperation Rate 1") . "</td><td>" . round(aapor_coop1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Contact Rate 1") . "</td><td>" . round(aapor_con1($a),2) . "</td></tr>";
|
||||
print "</table>";
|
||||
print "</table></div></div>";
|
||||
|
||||
$sql = "SELECT count(case_id) FROM `case` WHERE `case`.questionnaire_id = '$questionnaire_id'";
|
||||
$cases = $db->GetOne($sql);
|
||||
|
||||
$sql = "SELECT CONCAT('<a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&outcome_id=', o.outcome_id, '\'>', o.description, '</a>') as des, o.outcome_id, count( c.case_id ) as count, ROUND((count(c.case_id) / (SELECT count(case_id) FROM `case` WHERE questionnaire_id = '$questionnaire_id')) * 100,2) as perc
|
||||
$sql = "SELECT CONCAT('<a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&outcome_id=', o.outcome_id, '\'>', o.description, '</a>') as des, o.outcome_id, count( c.case_id ) as count, ROUND((count( c.case_id ) / $cases) * 100,2) as perc
|
||||
FROM `case` AS c, `outcome` AS o
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
AND c.current_outcome_id = o.outcome_id
|
||||
@@ -169,46 +157,12 @@ group by s.import_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
{ print "<div class='col-sm-8'><div class='panel panel-body'>";
|
||||
//print "<h4>" . T_("Total cases for questionnaire") . " = <b>$cases</b></h4>";
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count"),T_("%")),"tclass",array("des" => "Complete"),array("count","perc"));
|
||||
|
||||
$operator_id = false;
|
||||
if (isset($_GET['operator_id'])) $operator_id = bigintval($_GET['operator_id']);
|
||||
|
||||
//display a list of operators
|
||||
$sql = "SELECT s.operator_id as value,s.firstname as description, CASE WHEN s.operator_id = '$operator_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM operator as s, operator_questionnaire as q
|
||||
WHERE s.operator_id = q.operator_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
print "<h2>" . T_("Operator") . ": " . "</h2>";
|
||||
if(!empty($r))
|
||||
display_chooser($r,"operator_id","operator_id",true,"questionnaire_id=$questionnaire_id");
|
||||
|
||||
if ($operator_id != false)
|
||||
{
|
||||
print "<p>" . T_("Operator call outcomes") . "</p>";
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count")," " . T_("%")),"tclass",false,array("count","perc"));//array("des" => "Complete")
|
||||
print "</div></div>";
|
||||
|
||||
$sql = "SELECT o.description as des, o.outcome_id, count( c.call_id ) as count, ROUND((count(c.call_id) / (SELECT count(call.call_id) FROM `call` JOIN `case` ON (call.case_id = `case`.case_id AND `case`.questionnaire_id = $questionnaire_id ) WHERE call.operator_id = '$operator_id')) * 100,2) as perc
|
||||
FROM `call` AS c, `case` as ca, `outcome` AS o
|
||||
WHERE ca.questionnaire_id = '$questionnaire_id'
|
||||
AND ca.case_id = c.case_id
|
||||
AND c.operator_id = '$operator_id'
|
||||
AND c.outcome_id = o.outcome_id
|
||||
GROUP BY o.outcome_id";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count"),T_("%")),"tclass",array("des" => "Complete"),array("count","perc"));
|
||||
}
|
||||
}
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
@@ -221,14 +175,13 @@ group by s.import_id";
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
|
||||
print "<h2>" . T_("Sample") . ": " . "</h2>";
|
||||
print "<div class='clearfix '></div><h3 class='col-sm-4 pull-left text-right'>" . T_("Sample") . ": " . "</h3>";
|
||||
if(!empty($r))
|
||||
display_chooser($r,"sample_import_id","sample_import_id",true,"questionnaire_id=$questionnaire_id");
|
||||
|
||||
|
||||
display_chooser($r,"sample_import_id","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left col-sm-4");
|
||||
else print "<h4 class='col-sm-3 text-danger'>" . T_("No samples assigned") . "</h4>";
|
||||
if ($sample_import_id != false)
|
||||
{
|
||||
print "<p>" . T_("Sample status") . "</p>";
|
||||
print "<div class='clearfix form-group'></div><div class='col-sm-4'><div class='panel panel-body'><p>" . T_("Sample status") . "</p>";
|
||||
|
||||
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . TQ_("Drawn from sample") . "' ELSE '" . TQ_("Remain in sample") . "' END as drawn,
|
||||
count(*) as count
|
||||
@@ -238,13 +191,13 @@ group by s.import_id";
|
||||
WHERE s.import_id = '$sample_import_id'
|
||||
GROUP BY (c.sample_id is not null)";
|
||||
|
||||
xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")));
|
||||
xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")), "tclass", false, array("count"));
|
||||
print "</div></div>";
|
||||
|
||||
print "<div class='col-sm-8'><div class='panel panel-body'>"; //<p>" . T_("Outcomes") . "</p>";
|
||||
|
||||
|
||||
print "<p>" . T_("Outcomes") . "</p>";
|
||||
|
||||
|
||||
$sql = "SELECT o.description as des, o.outcome_id, count( c.case_id ) as count,ROUND(count(c.case_id) / (SELECT count(case_id) FROM `case` JOIN sample ON (`case`.sample_id = sample.sample_id AND sample.import_id = '$sample_import_id') WHERE questionnaire_id = '$questionnaire_id' ) * 100,2) as perc
|
||||
$sql = "SELECT CONCAT('<a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&outcome_id=', o.outcome_id, '\'>', o.description, '</a>') as des, o.outcome_id, count( c.case_id ) as count,ROUND(count(c.case_id) / (SELECT count(case_id) FROM `case` JOIN sample ON (`case`.sample_id = sample.sample_id AND sample.import_id = '$sample_import_id') WHERE questionnaire_id = '$questionnaire_id' ) * 100,2) as perc
|
||||
|
||||
FROM `case` AS c, `outcome` AS o, sample as s
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
@@ -262,18 +215,65 @@ group by s.import_id";
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No outcomes recorded for this sample") . "</p>";
|
||||
|
||||
print "</div></div>";
|
||||
}
|
||||
|
||||
$operator_id = false;
|
||||
if (isset($_GET['operator_id'])) $operator_id = bigintval($_GET['operator_id']);
|
||||
|
||||
//display a list of operators !!!worked for this questionnaire_id !!!!
|
||||
$sql = "SELECT s.operator_id as value, s.firstname as description, CASE WHEN s.operator_id = '$operator_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `call` as c , `operator`as s, `case` as ca
|
||||
WHERE ca.questionnaire_id = '$questionnaire_id'
|
||||
AND ca.case_id = c.case_id
|
||||
AND c.operator_id = s.operator_id
|
||||
GROUP by c.operator_id";
|
||||
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
print "<div class='clearfix '></div><h3 class='col-sm-4 pull-left text-right'>" . T_("Operator") . ": " . "</h3>";
|
||||
if(!empty($r))
|
||||
display_chooser($r,"operator_id","operator_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left col-sm-4");
|
||||
else print "<h4 class='col-sm-3 text-danger'>" . T_("No operators assigned") . ". </h4>";
|
||||
print "" ;
|
||||
if ($operator_id != false)
|
||||
{
|
||||
print "<div class='clearfix form-group'></div><div class='col-sm-6'><div class='panel panel-body'><p>" . T_("Operator call outcomes") . "</p>";
|
||||
|
||||
$sql = "SELECT o.description as des, o.outcome_id, count( c.call_id ) as count, ROUND((count(c.call_id) / (SELECT count(call.call_id) FROM `call` JOIN `case` ON (call.case_id = `case`.case_id AND `case`.questionnaire_id = $questionnaire_id ) WHERE call.operator_id = '$operator_id')) * 100,2) as perc
|
||||
FROM `call` AS c, `case` as ca, `outcome` AS o
|
||||
WHERE ca.questionnaire_id = '$questionnaire_id'
|
||||
AND ca.case_id = c.case_id
|
||||
AND c.operator_id = '$operator_id'
|
||||
AND c.outcome_id = o.outcome_id
|
||||
GROUP BY o.outcome_id";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count"),T_("%")),"tclass",array("des" => "Complete"),array("count","perc"));
|
||||
}
|
||||
print "</div></div>";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No outcomes recorded for this questionnaire") . "</p>";
|
||||
|
||||
|
||||
//display a list of shifts with completions and a link to either add a report or view reports
|
||||
print "<h2>" . T_("Shifts") . "</h2>";
|
||||
print "<div class='clearfix'></div>";
|
||||
print "<h3 class='col-sm-4 pull-left text-center'>" . T_("Shifts") . ":</h3>";
|
||||
|
||||
$sql = "SELECT s.shift_id, CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."'), ' - ', DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."')) as description,
|
||||
CASE WHEN sr.shift_id IS NULL THEN CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '&createnewreport=yes\'>" . TQ_("No shift reports: Add report") . "</a>') ELSE CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . TQ_("View shift reports") . "</a>') END AS link, c.completions as completions, CONCAT('<a href=\'operatorperformance.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . TQ_("View operator performance") . "</a>') as operform
|
||||
$sql = "SELECT s.shift_id, CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_FORMAT . "')) as sdate,CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . TIME_FORMAT . "'),'-', DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . TIME_FORMAT . "')) as stime,
|
||||
CASE WHEN sr.shift_id IS NULL THEN
|
||||
CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '&createnewreport=yes\' data-toggle=\'tooltip\' title=\'" . TQ_("No shift reports: Add report") . "\' class=\'btn center-block\'><i class=\'fa fa-plus text-warning\'></i><i class=\'fa fa-file-text-o fa-lg\'></i></a>')
|
||||
ELSE CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\' data-toggle=\'tooltip\' title=\'" . TQ_("View shift reports") . "\' class=\'btn center-block\'><i class=\'fa fa-file-text-o fa-lg\'></i></a>')
|
||||
END AS link,
|
||||
c.completions as completions,
|
||||
CONCAT('<a href=\'operatorperformance.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\' data-toggle=\'tooltip\' title=\'" . TQ_("View operator performance") . "\' class=\'btn center-block\'><i class=\'fa fa-user fa-lg\'></i><i class=\'fa fa-signal \'></i></a>') as operform
|
||||
FROM `shift` as s
|
||||
JOIN operator as o on (o.operator_id = '$admin_operator_id')
|
||||
LEFT JOIN shift_report as sr on (sr.shift_id = s.shift_id)
|
||||
@@ -292,15 +292,15 @@ group by s.import_id";
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if (empty($r))
|
||||
print "<p>" . T_("No shifts defined for this questionnaire") . "</p>";
|
||||
else
|
||||
xhtml_table($r,array("description","completions","link","operform"),array(T_("Shift"),T_("Completions"),T_("Shift report"),T_("Operator performance")),"tclass");
|
||||
|
||||
|
||||
|
||||
print "<h4 class='col-sm-4 text-danger'>" . T_("No shifts defined for this questionnaire") . "</h4>";
|
||||
else {
|
||||
print "<div class='clearfix form-group'></div>";
|
||||
print "<div class='col-sm-6 panel-body' style='max-height:400px; overflow:auto;'>";
|
||||
xhtml_table($r,array("sdate","stime","completions","link","operform"),array(T_("Date"),T_("Shift time"),T_("Completions"),T_("Shift report"),T_("Operator performance")),"tclass");
|
||||
print "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign availability groups to a questionnaire
|
||||
*
|
||||
*
|
||||
* 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 Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @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("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_availability(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_availability
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign availability group to questionnaire"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning an availability group to a questionnaire will allow interviewers to select from those groups to restrict calls to a particular case to the times within the group") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_availability as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no availability groups selected for this questionnaire") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Availability groups selected for this questionnaire") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_availability as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add an availability group to this questionnaire:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select availability group:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add availability group") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,157 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign call attempt time slots to a questionnaire
|
||||
*
|
||||
*
|
||||
* 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 Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @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("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_timeslot(questionnaire_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign call attempt time slots to questionnaire"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no call attempt time slots selected for this questionnaire") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Call attempt time slots selected for this questionnaire") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_timeslot as q ON (q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add a call attempt time slot to this questionnaire:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select call attempt time slot:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add call attempt time slot") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,172 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Assign call attempt time slots to a questionnaire sample
|
||||
*
|
||||
*
|
||||
* 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 Inc (ACSPRI) 2011
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @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("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Display functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['availability_group']))
|
||||
{
|
||||
//need to add availability_group to questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['availability_group']);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_timeslot (questionnaire_id,sample_import_id,availability_group_id)
|
||||
VALUES('$questionnaire_id','$sample_import_id','$availability_group')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['questionnaire_id']) && isset($_GET['sample_import_id']) && isset($_GET['ravailability_group']))
|
||||
{
|
||||
//need to remove rsid from questionnaire
|
||||
|
||||
$questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
$sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
$availability_group = bigintval($_GET['ravailability_group']);
|
||||
|
||||
$sql = "DELETE FROM questionnaire_sample_timeslot
|
||||
WHERE questionnaire_id = '$questionnaire_id'
|
||||
AND sample_import_id = '$sample_import_id'
|
||||
AND availability_group_id = '$availability_group'";
|
||||
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Assign call attempt time slots to questionnaire sample"),true,false,array("../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Assigning call attempt time slots to questionnaires will only allow cases to be attempted in a time slot for the n + 1th time where it has been attempted at least n times in all assigned timeslots. Please note timeslots must cover all possible time periods otherwise no cases will be available during missing timeslots.") ."</p>";
|
||||
|
||||
print "<h3>" . T_("Select a questionnaire from the list below") . "</h3>";
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<h3>" . T_("Select a sample from the list below") . "</h3>";
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
|
||||
if ($sample_import_id !== false)
|
||||
{
|
||||
|
||||
$sql = "SELECT q.availability_group_id,a.description as description
|
||||
FROM questionnaire_sample_timeslot as q, availability_group as a
|
||||
WHERE q.availability_group_id = a.availability_group_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
AND q.sample_import_id = '$sample_import_id'";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
{
|
||||
print "<h2>" . T_("There are no call attempt time slots selected for this questionnaire sample") . "</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Call attempt time slots selected for this questionnaire sample") . "</h2>";
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?sample_import_id=$sample_import_id&questionnaire_id=$questionnaire_id&ravailability_group={$q['availability_group_id']}\">{$q['availability_group_id']} - {$q['description']} (" . T_("Click to unassign") . ")</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT si.availability_group_id,si.description
|
||||
FROM availability_group as si
|
||||
LEFT JOIN questionnaire_sample_timeslot as q ON (q.sample_import_id = '$sample_import_id' AND q.questionnaire_id = '$questionnaire_id' AND q.availability_group_id = si.availability_group_id)
|
||||
WHERE q.questionnaire_id is NULL";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($qs))
|
||||
{
|
||||
|
||||
|
||||
print "<h2>" . T_("Add a call attempt time slot to this questionnaire sample:") . "</h2>";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p><label for="availability_group"><?php echo T_("Select call attempt time slot:"); ?></label><select name="availability_group" id="availability_group">
|
||||
<?php
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<option value=\"{$q['availability_group_id']}\">{$q['description']}</option>";
|
||||
}
|
||||
|
||||
?>
|
||||
</select><br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sample_import_id); ?>"/>
|
||||
<input type="submit" name="add_availability" value="<?php echo TQ_("Add call attempt time slot") ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
@@ -32,23 +32,38 @@
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
include ("../config.inc.php");
|
||||
include("../config.inc.php");
|
||||
|
||||
/**
|
||||
* Database file
|
||||
*/
|
||||
include ("../db.inc.php");
|
||||
include("../db.inc.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.display.php");
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
/**
|
||||
* CKEditor
|
||||
*/
|
||||
include("../functions/functions.limesurvey.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
*/
|
||||
include("../functions/functions.operator.php");
|
||||
|
||||
/**
|
||||
* CKEditor
|
||||
*/
|
||||
@@ -56,6 +71,23 @@ include("../include/ckeditor/ckeditor.php");
|
||||
|
||||
global $db;
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js"
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/new.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
if (isset($_POST['questionnaire_id']) && isset($_POST['submit']))
|
||||
{
|
||||
@@ -208,7 +240,6 @@ if (isset($_POST['questionnaire_id']) && isset($_POST['submit']))
|
||||
$db->Execute($sql);
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['disable']))
|
||||
@@ -246,7 +277,7 @@ if (isset($_POST['update']) && isset($_GET['modify']))
|
||||
if (isset($_POST['rws'])) $rws = 1;
|
||||
if (isset($_POST['respsc'])) $respsc = 1;
|
||||
if (isset($_POST['referral'])) $referral = 1;
|
||||
|
||||
|
||||
$name = $db->qstr(html_entity_decode($_POST['description'],ENT_QUOTES,'UTF-8'));
|
||||
if (isset($_POST['rs_intro']))
|
||||
{
|
||||
@@ -259,7 +290,6 @@ if (isset($_POST['update']) && isset($_GET['modify']))
|
||||
$info = $db->qstr(html_entity_decode($_POST['info'],ENT_QUOTES,'UTF-8'));
|
||||
$rs_project_end = $db->qstr(html_entity_decode($_POST['rs_project_end'],ENT_QUOTES,'UTF-8'));
|
||||
|
||||
|
||||
$sql = "UPDATE questionnaire
|
||||
SET description = $name, info = $info, rs_project_end = $rs_project_end, restrict_appointments_shifts = '$ras', restrict_work_shifts = '$rws', self_complete = $respsc, referral = $referral
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
@@ -271,7 +301,6 @@ if (isset($_POST['update']) && isset($_GET['modify']))
|
||||
$sql = "UPDATE questionnaire
|
||||
SET rs_intro = $rs_intro, rs_project_intro = $rs_project_intro, rs_callback = $rs_callback, rs_answeringmachine = $rs_answeringmachine
|
||||
WHERE questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
@@ -284,42 +313,17 @@ if (isset($_POST['update']) && isset($_GET['modify']))
|
||||
$sql = "UPDATE questionnaire
|
||||
SET lime_mode = $lime_mode, lime_template = $lime_template, lime_endurl = $lime_endurl
|
||||
WHERE questionnaire_id = $questionnaire_id";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
xhtml_head(T_("Questionnaire list"),true,array("../css/table.css"),array("../js/new.js"));
|
||||
|
||||
|
||||
if (isset($_GET['modify']))
|
||||
{
|
||||
$questionnaire_id = intval($_GET['modify']);
|
||||
|
||||
$CKEditor = new CKEditor();
|
||||
$CKEditor->basePath = "../include/ckeditor/";
|
||||
|
||||
$ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
||||
array("Cut","Copy","Paste","PasteText","PasteFromWord","-","Print","SpellChecker"),
|
||||
array("Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"),
|
||||
"/",
|
||||
array("Bold","Italic","Underline","Strike","-","Subscript","Superscript"),
|
||||
array("NumberedList","BulletedList","-","Outdent","Indent","Blockquote"),
|
||||
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
|
||||
array('BidiLtr', 'BidiRtl'),
|
||||
array('Link','Unlink','Anchor'),
|
||||
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
||||
"/",
|
||||
array('Styles','Format','Font','FontSize'),
|
||||
array('TextColor','BGColor'),
|
||||
array('About')),
|
||||
"extraPlugins" => "tokens");
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = $questionnaire_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$referral = $testing = $rws = $ras = $rsc = "checked=\"checked\"";
|
||||
@@ -330,7 +334,6 @@ if (isset($_GET['modify']))
|
||||
if ($rs['lime_mode'] == "question") $qbq = "selected=\"selected\"";
|
||||
if ($rs['lime_mode'] == "group") $gat = "selected=\"selected\"";
|
||||
|
||||
|
||||
if ($rs['restrict_appointments_shifts'] != 1) $ras = "";
|
||||
if ($rs['restrict_work_shifts'] != 1) $rws = "";
|
||||
if ($rs['testing'] != 1) $testing = "";
|
||||
@@ -340,49 +343,168 @@ if (isset($_GET['modify']))
|
||||
$rsc = "";
|
||||
$rscd = "style='display:none;'";
|
||||
}
|
||||
|
||||
xhtml_head(T_("Modify Questionnaire "),true,$css,$js_head, false, false, false, "  <span class=' text-uppercase'>" . "$rs[description]" . "</span>");
|
||||
|
||||
echo "<h1>" . $rs['description'] . "</h1>";
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
echo "<p><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}'>" . T_("Edit instrument in Limesurvey") . "</a></p>";
|
||||
?>
|
||||
<form action="?modify=<?php echo $questionnaire_id; ?>" method="post">
|
||||
<p><?php echo T_("Name for questionnaire:"); ?> <input type="text" name="description" value="<?php echo $rs['description']; ?>"/></p>
|
||||
<p><?php echo T_("Restrict appointments to shifts?"); ?> <input name="ras" type="checkbox" <?php echo $ras; ?>/></p>
|
||||
<p><?php echo T_("Restrict work to shifts?"); ?> <input name="rws" type="checkbox" <?php echo $rws; ?>/></p>
|
||||
<p><?php echo T_("Questionnaire for testing only?"); ?> <input name="testing" type="checkbox" disabled="true" <?php echo $testing; ?>/></p>
|
||||
<p><?php echo T_("Allow operators to generate referrals?"); ?> <input name="referral" type="checkbox" <?php echo $referral; ?>/></p>
|
||||
<p><?php echo T_("Allow for respondent self completion via email invitation?"); ?> <input name="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" /></p>
|
||||
<div id='limesc' <?php echo $rscd; ?>>
|
||||
<p><?php echo T_("Questionnaire display mode for respondent");?>: <select name="lime_mode"><option <?php echo $aio;?> value="survey"><?php echo T_("All in one"); ?></option><option <?php echo $qbq; ?> value="question"><?php echo T_("Question by question"); ?></option><option <?php echo $gat; ?> value="group"><?php echo T_("Group at a time"); ?></option></select></p>
|
||||
<p><?php echo T_("Limesurvey template for respondent");?>: <select name="lime_template">
|
||||
<?php
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\" ";
|
||||
if ($rs['lime_template'] == $entry) echo " selected=\"selected\" ";
|
||||
echo ">$entry</option>";
|
||||
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
</select></p>
|
||||
<p><?php echo T_("URL to forward respondents on self completion (required)");?>: <input name="lime_endurl" type="text" value="<?php echo $rs['lime_endurl']; ?>"/></p>
|
||||
$CKEditor = new CKEditor();
|
||||
$CKEditor->basePath = "../include/ckeditor/";
|
||||
|
||||
$ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
|
||||
array("Cut","Copy","Paste","PasteText","PasteFromWord","-","Print","SpellChecker"),
|
||||
array("Undo","Redo","-","Find","Replace","-","SelectAll","RemoveFormat"),
|
||||
array('Link','Unlink','Anchor'),
|
||||
array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'),
|
||||
array('About'),
|
||||
"/",
|
||||
array("Bold","Italic","Underline","Strike","-","Subscript","Superscript"),
|
||||
array("NumberedList","BulletedList","-","Outdent","Indent","Blockquote"),
|
||||
array('JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
|
||||
array('BidiLtr', 'BidiRtl'),
|
||||
array('Styles','Format','Font','FontSize'),
|
||||
array('TextColor','BGColor')),
|
||||
"extraPlugins" => "tokens");
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2"><a href='questionnairelist.php' class='btn btn-default pull-left' ><i class='fa fa-chevron-left fa-lg' style='color:blue;'></i> <?php echo T_("Go back"); ?></a></div>
|
||||
<div class="col-sm-8"><?php // ?> </div>
|
||||
<div class="col-sm-2"><?php echo "<a class='btn btn-default btn-lime pull-right' href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_sid']}'><i class='fa fa-edit' style='color:blue;'></i> " . T_("Edit instrument in Limesurvey") . " </a>"; ?> </div>
|
||||
</div>
|
||||
|
||||
<form action="?modify=<?php echo $questionnaire_id; ?>" method="post" class="form-horizontal col-sm-12 form-group ">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Edit")," ", T_("Name for questionnaire:"); ?> </label>
|
||||
<div class="col-sm-4"><input type="text" name="description" class="form-control" required value="<?php echo $rs['description']; ?>" label="<?php echo T_("Name for questionnaire:") ; ?> "/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Restrict appointments to shifts?"); ?> </label>
|
||||
<div class="col-sm-4" style="height: 30px;"><input name="ras" type="checkbox" <?php echo $ras; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/> </div>
|
||||
</div>
|
||||
<div class="form-group"><label class="col-sm-4 control-label" ><?php echo T_("Restrict work to shifts?"); ?> </label>
|
||||
<div class="col-sm-4" style="height: 30px;" ><input name="rws" type="checkbox" <?php echo $rws; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire for testing only?"); ?> </label>
|
||||
<div class="col-sm-4" style="height: 30px;" ><input name="testing" type="checkbox" disabled="true" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php echo $testing; ?> data-onstyle="danger" data-width="80"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow operators to generate referrals?"); ?></label>
|
||||
<div class="col-sm-4" style="height: 30px;"> <input name="referral" type="checkbox" <?php echo $referral; ?> data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||
<div class="col-sm-4" style="height: 30px;"><input name="respsc" id="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) {show(this,'limesc'); $('#url').attr('required','required');} else{ hide(this,'limesc'); $('#url').removeAttr('required');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||
</div>
|
||||
<div id="limesc" <?php echo $rscd; ?> >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Questionnaire display mode for respondent");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="lime_mode">
|
||||
<option <?php echo $aio;?> value="survey"><?php echo T_("All in one"); ?></option>
|
||||
<option <?php echo $qbq;?> value="question"><?php echo T_("Question by question"); ?></option>
|
||||
<option <?php echo $gat;?> value="group"><?php echo T_("Group at a time"); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" ><?php echo T_("Limesurvey template for respondent");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" name="lime_template">
|
||||
<?php
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\" ";
|
||||
if ($rs['lime_template'] == $entry) echo " selected=\"selected\" ";
|
||||
echo ">$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" name="lime_endurl" id="url" type="url" value="<?php echo $rs['lime_endurl']; ?>"/>
|
||||
</div>
|
||||
<?php if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) { ?>
|
||||
<p><?php echo T_("Respondent selection introduction:"); echo $CKEditor->editor("rs_intro",$rs['rs_intro'],$ckeditorConfig);?></p>
|
||||
<p><?php echo T_("Respondent selection project introduction:"); echo $CKEditor->editor("rs_project_intro",$rs['rs_project_intro'],$ckeditorConfig);?></p>
|
||||
<p><?php echo T_("Respondent selection callback (already started questionnaire):"); echo $CKEditor->editor("rs_callback",$rs['rs_callback'],$ckeditorConfig);?> </p>
|
||||
<p><?php echo T_("Message to leave on an answering machine:"); echo $CKEditor->editor("rs_answeringmachine",$rs['rs_answeringmachine'],$ckeditorConfig);?> </p>
|
||||
<?php } else if (!empty($rs['lime_rs_sid'])) { echo "<p><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></p>"; } ?>
|
||||
<p><?php echo T_("Project end text (thank you screen):");echo $CKEditor->editor("rs_project_end",$rs['rs_project_end'],$ckeditorConfig); ?></p>
|
||||
<p><?php echo T_("Project information for interviewers/operators:");echo $CKEditor->editor("info",$rs['info'],$ckeditorConfig); ?></p>
|
||||
<p><input type="submit" name="update" value="<?php echo T_("Update Questionnaire"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($rs['respondent_selection'] == 1 && empty($rs['lime_rs_sid'])) { ?>
|
||||
|
||||
<div class="panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection introduction:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_intro",$rs['rs_intro'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary "><?php echo T_("Respondent selection project introduction:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_project_intro",$rs['rs_project_intro'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title text-primary"><?php echo T_("Respondent selection callback (already started questionnaire):");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_callback",$rs['rs_callback'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title "><?php echo T_("Message to leave on an answering machine:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("rs_answeringmachine",$rs['rs_answeringmachine'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
else if (!empty($rs['lime_rs_sid'])) {
|
||||
echo "<div class='well text-center'><a href='" . LIME_URL . "admin/admin.php?sid={$rs['lime_rs_sid']}'>" . T_("Edit respondent selection instrument in Limesurvey") . "</a></div>"; }
|
||||
?>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title "><?php echo T_("Project end text (thank you screen):");?></h3>
|
||||
</div>
|
||||
<div class="content" >
|
||||
<?php echo $CKEditor->editor("rs_project_end",$rs['rs_project_end'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default ">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-fw fa-2x wminimize fa-chevron-circle-up text-primary pull-left" data-toggle="tooltip" title="<?php echo T_("Expand/Collapse");?>" style="margin-top: -5px;"></i>
|
||||
<h3 class="panel-title"><?php echo T_("Project information for interviewers/operators:");?></h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php echo $CKEditor->editor("info",$rs['info'],$ckeditorConfig);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="questionnairelist.php" class="btn btn-default"><i class="fa fa-chevron-left fa-lg" style="color:blue;"></i> <?php echo T_("Go back") ; ?></a>
|
||||
<input type="submit" class="btn btn-primary col-sm-offset-4" name="update" value="<?php echo T_("Update Questionnaire"); ?>"/>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else if (isset($_GET['delete']))
|
||||
{
|
||||
@@ -391,47 +513,89 @@ else if (isset($_GET['delete']))
|
||||
$sql = "SELECT *
|
||||
FROM questionnaire
|
||||
WHERE questionnaire_id = $questionnaire_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
echo "<h1>" . $rs['description'] . "</h1>";
|
||||
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
xhtml_head(T_("Delete Questionnaire"),true,$css,$js_head, false, false, false, " <span class='text-uppercase'>" . "$rs[description]" . "</span>");
|
||||
|
||||
print "<p>" . T_("Any collected data and the limesurvey instrument will NOT be deleted") . "</p>";
|
||||
print "<div class='alert alert-danger'><p>" . T_("Any collected data and the limesurvey instrument will NOT be deleted") . "</p>";
|
||||
print "<p>" . T_("The questionnaire will be deleted from queXS including call history, cases, case notes, respondent details, appointments and the links between operators, clients and the questionnaire") . "</p>";
|
||||
print "<p>" . T_("Please confirm you wish to delete the questionnaire") . "</p>";
|
||||
print "<p>" . T_("Please confirm you wish to delete the questionnaire") . "</p></div>";
|
||||
|
||||
print "<form method='post' action='?'>";
|
||||
print "<p><input type='submit' name='submit' value=\"" . T_("Delete this questionnaire") . "\"/>";
|
||||
print "<p>  <a href='questionnairelist.php' class='btn btn-default' ><i class='fa fa-chevron-left fa-lg' style='color:blue;'></i> " . T_("Go back") . "</a><input type='submit' name='submit' class='btn btn-danger col-sm-offset-4' value=\"" . T_("Delete this questionnaire") . "\"/>";
|
||||
print "<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/></p>";
|
||||
print "</form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$columns = array("description","enabledisable","modify","deletee");
|
||||
$titles = array(T_("Questionnaire"),T_("Enable/Disable"),T_("Modify"),T_("Delete"));
|
||||
|
||||
$sql = "SELECT
|
||||
description,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<a href=\'?enable=',questionnaire_id,'\'>" . TQ_("Enable") . "</a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?disable=',questionnaire_id,'\'>" . TQ_("Disable") . "</a>')
|
||||
END
|
||||
as enabledisable,
|
||||
CONCAT('<a href=\'?modify=',questionnaire_id,'\'>" . TQ_("Modify"). "</a>') as modify,
|
||||
CONCAT('<a href=\'?delete=',questionnaire_id,'\'>" . TQ_("Delete"). "</a>') as deletee
|
||||
xhtml_head(T_("Questionnaire management"),true,$css,$js_head, false, false, false, "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> " . 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> " . T_("Create a new questionnaire") . "</a>
|
||||
</div>";
|
||||
print "<div>"; // add timeslots, callattempts, quotas?
|
||||
|
||||
$sql = "SELECT
|
||||
CONCAT(' <b class=\'badge\'>',questionnaire_id,'</b> ') as qid,
|
||||
CONCAT('<h4>',description,'</h4>') as description,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT(' <span class=\'btn label label-default\'>" . TQ_("Disabled") . "</span> ')
|
||||
ELSE
|
||||
CONCAT(' <span class=\'btn label label-primary\'>" . TQ_("Enabled") . "</span> ')
|
||||
END as status,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT(' <a href=\'?enable=',questionnaire_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Enable") . "\' class=\'fa fa-toggle-off fa-3x\' style=\'color:grey;\'></i></a> ')
|
||||
ELSE
|
||||
CONCAT(' <a href=\'\' data-toggle=\'confirmation\' data-href=\'?disable=',questionnaire_id,'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Disable") . "\' class=\'fa fa-toggle-on fa-3x\'></i></a> ')
|
||||
END as enabledisable,
|
||||
CONCAT('<a href=\'?modify=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Edit Questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-edit fa-2x \'></i></a>') as modify,
|
||||
CONCAT('<a href=\'" . LIME_URL . "admin/admin.php?sid=',lime_sid,'\' class=\'btn\' title=\'" . T_("Edit Lime survey") . " ',lime_sid,'\' data-toggle=\'tooltip\'><i class=\'btn-lime fa fa-lemon-o fa-2x\'></i></a>') as inlime,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-calendar fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'addshift.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Shifts") . " \n" . TQ_("questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-calendar fa-2x\'></i></a>')
|
||||
END as shifts,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-square-o fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'questionnaireprefill.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Pre-fill questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-check-square-o fa-2x\'></i></a>')
|
||||
END as prefill,
|
||||
CASE WHEN enabled = 1 THEN
|
||||
CONCAT('<i class=\'btn fa fa-trash-o fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?delete=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Delete questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-trash-o fa-2x\' style=\'color:red;\'></i></a>')
|
||||
END as deletee,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-bar-chart fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'outcomes.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Outcomes for questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-bar-chart fa-2x\'></i></a>')
|
||||
END as outcomes,
|
||||
CONCAT('<a href=\'callhistory.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Call history"). " \n" . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-phone fa-2x\'></i></a>') as calls,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-download fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'dataoutput.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Data output"). " \n" . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-download fa-2x\'></i></a>')
|
||||
END as dataout,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-book fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'assignsample.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Assigned samples"). "\' data-toggle=\'tooltip\'><i class=\'fa fa-book fa-2x\'></i></a>')
|
||||
END as assample,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-question-circle fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'casestatus.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Case status and assignment"). "\' data-toggle=\'tooltip\'><i class=\'fa fa-question-circle fa-2x\'></i></a>')
|
||||
END as casestatus
|
||||
FROM questionnaire";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
$columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","dataout","modify","inlime","prefill","deletee");
|
||||
xhtml_table($rs,$columns,false,"table-hover table-condensed ");
|
||||
|
||||
xhtml_table($rs,$columns,$titles);
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('[data-toggle="confirmation"]').confirmation();
|
||||
</script>
|
||||
|
||||
@@ -96,18 +96,19 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['questionnaire_prefill_id'])
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Pre fill questionnaire: Set values for questionnaire to prefill"),true,false,array("../js/window.js"));
|
||||
print "<h1>" . T_("Select a questionnaire from the list below") . "</h1>";
|
||||
xhtml_head(T_("Pre fill questionnaire: Set values for questionnaire to prefill"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Select a questionnaire") . ": </h3>";
|
||||
|
||||
$sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id = '$questionnaire_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
$sql = "SELECT questionnaire_id as value,description,
|
||||
CASE WHEN questionnaire_id = '$questionnaire_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1";
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id");
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id", true,false,true,true,false,true,"form-inline form-group");
|
||||
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
print "<h1>" . T_("Current pre fills (click to delete)") . "</h1>";
|
||||
print "<h2>" . T_("Current pre fills") . "</h2>";
|
||||
|
||||
$sql = "SELECT questionnaire_prefill_id,lime_sgqa,value
|
||||
FROM questionnaire_prefill
|
||||
@@ -117,19 +118,18 @@ if ($questionnaire_id != false)
|
||||
|
||||
if (empty($r))
|
||||
{
|
||||
print "<p>" . T_("Currently no pre fills") . "</p>";
|
||||
print "<p class='well text-info'>" . T_("Currently no pre fills") . "</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($r as $v)
|
||||
{
|
||||
print "<div><a href='?questionnaire_id=$questionnaire_id&questionnaire_prefill_id={$v['questionnaire_prefill_id']}'>{$v['lime_sgqa']}: {$v['value']}</a></div>";
|
||||
|
||||
print "<ul class='form-group clearfix'><p class='col-sm-2'>" . T_("SGQA code") . ": <b class='text-primary'>{$v['lime_sgqa']}</b></p><p class='col-sm-4'>" . T_("Sample variable") . ": <b class='text-primary'>{$v['value']}</b></p><a href='?questionnaire_id=$questionnaire_id&questionnaire_prefill_id={$v['questionnaire_prefill_id']}'><i class='fa fa-lg text-danger'>" . T_("Delete") . "</i></a></ul>";
|
||||
}
|
||||
}
|
||||
print "";
|
||||
|
||||
|
||||
print "<h1>" . T_("Select a question to pre fill") . "</h1>";
|
||||
print "<h3 class='pull-left'>" . T_("Select a question to pre fill") . " </h3>";
|
||||
|
||||
$sql = "SELECT lime_sid
|
||||
FROM questionnaire
|
||||
@@ -143,7 +143,7 @@ if ($questionnaire_id != false)
|
||||
if (isset($_GET['sgqa'])) $sgqa = $_GET['sgqa'];
|
||||
|
||||
$sql = "SELECT CONCAT( q.sid, 'X', q.gid, 'X', q.qid) AS value,
|
||||
CASE WHEN qo.question IS NULL THEN q.question ELSE CONCAT(qo.question,' : ',q.question) END as description,
|
||||
CONCAT( q.sid, 'X', q.gid, 'X', q.qid, ' -> ' , CASE WHEN qo.question IS NULL THEN q.question ELSE CONCAT(qo.question,' : ',q.question) END) as description,
|
||||
CASE WHEN CONCAT(q.sid, 'X', q.gid, 'X', q.qid) = '$sgqa' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `" . LIME_PREFIX . "questions` AS q
|
||||
LEFT JOIN `" . LIME_PREFIX . "questions` as qo ON (qo.qid = q.parent_qid)
|
||||
@@ -154,45 +154,43 @@ if ($questionnaire_id != false)
|
||||
|
||||
for ($i=0; $i<count($rs); $i++)
|
||||
{
|
||||
$rs[$i]['description'] = substr(strip_tags($rs[$i]['description']),0,100);
|
||||
$rs[$i]['description'] = substr(strip_tags($rs[$i]['description']),0,400);
|
||||
}
|
||||
|
||||
display_chooser($rs,"sgqa","sgqa",true,"questionnaire_id=$questionnaire_id");
|
||||
|
||||
display_chooser($rs,"sgqa","sgqa",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
if ($sgqa != false)
|
||||
{
|
||||
print "<h1>" . T_("Enter a value to pre fill this question with:") . "</h1>";
|
||||
print "<p>";
|
||||
print "<h2 >" . T_("Enter a value to pre fill this question with:") . "</h2>";
|
||||
print "<div class='well'><p>";
|
||||
print T_("Possible uses:");
|
||||
print "</p><ul>";
|
||||
print "<li>" . T_("{Respondent:firstName} First name of the respondent") . "</li>";
|
||||
print "<li>" . T_("{Respondent:lastName} Last name of the respondent") . "</li>";
|
||||
print "<li>" . T_("{Sample:var} A record from the sample where the column name is 'var'") . "</li>";
|
||||
print "</ul></div>";
|
||||
|
||||
$sql = "SELECT sv.var as description, CONCAT('{Sample:', sv.var, '}') as value
|
||||
FROM `sample` AS s, sample_var AS sv, questionnaire_sample as qs
|
||||
$sql = "SELECT sivr.var as description, CONCAT('{Sample:', sivr.var, '}') as value
|
||||
FROM `sample_import_var_restrict` as sivr, questionnaire_sample as qs
|
||||
WHERE qs.questionnaire_id = '$questionnaire_id'
|
||||
AND s.import_id = qs.sample_import_id
|
||||
AND s.sample_id = sv.sample_id
|
||||
GROUP BY sv.var";
|
||||
|
||||
print "</ul>";
|
||||
AND sivr.sample_import_id = qs.sample_import_id";
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p>
|
||||
<label for="value"><?php echo T_("The value to pre fill"); ?> </label><input type="text" name="value" id="value"/> <br/>
|
||||
<label for="svar"><?php echo T_("or: Select pre fill from sample list"); ?> </label>
|
||||
<form action="" method="get" class="form-inline form-group">
|
||||
<label for="value"><?php echo T_("The value to pre fill"); ?>: </label><input type="text" name="value" id="value" size="50" class="form-control"/>
|
||||
<label for="svar"> <?php echo T_("or: Select pre fill from sample list"); ?> </label>
|
||||
<?php //display a list of possible sample variables for this questionnaire
|
||||
display_chooser($db->GetAll($sql),"svar","svar",true,false,false,false,false);
|
||||
?> <br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
display_chooser($db->GetAll($sql),"svar","svar",true,false,false,true,false,true,"form-group");
|
||||
?>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sgqa" value="<?php print($sgqa); ?>"/>
|
||||
<input type="submit" name="add_prefill" value="<?php print(T_("Add pre fill")); ?>"/></p>
|
||||
<input type="submit" name="add_prefill" class="btn btn-primary fa" value="<?php print(T_("Add pre fill")); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -106,32 +106,41 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['questionnaire_sample_quota_
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Quota management"),true,false,array("../js/window.js"));
|
||||
print "<h1>" . T_("Select a questionnaire from the list below") . "</h1>";
|
||||
xhtml_head(T_("Quota management"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Questionnaire") . ": </h3>";
|
||||
|
||||
$sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id = '$questionnaire_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1";
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id");
|
||||
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id", true,false,true,true,false,true,"form-inline pull-left ");
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
print "<h1>" . T_("Select a sample from the list below") . "</h1>";
|
||||
|
||||
|
||||
$sql = "SELECT s.sample_import_id as value,s.description, CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import as s, questionnaire_sample as q
|
||||
WHERE q.questionnaire_id = $questionnaire_id
|
||||
AND q.sample_import_id = s.sample_import_id";
|
||||
$s = $db->GetAll($sql);
|
||||
if (!empty($s)){
|
||||
|
||||
print "<h3 class='form-inline pull-left'>   " . T_("Sample") . ":  </h3>";
|
||||
display_chooser($db->GetAll($sql),"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
||||
|
||||
} else {
|
||||
print "<div class='clearfix'></div><div class='well text-info'>" . T_("No samples assigned to this questionnaire.") . "</div>";
|
||||
|
||||
}
|
||||
|
||||
display_chooser($db->GetAll($sql),"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id");
|
||||
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
if ($sample_import_id != false)
|
||||
{
|
||||
print "<h1>" . T_("Current quotas (click to delete)") . "</h1>";
|
||||
print "<h2>" . T_("Current quotas") . ":</h2>";//(click to delete)
|
||||
|
||||
$sql = "SELECT questionnaire_sample_quota_id,lime_sgqa,value,completions,quota_reached,lime_sid,comparison
|
||||
FROM questionnaire_sample_quota as qsq, questionnaire as q
|
||||
@@ -143,7 +152,7 @@ if ($questionnaire_id != false)
|
||||
|
||||
if (empty($r))
|
||||
{
|
||||
print "<p>" . T_("Currently no quotas") . "</p>";
|
||||
print "<p class='well text-info'>" . T_("Currently no quotas") . "</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -164,7 +173,7 @@ if ($questionnaire_id != false)
|
||||
}
|
||||
|
||||
|
||||
print "<h1>" . T_("Select a question for the quota") . "</h1>";
|
||||
print "<h3 class=' '>" . T_("Select a question for the quota") . "</h3>";
|
||||
|
||||
$sql = "SELECT lime_sid
|
||||
FROM questionnaire
|
||||
@@ -177,52 +186,76 @@ if ($questionnaire_id != false)
|
||||
$sgqa = false;
|
||||
if (isset($_GET['sgqa'])) $sgqa = $_GET['sgqa'];
|
||||
|
||||
$sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value, CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, CASE WHEN CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) = '$sgqa' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
$sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value,
|
||||
CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description,
|
||||
CASE WHEN CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) = '$sgqa' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `" . LIME_PREFIX . "questions` AS lq
|
||||
LEFT JOIN `" . LIME_PREFIX . "questions` AS lq2 ON ( lq2.qid = lq.parent_qid )
|
||||
JOIN `" . LIME_PREFIX . "groups` as g ON (g.gid = lq.gid)
|
||||
WHERE lq.sid = '$lime_sid'
|
||||
ORDER BY CASE WHEN lq2.question_order IS NULL THEN lq.question_order ELSE lq2.question_order + (lq.question_order / 1000) END ASC";
|
||||
|
||||
|
||||
display_chooser($db->GetAll($sql),"sgqa","sgqa",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id");
|
||||
|
||||
display_chooser($db->GetAll($sql),"sgqa","sgqa",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-group");
|
||||
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
if ($sgqa != false)
|
||||
{
|
||||
print "<h1>" . T_("Enter the details for creating the quota:") . "</h1>";
|
||||
print "<h2>" . T_("Pre defined values for this question:") . "</h2>";
|
||||
|
||||
print "<div class='col-sm-6 panel-body'><h3>" . T_("Enter the details for creating the quota:") . "</h3>";
|
||||
|
||||
?>
|
||||
<form action="" method="get" class="form-inline form-group">
|
||||
|
||||
<p><label for="comparison"><?php echo T_("The type of comparison"); ?>: </label>
|
||||
<select name="comparison" class='form-control' id="comparison">
|
||||
<option value="LIKE">LIKE</option>
|
||||
<option value="NOT LIKE">NOT LIKE</option>
|
||||
<option value="=">=</option><option value="!=">!=</option>
|
||||
<option value="<"><</option>
|
||||
<option value=">">></option>
|
||||
<option value="<="><=</option>
|
||||
<option value=">=">>=</option></select></p>
|
||||
|
||||
<p><label for="value"><?php echo T_("The code value to compare"); ?>: </label>
|
||||
<input type="text" name="value" id="value" class="form-control" size="35" required /></p>
|
||||
|
||||
<p><label for="completions"><?php echo T_("The number of completions to stop calling at"); ?>: </label>
|
||||
<input type="number" name="completions" id="completions" class="form-control" size="6" maxlength="6" style="width:8em;" required /></p>
|
||||
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sample_import_id); ?>"/>
|
||||
<input type="hidden" name="sgqa" value="<?php print($sgqa); ?>"/>
|
||||
|
||||
<p><input type="submit" name="add_quota" value="<?php print(T_("Add quota")); ?>" class="btn btn-primary fa"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
print "</div>";
|
||||
|
||||
print "<div class='col-sm-6 panel-body'><h3>" . T_("Code values for this question") . ":</h3>";
|
||||
|
||||
$qid = explode("X", $sgqa);
|
||||
$qid = $qid[2];
|
||||
|
||||
$sql = "SELECT l.code,l.answer as title
|
||||
$sql = "SELECT CONCAT('<b class=\'fa\'> ', l.code , '</b>')as code,l.answer as title
|
||||
FROM `" . LIME_PREFIX . "answers` as l
|
||||
WHERE l.qid = '$qid'";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!isset($rs) || empty($rs))
|
||||
print "<p>" . T_("No labels defined for this question") ."</p>";
|
||||
print "<p class='well text-info'>" . T_("No labels defined for this question") ."</p>";
|
||||
else
|
||||
xhtml_table($rs,array('code','title'),array(T_("Code value"), T_("Description")));
|
||||
|
||||
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p>
|
||||
<label for="value"><?php echo T_("The code value to compare"); ?> </label><input type="text" name="value" id="value"/> <br/>
|
||||
<label for="comparison"><?php echo T_("The type of comparison"); ?></label><select name="comparison" id="comparison"><option value="LIKE">LIKE</option><option value="NOT LIKE">NOT LIKE</option><option value="=">=</option><option value="!=">!=</option><option value="<"><</option><option value=">">></option><option value="<="><=</option><option value=">=">>=</option></select><br/>
|
||||
<label for="completions"><?php echo T_("The number of completions to stop calling at"); ?> </label><input type="text" name="completions" id="completions"/> <br/>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sample_import_id); ?>"/>
|
||||
<input type="hidden" name="sgqa" value="<?php print($sgqa); ?>"/>
|
||||
<input type="submit" name="add_quota" value="<?php print(T_("Add quota")); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
print "</div>";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -106,19 +106,20 @@ if (isset($_POST['submit']))
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Quota report"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Quota report"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/font-awesome/css/font-awesome.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/bootstrap/js/bootstrap.min.js","../include/iCheck/icheck.min.js","../js/window.js"));
|
||||
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Select a questionnaire") . ": </h3>";
|
||||
|
||||
print "<h2>" . T_("Select a questionnaire from the list below") . "</h2>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline form-group", "form-control");
|
||||
|
||||
if ($questionnaire_id)
|
||||
{
|
||||
print "<h2>" . T_("Select a sample from the list below") . "</h2>";
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Select a sample") . ": </h3>";
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline form-group clearfix", "form-control");
|
||||
|
||||
if ($sample_import_id)
|
||||
{
|
||||
@@ -142,40 +143,7 @@ if ($questionnaire_id)
|
||||
|
||||
//Rows to display: Strata Status Quota Sample Sample Used Sample Remaining Completes % Complete
|
||||
|
||||
// Firstly, for the entire sample
|
||||
|
||||
//We need to calc Sample size, Sample drawn, Sample remain, Completions, %complete
|
||||
$sql = "SELECT (c.sample_id is not null) as type, count(*) as count
|
||||
FROM sample as s
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||
LEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id)
|
||||
WHERE s.import_id = '$sample_import_id'
|
||||
GROUP BY (c.sample_id is not null)";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//type == 1 is drawn from sample, type == 0 is remains in sample
|
||||
$drawn = 0;
|
||||
$remain = 0;
|
||||
|
||||
foreach ($rs as $r)
|
||||
{
|
||||
if ($r['type'] == 1) $drawn = $r['count'];
|
||||
if ($r['type'] == 0) $remain = $r['count'];
|
||||
}
|
||||
|
||||
$sql = "SELECT count(*) as count
|
||||
FROM `case` as c, sample as s
|
||||
WHERE c.current_outcome_id = 10
|
||||
AND s.import_id = '$sample_import_id'
|
||||
AND s.sample_id = c.sample_id
|
||||
AND c.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$completions = $rs['count'];
|
||||
|
||||
$report[] = array("strata" => T_("Total sample"), "quota" => $drawn + $remain, "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => ROUND(($completions / ($drawn + $remain)) * 100,2));
|
||||
|
||||
//a. (Standard quota) Monitor outcomes of questions in completed questionnaires, and exclude selected sample records when completion limit is reached
|
||||
//b. (Replicate quota) Exclude selected sample records (where no qsqr_question rows)
|
||||
@@ -199,13 +167,12 @@ if ($questionnaire_id)
|
||||
|
||||
$perc = ($v['completions'] <= 0 ? 0 : ROUND(($completions / ($v['completions'])) * 100,2));
|
||||
|
||||
|
||||
//We need to calc Sample size, Sample drawn, Sample remain
|
||||
$sql = "SELECT (c.sample_id is not null) as type, count(*) as count
|
||||
FROM sample as s
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id) ";
|
||||
|
||||
$sql2 = "SELECT exclude_val,exclude_var,comparison
|
||||
$sql2 = "SELECT exclude_val,exclude_var,exclude_var_id,comparison
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = {$v['questionnaire_sample_quota_row_id']}";
|
||||
|
||||
@@ -215,7 +182,7 @@ if ($questionnaire_id)
|
||||
$x = 1;
|
||||
foreach($rev as $ev)
|
||||
{
|
||||
$sql .= " JOIN sample_var as sv$x ON (sv$x.sample_id = s.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$sql .= " JOIN sample_var as sv$x ON (sv$x.sample_id = s.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
@@ -237,19 +204,19 @@ if ($questionnaire_id)
|
||||
if ($completions < $v['completions']) //if completions less than the quota, allow for closing/opening
|
||||
{
|
||||
if ($v['quota_reached'] == 1)
|
||||
$status = "<a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&open=open'>" . T_("closed") . "</a>";
|
||||
$status = "<span class='label label-default fa-lg'>" . T_("closed") . "</span><a class='btn' data-toggle='tooltip' title='" . T_("open") . "' href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&open=open'><i class='fa fa-lock fa-2x' style='color:red;'></i></a>";
|
||||
else
|
||||
$status = "<a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&close=close'>" . T_("open") . "</a>";
|
||||
$status = "<span class='label label-primary fa-lg'>" . T_("open") . " </span><a class='btn' data-toggle='tooltip' title='" . T_("close") . "' href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&rowquota=$qsqr&close=close'><i class='fa fa-unlock fa-2x'></i></a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($v['quota_reached'] == 1)
|
||||
$status = T_("closed");
|
||||
$status = "<span class='label label-default fa-lg'>" . T_("closed") . "</span>";
|
||||
else
|
||||
$status = T_("open");
|
||||
$status = "<span class='label label-primary fa-lg'>" . T_("open") . " </span>";
|
||||
}
|
||||
|
||||
$report[] = array("strata" => "<a href='quotarow.php?qsqri=$qsqr&edit=edit'>" . $v['description'] . "</a>", "status" => $status, "quota" => $v['completions'], "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => $perc, "priority" => "<input type='text' size='3' value='$priority' id='p$qsqr' name='p$qsqr' />", "autoprioritise" => "<input type='checkbox' id='a$qsqr' name='a$qsqr' $checked />");
|
||||
$report[] = array("strata" => "<a href='quotarow.php?qsqri=$qsqr&edit=edit&questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . $v['description'] . "</a>", "status" => $status, "quota" => $v['completions'], "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => $perc, "priority" => "<input type='number' maxlength='3' min='0' max='100' size='3' style='width:6em;' value='$priority' id='p$qsqr' name='p$qsqr' class='form-control'/>", "autoprioritise" => "  <input type='checkbox' id='a$qsqr' name='a$qsqr' $checked />");
|
||||
}
|
||||
|
||||
//c. (Questionnaire quota) Monitor outcomes of questions in completed questionnaires, and abort interview when completion limit is reached
|
||||
@@ -287,14 +254,60 @@ if ($questionnaire_id)
|
||||
$report[] = array("strata" => "<a href='" . LIME_URL . "/admin/admin.php?action=quotas&sid={$r['sid']}"a_id={$r['id']}&subaction=quota_editquota'>" . $r['name'] . "</a>", "quota" => $r['qlimit'], "completions" => $completions, "perc" => $perc);
|
||||
}
|
||||
|
||||
|
||||
// At the end - > the entire sample
|
||||
|
||||
//We need to calc Sample size, Sample drawn, Sample remain, Completions, %complete
|
||||
$sql = "SELECT (c.sample_id is not null) as type, count(*) as count
|
||||
FROM sample as s
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||
LEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id)
|
||||
WHERE s.import_id = '$sample_import_id'
|
||||
GROUP BY (c.sample_id is not null)";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//type == 1 is drawn from sample, type == 0 is remains in sample
|
||||
$drawn = 0;
|
||||
$remain = 0;
|
||||
|
||||
foreach ($rs as $r)
|
||||
{
|
||||
if ($r['type'] == 1) $drawn = $r['count'];
|
||||
if ($r['type'] == 0) $remain = $r['count'];
|
||||
}
|
||||
|
||||
$sql = "SELECT count(*) as count
|
||||
FROM `case` as c, sample as s
|
||||
WHERE c.current_outcome_id = 10
|
||||
AND s.import_id = '$sample_import_id'
|
||||
AND s.sample_id = c.sample_id
|
||||
AND c.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$completions = $rs['count'];
|
||||
|
||||
$report[] = array("strata" => T_("Total sample"), "quota" => $drawn + $remain, "sample" => $drawn + $remain, "sampleused" => $drawn, "sampleremain" => $remain, "completions" => $completions, "perc" => ROUND(($completions / ($drawn + $remain)) * 100,2));
|
||||
|
||||
print "<form action='' method='post'>";
|
||||
xhtml_table($report,array("strata","status","quota","sample","sampleused","sampleremain","completions","perc","priority","autoprioritise"),array(T_("Strata"),T_("Status"),T_("Quota"),T_("Sample"),T_("Sample Used"),T_("Sample Remaining"),T_("Completions"),T_("% Complete"),T_("Set priority"),T_("Auto prioritise")),"tclass",false,false);
|
||||
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/><input type='submit' id='submit' name='submit' value='" . TQ_("Update priorities") . "'/></p></form>";
|
||||
xhtml_table($report,array("strata","status","quota","sample","sampleused","sampleremain","completions","perc","priority","autoprioritise"),array(T_("Strata"),T_("Status"),T_("Quota"),T_("Sample"),T_("Sample Used"),T_("Sample Remaining"),T_("Completions"),T_("% Complete"),T_("Set priority"),T_("Auto prioritise")),"tclass",false,false);
|
||||
|
||||
if (count($report) > 1)
|
||||
print "<input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/></br>
|
||||
<button type='submit' id='submit' name='submit' class='btn btn-primary'/><i class=\"fa fa-refresh fa-lg\"></i> " . TQ_("Update priorities") . "</button>";
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot(array("../js/custom.js"));
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
increaseArea: '30%'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -103,7 +103,7 @@ if (isset($_POST['submitexport']))
|
||||
|
||||
$q2 = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT exclude_var as samplerecord,comparison,exclude_val as value
|
||||
$sql = "SELECT exclude_var_id, exclude_var as samplerecord,comparison,exclude_val as value
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $tmp";
|
||||
|
||||
@@ -177,6 +177,7 @@ if (isset($_GET['delete']))
|
||||
|
||||
|
||||
if (isset($_POST['add_quota']))
|
||||
/* if (isset($_GET['questionnaire_id']) && isset($_GET['sgqa']) && isset($_GET['value']) && isset($_GET['completions']) && isset($_GET['sample_import_id']) && isset($_GET['comparison']) && isset($_GET['exclude_var_id']) && isset($_GET['exclude_var']) && isset($_GET['exclude_val'])) */
|
||||
{
|
||||
//need to add quota
|
||||
$completions = intval($_POST['completions']);
|
||||
@@ -247,12 +248,15 @@ if (isset($_GET['qsqri']) & isset($_GET['edit']))
|
||||
|
||||
if (isset($_POST['adds']))
|
||||
{
|
||||
$comparison = $db->qstr($_POST['comparisons']);
|
||||
$exvar = $db->qstr(substr($_POST['sample_var'],12,strpos($_POST['sample_var'],'&')-12));
|
||||
$exvar_id = $db->qstr(substr($_POST['sample_var_id'],15,strpos($_POST['sample_var_id'],'&')-15));
|
||||
$exvar = $db->qstr($_POST['sample_var']);
|
||||
$exval = $db->qstr($_POST['exclude_val']);
|
||||
$comparison = $db->qstr($_POST['comparisons']);
|
||||
$description = $db->qstr($_POST['description']);
|
||||
|
||||
//add ssample
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var,exclude_val,comparison)
|
||||
VALUES ($qsqri,$exvar,$exval,$comparison)";
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var_id,exclude_var,exclude_val,comparison,description)
|
||||
VALUES ($qsqri,$exvar_id,$exvar,$exval,$comparison,$description)";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
@@ -262,12 +266,13 @@ if (isset($_GET['qsqri']) & isset($_GET['edit']))
|
||||
|
||||
if (isset($_POST['addq']))
|
||||
{
|
||||
$comparison = $db->qstr($_POST['comparison']);
|
||||
$value = $db->qstr($_POST['value']);
|
||||
$sgqa = $db->qstr(substr($_POST['sgqa'],6,strpos($_POST['sgqa'],'&')-6));
|
||||
$value = $db->qstr($_POST['value']);
|
||||
$comparison = $db->qstr($_POST['comparison']);
|
||||
$description = $db->qstr($_POST['description']);
|
||||
//add ssample
|
||||
$sql = "INSERT INTO qsqr_question (questionnaire_sample_quota_row_id,lime_sgqa,value,comparison)
|
||||
VALUES ($qsqri,$sgqa,$value,$comparison)";
|
||||
$sql = "INSERT INTO qsqr_question (questionnaire_sample_quota_row_id,lime_sgqa,value,comparison,description)
|
||||
VALUES ($qsqri,$sgqa,$value,$comparison,$description)";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
@@ -279,28 +284,36 @@ if (isset($_GET['qsqri']) & isset($_GET['edit']))
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Quota row management"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
print "<h1>" . T_("Select a questionnaire from the list below") . "</h1>";
|
||||
xhtml_head(T_("Quota row management"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/bootstrap-toggle/css/bootstrap-toggle.min.css","../include/font-awesome/css/font-awesome.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/bootstrap/js/bootstrap.min.js","../include/bootstrap-toggle/js/bootstrap-toggle.min.js","../include/iCheck/icheck.min.js","../js/window.js"));
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Questionnaire") . ": </h3>";
|
||||
|
||||
$sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id = '$questionnaire_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1";
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id");
|
||||
|
||||
display_chooser($db->GetAll($sql),"questionnaire","questionnaire_id", true,false,true,true,false,true,"form-inline pull-left ");
|
||||
|
||||
if ($questionnaire_id != false)
|
||||
{
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
print "<h1>" . T_("Select a sample from the list below") . "</h1>";
|
||||
|
||||
$sql = "SELECT s.sample_import_id as value,s.description, CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import as s, questionnaire_sample as q
|
||||
WHERE q.questionnaire_id = $questionnaire_id
|
||||
AND q.sample_import_id = s.sample_import_id";
|
||||
$s = $db->GetAll($sql);
|
||||
if (!empty($s)){
|
||||
print "<h3 class='form-inline pull-left'>   " . T_("Sample") . ": </h3>";
|
||||
|
||||
display_chooser($db->GetAll($sql),"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id");
|
||||
display_chooser($s,"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
||||
} else {
|
||||
print "<div class='clearfix'></div><div class='well text-info'>" . T_("No samples assigned to this questionnaire.") . "</div>";
|
||||
}
|
||||
|
||||
print "<div class='col-sm-2 pull-right'><a href='quotareport.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-info btn-block'><i class='fa fa-filter fa-lg'></i> " . T_("To quota report") . "</a></div>";
|
||||
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
|
||||
if ($sample_import_id != false)
|
||||
{
|
||||
@@ -314,10 +327,10 @@ if ($questionnaire_id != false)
|
||||
if (count($data) > 2)
|
||||
{
|
||||
//one quota record per row
|
||||
$completions = intval($data[1]);
|
||||
$description = $db->quote($data[0]);
|
||||
$completions = intval($data[1]);
|
||||
$autoprioritise = 0;
|
||||
if ($data[2] != 0) $autoprioritise = 1;
|
||||
$description = $db->quote($data[0]);
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_quota_row(questionnaire_id, sample_import_id, completions, description, priority, autoprioritise)
|
||||
VALUES ($questionnaire_id, $sample_import_id, $completions, $description, 50, $autoprioritise)";
|
||||
@@ -346,12 +359,13 @@ if ($questionnaire_id != false)
|
||||
else
|
||||
{
|
||||
//is a sample variable
|
||||
$comparison = $db->qstr($data[($i*3) + 1]);
|
||||
$value = $db->qstr($data[($i*3) + 2]);
|
||||
$var = $db->qstr($data[$i*3]);
|
||||
$var_id = $db->qstr($data[$i*3]);
|
||||
$var = $db->qstr($data[($i*3) + 1]);
|
||||
$comparison = $db->qstr($data[($i*3) + 2]);
|
||||
$value = $db->qstr($data[($i*3) + 3]);
|
||||
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var,exclude_val,comparison)
|
||||
VALUES ($qq,$var,$value,$comparison)";
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var_id,exclude_var,exclude_val,comparison)
|
||||
VALUES ($qq,$var_id,$var,$value,$comparison)";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
@@ -366,42 +380,43 @@ if ($questionnaire_id != false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($qsqri != false)
|
||||
{
|
||||
print "<h2 class='col-sm-2'><a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default'><i class='fa fa-arrow-up fa-lg text-primary'></i> " . T_("To Row quotas") . "</a></h2>";
|
||||
print "<h2>" . T_("Quota") . ": $qsqrid</h2>";
|
||||
print "<p><a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>" . T_("Go back") . "</a></p>";
|
||||
|
||||
|
||||
?>
|
||||
<form action="?<?php echo "questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post">
|
||||
<p>
|
||||
<label for="description"><?php echo T_("Describe this quota"); ?> </label><input type="text" name="description" id="description" value="<?php echo $qsqrid;?>"/> <br/>
|
||||
<label for="priority"><?php echo T_("Quota priority (50 is default, 100 highest, 0 lowest)"); ?> </label><input type="text" name="priority" id="priority" value="<?php echo $qsqrip;?>"/> <br/>
|
||||
<label for="autoprioritise"><?php echo T_("Should the priority be automatically updated based on the number of completions in this quota?"); ?> </label><input type="checkbox" name="autoprioritise" id="autoprioritise" <?php echo $qsqrich; ?>/> <br/>
|
||||
<label for="completions"><?php echo T_("The number of completions to stop calling at"); ?> </label><input type="text" name="completions" id="completions" value="<?php echo $qsqric; ?>"/> <br/>
|
||||
<div class='panel-body' >
|
||||
<form action="?<?php echo "questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post" class="form-inline table">
|
||||
<p><label for="description" class="control-label"><?php echo T_("Describe this quota"); ?>: </label><input type="text" name="description" id="description" class="form-control" value="<?php echo $qsqrid;?>" required size="70"/>  <label for="completions" class="control-label"><?php echo T_("The number of completions to stop calling at"); ?>: </label><input type="number" class="form-control" name="completions" id="completions" value="<?php echo $qsqric; ?>" min="0" size="6" maxlength="6" style="width:6em;" required /></p>
|
||||
<p><label for="priority" class="control-label"><?php echo T_("Quota priority (50 is default, 100 highest, 0 lowest)"); ?>: </label><input type="number" class="form-control" name="priority" id="priority" value="<?php echo $qsqrip;?>" min="0" max="100" style="width:5em;"/>  <label for="autoprioritise" class="control-label"><?php echo T_("Should the priority be automatically updated based on the number of completions in this quota?"); ?> </label><input type="checkbox" name="autoprioritise" id="autoprioritise" <?php echo $qsqrich; ?>data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="warning"/></p>
|
||||
<input type="hidden" name="qsqri" value="<?php echo $qsqri; ?>"/>
|
||||
<input type="submit" name="edit_quota" value="<?php print(T_("Edit row quota")); ?>"/></p>
|
||||
<p><button type="submit" name="edit_quota" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> <?php print(T_("Save changes")); ?></button></p>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
//display questionnaire references
|
||||
$sql = "SELECT qsqr_question_id,lime_sgqa,value,comparison,description,
|
||||
CONCAT('<a href=\'?edit=edit&qsqri=$qsqri&delete=delete&qsqrqi=', qsqr_question_id, '\'>" . TQ_("Delete") . "</a>') as qdelete
|
||||
CONCAT(' <a href=\'?edit=edit&qsqri=$qsqri&delete=delete&qsqrqi=', qsqr_question_id, '\'><i class=\"fa fa-trash-o fa-lg text-danger\"></i></a> ') as qdelete
|
||||
FROM qsqr_question
|
||||
WHERE questionnaire_sample_quota_row_id = $qsqri";
|
||||
|
||||
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
print "<div class='panel panel-default'>";
|
||||
print "<div class='panel-heading'><h3 class='text-center'>" . T_("Restrictions based on answered questions") . "</h3></div>";
|
||||
print "<div class='panel-body'>";
|
||||
|
||||
if (empty($rs))
|
||||
{
|
||||
print "<h3>" . T_("All completed responses that match the sample criteria below will be counted towards the quota") . "</h3>";
|
||||
print "<h4 class='well text-info'>" . T_("Currently NO Restrictions based on answered questions") . " </p>" . T_("All completed responses that match the sample criteria below will be counted towards the quota") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h3>" . T_("Only completed responses that have answered the following will be counted") . "</h3>";
|
||||
xhtml_table($rs,array('lime_sgqa','comparison','value','qdelete'),array(T_("Question"),T_("Comparison"),T_("Value"),T_("Delete")));
|
||||
print "<div class='well'><h4 class='text-info'>" . T_("Only completed responses that have answered the following will be counted") . "</h4>";
|
||||
xhtml_table($rs,array('description','lime_sgqa','comparison','value','qdelete'),array(T_("Description"),T_("SGQ code"),T_("Comparison"),T_("Value")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "));
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
//add questionnaire references if any (refer to sample only or count completions based on responses to questions)
|
||||
@@ -417,101 +432,136 @@ if ($questionnaire_id != false)
|
||||
$ssgqa = $db->qstr($_GET['sgqa']);
|
||||
|
||||
//select question
|
||||
$sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value, CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, CASE WHEN $ssgqa LIKE CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
$sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value, CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, CASE WHEN $ssgqa LIKE CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `" . LIME_PREFIX . "questions` AS lq
|
||||
LEFT JOIN `" . LIME_PREFIX . "questions` AS lq2 ON ( lq2.qid = lq.parent_qid )
|
||||
JOIN `" . LIME_PREFIX . "groups` as g ON (g.gid = lq.gid)
|
||||
WHERE lq.sid = '$lime_sid'
|
||||
ORDER BY CASE WHEN lq2.question_order IS NULL THEN lq.question_order ELSE lq2.question_order + (lq.question_order / 1000) END ASC ";
|
||||
ORDER BY CASE WHEN lq2.question_order IS NULL THEN lq.question_order ELSE lq2.question_order + (lq.question_order / 1000) END ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
$rsgqa = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
if (!empty($rsgqa))
|
||||
{
|
||||
print "<form method='post' action='?qsqri=$qsqri&edit=edit'>";
|
||||
print "<h4>" . T_("Add restriction based on answered questions") . "</h4>";
|
||||
print "<label for='sgqa'>" . T_("Question") . "</label>";
|
||||
display_chooser($rs,"sgqa","sgqa",false,"edit=edit&qsqri=$qsqri",true,false);
|
||||
print "<div class=''><form method='post' action='?qsqri=$qsqri&edit=edit' class='form-group'>";
|
||||
print "<h3>" . T_("Add restriction based on answered questions") . " </h3>";
|
||||
print "<label for='sgqa' class='control-label'>" . T_("Select Question") . ": </label>";
|
||||
display_chooser($rsgqa,"sgqa","sgqa",true,"edit=edit&qsqri=$qsqri");
|
||||
|
||||
if (isset($_GET['sgqa'])){
|
||||
?>
|
||||
<br/><label for="comparison"><?php echo T_("The type of comparison"); ?></label><select name="comparison" id="comparison"><option value="LIKE">LIKE</option><option value="NOT LIKE">NOT LIKE</option><option value="=">=</option><option value="!=">!=</option><option value="<"><</option><option value=">">></option><option value="<="><=</option><option value=">=">>=</option></select><br/>
|
||||
<label for="value"><?php echo T_("The code value to compare"); ?> </label><input type="text" name="value" id="value"/> <br/>
|
||||
<input type="submit" name="addq" value="<?php echo TQ_("Add restriction") ?>"/>
|
||||
</form>
|
||||
<div class='col-sm-6 panel-body form-inline'>
|
||||
<p><label for="comparison" class="control-label"><?php echo T_("The type of comparison"); ?>: </label>
|
||||
<select name="comparison" class="form-control" id="comparison"><option value="LIKE">LIKE</option><option value="NOT LIKE">NOT LIKE</option><option value="=">=</option><option value="!=">!=</option><option value="<"><</option><option value=">">></option><option value="<="><=</option><option value=">=">>=</option></select>  <label for="value" class="control-label"><?php echo T_("The code value to compare"); ?>: </label><input type="text" name="value" id="value" class="form-control" required /></p>
|
||||
<p><label for="description" class="control-label"><?php echo T_("Description"); ?>: </label><input type="text" class="form-control" name="description" id="description" size="80"/></p>
|
||||
<p><button type="submit" name="addq" class="btn btn-primary"/><i class="fa fa-plus-circle fa-lg"></i> <?php echo TQ_("Add restriction") ?></button></p>
|
||||
</div></form>
|
||||
<?php
|
||||
|
||||
print "<div class='col-sm-6 '><h4 class= 'pull-left'>" . T_("Code values for this question") . ": </h4>";
|
||||
|
||||
$rs = "";
|
||||
if (isset($_GET['sgqa']))
|
||||
{
|
||||
$sgqa = $_GET['sgqa'];
|
||||
$qid = explode("X", $sgqa);
|
||||
$qid = $qid[2];
|
||||
|
||||
$sql = "SELECT CONCAT('<b class=\'fa\'> ', l.code , '</b>')as code, l.answer as title
|
||||
FROM `" . LIME_PREFIX . "answers` as l
|
||||
WHERE l.qid = '$qid'";
|
||||
$rsc = $db->GetAll($sql);
|
||||
}
|
||||
if (!isset($rsc) || empty($rsc))
|
||||
print "<h4 class= 'alert alert-info'>" . T_("No labels defined for this question") ."</h4>";
|
||||
else
|
||||
xhtml_table($rsc,array('code','title'),array(T_("Code value"), T_("Description")));
|
||||
}
|
||||
else { print "</form>"; }
|
||||
print "</div></div>";
|
||||
}
|
||||
|
||||
print "</div></div>";
|
||||
|
||||
//list sample records to exclude
|
||||
|
||||
$sql = "SELECT qsqr_sample_id,exclude_var,exclude_val,comparison,description,
|
||||
CONCAT('<a href=\'?qsqri=$qsqri&edit=edit&delete=delete&qsqrsi=',qsqr_sample_id,'\'>" . TQ_("Delete") . "</a>') as sdelete
|
||||
$sql = "SELECT qsqr_sample_id,exclude_var_id,exclude_var,exclude_val,comparison,description,
|
||||
CONCAT(' <a href=\'?qsqri=$qsqri&edit=edit&delete=delete&qsqrsi=',qsqr_sample_id,'\'><i class=\"fa fa-trash-o fa-lg text-danger\"></i></a> ') as sdelete
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $qsqri";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
print "<div class='panel panel-default'>";
|
||||
print "<div class='panel-heading'><h3 class='text-center'>" . T_("Restrictions based on sample records") . "</h3></div>";
|
||||
print "<div class='panel-body'>";
|
||||
if (empty($rs))
|
||||
{
|
||||
print "<h3>" . T_("All sample records will be excluded") . "</h3>";
|
||||
print "<h4 class='well text-info'>" . T_("Currently NO Restrictions based on sample records") . " </p>" . T_("This sample will be limited to number of competions set in quota") . " </p>" . T_("Caling cases for this sample will be stopped when the quota is reached") . "</h4>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h3>" . T_("Completed responses that have the following sample details will be counted towards the quota and excluded when the quota is reached") . "</h3>";
|
||||
xhtml_table($rs,array('exclude_var','comparison','exclude_val','sdelete'),array(T_("Sample record"),T_("Comparison"),T_("Value"),T_("Delete")));
|
||||
print "<div class='well'><h4 class='text-info'>" . T_("Completed responses that have the following sample details will be counted towards the quota and excluded when the quota is reached") . "</h4>";
|
||||
xhtml_table($rs,array('description','exclude_var_id','exclude_var','comparison','exclude_val','sdelete'),array(T_("Description"),T_("Sample var ID"),T_("Sample variable"),T_("Comparison"),T_("Value")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "));
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
$ssample_var = "''";
|
||||
if (isset($_GET['sample_var']))
|
||||
$ssample_var = $db->qstr($_GET['sample_var']);
|
||||
$ssample_var_id = "''";
|
||||
if (isset($_GET['sample_var_id'])) $ssample_var_id = $db->qstr($_GET['sample_var_id']);
|
||||
|
||||
//add sample references (records from sample to exclude when quota reached)
|
||||
$sql = "SELECT sv.var as value, sv.var as description, CASE WHEN sv.var LIKE $ssample_var THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_var AS sv, sample AS s
|
||||
WHERE s.import_id = $sample_import_id
|
||||
$sql = "SELECT sivr.var_id as value, sivr.var as description,
|
||||
CASE WHEN sivr.var_id = $ssample_var_id THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `sample_import_var_restrict` as sivr, `sample_var` AS sv, `sample` AS s
|
||||
WHERE sivr.sample_import_id = $sample_import_id
|
||||
AND s.sample_id = sv.sample_id
|
||||
GROUP BY sv.var";
|
||||
AND sivr.var_id = sv.var_id
|
||||
GROUP BY sivr.var_id";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
$rsvi = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
if (!empty($rsvi))
|
||||
{
|
||||
if ($ssample_var == "''")
|
||||
$ssample_var = "'" . $rs[0]['value']. "'";
|
||||
if ($ssample_var_id == "''")
|
||||
$ssample_var_id = $rsvi[0]['value'];
|
||||
|
||||
print "<h4>" . T_("Add restriction based on sample records") . "</h4>";
|
||||
print "<form method='post' action='?edit=edit&qsqri=$qsqri'>";
|
||||
print "<label for='sample_var'>" . T_("Sample record") . "</label>";
|
||||
display_chooser($rs,"sample_var","sample_var",false,"edit=edit&qsqri=$qsqri",true,false);
|
||||
?>
|
||||
<br/><label for="comparisons"><?php echo T_("The type of comparison"); ?></label><select name="comparisons" id="comparisons"><option value="LIKE">LIKE</option><option value="NOT LIKE">NOT LIKE</option><option value="=">=</option><option value="!=">!=</option><option value="<"><</option><option value=">">></option><option value="<="><=</option><option value=">=">>=</option></select><br/>
|
||||
<label for="exclude_val"><?php echo T_("Value"); ?></label>
|
||||
<?php
|
||||
|
||||
$sql = "SELECT sv.val as value, sv.val as description, '' AS selected
|
||||
FROM sample_var AS sv, sample AS s
|
||||
WHERE s.import_id = $sample_import_id
|
||||
AND s.sample_id = sv.sample_id
|
||||
AND sv.var = $ssample_var
|
||||
GROUP BY sv.val";
|
||||
|
||||
display_chooser($db->GetAll($sql),"exclude_val","exclude_val",false,false,false,false);
|
||||
flush();
|
||||
?>
|
||||
<br/><input type="submit" name="adds" value="<?php echo TQ_("Add restriction") ?>"/>
|
||||
</form>
|
||||
print "<h3>" . T_("Add restriction based on sample records") . "</h3>";
|
||||
print "<form method='post' action='?edit=edit&qsqri=$qsqri' class='form-inline table'>";
|
||||
print "<p><label for='sample_var' class='control-label'>" . T_("Sample record") . "</label>: ";
|
||||
display_chooser($rsvi,"sample_var_id","sample_var_id",true,"edit=edit&qsqri=$qsqri",true,false);
|
||||
|
||||
if (isset($_GET['sample_var_id'])){
|
||||
?>
|
||||
|
||||
 <label for="comparisons" class="control-label"><?php echo T_("The type of comparison"); ?></label>: <select name="comparisons" id="comparisons" class="form-control"><option value="LIKE">LIKE</option><option value="NOT LIKE">NOT LIKE</option><option value="=">=</option><option value="!=">!=</option><option value="<"><</option><option value=">">></option><option value="<="><=</option><option value=">=">>=</option></select> 
|
||||
<label for="exclude_val" class="control-label"><?php echo T_("Value"); ?>: </label>
|
||||
<?php
|
||||
$sql = "SELECT sv.val as value, sv.val as description, '' AS selected, sivr.var as var
|
||||
FROM sample_var AS sv, sample AS s, `sample_import_var_restrict` as sivr
|
||||
WHERE s.import_id = $sample_import_id
|
||||
AND s.sample_id = sv.sample_id
|
||||
AND sv.var_id = $ssample_var_id
|
||||
AND sivr.var_id = sv.var_id
|
||||
GROUP BY sv.val";
|
||||
$val = $db->GetAll($sql);
|
||||
$sample_var = $val[0]['var'];
|
||||
display_chooser($val,"exclude_val","exclude_val",false,false,false,false);
|
||||
flush();
|
||||
?>
|
||||
 </p>
|
||||
<p><label for="description" class="control-label"><?php echo T_("Description"); ?>: </label><input type="text" class="form-control" name="description" id="description" size="80"/></p>
|
||||
<input type="hidden" name="sample_var" value="<?php print $sample_var; ?>"/>
|
||||
<p><button type="submit" class="btn btn-primary" name="adds" value=""/><i class="fa fa-plus-circle fa-lg"></i> <?php echo TQ_("Add restriction") ?></button></p>
|
||||
<?php
|
||||
} else { print "</p>";}
|
||||
print "</form>";
|
||||
}
|
||||
print "</div></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
print "<h1>" . T_("Current row quotas (click to edit)") . "</h1>";
|
||||
|
||||
|
||||
$sql = "SELECT questionnaire_sample_quota_row_id,qsq.description,
|
||||
CONCAT('<a href=\'?edit=edit&qsqri=',questionnaire_sample_quota_row_id,'\'>', qsq.description, '</a>') as qedit,
|
||||
CONCAT('<input type=\'checkbox\' name=\'select_',questionnaire_sample_quota_row_id,'\'/>') as qselect,
|
||||
$sql = "SELECT questionnaire_sample_quota_row_id,qsq.description,
|
||||
CONCAT(' <a href=\'?edit=edit&qsqri=',questionnaire_sample_quota_row_id,'\'><i class=\"fa fa-pencil-square-o fa-lg text-danger\"></i></a> ') as qedit,
|
||||
CONCAT('<div class=\'text-center\'><input type=\'checkbox\' name=\'select_',questionnaire_sample_quota_row_id,'\'/></div>') as qselect,
|
||||
qsq.completions,qsq.quota_reached,qsq.current_completions,
|
||||
CASE WHEN qsq.autoprioritise = 1 THEN '" . TQ_("Yes") . "' ELSE '" . TQ_("No") . "' END AS ap, qsq.priority,
|
||||
CASE WHEN qsq.quota_reached = 1 THEN '" . TQ_("closed") . "' ELSE '" . TQ_("open") . "' END AS status
|
||||
@@ -519,48 +569,58 @@ if ($questionnaire_id != false)
|
||||
WHERE qsq.questionnaire_id = '$questionnaire_id'
|
||||
AND qsq.sample_import_id = '$sample_import_id'
|
||||
AND q.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
print "<form method='post' action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>";
|
||||
if (empty($r))
|
||||
{
|
||||
print "<p>" . T_("Currently no row quotas") . "</p>";
|
||||
print "<p class='well text-info'>" . T_("Currently no row quotas") . "</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_table($r,array('qedit','completions','current_completions','status','priority','ap','qselect'),array(T_("Description"),T_("Quota"),T_("Completions"),T_("Status"),T_("Priority"),T_("Auto prioritise"),T_("Select")));
|
||||
print "<input type='submit' name='submitdelete' value='" . TQ_("Delete selected") . "'/>";
|
||||
print "<input type='submit' name='submitexport' value='" . TQ_("Export selected") . "'/>";
|
||||
|
||||
//select sample
|
||||
|
||||
print "<form method='post' action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'>";
|
||||
print "<div class='col-sm-12 panel-body'></br><h2>" . T_("Current row quotas") . "</h2><div class='pull-left'>";
|
||||
xhtml_table($r,array('description','qedit','completions','current_completions','status','priority','ap','qselect'),array(T_("Description")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Quota"),T_("Completions"),T_("Status"),T_("Priority"),T_("Auto prioritise")," <i class='fa fa-check-square-o fa-lg' data-toggle='tooltip' title='" . T_("Select") . "'></i> "));
|
||||
print "</div><div class='pull-left'></br>";
|
||||
print "<button class='btn btn-default col-sm-offset-2' type='submit' name='submitexport'><i class=\"fa fa-download fa-lg text-primary\"></i> " . TQ_("Export selected") . "</button></br></br>";
|
||||
print "<button class='btn btn-default col-sm-offset-2' type='submit' name='submitdelete'><i class=\"fa fa-trash-o fa-lg text-danger\"></i> 
|
||||
" . TQ_("Delete selected") . "</button></div></div>";
|
||||
print "</form>";
|
||||
}
|
||||
print "</form>";
|
||||
print "<h2>" . T_("Add row quota") . "</h2>";
|
||||
?>
|
||||
<form action="?<?php echo "questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post">
|
||||
<p>
|
||||
<label for="description"><?php echo T_("Describe this quota"); ?> </label><input type="text" name="description" id="description"/> <br/>
|
||||
<label for="priority"><?php echo T_("Quota priority (50 is default, 100 highest, 0 lowest)"); ?> </label><input type="text" name="priority" id="priority" value="50"/> <br/>
|
||||
<label for="autoprioritise"><?php echo T_("Should the priority be automatically updated based on the number of completions in this quota?"); ?> </label><input type="checkbox" name="autoprioritise" id="autoprioritise"/> <br/>
|
||||
<label for="completions"><?php echo T_("The number of completions to stop calling at"); ?> </label><input type="text" name="completions" id="completions"/> <br/>
|
||||
<input type="submit" name="add_quota" value="<?php print(T_("Add row quota")); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
print "<h2>" . T_("Import row quota") . "</h2>";
|
||||
print "<div class='col-sm-8 panel-body'><h2>" . T_("Add row quota") . "</h2>";
|
||||
?>
|
||||
<form enctype="multipart/form-data" action="<?php echo "?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post">
|
||||
<p><input type="hidden" name="MAX_FILE_SIZE" value="1000000000" /></p>
|
||||
<p><?php echo T_("Choose the CSV row quota file to import:"); ?><input name="file" type="file" /></p>
|
||||
<p><input type="submit" name="import_quota" value="<?php print(T_("Import row quota")); ?>"/></p>
|
||||
</form>
|
||||
<form action="?<?php echo "questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post" class="form-inline table">
|
||||
<p><label for="description" class="control-label"><?php echo T_("Describe this quota"); ?>:  </label><input type="text" class="form-control" name="description" id="description" required size="70"/></p>
|
||||
<p><label for="priority" class="control-label"><?php echo T_("Quota priority (50 is default, 100 highest, 0 lowest)"); ?>: </label><input type="number" class="form-control" name="priority" id="priority" value="50" min="0" max="100" style="width:5em;"/></p>
|
||||
<p><label for="completions" class="control-label"><?php echo T_("The number of completions to stop calling at"); ?>: </label><input type="number" class="form-control" name="completions" id="completions" min="0" size="6" maxlength="6" style="width:6em;" required/></p>
|
||||
<p><label for="autoprioritise" class="control-label"><?php echo T_("Should the priority be automatically updated based on the number of completions in this quota?"); ?>  </label><input type="checkbox" name="autoprioritise" id="autoprioritise" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="warning"/></p>
|
||||
<p><button type="submit" class="btn btn-primary" name="add_quota"/><i class="fa fa-plus-circle fa-lg"></i> <?php print(T_("Add row quota")); ?></button></p>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
//check user agent to properly filter *.csv file type
|
||||
print "<div class='col-sm-4 panel-body'><h2>" . T_("Import row quota") . "</h2>";
|
||||
$ua = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (preg_match('/Firefox/i', $ua)) $csv= "text/csv"; else $csv= ".csv";
|
||||
?>
|
||||
<form enctype="multipart/form-data" action="<?php echo "?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"; ?>" method="post">
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
|
||||
<h4><?php echo T_("Choose the CSV row quota file to import:"); ?></h4>
|
||||
<p><input id="file" name="file" type="file" class="filestyle form-group" required data-buttonBefore="true" data-iconName="fa fa-folder-open fa-lg text-primary " data-buttonText="<?php echo T_("Select file"); ?>..." accept="<?php echo $csv; ?>"/></p>
|
||||
<button type="submit" class="btn btn-primary" name="import_quota" ><i class="fa fa-upload fa-lg"></i> <?php print(T_("Import row quota")); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
xhtml_foot(array("../js/bootstrap-filestyle.min.js","../js/custom.js"));
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
increaseArea: '30%'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -80,7 +80,7 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
|
||||
if ($qsqri !== false)
|
||||
{
|
||||
$sql2 = "SELECT exclude_val,exclude_var,comparison
|
||||
$sql2 = "SELECT exclude_val,exclude_var,exclude_var_id,comparison
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $qsqri";
|
||||
|
||||
@@ -90,7 +90,7 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
$x = 1;
|
||||
foreach($rev as $ev)
|
||||
{
|
||||
$qs .= " JOIN sample_var as sv$x ON (sv$x.sample_id = c.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$qs .= " JOIN sample_var as sv$x ON (sv$x.sample_id = c.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
@@ -117,8 +117,8 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
|
||||
translate_array($outcomes,array("description"));
|
||||
|
||||
$rep = array("sample","callattempts");
|
||||
$rept = array(T_("Number of cases"),T_("Call attempts made"));
|
||||
$rep = array("callattempts","sample");
|
||||
$rept = array(T_("Call attempts made"),T_("Number of cases"));
|
||||
$totals = array("sample");
|
||||
|
||||
$outcomesfilled = array();
|
||||
@@ -176,17 +176,17 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
}
|
||||
|
||||
xhtml_table($overall,$rep,$rept,"tclass",false,$totals);
|
||||
|
||||
print "</br>";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Sample call attempt"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Sample call attempt"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
|
||||
print "<h2>" . T_("Please select a questionnaire") . "</h2>";
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Please select a questionnaire") . " </h3>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = intval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id,array(-1,T_("Overall")));
|
||||
display_questionnaire_chooser($questionnaire_id,array(-1,T_("Overall")),"form-inline clearfix", "form-control");
|
||||
|
||||
|
||||
if ($questionnaire_id || $questionnaire_id == -1)
|
||||
@@ -195,10 +195,10 @@ if ($questionnaire_id || $questionnaire_id == -1)
|
||||
{
|
||||
if ($questionnaire_id != -1)
|
||||
{
|
||||
print "<h2>" . T_("Please select a sample") . "</h2>";
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Please select a sample") . " </h3>";
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline clearfix", "form-control");
|
||||
|
||||
if ($sample_import_id)
|
||||
{
|
||||
@@ -206,24 +206,24 @@ if ($questionnaire_id || $questionnaire_id == -1)
|
||||
{
|
||||
$questionnaire_sample_quota_row_id = false;
|
||||
if (isset($_GET['questionnaire_sample_quota_row_id'])) $questionnaire_sample_quota_row_id = bigintval($_GET['questionnaire_sample_quota_row_id']);
|
||||
print "<h2>" . T_("Please select a quota") . "</h2>";
|
||||
display_quota_chooser($questionnaire_id,$sample_import_id,$questionnaire_sample_quota_row_id);
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Please select a quota") . " </h3>";
|
||||
display_quota_chooser($questionnaire_id,$sample_import_id,$questionnaire_sample_quota_row_id,"form-inline clearfix", "form-control");
|
||||
|
||||
if ($questionnaire_sample_quota_row_id)
|
||||
{
|
||||
if (!sample_call_attempt_report($questionnaire_id,$sample_import_id,$questionnaire_sample_quota_row_id))
|
||||
print "<p>" . T_("No calls for this quota") . "</p>";
|
||||
print "<p class='well text-danger'>" . T_("No calls for this quota") . "</p>";
|
||||
}
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No calls for this sample") . "</p>";
|
||||
print "<p class='well text-danger'>" . T_("No calls for this sample") . "</p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No calls for this questionnaire") . "</p>";
|
||||
print "<p class='well text-danger'>" . T_("No calls for this questionnaire") . "</p>";
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot("../js/custom.js");
|
||||
|
||||
?>
|
||||
|
||||
@@ -44,197 +44,400 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
*/
|
||||
include_once(dirname(__FILE__).'/../functions/functions.xhtml.php');
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
|
||||
if (isset($_POST['submitr']))
|
||||
if (isset($_POST['ren']))
|
||||
{
|
||||
$sample_import_id = intval($_POST['sample_import_id']);
|
||||
|
||||
unset($_POST['ren']);
|
||||
unset($_POST['sample_import_id']);
|
||||
|
||||
$sql = "UPDATE sample_import
|
||||
SET description = " . $db->qstr($_POST['description']) . "
|
||||
WHERE sample_import_id = $sample_import_id";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$_GET['rename'] = $sample_import_id;
|
||||
$_GET['edit'] = $sample_import_id;
|
||||
}
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
|
||||
if (isset($_POST['ed']))
|
||||
{
|
||||
$sample_import_id = intval($_POST['sample_import_id']);
|
||||
|
||||
unset($_POST['submit']);
|
||||
unset($_POST['ed']);
|
||||
unset($_POST['sample_import_id']);
|
||||
|
||||
foreach($_POST as $p)
|
||||
{
|
||||
$sql = "DELETE FROM sample_var
|
||||
WHERE var LIKE " . $db->qstr($p) . "
|
||||
AND sample_id IN
|
||||
(SELECT sample_id
|
||||
FROM sample
|
||||
WHERE import_id = $sample_import_id)";
|
||||
// print_r($_POST). "</br>"; //ïîñìîòðèì ÷åãî îòðàâëÿåòñÿ
|
||||
|
||||
$db->Execute($sql);
|
||||
if (isset($_POST['del']) && isset($_POST['type']) ) {
|
||||
$a = array(); $b = array(); $cert = array(); $a = $_POST['type'];
|
||||
|
||||
//echo "<p> type before unset->>"; foreach($_POST['type'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "</p>";
|
||||
|
||||
foreach($_POST['del'] as $p) {
|
||||
unset ($_POST['type'][$p]);
|
||||
$deleted[] = $p;
|
||||
}
|
||||
$b = $_POST['type']; $cert = array_diff_assoc($a, $b);
|
||||
|
||||
foreach($cert as $key => $val ) {
|
||||
|
||||
if ($val == 3 || $val==4 || $val == 5 || $val == 6 || $val == 7){
|
||||
echo "<div class='alert alert-danger'>", T_("Attention!! It's not recommended to delete string '$key'.</br> Please BE Careful and check again strings to delete."), "</div>";
|
||||
}
|
||||
/* else { echo "<div class='alert alert-info'>", T_("You can delete string '$key'. "), "</div>"; } */
|
||||
}
|
||||
//echo "<p>del ->>"; foreach($_POST['del'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "</p>";
|
||||
}
|
||||
|
||||
if (isset($_POST['type'])){
|
||||
|
||||
$_GET['edit'] = $sample_import_id;
|
||||
}
|
||||
|
||||
if (isset($_POST['submitvp']))
|
||||
{
|
||||
$sample_import_id = intval($_POST['sample_import_id']);
|
||||
//check that we have correct var types and quantity
|
||||
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0;
|
||||
foreach($_POST['type'] as $key => $val) {
|
||||
if ($val == 3) $prph++;
|
||||
else if ($val == 5) $pcd++;
|
||||
else if ($val == 4) $st++;
|
||||
else if ($val == 6) $fn++;
|
||||
else if ($val == 7) $ln++;
|
||||
else if ($val == 8) $eml++;
|
||||
}
|
||||
/* if($prph == 1) {$ch1 = true;}
|
||||
else { echo "<div class='alert alert-warning'>", T_("Please check that One and One Only Primary Phone number is selected"), "</div>";}
|
||||
|
||||
if (( ($pcd +$st) <= 2 )&&($pcd == 1 || $st == 1)) {$ch2 = true;}
|
||||
else { echo "<div class='alert alert-warning'>", T_("Please check selected types for Postcode and/or State"), "</div>";}
|
||||
// ! need to add DB tables check for existing timezone data in tables and additional check if prefix_timezone selected
|
||||
if (( ($fn + $ln) <= 2 )&&($fn == 1 || $ln == 1)) {$ch3 = true;}
|
||||
else { echo "<div class='alert alert-warning'>", T_("Please check selected types for Firstname and/or Lastname"), "</div>";}
|
||||
if ($eml < 2) {$ch4 = true;}
|
||||
else { echo "<div class='alert alert-warning'>", T_("Too many e-mail fields. Please check selected types for E-mail."), "</div>"; }
|
||||
|
||||
if ($ch1 && $ch2 && $ch3 && $ch4) */$typecheck = true; //echo $ch1,$ch2,$ch3,$ch4, "typecheck=",$typecheck, "</br>" ;
|
||||
|
||||
if ($typecheck){
|
||||
|
||||
foreach($_POST['type'] as $p => $val)
|
||||
{
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `type` = $val
|
||||
WHERE `var_id` = $p";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
if (isset($_POST['del'])) {
|
||||
$db->StartTrans();
|
||||
|
||||
unset($_POST['submitvp']);
|
||||
unset($_POST['sample_import_id']);
|
||||
foreach($_POST["del"] as $p) {
|
||||
$sql = "DELETE FROM `sample_import_var_restrict`
|
||||
WHERE var_id = $p";
|
||||
$db->Execute($sql);
|
||||
echo "<div class='alert alert-warning col-sm-6'>", T_(" String $p DELETED"), "</div>";
|
||||
|
||||
$sql = "DELETE FROM `sample_var`
|
||||
WHERE var_id = $p
|
||||
AND sample_id IN (SELECT sample_id FROM `sample` WHERE import_id = $sample_import_id)";
|
||||
$db->Execute($sql);
|
||||
echo "<div class='alert alert-warning col-sm-6'>", T_(" Sample_Var data for variable $p DELETED from this sample"), "</div>";
|
||||
}
|
||||
unset($_POST['del']);
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `restrict` = 1
|
||||
WHERE sample_import_id = $sample_import_id";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
foreach($_POST as $p => $val)
|
||||
{
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `restrict` = 0
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
AND `var` LIKE " . $db->qstr($p);
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
$_GET['view'] = $sample_import_id;
|
||||
}
|
||||
|
||||
if (isset($_GET['rename']))
|
||||
{
|
||||
xhtml_head(T_("Rename"),true,array("../css/table.css"));
|
||||
|
||||
$sample_import_id = intval($_GET['rename']);
|
||||
|
||||
$sql = "SELECT description
|
||||
FROM sample_import
|
||||
WHERE sample_import_id = $sample_import_id";
|
||||
|
||||
$rs = $db->GetOne($sql);
|
||||
|
||||
print "<h2>" . T_("Rename") . ": " . $rs. "</h2>";
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
|
||||
?>
|
||||
<form action="?" method="post">
|
||||
<div><label for='description'><?php echo T_("Description") . ": "; ?></label><input type='text' name='description' value="<?php echo $rs;?>"/></div>
|
||||
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||
<div><input type="submit" name="submitr" value="<?php echo T_("Rename");?>"/></div>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if (isset($_GET['view']))
|
||||
{
|
||||
xhtml_head(T_("Operator viewing permissions"),true,array("../css/table.css"));
|
||||
|
||||
$sample_import_id = intval($_GET['view']);
|
||||
|
||||
$sql = "SELECT sample_id
|
||||
FROM `sample`
|
||||
WHERE import_id = $sample_import_id";
|
||||
|
||||
$sample_id = $db->GetOne($sql);
|
||||
|
||||
$sql = "SELECT si.description, sv.val, sv.var,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN (sir.restrict IS NULL || sir.restrict = 0) THEN 'checked=\"checked\"' ELSE '' END ,' name=\'',sv.var,'\' value=\'11\'/>') as box,
|
||||
sir.restrict IS NULL as existss
|
||||
FROM sample_import as si
|
||||
JOIN `sample` as s ON (s.import_id = si.sample_import_id AND s.sample_id = $sample_id)
|
||||
JOIN sample_var as sv ON (sv.sample_id = s.sample_id)
|
||||
LEFT JOIN sample_import_var_restrict as sir ON (sir.sample_import_id = si.sample_import_id AND sir.var = sv.var)
|
||||
WHERE si.sample_import_id = $sample_import_id";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//if not in restrict table, then insert
|
||||
foreach($rs as $r)
|
||||
{
|
||||
if ($r['existss'] == 1)
|
||||
{
|
||||
$sql = "INSERT INTO sample_import_var_restrict (sample_import_id,var,`restrict`)
|
||||
VALUES ($sample_import_id,'{$r['var']}',0)";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<div class='alert alert-danger'>", T_("Smth wrong with selected field types. </br>Please check again var types selection and/or fields that you supposed to delete."), "</div>";
|
||||
//exit ();
|
||||
}
|
||||
}
|
||||
|
||||
print "<h2>" . T_("Operator viewing permissions") . ": " . $rs[0]['description'] . "</h2>";
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
|
||||
print "<p>" . T_("Select which fields from this sample should be able to be viewed by operators") . "</p>";
|
||||
|
||||
?>
|
||||
<form action="?" method="post">
|
||||
<?php
|
||||
xhtml_table($rs,array("var","val","box"),array(T_("Field"),T_("Example data"),T_("Allow operator to see?")));
|
||||
?>
|
||||
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||
<div><input type="submit" name="submitvp" value="<?php echo T_("Save changes");?>"/></div>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
exit();
|
||||
if (isset($_POST['var'])){
|
||||
|
||||
foreach($_POST['var'] as $p => $val)
|
||||
{// echo '| ',$p,' => ',$val,'+ ';
|
||||
$v = str_replace(" ", "_", $val);
|
||||
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `var` = '$v'
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
AND `var_id` = $p";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
unset($_POST['var']);
|
||||
}
|
||||
|
||||
if (isset($_POST['see'])){
|
||||
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `restrict` = 1
|
||||
WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
foreach($_POST['see'] as $p => $val)
|
||||
{// echo $p,' => ',$val,' + ';
|
||||
$sql = "UPDATE sample_import_var_restrict
|
||||
SET `restrict` = 0
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
AND `var_id` = $val";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
unset($_POST['see']);
|
||||
}
|
||||
|
||||
unset($_POST['type']);
|
||||
|
||||
$_GET['edit'] = $sample_import_id;
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_sample'])){
|
||||
|
||||
$sample_import_id = $_GET['delete_sample'];
|
||||
|
||||
// -->check questionnaire_sample - unassign sample if assigned
|
||||
$sql = "SELECT questionnaire_id FROM `questionnaire_sample` WHERE sample_import_id = $sample_import_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
if (count($rs) != 0){
|
||||
echo "<div class='alert alert-danger'>", T_("Sample $sample_import_id is still assigned to questionnaire. </br>Please unassign sample prior to delete."), "</div>";
|
||||
}
|
||||
else{
|
||||
//get the string list of sample_id's
|
||||
$sql = "SELECT sample_id FROM `sample` where import_id = $sample_import_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
for($i=0;$i<=count($rs)-1;$i++){ $samimdel[] = $rs[$i]['sample_id'] ;}
|
||||
$samimdel_s = implode(",",$samimdel);
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
//del from questionnaire_sample_exclude_priority
|
||||
$sql = "DELETE FROM `questionnaire_sample_exclude_priority` WHERE sample_id IN ($samimdel_s)";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from questionnaire_sample_quota
|
||||
$sql = "DELETE FROM `questionnaire_sample_quota` WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from questionnaire_sample_quota_row
|
||||
$sql = "DELETE FROM `questionnaire_sample_quota_row` WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from questionnaire_sample_quota_row_exclude
|
||||
$sql = "DELETE FROM `questionnaire_sample_quota_row_exclude` WHERE sample_id IN ($samimdel_s)";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from questionnaire_sample_timeslot
|
||||
$sql = "DELETE FROM `questionnaire_sample_timeslot` WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
//delete from sample_var
|
||||
$sql = "DELETE FROM `sample_var` WHERE sample_id IN ($samimdel_s)";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from sample_import_var_restrict
|
||||
$sql = "DELETE FROM `sample_import_var_restrict` WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from sample
|
||||
$sql = "DELETE FROM `sample` WHERE import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
//del from sample_import
|
||||
$sql = "DELETE FROM `sample_import` WHERE sample_import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
if (mysql_errno() == 0){echo "<div class='alert alert-warning'>", T_("Sample $sample_import_id was deleted."), "</div>"; }
|
||||
else {echo "<div class='alert alert-warning'>ERROR ".mysql_errno()." ".mysql_error()."\n</div>";}
|
||||
}
|
||||
|
||||
unset($_GET['delete_sample']);
|
||||
$samimdel_s = '';
|
||||
}
|
||||
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
if (isset($_GET['edit']) )
|
||||
{
|
||||
xhtml_head(T_("Deidentify"),true,array("../css/table.css"));
|
||||
$subtitle=T_("Rename, Set viewing permissions & Manage sample variables") ;
|
||||
xhtml_head(T_("Sample management"),true,$css,$js_head,false,false,false,$subtitle);
|
||||
|
||||
echo "<div class='col-sm-2'><a href='?' class='btn btn-default' ><i class='fa fa-chevron-left fa-lg' style='color:blue;'></i> " . T_("Go back") . "</a></div>";
|
||||
|
||||
$sample_import_id = intval($_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
|
||||
|
||||
$sample_import_id = intval($_GET['edit']);
|
||||
|
||||
$sql = "SELECT si.description, sv.val, sv.var,
|
||||
CONCAT('<input type=\'checkbox\' name=\'',sv.var,'\' value=\'',sv.var,'\'/>') as box
|
||||
FROM sample_import as si, sample_var as sv, sample as s
|
||||
$sql = "SELECT type, description
|
||||
FROM sample_var_type";
|
||||
$rd = $db->GetAll($sql);
|
||||
|
||||
$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>";
|
||||
}
|
||||
$sql .= "</select>') as type, sv.val,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN (sir.restrict IS NULL || sir.restrict = 0) THEN 'checked=\"checked\"' ELSE '' END ,' name=\"see[]\" value=\'',sir.var_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\"/>') as see,
|
||||
CONCAT('<input type=\'checkbox\' name=\"del[',sir.var_id,']\" value=\'',sir.var_id,'\' $dis data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\" data-onstyle=\'danger \'/>') as del,
|
||||
sir.restrict IS NULL as existss
|
||||
FROM sample_import as si, sample_var as sv, sample as s, sample_import_var_restrict as sir, sample_var_type as svt
|
||||
WHERE si.sample_import_id = $sample_import_id
|
||||
AND sir.sample_import_id = si.sample_import_id
|
||||
AND sir.var_id = sv.var_id
|
||||
AND sv.sample_id = s.sample_id
|
||||
AND s.import_id = si.sample_import_id
|
||||
GROUP BY sv.var";
|
||||
|
||||
AND svt.type = sir.type
|
||||
GROUP BY sir.var_id";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h2>" . T_("Deidentify") . ": " . $rs[0]['description'] . "</h2>";
|
||||
echo "<p><a href='?'>" . T_("Go back") . "</a></p>";
|
||||
|
||||
print "<p>" . T_("Select which fields from this sample to deidentify. Deidentified fields will be permanently deleted from the sample.") . "</p>";
|
||||
|
||||
?>
|
||||
<form action="?" method="post">
|
||||
<?php
|
||||
xhtml_table($rs,array("var","val","box"),array(T_("Field"),T_("Example data"),T_("Deidentify")));
|
||||
?>
|
||||
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||
<div><input type="submit" name="submit" value="<?php echo T_("Delete selected fields");?>"/></div>
|
||||
</form>
|
||||
<?php
|
||||
print "<div class='col-sm-8'><h3>" . T_("Sample") . ": " . $sd['description'] . " <small>ID <b> $sample_import_id</b> </small></h3></div>";
|
||||
print "<div class='col-sm-2'><a href='samplesearch.php?sample_import_id=$sample_import_id' class='btn btn-default' ><i class='fa fa-search fa-lg fa-fw text-primary'></i> " . T_("Search this sample") . "</a></div>";
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
if($sd['enabled'] == 0){
|
||||
|
||||
xhtml_foot();
|
||||
exit();
|
||||
?>
|
||||
<form action="?" method="post" class="form-group " >
|
||||
<div class="form-group">
|
||||
<h4 class="col-sm-3 control-label text-right" for="description"><?php echo T_("Enter")," ", T_("new")," ", T_("Description"),":" ; ?></h4>
|
||||
<div class="col-sm-4"><input type='text' name='description' class="form-control" value="<?php echo $sd['description'];?>" <?php echo $dis ;?>/></div>
|
||||
</div>
|
||||
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||
<div><button type="submit" name="ren" class="btn btn-default"><i class="fa fa-edit fa-lg fa-fw text-primary"></i> <?php echo T_("Rename");?></button></div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
if ($rs){
|
||||
|
||||
?>
|
||||
<form action="?" method="post" class="col-sm-9 form-group">
|
||||
<?php
|
||||
xhtml_table($rs,array("var_id","var","see","type","val","del"),array(T_("ID"),T_("Sample variable (Column)"),T_("Visible?"),T_("Var type"),T_("Example data"),T_("Delete ?")));
|
||||
?>
|
||||
<div><input type='hidden' name='sample_import_id' value='<?php echo $sample_import_id;?>'/></div>
|
||||
</br>
|
||||
<div class="col-sm-6"><button type="submit" name="ed" class="btn btn-primary pull-right"> <i class="fa fa-floppy-o fa-lg fa-fw "></i> <?php echo T_("Save changes");
|
||||
/* if($sd['enabled'] == 0){ ?>
|
||||
</button></div>
|
||||
<div class="col-sm-6 "><button type="submit" name="del__" class="btn btn-danger pull-right"> <i class="fa fa-trash-o fa-lg fa-fw "></i> <?php echo T_("Delete var fields");
|
||||
} */?>
|
||||
</button></div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
print "<div class='well text-danger col-sm-3'><p>" . T_("Select which fields from this sample to deidentify. </p> Deidentified fields will be permanently deleted from the sample.") . "</p></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<div class='alert alert-info' role='alert'><h4>" . T_("There's no data in this sample. Probably was deidentified earlier.") . "</h4></div>";
|
||||
|
||||
/*check `Time_zone_name` and `phone` values for deidentified records*/
|
||||
$sql = "SELECT `sample`.sample_id FROM `sample`
|
||||
LEFT JOIN `sample_var` ON (`sample`.sample_id = `sample_var`.sample_id)
|
||||
WHERE `sample_var`.sample_id IS NULL
|
||||
AND `sample`.import_id = $sample_import_id
|
||||
AND (`sample`.Time_zone_name !='' || `sample`.phone !='')";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs)) {
|
||||
$num = count($rs);
|
||||
print "<div class='well text-danger '><p>" . T_("There're still $num records for `Time_zone_name` and `phone` values for deidentified records") . "</p>";
|
||||
|
||||
print "<form method='POST'><button type='submit' name='dtzph' class='btn btn-danger '> <i class='fa fa-trash-o fa-lg fa-fw '></i> " . T_("Clean it") . "?</button></form></div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
unset ($rs);
|
||||
|
||||
/*check if there's sample_var data not matching sample_import_var_restrict.var_id */
|
||||
$sql = "SELECT `sv`.var_id, `sv`.var, `sv`.type FROM `sample_var` as sv
|
||||
LEFT JOIN `sample_import_var_restrict` as sivr ON (`sivr`.var_id = `sv`.var_id)
|
||||
WHERE `sivr`.var_id IS NULL
|
||||
AND `sv`.sample_id IN (SELECT sample_id FROM `sample` WHERE import_id = $sample_import_id)
|
||||
GROUP BY `sv`.var_id";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
if (!empty($rs)) {
|
||||
$count = count($rs);
|
||||
//print_r($rs);
|
||||
print "<div class='well text-danger col-sm-3'><p>" . T_("Fix this sample ") . "</p>";
|
||||
print "<p>" . $count . " var id's not match</p>";
|
||||
|
||||
/* print "<div class=' '><form method='POST'>
|
||||
<button type='submit' name='restore___' class='btn btn-default pull-left'> <i class='fa fa-reload-o fa-lg fa-fw '></i> " . T_("Restore vars") . "</button>
|
||||
<button type='submit' name='delvarf___' class='btn btn-danger pull-right'> <i class='fa fa-trash-o fa-lg fa-fw '></i> " . T_("Delete vars") . "</button>
|
||||
|
||||
</form></div>"; */
|
||||
print "</div>";
|
||||
|
||||
/* if (isset($_POST['restore___'])){
|
||||
$sql = "INSERT INTO sample_import_var_restrict
|
||||
(`sample_import_id`,`var_id`,`var`,`type`,`restrict`)
|
||||
VALUES ($sample_import_id,' ',' ',' ',1)";
|
||||
|
||||
$db->Execute($sql);
|
||||
unset($_POST['restore___']);
|
||||
}
|
||||
if (isset($_POST['delvarf___'])){
|
||||
$sql = "";
|
||||
|
||||
$db->Execute($sql);
|
||||
unset($_POST['delvarf___']);
|
||||
} */
|
||||
|
||||
unset($rs);
|
||||
}
|
||||
|
||||
if (isset($_POST['dtzph'])){
|
||||
|
||||
/*delete `Time_zone_name` and `phone` values for deidentified records*/
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "UPDATE `sample`
|
||||
LEFT JOIN `sample_var` ON (`sample`.sample_id = `sample_var`.sample_id)
|
||||
SET `Time_zone_name`='',`phone`=''
|
||||
WHERE `sample_var`.sample_id IS NULL
|
||||
AND `sample`.import_id = $sample_import_id";
|
||||
$db->Execute($sql);
|
||||
|
||||
unset($_POST['dtzph']);
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
exit();
|
||||
}
|
||||
|
||||
if (isset($_GET['sampledisable']))
|
||||
{
|
||||
$id = intval($_GET['sampledisable']);
|
||||
@@ -242,7 +445,6 @@ if (isset($_GET['sampledisable']))
|
||||
$sql = "UPDATE sample_import
|
||||
SET enabled = 0
|
||||
WHERE sample_import_id = '$id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
@@ -253,32 +455,52 @@ if (isset($_GET['sampleenable']))
|
||||
$sql = "UPDATE sample_import
|
||||
SET enabled = 1
|
||||
WHERE sample_import_id = '$id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<a href=\'?sampleenable=',sample_import_id,'\'>" . TQ_("Enable") . "</a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?sampledisable=',sample_import_id,'\'>" . TQ_("Disable") . "</a>')
|
||||
END
|
||||
as enabledisable,
|
||||
CONCAT('<a href=\'?edit=',sample_import_id,'\'>" . TQ_("Deidentify") . "</a>') as did,
|
||||
CONCAT('<a href=\'?view=',sample_import_id,'\'>" . TQ_("Operator viewing permissions") . "</a>') as vp,
|
||||
CONCAT('<a href=\'?rename=',sample_import_id,'\'>" . TQ_("Rename") . "</a>') as rname,
|
||||
description
|
||||
FROM sample_import";
|
||||
CONCAT(' <b class=\'badge\'>',sample_import_id,'</b> ') as id,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('  <span class=\'btn label label-default\'>" . TQ_("Disabled") . "</span> ')
|
||||
ELSE
|
||||
CONCAT('  <span class=\'btn label label-primary\'>" . TQ_("Enabled") . "</span> ')
|
||||
END as status,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<a href=\'?sampleenable=',sample_import_id,'\' class=\'btn btn-default col-sm-12\'>" . TQ_("Enable") . " <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>  " . TQ_("Disable") . "</a> ')
|
||||
END
|
||||
as enabledisable,
|
||||
CASE WHEN enabled = 1 THEN
|
||||
CONCAT('<a href=\'?edit=',sample_import_id,'\' class=\'btn btn-default btn-block\' data-toggle=\'tooltip\' title=\'" . TQ_("Edit") ." " . TQ_("Viewing permissions") . "\'><i class=\'fa fa-eye fa-lg fa-fw \'></i></a>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'?edit=',sample_import_id,'\' class=\'btn btn-default \' data-toggle=\'tooltip\' title=\'" . TQ_("Edit sample parameters") . "\'><i class=\'fa fa-eye fa-lg fa-fw text-primary\'></i> + <i class=\'fa fa-edit fa-lg fa-fw text-primary\'></i> + <i class=\'fa fa-minus-circle fa-lg fa-fw text-danger \'></i></a>')
|
||||
END as did,
|
||||
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>')
|
||||
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"). " \n" . TQ_("sample"). " ',sample_import_id,'\'><i class=\'fa fa-phone fa-lg text-primary\'></i></a>') as calls,
|
||||
CONCAT('<h4>',description,' </h4>') as description,
|
||||
CONCAT('<h4 class=\'fa fa-lg text-primary pull-right\'>',(SELECT COUNT( DISTINCT`sample_var`.sample_id) FROM `sample_var`, `sample` WHERE `sample`.sample_id = `sample_var`.sample_id AND `sample`.import_id = sample_import_id ),' </h4>') as cnt
|
||||
FROM sample_import ORDER BY sample_import_id DESC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
$subtitle=T_("Sample list");
|
||||
xhtml_head(T_("Sample management"),true,$css,$js_head,false,false,false,$subtitle);
|
||||
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> " . T_("Go back") . "</a>
|
||||
<a href='import.php' class='btn btn-default col-sm-offset-4' ><i class='fa fa-upload fa-lg'></i> " . T_("Import a sample file") . "</a>
|
||||
</div>";
|
||||
$columns = array("id","description","cnt","status","enabledisable","calls","did","ssearch","delsample"); //"vp","rname",
|
||||
//$titles = array(T_("ID"),T_("Sample"),T_("Records"), T_("Call History"),T_("Enable/Disable"), T_("Status"), T_("Deidentify"), T_("View"), T_("Rename"), T_("Search"), T_("Delete sample"));
|
||||
xhtml_table($rs,$columns, false, "table-hover table-condensed ");
|
||||
|
||||
xhtml_head(T_("Sample list"),true,array("../css/table.css"));
|
||||
|
||||
$columns = array("description","enabledisable","did","vp","rname");
|
||||
$titles = array(T_("Sample"),T_("Enable/Disable"),T_("Deidentify"),T_("Operator viewing permissions"),T_("Rename"));
|
||||
|
||||
xhtml_table($rs,$columns,$titles);
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('[data-toggle="confirmation"]').confirmation();
|
||||
</script>
|
||||
|
||||
@@ -46,14 +46,71 @@ include ("../db.inc.php");
|
||||
*/
|
||||
include("../functions/functions.xhtml.php");
|
||||
|
||||
|
||||
/**
|
||||
* Input functions
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
/* "../include/bootgrid/jquery.bootgrid.css", */
|
||||
"../include/bs-data-table/css/jquery.bdt.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
/* "../include/bootgrid/jquery.bootgrid.min.js", */
|
||||
);
|
||||
$js_foot = array(
|
||||
|
||||
"../include/bs-data-table/js/vendor/jquery.sortelements.js",
|
||||
"../include/bs-data-table/js/jquery.bdt.js",
|
||||
"../js/window.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
$subtitle = T_("Search within this sample");
|
||||
|
||||
xhtml_head(T_("Search the sample"),true,$css,$js_head);
|
||||
|
||||
?>
|
||||
<div class="modal fade delete-confirm" id="delete-confirm" tabindex="-1" role="dialog" aria-labelledby="delete-confirm" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<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") . " " . T_("Sample ID") . " <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>
|
||||
<a class="btn btn-danger" href=" "><?php echo T_("Yes"),", ",T_("Delete");?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>";
|
||||
|
||||
$sql = "SELECT sample_import_id as value,description, CASE WHEN sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import";
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if(!empty($r))
|
||||
|
||||
print "<div class=' form-inline form-group col-md-6'><h4 class='control-label form-group col-sm-6 text-right'>" . T_("Select sample ") . " </h4>";
|
||||
display_chooser($r,"sample_import_id","sample_import_id",true,false,true,false);
|
||||
|
||||
print "</div>";
|
||||
|
||||
if (isset($_GET['sample_id']))
|
||||
{
|
||||
@@ -65,102 +122,84 @@ if (isset($_GET['sample_id']))
|
||||
|
||||
$sql = "DELETE FROM sample_var
|
||||
WHERE sample_id = '$sample_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$sql = "DELETE FROM sample
|
||||
WHERE sample_id = '$sample_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
print "<div class='alert alert-danger pull-left form-group col-sm-6' role='alert'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><p>" . T_("Sample ID") . " <b>" . $sample_id . "</b> " . T_("Deleted") . ".</p></div>";
|
||||
}
|
||||
|
||||
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
|
||||
xhtml_head(T_("Search sample"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
print "<h1>" . T_("Select a sample from the list below") . "</h1>";
|
||||
|
||||
$sql = "SELECT sample_import_id as value,description, CASE WHEN sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import";
|
||||
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if(!empty($r))
|
||||
display_chooser($r,"sample_import_id","sample_import_id");
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
if ($sample_import_id != false)
|
||||
{
|
||||
if (isset($_GET['search']))
|
||||
{
|
||||
$search = $db->qstr($_GET['search']);
|
||||
|
||||
$sql = "SELECT sv.sample_id, CASE WHEN c.case_id IS NULL THEN CONCAT('<a href=\'?sample_import_id=$sample_import_id&sample_id=', sv.sample_id , '\'>" . TQ_("No cases yet assigned: Delete this sample record") . "</a>') ELSE CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\'>" . TQ_("Assigned to questionnaire: ") . "', q.description, '</a>') END as link
|
||||
$sql = "SELECT sv.sample_id, CASE WHEN c.case_id IS NULL THEN
|
||||
CONCAT(' <a href=\'\' data-toggle=\'modal\' data-target=\'.delete-confirm\' data-href=\'?sample_import_id=$sample_import_id&sample_id=', sv.sample_id ,'\' data-sample_id=\' ', sv.sample_id ,' \' class=\'\'><i data-toggle=\'tooltip\' title=\'" . TQ_("Delete sample record") . " ', sv.sample_id ,'\' class=\'fa fa-2x fa-trash-o text-danger\'></i></a> ')
|
||||
ELSE CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\' data-toggle=\'tooltip\' title=\'" . TQ_("Assigned to case ID :") . " ', c.case_id , '\'><b>', c.case_id ,'</b></a>')
|
||||
END as link
|
||||
FROM sample_var AS sv
|
||||
JOIN (sample as s) ON (s.import_id = '$sample_import_id' and sv.sample_id = s.sample_id)
|
||||
LEFT JOIN (`case` AS c, questionnaire AS q) ON ( c.sample_id = sv.sample_id AND q.questionnaire_id = c.questionnaire_id )
|
||||
WHERE sv.val LIKE $search
|
||||
GROUP BY s.sample_id,c.case_id";
|
||||
|
||||
GROUP BY s.sample_id, c.case_id";
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if ($r) {
|
||||
|
||||
if (empty($r))
|
||||
print "<p>" . T_("No records in this sample match this search criteria") . "</p>";
|
||||
else
|
||||
{
|
||||
//add sample information to results
|
||||
$sql = "SELECT var
|
||||
FROM sample_var
|
||||
WHERE sample_id = {$r[0]['sample_id']}";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$fnames = array("sample_id");
|
||||
$fdesc = array(T_("Sample id"));
|
||||
|
||||
|
||||
$fnames[] = "link";
|
||||
$fdesc[] = T_("Case ID");
|
||||
|
||||
$sql = "SELECT var,var_id
|
||||
FROM sample_import_var_restrict
|
||||
WHERE sample_import_id = $sample_import_id
|
||||
ORDER by var ASC";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
foreach($rs as $rsw)
|
||||
{
|
||||
$fnames[] = $rsw['var'];
|
||||
$fnames[] = $rsw['var_id'];
|
||||
$fdesc[] = $rsw['var'];
|
||||
}
|
||||
|
||||
$fnames[] = "link";
|
||||
$fdesc[] = T_("Link");
|
||||
|
||||
foreach($r as &$rw)
|
||||
{
|
||||
$sql = "SELECT var,val
|
||||
$sql = "SELECT var_id,val
|
||||
FROM sample_var
|
||||
WHERE sample_id = {$rw['sample_id']}";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
foreach($rs as $rsw){
|
||||
$rw[$rsw['var_id']] = $rsw['val'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach($rs as $rsw)
|
||||
$rw[$rsw['var']] = $rsw['val'];
|
||||
}
|
||||
|
||||
xhtml_table($r,$fnames,$fdesc);
|
||||
print "<div class='form-group'>";
|
||||
xhtml_table($r,$fnames,$fdesc,"tclass",false,false,"bs-table");
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print "<h1>" . T_("Search within this sample") . "</h1>";
|
||||
|
||||
print "<p>" . T_("Use the % character as a wildcard") ."</p>";
|
||||
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p>
|
||||
<label for="search"><?php echo T_("Search for:"); ?></label><input type="text" name="search" id="search"/><br/>
|
||||
<input type="hidden" name="sample_import_id" value="<?php print($sample_import_id); ?>"/>
|
||||
<input type="submit" name="searchsub" value="<?php echo T_("Start search"); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
else print "<div class='alert alert-info col-sm-6 ' role='alert'><h4>" . T_("There's no data in this sample.") . "</h4></div>";
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('#bs-table').bdt();
|
||||
/* $('#bs-table').bootgrid({
|
||||
ajax: true,
|
||||
post: "$sample_import_id",
|
||||
url: "?sample_import_id=\"$sample_import_id\"",
|
||||
}); */
|
||||
|
||||
$('#delete-confirm').on('show.bs.modal', function (event) {
|
||||
var a = $(event.relatedTarget)
|
||||
var href = a.data('href')
|
||||
var sample_id =a.data('sample_id')
|
||||
var modal = $(this)
|
||||
modal.find('.modal-body p b').text( +sample_id )
|
||||
modal.find('.modal-footer a').attr('href', href)
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -58,14 +58,14 @@ include("../functions/functions.operator.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
xhtml_head(T_("Shift reports"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Shift reports"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
|
||||
print "<h3>" . T_("Please select a questionnaire") . "</h3>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id);
|
||||
display_questionnaire_chooser($questionnaire_id ,false,"form-inline clearfix", "form-control");
|
||||
|
||||
if ($questionnaire_id)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ if ($questionnaire_id)
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if (!empty($r))
|
||||
display_chooser($r,"shift","shift_id",true,"questionnaire_id=$questionnaire_id");
|
||||
display_chooser($r,"shift","shift_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"form-inline form-group");
|
||||
|
||||
if ($shift_id)
|
||||
{
|
||||
|
||||
@@ -44,19 +44,33 @@ include ("../db.inc.php");
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css",
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../js/addrow-v2.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../include/clockpicker/dist/bootstrap-clockpicker.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
$year="2008";
|
||||
$woy="1";
|
||||
|
||||
|
||||
if (isset($_POST['day']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "DELETE FROM shift_template
|
||||
WHERE 1";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
foreach($_POST['day'] as $key => $val)
|
||||
@@ -69,73 +83,77 @@ if (isset($_POST['day']))
|
||||
$start = $db->qstr($_POST['start'][$key],get_magic_quotes_gpc());
|
||||
$end = $db->qstr($_POST['end'][$key],get_magic_quotes_gpc());
|
||||
|
||||
$sql = "INSERT INTO shift_template (day_of_week,start,end)
|
||||
VALUES ('$val',$start,$end)";
|
||||
|
||||
$sql = "INSERT INTO shift_template(day_of_week,start,end)
|
||||
VALUES ($val,$start,$end)";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
}
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Modify shift template"),true,array("../css/shifts.css"),array("../js/addrow-v2.js"));
|
||||
xhtml_head(T_("Set default shift times"),true,$css,$js_head);//T_("Modify shift template"),array("../css/shifts.css"),array("../js/addrow-v2.js")
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'" . DEFAULT_TIME_ZONE . "','UTC') as t";//'Australia/Victoria'
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (empty($rs) || !$rs || empty($rs['t']))
|
||||
print "<div class='alert alert-danger'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
|
||||
/**
|
||||
* Display warning if timezone data not installed
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'Australia/Victoria','UTC') as t";
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (empty($rs) || !$rs || empty($rs['t']))
|
||||
print "<div class='warning'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
|
||||
|
||||
print "<h2>" . T_("Enter standard shift start and end times for each day of the week in local time") . "</h2>";
|
||||
//print "<h1>" . T_("Set default shift times") . "</h1>";
|
||||
print "<div class='well'><t>" . T_("Enter standard shift start and end times for each day of the week in local time") . "</t></div>";
|
||||
|
||||
/**
|
||||
* Begin displaying currently loaded shifts
|
||||
*/
|
||||
|
||||
$sql = "SELECT DATE_FORMAT( STR_TO_DATE( CONCAT( '$year', ' ', '$woy', ' ', day_of_week -1 ) , '%x %v %w' ) , '%W' ) AS dt,day_of_week,start,end
|
||||
$sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT('$year',' ','$woy',' ',day_of_week -1),'%x %v %w'), '%W') AS dt,day_of_week,start,end
|
||||
FROM shift_template";
|
||||
|
||||
$shifts = $db->GetAll($sql);
|
||||
translate_array($shifts,array("dt"));
|
||||
|
||||
$sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT($year, ' ',$woy,' ',day_of_week - 1),'%x %v %w'), '%W') as description, day_of_week as value, '' as selected
|
||||
$sql = "SELECT DATE_FORMAT(STR_TO_DATE(CONCAT($year,' ',$woy,' ',day_of_week - 1),'%x %v %w'), '%W') as description, day_of_week as value, '' as selected
|
||||
FROM day_of_week";
|
||||
|
||||
$daysofweek = $db->GetAll($sql);
|
||||
translate_array($daysofweek,array("description"));
|
||||
|
||||
?>
|
||||
<form method="post" action="">
|
||||
<table>
|
||||
<div class="panel-body col-sm-4"><form method="post" action="" class="form-horizontal">
|
||||
<table class="table-hover table-condensed " id="shifts"><thead class="text-center highlight">
|
||||
<?php
|
||||
print "<tr><th>" . T_("Day") . "</th><th>" . T_("Start") . "</th><th>" . T_("End") . "</th></tr>";
|
||||
print "<tr ><th >" . T_("Day") . "</th><th >" . T_("Start") . "</th><th >" . T_("End") . "</th></tr></thead><tbody>";
|
||||
$count = 0;
|
||||
foreach($shifts as $shift)
|
||||
{
|
||||
print "<tr id='row-$count' class='row_to_clone'><td>";
|
||||
print "<tr id='row-$count'><td>";// class='row_to_clone' /* these are not the rows to clone...*/
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, array("description",$shift['dt']));
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"{$shift['start']}\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"{$shift['end']}\"/></td></tr>";
|
||||
print "</td>
|
||||
<td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" maxlength=\"8\" name=\"start[$count]\" type=\"text\" value=\"{$shift['start']}\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td>
|
||||
<td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" maxlength=\"8\" name=\"end[$count]\" type=\"text\" value=\"{$shift['end']}\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td></tr>";
|
||||
$count++;
|
||||
}
|
||||
print "<tr class='row_to_clone' id='row-$count'><td>";
|
||||
print "<tr class='row_to_clone' id='row-$count'><td>";
|
||||
display_chooser($daysofweek, "day[$count]", false, true, false, false, false, false);
|
||||
print "</td><td><input size=\"8\" name=\"start[$count]\" maxlength=\"8\" type=\"text\" value=\"00:00:00\"/></td><td><input name=\"end[$count]\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"00:00:00\"/></td></tr>";
|
||||
|
||||
print " </td><td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" maxlength=\"8\" name=\"start[$count]\" type=\"text\" value=\"08:00:00\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td>
|
||||
<td><div class=\"input-group clockpicker\"><input readonly class=\"form-control\" size=\"8\" maxlength=\"8\" name=\"end[$count]\" type=\"text\" value=\"20:00:00\"/><span class=\"input-group-addon\"><span class=\"glyphicon glyphicon-time fa\"></span></span></div></td></tr>";
|
||||
|
||||
?>
|
||||
</table>
|
||||
<div><a onclick="addRow(); return false;" href="#"><?php echo T_("Add row"); ?></a></div>
|
||||
<p><input type="submit" name="submit" value="<?php echo T_("Save changes to shifts"); ?>"/></p>
|
||||
</form>
|
||||
</tbody></table>
|
||||
<a class="btn btn-default btn-sm" onclick="addRow(); return false;" href=""><?php echo T_("Add row"); ?></a><br/><br/>
|
||||
<input class="btn btn-default " type="submit" name="submit" value="<?php echo T_("Save changes to shifts"); ?>"/>
|
||||
</form></div>
|
||||
<?php
|
||||
|
||||
|
||||
xhtml_foot();
|
||||
xhtml_foot($js_foot);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$('.clockpicker').clockpicker({
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,33 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* View cases referred to the supervisor and add notes/assign outcomes
|
||||
*
|
||||
*
|
||||
* 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@deakin.edu.au>
|
||||
* @copyright Deakin University 2007,2008
|
||||
* @package queXS
|
||||
* @subpackage admin
|
||||
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -65,6 +38,24 @@ include("../functions/functions.operator.php");
|
||||
*/
|
||||
include("../functions/functions.input.php");
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
//"../include/iCheck/skins/square/blue.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js"
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../include/iCheck/icheck.min.js",
|
||||
"../js/window.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
@@ -72,7 +63,7 @@ $operator_id = get_operator_id();
|
||||
$case_id = false;
|
||||
if (isset($_GET['case_id'])) $case_id = bigintval($_GET['case_id']);
|
||||
|
||||
if (isset($_GET['deidentify']))
|
||||
if (isset($_GET['deidentify-confirm-btn']))
|
||||
{
|
||||
//remove all sample vars
|
||||
$db->StartTrans();
|
||||
@@ -115,8 +106,6 @@ if (isset($_GET['deidentify']))
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isset($_GET['case_note_id']))
|
||||
{
|
||||
$case_note_id = bigintval($_GET['case_note_id']);
|
||||
@@ -128,10 +117,19 @@ if (isset($_GET['case_note_id']))
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Supervisor functions"),true,array("../css/table.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
|
||||
print "<h1>" . T_("Enter a case id or select a case from the list below:") . "</h1>";
|
||||
?>
|
||||
|
||||
<form action="" method="get" class="form-inline">
|
||||
<div class="form-group pull-left">
|
||||
<label for="case_id" class="control-label text-right"><?php echo T_("Case id:"); ?> </label>
|
||||
<input type="text" class="form-control" name="case_id" id="case_id" value="<?php echo $case_id; ?>" placeholder="<?php echo T_("Enter a case id"); ?>"></input>
|
||||
<button type="submit" class=" btn btn-default " name="case_form" value=""><i class="fa fa-check-square-o fa-fw fa-lg text-primary"></i> <?php echo T_("Select case"); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?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
|
||||
WHERE c.current_outcome_id = o.outcome_id
|
||||
@@ -141,18 +139,57 @@ $rs = $db->GetAll($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
print "<div><label for=\"case\">". T_("Select case from list of cases referred to the supervisor:") . " </label>";
|
||||
display_chooser($rs,"case","case_id");
|
||||
print "</div>";
|
||||
print "<form class='form-inline '><div class='form-group'> <b>" . T_("or") . "</b> <label for='case' class='control-label text-right text-warning' >". T_("Select case from list of cases referred to the supervisor:") . " </label>";
|
||||
display_chooser($rs,"case","case_id",true,false,true,false);
|
||||
print "</div></form>";
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<p>
|
||||
<label for="case_id"><?php echo T_("Case id:"); ?> </label><input type="text" name="case_id" id="case_id" value="<?php echo $case_id; ?>"/>
|
||||
<input type="submit" name="case_form" value="<?php echo T_("Select case"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
<div class="modal fade" id="call_outcome_change" tabindex="-1" role="dialog" aria-labelledby="calloutcome" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h3 class="modal-title" id="calloutcome"><?php echo T_("Set an outcome for this call");?></h3>
|
||||
</div><form method="get" action="?" class="form-inline ">
|
||||
<div class="modal-body">
|
||||
<?php
|
||||
$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;?>"/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo T_("Cancel"); ?></button>
|
||||
<button type="submit" name="submit" class="submitclass btn btn-primary"><?php echo T_("Set outcome"); ?></button>
|
||||
</div></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="deidentify-confirm" name="deidentify-confirm" tabindex="-1" role="dialog" aria-labelledby="deidentify-confirm" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<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") . " " . T_("Sample ID") . " <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>
|
||||
<button class="btn btn-danger submitclass" href=" " type="submit" name="deidentify-confirm-btn" ><?php echo T_("Yes"),", ",T_("Delete");?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
//name="deidentify"
|
||||
|
||||
if (isset($_GET['call_id']))
|
||||
{
|
||||
@@ -163,7 +200,6 @@ if (isset($_GET['call_id']))
|
||||
|
||||
if ($outcome_id > 0)
|
||||
{
|
||||
|
||||
$sql = "UPDATE `call`
|
||||
SET outcome_id = '$outcome_id'
|
||||
WHERE call_id = '$call_id'";
|
||||
@@ -173,23 +209,10 @@ if (isset($_GET['call_id']))
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h3>" . T_("Set an outcome for this call") . "</h3>";
|
||||
|
||||
?>
|
||||
<form method="get" action="?">
|
||||
<?php
|
||||
$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);
|
||||
?>
|
||||
<p><input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/><input class="submitclass" type="submit" name="submit" value="<?php echo T_("Set outcome"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
print "<script type='text/javascript' > $(function() { $('#call_outcome_change').modal('show'); }); </script>";
|
||||
}
|
||||
|
||||
//unset($_GET['call_id']);
|
||||
}
|
||||
if ($case_id != false)
|
||||
{
|
||||
@@ -258,7 +281,7 @@ if ($case_id != false)
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
$sql = "SELECT o.description,o.outcome_id, q.description as qd, si.description as sd
|
||||
$sql = "SELECT o.description,o.outcome_id, q.description as qd, si.description as sd, s.import_id as sid
|
||||
FROM `case` as c, `outcome` as o, questionnaire as q, sample as s, sample_import as si
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND q.questionnaire_id = c.questionnaire_id
|
||||
@@ -270,138 +293,201 @@ if ($case_id != false)
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
print "<h1>" . T_("Project") . ": {$rs['qd']}</h1>";
|
||||
print "<h1>" . T_("Sample") . ": {$rs['sd']}</h1>";
|
||||
|
||||
print "<h2>". T_("Current outcome:") ." " . T_($rs['description']) . "</h2>";
|
||||
print " <div class='clearfix'></div>
|
||||
<h3 class='pull-right'> " . T_("Project") . ": <span class='text-primary'>{$rs['qd']} </span></h3>
|
||||
<h3 class='pull-right'> " . T_("Sample") . ": <span class='text-primary'>{$rs['sd']} </span></h3>
|
||||
<h2 class=''>". T_("Current outcome:") ."<span class='text-info'> " . T_($rs['description']) . "</span></h2>";
|
||||
|
||||
$current_outcome_id = $rs['outcome_id'];
|
||||
$sid = $rs['sid'];
|
||||
|
||||
// view sample details
|
||||
print "<div class='panel-body'><h4 class=''><i class='fa fa-book'></i> " . T_("Sample details")."</h4>";
|
||||
|
||||
$sql = "SELECT sv.sample_id, c.case_id , s.Time_zone_name,
|
||||
TIME_FORMAT(CONVERT_TZ(NOW(),@@session.time_zone,s.Time_zone_name),'". TIME_FORMAT ."') as time
|
||||
FROM sample_var AS sv
|
||||
LEFT JOIN (`case` AS c , sample as s) ON ( c.sample_id = sv.sample_id AND s.sample_id = c.sample_id ) WHERE c.case_id = '$case_id'
|
||||
GROUP BY sv.sample_id";
|
||||
$r = $db->GetAll($sql);
|
||||
if ($r){
|
||||
$fnames = array("sample_id", "Time_zone_name", "time");
|
||||
$fdesc = array(T_("Sample id"),T_("Timezone"),T_("Time NOW"));
|
||||
$varr= array();
|
||||
$sql = "SELECT var,var_id
|
||||
FROM sample_import_var_restrict
|
||||
WHERE sample_import_id = $sid AND type IN (2,3,6,7)
|
||||
ORDER by var DESC";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h3>" . T_("Appointments")."</h3>";
|
||||
foreach($rs as $rsw)
|
||||
{
|
||||
$fnames[] = $rsw['var_id'];
|
||||
$fdesc[] = $rsw['var'];
|
||||
$varr[] = $rsw['var_id']; //array for valid var_id's
|
||||
}
|
||||
$varr= implode(",",$varr);
|
||||
foreach($r as &$rw)
|
||||
{
|
||||
$sql = "SELECT var_id,val
|
||||
FROM sample_var
|
||||
WHERE sample_id = {$rw['sample_id']} AND var_id IN ($varr)";
|
||||
$rs = $db->GetAll($sql);
|
||||
foreach($rs as $rsw){
|
||||
$rw[$rsw['var_id']] = $rsw['val'];
|
||||
}
|
||||
}
|
||||
|
||||
xhtml_table($r,$fnames,$fdesc,"tclass");
|
||||
}else{
|
||||
print "<p class='alert text-danger'>" . T_("No sample data for this case") . "</p>";
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
//View appointments
|
||||
print "<div class='panel-body'><h4 class=''><i class='fa fa-clock-o'></i> " . T_("Appointments")."</h4>";
|
||||
|
||||
//View appointments
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, IFNULL(ou.description,'" . T_("Not yet called") . "') as outcome, oo.firstName as makerName, ooo.firstName as callerName, CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id, CONCAT('<a href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". TQ_("Delete") . "</a>') as link, CONCAT('<a href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". TQ_("Edit") . "</a>') as edit
|
||||
$sql = "SELECT
|
||||
CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start,
|
||||
CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end,
|
||||
CONCAT(r.firstName,' ', r.lastName) as resp,
|
||||
IFNULL(ou.description,'" . T_("Not yet called") . "') as outcome,
|
||||
CONCAT (oo.firstName,' ', oo.lastName) as makerName,
|
||||
CONCAT (ooo.firstName,' ', ooo.lastName) as callerName,
|
||||
CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
CONCAT(' <a href=\'\' data-toggle=\'confirmation\' data-placement=\'left\' data-href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id,'&delete=delete\'><i class=\'fa fa-trash fa-lg text-danger\' data-toggle=\'tooltip\' title=\'" . TQ_("Delete") . "\'></i></a> ') as link,
|
||||
CONCAT(' <a href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\' data-toggle=\'tooltip\' title=\'" . TQ_("Edit") . "\'><i class=\'fa fa-edit fa-lg\'></i></a> ') as edit
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as o, operator as oo, call_attempt as cc) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
||||
WHERE c.case_id = '$case_id'
|
||||
GROUP BY a.appointment_id
|
||||
ORDER BY a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
translate_array($rs,array("outcome"));
|
||||
xhtml_table($rs,array("description","start","end","makerName","firstName","lastName","outcome","callerName","link","edit"),array(T_("Questionnaire"),T_("Start"),T_("End"),T_("Operator Name"),T_("Respondent Name"),T_("Surname"),T_("Current outcome"),T_("Operator who called"),T_("Delete"),T_("Edit")));
|
||||
xhtml_table($rs,array("start","end","edit","makerName","resp","outcome","callerName","link"),array(T_("Start"),T_("End")," <i class='fa fa-edit fa-lg'></i> ",T_("Operator"),T_("Respondent"),T_("Current outcome"),T_("Operator who called")," <i class='fa fa-trash fa-lg'></i> "),"table-hover table-bordered table-condensed col-sm-10");
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No appointments for this case") . "</p>";
|
||||
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']){
|
||||
$rtz= $r[0]['Time_zone_name'];
|
||||
print " <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> " . T_("Create appointment") . "</a>"; }
|
||||
|
||||
print "<p><a href='displayappointments.php?case_id=$case_id&new=new'>" . T_("Create appointment for this case") . "</a></p>";
|
||||
print "</div>";
|
||||
|
||||
|
||||
//view calls and outcomes
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,CONVERT_TZ(c.end,'UTC',r.Time_zone_name) as end, op.firstName, op.lastName, o.description as des, CONCAT('<a href=\'?case_id=$case_id&call_id=', c.call_id, '\'>". TQ_("Edit") . "</a>') as link, cp.phone as phone
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,CONVERT_TZ(c.end,'UTC',r.Time_zone_name) as end, CONCAT(op.firstName,' ',op.lastName) as firstName, o.description as des, CONCAT(' <a href=\'?case_id=$case_id&call_id=', c.call_id, '\' data-toggle=\'tooltip\' title=\'" . TQ_("Change outcome") . "\'><i class=\'fa fa-edit fa-lg \'></i></a>') as link, cp.phone as phone
|
||||
FROM `call` as c
|
||||
JOIN (operator as op, outcome as o, respondent as r, contact_phone as cp) on (c.operator_id = op.operator_id and c.outcome_id = o.outcome_id and r.respondent_id = c.respondent_id and cp.contact_phone_id = c.contact_phone_id)
|
||||
WHERE c.case_id = '$case_id'
|
||||
ORDER BY c.start DESC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h3>" . T_("Call list")."</h3>";
|
||||
print "<div class='panel-body col-sm-6'><h4 class=''><i class='fa fa-phone'></i> " . T_("Call list")."</h4>";
|
||||
if (empty($rs))
|
||||
print "<p>" . T_("No calls made") . "</p>";
|
||||
print "<div class='alert text-info' role='alert'><h4>" . T_("No calls made") . "</h4></div>";
|
||||
else
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("start","des","phone","link","firstName"),array(T_("Date/Time"),T_("Outcome"),T_("Phone number"),T_("Change outcome"),T_("Operator")));
|
||||
xhtml_table($rs,array("start","phone","firstName","des","link"),array(T_("Date/Time"),T_("Phone number"),T_("Operator"),T_("Outcome")," <i class='fa fa-edit fa-lg'></i> "));
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
//view timeslots
|
||||
$sql = "SELECT count(*)
|
||||
//view notes
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, CONCAT(op.firstName,' ',op.lastName) as firstName, c.note as note, CONCAT('<a href=\'\' data-toggle=\'confirmation\' data-placement=\'left\' data-href=\'?case_id=$case_id&case_note_id=', c.case_note_id, '\' class=\'btn center-block\' ><i class=\'fa fa-trash fa-lg text-danger\' data-toggle=\'tooltip\' title=\'" . TQ_("Delete") . "\'></i></a>') as link
|
||||
FROM `case_note` as c
|
||||
JOIN (operator as op) on (c.operator_id = op.operator_id)
|
||||
WHERE c.case_id = '$case_id'
|
||||
ORDER BY c.datetime DESC";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div class='panel-body col-sm-6'><h4 class=''><i class='fa fa-file-text'></i> " . T_("Case notes")."</h4>";
|
||||
|
||||
if (empty($rs))
|
||||
print "<p class='alert text-info'>" . T_("No notes") . "</p>";
|
||||
else {
|
||||
xhtml_table($rs,array("time","firstName","note","link"),array(T_("Date/Time"),T_("Operator"),T_("Note")," <i class='fa fa-trash fa-lg'></i> "));
|
||||
print "<br/>";
|
||||
}
|
||||
//add a note
|
||||
?>
|
||||
<form method="get" action="?" class="form-inline" >
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
<input type="text" class="textclass form-control" name="note" id="note" style="width: 70%;"/> 
|
||||
<button class="submitclass btn btn-default" type="submit" name="submit"><i class="fa fa-file-text"></i> <?php echo T_("Add note"); ?></button>
|
||||
</form>
|
||||
<?php
|
||||
print "</div>";
|
||||
|
||||
//view timeslots
|
||||
$sql = "SELECT count(*)
|
||||
FROM questionnaire_timeslot as q, `case` as c
|
||||
WHERE c.case_id = $case_id
|
||||
AND c.questionnaire_id = q.questionnaire_id";
|
||||
|
||||
if ($db->GetOne($sql) >= 1)
|
||||
{
|
||||
print "<h3>" . T_("Call attempts by timeslot") . "</h3>";
|
||||
|
||||
$sql = "SELECT ag.description, (SELECT COUNT(*) FROM availability as a, `call_attempt` as ca WHERE ca.case_id = c.case_id AND a.availability_group_id = ag.availability_group_id
|
||||
AND (a.day_of_week = DAYOFWEEK(CONVERT_TZ(ca.start,'UTC',s.Time_zone_name))
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' , s.Time_zone_name)) >= a.start
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' , s.Time_zone_name)) <= a.end)) as cou
|
||||
if ($db->GetOne($sql) >= 1)
|
||||
{
|
||||
$sql = "SELECT ag.description, (SELECT COUNT(*) FROM availability as a, `call_attempt` as ca
|
||||
WHERE ca.case_id = c.case_id
|
||||
AND a.availability_group_id = ag.availability_group_id
|
||||
AND (a.day_of_week = DAYOFWEEK(CONVERT_TZ(ca.start,'UTC',s.Time_zone_name))
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' , s.Time_zone_name)) >= a.start
|
||||
AND TIME(CONVERT_TZ(ca.start, 'UTC' , s.Time_zone_name)) <= a.end)) as cou
|
||||
FROM availability_group as ag, `case` as c, `questionnaire_timeslot` as qt, sample as s
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND s.sample_id = c.sample_id
|
||||
AND qt.questionnaire_id = c.questionnaire_id AND ag.availability_group_id = qt.availability_group_id";
|
||||
if ( array("cou") >=1){
|
||||
print "<div class='panel-body col-sm-6'><h4 class=''><i class='fa fa-list'></i> " . T_("Call attempts by timeslot") . "</h4>";
|
||||
xhtml_table($db->GetAll($sql),array('description','cou'),array(T_("Time slot"),T_("Call attempts")));//,"tclass",false,array("cou")
|
||||
print "</div>";
|
||||
}
|
||||
} else { print "<b class=' text-info col-sm-6'>" . T_("Time slots NOT defined") . "</b>"; }
|
||||
|
||||
xhtml_table($db->GetAll($sql),array('description','cou'),array(T_("Time slot"),T_("Call attempts")));
|
||||
|
||||
}
|
||||
|
||||
//view notes
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note, CONCAT('<a href=\'?case_id=$case_id&case_note_id=', c.case_note_id, '\'>". TQ_("Delete") . "</a>') as link
|
||||
FROM `case_note` as c
|
||||
JOIN (operator as op) on (c.operator_id = op.operator_id)
|
||||
WHERE c.case_id = '$case_id'
|
||||
ORDER BY c.datetime DESC";
|
||||
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<h3>" . T_("Case notes")."</h3>";
|
||||
|
||||
if (empty($rs))
|
||||
print "<p>" . T_("No notes") . "</p>";
|
||||
else
|
||||
xhtml_table($rs,array("time","firstName","note","link"),array(T_("Date/Time"),T_("Operator"),T_("Note"),T_("Delete")));
|
||||
|
||||
|
||||
//add a note
|
||||
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
|
||||
|
||||
print "<div class='panel-body'><h4><i class='fa fa-link'></i> " . T_("Assign this case to operator (will appear as next case for them)") . "</h4>";
|
||||
?>
|
||||
<form method="get" action="?">
|
||||
<p>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/><input type="text" class="textclass" name="note" id="note"/><input class="submitclass" type="submit" name="submit" value="<?php echo T_("Add note"); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<form method="get" action="?" class="form-inline">
|
||||
<?php
|
||||
$sql = "SELECT operator_id as value,CONCAT(firstName,' ', lastName) as description, CASE WHEN next_case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM operator
|
||||
WHERE enabled = 1";
|
||||
|
||||
$rs3 = $db->GetAll($sql);
|
||||
display_chooser($rs3, "operator_id", "operator_id",true,false,false,false);
|
||||
?>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
<button class="submitclass btn btn-default" type="submit" name="submit" ><i class="fa fa-link fa-lg"></i> <?php echo T_("Assign this case to operator"); ?></button>
|
||||
</form></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
//Modify the case in Limesurvey
|
||||
|
||||
$sid = get_lime_sid($case_id);
|
||||
$id = get_lime_id($case_id);
|
||||
print "<div class='panel-body'>";
|
||||
if ($id)
|
||||
print "<h3><a href='" . LIME_URL . "admin/admin.php?action=dataentry&sid=$sid&subaction=edit&id=$id'>" . T_("Modify responses for this case") . "</a></h3>";
|
||||
print "<h4><a href='" . LIME_URL . "admin/admin.php?action=dataentry&sid=$sid&subaction=edit&id=$id' class='btn btn-default btn-lime'><i class='fa fa-lemon-o fa-lg'></i> " . T_("Modify responses for this case") . "</a></h4>";
|
||||
else
|
||||
print "<h3>" . T_("Case not yet started in Limesurvey") . "</h3>";
|
||||
|
||||
//set an outcome
|
||||
|
||||
print "<h3>" . T_("Set a case outcome") . "</h3>";
|
||||
|
||||
?>
|
||||
<form method="get" action="?">
|
||||
<?php
|
||||
$sql = "SELECT outcome_id as value,description, CASE WHEN outcome_id = '$current_outcome_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM outcome";
|
||||
|
||||
$rs2 = $db->GetAll($sql);
|
||||
translate_array($rs2,array("description"));
|
||||
display_chooser($rs2, "outcome_id", "outcome_id",true,false,false);
|
||||
|
||||
?>
|
||||
<p><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/><input class="submitclass" type="submit" name="submit" value="<?php echo T_("Set outcome"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
//view availability
|
||||
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
|
||||
|
||||
print "<div class='panel-body col-sm-6'><h4 class=''><i class='fa fa-calendar'></i> " . T_("Availability groups") . "</h4>";
|
||||
if (is_using_availability($case_id))
|
||||
{
|
||||
|
||||
//List all availability group items and whether selected or not (all selected by default unless >= 1 availability group is in use for this case
|
||||
$sql = "SELECT qa.availability_group_id,ag.description,ca.availability_group_id as selected_group_id
|
||||
FROM `case` as c
|
||||
@@ -413,9 +499,8 @@ if ($case_id != false)
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//Display all availability groups as checkboxes
|
||||
|
||||
print "<p>" . T_("Select groups to limit availability (Selecting none means always available)") . "</p>";
|
||||
print "<form action='?' method='get'>";
|
||||
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)
|
||||
{
|
||||
$checked = "";
|
||||
@@ -423,60 +508,69 @@ if ($case_id != false)
|
||||
//if ($allselected || $r['availability_group_id'] == $r['selected_group_id'])
|
||||
if ($r['availability_group_id'] == $r['selected_group_id'])
|
||||
$checked = "checked='checked'";
|
||||
|
||||
|
||||
print " <div><input type='checkbox' name='ag{$r['availability_group_id']}' id='ag{$r['availability_group_id']}'
|
||||
value='{$r['availability_group_id']}' $checked />
|
||||
<label for='ag{$r['availability_group_id']}'>{$r['description']}</label></div>";
|
||||
|
||||
print " <input type='checkbox' name='ag{$r['availability_group_id']}' id='ag{$r['availability_group_id']}' value='{$r['availability_group_id']}' $checked />  <label class='control-label' for='ag{$r['availability_group_id']}'>{$r['description']}</label></br>";
|
||||
}
|
||||
?>
|
||||
<p><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/><input class="submitclass" type="submit" name="submitag" value="<?php echo T_("Update case availability"); ?>"/></p>
|
||||
?> </div>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
<button class="submitclass btn btn-default pull-right" type="submit" name="submitag"><i class="fa fa-calendar fa-lg"></i> <?php echo T_("Update case availability");?></button>
|
||||
</form>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<p>" . T_("Availability groups not defined for this questionnaire") . "</p>";
|
||||
print "<div class='alert text-info' role='alert'><h5>" . T_("Availability groups not defined for this questionnaire") . "</h5></div>";
|
||||
}
|
||||
print "</div>"; }
|
||||
|
||||
|
||||
//assign this to an operator for their next case
|
||||
print "<h3>" . T_("Assign this case to operator (will appear as next case for them)") . "</h3>";
|
||||
//set an outcome
|
||||
print "<div class='clearfix '></div><div class='panel-body col-sm-6 '><h4><i class='fa fa-dot-circle-o'></i> " . T_("Set a case outcome") . "</h4>";
|
||||
?>
|
||||
<form method="get" action="?">
|
||||
<form method="get" action="?" class="form-inline">
|
||||
<?php
|
||||
$sql = "SELECT operator_id as value,CONCAT(firstName,' ', lastName) as description, CASE WHEN next_case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM operator
|
||||
WHERE enabled = 1";
|
||||
|
||||
$rs3 = $db->GetAll($sql);
|
||||
display_chooser($rs3, "operator_id", "operator_id",true,false,false);
|
||||
$sql = "SELECT outcome_id as value,description, CASE WHEN outcome_id = '$current_outcome_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM outcome";
|
||||
|
||||
$rs2 = $db->GetAll($sql);
|
||||
translate_array($rs2,array("description"));
|
||||
display_chooser($rs2, "outcome_id", "outcome_id",true,false,false,false);
|
||||
?>
|
||||
<p><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/><input class="submitclass" type="submit" name="submit" value="<?php echo T_("Assign this case to operator"); ?>"/></p>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>" /><br/><br/>
|
||||
<button class="submitclass btn btn-primary" type="submit" name="submit" ><i class="fa fa-dot-circle-o fa-lg"></i> <?php echo T_("Set outcome"); ?></button>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
//deidentify record
|
||||
print "<h3>" . T_("Deidentify") . "</h3>";
|
||||
print "<p>" . T_("Remove all sample details and contact numbers from this case") . "</p>";
|
||||
print "</div>";
|
||||
|
||||
if ($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> " . T_("Deidentify") . "</h4>";
|
||||
print "<div class='well'>" . T_("Remove all sample details and contact numbers from this case") . "</div>";
|
||||
?>
|
||||
<form method="get" action="?">
|
||||
<p>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
<input class="submitclass" type="submit" name="deidentify" id="deidentify" value="<?php echo T_("Deidentify");?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
<button class=" btn btn-danger" name="deidentify" id="deidentify" data-toggle="confirmation" ><i class="fa fa-trash fa-lg"></i> <?php echo T_("Deidentify");?></button>
|
||||
</form></div>
|
||||
<?php }
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<h2>" . T_("Case does not exist") . "</h2>";
|
||||
print "<h3 class='alert alert-warning'>" . T_("Case does not exist") . "</h3>";
|
||||
}
|
||||
}
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
xhtml_foot($js_foot);// deidentify data-toggle="modal" type="submit"submitclass
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('[data-toggle="confirmation"]').confirmation();
|
||||
$("#deidentify").click(function(){
|
||||
$("#deidentify-confirm").modal('show');});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input').iCheck({
|
||||
/* checkboxClass: 'icheckbox_square-blue', */
|
||||
/* increaseArea: '15%' */
|
||||
checkboxClass: 'fa fa-lg', // text-primary
|
||||
checkedCheckboxClass: 'fa-check-square-o text-primary',
|
||||
uncheckedCheckboxClass: 'fa-square-o'
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -58,26 +58,34 @@ if (isset($_POST['update']))
|
||||
set_setting("chat_enabled",$enable);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Supervisor chat"),true,false,array("../js/window.js"));
|
||||
xhtml_head(T_("Supervisor chat"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/bootstrap-toggle/css/bootstrap-toggle.min.css","../css/custom.css"),array("../include/jquery/jquery.min.js", "../include/bootstrap/js/bootstrap.min.js","../include/bootstrap-toggle/js/bootstrap-toggle.min.js","../js/window.js"));
|
||||
|
||||
print "<p>" . T_("Allow interviewers to chat with the supervisor over XMPP (Jabber). Required is a BOSH enabled XMPP/Jabber server. The operators and the supervisor will need XMPP/Jabber accounts.") . "</p>";
|
||||
print "<p class='well'>" . T_("Allow interviewers to chat with the supervisor over XMPP (Jabber). Required is a BOSH enabled XMPP/Jabber server. The operators and the supervisor will need XMPP/Jabber accounts.") . "</p>";
|
||||
|
||||
$e = get_setting("chat_enabled");
|
||||
$checked = "checked='checked'";
|
||||
if (empty($e))
|
||||
$checked = "";
|
||||
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<p>
|
||||
<div><label for="enable"><?php echo T_("Enable supervisor chat?"); ?>: </label><input id='enable' type='checkbox' name='enable' val='1' <?php echo $checked; ?>/></div>
|
||||
<div><label for="bosh"><?php echo T_("Set BOSH URL"); ?>: </label><input id='bosh' type='text' name='bosh' value='<?php echo get_setting("bosh_service"); ?>'/></div>
|
||||
<div><label for="supervisor"><?php echo T_("Supervisor XMPP/Jabber id"); ?>: </label><input id='supervisor' name='supervisor' type='text' value='<?php echo get_setting("supervisor_xmpp"); ?>'/></div>
|
||||
<div><input type="submit" id="update" name="update" value="<?php echo T_("Update"); ?>"/></div>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3" for="enable"><?php echo T_("Enable supervisor chat?"); ?>: </label>
|
||||
<input id='enable' type='checkbox' data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80" name='enable' val='1' <?php echo $checked; ?>/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3" for="bosh"><?php echo T_("Set BOSH URL"); ?>: </label>
|
||||
<input id='bosh' type='text' name='bosh' class="form-control pull-left" required size="60" value='<?php echo get_setting("bosh_service"); ?>'/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3" for="supervisor"><?php echo T_("Supervisor XMPP/Jabber id"); ?>: </label>
|
||||
<input id='supervisor' name='supervisor' type='text' class="form-control pull-left" required size="60" value='<?php echo get_setting("supervisor_xmpp"); ?>'/>
|
||||
</div>
|
||||
|
||||
<input type="submit" id="update" name="update" class="btn btn-primary col-sm-offset-3 col-sm-3" value="<?php echo T_("Update"); ?>"/>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
?>
|
||||
|
||||
@@ -72,9 +72,9 @@ if ($p)
|
||||
set_setting('systemsort',false);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Monitor system wide case sorting"),true,array("../css/table.css"),false,false,false,true);
|
||||
xhtml_head(T_("Monitor system wide case sorting"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),false,false,false,true);
|
||||
|
||||
print "<h1>" . T_("Running process:") . " $p</h1>";
|
||||
print "<h2>" . T_("Running process:") . " $p</h2>";
|
||||
|
||||
if (is_process_killed($p))
|
||||
{
|
||||
@@ -91,14 +91,13 @@ if ($p)
|
||||
{
|
||||
xhtml_table($d,array('process_log_id','datetime','data'),array(T_("Log id"), T_("Date"), T_("Log entry")));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Monitor system wide case sorting"),true,array("../css/table.css"));
|
||||
print "<h2>" . T_("Monitor system wide case sorting") . "</h2>";
|
||||
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 "<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>";
|
||||
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>";
|
||||
$d = process_get_last_data(2);
|
||||
if ($d !== false)
|
||||
|
||||
@@ -243,23 +243,26 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin
|
||||
LEFT JOIN questionnaire_sample_exclude_priority AS qsep ON (qsep.questionnaire_id = c.questionnaire_id AND qsep.sample_id = c.sample_id)
|
||||
LEFT JOIN case_availability AS casa ON (casa.case_id = c.case_id)
|
||||
LEFT JOIN availability AS ava ON (ava.availability_group_id = casa.availability_group_id)
|
||||
LEFT JOIN questionnaire_timeslot AS qast ON (qast.questionnaire_id = c.questionnaire_id)
|
||||
LEFT JOIN questionnaire_sample_timeslot AS qasts ON (qasts.questionnaire_id = c.questionnaire_id AND qasts.sample_import_id = si.sample_import_id)
|
||||
WHERE c.current_operator_id IS NULL
|
||||
AND c.questionnaire_id = '$questionnaire_id'
|
||||
LEFT JOIN questionnaire_timeslot AS qast ON (qast.questionnaire_id = c.questionnaire_id)
|
||||
LEFT JOIN questionnaire_sample_timeslot AS qasts ON (qasts.questionnaire_id = c.questionnaire_id AND qasts.sample_import_id = si.sample_import_id)
|
||||
WHERE c.current_operator_id IS NULL
|
||||
AND c.questionnaire_id = '$questionnaire_id'
|
||||
AND ((apn.appointment_id IS NOT NULL) OR casa.case_id IS NULL OR (ava.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= ava.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= ava.end ))
|
||||
AND ((apn.appointment_id IS NOT NULL) OR qast.questionnaire_id IS NULL OR ((SELECT COUNT(*) FROM availability WHERE availability.availability_group_id = qast.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= availability.end)) >= 1 AND (SELECT COUNT(call_attempt_id) FROM `call_attempt`, availability WHERE call_attempt.case_id = c.case_id AND (availability.availability_group_id = qast.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end))) = ( SELECT (SELECT COUNT(*) FROM availability, call_attempt WHERE call_attempt.case_id = c.case_id AND availability.availability_group_id = availability_group.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end)) as cou FROM availability_group, questionnaire_timeslot WHERE questionnaire_timeslot.questionnaire_id = c.questionnaire_id AND availability_group.availability_group_id = questionnaire_timeslot.availability_group_id ORDER BY cou ASC LIMIT 1)))
|
||||
AND ((apn.appointment_id IS NOT NULL) OR qasts.questionnaire_id IS NULL OR ((SELECT COUNT(*) FROM availability WHERE availability.availability_group_id = qasts.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= availability.end)) >= 1 AND (SELECT COUNT(call_attempt_id) FROM `call_attempt`, availability WHERE call_attempt.case_id = c.case_id AND (availability.availability_group_id = qasts.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end))) = ( SELECT (SELECT COUNT(*) FROM availability, call_attempt WHERE call_attempt.case_id = c.case_id AND availability.availability_group_id = availability_group.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end)) as cou FROM availability_group, questionnaire_sample_timeslot WHERE questionnaire_sample_timeslot.questionnaire_id = c.questionnaire_id AND questionnaire_sample_timeslot.sample_import_id = si.sample_import_id AND availability_group.availability_group_id = questionnaire_sample_timeslot.availability_group_id ORDER BY cou ASC LIMIT 1)))
|
||||
|
||||
AND ((apn.appointment_id IS NOT NULL) OR qast.questionnaire_id IS NULL OR ((SELECT COUNT(*) FROM availability WHERE availability.availability_group_id = qast.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= availability.end)) >= 1 AND (SELECT COUNT(call_attempt_id) FROM `call_attempt`, availability WHERE call_attempt.case_id = c.case_id AND (availability.availability_group_id = qast.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end))) = ( SELECT (SELECT COUNT(*) FROM availability, call_attempt WHERE call_attempt.case_id = c.case_id AND availability.availability_group_id = availability_group.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end)) as cou FROM availability_group, questionnaire_timeslot WHERE questionnaire_timeslot.questionnaire_id = c.questionnaire_id AND availability_group.availability_group_id = questionnaire_timeslot.availability_group_id ORDER BY cou ASC LIMIT 1)))
|
||||
|
||||
AND ((apn.appointment_id IS NOT NULL) OR qasts.questionnaire_id IS NULL OR ((SELECT COUNT(*) FROM availability WHERE availability.availability_group_id = qasts.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(NOW(),'System',s.Time_zone_name)) AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= availability.end)) >= 1 AND (SELECT COUNT(call_attempt_id) FROM `call_attempt`, availability WHERE call_attempt.case_id = c.case_id AND (availability.availability_group_id = qasts.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end))) = ( SELECT (SELECT COUNT(*) FROM availability, call_attempt WHERE call_attempt.case_id = c.case_id AND availability.availability_group_id = availability_group.availability_group_id AND (availability.day_of_week = DAYOFWEEK(CONVERT_TZ(call_attempt.start,'UTC',s.Time_zone_name)) AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) >= availability.start AND TIME(CONVERT_TZ(call_attempt.start, 'UTC' , s.Time_zone_name)) <= availability.end)) as cou FROM availability_group, questionnaire_sample_timeslot WHERE questionnaire_sample_timeslot.questionnaire_id = c.questionnaire_id AND questionnaire_sample_timeslot.sample_import_id = si.sample_import_id AND availability_group.availability_group_id = questionnaire_sample_timeslot.availability_group_id ORDER BY cou ASC LIMIT 1)))
|
||||
|
||||
AND (a.call_id is NULL or (a.end < CONVERT_TZ(DATE_SUB(NOW(), INTERVAL ou.default_delay_minutes MINUTE),'System','UTC')))
|
||||
AND ap.case_id is NULL
|
||||
AND ((qsep.questionnaire_id is NULL) or qsep.exclude = 0)
|
||||
AND !(q.restrict_work_shifts = 1 AND sh.shift_id IS NULL)
|
||||
AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL)
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_attempt_max = 0 or ((SELECT count(*) FROM call_attempt WHERE case_id = c.case_id) < qs.call_attempt_max))
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_max = 0 or ((SELECT count(*) FROM `call` WHERE case_id = c.case_id) < qs.call_max))
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_attempt_max = 0 or ((SELECT count(*) FROM call_attempt WHERE call_attempt.case_id = c.case_id) < qs.call_attempt_max))
|
||||
AND ((apn.appointment_id IS NOT NULL) or qs.call_max = 0 or ((SELECT count(*) FROM `call` WHERE `call`.case_id = c.case_id) < qs.call_max))
|
||||
AND (SELECT count(*) FROM `questionnaire_sample_quota` WHERE questionnaire_id = c.questionnaire_id AND sample_import_id = s.import_id AND quota_reached = 1) = 0
|
||||
GROUP BY c.case_id
|
||||
ORDER BY IF(ISNULL(apn.end),1,0),apn.end ASC, qsep.priority DESC, a.start ASC";
|
||||
ORDER BY IF(ISNULL(apn.end),1,0),apn.end ASC, qsep.priority DESC, CONVERT_TZ(NOW(), 'System' , s.Time_zone_name) DESC , a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ include("../functions/functions.input.php");
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_POST['dtime_zone']))
|
||||
{
|
||||
set_setting('DEFAULT_TIME_ZONE', $_POST['dtime_zone']);
|
||||
|
||||
}
|
||||
|
||||
if (isset($_GET['time_zone']))
|
||||
@@ -89,49 +89,48 @@ if (isset($_GET['tz']))
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Add/Remove Timezones"),true,array("../css/shifts.css"),array("../js/window.js"));
|
||||
xhtml_head(T_("Set Timezones"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js")); //,"../include/bootstrap/css/bootstrap-theme.min.css"
|
||||
|
||||
$dtz = get_setting("DEFAULT_TIME_ZONE");
|
||||
|
||||
$sql = "SELECT name as value, name as description,
|
||||
CASE WHEN name LIKE '$dtz' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM mysql.time_zone_name";
|
||||
FROM mysql.time_zone_name";
|
||||
|
||||
$tzl = $db->GetAll($sql);
|
||||
|
||||
if (empty($tzl) || !$tzl)
|
||||
{
|
||||
print "<div class='warning'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</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></div>";
|
||||
}
|
||||
|
||||
print "<h1>" . T_("Set default timezone") . ": </h1>";
|
||||
print "<div class='col-sm-4 '><h3 class=''>" . T_("Default Timezone: ") . " <b class='text-primary'>$dtz</b></h3>";//<div class='panel-body'>
|
||||
?>
|
||||
<form action="" method="post"><p>
|
||||
<label for="dtime_zone"><?php echo T_("Default Timezone: "); ?></label><?php display_chooser($tzl, 'dtime_zone', 'dtime_zone', false, false, false, false, false); ?>
|
||||
<input type="submit" name="set_dtimezone" value="<?php echo T_("Set default timezone"); ?>"/></p>
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
<?php display_chooser($tzl, 'dtime_zone', 'dtime_zone',false,false,false,true,false,true,"form-inline pull-left"); ?> 
|
||||
<input type="submit" class='btn btn-default fa' name="set_dtimezone" value="<?php echo T_("Set default timezone"); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
print "</div>";
|
||||
|
||||
print "<h1>" . T_("Click to remove a Timezone from the default list") . "</h1>";
|
||||
print "<div class='col-sm-5'><h3>" . T_("Timezone list") . "</h3>";
|
||||
|
||||
$sql = "SELECT Time_zone_name
|
||||
FROM timezone_template";
|
||||
$sql = "SELECT Time_zone_name, TIME_FORMAT(CONVERT_TZ(NOW(),@@session.time_zone,Time_zone_name),'". TIME_FORMAT ."') as time, CONCAT('<p class=\'text-center\' style=\'margin-bottom: 3px;\'><b class=\'label label-default\' style=\'font-size:85%;\'>', TIME_FORMAT(TIMEDIFF( CONVERT_TZ(NOW(),'$dtz','$dtz'),CONVERT_TZ(NOW(), Time_zone_name,'$dtz')),' %H : %i'), '</b></p>') AS timediff,
|
||||
CONCAT('<a href=\"?tz=', Time_zone_name ,'\" title=\"" . T_("Remove Timezone") . "\"><i class=\"fa fa-trash fa-lg text-danger\">" . T_("Remove") . "</i></a>') as link
|
||||
FROM timezone_template ORDER BY time ASC";
|
||||
|
||||
$qs = $db->GetAll($sql);
|
||||
xhtml_table($qs, array("Time_zone_name","timediff","time","link"), array(T_("Timezone name"),T_("Time diff to Default Time zone"),T_("Current time"),T_("Remove")));
|
||||
print "</div>";
|
||||
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<p><a href=\"?tz={$q['Time_zone_name']}\">{$q['Time_zone_name']} </a></p>";
|
||||
}
|
||||
|
||||
print "<h1>" . T_("Add a Timezone:") . "</h1>";
|
||||
print "<div class='col-sm-3'><h3 class=''>" . T_("Add a Timezone:") . " </h3>";
|
||||
?>
|
||||
<form action="" method="get"><p>
|
||||
<label for="time_zone"><?php echo T_("Timezone: "); ?></label><?php display_chooser($tzl, 'time_zone', 'time_zone', false, false, false, false, false); ?>
|
||||
<input type="submit" name="add_timezone" value="<?php echo T_("Add Timezone"); ?>"/></p>
|
||||
<form action="" method="get" class="form-horizontal">
|
||||
<?php display_chooser($tzl, 'time_zone', 'time_zone',false,false,false,true,false,true,"form-inline pull-left"); ?> 
|
||||
<input type="submit" class='btn btn-default fa' name="add_timezone" value="<?php echo T_("Add Timezone"); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
print "</div>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -70,18 +70,18 @@ if ($p)
|
||||
kill_process($p);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Monitor VoIP Process"),true,array("../css/table.css"),false,false,false,true);
|
||||
xhtml_head(T_("Monitor VoIP Process"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),false,false,false,true);
|
||||
|
||||
print "<h1>" . T_("Running process:") . " $p</h1>";
|
||||
print "<h2>" . T_("Running process:") . " $p</h2>";
|
||||
|
||||
if (is_process_killed($p))
|
||||
{
|
||||
print "<h3>" . T_("Kill signal sent: Please wait... (Note: Process will be stalled until there is activity on the VoIP Server)") . "</h3>";
|
||||
print "<p><a href='?kill=force'>" . T_("Process is already closed (eg. server was rebooted) - click here to confirm") . "</a></p>";
|
||||
print "<h3>" . T_("Kill signal sent: Please wait... </br>(Note: Process will be stalled until there is activity on the VoIP Server)") . "</h3>";
|
||||
print "<p>" . T_("Process is already closed (eg. server was rebooted)") . "<a href='?kill=force'>" . T_("click here to confirm") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<p><a href='?kill=kill'>" . T_("Kill the running process") . "</a> ". T_("(requires activity on the VoIP Server to take effect)") . "</p>";
|
||||
print "<p><a class='btn btn-default' href='?kill=kill'>" . T_("Kill the running process") . "</a> ". T_("(requires activity on the VoIP Server to take effect)") . "</p>";
|
||||
}
|
||||
|
||||
$d = process_get_data($p);
|
||||
@@ -92,10 +92,10 @@ if ($p)
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Monitor VoIP Process"),true,array("../css/table.css"));
|
||||
print "<h2>" . T_("Monitor VoIP Process") . "</h2>";
|
||||
print "<p><a href='?watch=watch'>" . T_("Click here to begin monitoring the VoIP Process") . "</a></p>";
|
||||
print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
|
||||
xhtml_head(T_("Monitor VoIP Process"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
//print "<h2>" . T_("Monitor VoIP Process") . "</h2>";
|
||||
print "<p><a class='btn btn-warning' href='?watch=watch'>" . T_("Click here to begin monitoring the VoIP Process") . "</a></p>";
|
||||
print "<h3>" . T_("Outcome of last process run (if any)") . "</h3>";
|
||||
$d = process_get_last_data();
|
||||
if ($d !== false)
|
||||
{
|
||||
|
||||
@@ -115,16 +115,15 @@ if(isset($_POST['start']) && isset($_POST['end']) && isset($_POST['day']) && iss
|
||||
$js = array("js/window.js");
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "include/jquery-ui/js/jquery-1.4.2.min.js";
|
||||
$js[] = "include/jquery/jquery-1.4.2.min.js";
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
xhtml_head(T_("Appointment"),true,array("css/respondent.css"),$js);
|
||||
xhtml_head(T_("Create appointment"),false,array("include/bootstrap/css/bootstrap.min.css", "css/respondent.css"),$js);//"include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
|
||||
//select a respondent from a list or create a new one
|
||||
print("<p>" . T_("Select a respondent") . "</p>");
|
||||
|
||||
print "<h4>" . T_("Respondent") . ":";
|
||||
$sr = display_respondent_list($case_id,isset($_GET['respondent_id'])?bigintval($_GET['respondent_id']):false,true);
|
||||
|
||||
print "</h4>";
|
||||
if ($sr != false) $_GET['respondent_id'] = $sr;
|
||||
|
||||
if(isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
||||
@@ -141,6 +140,11 @@ if(isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
||||
else if(isset($_GET['respondent_id']))
|
||||
{
|
||||
$respondent_id = bigintval($_GET['respondent_id']);
|
||||
|
||||
$sql = "SELECT TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) as tme, r.Time_zone_name as tzn FROM `respondent` as r WHERE r.respondent_id = $respondent_id";
|
||||
$ct = $db->GetRow($sql);
|
||||
|
||||
print "<p>".T_("Timezone").": ".$ct['tzn']. " ".T_("Current Time").": <b class=\"fa text-primary\">" . $ct['tme'] . "</b></p>";
|
||||
|
||||
if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['y']))
|
||||
{
|
||||
@@ -156,12 +160,12 @@ else if(isset($_GET['respondent_id']))
|
||||
{
|
||||
$list = return_contact_phone_list($case_id);
|
||||
|
||||
print "<p>" . T_("Select phone number:") . "</p>";
|
||||
print "<div class=\"clearfix form-group\"><label class=\"pull-left\" style=\"padding-top: 5px;\">" . T_("Select phone number:") . " </label>";
|
||||
|
||||
if (isset($_GET['contact_phone_id'])) $contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
else $contact_phone_id = -1;
|
||||
|
||||
print "<div><select id='phonenum' name='phonenum' onchange=\"LinkUp('phonenum')\"><option>" . T_("None") . "</option>";
|
||||
print "<div class=\"pull-left\"><select class=\"form-control\" id='phonenum' name='phonenum' onchange=\"LinkUp('phonenum')\"><option></option>";
|
||||
foreach($list as $l)
|
||||
{
|
||||
$id = $l['contact_phone_id'];
|
||||
@@ -170,27 +174,29 @@ else if(isset($_GET['respondent_id']))
|
||||
print "<option value='?contact_phone_id=$id&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' $selected>{$l['phone']} - {$l['description']}</option>";
|
||||
|
||||
}
|
||||
print "<option value='?contact_phone_id=0&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' class='addresp'>" . T_("Add new phone number") . "</option></select></div>";
|
||||
print "<option value='?contact_phone_id=0&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' class='addresp'>" . T_("Add new phone number") . "</option></select></div></div>";
|
||||
|
||||
|
||||
if(isset($_GET['contact_phone_id']))
|
||||
{
|
||||
$contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
|
||||
print "<div class=\"clearfix form-group\">";
|
||||
|
||||
if ($contact_phone_id == 0)
|
||||
{
|
||||
//ability to add a new one
|
||||
?>
|
||||
<p><?php echo T_("Add new phone number (with area code, eg 0398761234):"); ?></p>
|
||||
<form id="addPhone" method="get" action="">
|
||||
<p><input type="text" name="phonenum"/></p>
|
||||
<p><input type="submit" value="<?php echo T_("Add this phone number"); ?>"/>
|
||||
<form id="addPhone" method="get" action="" class="form-inline form-group">
|
||||
<div class="pull-left"><input type="tel" maxlength="10" size="12" pattern="[0-9]{10}" class="form-control" name="phonenum"/></div>
|
||||
 <input type="submit" class="btn btn-info" value="<?php echo T_("Add this phone number"); ?>"/>
|
||||
<input type="hidden" name="start" value="<?php print $_GET['start']; ?>"/>
|
||||
<input type="hidden" name="end" value="<?php print $_GET['end']; ?>"/>
|
||||
<input type="hidden" name="d" value="<?php print $day; ?>"/>
|
||||
<input type="hidden" name="m" value="<?php print $month; ?>"/>
|
||||
<input type="hidden" name="y" value="<?php print $year; ?>"/>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/></p>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
@@ -203,11 +209,9 @@ else if(isset($_GET['respondent_id']))
|
||||
}
|
||||
|
||||
?>
|
||||
<p><?php echo T_("Appointment:"); ?></p>
|
||||
<form id="appointment" method="post" action="">
|
||||
<?php print "<p>" . T_("Accept appointment from ") .convert_time($_GET['start']).T_(" till ").convert_time($_GET['end']).T_(" on ") . "$day/$month/$year? " . T_("on") . " $phonenum </p>"; ?>
|
||||
<p>
|
||||
<?php print "<p><label for='require_operator_id'>" . T_("Appointment with myself only?"); ?></label>
|
||||
<?php print "<div class=\"alert alert-info\">".T_("Accept appointment from ")."<b>".$_GET['start']."</b>".T_(" till ")."<b>".$_GET['end']."</b>".T_(" on ") . "<b> $day/$month/$year </b>" . T_("on") . "<b> $phonenum </b> ?</div>"; ?>
|
||||
<label for='require_operator_id'><?php echo T_("Appointment with myself only?"); ?> </label>
|
||||
<input type="checkbox" id="require_operator_id" name="require_operator_id" value="<?php echo $operator_id;?>">
|
||||
<input type="hidden" name="start" value="<?php print $_GET['start']; ?>"/>
|
||||
<input type="hidden" name="end" value="<?php print $_GET['end']; ?>"/>
|
||||
@@ -216,10 +220,12 @@ else if(isset($_GET['respondent_id']))
|
||||
<input type="hidden" name="year" value="<?php print $year; ?>"/>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/>
|
||||
<input type="hidden" name="contact_phone_id" value="<?php print $contact_phone_id; ?>"/>
|
||||
<input type="submit" value="<?php echo TQ_("Schedule Appointment"); ?>"/></p>
|
||||
<input type="submit" class="btn btn-primary pull-right" value="<?php echo T_("Schedule Appointment"); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ include("functions/functions.operator.php");
|
||||
|
||||
$js = false;
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery-ui/js/jquery-1.4.2.min.js","js/childnap.js");
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
xhtml_head(T_("Appointment List"),true,array("css/table.css"),$js,false,60);
|
||||
xhtml_head(T_("Appointment List"),false,array("css/table.css"),$js,false,60);
|
||||
|
||||
//List the case appointment
|
||||
// display in respondent time so that the operator will be able to
|
||||
|
||||
@@ -51,9 +51,9 @@ include("functions/functions.operator.php");
|
||||
|
||||
$js = false;
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery-ui/js/jquery-1.4.2.min.js","js/childnap.js");
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
xhtml_head(T_("Availability"),true,array("css/table.css"),$js);
|
||||
xhtml_head(T_("Availability"),false,array("css/table.css"),$js);
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
|
||||
2
call.php
2
call.php
@@ -255,7 +255,7 @@ if (isset($_GET['newstate']))
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery-ui/js/jquery-1.4.2.min.js"));
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"));
|
||||
|
||||
$state = is_on_call($operator_id);
|
||||
switch($state)
|
||||
|
||||
@@ -81,13 +81,13 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
//see if the case is completed
|
||||
if ($completed)
|
||||
{
|
||||
$sql = "SELECT outcome_id,description
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE outcome_id = 10";
|
||||
}
|
||||
else if (limesurvey_is_quota_full($case_id))
|
||||
{
|
||||
$sql = "SELECT outcome_id,description
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE outcome_id = 32";
|
||||
}
|
||||
@@ -105,27 +105,35 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
if (!empty($rs))
|
||||
{
|
||||
//we have an appointment made ... only select appointment ID's
|
||||
$sql = "SELECT outcome_id,description
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE outcome_type_id = '5'";
|
||||
WHERE outcome_id = '19'"; //outcome_type_id = '5'
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($contacted === false)
|
||||
{
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])){
|
||||
|
||||
$contacted = bigintval($_GET['contacted']);
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE outcome_id != 10
|
||||
ORDER BY contacted ASC, outcome_id ASC"; //don't show completed if not
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id NOT IN(5,10,19,21,40,41,34,35)";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$contacted = bigintval($contacted);
|
||||
|
||||
$sql = "SELECT outcome_id,description
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id != 10"; //don't show completed if not
|
||||
AND outcome_id NOT IN(5,10,19,21,40,41,34,35)";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,12 +144,15 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
{
|
||||
$do = false;
|
||||
if (isset($_GET['defaultoutcome'])) $do = bigintval($_GET['defaultoutcome']);
|
||||
|
||||
foreach($rs as $r)
|
||||
{
|
||||
if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = "";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = "style='color:blue;'"; else $highlight = "";
|
||||
print "<div><label $highlight class='label'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/>" . T_($r['description']) . "</label></div>";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = "text-primary"; else $highlight = "text-default";
|
||||
print "<li><label class='$highlight'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/> " . T_($r['description']) . "</label></li>";
|
||||
}
|
||||
|
||||
$_POST['confirm'] = true;
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
@@ -289,10 +300,10 @@ if (isset($_GET['newstate']))
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$js = "js/window_interface2.js";
|
||||
if (browser_ie()) $js = "js/window_ie6_interface2.js";
|
||||
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery-ui/js/jquery-1.4.2.min.js"));
|
||||
if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js";
|
||||
|
||||
xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"/* ,"css/call.css" */),array($js,"include/jquery/jquery-1.4.2.min.js"));
|
||||
|
||||
$state = is_on_call($operator_id);
|
||||
switch($state)
|
||||
@@ -464,10 +475,13 @@ switch($state)
|
||||
case 2: //ringing
|
||||
case 3: //answered
|
||||
case 4: //requires coding
|
||||
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||
print "<form action='?' method='post'>";
|
||||
// print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||
print "<form action='?' method='post'><div class=\"form-group\">";
|
||||
display_outcomes(false,$call_attempt_id,$case_id);
|
||||
print "<div><input type='submit' value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></div></form>";
|
||||
print_r($rs);
|
||||
if ($_POST['confirm']){
|
||||
print "</div><input type='submit' class=\"btn btn-primary\" value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></form>";
|
||||
}
|
||||
break;
|
||||
case 5: //done -- shouldn't come here as should be coded + done
|
||||
default:
|
||||
|
||||
@@ -51,9 +51,9 @@ include("functions/functions.operator.php");
|
||||
|
||||
$js = false;
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery-ui/js/jquery-1.4.2.min.js","js/childnap.js");
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
xhtml_head(T_("Case History List"),true,array("css/table.css"),$js,false,60);
|
||||
xhtml_head(T_("Case History List"),false,array("css/table.css"),$js,false,60);
|
||||
|
||||
//List the case call history
|
||||
// display in respondent time so that the operator will be able to
|
||||
|
||||
@@ -51,9 +51,9 @@ include("functions/functions.operator.php");
|
||||
|
||||
$js = false;
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery-ui/js/jquery-1.4.2.min.js","js/childnap.js");
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
xhtml_head(T_("Call List"),true,array("css/table.css"),$js,false,60);
|
||||
xhtml_head(T_("Call List"),false,array("css/table.css"),$js,false,60);
|
||||
|
||||
//List the case call history
|
||||
// display in respondent time so that the operator will be able to
|
||||
|
||||
@@ -51,9 +51,9 @@ include("functions/functions.operator.php");
|
||||
|
||||
$js = false;
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery-ui/js/jquery-1.4.2.min.js","js/childnap.js");
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
xhtml_head(T_("Case Notes"),true,array("css/table.css","css/casenote.css"),$js, (isset($_GET['add'])) ? "onload=\"document.getElementById('note').focus();\"" : false);
|
||||
xhtml_head(T_("Case Notes"),false,array("css/table.css","css/casenote.css"),$js, (isset($_GET['add'])) ? "onload=\"document.getElementById('note').focus();\"" : false);
|
||||
|
||||
//List the case note history
|
||||
// display in the operators time
|
||||
|
||||
@@ -71,7 +71,7 @@ if (!defined('ALLOW_OPERATOR_EXTENSION_SELECT')) define('ALLOW_OPERATOR_EXTENSIO
|
||||
/**
|
||||
* The Asterisk server address
|
||||
*/
|
||||
if (!defined('VOIP_SERVER')) define('VOIP_SERVER','asterisk.dcarf');
|
||||
if (!defined('VOIP_SERVER')) define('VOIP_SERVER','localhost');
|
||||
|
||||
/**
|
||||
* The Asterisk server username for the monitor interface
|
||||
@@ -284,7 +284,7 @@ if (!defined('TEMPORARY_DIRECTORY')) define('TEMPORARY_DIRECTORY', "/tmp");
|
||||
*/
|
||||
if (!defined('DB_USER')) define('DB_USER', 'quexs');
|
||||
if (!defined('DB_PASS')) define('DB_PASS', 'quexs');
|
||||
if (!defined('DB_HOST')) define('DB_HOST', 'databasedev.dcarf');
|
||||
if (!defined('DB_HOST')) define('DB_HOST', 'localhost');
|
||||
if (!defined('DB_NAME')) define('DB_NAME', 'quexs');
|
||||
if (!defined('DB_TYPE')) define('DB_TYPE', 'mysqlt');
|
||||
|
||||
@@ -302,6 +302,11 @@ if (!defined('LDB_HOST')) define('LDB_HOST', DB_HOST);
|
||||
if (!defined('LDB_NAME')) define('LDB_NAME', DB_NAME);
|
||||
if (!defined('LDB_TYPE')) define('LDB_TYPE', DB_TYPE);
|
||||
|
||||
|
||||
if (!defined('COMPANY_NAME')) define ('COMPANY_NAME', 'queXS ');
|
||||
if (!defined('ADMIN_PANEL_NAME')) define ('ADMIN_PANEL_NAME',' Administration Panel');
|
||||
|
||||
|
||||
/**
|
||||
* Debugging
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Only some of the configuration directives are here. See the file: config.default.php for them all
|
||||
@@ -46,7 +45,7 @@ define('VOIP_ENABLED',false);
|
||||
/**
|
||||
* The Asterisk server address
|
||||
*/
|
||||
define('VOIP_SERVER','asterisk.dcarf');
|
||||
define('VOIP_SERVER', 'localhost');
|
||||
|
||||
/**
|
||||
* Whether to automatically pop up a coding window when the respondent hangs up
|
||||
@@ -63,7 +62,7 @@ define('QUEXS_PATH', '/quexs/');
|
||||
*/
|
||||
define('DB_USER', 'quexs');
|
||||
define('DB_PASS', 'quexs');
|
||||
define('DB_HOST', 'databasedev.dcarf');
|
||||
define('DB_HOST', 'localhost');
|
||||
define('DB_NAME', 'quexs');
|
||||
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ $js = array("js/window.js");
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "include/jquery-ui/js/jquery-1.4.2.min.js";
|
||||
$js[] = "include/jquery/jquery-1.4.2.min.js";
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
|
||||
xhtml_head(T_("Contact details"),true,array("css/table.css","css/respondent_interface2.css"),$js);
|
||||
xhtml_head(T_("Contact details"),false,array("css/table.css","css/respondent_interface2.css"),$js);
|
||||
|
||||
|
||||
global $db;
|
||||
@@ -148,12 +148,12 @@ else
|
||||
|
||||
//display sample details
|
||||
// use sample_import_var_restrict to limit
|
||||
$sql = "SELECT s.var,s.val
|
||||
FROM sample_var as s
|
||||
JOIN `case` as c on (c.case_id = '$case_id' and c.sample_id = s.sample_id)
|
||||
JOIN `sample` as sa ON (sa.sample_id = c.sample_id)
|
||||
LEFT JOIN sample_import_var_restrict as sv ON (sv.var LIKE s.var AND sa.import_id = sv.sample_import_id)
|
||||
WHERE (sv.restrict IS NULL OR sv.restrict = 0)";
|
||||
$sql = "SELECT sivr.var,sv.val
|
||||
FROM `sample_var` as sv, `sample_import_var_restrict` as sivr, `case` as c
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND sv.sample_id = c.sample_id
|
||||
AND sivr.var_id = sv.var_id
|
||||
AND (sivr.restrict IS NULL OR sivr.restrict = 0)";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
77
css/custom.css
Normal file
77
css/custom.css
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
body {
|
||||
/*
|
||||
font-size: 1.5em;
|
||||
line-height: 1.3em;*/
|
||||
/* color: #515a63; or #666 */
|
||||
/*padding-top: 0px;*/
|
||||
background:#EEEFF2;
|
||||
padding:0.8em;
|
||||
}
|
||||
|
||||
/*.panel {
|
||||
background-color: transparent; }
|
||||
.panel-default {
|
||||
border-color: transparent; }
|
||||
.panel-heading {
|
||||
padding-bottom: 15px; }
|
||||
*/
|
||||
|
||||
a:focus, a:active, a:hover {
|
||||
outline: 0 none !important;
|
||||
}
|
||||
.lime {
|
||||
color:#C0CA55!important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
/* Back to top */
|
||||
.totop {
|
||||
background: none;
|
||||
bottom: 50px;
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
z-index: 104400;
|
||||
}
|
||||
.totop a, .totop a:visited {
|
||||
color: gray;
|
||||
display: block;
|
||||
#height: 50px;
|
||||
#line-height: 50px;
|
||||
text-align: center;
|
||||
min-width: 30px;
|
||||
}
|
||||
.totop a:hover {
|
||||
color: #337ab7;
|
||||
text-decoration: blink;
|
||||
}
|
||||
|
||||
.table-hover>tbody>tr:hover{
|
||||
background-color:#ddd !important;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: #ccc;
|
||||
}
|
||||
.btn-lime{
|
||||
background-color:#C0CA55;
|
||||
border-color: gray;
|
||||
}
|
||||
.btn-lime:hover,.btn-lime:focus{
|
||||
background-color:#CED95B;
|
||||
border-color: blue;
|
||||
}
|
||||
.fa{
|
||||
text-shadow: 1px 2px 1px #ababab;
|
||||
}
|
||||
.h1, h1 {
|
||||
font-weight: 500;
|
||||
text-shadow: 2px 2px 3px #ababab;
|
||||
}
|
||||
.h2, .h3, h2, h3 {
|
||||
text-shadow: 1px 2px 1px #ababab;
|
||||
}
|
||||
.h1, .h2, .h3, h1, h2, h3 {
|
||||
margin-bottom: 0.4em;
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
@@ -127,8 +127,8 @@ body {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
@@ -139,8 +139,8 @@ body {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#49b848;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ body {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#9f9f9f;
|
||||
@@ -162,7 +162,7 @@ body {
|
||||
}
|
||||
.item_2_half_height a{
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
text-decoration:none;
|
||||
color:#b8b8ba;
|
||||
@@ -172,7 +172,7 @@ body {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#05b0f7;
|
||||
@@ -183,7 +183,7 @@ list-style: none;
|
||||
}
|
||||
.item_2_half_height {
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
display:none;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ list-style: none;
|
||||
}
|
||||
.item_3_half_height {
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
display:none;
|
||||
}
|
||||
@@ -201,7 +201,7 @@ list-style: none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#9f9f9f;
|
||||
@@ -214,7 +214,7 @@ list-style: none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#ff3506;
|
||||
@@ -343,9 +343,9 @@ a:active {
|
||||
|
||||
.header {
|
||||
position : absolute;
|
||||
width : 20%;
|
||||
height : 38%;
|
||||
top : 40%;
|
||||
width : 50%;
|
||||
height : 30%;
|
||||
top : 30%;
|
||||
right : 0;
|
||||
bottom : auto;
|
||||
left : 0;
|
||||
@@ -354,31 +354,33 @@ a:active {
|
||||
#calllist {
|
||||
position : absolute;
|
||||
width : 50%;
|
||||
height : 38%;
|
||||
height : 28%;
|
||||
top : 2%;
|
||||
left : 50%;
|
||||
right : 0;
|
||||
left : 48%;
|
||||
right : 1%;
|
||||
/*max-height:180px;*/
|
||||
bottom : auto;
|
||||
}
|
||||
#qstatus {
|
||||
position : absolute;
|
||||
width : 30%;
|
||||
height : 38%;
|
||||
height : 30%;
|
||||
top : 2%;
|
||||
right : 0;
|
||||
left: 20%;
|
||||
right : 2%;
|
||||
left: 17%;
|
||||
bottom : auto;
|
||||
/*max-height:38%;*/
|
||||
}
|
||||
#casefunctions {
|
||||
position : absolute;
|
||||
width : 17%;
|
||||
height : 38%;
|
||||
top : 2%;
|
||||
width : 12%;
|
||||
height : 30%;
|
||||
top : 0;
|
||||
right : 0;
|
||||
left: 3%;
|
||||
font-size:15px;
|
||||
left: 0;
|
||||
font-size:18px;
|
||||
padding:1%;
|
||||
|
||||
bottom : auto;
|
||||
}
|
||||
#casefunctions li {
|
||||
@@ -386,11 +388,12 @@ a:active {
|
||||
}
|
||||
#content {
|
||||
position : absolute;
|
||||
top : 40%;
|
||||
left : 0;
|
||||
top : 31%;
|
||||
left : 0.5%;
|
||||
right :0.5%;
|
||||
bottom : auto;
|
||||
width : 100%;
|
||||
height : 60%;
|
||||
width : 99%;
|
||||
height : 69%;
|
||||
}
|
||||
.embeddedobject {
|
||||
width:100%;
|
||||
@@ -398,11 +401,11 @@ a:active {
|
||||
position:absolute;
|
||||
}
|
||||
#main-qstatus {
|
||||
width:185px;
|
||||
width:95%;
|
||||
/*max-height:116px;*/
|
||||
position:absolute;
|
||||
left:3%;
|
||||
top:2%;
|
||||
top:1%;
|
||||
height:90%;
|
||||
border: 2px solid #e9e9eb;
|
||||
border-radius: 15px;
|
||||
@@ -431,7 +434,7 @@ margin: 0 auto;
|
||||
position:absolute;
|
||||
top:40%;
|
||||
height:60%;
|
||||
width:160px;
|
||||
width:260px;
|
||||
left:40%;
|
||||
list-style:none;
|
||||
}
|
||||
@@ -443,20 +446,21 @@ list-style:none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wait_li_1 a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#49b848;
|
||||
}
|
||||
@@ -465,8 +469,8 @@ list-style:none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
@@ -477,8 +481,8 @@ list-style:none;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 145px;
|
||||
height: 36px;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#ff3506;
|
||||
}
|
||||
|
||||
11
css/rs.css
11
css/rs.css
@@ -1,6 +1,15 @@
|
||||
body {background-color: #eeeeee;}
|
||||
body {background-color: #eeeff2;}
|
||||
p.rstext {
|
||||
font-weight: bold;
|
||||
font-size: 16pt;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.rs{
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e9e9eb;
|
||||
font-size: 110%;
|
||||
z-index: 500;
|
||||
background: none repeat scroll 0 0 #fff;
|
||||
font-family: Arial, sans-serif;
|
||||
box-shadow: 3px 8px 18px;
|
||||
}
|
||||
354
css/style.css
Normal file
354
css/style.css
Normal file
@@ -0,0 +1,354 @@
|
||||
/*@import url(http://fonts.googleapis.com/css?family=Roboto:400,600,700&subset=latin,latin-ext);*/
|
||||
|
||||
body, content {
|
||||
/**/font-size: 15px;
|
||||
line-height: 22px;
|
||||
color: #666;
|
||||
/*border-top: 0px solid #eee;*/
|
||||
background:#474F57;
|
||||
padding-top: 52px;
|
||||
/*font-family: Roboto, Open Sans, sans-serif;*/
|
||||
-webkit-font-smoothing: antialiased;
|
||||
height:99.8%;
|
||||
}
|
||||
|
||||
main
|
||||
.content {
|
||||
/* margin-top:51px;*/
|
||||
}
|
||||
.mainbar{
|
||||
position: relative;
|
||||
margin-left: 18%;
|
||||
margin-right: 0px;
|
||||
/*padding: 5px;*/
|
||||
width: auto;
|
||||
overflow:hidden;
|
||||
background:#eee;
|
||||
z-index: 50;
|
||||
border:5px solid #ababab;
|
||||
/*min-height: 600px;*/
|
||||
}
|
||||
.embeddedobject{
|
||||
width: 100%;
|
||||
height: 99%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.mainbar .container{
|
||||
max-width:100% !important;
|
||||
width: 100% !important;
|
||||
padding-left: 10px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.menubutton,.menubutton:focus,.menubutton:active{
|
||||
font-size:18px;
|
||||
border-right:1px solid #333;
|
||||
;padding-right:11px;
|
||||
;padding-left:3px;
|
||||
padding:3px;
|
||||
margin-top: 3px;
|
||||
color:#ddd;
|
||||
line-height:40px;
|
||||
text-decoration:none;
|
||||
outline:none;
|
||||
}
|
||||
.menubutton:hover{
|
||||
color: red;
|
||||
}
|
||||
|
||||
a:focus{
|
||||
outline: 0 none !important;
|
||||
}
|
||||
.lime {
|
||||
color:#C0CA55!important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar *{
|
||||
font-weight: normal !important;
|
||||
text-shadow:none !important;
|
||||
}
|
||||
.navbar{
|
||||
background-color: #404952;
|
||||
min-height:20px;
|
||||
border-bottom: 0px solid #436B91;
|
||||
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.navbar .caret{
|
||||
border-top-color: #888;
|
||||
border-bottom-color: #888;
|
||||
}
|
||||
.navbar li:hover .caret{
|
||||
border-top-color: #eee;
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
.navbar-brand{
|
||||
color:#f1f1f1 !important;
|
||||
font-size:22px;
|
||||
margin:0px !important;
|
||||
font-weight:normal;
|
||||
padding:15px 20px 10px 15px;
|
||||
text-shadow:1px 1px 1px rgba(150, 150, 150, 0.2) !important;
|
||||
}
|
||||
a.navbar-brand span.bold{
|
||||
font-weight: bold !important;
|
||||
text-shadow:1px 1px 1px rgba(150, 150, 150, 0.2) !important;
|
||||
}
|
||||
.navbar-nav > li.user-data > a{
|
||||
color:#f3f3f3;
|
||||
}
|
||||
.navbar-nav > li > a {
|
||||
padding-bottom: 10px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
.navbar-nav.pull-right .dropdown > a > i{
|
||||
font-size:20px;
|
||||
line-height:25px;
|
||||
}
|
||||
.navbar-toggle{
|
||||
background:#f2f2f2;
|
||||
border:1px solid #ccc;
|
||||
border-radius:4px;
|
||||
padding: 5px 5px;
|
||||
font-size:13px;
|
||||
}
|
||||
.navbar-toggle:hover{
|
||||
background:#ddd;
|
||||
}
|
||||
.navbar li a{
|
||||
/*font-size: 13px !important;*/
|
||||
color:#777;
|
||||
}
|
||||
.navbar .nav > li > a{
|
||||
color: #aaa
|
||||
}
|
||||
.navbar li a:hover,.navbar li a:active,.navbar li a:focus,.nav .open > a, .nav .open > a:hover, .nav .open > a:focus{
|
||||
background:#59646E;
|
||||
color:#C5CED6;
|
||||
}
|
||||
.navbar i{
|
||||
margin-right: 4px;
|
||||
}
|
||||
.navbar-nav > li > .dropdown-menu{
|
||||
}
|
||||
.navbar .btn{
|
||||
color: #666 !important;
|
||||
}
|
||||
.navbar .label{
|
||||
padding:5px 7px !important;
|
||||
font-size:11px;
|
||||
border-radius:10px;
|
||||
}
|
||||
.nav > li > a .label{
|
||||
padding:3px 5px !important;
|
||||
font-size:10px;
|
||||
border-radius:10px;
|
||||
position:absolute;
|
||||
left:3px;
|
||||
top:5px;
|
||||
}
|
||||
.navbar .label i{
|
||||
margin-right: 0px;
|
||||
}
|
||||
.navbar .progress{
|
||||
margin-bottom: 0px;
|
||||
padding: 0px !important;
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar{
|
||||
width: 18%;
|
||||
float: left;
|
||||
display: block;
|
||||
color: #777;
|
||||
;position: relative;
|
||||
}
|
||||
.sidebar .sidebar-dropdown{
|
||||
;display: none;
|
||||
}
|
||||
.sidebar .sidebar-dropdown a{
|
||||
color: #fff !important;
|
||||
box-shadow: inset 0px 0px 1px #000;
|
||||
background-color: #3D3D3D;
|
||||
padding:6px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
display: block;
|
||||
border-top: 2px solid #666;
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
.sidebar ul{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.sidebar ul li{
|
||||
list-style-type: none;
|
||||
}
|
||||
.sidebar #nav {
|
||||
display: block;
|
||||
width:100%;
|
||||
margin:0 auto;
|
||||
position: relative;
|
||||
z-index: 51;
|
||||
}
|
||||
.sidebar #nav li i{
|
||||
display:inline-block;
|
||||
margin-right: 10px;
|
||||
margin-left: 5px;
|
||||
/*;font-size:17px;*/
|
||||
color:#d4d4d4;
|
||||
width:20px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
}
|
||||
.sidebar #nav li span i{
|
||||
margin: 0px;
|
||||
color: #999;
|
||||
font-size:12px !important;
|
||||
text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.5);
|
||||
background: transparent !important;
|
||||
border: 0px;
|
||||
}
|
||||
.sidebar #nav > li > a {
|
||||
display: block;
|
||||
padding: 10px 10px;
|
||||
font-size: 16px;
|
||||
color: #C5CED6;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.6);
|
||||
text-decoration: none;
|
||||
border-top: 1px solid #515A63;
|
||||
border-bottom: 1px solid #424A52;
|
||||
background-color: #474F57;
|
||||
}
|
||||
.sidebar #nav > li:hover > a, .sidebar #nav > li > a.open, .sidebar #nav > li > a.subdrop {
|
||||
color: #e9e9e9;
|
||||
border-top: 1px solid #4F5861;
|
||||
border-bottom: 1px solid #3C434A;
|
||||
background-color: #3C434A;
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
}
|
||||
.sidebar #nav > li > a:hover i, .sidebar #nav > li > a.open i, .sidebar #nav > li > a.subdrop i{
|
||||
color: #fff;
|
||||
}
|
||||
.sidebar #nav > li > a:hover span i, .sidebar #nav > li > a.open span i, .sidebar #nav > li > a.subdrop span i{
|
||||
color: #fff;
|
||||
background: transparent !important;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.sidebar #nav li ul { display: none; background: #efefef; }
|
||||
|
||||
.sidebar #nav li ul li a {
|
||||
display: block;
|
||||
background: #2E3338;
|
||||
padding: 5px 10px;
|
||||
padding-left: 20px;
|
||||
text-decoration: none;
|
||||
color: #bbb;
|
||||
border-bottom: 1px solid #2E3338;
|
||||
box-shadow: inset 0px 1px 0px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.sidebar #nav li ul li a:hover,.sidebar #nav li ul li a.active {
|
||||
background: #59646E;
|
||||
color:#ccc;
|
||||
border-bottom: 1px solid #59646E;
|
||||
}
|
||||
.sidebar #nav .has_sub ul i{
|
||||
/*;font-size: 14px;*/
|
||||
width:16px;
|
||||
margin-left:0px;
|
||||
/*margin-right:6px;*/
|
||||
}
|
||||
.sidebar #nav .has_sub .has_sub a.subdrop, .sidebar #nav .has_sub .has_sub a.subdrop i{
|
||||
background: #59646E;
|
||||
color:#fff;
|
||||
}
|
||||
.sidebar #nav .has_sub .has_sub ul a{
|
||||
padding-left: 40px;
|
||||
}
|
||||
.sidebar #nav .has_sub .has_sub .has_sub ul a{
|
||||
padding-left: 60px;
|
||||
}
|
||||
.sidebar-widget{
|
||||
padding:10px 4px;
|
||||
}
|
||||
|
||||
|
||||
.content.enlarged .sidebar{
|
||||
width:50px;
|
||||
}
|
||||
.content.enlarged .mainbar{
|
||||
margin-left:50px;
|
||||
}
|
||||
.content.enlarged .sidebar .navbar-form:hover{
|
||||
width:300px;
|
||||
position:relative;
|
||||
z-index:100;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li{
|
||||
white-space: wrap; /* changed from nowrap */
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li > ul{
|
||||
display:none;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li:hover > ul{
|
||||
position:absolute;
|
||||
left:50px;
|
||||
width:280px;
|
||||
display:block;
|
||||
}
|
||||
.content.enlarged .sidebar #nav ul li:hover > a{
|
||||
background: #59646E !important;
|
||||
color:#fff;
|
||||
}
|
||||
.content.enlarged .sidebar #nav ul li:hover > a i{
|
||||
background: #59646E !important;
|
||||
color:#fff;
|
||||
}
|
||||
.content.enlarged .sidebar #nav ul li:hover > ul{
|
||||
position:absolute;
|
||||
left:280px;
|
||||
margin-top:-32px;
|
||||
width:280px;
|
||||
display:block;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li:hover > ul a{
|
||||
background:#2E3338;
|
||||
padding-left:10px;
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.content.enlarged .sidebar #nav ul li> a span.pull-right{
|
||||
position: absolute;
|
||||
right:5px;
|
||||
top:5px;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li > a span{
|
||||
display:none;
|
||||
padding-left:20px;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li:hover > a span.pull-right{
|
||||
position: absolute;
|
||||
right:10px;
|
||||
top:7px;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li:hover > a{
|
||||
width:330px;
|
||||
position:relative;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li{
|
||||
position:relative;
|
||||
}
|
||||
.content.enlarged .sidebar #nav > li:hover > a span{
|
||||
display:inline;
|
||||
}
|
||||
.content.enlarged .sidebar .navbar-form{
|
||||
padding: 10px 7px;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ ul.tabbernav li a
|
||||
border-bottom: none;
|
||||
background: #e9e9eb;
|
||||
text-decoration: none;
|
||||
font-size: 9px;
|
||||
font-size: 12px;
|
||||
border-top-left-radius: 5px;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
/* css for timepicker */
|
||||
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
|
||||
.ui-timepicker-div dl{ text-align: left; }
|
||||
.ui-timepicker-div dl dt{ height: 25px; }
|
||||
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
|
||||
.ui-timepicker-div td { font-size: 90%; }
|
||||
|
||||
1294
database/quexs.sql
1294
database/quexs.sql
File diff suppressed because it is too large
Load Diff
15
email.php
15
email.php
@@ -97,10 +97,11 @@ if (isset($_POST['firstname']))
|
||||
$fieldsarray["{SID}"]=$fieldsarray["{SURVEYID}"]=$lime_sid;
|
||||
//$fieldsarray["{SURVEYNAME}"]=$thissurvey["surveyls_title"];
|
||||
|
||||
$sql = "SELECT s.var,s.val
|
||||
FROM `sample_var` as s, `case` as c
|
||||
$sql = "SELECT sivr.var,sv.val
|
||||
FROM `sample_var` as sv, `sample_import_var_restrict` as sivr, `case` as c
|
||||
WHERE c.case_id = $case_id
|
||||
AND s.sample_id = c.sample_id";
|
||||
AND sv.sample_id = c.sample_id
|
||||
AND sivr.var_id = sv.var_id";
|
||||
|
||||
$attributes = $db->GetAssoc($sql);
|
||||
|
||||
@@ -317,11 +318,11 @@ $sc = $db->GetOne($sql);
|
||||
|
||||
if ($sc == 1)
|
||||
{
|
||||
$sql = "SELECT sv1.val as firstname, sv2.val as lastname, sv3.val as email
|
||||
$sql = "SELECT
|
||||
(SELECT sv.val from sample_var as sv, `sample_import_var_restrict` as sivr WHERE sivr.var_id = sv.var_id AND sv.sample_id = c.sample_id AND sivr.type =6) as firstname,
|
||||
(SELECT sv.val from sample_var as sv, `sample_import_var_restrict` as sivr WHERE sivr.var_id = sv.var_id AND sv.sample_id = c.sample_id AND sivr.type =7) as lastname,
|
||||
(SELECT sv.val from sample_var as sv, `sample_import_var_restrict` as sivr WHERE sivr.var_id = sv.var_id AND sv.sample_id = c.sample_id AND sivr.type =8) as email
|
||||
FROM `case` as c
|
||||
LEFT JOIN sample_var as sv1 on (sv1.sample_id = c.sample_id AND sv1.type = 6)
|
||||
LEFT JOIN sample_var as sv2 on (sv2.sample_id = c.sample_id AND sv2.type = 7)
|
||||
LEFT JOIN sample_var as sv3 on (sv3.sample_id = c.sample_id AND sv3.type = 8)
|
||||
WHERE c.case_id = $case_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
@@ -41,7 +41,7 @@ include_once("lang.inc.php");
|
||||
* XHTML functions
|
||||
*/
|
||||
include_once("functions/functions.xhtml.php");
|
||||
|
||||
include_once("functions/functions.operator.php");
|
||||
xhtml_head(T_("End of work"));
|
||||
|
||||
if (isset($_GET['auto']))
|
||||
@@ -51,7 +51,7 @@ if (isset($_GET['auto']))
|
||||
|
||||
print "<h1>" . T_("Work has ended. That is it") . "</h1>";
|
||||
|
||||
include_once("functions/functions.operator.php");
|
||||
|
||||
if (ALLOW_OPERATOR_EXTENSION_SELECT && VOIP_ENABLED)
|
||||
{
|
||||
//unassign extension
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
/**
|
||||
* Functions relating to appointment times and calendars
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
@@ -31,7 +28,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
@@ -42,7 +38,6 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
*/
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* Add a phone number to a case (via the contact_phone table)
|
||||
*
|
||||
@@ -131,7 +126,7 @@ function convert_time($time)
|
||||
|
||||
//Use the TIME_FORMAT string as defined in mysql http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format
|
||||
$from = array("%H","%h","%I","%i","%S","%s","%p");
|
||||
$to = array(substr($time,0,2),$h,$h,$m,$s,$s,$p);
|
||||
$to = array(substr($time,0,2),$h,$h,$m,$m,$s,$s,$p);
|
||||
return str_replace($from,$to,TIME_FORMAT);
|
||||
}
|
||||
|
||||
@@ -193,32 +188,34 @@ function display_respondent_list($case_id,$respondent_id = false,$first = false)
|
||||
WHERE case_id = '$case_id'";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div><select id='respondent_id' name='respondent_id' onchange=\"LinkUp('respondent_id')\"><option>" . T_("None") . "</option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
foreach($rs as $r)
|
||||
|
||||
if (count($rs) >1 ){
|
||||
print "<div><p>" . T_("Select a respondent") . ":
|
||||
<select id='respondent_id' name='respondent_id' onchange=\"LinkUp('respondent_id')\"><option>" . T_("None") . "</option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
$rid = $r['respondent_id'];
|
||||
if ($respondent_id == false && $first == true)
|
||||
foreach($rs as $r)
|
||||
{
|
||||
$first = false;
|
||||
$selected = "selected='selected'";
|
||||
$respondent_id = $rid;
|
||||
$rid = $r['respondent_id'];
|
||||
if ($respondent_id == false && $first == true)
|
||||
{
|
||||
$first = false;
|
||||
$selected = "selected='selected'";
|
||||
$respondent_id = $rid;
|
||||
}
|
||||
else $selected = "";
|
||||
|
||||
if ($rid == $respondent_id) $selected="selected='selected'";
|
||||
print "<option value='?respondent_id=$rid' $selected>{$r['firstName']} {$r['lastName']}</option>";
|
||||
}
|
||||
else
|
||||
$selected = "";
|
||||
if ($rid == $respondent_id) $selected="selected='selected'";
|
||||
print "<option value='?respondent_id=$rid' $selected>{$r['firstName']} {$r['lastName']}</option>";
|
||||
}
|
||||
print "<option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option></select></p></div>";
|
||||
}
|
||||
print "<option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option></select></div>";
|
||||
else { echo " <b>",$rs[0]['firstName']," ",$rs[0]['lastName'],"</b>"; $respondent_id =$rs[0]['respondent_id'];}
|
||||
|
||||
return $respondent_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Print an XHTML form for adding or modifying respondent details
|
||||
*
|
||||
@@ -256,13 +253,12 @@ function display_respondent_form($respondent_id = false,$case_id = false)
|
||||
$rs = $db->GetRow($sql);
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT Time_zone_name
|
||||
FROM timezone_template";
|
||||
|
||||
$rs = $db->Execute($sql);
|
||||
|
||||
print "<div><label for='firstName'>" . T_("First name:") . " </label><input type=\"text\" id='firstName' name=\"firstName\" value=\"$fn\"/></div>
|
||||
print "<div><label for='firstName'>" . T_("First name:") . "</label><input type=\"text\" id='firstName' name=\"firstName\" value=\"$fn\"/></div>
|
||||
<div><label for='lastName'>" . T_("Last name:") . " </label><input type=\"text\" id='lastName' name=\"lastName\" value=\"$ln\"/></div>";
|
||||
|
||||
/**
|
||||
@@ -272,7 +268,6 @@ function display_respondent_form($respondent_id = false,$case_id = false)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print shift details in XHTML based on the given day
|
||||
* Display start time, and if start time selected display end time also
|
||||
@@ -294,16 +289,14 @@ function display_time($questionnaire_id,$respondent_id, $day, $month, $year, $ti
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$restricted = is_shift_restricted($questionnaire_id);
|
||||
|
||||
|
||||
if ($restricted)
|
||||
{
|
||||
/**
|
||||
* Select shift start and end times for this day
|
||||
*/
|
||||
$sql = " SELECT s.shift_id, HOUR(TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as sh, MINUTE(TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as sm, !(DATE(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) = DATE(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as today, HOUR(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as eh, MINUTE(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as em, (TIME_TO_SEC( TIMEDIFF( TIME( CONVERT_TZ( s.end, 'UTC', r.Time_zone_name ) ) , TIME( CONVERT_TZ( s.start, 'UTC', r.Time_zone_name ) ) ) ) /300) as intervals, TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) as start, TIME(CONVERT_TZ(s.end,'UTC',r.Time_zone_name)) as end
|
||||
$sql = "SELECT s.shift_id, HOUR(TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as sh, MINUTE(TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as sm, !(DATE(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) = DATE(CONVERT_TZ(s.start,'UTC',r.Time_zone_name))) as today, HOUR(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as eh, MINUTE(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as em, (TIME_TO_SEC( TIMEDIFF( s.end, s.start)) / 900) as intervals, TIME(CONVERT_TZ(s.start,'UTC',r.Time_zone_name)) as start, TIME(CONVERT_TZ(s.end,'UTC',r.Time_zone_name)) as end
|
||||
FROM shift as s, respondent as r, `case` as c
|
||||
WHERE r.respondent_id = '$respondent_id'
|
||||
AND r.case_id = c.case_id
|
||||
@@ -312,27 +305,21 @@ function display_time($questionnaire_id,$respondent_id, $day, $month, $year, $ti
|
||||
AND MONTH(CONVERT_TZ(s.start,'UTC', r.Time_zone_name)) = '$month'
|
||||
AND YEAR(CONVERT_TZ(s.start,'UTC', r.Time_zone_name)) = '$year'
|
||||
ORDER BY s.start ASC";
|
||||
|
||||
}
|
||||
else
|
||||
$sql = "SELECT 0 as sh, 0 as sm, !(DATE(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) = DATE(CONVERT_TZ('$year-$month-$day 00:00:00','UTC',r.Time_zone_name))) as today, HOUR(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as eh, MINUTE(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as em, (TIME_TO_SEC( TIMEDIFF( TIME( CONVERT_TZ(DATE_ADD( CURDATE( ) , INTERVAL '23:59:59' HOUR_SECOND ) , 'System', r.Time_zone_name ) ) , TIME( CONVERT_TZ( CURDATE(), 'System', r.Time_zone_name ) ) ) ) /300) as intervals, TIME(CONVERT_TZ(CURDATE(),'System',r.Time_zone_name)) as start, TIME(CONVERT_TZ(DATE_ADD( CURDATE( ) , INTERVAL '23:59:59' HOUR_SECOND ),'System',r.Time_zone_name)) as end
|
||||
$sql = "SELECT 0 as sh, 0 as sm, !(DATE(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) = DATE(CONVERT_TZ('$year-$month-$day 08:00:00','UTC',r.Time_zone_name))) as today, HOUR(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as eh, MINUTE(TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name))) as em, (TIME_TO_SEC( TIMEDIFF( TIME( CONVERT_TZ(DATE_ADD( CURDATE( ) , INTERVAL '23:59:59' HOUR_SECOND ) , 'System', r.Time_zone_name ) ) , TIME( CONVERT_TZ( CURDATE(), 'System', r.Time_zone_name ) ) ) ) /900) as intervals, TIME(CONVERT_TZ(CURDATE(),'System',r.Time_zone_name)) as start, TIME(CONVERT_TZ(DATE_ADD( CURDATE( ) , INTERVAL '23:59:59' HOUR_SECOND ),'System',r.Time_zone_name)) as end
|
||||
FROM respondent as r
|
||||
WHERE r.respondent_id = '$respondent_id'";
|
||||
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div class=\"shifts\">";
|
||||
|
||||
foreach($rs as $r)
|
||||
{
|
||||
print "<p>" . T_("Shift from:") . " ".convert_time($r['start']).T_(" till ")." ".convert_time($r['end'])."</p>";
|
||||
print "<p>" . T_("Shift from:") . " <b>".$r['start']."</b> " . T_(" till ")." <b>".$r['end']."</b></p>";
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
print "<p>";
|
||||
print "<select name=\"start\" id=\"start\" onchange=\"LinkUp('start')\"><option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id\">" . T_("Start Time") . "</option>";
|
||||
print "<div class=\"form-group clearfix\"><label class=\"control-label pull-left\" style=\"padding-top: 5px;\">" . T_("Start Time") . ":  </label><div class=\"form-inline pull-left\"><select class=\"form-control\" name=\"start\" id=\"start\" onchange=\"LinkUp('start')\"><option ></option>";
|
||||
foreach ($rs as $r)
|
||||
{
|
||||
$sh = $r['sh'];
|
||||
@@ -345,12 +332,9 @@ function display_time($questionnaire_id,$respondent_id, $day, $month, $year, $ti
|
||||
|
||||
//today = 0 if the shift is today otherwise 1
|
||||
$today = $r['today'];
|
||||
|
||||
/**
|
||||
* Display only times in the future and within the shift in 5 minute intervals
|
||||
*
|
||||
*/
|
||||
for ($i = 0; $i <= $intervals; $i++)
|
||||
|
||||
// * Display only times in the future and within the shift in 5 minute intervals
|
||||
for ($i = 0; $i <= $intervals-1; $i++)
|
||||
{
|
||||
$t = str_pad($sh,2,"0",STR_PAD_LEFT).":".str_pad($sm,2,"0",STR_PAD_LEFT).":00";
|
||||
|
||||
@@ -359,42 +343,34 @@ function display_time($questionnaire_id,$respondent_id, $day, $month, $year, $ti
|
||||
$selected = "";
|
||||
if ($t == $time) $selected = "selected=\"selected\"";
|
||||
|
||||
print "<option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id&start=$t\" $selected>".convert_time($t)."</option>";
|
||||
print "<option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id&start=$t\" $selected>".$t."</option>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sm += 5;
|
||||
$sm += 15;
|
||||
if ($sm >= 60)
|
||||
{
|
||||
$sh++;
|
||||
if ($sh >= 24) $sh -= 24;
|
||||
$sm -= 60;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
print "</select>";
|
||||
print "</select></div>";
|
||||
|
||||
if ($time)
|
||||
{
|
||||
$eh = substr($time,0,2);
|
||||
$em = substr($time,3,2);
|
||||
|
||||
print "<select name=\"end\" id=\"end\" onchange=\"LinkUp('end')\"><option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id&start=$time\">" . T_("End Time") . "</option>";
|
||||
print "<label class=\"control-label pull-left \" style=\"padding-top: 5px; margin-left: 15px;\">" . T_("End Time") . ":  </label><div class=\"form-inline pull-left\"><select class=\"form-control\" name=\"end\" id=\"end\" onchange=\"LinkUp('end')\"><option></option>";
|
||||
foreach ($rs as $r)
|
||||
{
|
||||
$sh = $r['sh'];
|
||||
$sm = $r['sm'];
|
||||
$intervals = $r['intervals'];
|
||||
|
||||
|
||||
/**
|
||||
* Display only times after the start time and within the shift in 5 minute intervals
|
||||
*
|
||||
*/
|
||||
for ($i = 0; $i <= $intervals; $i++)
|
||||
// * Display only times after the start time and within the shift in 15 minute intervals
|
||||
for ($i = 0; $i <= $intervals-1; $i++)
|
||||
{
|
||||
$t = str_pad($sh,2,"0",STR_PAD_LEFT).":".str_pad($sm,2,"0",STR_PAD_LEFT).":00";
|
||||
|
||||
@@ -403,28 +379,26 @@ function display_time($questionnaire_id,$respondent_id, $day, $month, $year, $ti
|
||||
$selected = "";
|
||||
if ($t == $timeend) $selected = "selected=\"selected\"";
|
||||
|
||||
print "<option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id&start=$time&end=$t\" $selected>".convert_time($t)."</option>";
|
||||
print "<option value=\"?y=$year&m=$month&d=$day&respondent_id=$respondent_id&start=$time&end=$t\" $selected>".$t."</option>";
|
||||
}
|
||||
|
||||
$sm += 5;
|
||||
$sm += 15;
|
||||
if ($sm >= 60)
|
||||
{
|
||||
$sh++;
|
||||
if ($sh >= 24) $sh -= 24;
|
||||
$sm -= 60;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
print "</select>";
|
||||
print "</select></div></div>";
|
||||
}
|
||||
|
||||
print "<input type=\"hidden\" name=\"respondent_id\" value=\"$respondent_id\"/>";
|
||||
print "<input type=\"hidden\" name=\"y\" value=\"$year\"/>";
|
||||
print "<input type=\"hidden\" name=\"m\" value=\"$month\"/>";
|
||||
print "<input type=\"hidden\" name=\"d\" value=\"$day\"/>";
|
||||
print "</p>";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -485,21 +459,19 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
|
||||
// Build the days in the month
|
||||
$Month->build();
|
||||
?>
|
||||
<table class="calendar">
|
||||
<caption>
|
||||
<?php echo ( date('F Y',$Month->getTimeStamp())); ?>
|
||||
</caption>
|
||||
<tr>
|
||||
<th>M</th>
|
||||
<th>T</th>
|
||||
<th>W</th>
|
||||
<th>T</th>
|
||||
<th>F</th>
|
||||
<th>S</th>
|
||||
<th>S</th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
print "<table class=\"calendar table-hover table-condensed text-center\">";
|
||||
print "<caption class=\"text-center text-primary\"><b>" . T_( date('F Y',$Month->getTimeStamp())) . "</b></caption>
|
||||
<thead style=\"font-weight: bolder;\">
|
||||
<tr>
|
||||
<td style=\"width: 50px;\">" . T_("Mon") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Tue") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Wed") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Thu") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Fri") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Sat") . "</td>
|
||||
<td style=\"width: 50px;\">" . T_("Sun") . "</td>
|
||||
</tr></thead>";
|
||||
|
||||
while ( $Day = $Month->fetch() ) {
|
||||
|
||||
@@ -512,7 +484,6 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
$today = "";
|
||||
if ($year == $Day->thisYear() && $month == $Day->thisMonth() && $day == $Day->thisDay()) $today = "today";
|
||||
|
||||
|
||||
// isFirst() to find start of week
|
||||
if ( $Day->isFirst() )
|
||||
echo ( "<tr>\n" );
|
||||
@@ -525,7 +496,7 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
//if it is in the past -> unavailable
|
||||
if ($Day->getTimeStamp() < $ttoday->getTimeStamp())
|
||||
{
|
||||
echo ( "<td class=\"notavailable\">".$Day->thisDay()."</td>\n" );
|
||||
echo ( "<td style=\"color:grey;\" class=\"notavailable\">".$Day->thisDay()."</td>\n" );
|
||||
}
|
||||
//if there are shift restrictions, restrict
|
||||
else if ($restricted)
|
||||
@@ -540,16 +511,16 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
|
||||
if (!empty($rs) && $rs->RecordCount() == 0)
|
||||
{
|
||||
echo ( "<td class=\"notavailable $today\">".$Day->thisDay()."</td>\n" );
|
||||
echo ( "<td style=\"color:grey;\" class=\"notavailable $today\">".$Day->thisDay()."</td>\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ( "<td class=\"$today\"><a href=\"".$link."\">".$Day->thisDay()."</a></td>\n" );
|
||||
echo ( "<td class=\"$today\"><a class=\"btn-primary btn-block \" href=\"".$link."\"><b>".$Day->thisDay()."</b></a></td>\n" );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
echo ( "<td class=\"$today\"><a href=\"".$link."\">".$Day->thisDay()."</a></td>\n" );
|
||||
echo ( "<td class=\"$today\"><a class=\"btn-primary btn-block \" href=\"".$link."\"><b>".$Day->thisDay()."</b></a></td>\n" );
|
||||
}
|
||||
|
||||
// isLast() to find end of week
|
||||
@@ -559,18 +530,15 @@ function display_calendar($respondent_id, $questionnaire_id, $year = false, $mon
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo ($prev);?>" class="prevMonth"><< </a>
|
||||
<a href="<?php echo ($prev);?>" class="prevMonth btn btn-default"><< </a>
|
||||
</td>
|
||||
<td colspan="5"> </td>
|
||||
<td colspan="5"><?php print "<b class=\"text-primary\">" . date('l j F Y',mktime(0,0,0,$month,$day,$year)) . "</b>";?></td>
|
||||
<td>
|
||||
<a href="<?php echo ($next);?>" class="nextMonth"> >></a>
|
||||
<a href="<?php echo ($next);?>" class="nextMonth btn btn-default"> >></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
print "<div>" . date('l j F Y',mktime(0,0,0,$month,$day,$year)) . "</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -87,3 +87,4 @@ function get_client_questionnaire($client_id)
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,6 @@
|
||||
* Functions relating to displaying for XHTML
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This file is part of queXS
|
||||
*
|
||||
* queXS is free software; you can redistribute it and/or modify
|
||||
@@ -31,7 +29,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
@@ -43,30 +40,23 @@ include_once(dirname(__FILE__).'/../config.inc.php');
|
||||
include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Display a list of questionnaires to choose from in a drop down list
|
||||
*
|
||||
* @param int|bool $questionnaire_id The questionnaire id or false if none selecetd
|
||||
*
|
||||
*/
|
||||
function display_questionnaire_chooser($questionnaire_id = false, $overall = false)
|
||||
function display_questionnaire_chooser($questionnaire_id = false, $overall = false, $divclass=false, $selectclass=false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$sql = "SELECT questionnaire_id,description,CASE WHEN questionnaire_id = '$questionnaire_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div><select id='questionnaire' name='questionnaire' onchange=\"LinkUp('questionnaire')\"><option value='?'></option>";
|
||||
print "<div class='$divclass'><select class='$selectclass' id='questionnaire' name='questionnaire' onchange=\"LinkUp('questionnaire')\"><option value='?'></option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
if (is_array($overall))
|
||||
@@ -92,7 +82,7 @@ function display_questionnaire_chooser($questionnaire_id = false, $overall = fal
|
||||
* @param int $questionnaire_id The questionnaire id
|
||||
* @param int|bool $shift_id The shift id or false if none selected
|
||||
*/
|
||||
function display_shift_chooser($questionnaire_id, $shift_id = false)
|
||||
function display_shift_chooser($questionnaire_id, $shift_id = false, $divclass=false, $selectclass=false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -103,7 +93,7 @@ function display_shift_chooser($questionnaire_id, $shift_id = false)
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div><select id='shift' name='shift' onchange=\"LinkUp('shift')\"><option value='?questionnaire_id=$questionnaire_id'></option>";
|
||||
print "<div class='$divclass'><select class='$selectclass' id='shift' name='shift' onchange=\"LinkUp('shift')\"><option value='?questionnaire_id=$questionnaire_id'></option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
foreach($rs as $r)
|
||||
@@ -121,13 +111,13 @@ function display_shift_chooser($questionnaire_id, $shift_id = false)
|
||||
* @param int|bool $sample_import_id The sample import id or false if none selected
|
||||
* @param bool $disabled Display disabled samples? (default is true)
|
||||
*/
|
||||
function display_sample_chooser($questionnaire_id, $sample_import_id = false, $disabled = true)
|
||||
function display_sample_chooser($questionnaire_id, $sample_import_id = false, $disabled = true, $divclass=false, $selectclass=false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$s = "";
|
||||
$s = "";
|
||||
|
||||
if (!$disabled)
|
||||
if (!$disabled)
|
||||
$s = " AND si.enabled = 1 ";
|
||||
|
||||
$sql = "SELECT s.sample_import_id,si.description,CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
@@ -137,7 +127,7 @@ function display_sample_chooser($questionnaire_id, $sample_import_id = false, $d
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div><select id='sample' name='sample' onchange=\"LinkUp('sample')\"><option value='?questionnaire_id=$questionnaire_id'></option>";
|
||||
print "<div class='$divclass'><select class='$selectclass' id='sample' name='sample' onchange=\"LinkUp('sample')\"><option value='?questionnaire_id=$questionnaire_id'></option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
foreach($rs as $r)
|
||||
@@ -155,7 +145,7 @@ function display_sample_chooser($questionnaire_id, $sample_import_id = false, $d
|
||||
* @param int $sample_import_id The sample import id
|
||||
* @param int|bool $qsqri The sample import id or false if none selected
|
||||
*/
|
||||
function display_quota_chooser($questionnaire_id, $sample_import_id, $qsqri = false)
|
||||
function display_quota_chooser($questionnaire_id, $sample_import_id, $qsqri = false, $divclass=false, $selectclass=false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -166,7 +156,7 @@ function display_quota_chooser($questionnaire_id, $sample_import_id, $qsqri = fa
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div><select id='questionnaire_sample_quota_row_id' name='questionnaire_sample_quota_row_id' onchange=\"LinkUp('questionnaire_sample_quota_row_id')\"><option value='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'></option>";
|
||||
print "<div class='$divclass'><select class='$selectclass' id='questionnaire_sample_quota_row_id' name='questionnaire_sample_quota_row_id' onchange=\"LinkUp('questionnaire_sample_quota_row_id')\"><option value='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id'></option>";
|
||||
if (!empty($rs))
|
||||
{
|
||||
foreach($rs as $r)
|
||||
@@ -177,6 +167,4 @@ function display_quota_chooser($questionnaire_id, $sample_import_id, $qsqri = fa
|
||||
print "</select></div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -86,7 +86,7 @@ function verify_fields($fields)
|
||||
{
|
||||
if (array_key_exists($fields["n_$val"], $names))
|
||||
{
|
||||
return T_("Duplicate name");
|
||||
return T_("Duplicate column name") . ": <b>" . $fields["n_$val"] . "</b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -123,14 +123,14 @@ function verify_fields($fields)
|
||||
*/
|
||||
function display_table($data)
|
||||
{
|
||||
print "<table>";
|
||||
print "<tr><th></th><th>" . T_("Import?") . "</th><th>" . T_("Name") . "</th><th>" . T_("Type") . "</th><th>" . T_("Allow operator to see?") . "</th></tr>";
|
||||
print "<table class='table-hover table-bordered table-condensed tclass'><thead class='highlight'>";
|
||||
print "<tr><th>" . T_("Selected file column name") . "</th><th>" . T_("Import ?") . "</th><th class='col-sm-4'>" . T_("New Sample Variable Name") . "</th><th>" . T_("Variable Type") . "</th><th>" . T_("Show to operator?") . "</th></tr></thead><tbody>";
|
||||
$row = 1;
|
||||
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT description,type
|
||||
FROM sample_var_type";
|
||||
FROM sample_var_type ORDER BY type ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
@@ -140,21 +140,24 @@ function display_table($data)
|
||||
$checked = "checked";
|
||||
if (empty($val)) $val = "samp_$row";
|
||||
|
||||
print "<tr><td>$value</td><td><input type=\"checkbox\" name=\"i_$row\" checked=\"$checked\"/></td><td><input type=\"text\" value=\"$val\" name=\"n_$row\"/></td><td>";
|
||||
print "<select name=\"t_$row\">";
|
||||
$selected = "selected=\"selected\"";
|
||||
foreach($rs as $r)
|
||||
{
|
||||
print "<option value=\"{$r['type']}\" $selected>" . T_($r['description']) . "</option>";
|
||||
$selected = "";
|
||||
}
|
||||
print "</select></td>";
|
||||
print "<td><input type=\"checkbox\" name=\"a_$row\"/></td>";
|
||||
print "<tr><td>$value</td>
|
||||
<td class='text-center'><input type=\"checkbox\" name=\"i_$row\" checked=\"$checked\" data-toggle=\"toggle\" data-size=\"small\" data-on=\"" . TQ_("Yes") . "\" data-off=" . TQ_("No") . " /></td>
|
||||
<td><input type=\"text\" value=\"$val\" name=\"n_$row\" class=\"form-control\" /></td>
|
||||
<td>";
|
||||
print "<select name=\"t_$row\" class=\"form-control\">";
|
||||
//print "<option value=\"\" $selected></option>";
|
||||
$selected = "selected=\"selected\"";
|
||||
foreach($rs as $r)
|
||||
{
|
||||
print "<option value=\"{$r['type']}\" $selected>" . T_($r['description']) . "</option>";
|
||||
$selected = "";
|
||||
}
|
||||
print "</select></td>";
|
||||
print "<td class=\"text-center\"><input type=\"checkbox\" name=\"a_$row\" data-toggle=\"toggle\" data-size=\"small\" data-on=\"" . TQ_("Yes") . "\" data-off=" . TQ_("No") . " /></td>";
|
||||
print "</tr>";
|
||||
$row++;
|
||||
|
||||
}
|
||||
print "</table>";
|
||||
print "</tbody></table>";
|
||||
|
||||
}
|
||||
|
||||
@@ -209,6 +212,7 @@ function import_file($file, $description, $fields, $firstrow = 2)
|
||||
|
||||
$selected_type = array();
|
||||
$selected_name = array();
|
||||
$sirv_id = array();
|
||||
|
||||
foreach($fields as $key => $val)
|
||||
{
|
||||
@@ -226,10 +230,12 @@ function import_file($file, $description, $fields, $firstrow = 2)
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO sample_import_var_restrict
|
||||
(`sample_import_id`,`var`,`restrict`)
|
||||
VALUES ($id,'" . $fields["n_" . substr($key,2)] . "',$restrict)";
|
||||
(`sample_import_id`,`var`,`type`,`restrict`)
|
||||
VALUES ($id,'" . $fields["n_" . substr($key,2)] . "','" . $fields["t_" . substr($key,2)] . "',$restrict)";
|
||||
|
||||
$db->Execute($sql);
|
||||
$db->Execute($sql);
|
||||
|
||||
$sirv_id[substr($key,2)] = $db->Insert_ID(); //
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,8 +315,8 @@ function import_file($file, $description, $fields, $firstrow = 2)
|
||||
{
|
||||
$dkey = $db->Quote($data[$key - 1]);
|
||||
|
||||
$sql = "INSERT INTO sample_var (sample_id,var,val,type)
|
||||
VALUES ('$sid','$val',{$dkey},'{$selected_type[$key]}')";
|
||||
$sql = "INSERT INTO sample_var (sample_id,var_id,var,val,type)
|
||||
VALUES ('$sid','{$sirv_id[$key]}','$val',{$dkey},'{$selected_type[$key]}')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
|
||||
@@ -283,11 +283,11 @@ function validate_email($email){
|
||||
* @param int $questionnaire_id The questionnaire ID
|
||||
* @param int $sample_import_id The sample import ID
|
||||
* @param string $val The value to compare
|
||||
* @param string $var The variable to compare
|
||||
* --- changed @param string $var the variable to compare
|
||||
* to @param string $var_id - ID for variable to compare
|
||||
* @return bool|int False if failed, otherwise the number of completions
|
||||
*
|
||||
*/
|
||||
function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sample_import_id,$val,$var)
|
||||
function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sample_import_id,$val,$var_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -305,7 +305,7 @@ function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sam
|
||||
FROM " . LIME_PREFIX . "survey_$lime_sid as s
|
||||
JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id')
|
||||
JOIN `sample` as sam ON (c.sample_id = sam.sample_id AND sam.import_id = '$sample_import_id')
|
||||
JOIN `sample_var` as sv ON (sv.sample_id = sam.sample_id AND sv.var LIKE '$var' AND sv.val LIKE '$val')
|
||||
JOIN `sample_var` as sv ON (sv.sample_id = sam.sample_id AND sv.var_id = '$var_id' AND sv.val LIKE '$val')
|
||||
WHERE s.submitdate IS NOT NULL
|
||||
AND s.token = c.token";
|
||||
|
||||
@@ -355,14 +355,15 @@ function limesurvey_quota_match($lime_sgqa,$lime_sid,$case_id,$value,$comparison
|
||||
* @param int $lime_sid The Limesurvey survey id
|
||||
* @param int $case_id The case id
|
||||
* @param string $val The sample value to compare
|
||||
* @param string $var The sample variable to compare
|
||||
* --- changed @param string $var the variable to compare
|
||||
* to @param string $var_id - ID for variable to compare
|
||||
* @param int $sample_import_id The sample import id we are looking at
|
||||
*
|
||||
* @return bool|int False if failed, otherwise 1 if matched, 0 if doesn't
|
||||
* @author Adam Zammit <adam.zammit@acspri.org.au>
|
||||
* @since 2012-04-30
|
||||
*/
|
||||
function limesurvey_quota_replicate_match($lime_sid,$case_id,$val,$var,$sample_import_id)
|
||||
function limesurvey_quota_replicate_match($lime_sid,$case_id,$val,$var_id,$sample_import_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -370,7 +371,7 @@ function limesurvey_quota_replicate_match($lime_sid,$case_id,$val,$var,$sample_i
|
||||
FROM " . LIME_PREFIX . "survey_$lime_sid as s
|
||||
JOIN `case` as c ON (c.case_id = '$case_id')
|
||||
JOIN `sample` as sam ON (c.sample_id = sam.sample_id and sam.import_id = $sample_import_id)
|
||||
JOIN `sample_var` as sv ON (sv.sample_id = sam.sample_id AND sv.var LIKE '$var' AND sv.val LIKE '$val')
|
||||
JOIN `sample_var` as sv ON (sv.sample_id = sam.sample_id AND sv.var_id = '$var_id' AND sv.val LIKE '$val')
|
||||
WHERE s.token = c.token";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
@@ -184,8 +184,9 @@ function get_sample_variable($variable,$case_id)
|
||||
|
||||
$sql = "SELECT s.val as r
|
||||
FROM sample_var as s
|
||||
JOIN `case` as c on (c.case_id = '$case_id' and s.sample_id = c.sample_id)
|
||||
WHERE s.var = '$variable'";
|
||||
JOIN `case` as c on (c.case_id = '$case_id' and s.sample_id = c.sample_id), `sample_import_var_restrict` as sivr
|
||||
WHERE sivr.var = '$variable'
|
||||
AND s.var_id = sivr.var_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
@@ -238,7 +239,6 @@ function get_respondent_variable($variable,$respondent_id)
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
|
||||
if (empty($rs)) return "";
|
||||
|
||||
return $rs['r'];
|
||||
@@ -380,13 +380,15 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
|
||||
//$db->Execute("SET @row := 0");
|
||||
|
||||
$sql = "SELECT val as phone
|
||||
FROM sample_var
|
||||
WHERE sample_id = '$sample_id'
|
||||
AND val is NOT NULL
|
||||
AND val != \"\"
|
||||
AND (`type` = 2 or `type` = 3)
|
||||
ORDER BY `type` DESC";
|
||||
$sql = "SELECT sv.val as phone
|
||||
FROM sample_var as sv, sample_import_var_restrict as sivr
|
||||
WHERE sv.sample_id = '$sample_id'
|
||||
AND sv.var_id = sivr.var_id
|
||||
AND sv.val > 0
|
||||
AND sv.val is NOT NULL
|
||||
AND sv.val != \"\"
|
||||
AND sivr.`type` IN (2,3)
|
||||
ORDER BY sivr.`type` DESC";
|
||||
|
||||
$r5 = $db->GetAll($sql);
|
||||
|
||||
@@ -396,7 +398,7 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
foreach ($r5 as $r5v)
|
||||
{
|
||||
$tnum = preg_replace("/[^0-9]/", "",$r5v['phone']);
|
||||
if (empty($tnum)) $tnum = "312345678"; //handle error condition
|
||||
if (empty($tnum)) $tnum = "88888888"; //handle error condition
|
||||
$sql = "INSERT INTO contact_phone (case_id,priority,phone,description)
|
||||
VALUES ($case_id,$i,$tnum,'')";
|
||||
$db->Execute($sql);
|
||||
@@ -406,7 +408,7 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO contact_phone (case_id,priority,phone,description)
|
||||
VALUES ($case_id,1,312345678,'test only')";
|
||||
VALUES ($case_id,1,88888888,'test only')";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
@@ -417,8 +419,8 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
$sql = "INSERT INTO respondent (case_id,firstName,lastName,Time_zone_name)
|
||||
SELECT $case_id as case_id, IFNULL(s1.val,'') as firstName, IFNULL(s2.val,'') as lastName, s3.Time_zone_name as Time_zone_name
|
||||
FROM sample as s3
|
||||
LEFT JOIN sample_var as s2 on (s2.sample_id = '$sample_id' and s2.type = 7)
|
||||
LEFT JOIN sample_var as s1 on (s1.sample_id = '$sample_id' and s1.type = 6)
|
||||
LEFT JOIN (sample_var as s2 , sample_import_var_restrict as sivr2) on (s2.sample_id = '$sample_id' and s2.var_id = sivr2.var_id and sivr2.type = 7)
|
||||
LEFT JOIN (sample_var as s1 , sample_import_var_restrict as sivr1) on (s1.sample_id = '$sample_id' and s1.var_id = sivr1.var_id and sivr1.type = 6)
|
||||
WHERE s3.sample_id = '$sample_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
@@ -1515,7 +1517,7 @@ function close_row_quota($questionnaire_sample_quota_row_id,$update = true)
|
||||
|
||||
if (isset($coun['c']) && $coun['c'] == 0)
|
||||
{
|
||||
$sql2 = "SELECT exclude_val,exclude_var,comparison
|
||||
$sql2 = "SELECT exclude_val,exclude_var,exclude_var_id,comparison
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $questionnaire_sample_quota_row_id";
|
||||
|
||||
@@ -1530,7 +1532,7 @@ function close_row_quota($questionnaire_sample_quota_row_id,$update = true)
|
||||
$x = 1;
|
||||
foreach($rev as $ev)
|
||||
{
|
||||
$sql .= " JOIN sample_var as sv$x ON (sv$x.sample_id = s.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$sql .= " JOIN sample_var as sv$x ON (sv$x.sample_id = s.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
@@ -1538,6 +1540,8 @@ function close_row_quota($questionnaire_sample_quota_row_id,$update = true)
|
||||
WHERE s.import_id = qs.sample_import_id";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
if ($db->HasFailedTrans()) die ($sql);
|
||||
|
||||
if ($update)
|
||||
{
|
||||
@@ -1582,8 +1586,8 @@ function copy_row_quota($questionnaire_id,$sample_import_id,$copy_sample_import_
|
||||
|
||||
$nqsqr = $db->Insert_ID();
|
||||
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var,exclude_val,comparison,description)
|
||||
SELECT $nqsqr, qs.exclude_var, qs.exclude_val, qs.comparison, qs.description
|
||||
$sql = "INSERT INTO qsqr_sample (questionnaire_sample_quota_row_id,exclude_var_id,exclude_var,exclude_val,comparison,description)
|
||||
SELECT $nqsqr, qs.exclude_var_id, qs.exclude_var, qs.exclude_val, qs.comparison, qs.description
|
||||
FROM qsqr_sample as qs, questionnaire_sample_quota_row as q
|
||||
WHERE qs.questionnaire_sample_quota_row_id = q.questionnaire_sample_quota_row_id
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
@@ -1627,7 +1631,7 @@ function copy_row_quota_with_adjusting($questionnaire_id,$sample_import_id,$copy
|
||||
$db->StartTrans();
|
||||
|
||||
// Select quotas from the old sample rows and calculate
|
||||
$sql = "SELECT questionnaire_sample_quota_row_id,q.questionnaire_id,sample_import_id,lime_sgqa,value,comparison,completions,quota_reached,q.lime_sid,qsq.exclude_var,qsq.exclude_val
|
||||
$sql = "SELECT questionnaire_sample_quota_row_id,q.questionnaire_id,sample_import_id,lime_sgqa,value,comparison,completions,quota_reached,q.lime_sid,qsq.exclude_var_id,qsq.exclude_var,qsq.exclude_val
|
||||
FROM questionnaire_sample_quota_row as qsq, questionnaire as q
|
||||
WHERE qsq.questionnaire_id = '$questionnaire_id'
|
||||
AND q.questionnaire_id = '$questionnaire_id'
|
||||
@@ -1693,7 +1697,7 @@ function update_single_row_quota($qsqri,$case_id = false)
|
||||
$autoprioritise = $rs['autoprioritise'];
|
||||
|
||||
//all variables to exclude for this row quota
|
||||
$sql2 = "SELECT exclude_val,exclude_var,comparison
|
||||
$sql2 = "SELECT exclude_val,exclude_var,exclude_var_id,comparison
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $qsqri";
|
||||
|
||||
@@ -1728,7 +1732,7 @@ function update_single_row_quota($qsqri,$case_id = false)
|
||||
$x = 1;
|
||||
foreach($rev as $ev)
|
||||
{
|
||||
$sql2 .= " JOIN sample_var as sv$x ON (sv$x.sample_id = sam.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$sql2 .= " JOIN sample_var as sv$x ON (sv$x.sample_id = sam.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
@@ -1779,7 +1783,7 @@ function update_single_row_quota($qsqri,$case_id = false)
|
||||
$x = 1;
|
||||
foreach($rev as $ev)
|
||||
{
|
||||
$sql2 .= " JOIN sample_var as sv$x ON (sv$x.sample_id = sam.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$sql2 .= " JOIN sample_var as sv$x ON (sv$x.sample_id = sam.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}') ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
@@ -1919,7 +1923,7 @@ function update_quota_priorities($questionnaire_id)
|
||||
|
||||
$sql = "INSERT INTO questionnaire_sample_exclude_priority (questionnaire_id,sample_id,exclude,priority)
|
||||
SELECT '$questionnaire_id', s.sample_id, 0, 50
|
||||
FROM sample AS s, questionnaire_sample as qs
|
||||
FROM `sample` as s, questionnaire_sample as qs
|
||||
WHERE qs.questionnaire_id = '$questionnaire_id'
|
||||
AND s.import_id = qs.sample_import_id
|
||||
ON DUPLICATE KEY UPDATE exclude = 0, priority = 50";
|
||||
@@ -1947,41 +1951,37 @@ function update_quota_priorities($questionnaire_id)
|
||||
$qsqri = $r['questionnaire_sample_quota_row_id'];
|
||||
$priority = $r['priority'];
|
||||
|
||||
$sql2 = "SELECT exclude_val,exclude_var,comparison
|
||||
$sql2 = "SELECT exclude_val,exclude_var,exclude_var_id,comparison
|
||||
FROM qsqr_sample
|
||||
WHERE questionnaire_sample_quota_row_id = $qsqri";
|
||||
|
||||
$rev = $db->GetAll($sql2);
|
||||
|
||||
$rev = $db->GetAll($sql2);
|
||||
|
||||
//find all cases that match this quota, and update it to the new priority
|
||||
$sql = "UPDATE sample as s, questionnaire_sample_quota_row as qs, questionnaire_sample_exclude_priority as qsep ";
|
||||
$sql = "UPDATE sample as s, questionnaire_sample_quota_row as qs, questionnaire_sample_exclude_priority as qsep ";
|
||||
|
||||
//reduce sample by every item in the qsqr_sample table
|
||||
$x = 1;
|
||||
foreach ($rev as $ev)
|
||||
{
|
||||
$sql .= ", sample_var as sv$x";
|
||||
$x++;
|
||||
}
|
||||
//reduce sample by every item in the qsqr_sample table
|
||||
$x = 1;
|
||||
foreach ($rev as $ev)
|
||||
{
|
||||
$sql .= ", sample_var as sv$x";
|
||||
$x++;
|
||||
}
|
||||
|
||||
$sql .= "
|
||||
SET qsep.priority = '$priority'
|
||||
$sql .= " SET qsep.priority = '$priority'
|
||||
WHERE s.import_id = qs.sample_import_id
|
||||
AND qs.questionnaire_sample_quota_row_id = '$qsqri'
|
||||
AND qsep.questionnaire_id = qs.questionnaire_id
|
||||
AND qsep.sample_id = s.sample_id ";
|
||||
|
||||
$x = 1;
|
||||
foreach ($rev as $ev)
|
||||
{
|
||||
$sql .= " AND sv$x.sample_id = s.sample_id AND sv$x.var LIKE '{$ev['exclude_var']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}' ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
AND qsep.sample_id = s.sample_id ";
|
||||
|
||||
$x = 1;
|
||||
foreach ($rev as $ev)
|
||||
{
|
||||
$sql .= " AND sv$x.sample_id = s.sample_id AND sv$x.var_id = '{$ev['exclude_var_id']}' AND sv$x.val {$ev['comparison']} '{$ev['exclude_val']}' ";
|
||||
$x++;
|
||||
}
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
|
||||
if ($db->HasFailedTrans()) die ($sql);
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ function get_stats_total($rs)
|
||||
$callsph = round($calls/($totaltime/3600),4);
|
||||
}
|
||||
|
||||
$rs[] = array("effectiveness" => $effectiveness, "completions" => $completions,"time" => sec_to_time($totaltime),"totalcalls" => $calls,"callt" => sec_to_time($calltime),"CPH" => $cph,"CALLSPH" => $callsph);
|
||||
$rs[] = array("effectiveness" => '<b>' . $effectiveness . '</b>', "completions" => '<b>' .$completions. '</b>',"time" => '<b>' . sec_to_time($totaltime). '</b>',"totalcalls" => '<b>' . $calls. '</b>',"callt" => '<b>' . sec_to_time($calltime). '</b>',"CPH" => '<b>' . $cph. '</b>',"CALLSPH" => '<b>' . $callsph. '</b>');
|
||||
|
||||
return $rs;
|
||||
}
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
*
|
||||
* @see xhtml_foot()
|
||||
*/
|
||||
function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false,$clearrefresh=false)
|
||||
function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false,$clearrefresh=false,$subtitle=false)
|
||||
{
|
||||
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head><title><?php if (empty($title)) print "queXS"; else print "queXS: $title"; ?></title>
|
||||
<head><title><?php if (empty($title)) print "CATI"; else print "CATI: $title"; ?></title>
|
||||
<?php
|
||||
if ($css)
|
||||
foreach ($css as $c) print "<link rel='stylesheet' href='$c' type='text/css'></link>";
|
||||
@@ -70,6 +70,8 @@ print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
</head>
|
||||
<?php
|
||||
if ($bodytext) print "<body $bodytext>"; else print "<body>";
|
||||
print "<h1 class='header text-primary'>" . "$title" . "  <small class='text-capitalize'>" . "$subtitle" . "</small></h1>";
|
||||
/* Let's print header that equals to menu item and page title !!!, move previous headers to "subtitles"*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,9 +80,13 @@ print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
* @see xhtml_head()
|
||||
*/
|
||||
|
||||
function xhtml_foot()
|
||||
{
|
||||
function xhtml_foot($javascript = false){ //added javascript files array to the footer
|
||||
if ($javascript)
|
||||
foreach ($javascript as $j) print "<script type='text/javascript' src='$j'></script>";
|
||||
?>
|
||||
<!--- Scroll to Top of the page -->
|
||||
<span class="totop" style="display:none;"><a href=" "><i class="fa fa-3x fa-arrow-circle-o-up"></i></br><?php echo T_("UP");?></a></span>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -97,22 +103,27 @@ function xhtml_foot()
|
||||
* @param bool|array $highlight False if nothing to highlight else an array containing the field to highlight
|
||||
* @param bool|array $total False if nothing to total else an array containing the fields to total
|
||||
*
|
||||
* AD:> for @value $class = "tclass" added "Bootstrap" table classes
|
||||
* AD:> added @param string $id - > to transfer table ID if required
|
||||
* AD:> added @param string $name - > to transfer table name if required
|
||||
*/
|
||||
function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight=false,$total=false)
|
||||
function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight=false,$total=false,$id=false,$name=false)
|
||||
{
|
||||
$tot = array();
|
||||
print "<table class='$class'>";
|
||||
if ($class == "tclass") $class = "table-hover table-bordered table-condensed tclass";
|
||||
print "<table class=\"$class\" id=\"$id\" name=\"$name\" data-toggle=\"table\" data-toolbar=\"filter-bar\" data-show-filter=\"true\" >";
|
||||
if ($head)
|
||||
{
|
||||
print "<tr>";
|
||||
print "<thead class=\"highlight\"><tr>";
|
||||
foreach ($head as $e)
|
||||
print"<th>$e</th>";
|
||||
print "</tr>";
|
||||
print"<th data-field=\"$e\" data-sortable=\"true\">$e</th>";
|
||||
print "</tr></thead>";
|
||||
}
|
||||
print "<tbody>";
|
||||
foreach($content as $row)
|
||||
{
|
||||
if ($highlight && isset($row[key($highlight)]) && $row[key($highlight)] == current($highlight))
|
||||
print "<tr class='highlight'>";
|
||||
print "<tr class=\"highlight\">";
|
||||
else
|
||||
print "<tr>";
|
||||
|
||||
@@ -132,15 +143,18 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
||||
}
|
||||
if ($total)
|
||||
{
|
||||
print "<tr>";
|
||||
print "</tbody><tfoot><tr>";
|
||||
foreach ($fields as $e)
|
||||
{
|
||||
print "<td>";
|
||||
print "<td><b>";
|
||||
if (in_array($e,$total))
|
||||
print $tot[$e];
|
||||
print "</td>";
|
||||
print "</b></td>";
|
||||
}
|
||||
print "</tr>";
|
||||
print "</tr></tfoot>";
|
||||
}
|
||||
else{
|
||||
print "</tbody>";
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
@@ -163,13 +177,13 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
||||
* @param bool $indiv Whether to display in a div or not
|
||||
* @param array|bool $select The element to select manually (element,string) (not using selected=\'selected\' in array)
|
||||
* @param bool $print Default is true, print the chooser otherwise return as a string
|
||||
*
|
||||
*
|
||||
*/
|
||||
function display_chooser($elements, $selectid, $var, $useblank = true, $pass = false, $js = true, $indiv = true, $selected = false, $print = true)
|
||||
function display_chooser($elements, $selectid, $var, $useblank = true, $pass = false, $js = true, $indiv = true, $selected = false, $print = true, $divclass=false, $selectclass="form-control")
|
||||
{
|
||||
$out = "";
|
||||
if ($indiv) $out .= "<div>";
|
||||
$out .= "<select id='$selectid' name='$selectid' ";
|
||||
if ($indiv) $out .= "<div class='$divclass'>";
|
||||
$out .= "<select id='$selectid' name='$selectid' class='$selectclass'" ;
|
||||
if ($js) $out .= "onchange=\"LinkUp('$selectid')\"";
|
||||
$out .= ">";
|
||||
if ($useblank)
|
||||
@@ -215,9 +229,9 @@ function display_chooser($elements, $selectid, $var, $useblank = true, $pass = f
|
||||
function xhtml_object($data, $id, $class="embeddedobject")
|
||||
{
|
||||
if (browser_ie())
|
||||
print '<iframe class="'.$class.'" id="'.$id.'" src="'.$data.'" frameBorder="0"><p>Error, try with Firefox</p></iframe>';
|
||||
print '<iframe class="'.$class.'" id="'.$id.'" src="'.$data.'" frameBorder="0"><p>Error while loading data from ' . "$data" . ', try with Frefox </p></iframe>';
|
||||
else
|
||||
print '<object class="'.$class.'" id="'.$id.'" data="'.$data.'" standby="Loading panel..." type="application/xhtml+xml"><p>Error, try with Firefox</p></object>';
|
||||
print '<object class="'.$class.'" id="'.$id.'" data="'.$data.'" standby="Loading panel..." type="application/xhtml+xml"><p>Error while loading data from ' . "$data" . ', try with Frefox </p></object>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,6 +246,4 @@ function browser_ie()
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
21
include/bootstrap-toggle/LICENSE
Normal file
21
include/bootstrap-toggle/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2014 Min Hur, The New York Times Company
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
169
include/bootstrap-toggle/README.md
Normal file
169
include/bootstrap-toggle/README.md
Normal file
@@ -0,0 +1,169 @@
|
||||
# Bootstrap Toggle
|
||||
Bootstrap Toggle is a highly flexible Bootstrap plugin that converts checkboxes into toggles.
|
||||
|
||||
Visit http://www.bootstraptoggle.com for demos.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installation
|
||||
You can [download](https://github.com/minhur/bootstrap-toggle/archive/master.zip) the latest version of Bootstrap Toggle or use CDN to load the library.
|
||||
|
||||
`Warning` If you are using Bootstrap v2.3.2, use `bootstrap2-toggle.min.js` and `bootstrap2-toggle.min.css` instead.
|
||||
|
||||
```html
|
||||
<link href="https://gitcdn.github.io/bootstrap-toggle/2.1.0/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||
<script src="https://gitcdn.github.io/bootstrap-toggle/2.1.0/js/bootstrap-toggle.min.js"></script>
|
||||
```
|
||||
|
||||
### Bower Install
|
||||
```bash
|
||||
bower install bootstrap-toggle
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic example
|
||||
Simply add `data-toggle="toggle"` to convert checkboxes into toggles.
|
||||
|
||||
```html
|
||||
<input type="checkbox" checked data-toggle="toggle">
|
||||
```
|
||||
|
||||
### Stacked checkboxes
|
||||
Refer to Bootstrap Form Controls documentation to create stacked checkboxes. Simply add `data-toggle="toggle"` to convert checkboxes into toggles.
|
||||
|
||||
```html
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" data-toggle="toggle">
|
||||
Option one is enabled
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox disabled">
|
||||
<label>
|
||||
<input type="checkbox" disabled data-toggle="toggle">
|
||||
Option two is disabled
|
||||
</label>
|
||||
</div>
|
||||
```
|
||||
|
||||
### Inline Checkboxes
|
||||
Refer to Bootstrap Form Controls documentation to create inline checkboxes. Simply add `data-toggle="toggle"` to a convert checkboxes into toggles.
|
||||
|
||||
```html
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" checked data-toggle="toggle"> First
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" data-toggle="toggle"> Second
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" data-toggle="toggle"> Third
|
||||
</label>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### Initialize by JavaScript
|
||||
Initialize toggles with id `toggle-one` with a single line of JavaScript.
|
||||
|
||||
```html
|
||||
<input id="toggle-one" checked type="checkbox">
|
||||
<script>
|
||||
$(function() {
|
||||
$('#toggle-one').bootstrapToggle();
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
### Options
|
||||
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-on="Enabled"`.
|
||||
|
||||
```html
|
||||
<input type="checkbox" data-toggle="toggle" data-on="Enabled" data-off="Disabled">
|
||||
<input type="checkbox" id="toggle-two">
|
||||
<script>
|
||||
$(function() {
|
||||
$('#toggle-two').bootstrapToggle({
|
||||
on: 'Enabled',
|
||||
off: 'Disabled'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
Name|Type|Default|Description|
|
||||
---|---|---|---
|
||||
on|string/html|"On"|Text of the on toggle
|
||||
off|string/html|"Off"|Text of the off toggle
|
||||
size|string|"normal"|Size of the toggle. Possible values are `large`, `normal`, `small`, `mini`.
|
||||
onstyle|string|"primary"|Style of the on toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger`
|
||||
offstyle|string|"default"|Style of the off toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger`
|
||||
style|string| |Appends the value to the class attribute of the toggle. This can be used to apply custom styles. Refer to Custom Styles for reference.
|
||||
width|integer|*null*|Sets the width of the toggle. if set to *null*, width will be calculated.
|
||||
height|integer|*null*|Sets the height of the toggle. if set to *null*, height will be calculated.
|
||||
|
||||
### Methods
|
||||
Methods can be used to control toggles directly.
|
||||
|
||||
```html
|
||||
<input id="toggle-demo" type="checkbox" data-toggle="toggle">
|
||||
```
|
||||
|
||||
Method|Example|Description
|
||||
---|---|---
|
||||
initialize|$('#toggle-demo').bootstrapToggle()|Initializes the toggle plugin with options
|
||||
destroy|$('#toggle-demo').bootstrapToggle('destroy')|Destroys the toggle
|
||||
on|$('#toggle-demo').bootstrapToggle('on')|Sets the toggle to 'On' state
|
||||
off|$('#toggle-demo').bootstrapToggle('off')|Sets the toggle to 'Off' state
|
||||
toggle|$('#toggle-demo').bootstrapToggle('toggle')|Toggles the state of the toggle
|
||||
enable|$('#toggle-demo').bootstrapToggle('enable')|Enables the toggle
|
||||
disable|$('#toggle-demo').bootstrapToggle('disable')|Disables the toggle
|
||||
|
||||
## Events
|
||||
|
||||
### Event Propagation
|
||||
Note All events are propagated to and from input element to the toggle.
|
||||
|
||||
You should listen to events from the `<input type="checkbox">` directly rather than look for custom events.
|
||||
|
||||
```html
|
||||
<input id="toggle-event" type="checkbox" data-toggle="toggle">
|
||||
<div id="console-event"></div>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#toggle-event').change(function() {
|
||||
$('#console-event').html('Toggle: ' + $(this).prop('checked'))
|
||||
})
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
### API vs Input
|
||||
This also means that using the API or Input to trigger events will work both ways.
|
||||
|
||||
```html
|
||||
<input id="toggle-trigger" type="checkbox" data-toggle="toggle">
|
||||
<button class="btn btn-success" onclick="toggleOn()">On by API</button>
|
||||
<button class="btn btn-danger" onclick="toggleOff()">Off by API</button>
|
||||
<button class="btn btn-success" onclick="toggleOnByInput()">On by Input</button>
|
||||
<button class="btn btn-danger" onclick="toggleOffByInput()">Off by Input</button>
|
||||
<script>
|
||||
function toggleOn() {
|
||||
$('#toggle-trigger').bootstrapToggle('on')
|
||||
}
|
||||
function toggleOff() {
|
||||
$('#toggle-trigger').bootstrapToggle('off')
|
||||
}
|
||||
function toggleOnByInput() {
|
||||
$('#toggle-trigger').prop('checked', true).change()
|
||||
}
|
||||
function toggleOffByInput() {
|
||||
$('#toggle-trigger').prop('checked', false).change()
|
||||
}
|
||||
</script>
|
||||
```
|
||||
|
||||
## Demos
|
||||
|
||||
Visit http://www.bootstraptoggle.com for demos.
|
||||
83
include/bootstrap-toggle/css/bootstrap-toggle.css
vendored
Normal file
83
include/bootstrap-toggle/css/bootstrap-toggle.css
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/*! ========================================================================
|
||||
* Bootstrap Toggle: bootstrap-toggle.css v2.2.0
|
||||
* http://www.bootstraptoggle.com
|
||||
* ========================================================================
|
||||
* Copyright 2014 Min Hur, The New York Times Company
|
||||
* Licensed under MIT
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
.checkbox label .toggle,
|
||||
.checkbox-inline .toggle {
|
||||
margin-left: -20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.toggle input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
.toggle-group {
|
||||
position: absolute;
|
||||
width: 200%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: left 0.35s;
|
||||
-webkit-transition: left 0.35s;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.toggle.off .toggle-group {
|
||||
left: -100%;
|
||||
}
|
||||
.toggle-on {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 50%;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.toggle-off {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.toggle-handle {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
height: 100%;
|
||||
width: 0px;
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.toggle.btn { min-width: 59px; min-height: 34px; }
|
||||
.toggle-on.btn { padding-right: 24px; }
|
||||
.toggle-off.btn { padding-left: 24px; }
|
||||
|
||||
.toggle.btn-lg { min-width: 79px; min-height: 45px; }
|
||||
.toggle-on.btn-lg { padding-right: 31px; }
|
||||
.toggle-off.btn-lg { padding-left: 31px; }
|
||||
.toggle-handle.btn-lg { width: 40px; }
|
||||
|
||||
.toggle.btn-sm { min-width: 50px; min-height: 30px;}
|
||||
.toggle-on.btn-sm { padding-right: 20px; }
|
||||
.toggle-off.btn-sm { padding-left: 20px; }
|
||||
|
||||
.toggle.btn-xs { min-width: 35px; min-height: 22px;}
|
||||
.toggle-on.btn-xs { padding-right: 12px; }
|
||||
.toggle-off.btn-xs { padding-left: 12px; }
|
||||
|
||||
28
include/bootstrap-toggle/css/bootstrap-toggle.min.css
vendored
Normal file
28
include/bootstrap-toggle/css/bootstrap-toggle.min.css
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*! ========================================================================
|
||||
* Bootstrap Toggle: bootstrap-toggle.css v2.2.0
|
||||
* http://www.bootstraptoggle.com
|
||||
* ========================================================================
|
||||
* Copyright 2014 Min Hur, The New York Times Company
|
||||
* Licensed under MIT
|
||||
* ======================================================================== */
|
||||
.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px}
|
||||
.toggle{position:relative;overflow:hidden}
|
||||
.toggle input[type=checkbox]{display:none}
|
||||
.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none}
|
||||
.toggle.off .toggle-group{left:-100%}
|
||||
.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}
|
||||
.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0}
|
||||
.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px}
|
||||
.toggle.btn{min-width:59px;min-height:34px}
|
||||
.toggle-on.btn{padding-right:24px}
|
||||
.toggle-off.btn{padding-left:24px}
|
||||
.toggle.btn-lg{min-width:79px;min-height:45px}
|
||||
.toggle-on.btn-lg{padding-right:31px}
|
||||
.toggle-off.btn-lg{padding-left:31px}
|
||||
.toggle-handle.btn-lg{width:40px}
|
||||
.toggle.btn-sm{min-width:50px;min-height:30px}
|
||||
.toggle-on.btn-sm{padding-right:20px}
|
||||
.toggle-off.btn-sm{padding-left:20px}
|
||||
.toggle.btn-xs{min-width:35px;min-height:22px}
|
||||
.toggle-on.btn-xs{padding-right:12px}
|
||||
.toggle-off.btn-xs{padding-left:12px}
|
||||
180
include/bootstrap-toggle/js/bootstrap-toggle.js
vendored
Normal file
180
include/bootstrap-toggle/js/bootstrap-toggle.js
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
/*! ========================================================================
|
||||
* Bootstrap Toggle: bootstrap-toggle.js v2.2.0
|
||||
* http://www.bootstraptoggle.com
|
||||
* ========================================================================
|
||||
* Copyright 2014 Min Hur, The New York Times Company
|
||||
* Licensed under MIT
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// TOGGLE PUBLIC CLASS DEFINITION
|
||||
// ==============================
|
||||
|
||||
var Toggle = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, this.defaults(), options)
|
||||
this.render()
|
||||
}
|
||||
|
||||
Toggle.VERSION = '2.2.0'
|
||||
|
||||
Toggle.DEFAULTS = {
|
||||
on: 'On',
|
||||
off: 'Off',
|
||||
onstyle: 'primary',
|
||||
offstyle: 'default',
|
||||
size: 'normal',
|
||||
style: '',
|
||||
width: null,
|
||||
height: null
|
||||
}
|
||||
|
||||
Toggle.prototype.defaults = function() {
|
||||
return {
|
||||
on: this.$element.attr('data-on') || Toggle.DEFAULTS.on,
|
||||
off: this.$element.attr('data-off') || Toggle.DEFAULTS.off,
|
||||
onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle,
|
||||
offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle,
|
||||
size: this.$element.attr('data-size') || Toggle.DEFAULTS.size,
|
||||
style: this.$element.attr('data-style') || Toggle.DEFAULTS.style,
|
||||
width: this.$element.attr('data-width') || Toggle.DEFAULTS.width,
|
||||
height: this.$element.attr('data-height') || Toggle.DEFAULTS.height
|
||||
}
|
||||
}
|
||||
|
||||
Toggle.prototype.render = function () {
|
||||
this._onstyle = 'btn-' + this.options.onstyle
|
||||
this._offstyle = 'btn-' + this.options.offstyle
|
||||
var size = this.options.size === 'large' ? 'btn-lg'
|
||||
: this.options.size === 'small' ? 'btn-sm'
|
||||
: this.options.size === 'mini' ? 'btn-xs'
|
||||
: ''
|
||||
var $toggleOn = $('<label class="btn">').html(this.options.on)
|
||||
.addClass(this._onstyle + ' ' + size)
|
||||
var $toggleOff = $('<label class="btn">').html(this.options.off)
|
||||
.addClass(this._offstyle + ' ' + size + ' active')
|
||||
var $toggleHandle = $('<span class="toggle-handle btn btn-default">')
|
||||
.addClass(size)
|
||||
var $toggleGroup = $('<div class="toggle-group">')
|
||||
.append($toggleOn, $toggleOff, $toggleHandle)
|
||||
var $toggle = $('<div class="toggle btn" data-toggle="toggle">')
|
||||
.addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' )
|
||||
.addClass(size).addClass(this.options.style)
|
||||
|
||||
this.$element.wrap($toggle)
|
||||
$.extend(this, {
|
||||
$toggle: this.$element.parent(),
|
||||
$toggleOn: $toggleOn,
|
||||
$toggleOff: $toggleOff,
|
||||
$toggleGroup: $toggleGroup
|
||||
})
|
||||
this.$toggle.append($toggleGroup)
|
||||
|
||||
var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2)
|
||||
var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight())
|
||||
$toggleOn.addClass('toggle-on')
|
||||
$toggleOff.addClass('toggle-off')
|
||||
this.$toggle.css({ width: width, height: height })
|
||||
if (this.options.height) {
|
||||
$toggleOn.css('line-height', $toggleOn.height() + 'px')
|
||||
$toggleOff.css('line-height', $toggleOff.height() + 'px')
|
||||
}
|
||||
this.update(true)
|
||||
this.trigger(true)
|
||||
}
|
||||
|
||||
Toggle.prototype.toggle = function () {
|
||||
if (this.$element.prop('checked')) this.off()
|
||||
else this.on()
|
||||
}
|
||||
|
||||
Toggle.prototype.on = function (silent) {
|
||||
if (this.$element.prop('disabled')) return false
|
||||
this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle)
|
||||
this.$element.prop('checked', true)
|
||||
if (!silent) this.trigger()
|
||||
}
|
||||
|
||||
Toggle.prototype.off = function (silent) {
|
||||
if (this.$element.prop('disabled')) return false
|
||||
this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off')
|
||||
this.$element.prop('checked', false)
|
||||
if (!silent) this.trigger()
|
||||
}
|
||||
|
||||
Toggle.prototype.enable = function () {
|
||||
this.$toggle.removeAttr('disabled')
|
||||
this.$element.prop('disabled', false)
|
||||
}
|
||||
|
||||
Toggle.prototype.disable = function () {
|
||||
this.$toggle.attr('disabled', 'disabled')
|
||||
this.$element.prop('disabled', true)
|
||||
}
|
||||
|
||||
Toggle.prototype.update = function (silent) {
|
||||
if (this.$element.prop('disabled')) this.disable()
|
||||
else this.enable()
|
||||
if (this.$element.prop('checked')) this.on(silent)
|
||||
else this.off(silent)
|
||||
}
|
||||
|
||||
Toggle.prototype.trigger = function (silent) {
|
||||
this.$element.off('change.bs.toggle')
|
||||
if (!silent) this.$element.change()
|
||||
this.$element.on('change.bs.toggle', $.proxy(function() {
|
||||
this.update()
|
||||
}, this))
|
||||
}
|
||||
|
||||
Toggle.prototype.destroy = function() {
|
||||
this.$element.off('change.bs.toggle')
|
||||
this.$toggleGroup.remove()
|
||||
this.$element.removeData('bs.toggle')
|
||||
this.$element.unwrap()
|
||||
}
|
||||
|
||||
// TOGGLE PLUGIN DEFINITION
|
||||
// ========================
|
||||
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.toggle')
|
||||
var options = typeof option == 'object' && option
|
||||
|
||||
if (!data) $this.data('bs.toggle', (data = new Toggle(this, options)))
|
||||
if (typeof option == 'string' && data[option]) data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.bootstrapToggle
|
||||
|
||||
$.fn.bootstrapToggle = Plugin
|
||||
$.fn.bootstrapToggle.Constructor = Toggle
|
||||
|
||||
// TOGGLE NO CONFLICT
|
||||
// ==================
|
||||
|
||||
$.fn.toggle.noConflict = function () {
|
||||
$.fn.bootstrapToggle = old
|
||||
return this
|
||||
}
|
||||
|
||||
// TOGGLE DATA-API
|
||||
// ===============
|
||||
|
||||
$(function() {
|
||||
$('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()
|
||||
})
|
||||
|
||||
$(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
|
||||
var $checkbox = $(this).find('input[type=checkbox]')
|
||||
$checkbox.bootstrapToggle('toggle')
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||
9
include/bootstrap-toggle/js/bootstrap-toggle.min.js
vendored
Normal file
9
include/bootstrap-toggle/js/bootstrap-toggle.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*! ========================================================================
|
||||
* Bootstrap Toggle: bootstrap-toggle.js v2.2.0
|
||||
* http://www.bootstraptoggle.com
|
||||
* ========================================================================
|
||||
* Copyright 2014 Min Hur, The New York Times Company
|
||||
* Licensed under MIT
|
||||
* ======================================================================== */
|
||||
+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.toggle"),f="object"==typeof b&&b;e||d.data("bs.toggle",e=new c(this,f)),"string"==typeof b&&e[b]&&e[b]()})}var c=function(b,c){this.$element=a(b),this.options=a.extend({},this.defaults(),c),this.render()};c.VERSION="2.2.0",c.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},c.prototype.defaults=function(){return{on:this.$element.attr("data-on")||c.DEFAULTS.on,off:this.$element.attr("data-off")||c.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||c.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||c.DEFAULTS.offstyle,size:this.$element.attr("data-size")||c.DEFAULTS.size,style:this.$element.attr("data-style")||c.DEFAULTS.style,width:this.$element.attr("data-width")||c.DEFAULTS.width,height:this.$element.attr("data-height")||c.DEFAULTS.height}},c.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var b="large"===this.options.size?"btn-lg":"small"===this.options.size?"btn-sm":"mini"===this.options.size?"btn-xs":"",c=a('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+b),d=a('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+b+" active"),e=a('<span class="toggle-handle btn btn-default">').addClass(b),f=a('<div class="toggle-group">').append(c,d,e),g=a('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(b).addClass(this.options.style);this.$element.wrap(g),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:c,$toggleOff:d,$toggleGroup:f}),this.$toggle.append(f);var h=this.options.width||Math.max(c.outerWidth(),d.outerWidth())+e.outerWidth()/2,i=this.options.height||Math.max(c.outerHeight(),d.outerHeight());c.addClass("toggle-on"),d.addClass("toggle-off"),this.$toggle.css({width:h,height:i}),this.options.height&&(c.css("line-height",c.height()+"px"),d.css("line-height",d.height()+"px")),this.update(!0),this.trigger(!0)},c.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},c.prototype.on=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),void(a||this.trigger()))},c.prototype.off=function(a){return this.$element.prop("disabled")?!1:(this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),void(a||this.trigger()))},c.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},c.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},c.prototype.update=function(a){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(a):this.off(a)},c.prototype.trigger=function(b){this.$element.off("change.bs.toggle"),b||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},c.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var d=a.fn.bootstrapToggle;a.fn.bootstrapToggle=b,a.fn.bootstrapToggle.Constructor=c,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=d,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(b){var c=a(this).find("input[type=checkbox]");c.bootstrapToggle("toggle"),b.preventDefault()})}(jQuery);
|
||||
//# sourceMappingURL=bootstrap-toggle.min.js.map
|
||||
49
include/bootstrap-toggle/script.js
Normal file
49
include/bootstrap-toggle/script.js
Normal file
@@ -0,0 +1,49 @@
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
$('.example:not(.skip)').each(function() {
|
||||
// fetch & encode html
|
||||
var html = $('<div>').text($(this).html()).html()
|
||||
// find number of space/tabs on first line (minus line break)
|
||||
var count = html.match(/^(\s+)/)[0].length - 1
|
||||
// replace tabs/spaces on each lines with
|
||||
var regex = new RegExp('\\n\\s{'+count+'}', 'g')
|
||||
var code = html.replace(regex, '\n').replace(/\t/g, ' ').trim()
|
||||
// other cleanup
|
||||
code = code.replace(/=""/g,'')
|
||||
// add code block to dom
|
||||
$(this).after( $('<code class="highlight html">').html(code) )
|
||||
});
|
||||
|
||||
$('code.highlight').each(function() {
|
||||
hljs.highlightBlock(this)
|
||||
});
|
||||
|
||||
}(jQuery);
|
||||
|
||||
var Demo = function () {}
|
||||
|
||||
Demo.prototype.init = function(selector) {
|
||||
$(selector).bootstrapToggle(selector)
|
||||
}
|
||||
Demo.prototype.destroy = function(selector) {
|
||||
$(selector).bootstrapToggle('destroy')
|
||||
}
|
||||
Demo.prototype.on = function(selector) {
|
||||
$(selector).bootstrapToggle('on')
|
||||
}
|
||||
Demo.prototype.off = function(selector) {
|
||||
$(selector).bootstrapToggle('off')
|
||||
}
|
||||
Demo.prototype.toggle = function(selector) {
|
||||
$(selector).bootstrapToggle('toggle')
|
||||
}
|
||||
Demo.prototype.enable = function(selector) {
|
||||
$(selector).bootstrapToggle('enable')
|
||||
}
|
||||
Demo.prototype.disable = function(selector) {
|
||||
$(selector).bootstrapToggle('disable')
|
||||
}
|
||||
|
||||
|
||||
demo = new Demo()
|
||||
587
include/bootstrap/css/bootstrap-theme.css
vendored
Normal file
587
include/bootstrap/css/bootstrap-theme.css
vendored
Normal file
@@ -0,0 +1,587 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.5 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-primary.disabled,
|
||||
.btn-success.disabled,
|
||||
.btn-info.disabled,
|
||||
.btn-warning.disabled,
|
||||
.btn-danger.disabled,
|
||||
.btn-default[disabled],
|
||||
.btn-primary[disabled],
|
||||
.btn-success[disabled],
|
||||
.btn-info[disabled],
|
||||
.btn-warning[disabled],
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
fieldset[disabled] .btn-primary,
|
||||
fieldset[disabled] .btn-success,
|
||||
fieldset[disabled] .btn-info,
|
||||
fieldset[disabled] .btn-warning,
|
||||
fieldset[disabled] .btn-danger {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
.btn-info .badge,
|
||||
.btn-warning .badge,
|
||||
.btn-danger .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-primary {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #265a88;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #265a88;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #2e6da4;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.navbar-default {
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a,
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||
}
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .open > a,
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||
color: #fff;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
}
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.alert-success {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
}
|
||||
.alert-info {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
}
|
||||
.alert-warning {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
}
|
||||
.alert-danger {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
}
|
||||
.progress {
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-striped {
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
}
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #286090;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
.list-group-item.active .badge,
|
||||
.list-group-item.active:hover .badge,
|
||||
.list-group-item.active:focus .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.well {
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-theme.css.map */
|
||||
1
include/bootstrap/css/bootstrap-theme.css.map
Normal file
1
include/bootstrap/css/bootstrap-theme.css.map
Normal file
File diff suppressed because one or more lines are too long
5
include/bootstrap/css/bootstrap-theme.min.css
vendored
Normal file
5
include/bootstrap/css/bootstrap-theme.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6800
include/bootstrap/css/bootstrap.css
vendored
Normal file
6800
include/bootstrap/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
include/bootstrap/css/bootstrap.css.map
Normal file
1
include/bootstrap/css/bootstrap.css.map
Normal file
File diff suppressed because one or more lines are too long
5
include/bootstrap/css/bootstrap.min.css
vendored
Normal file
5
include/bootstrap/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.eot
Normal file
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.eot
Normal file
Binary file not shown.
288
include/bootstrap/fonts/glyphicons-halflings-regular.svg
Normal file
288
include/bootstrap/fonts/glyphicons-halflings-regular.svg
Normal file
@@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata></metadata>
|
||||
<defs>
|
||||
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
|
||||
<font-face units-per-em="1200" ascent="960" descent="-240" />
|
||||
<missing-glyph horiz-adv-x="500" />
|
||||
<glyph horiz-adv-x="0" />
|
||||
<glyph horiz-adv-x="400" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
|
||||
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode=" " />
|
||||
<glyph unicode="¥" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
|
||||
<glyph unicode=" " horiz-adv-x="650" />
|
||||
<glyph unicode=" " horiz-adv-x="1300" />
|
||||
<glyph unicode=" " horiz-adv-x="650" />
|
||||
<glyph unicode=" " horiz-adv-x="1300" />
|
||||
<glyph unicode=" " horiz-adv-x="433" />
|
||||
<glyph unicode=" " horiz-adv-x="325" />
|
||||
<glyph unicode=" " horiz-adv-x="216" />
|
||||
<glyph unicode=" " horiz-adv-x="216" />
|
||||
<glyph unicode=" " horiz-adv-x="162" />
|
||||
<glyph unicode=" " horiz-adv-x="260" />
|
||||
<glyph unicode=" " horiz-adv-x="72" />
|
||||
<glyph unicode=" " horiz-adv-x="260" />
|
||||
<glyph unicode=" " horiz-adv-x="325" />
|
||||
<glyph unicode="€" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
|
||||
<glyph unicode="₽" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
|
||||
<glyph unicode="−" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="⌛" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
|
||||
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
||||
<glyph unicode="☁" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
|
||||
<glyph unicode="⛺" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
|
||||
<glyph unicode="✉" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
|
||||
<glyph unicode="✏" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
|
||||
<glyph unicode="" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
|
||||
<glyph unicode="" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
|
||||
<glyph unicode="" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
|
||||
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
|
||||
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
|
||||
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
|
||||
<glyph unicode="" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
|
||||
<glyph unicode="" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
|
||||
<glyph unicode="" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
|
||||
<glyph unicode="" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
|
||||
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
|
||||
<glyph unicode="" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
|
||||
<glyph unicode="" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
|
||||
<glyph unicode="" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
|
||||
<glyph unicode="" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
|
||||
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
|
||||
<glyph unicode="" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
|
||||
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
|
||||
<glyph unicode="" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
|
||||
<glyph unicode="" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
|
||||
<glyph unicode="" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
|
||||
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
|
||||
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
|
||||
<glyph unicode="" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
|
||||
<glyph unicode="" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
|
||||
<glyph unicode="" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
|
||||
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
||||
<glyph unicode="" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
|
||||
<glyph unicode="" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
|
||||
<glyph unicode="" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
|
||||
<glyph unicode="" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
|
||||
<glyph unicode="" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
|
||||
<glyph unicode="" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
|
||||
<glyph unicode="" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
|
||||
<glyph unicode="" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
|
||||
<glyph unicode="" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
||||
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
|
||||
<glyph unicode="" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
|
||||
<glyph unicode="" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
|
||||
<glyph unicode="" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
|
||||
<glyph unicode="" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
|
||||
<glyph unicode="" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
|
||||
<glyph unicode="" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
|
||||
<glyph unicode="" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
|
||||
<glyph unicode="" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
|
||||
<glyph unicode="" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
|
||||
<glyph unicode="" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||
<glyph unicode="" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
|
||||
<glyph unicode="" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
|
||||
<glyph unicode="" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
|
||||
<glyph unicode="" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
|
||||
<glyph unicode="" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
|
||||
<glyph unicode="" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
|
||||
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
|
||||
<glyph unicode="" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
|
||||
<glyph unicode="" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
|
||||
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
|
||||
<glyph unicode="" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
|
||||
<glyph unicode="" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
|
||||
<glyph unicode="" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||
<glyph unicode="" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
||||
<glyph unicode="" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
|
||||
<glyph unicode="" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
|
||||
<glyph unicode="" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
|
||||
<glyph unicode="" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
|
||||
<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
|
||||
<glyph unicode="" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
|
||||
<glyph unicode="" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
|
||||
<glyph unicode="" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
|
||||
<glyph unicode="" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
|
||||
<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
|
||||
<glyph unicode="" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
|
||||
<glyph unicode="" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
|
||||
<glyph unicode="" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
|
||||
<glyph unicode="" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
|
||||
<glyph unicode="" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
|
||||
<glyph unicode="" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
|
||||
<glyph unicode="" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
|
||||
<glyph unicode="" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
|
||||
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
|
||||
<glyph unicode="" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
|
||||
<glyph unicode="" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
|
||||
<glyph unicode="" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
|
||||
<glyph unicode="" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
|
||||
<glyph unicode="" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
|
||||
<glyph unicode="" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
|
||||
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
|
||||
<glyph unicode="" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
|
||||
<glyph unicode="" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
|
||||
<glyph unicode="" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
|
||||
<glyph unicode="" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
|
||||
<glyph unicode="" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
|
||||
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
|
||||
<glyph unicode="" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
|
||||
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
||||
<glyph unicode="" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
|
||||
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
|
||||
<glyph unicode="" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||
<glyph unicode="" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
|
||||
<glyph unicode="" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
||||
<glyph unicode="" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
|
||||
<glyph unicode="" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
|
||||
<glyph unicode="" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
|
||||
<glyph unicode="" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
||||
<glyph unicode="" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
|
||||
<glyph unicode="" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
|
||||
<glyph unicode="" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
|
||||
<glyph unicode="" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
|
||||
<glyph unicode="" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
|
||||
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
|
||||
<glyph unicode="" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
|
||||
<glyph unicode="" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
|
||||
<glyph unicode="" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
|
||||
<glyph unicode="" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
|
||||
<glyph unicode="" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
|
||||
<glyph unicode="" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
|
||||
<glyph unicode="" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
|
||||
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
|
||||
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
|
||||
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
|
||||
<glyph unicode="" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
|
||||
<glyph unicode="" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
|
||||
<glyph unicode="" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
|
||||
<glyph unicode="" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
|
||||
<glyph unicode="" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
|
||||
<glyph unicode="" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
|
||||
<glyph unicode="" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
|
||||
<glyph unicode="" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
|
||||
<glyph unicode="" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
|
||||
<glyph unicode="" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
|
||||
<glyph unicode="" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
|
||||
<glyph unicode="" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
|
||||
<glyph unicode="" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
|
||||
<glyph unicode="" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
|
||||
<glyph unicode="" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
|
||||
<glyph unicode="" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
|
||||
<glyph unicode="" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
|
||||
<glyph unicode="" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
|
||||
<glyph unicode="" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
|
||||
<glyph unicode="" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||
<glyph unicode="" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
||||
<glyph unicode="" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
|
||||
<glyph unicode="" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||
<glyph unicode="" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
||||
<glyph unicode="" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
||||
<glyph unicode="" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
|
||||
<glyph unicode="" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
|
||||
<glyph unicode="" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
|
||||
<glyph unicode="" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
|
||||
<glyph unicode="" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
|
||||
<glyph unicode="" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
|
||||
<glyph unicode="" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
|
||||
<glyph unicode="" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
|
||||
<glyph unicode="" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
||||
<glyph unicode="" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
|
||||
<glyph unicode="" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
|
||||
<glyph unicode="" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
|
||||
<glyph unicode="" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
|
||||
<glyph unicode="" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
|
||||
<glyph unicode="" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
|
||||
<glyph unicode="" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
|
||||
<glyph unicode="" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
|
||||
<glyph unicode="" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
|
||||
<glyph unicode="" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
|
||||
<glyph unicode="" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
|
||||
<glyph unicode="" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
|
||||
<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
|
||||
<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
After Width: | Height: | Size: 106 KiB |
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.ttf
Normal file
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.ttf
Normal file
Binary file not shown.
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.woff
Normal file
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.woff
Normal file
Binary file not shown.
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.woff2
Normal file
BIN
include/bootstrap/fonts/glyphicons-halflings-regular.woff2
Normal file
Binary file not shown.
2363
include/bootstrap/js/bootstrap.js
vendored
Normal file
2363
include/bootstrap/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
include/bootstrap/js/bootstrap.min.js
vendored
Normal file
7
include/bootstrap/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
include/bootstrap/js/npm.js
Normal file
13
include/bootstrap/js/npm.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
||||
1
include/bootstrap/version
Normal file
1
include/bootstrap/version
Normal file
@@ -0,0 +1 @@
|
||||
current version 3.3.5
|
||||
36
include/bs-data-table/css/jquery.bdt.css
Normal file
36
include/bs-data-table/css/jquery.bdt.css
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Custom styles for BDT - Bootstrap Data Tables
|
||||
**/
|
||||
|
||||
.bdt thead th {
|
||||
cursor: pointer;
|
||||
}
|
||||
/*
|
||||
.bdt .sort-icon {
|
||||
width: 10px;
|
||||
display: inline-block;
|
||||
padding-left: 5px;
|
||||
} */
|
||||
|
||||
#table-footer {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 10px;
|
||||
min-height:35px;
|
||||
}
|
||||
|
||||
#table-footer a, #table-footer button {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#table-footer .form-horizontal .control-label {
|
||||
text-align: left;
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
#table-footer .pagination {
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
#table-footer .pagination li:not(.active) {
|
||||
cursor: pointer;
|
||||
}
|
||||
1
include/bs-data-table/css/jquery.bdt.min.css
vendored
Normal file
1
include/bs-data-table/css/jquery.bdt.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.bdt thead th{cursor:pointer}.bdt .sort-icon{width:10px;display:inline-block;padding-left:5px}#table-footer{margin-bottom:15px}#table-footer a,#table-footer button{outline:0}#table-footer .form-horizontal .control-label{text-align:left;margin:0 15px}#table-footer .pagination{margin:0 15px}#table-footer .pagination li:not(.active){cursor:pointer}
|
||||
447
include/bs-data-table/js/jquery.bdt.js
Normal file
447
include/bs-data-table/js/jquery.bdt.js
Normal file
@@ -0,0 +1,447 @@
|
||||
/**
|
||||
* @license MIT
|
||||
* @license http://opensource.org/licenses/MIT Massachusetts Institute of Technology
|
||||
* @copyright 2014 Patric Gutersohn
|
||||
* @author Patric Gutersohn
|
||||
* @example index.html BDT in action.
|
||||
* @link http://bdt.gutersohn.biz Documentation
|
||||
* @version 1.0.0
|
||||
*
|
||||
* @summary BDT - Bootstrap Data Tables
|
||||
* @description sorting, paginating and search for bootstrap tables
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
var actualPage = 1;
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
var pageCount = 0;
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
var pageRowCount = 0;
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
var pages = 'Тоtal pages';
|
||||
/**
|
||||
* @type {object}
|
||||
*/
|
||||
var obj = null;
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
var activeSearch = false;
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
var arrowUp = ' ';
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
var arrowDown = ' ';
|
||||
|
||||
$.fn.bdt = function (options, callback) {
|
||||
|
||||
var settings = $.extend({
|
||||
pageRowCount: 50,
|
||||
arrowDown: 'fa-arrow-down text-primary fa-lg',
|
||||
arrowUp: 'fa-arrow-up text-primary fa-lg'
|
||||
}, options);
|
||||
|
||||
/**
|
||||
* @type {object}
|
||||
*/
|
||||
var tableBody = null;
|
||||
|
||||
return this.each(function () {
|
||||
obj = $(this).addClass('bdt');
|
||||
tableBody = obj.find("tbody");
|
||||
pageRowCount = settings.pageRowCount;
|
||||
arrowDown = settings.arrowDown;
|
||||
arrowUp = settings.arrowUp;
|
||||
|
||||
/**
|
||||
* search input field
|
||||
*/
|
||||
|
||||
obj.before(
|
||||
$('<form/>')
|
||||
.addClass('float-left')
|
||||
.attr('role', 'form')
|
||||
.attr('style', 'width:30%;')
|
||||
.append(
|
||||
$('<div/>')
|
||||
.addClass('form-group')
|
||||
.append(
|
||||
$('<input/>')
|
||||
.addClass('form-control')
|
||||
.attr('id', 'search')
|
||||
.attr('placeholder', 'Type to Search here ...' )
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/**
|
||||
* select field for changing row per page
|
||||
*/
|
||||
obj.after(
|
||||
$('<div/>')
|
||||
.attr('id', 'table-footer')
|
||||
.append(
|
||||
$('<div/>')
|
||||
.addClass('pull-left')
|
||||
.append(
|
||||
$('<form/>')
|
||||
.addClass('form-horizontal')
|
||||
.attr('id', 'page-rows-form')
|
||||
.append($('<label/>')
|
||||
.addClass('pull-left control-label')
|
||||
.text('Rows per Page:')
|
||||
)
|
||||
.append(
|
||||
$('<div/>')
|
||||
.addClass('pull-left')
|
||||
.append(
|
||||
$('<select/>')
|
||||
.addClass('form-control')
|
||||
.append(
|
||||
$('<option>', {
|
||||
value: 25,
|
||||
text: 25
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$('<option>', {
|
||||
value: 50,
|
||||
text: 50,
|
||||
selected: 'selected'
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$('<option>', {
|
||||
value: 100,
|
||||
text: 100
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$('<option>', {
|
||||
value: 200,
|
||||
text: 200
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$('<option>', {
|
||||
value: 500,
|
||||
text: 500
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if (tableBody.children('tr').length > pageRowCount) {
|
||||
setPageCount(tableBody);
|
||||
addPages();
|
||||
paginate(tableBody, actualPage);
|
||||
}
|
||||
|
||||
searchTable(tableBody);
|
||||
sortColumn(obj, tableBody);
|
||||
|
||||
$('body').on('click', '.pagination li', function (event) {
|
||||
var listItem;
|
||||
|
||||
if ($(event.target).is("a")) {
|
||||
listItem = $(event.target).parent();
|
||||
} else {
|
||||
listItem = $(event.target).parent().parent();
|
||||
}
|
||||
|
||||
var page = listItem.data('page');
|
||||
|
||||
if (!listItem.hasClass("disabled") && !listItem.hasClass("active")) {
|
||||
paginate(tableBody, page);
|
||||
}
|
||||
});
|
||||
|
||||
$('#page-rows-form').on('change', function () {
|
||||
var options = $(this).find('select');
|
||||
pageRowCount = options.val();
|
||||
|
||||
setPageCount(tableBody);
|
||||
addPages();
|
||||
paginate(tableBody, 1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* the main part of this function is out of this thread http://stackoverflow.com/questions/3160277/jquery-table-sort
|
||||
* @author James Padolsey http://james.padolsey.com
|
||||
* @link http://jsfiddle.net/spetnik/gFzCk/1953/
|
||||
* @param obj
|
||||
*/
|
||||
function sortColumn(obj) {
|
||||
var table = obj;
|
||||
var oldIndex = 0;
|
||||
|
||||
obj
|
||||
.find('thead th')
|
||||
.append(
|
||||
$('<span class="pull-right"/>')
|
||||
// .addClass('')
|
||||
.append(
|
||||
$('<i class=" "/>')
|
||||
.addClass('fa sort-icon')
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
//.wrapInner('<p class="sort-element "/>')
|
||||
.wrapInner('<div class=" "/>')
|
||||
|
||||
.each(function () {
|
||||
|
||||
var th = $(this);
|
||||
var thIndex = th.index();
|
||||
var inverse = false;
|
||||
var addOrRemove = true;
|
||||
|
||||
th.click(function () {
|
||||
|
||||
if($(this).find('.sort-icon').hasClass(arrowDown)) {
|
||||
$(this)
|
||||
.find('.sort-icon')
|
||||
.removeClass( arrowDown )
|
||||
.addClass(arrowUp);
|
||||
|
||||
} else {
|
||||
$(this)
|
||||
.find('.sort-icon')
|
||||
.removeClass( arrowUp )
|
||||
.addClass(arrowDown);
|
||||
}
|
||||
|
||||
if(oldIndex != thIndex) {
|
||||
obj.find('.sort-icon').removeClass(arrowDown);
|
||||
obj.find('.sort-icon').removeClass(arrowUp);
|
||||
|
||||
$(this)
|
||||
.find('.sort-icon')
|
||||
.toggleClass( arrowDown, addOrRemove );
|
||||
}
|
||||
|
||||
table.find('td').filter(function () {
|
||||
|
||||
return $(this).index() === thIndex;
|
||||
|
||||
}).sortElements(function (a, b) {
|
||||
|
||||
return $.text([a]) > $.text([b]) ?
|
||||
inverse ? -1 : 1
|
||||
: inverse ? 1 : -1;
|
||||
|
||||
}, function () {
|
||||
|
||||
// parentNode is the element we want to move
|
||||
return this.parentNode;
|
||||
|
||||
});
|
||||
|
||||
inverse = !inverse;
|
||||
oldIndex = thIndex;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* create li elements for pages
|
||||
*/
|
||||
function addPages() {
|
||||
$('#table-nav').remove();
|
||||
pages = $('<ul/>');
|
||||
|
||||
$.each(new Array(pageCount), function (index) {
|
||||
var additonalClass = '';
|
||||
var page = $();
|
||||
|
||||
if ((index + 1) == 1) {
|
||||
additonalClass = 'active';
|
||||
}
|
||||
|
||||
pages
|
||||
.append($('<li/>')
|
||||
.addClass(additonalClass)
|
||||
.data('page', (index + 1))
|
||||
.append(
|
||||
$('<a/>')
|
||||
.text(index + 1)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* pagination, with pages and previous and next link
|
||||
*/
|
||||
$('#table-footer')
|
||||
.addClass('form-group')
|
||||
.append(
|
||||
$('<nav/>')
|
||||
.addClass('pull-right')
|
||||
.attr('id', 'table-nav')
|
||||
.append(
|
||||
pages
|
||||
.addClass('pagination pull-right')
|
||||
.prepend(
|
||||
$('<li/>')
|
||||
.addClass('disabled')
|
||||
.data('page', 'previous')
|
||||
.append(
|
||||
$('<a href="#" />')
|
||||
.append(
|
||||
$('<span/>')
|
||||
.attr('aria-hidden', 'true')
|
||||
.html('«')
|
||||
)
|
||||
.append(
|
||||
$('<span/>')
|
||||
.addClass('sr-only')
|
||||
.text('Previous')
|
||||
)
|
||||
)
|
||||
)
|
||||
.append(
|
||||
$('<li/>')
|
||||
.addClass('disabled')
|
||||
.data('page', 'next')
|
||||
.append(
|
||||
$('<a href="#" />')
|
||||
.append(
|
||||
$('<span/>')
|
||||
.attr('aria-hidden', 'true')
|
||||
.html('»')
|
||||
)
|
||||
.append(
|
||||
$('<span/>')
|
||||
.addClass('sr-only')
|
||||
.text('Next')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tableBody
|
||||
*/
|
||||
function searchTable(tableBody) {
|
||||
$("#search").on("keyup", function () {
|
||||
$.each(tableBody.find("tr"), function () {
|
||||
|
||||
var text = $(this)
|
||||
.text()
|
||||
.replace(/ /g, '')
|
||||
.replace(/(\r\n|\n|\r)/gm, "");
|
||||
|
||||
var searchTerm = $("#search").val();
|
||||
|
||||
if (text.toLowerCase().indexOf(searchTerm.toLowerCase()) == -1) {
|
||||
$(this)
|
||||
.hide()
|
||||
.removeClass('search-item');
|
||||
} else {
|
||||
$(this)
|
||||
.show()
|
||||
.addClass('search-item');
|
||||
}
|
||||
|
||||
if (searchTerm != '') {
|
||||
activeSearch = true;
|
||||
} else {
|
||||
activeSearch = false;
|
||||
}
|
||||
});
|
||||
|
||||
setPageCount(tableBody);
|
||||
addPages();
|
||||
paginate(tableBody, 1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tableBody
|
||||
*/
|
||||
function setPageCount(tableBody) {
|
||||
if (activeSearch) {
|
||||
pageCount = Math.round(tableBody.children('.search-item').length / pageRowCount);
|
||||
} else {
|
||||
pageCount = Math.round(tableBody.children('tr').length / pageRowCount);
|
||||
}
|
||||
|
||||
if (pageCount == 0) {
|
||||
pageCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tableBody
|
||||
* @param page
|
||||
*/
|
||||
function paginate(tableBody, page) {
|
||||
if (page == 'next') {
|
||||
page = actualPage + 1;
|
||||
} else if (page == 'previous') {
|
||||
page = actualPage - 1;
|
||||
}
|
||||
|
||||
actualPage = page;
|
||||
|
||||
var rows = (activeSearch ? tableBody.find(".search-item") : tableBody.find("tr"));
|
||||
var endRow = (pageRowCount * page);
|
||||
var startRow = (endRow - pageRowCount);
|
||||
var pagination = $('.pagination');
|
||||
|
||||
rows
|
||||
.hide();
|
||||
|
||||
rows
|
||||
.slice(startRow, endRow)
|
||||
.show();
|
||||
|
||||
pagination
|
||||
.find('li')
|
||||
.removeClass('active disabled');
|
||||
|
||||
pagination
|
||||
.find('li:eq(' + page + ')')
|
||||
.addClass('active');
|
||||
|
||||
if (page == 1) {
|
||||
pagination
|
||||
.find('li:first')
|
||||
.addClass('disabled');
|
||||
|
||||
} else if (page == pageCount) {
|
||||
pagination
|
||||
.find('li:last')
|
||||
.addClass('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
}(jQuery));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user