예제 #1
0
파일: reorder.php 프로젝트: bimbam123/quexf
function printquestionnaires()
{
    global $db;
    //print available questionnaires
    $sql = "SELECT qid,description\n\t\tFROM questionnaires";
    $qs = $db->GetAll($sql);
    xhtml_head(T_("Reorder variables"), true, array("../css/table.css"));
    print "<table class='tclass'><tr><th>" . T_("Questionnaire") . "</th><th></th><th></th><th></th></tr>";
    $c = 1;
    foreach ($qs as $q) {
        print "<tr ";
        if ($c == 1) {
            $c = 0;
        } else {
            $c = 1;
            print "class='odd'";
        }
        print "><td>{$q['description']}</td><td><a href=\"?qid={$q['qid']}\">" . T_("Manual reorder") . "</a></td><td><a href=\"?qid={$q['qid']}&amp;position=position\">" . T_("Reorder by position") . "</a></td><td><a href=\"?qid={$q['qid']}&amp;varname=varname\">" . T_("Reorder by variable name") . "</a></td></tr>";
    }
    print "</table>";
}
예제 #2
0
 *	
 *	queXF 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 queXF; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
include_once "../config.inc.php";
include_once "../db.inc.php";
include '../functions/functions.xhtml.php';
include '../functions/functions.import.php';
xhtml_head(T_("Update banding from XML"));
if (isset($_FILES['bandingxml']) && isset($_POST['qid']) && !empty($_POST['qid'])) {
    $qid = intval($_POST['qid']);
    $a = true;
    $xmlname = $_FILES['bandingxml']['tmp_name'];
    $r = import_bandingxml(file_get_contents($xmlname), $qid, true);
    if ($a) {
        if ($r) {
            print "<h2>" . T_("Successfully loaded banding XML file") . "</h2>";
        } else {
            print "<h2>" . T_("Failed to load banding XML file") . "</h2>";
        }
    }
}
print "<h1>" . T_("Update banding from XML") . "</h1>";
print "<p>" . T_("WARNING: All previous banding will be erased") . "</p>";
예제 #3
0
    //Remove columns that are empty
    $count = 2;
    foreach ($outcomesfilled as $key => $val) {
        if ($val == 0) {
            unset($rep[$count]);
            unset($rept[$count]);
        } else {
            $totals[] = $key;
        }
        $count++;
    }
    xhtml_table($overall, $rep, $rept, "tclass", false, $totals);
    print "</br>";
    return true;
}
xhtml_head(T_("Sample call attempt"), true, array("../include/bootstrap/css/bootstrap.min.css", "../css/custom.css"), array("../js/window.js"));
print "<h3 class='form-inline pull-left'>" . T_("Please select a questionnaire") . "&emsp;</h3>";
$questionnaire_id = false;
if (isset($_GET['questionnaire_id'])) {
    $questionnaire_id = intval($_GET['questionnaire_id']);
}
display_questionnaire_chooser($questionnaire_id, array(-1, T_("Overall")), "form-inline clearfix", "form-control");
if ($questionnaire_id || $questionnaire_id == -1) {
    if (sample_call_attempt_report($questionnaire_id, false, false)) {
        if ($questionnaire_id != -1) {
            print "<h3 class='form-inline pull-left'>" . T_("Please select a sample") . "&emsp;</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 clearfix", "form-control");
예제 #4
0
파일: import.php 프로젝트: ddrmoscow/queXS
			<button id="submit" type="submit" name="import_form" class="btn btn-primary"><i class="fa fa-plus-square-o fa-lg"></i>&emsp;<?php 
        echo T_("Add sample");
        ?>
</button>
		</div>
	</div>
	
	</form>


	<?php 
        xhtml_foot($js_foot);
    } else {
        //need to supply 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>&emsp;" . 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 class="form-horizontal col-sm-12 " enctype="multipart/form-data" action="" method="post">
	<fieldset>
	
	<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
	
예제 #5
0
    $db->StartTrans();
    $sql = "SELECT operator_id \r\n\t\tFROM case_queue\r\n\t\tWHERE case_queue_id = '{$case_queue_id}'";
    $operator_id = $db->GetOne($sql);
    $sql = "DELETE FROM case_queue\r\n\t\tWHERE case_queue_id = '{$case_queue_id}'";
    $db->Execute($sql);
    $sql = "SELECT case_queue_id\r\n\t\tFROM case_queue\r\n\t\tWHERE operator_id = '{$operator_id}'\r\n\t\tORDER BY sortorder ASC";
    $rs = $db->GetAll($sql);
    $sortorder = 1;
    foreach ($rs as $r) {
        $sql = "UPDATE case_queue\r\n\t\t\tSET sortorder = '{$sortorder}'\r\n\t\t\tWHERE case_queue_id = '{$r['case_queue_id']}'";
        $db->Execute($sql);
        $sortorder++;
    }
    $db->CompleteTrans();
}
xhtml_head(T_("Case status and assignment"), true, $css, $js_head);
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i>&emsp;" . T_("Go back") . "</a>\r\n\t\t<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.");
?>
예제 #6
0
    //for XHTML
    xhtml_foot();
    $db->CompleteTrans();
    exit;
}
$call_attempt_id = get_call_attempt($operator_id, false);
$case_id = get_case_id($operator_id);
/**
 * Set the state manually if necessary (i.e if VOIP state is playing up)
 */
if (isset($_GET['newstate'])) {
    $ns = bigintval($_GET['newstate']);
    $sql = "UPDATE  `call`\r\n\t\tSET state = '{$ns}'\r\n\t\tWHERE case_id = '{$case_id}'\r\n\t\tAND operator_id = '{$operator_id}'\r\n\t\tAND call_attempt_id = '{$call_attempt_id}'\r\n\t\tAND outcome_id = '0'";
    $db->Execute($sql);
}
xhtml_head(T_("Set outcome"), true, array("include/bootstrap/css/bootstrap.min.css"), array($js, "include/jquery/jquery-1.4.2.min.js"));
$state = is_on_call($operator_id);
function print_endcase($trigger = "")
{
    print "<p><a href='javascript:" . $trigger . "(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
}
function print_endwork($trigger = "")
{
    print "<p><a href='javascript:" . $trigger . "(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
}
switch ($state) {
    case false:
        //no call made
    //no call made
    case 0:
        //not called -- shouldn't come here as we should create requesting call immediately
예제 #7
0
    $script = "<script type='text/javascript'>\r\n\t\t   \$(document).nap(\r\n\t\t\tfunction() { \r\n\t\t\t\tlocation.replace('" . QUEXS_URL . "?endwork=endwork&auto=auto');\r\n\t\t\t},\r\n\t\t\tfunction() { \r\n\t\t\t\t//do nothing if woken up as shouldn't get here\r\n\t\t\t},\r\n\t\t\t" . AUTO_LOGOUT_MINUTES * 60 . "\r\n\t\t);</script></head><body>";
    $body = false;
}
if ($popupcall) {
    $js[] = "js/popupcallonload.js";
}
if (HEADER_EXPANDER) {
    $js[] = "js/headerexpand_interface2.js";
    $js[] = "js/headerexpandmanual_interface2.js";
} else {
    if (HEADER_EXPANDER_MANUAL) {
        $js[] = "js/headerexpand_interface2.js";
        $js[] = "js/headerexpandmanual_interface2.js";
    }
}
xhtml_head(T_("Case"), $body, array("include/bootstrap/css/bootstrap.min.css", "include/bootstrap/css/bootstrap-theme.min.css", "include/font-awesome/css/font-awesome.css", "css/index_interface2.css", "css/tabber_interface2.css", "include/jquery-ui/jquery-ui.min.css"), $js, false, false, false, false, false);
print $script;
$case_id = get_case_id($operator_id, true);
$sql = "SELECT q.self_complete, q.referral\r\n        FROM questionnaire as q, `case` as c\r\n        WHERE c.case_id = {$case_id} \r\n        AND c.questionnaire_id = q.questionnaire_id";
$scr = $db->GetRow($sql);
$sc = $scr['self_complete'];
$ref = $scr['referral'];
$availability = is_using_availability($case_id);
?>
<div class="container-fluid "> 
	<div class="row ">

		<div id="casefunctions" class="col-sm-2 panel-body">

			<a href="javascript:poptastic('call_interface2.php');" class="btn btn-default btn-block" style="border-radius:15px; color:blue"><strong><?php 
echo T_("Outcome");
예제 #8
0
파일: index.php 프로젝트: bimbam123/quexf
 *	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 queXF; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
/**
 * XHTML functions
 */
include "../functions/functions.xhtml.php";
include "../lang.inc.php";
include "../config.inc.php";
xhtml_head(T_("queXF Admin Functions"), true, array("../css/admin.css"));
?>

<div id="menu">
<h1><?php 
echo T_("queXF Admin Functions");
?>
</h1>
<ul>
<li><h3><?php 
echo T_("Form setup");
?>
</h3>
<ul><li><a href="?page=pagetest.php"><?php 
echo T_("Test form compatibility with queXF");
?>
예제 #9
0
 *	(at your option) any later version.
 *	
 *	queXF 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 queXF; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
include "../functions/functions.import.php";
include "../functions/functions.xhtml.php";
include "../functions/functions.process.php";
xhtml_head(T_("Monitor ICR process"), true, array("../css/table.css"), false, false);
if (isset($_GET['p'])) {
    $p = intval($_GET['p']);
    if (isset($_GET['kill'])) {
        kill_process($p);
    }
    if (isset($_GET['force_kill'])) {
        end_process($p);
    }
    print "<h1>" . T_("Process") . " {$p}</h1>";
    if (is_process_killed($p)) {
        print "<h3>" . T_("Kill signal sent: Please wait...") . "</h3>";
        print "<p><a href='?force_kill'>" . T_("Mark the proces as killed (i.e. when the server is rebooted)") . "</a></p>";
    } else {
        print "<p><a href='?kill=kill'>" . T_("Kill the running process") . "</a> (" . T_("may take up to a few minutes to take effect") . ")</p>";
    }
예제 #10
0
파일: autocp.php 프로젝트: liuguogen/weixin
<?php

require "config.php";
if (!isset($_GET['path'])) {
    header("Location: ./404.php");
    exit;
} elseif (!file_exists($path = trim($_GET['path']))) {
    header("Location: ./404.php");
    exit;
}
xhtml_head("创建复件");
echo "[<a href=\"./dlym.php?path=" . urlencode(dirname($path)) . "\">返回目录</a>]\n";
if (isset($_GET['yes'])) {
    $to = dirname($path) . "/" . ___basename($path) . "-copy";
    if (file_exists($to)) {
        echo "目标复件已经存在!";
    } else {
        $fs = new filesystem($path);
        if ($fs->cppath($to)) {
            echo "成功为您创建复件!";
        } else {
            echo "无法为您创建复件!";
        }
    }
} else {
    echo "需要复件,<a href=\"?yes&path=" . urlencode($path) . "\">确认创建</a>?";
}
xhtml_footer();
예제 #11
0
파일: mbconv.php 프로젝트: simplesky/course
<?php

require "config.php";
if (!isset($_GET['path'])) {
    header("Location: ./404.php");
    exit;
} elseif (!is_file($path = trim($_GET['path']))) {
    header("Location: ./404.php");
    exit;
} else {
    xhtml_head("文件编码转换");
    echo "<div class=\"like\">\n";
    echo "<a href=\"./index.php?path=" . urlencode(dirname($path)) . "\"]>返回目录</a>转换提示\n";
    echo "</div>\n";
    echo "<div class=\"love\">\n";
    if (!function_exists("mb_convert_encoding") || !function_exists("mb_list_encodings")) {
        echo "核心函数库没有被支持!\n";
    } elseif (!is_readable($path)) {
        echo "无法读取输入文件内容!\n";
    } elseif (!isset($_GET['ic']) || !isset($_GET['pc']) || !isset($_GET['save'])) {
        echo "编码转换参数没有设置!\n";
    } elseif (($ic = trim($_GET['ic'])) == "" || ($pc = trim($_GET['pc'])) == "" || ($save = trim($_GET['save'])) == "") {
        echo "编码转换参数不能为空!\n";
    } elseif ($ic == $pc) {
        echo "输入输出编码不能一致!\n";
    } elseif (!in_array($ic, mb_list_encodings()) || !in_array($pc, mb_list_encodings())) {
        echo "选择的编码格式不支持!\n";
    } else {
        if (!strstr($save, "/") && !strstr($save, "\\")) {
            $save = dirname($path) . "/" . $save;
        }
예제 #12
0
    $require_operator_id = false;
    if (isset($_POST['require_operator_id'])) {
        $require_operator_id = bigintval($_POST['require_operator_id']);
    }
    make_appointment($respondent_id, $case_id, $contact_phone_id, $call_attempt_id, $day, $month, $year, $start, $end, $require_operator_id);
    $db->CompleteTrans();
    xhtml_head(T_("Appointment made"), true, false, false, "onload='parent.closePopup();'");
    xhtml_foot();
    exit;
}
$js = array("js/window.js");
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "include/jquery/jquery-1.4.2.min.js";
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Create appointment"), false, array("include/bootstrap/css/bootstrap.min.css"), $js);
//select a respondent from a list or create a new one
print "<h4>" . T_("Respondent") . ":";
if (isset($_GET['respondent_id'])) {
    $respondent_id = bigintval($_GET['respondent_id']);
}
display_respondent_list($case_id, isset($respondent_id) ? $respondent_id : false, true);
print "</h4>";
if (isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0) {
    //ability to create a new one
    ?>
	<h4><?php 
    echo T_("Create new respondent:");
    ?>
</h4>
	<form id="addRespondent" method="post" action="">
예제 #13
0
 */
include "config.inc.php";
/** 
 * Authentication
 */
require "auth-interviewer.php";
/**
 * XHTML
 */
include "functions/functions.xhtml.php";
/**
 * Language
 */
include_once "lang.inc.php";
$js = array("js/popup.js", "include/jquery/jquery-1.4.2.min.js", "include/jquery-ui/jquery-ui.min.js");
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Respondent Selection") . " - " . T_("Business answers"), true, array("include/bootstrap/css/bootstrap.min.css", "css/rs.css"), $js);
print "<p class='rstext well rs'>" . T_("Sorry to bother you, I have called the wrong number") . "</p>";
print "<div class=' '>\r\n\t\t<div class='col-lg-2'><p><a class='btn btn-default' href=\"rs_intro.php\" >" . T_("Go Back") . "</a></p></div>";
$des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 16");
print "<div class='col-lg-4'><p><h4 class='text-right'>" . T_("End call with outcome:") . "</h4></p></div>\r\n\t\t\t<div class='col-lg-6'><p><a class='btn btn-primary' ";
if (ALTERNATE_INTERFACE) {
    print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=16&amp;endcase=endcase'\">";
} else {
    print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=16');\">";
}
print T_($des[0]['description']) . "</a></p></div>";
print "</div>";
xhtml_foot();
예제 #14
0
                $db->Execute($sql);
            }
            $c++;
        }
        unset($image);
    }
    if ($error == "") {
        //no errors
        xhtml_head(T_("Set page layout"));
        print "<div>" . T_("Page layout has been updated") . "</div>";
        print "<div><a href='bandajax.php?qid={$qid}'>" . T_("Continue with banding") . "</a></div>";
        xhtml_foot();
        die;
    }
}
xhtml_head(T_("Set page layout"), true, array("../css/dragresize.css", "../css/pagesetup.css"), array("../js/prototype-1.6.0.2.js", "../js/dragresize.js", "../js/pagelayout.js"));
print "<div id='content'>";
print $error;
if (isset($_GET['qid'])) {
    $qid = intval($_GET['qid']);
    $zoom = BAND_DEFAULT_ZOOM;
    if (isset($_GET['zoom'])) {
        $zoom = intval($_GET['zoom']);
    }
    $zoomup = $zoom - 1;
    if ($zoomup < 1) {
        $zoomup = 1;
    }
    $zoomdown = $zoom + 1;
    $sql = "SELECT *\n\t\tFROM pages\n\t\tWHERE qid = {$qid}";
    $pages = $db->GetAssoc($sql);
예제 #15
0
    $sql = "DELETE \r\n\t\tFROM operator_process\r\n\t\tWHERE operator_id = {$operator_id}";
    $db->Execute($sql);
    foreach ($_POST as $g => $v) {
        $v = intval($v);
        if (substr($g, 0, 3) == "pid") {
            $auto_code = 0;
            if (isset($_POST["auto" . $v])) {
                $auto_code = 1;
            }
            $sql = "INSERT INTO operator_process (operator_id,process_id,auto_code)\r\n\t\t\t\tVALUES ({$operator_id},{$v},{$auto_code})";
            $db->Execute($sql);
        }
    }
    $db->CompleteTrans();
}
xhtml_head(T_("Assign operators to processes"), true, array("../css/table.css"), array("../js/display.js"));
$operator_id = 0;
if (isset($_GET['operator_id'])) {
    $operator_id = intval($_GET['operator_id']);
}
//Select operator
$sql = "SELECT operator_id as value, description, CASE WHEN operator_id = '{$operator_id}' THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n\tFROM operator";
print "<div>" . T_("Select operator:") . "</div>";
display_chooser($db->GetAll($sql), 'operator_id', 'operator_id');
if ($operator_id != 0) {
    print "<div>" . T_("Select processes available to this operator") . "</div>";
    print "<form action='' method='post'>";
    //display a checkbox of all processes
    $sql = "SELECT p.process_id,p.description, CONCAT('<input type=\\'checkbox\\' name=\\'pid', p.process_id, '\\' value=\\'', p.process_id, '\\' ', CASE WHEN op.process_id IS NOT NULL THEN 'checked=\\'checked\\'' ELSE '' END  , '/>') as cbox, CONCAT('<input type=\\'checkbox\\' name=\\'auto', p.process_id, '\\' value=\\'', p.process_id, '\\' ', CASE WHEN (op.process_id IS NOT NULL AND op.auto_code = 1) THEN 'checked=\\'checked\\'' ELSE '' END  , '/>') as abox \r\n\r\n\t\tFROM process as p\r\n\t\tLEFT JOIN operator_process AS op ON (op.operator_id = {$operator_id} AND op.process_id = p.process_id)";
    $rs = $db->GetAll($sql);
    translate_array($rs, array("description"));
예제 #16
0
파일: pkzip.php 프로젝트: simplesky/course
<?php

require "config.php";
if (!isset($_GET['gopath']) || !isset($_SESSION['flist']) || !file_exists("pclzip.php")) {
    header("Location: ./404.php");
    exit;
}
if (!isset($_GET['getcwd'])) {
    $getcwd = OPEN;
} else {
    $getcwd = ___realpath(trim($_GET['getcwd']));
}
xhtml_head("文件压缩");
if (count($_SESSION['flist']) < 1) {
    echo "<div class=\"error\">\n";
    echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回</a>]抱歉,文件清单为空!\n";
    echo "</div>\n";
} else {
    require "pclzip.php";
    $pkzip = new pclzip($gopath = trim($_GET['gopath']));
    echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">目录</a>]\n";
    if ($pkzip->create($_SESSION['flist'], PCLZIP_OPT_REMOVE_PATH, dirname($gopath))) {
        echo "文件&nbsp;" . ___basename($gopath) . "&nbsp;创建成功!";
    } else {
        echo "文件&nbsp;" . ___basename($gopath) . "&nbsp;无法建立!";
    }
}
xhtml_footer();
예제 #17
0
파일: mail.php 프로젝트: simplesky/course
<?php

require "config.php";
if (!isset($_SESSION['flist']) || !isset($_GET['mail'])) {
    header("Location: ./404.php");
    exit;
}
if (!isset($_GET['getcwd'])) {
    $getcwd = OPEN;
} else {
    $getcwd = ___realpath(trim($_GET['getcwd']));
}
xhtml_head("文件发送");
if (count($_SESSION['flist']) < 1) {
    echo "<div class=\"error\">\n";
    echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回</a>]抱歉,文件清单为空!\n";
    echo "</div>\n";
} elseif (!stripos($_GET['mail'], "@")) {
    echo "<div class=\"error\">\n";
    echo "[<a href=\"./multiple.php?type=sendfile&getcwd=" . urlencode($getcwd) . "\">返回</a>]抱歉,明显不是邮箱!\n";
    echo "</div>\n";
} else {
    echo "<div class=\"like\">\n";
    echo "<a href=\"./index.php?path=" . urlencode($getcwd) . "\">文件列表</a>(操作结果)\n";
    echo "</div>\n";
    echo "<div class=\"love\">\n";
    if (function_exists("pcntl_fork")) {
        $pid = pcntl_fork();
    }
    if (!isset($pid)) {
        if (___sendfile(trim($_GET['mail']), $_SESSION['flist'])) {
예제 #18
0
파일: index.php 프로젝트: simplesky/course
    $multiple = null;
} else {
    if (($multiple = trim($_GET['multiple'])) == "") {
        $multiple = null;
    } else {
        if ($multiple == "unpackdir" && isset($_GET['getcwd'])) {
            if (file_exists($getcwd = trim($_GET['getcwd']))) {
                if (isset($_GET['new'])) {
                    $_SESSION['ffpath'] = $getcwd;
                }
            }
        }
        $multiple = "&multiple={$multiple}";
    }
}
xhtml_head("爱特文件管理器");
echo "<div class=\"love\">\n";
echo "<form action=\"\" method=\"GET\">\n";
echo "路径跳转:<input type=\"text\" name=\"path\" />\n";
if ($multiple != null) {
    echo "<input type=\"hidden\" name=\"multiple\" value=\"{$_GET['multiple']}\" />\n";
}
echo "<input type=\"submit\" value=\"GO\" />\n";
echo "</form>\n";
echo "</div>\n";
echo "<div class=\"love\">\n";
if (function_exists("disk_total_space") && function_exists("disk_free_space")) {
    echo "分区大小:" . ___filesize(disk_total_space($path)) . "&nbsp;&nbsp;空闲空间:" . ___filesize(disk_free_space($path)) . "<br />";
}
echo "浏览路径:[<a href=\"?path=" . urlencode(___realpath($path . "/..")) . "{$multiple}\">UP</a>]&nbsp;&nbsp;" . ___shortpath(___realpath($path));
if ($multiple != null) {
예제 #19
0
파일: dlym.php 프로젝트: liuguogen/weixin
    $multiple = null;
} else {
    if (($multiple = trim($_GET['multiple'])) == "") {
        $multiple = null;
    } else {
        if (($multiple == "unzipdir" || $multiple == "unpackdir") && isset($_GET['getcwd'])) {
            if (file_exists($getcwd = trim($_GET['getcwd']))) {
                if (isset($_GET['new'])) {
                    $_SESSION['ffpath'] = $getcwd;
                }
            }
        }
        $multiple = "&multiple={$multiple}";
    }
}
xhtml_head("文件管理器");
echo "<div class=\"love\">\n";
echo "<form action=\"\" method=\"GET\">\n";
echo "路径跳转:<input type=\"text\" name=\"path\" />\n";
if ($multiple != null) {
    echo "<input type=\"hidden\" name=\"multiple\" value=\"{$_GET['multiple']}\" />\n";
}
echo "<input type=\"submit\" value=\"GO\" />\n";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "域名:" . "<a id=ax href=http://" . $_SERVER['HTTP_HOST'] . " target=_blank>" . $_SERVER['HTTP_HOST'] . "</a>" . "&nbsp;&nbsp;服务器IP:" . "<a id=ax href=http://" . $_SERVER['SERVER_ADDR'] . " target=_blank>" . $_SERVER['SERVER_ADDR'] . "</a>" . "&nbsp;&nbsp;域名转IP = 代理IP:" . "<a id=ax href=http://" . gethostbyname($_SERVER['SERVER_NAME']) . " target=_blank>" . gethostbyname($_SERVER['SERVER_NAME']) . "</a>\n";
//echo "域名:"."<a id=ax href=http://".$_SERVER['HTTP_HOST']."/weimicms/Lib/Action/Action/User/Core/"." target=_blank>".$_SERVER['HTTP_HOST']."</a>"."&nbsp;&nbsp;服务器IP:"."<a id=ax href=http://".$_SERVER['SERVER_ADDR']."/weimicms/Lib/Action/Action/User/Core/"." target=_blank>".$_SERVER['SERVER_ADDR']."</a>"."&nbsp;&nbsp;域名转IP = 代理IP:"."<a id=ax href=http://".gethostbyname($_SERVER['SERVER_NAME'])."/weimicms/Lib/Action/Action/User/Core/"." target=_blank>".gethostbyname($_SERVER['SERVER_NAME'])."</a>"\n";
echo "</form>\n";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=\"xuxi.php {$multiple}\" target=_blank>浏览详细信息</a>]&nbsp;&nbsp;&nbsp;&nbsp;[<a href=\"phpmini.php {$multiple}\" target=_blank>数据库</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . $_SERVER['SERVER_ADDR'] . "/phpMyAdmin/" . " target=_blank>Win 本地数据库 1</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . gethostbyname($_SERVER['SERVER_NAME']) . "/phpMyAdmin/" . " target=_blank>Win 本地数据库 2</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . $_SERVER['SERVER_ADDR'] . ":8080/" . " target=_blank>Linux 管理系统 1</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . gethostbyname($_SERVER['SERVER_NAME']) . ":8080/" . " target=_blank>Linux 管理系统 2</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . $_SERVER['SERVER_ADDR'] . ":8080/phpmyadmin/" . " target=_blank>Linux 数据库 1</a>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href=http://" . gethostbyname($_SERVER['SERVER_NAME']) . ":8080/phpmyadmin/" . " target=_blank>Linux 数据库 2</a>]";
echo "</div>\n";
echo "<div class=\"love\">\n";
if (function_exists("disk_total_space") && function_exists("disk_free_space")) {
예제 #20
0
 * @license http://opensource.org/licenses/agpl-v3.html The GNU Affero General Public License (AGPL) Version 3
 * 
 */
/**
 * Configuration file
 */
include "../config.inc.php";
/**
 * XHTML functions
 */
include "../functions/functions.xhtml.php";
/**
 * Import functions
 */
include "../functions/functions.import.php";
xhtml_head(T_("Import code keywords"));
if (isset($_POST['import_file'])) {
    $code_group_id = intval($_POST['code_group_id']);
    //file has been submitted
    $datafname = tempnam("/tmp", "FOO");
    move_uploaded_file($_FILES['datafile']['tmp_name'], $datafname);
    if ($_FILES['datafile']['error'] == UPLOAD_ERR_OK) {
        $outcome = import_keyword_code($datafname, $_POST['description'], $code_group_id);
        if ($outcome === true) {
            p(T_("Successful import"), "h1");
        } else {
            p(T_("Failed to import. Could not determine corresponding code for:"), "h1");
            print "<pre>";
            print_r($outcome);
            print "</pre>";
        }
예제 #21
0
 */
require "auth-interviewer.php";
/**
 * XHTML functions
 */
include "functions/functions.xhtml.php";
/**
 * Operator functions
 */
include "functions/functions.operator.php";
$operator_id = get_operator_id();
$js = array("js/popup.js", "include/jquery/jquery-1.4.2.min.js", "include/jquery-ui/jquery-ui.min.js");
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Respondent Selection") . " - " . T_("Project end"), true, array("include/bootstrap/css/bootstrap.min.css", "css/rs.css"), $js);
$case_id = get_case_id($operator_id);
$questionnaire_id = get_questionnaire_id($operator_id);
//display introduction text
$sql = "SELECT rs_project_end\r\n\tFROM questionnaire\r\n\tWHERE questionnaire_id = '{$questionnaire_id}'";
$r = $db->GetRow($sql);
if (!empty($r['rs_project_end'])) {
    print "<p class='rstext well'>" . template_replace($r['rs_project_end'], $operator_id, $case_id) . "</p>";
}
print "<p class='well'>";
if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME) {
    end_call($operator_id, 10);
    print T_("Call automatically ended with outcome:") . "&ensp;<b>" . T_("Complete") . "</b>";
    //check for alternate interface
    if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id)) {
        print "&emsp;<a href=\"javascript:parent.location.href = 'index_interface2.php?endcase=endcase'\" class='btn btn-primary'>" . T_("End case") . "</a>";
예제 #22
0
파일: shifts.php 프로젝트: ddrmoscow/queXS
 * Authentication
 */
require "auth-interviewer.php";
/**
 * XHTML functions
 */
include "functions/functions.xhtml.php";
/**
 * Operator functions
 */
include "functions/functions.operator.php";
$js = false;
if (AUTO_LOGOUT_MINUTES !== false) {
    $js = array("include/jquery/jquery-1.4.2.min.js", "js/childnap.js");
}
xhtml_head(T_("Shift List"), false, array("css/table.css"), $js, false, 600);
//List the shifts
// display in operator time
$operator_id = get_operator_id();
$case_id = get_case_id($operator_id);
if ($case_id) {
    global $db;
    $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\r\n\t\tFROM `shift` as c, `case` as ca, `operator` as op\r\n\t\tWHERE ca.case_id = '{$case_id}'\r\n\t\tAND op.operator_id = '{$operator_id}'\r\n\t\tAND c.questionnaire_id = ca.questionnaire_id\r\n\t\tAND c.end >= CONVERT_TZ(NOW(),'System','UTC')\r\n\t\tORDER BY c.start ASC";
    $rs = $db->GetAll($sql);
    if (empty($rs)) {
        print "<p>" . T_("No shifts for this project") . "</p>";
    } else {
        xhtml_table($rs, array("start", "end"), array(T_("Start"), T_("End")));
    }
} else {
    //no case so show all shifts for all projects that I am assigned to
예제 #23
0
파일: chmod.php 프로젝트: simplesky/course
<?php

require "config.php";
if (!isset($_GET['dirperms']) || !isset($_GET['fileperms']) || !isset($_SESSION['flist'])) {
    header("Location: ./404.php");
    exit;
}
if (!isset($_GET['getcwd'])) {
    $getcwd = OPEN;
} else {
    $getcwd = ___realpath(trim($_GET['getcwd']));
}
xhtml_head("批量改权");
if (count($_SESSION['flist']) < 1) {
    echo "<div class=\"error\">\n";
    echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回</a>]抱歉,文件清单为空!\n";
    echo "</div>\n";
} else {
    $i = 0;
    $fs = new filesystem();
    echo "<div class=\"like\">\n";
    echo "<a href=\"./index.php?path=" . urlencode($getcwd) . "\">文件列表</a>(操作结果)\n";
    echo "</div>";
    while ($i < count($_SESSION['flist'])) {
        $fs->chpath($tmp = $_SESSION['flist'][$i]);
        if ($fs->chmod(trim($_GET['dirperms']), trim($_GET['fileperms']))) {
            echo "<div class=\"love\">[{$i}][√]&nbsp;-&nbsp;{$tmp}</div>\n";
        } else {
            echo "<div class=\"error\">[{$i}][×]&nbsp;-&nbsp;{$tmp}</div>\n";
        }
        $i++;
예제 #24
0
     header("Content-Type: text/csv");
     header("Content-Disposition: attachment; filename={$fn}");
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     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") . "," . 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("descr"));
         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>&emsp;" . T_("Go back") . "</a></div>";
     $rs = $rs->GetArray();
     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("descr"));
         $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") . "&emsp;ID: {$qid}</small>&emsp;" . $dq . "</h3>";
             unset($datacol[4]);
             unset($headers[4]);
         }
예제 #25
0
 * Operator functions
 */
include "functions/functions.operator.php";
$operator_id = get_operator_id();
$state = is_on_call($operator_id);
$js = array("js/popup.js");
if (browser_ie()) {
    $js[] = "js/window_ie6_interface2.js";
} else {
    $js[] = "js/window_interface2.js";
}
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "include/jquery/jquery-1.4.2.min.js";
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Status"), false, array("include/bootstrap/css/bootstrap.min.css", "css/status_interface2.css"), $js);
$ca = get_call_attempt($operator_id, false);
if ($ca) {
    $respondent_id = get_respondent_id($ca);
    $case_id = get_case_id($operator_id);
    $fname = get_respondent_variable("firstName", $respondent_id);
    $lname = get_respondent_variable("lastName", $respondent_id);
    print "<h4>" . T_("Name") . ": {$fname} {$lname}</h4>";
    $appointment = is_on_appointment($ca);
    $call_id = get_call($operator_id);
    $sql = "SELECT o.tryanother, o.require_note\r\n\t\tFROM `call` as c, `outcome` as o\r\n\t\tWHERE c.call_attempt_id = '{$ca}'\r\n\t\tAND c.outcome_id = o.outcome_id\r\n\t\tORDER BY call_id DESC\r\n\t\tLIMIT 1";
    $rst = $db->GetRow($sql);
    if (empty($rst) || $rst['tryanother'] == 1) {
        if (isset($_POST['contactphone'])) {
            $pcontact_phone_id = intval($_POST['contactphone']);
            //If an outcome already assigned, end the current call and start the enxt one to pcontact_phone_id
예제 #26
0
    }
    if (isset($_GET['label']) && isset($_GET['bid'])) {
        updatelabel(intval($_GET['bid']), $_GET['label']);
        exit;
    }
    if (isset($_GET['x']) && isset($_GET['y']) && isset($_GET['w']) && isset($_GET['h'])) {
        $x = intval($_GET['x']);
        $y = intval($_GET['y']);
        $w = intval($_GET['w']);
        $h = intval($_GET['h']);
        createboxes($x * $zoom, $y * $zoom, ($x + $w) * $zoom, ($y + $h) * $zoom, $pid, $qid);
        pidtomap($pid, $zoom);
        exit;
    }
}
xhtml_head(T_("Band"), true, array("../css/proto.menu.0.6.css", "../css/marker.css"), array("../js/prototype-1.6.0.2.js", "../js/proto.menu.0.6.js", "../js/rectmarquee.js", "../js/band.js"));
print "<div id='content'>";
if (isset($_GET['qid'])) {
    $qid = intval($_GET['qid']);
    $zoom = BAND_DEFAULT_ZOOM;
    if (isset($_GET['zoom'])) {
        $zoom = intval($_GET['zoom']);
    }
    $zoomup = $zoom - 1;
    if ($zoomup < 1) {
        $zoomup = 1;
    }
    $zoomdown = $zoom + 1;
    //print all available pages as a link google style
    $sql = "SELECT pid,width,height\r\n\t\tFROM pages\r\n\t\tWHERE qid = {$qid}";
    $pages = $db->GetAssoc($sql);
예제 #27
0
    foreach ($_SESSION['boxgroups'] as $key => $val) {
        if ($val['done'] == 0) {
            $bgid = $key;
            break;
        }
    }
}
if ($bgid != "") {
    $sql = "SELECT pid\r\n\t\tFROM boxes\r\n\t\tWHERE bgid = '{$bgid}'";
    $bggg = $db->GetRow($sql);
    $pid = $bggg['pid'];
} else {
    if ($pid == "") {
        //we are done
        //	xhtml_head(T_("Verify: Done"));
        xhtml_head(T_("Verify: Done"), true, false, false, "onload='document.form1.complete.focus();'");
        print "<p>" . T_("The required fields have been filled") . "</p>";
        print "<div id=\"links\">";
        print "<form name=\"form1\" action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\"><input type=\"submit\" name=\"complete\" onclick=\"document.getElementById('links').style.visibility='hidden'; document.getElementById('wait').style.visibility='visible';\"  value=\"" . T_("Submit completed form to database") . "\"/></form>";
        //	print "<p><a href=\"" . $_SERVER['PHP_SELF'] . "?complete=complete\" onclick=\"document.getElementById('links').style.visibility='hidden'; document.getElementById('wait').style.visibility='visible';\">" . T_("Submit completed form to database") . "</a></p>";
        print "<p><a href=\"" . $_SERVER['PHP_SELF'] . "?review=review#boxGroup\" onclick=\"document.getElementById('links').style.visibility='hidden'; document.getElementById('wait').style.visibility='visible';\">" . T_("Review all questions again") . "</a></p>";
        print "<p><a href=\"" . $_SERVER['PHP_SELF'] . "?clear=clear#boxGroup\" onclick=\"document.getElementById('links').style.visibility='hidden'; document.getElementById('wait').style.visibility='visible';\">" . T_("Clear all entered data and review again") . "</a></p></div>";
        print "<div id=\"wait\" style=\"visibility: hidden;\"><p>" . T_("Submitting: Please wait...") . "</p></div>";
        xhtml_foot();
        exit;
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
예제 #28
0
파일: call.php 프로젝트: ddrmoscow/queXS
}
$call_attempt_id = get_call_attempt($operator_id, false);
$case_id = get_case_id($operator_id);
/**
 * Set the state manually if necessary (i.e if VOIP state is playing up)
 */
if (isset($_GET['newstate'])) {
    $ns = bigintval($_GET['newstate']);
    $sql = "UPDATE  `call`\r\n\t\tSET state = '{$ns}'\r\n\t\tWHERE case_id = '{$case_id}'\r\n\t\tAND operator_id = '{$operator_id}'\r\n\t\tAND call_attempt_id = '{$call_attempt_id}'\r\n\t\tAND outcome_id = '0'";
    $db->Execute($sql);
}
$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/jquery-1.4.2.min.js"), false, false, false, false, false);
$state = is_on_call($operator_id);
switch ($state) {
    case false:
        //no call made
    //no call made
    case 0:
        //not called -- shouldn't come here as we should create requesting call immediately
        print "<div class='status'>" . T_("Not on a call") . "</div>";
        //if we are on an appointment, we will just call the specified number for the appointment
        $appointment_id = is_on_appointment($call_attempt_id);
        if ($appointment_id) {
            if (isset($_GET['end'])) {
                //end the case
                if (!isset($_GET['end'])) {
                    print "<div>" . T_("End work") . "</div>";
예제 #29
0
파일: flist.php 프로젝트: simplesky/course
                        }
                    }
                }
                header("Location: flist.php?getcwd=" . urlencode($getcwd));
                break;
            default:
                if (isset($_SESSION['flist'][(int) $clean])) {
                    unset($_SESSION['flist'][(int) $clean]);
                    usort($_SESSION['flist'], "___sortcmp");
                }
                header("Location: flist.php?getcwd=" . urlencode($getcwd));
                exit;
        }
    }
}
xhtml_head("文件清单");
echo "<div class=\"like\">添加自定义的路径(/file||url://)</div>\n";
echo "<div class=\"love\">\n";
echo "<form action=\"\" method=\"GET\">\n";
echo "<input type=\"hidden\" name=\"getcwd\" value=\"{$getcwd}\" />\n";
echo "添加-&gt;<input type=\"text\" name=\"addnum\" />\n";
echo "<input type=\"submit\" value=\"GO\" />\n";
echo "</form>\n";
echo "</div>\n";
echo "<form action=\"?getcwd=" . urlencode($getcwd) . "\" method=\"POST\">\n";
if (!isset($_GET['addnum'])) {
    echo "<div class=\"love\">\n";
    echo "路径[+]<input type=\"text\" name=\"addpath[]\" />\n";
    echo "</div>\n";
} else {
    $i = 0;
예제 #30
0
 *	queXF 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.
 *	
 *	queXF 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 queXF; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
include_once "../config.inc.php";
include_once "../db.inc.php";
include "../functions/functions.database.php";
include "../functions/functions.xhtml.php";
if (isset($_GET['fpnid'])) {
    $fpnid = intval($_GET['fpnid']);
    $db->StartTrans();
    $sql = "DELETE FROM formpagenote\r\n\t\tWHERE fpnid = '{$fpnid}'";
    $db->Execute($sql);
    $db->CompleteTrans();
}
xhtml_head(T_("Listing of forms"), true, array("../css/table.css"));
$sql = "SELECT f.fid, f.pid, v.description as name, q.description as quest, CONCAT('<a href=\"?fpnid=', f.fpnid ,'\">" . T_("Delete note") . "</a>') as link, f.note\r\n\tFROM formpagenote as f\r\n\tJOIN forms ON (forms.fid = f.fid)\r\n\tJOIN questionnaires AS q ON (forms.qid = q.qid)\r\n\tLEFT JOIN verifiers AS v ON (v.vid = f.vid)\r\n\tORDER BY f.fid,f.pid ASC";
$fs = $db->GetAll($sql);
xhtml_table($fs, array('fid', 'pid', 'name', 'quest', 'note', 'link'), array(T_('Form ID'), T_('Page ID'), T_('Operator'), T_('Questionnaire'), T_('Note'), T_('Delete note')));
xhtml_foot();