示例#1
0
function read_new_nc()
{
    global $source_of_information;
    echo '<table bgcolor=lightgreen border=1><tr>';
    echo '<td colspan=10><h1>Nonconformity</h1></td></tr>';
    echo '<form method=post>';
    //20111231246060
    echo '<tr><td bgcolor=lightpink><input type=submit name=action value=show_nc></td><td>Select date from below</td></tr>';
    echo '<tr><td bgcolor=lightblue>Date:</td><td>';
    read_date_time(6);
    echo '</td>';
    echo '</tr>';
    echo '		
				<tr><td bgcolor=lightblue>source_of_information</td><td>';
    mk_select_from_array_return_value('source_of_information', $source_of_information, '', '');
    echo '		
				<input title=\'check for source-specific search\' name=choice type=checkbox>
	
				</td></tr>	  	 
				<tr><td bgcolor=lightblue>description</td><td><textarea name=description rows=5 cols=80></textarea></td></tr>	 
				<tr><td bgcolor=lightblue>control</td><td><textarea name=control rows=2 cols=80></textarea></tr>	 
				<tr><td bgcolor=lightblue>correction</td><td><textarea name=correction rows=2 cols=80></textarea></tr>	 
				<tr><td bgcolor=lightblue>prevention</td><td><textarea name=prevention rows=2 cols=80></textarea></tr>
				<tr><td bgcolor=lightblue>location_of_detailed_report</td><td><textarea name=location_of_detailed_report rows=1 cols=80></textarea></tr>
				<tr><td bgcolor=lightpink><input type=submit name=action value=save_new_nc></td></tr>';
    echo '</form>';
    echo '</table>';
}
            while ($array_table = mysql_fetch_assoc($result_table)) {
                echo '<tr>';
                foreach ($array_table as $key => $value) {
                    if ($key != 'refrigerator') {
                        echo '<td>' . $value . '</td>';
                    }
                }
                echo '</tr>';
            }
            echo '</table>';
            echo '<h2 style="page-break-before: always;"></h2>';
        }
    }
}
main_menu();
mk_form_from_table('refrigerator', 'refrigerator_temperature');
echo '<form method=post>';
echo 'Show temperature chart of following year and month';
read_date_time(2);
echo '<input type=submit name=submit value=show>';
echo '</form>';
save_temperature($_POST);
if (isset($_POST['submit'])) {
    if ($_POST['submit'] == 'show') {
        show_refrigerator($_POST['year'] . '-' . $_POST['month'] . '-%');
    } else {
        show_refrigerator(strftime('%Y-%m-%%'));
    }
} else {
    show_refrigerator(strftime('%Y-%m-%%'));
}
示例#3
0
						time_data=\'' . $data[3] . '\' and
						code=\'' . $data[4] . '\' 
					';
    //echo $sql.'<br>';
    //echo 'Refresh the main page<br>';
    if (!($result = mysql_query($sql, $link))) {
        echo 'use_qc:' . mysql_error() . '<br>';
    }
}
//if(!isset($_POST['submit']))
//{
echo '<table bgcolor=lightgreen><tr>';
echo '<td colspan=10><h1>LJ chart</h1></td></tr>';
echo '<form method=post>';
echo '<tr><td>Date:</td><td>';
read_date_time(4);
echo '</td>';
echo '<td>Select:
					</td><td>
					<select name=period>
					<option name=select_year>Year</option>
					<option selected name=select_month>Month</option>
					<option name=select_day>Day</option>
					<option name=select_hour>Hour</option>	
					</select>
					</td></tr>';
echo '	</tr><td>Equipment:</td><td colspan=10>';
mk_select_from_sql('select equipment_name from qc_equipment', 'equipment_name', '', '');
echo '	<td></tr>';
echo '	</tr><td>Examination:';
mk_select_from_sql('select distinct code from qc_target', 'code', '', '');
示例#4
0
function edit_letter($id)
{
    $sql = 'select * from letter where id=\'' . $id . '\'';
    $link = start_nchsls();
    if (!($result = mysql_query($sql, $link))) {
        echo mysql_error();
        return;
    }
    if (mysql_num_rows($result) < 1) {
        return;
    }
    $letter = mysql_fetch_assoc($result);
    $type = array('outword', 'inword');
    $from = array('Department of Biochemistry/Clinical Chemistry
	New civil Hpspital and Government Medical College Surat', 'Medical Superintendent
	New Civil Hospital Surat', 'Medical Superintendent
	New Civil Hospital Surat
	(Attn: Store Section)');
    $greeting = array('Respected Sir', 'Respected Madam', 'Respected Sir/Madam');
    $thanks = array('Thanking you', 'Hoping for quick action', 'Urgent action in the matter is requested');
    $closing = array('Yours Sincerely', 'Yours', 'Yours faithfully');
    $signature = array('Professor and Head
	Biochemistry
	NCH and GMC Surat', 'Laboratory Incharge,
	Biochemistry
	NCH and GMC Surat');
    $subject = array('Human Resources', 'Material Resources:Request for vendor evaluation/tendering/quotation', 'Material Resources:Request for supply-Equipment', 'Material Resources:Request for supply-Consumables', 'Material Resources:Request for supply-DeadStock', 'Material Resources:Request for supply-Linen', 'Material Resources:Request for condemnation', 'Material Resources:Request for Purchase', 'Acknowledgement for material received');
    echo '<table><form method=post  enctype=\'multipart/form-data\'>';
    echo '<tr><td class="field">ID</td>';
    echo '<td><input type=text name=id readonly value=\'' . $letter['id'] . '\'></td>';
    echo '</tr>';
    echo '<tr><td class="field">Type</td>';
    echo '<td>';
    mk_select_from_array_return_value('type', $type, '', $letter['type']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">Date</td>';
    $exp = explode('-', $letter['date']);
    //print_r($exp);
    echo '<td>';
    read_date_time(3, $exp[0], $exp[1], $exp[2]);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">From</td>';
    echo '<td>';
    mk_select_from_array_return_value('from', $from, '', $letter['from']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">To</td>';
    echo '<td>';
    mk_select_from_array_return_value('to', $from, '', $letter['to']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">Greeting</td>';
    echo '<td>';
    mk_select_from_array_return_value('greeting', $greeting, '', $letter['greeting']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">Subject</td>';
    echo '<td>';
    mk_select_from_array_return_value('subject', $subject, '', $letter['subject']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">Sub-subject</td>';
    echo '<td><input type=text size=100 name=sub_subject value=\'' . $letter['sub_subject'] . '\'></td>';
    echo '</tr>';
    echo '<tr><td  class="field">Reference</td>';
    echo '<td><textarea  cols=100 rows=2 name=reference >' . $letter['reference'] . '</textarea></td>';
    echo '</tr>';
    echo '<tr><td  class="field">Body</td>';
    echo '<td><textarea  cols=100 rows=25 name=body>' . $letter['body'] . '</textarea></td>';
    echo '</tr>';
    echo '<tr><td  class="field">Thanks</td>';
    echo '<td>';
    mk_select_from_array_return_value('thanks', $thanks, '', $letter['thanks']);
    echo '</td>';
    echo '<tr><td  class="field">Closing</td>';
    echo '<td>';
    mk_select_from_array_return_value('closing', $closing, '', $letter['closing']);
    echo '</td>';
    echo '</tr>';
    echo '</tr>';
    echo '<tr><td  class="field">Signature</td>';
    echo '<td>';
    mk_select_from_array_return_value('signature', $signature, '', $letter['signature']);
    echo '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">Copy To:</td>';
    echo '<td><textarea  cols=100 rows=2 name=copy_to></textarea>' . $letter['copy_to'] . '</td>';
    echo '</tr>';
    echo '<tr><td  class="field">attachment_List</td>';
    echo '<td><textarea  cols=100 rows=2 name=attachment_list>' . $letter['attachment_list'] . '</textarea></td>';
    echo '</tr>';
    echo '<tr><td>Attachment</td><td><input type=file name=attachment></td></tr>';
    echo '<tr><td class="field" colspan=2><input type=submit name=action value=save></td></tr>';
    echo '</form></table>';
}