Ejemplo n.º 1
0
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="">
	<?php 
    display_respondent_form();
    ?>
	<p><input type="submit" class="btn btn-primary" value="<?php 
    echo T_("Add this respondent");
    ?>
"/></p>
	</form>
	<?php 
} else {
    if ($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") . ":&ensp;" . $ct['tzn'] . "&emsp;" . T_("Current Time") . ":&ensp;<b class=\"fa text-primary\">" . $ct['tme'] . "</b></p>";
        if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['y'])) {
            $day = bigintval($_GET['d']);
            $month = bigintval($_GET['m']);
Ejemplo n.º 2
0
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Contact details"), false, array("css/table.css", "css/respondent_interface2.css"), $js);
global $db;
$db->StartTrans();
$operator_id = get_operator_id();
$call_attempt_id = get_call_attempt($operator_id, false);
$case_id = get_case_id($operator_id);
if (isset($_POST['submit'])) {
    add_respondent($case_id, $_POST['firstName'], $_POST['lastName'], $_POST['Time_zone_name']);
}
if (isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0) {
    ?>
	<form method="post" action="?">
	<?php 
    display_respondent_form(false, $case_id);
    ?>
	<div class="text"><input type='submit' name='submit' id='submit' value='<?php 
    echo T_("Add respondent");
    ?>
'/></div>
	</form>
	<div><a href="?"><?php 
    echo T_("Go back");
    ?>
</a></div>

<?php 
} else {
    print "<div class='text'>" . T_("Case id:") . " {$case_id}</div>";
    print "<div class='text'>" . T_("Respondent:");