Example #1
0
}
$other_wheree = '';
foreach ($where as $key => $value) {
    if ($key != 'from_sample_id' && $key != 'to_sample_id') {
        $other_wheree = $other_wheree . ' ' . $key . ' like \'' . $value . '\' and';
    }
}
$other_where = substr($other_wheree, 0, -3);
if (strlen($sample_id_where) > 0 && strlen($other_where) > 0) {
    $search_str = $search_str . ' where ' . $sample_id_where . ' and ' . $other_where;
} elseif (strlen($sample_id_where) > 0 && strlen($other_where) == 0) {
    $search_str = $search_str . ' where ' . $sample_id_where;
} elseif (strlen($sample_id_where) == 0 && strlen($other_where) > 0) {
    $search_str = $search_str . ' where ' . $other_where;
}
if (isset($_POST['submit']) && substr($search_str, -7) != 'sample ') {
    $link = start_nchsls();
    if (!($search_result = mysql_query($search_str, $link))) {
        echo mysql_error();
    }
    while ($ar = mysql_fetch_assoc($search_result)) {
        autoverify($ar['sample_id'], '', 'no');
        //no action
        autoverify($ar['sample_id'], 'autoverify_action.php', 'yes');
        //action
        print_sample($ar['sample_id'], $_SESSION['login'], $_POST['authorized_signatory']);
        echo '<h2 style="page-break-before: always;"></h2>';
    }
} else {
    echo '<h1>No coditions are given for selecting records</h1>';
}
Example #2
0
echo '<form method=post>';
echo '<table bgcolor=lightpink>';
echo '<tr><th colspan=10>Autoverification</th><th>press refresh button once before proceeding to next sample</th></tr>';
echo '<tr><input type=hidden name=sample_id value=\'' . $sample_id . '\'>';
echo '<td><input type=submit value=prev name=submit >';
echo '<input type=submit value=next name=submit >';
echo '<input type=submit value=refresh name=submit ></td></tr>';
echo '<tr><td><input type=text name=sample_id value=\'' . $sample_id . '\'></td>';
echo '<td><input type=submit value=OK name=submit ></td></tr>';
echo '</form>';
echo '</table>';
echo '<table>
		<tr>
		<td valign=top>';
echo '<table>
					<tr><td>';
autoverify($sample_id, 'autoverify_action.php', 'no');
autoverify($sample_id, 'autoverify_action.php', 'yes');
echo '</td></tr>';
echo '<tr><td>';
print_chronology_of_a_sample($sample_id);
echo '</td></tr>';
echo '</table>';
echo '</td>';
echo '<td  valign=top>';
print_sample($sample_id, '', '');
echo '</td></tr>';
//echo '<td valign=top>';
//print_examinations_tt($sample_id);
//echo '</td>';
echo '</tr></table>';