function start_nchsls() { if (!($link = login_varify())) { exit; } if (!select_nchsls($link)) { exit; } return $link; }
function read_sample_id_FS($value) { echo '<table border=1> <form method=post action=new_request_FS.php>'; echo '<tr>'; echo '<td>from_sample_id</td>'; echo '<td><input type=text name=from_sample_id ></td>'; echo '</tr>'; echo '<tr>'; echo '<td>to_sample_id</td>'; echo '<td><input type=text name=sample_id ></td>'; echo '</tr>'; echo '<tr><td colspan=2 align=center><button type=submit name=action value=' . $value . '>new_sample Copy [F-S]</-></button></td></tr>'; echo '</form></table>'; } if (!login_varify()) { exit; } main_menu(); if (!isset($_POST['sample_id']) || !isset($_POST['action'])) { read_sample_id_FS('new_sample'); } elseif (isset($_POST['sample_id']) && isset($_POST['action'])) { if ($_POST['action'] == 'new_sample') { $link = start_nchsls(); if (!mysql_query('insert into sample(sample_id,sample_receipt_time,patient_id) values (\'' . $_POST['sample_id'] . '\',\'' . strftime("%Y-%m-%d %H:%M:%S") . '\',\'SUR/12/\')', $link)) { echo mysql_error(); } else { save_sample_FS($_POST['from_sample_id'], $_POST['sample_id']); edit_sample($_POST['sample_id'], 'new_request_FS.php ', '', ''); } } elseif ($_POST['action'] == 'save_sample') {
/* echo '<pre>'; print_r($GLOBALS); echo '</pre>'; */ class MYPDF_BARCODE extends TCPDF { public function Header() { } // Page footer public function Footer() { } } login_varify(); if (!isset($_POST['submit'])) { main_menu(); echo '<form method=post target=_blank><table> <th colspan=2>Print 48 Lables in 4x12 array on A4 page</th> <tr><td>Text of first line</td><td><input type=text name=line1></td></tr> <tr><td>Text of second line</td><td><input type=text name=line2></td></tr> <tr><td>Text of third line</td><td><input type=text name=line3></td></tr> <tr><td><input type=submit name=submit value=print></td></tr> </table></form>'; } else { // for barcode $style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => true, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => '0', 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => true, 'font' => 'helvetica', 'fontsize' => 6, 'stretchtext' => 4); //Page header W=210 H=148 //210 × 297 A4 //180,x270 (30,27)