Exemplo n.º 1
0
function read_edit_nc()
{
    global $source_of_information;
    $nonconformity_ID = $_POST['nonconformity_ID'];
    $description = $_POST['description'];
    $control = $_POST['control'];
    $correction = $_POST['correction'];
    $prevention = $_POST['prevention'];
    $location_of_detailed_report = $_POST['location_of_detailed_report'];
    echo '<table bgcolor=lightgreen border=1><tr>';
    echo '<td colspan=10><h1>Edit Nonconformity</h1></td></tr>';
    echo '<form method=post>';
    //20111231246060
    echo '		<tr><td bgcolor=lightblue>nonconformity_ID</td><td><textarea readonly name=nonconformity_ID rows=1 cols=15>' . $nonconformity_ID . '</textarea></td></tr>	
					<tr><td bgcolor=lightblue>source_of_information</td><td>';
    mk_select_from_array_return_value('source_of_information', $source_of_information, '', $_POST['source_of_information']);
    echo '		</td></tr>	  	 
					<tr><td bgcolor=lightblue>description</td><td><textarea name=description rows=5 cols=80>' . $description . '</textarea></td></tr>	 
					<tr><td bgcolor=lightblue>control</td><td><textarea name=control rows=2 cols=80>' . $control . '</textarea></tr>	 
					<tr><td bgcolor=lightblue>correction</td><td><textarea name=correction rows=2 cols=80>' . $correction . '</textarea></tr>	 
					<tr><td bgcolor=lightblue>prevention</td><td><textarea name=prevention rows=2 cols=80>' . $prevention . '</textarea></tr>
					<tr><td bgcolor=lightblue>location_of_detailed_report</td><td><textarea name=location_of_detailed_report rows=1 cols=80>' . $location_of_detailed_report . '</textarea></tr>
					<tr><td bgcolor=lightpink><input type=submit name=action value=save_edit_nc></td></tr>';
    echo '</form>';
    echo '</table>';
}
Exemplo n.º 2
0
function read_seat($link)
{
    echo '<form method=post>';
    $sql = 'select id, concat_ws("-",id,subject,location) display from subloc';
    $display = 'display';
    $real = 'id';
    mk_select_from_sql($link, $sql, 'id', $display, $real, '', '');
    mk_select_from_sql($link, 'select catagory from catagory', 'catagory', 'catagory', 'catagory', '', '');
    $num = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
    mk_select_from_array_return_value('max_number', $num, '', '');
    echo '<input type=submit name=save_seat value=\'add seat\'>';
    echo '</form>';
}
Exemplo n.º 3
0
function read_edit_Item()
{
    global $source_of_information;
    $Inventory_ID = $_POST['Inventory_ID'];
    $Item_Name = $_POST['Item_Name'];
    $Specification = $_POST['Specification'];
    $Details = $_POST['Details'];
    echo '<table bgcolor=lightgreen border=1><tr>';
    echo '<td colspan=10><h1>Edit Item</h1></td></tr>';
    echo '<form method=post>';
    //20111231246060
    echo '		<tr><td bgcolor=lightblue>Inventory_ID</td><td><textarea readonly name=Inventory_ID rows=1 cols=15>' . $Inventory_ID . '</textarea></td></tr>	
					<tr><td bgcolor=lightblue>source_of_information</td><td>';
    mk_select_from_array_return_value('source_of_information', $source_of_information, '', '');
    echo '		</td></tr>	  	 
					<tr><td bgcolor=lightblue>Item_Name</td><td><textarea name=Item_Name rows=5 cols=80>' . $Item_Name . '</textarea></td></tr>	 
					<tr><td bgcolor=lightblue>Specification</td><td><textarea name=Specification rows=2 cols=80>' . $Specification . '</textarea></tr>	 
					<tr><td bgcolor=lightblue>Details</td><td><textarea name=Details rows=2 cols=80>' . $Details . '</textarea></tr>	 
					
					<tr><td bgcolor=lightpink><input type=submit name=action value=save_edit_Item></td></tr>';
    echo '</form>';
    echo '</table>';
}
Exemplo n.º 4
0
function new_schedule()
{
    echo '<table  border=1>	<form method=post>';
    echo '<tr>';
    echo '<tr><th colspan=5>New Schedule</th></tr>';
    echo '<tr><td>Every</td><td><input type=text name=every size=2></td><td>Write a number</td></tr>';
    echo '<tr><td>Period</td><td>
			<select name=unit>
					<option>minute</option>
					<option>hour</option>
					<option>day</option>
					<option>week</option>
					<option>month</option>
					<option>year</option>
			</select></td><td>Select period</td></tr>';
    echo '<tr><td>Start from</td><td><input type=text name=starts></td><td>Write starting time Example Format: 2013-11-29 09:10:00</td></tr>';
    echo '<tr><td>What to remind</td><td><input type=text name=description></td><td>Describe what to remind for</td></tr>';
    echo '<tr><td>Authority</td><td>';
    $authority_array = array('1', '2', '3', '4', '5');
    mk_select_from_array_return_value('authority', $authority_array, '', '');
    echo '</td><td>Select authority who will verify. R1=1 R2=2 R3=3 Teaching staff=4 HOD=5</td></tr>';
    echo '<tr><td><button type=submit name=action value=save_new_schedule>save</button></td></tr>';
    echo '</form></table>';
}
Exemplo n.º 5
0
list_dir($base_dir,$exclude_dir);


echo '<html>';
echo '<body>';
echo '<form method=post enctype=\'multipart/form-data\'>';
echo '<table>';
echo '<tr>';

	echo '<td bgcolor=lightblue>Give File name to upload</td>';
	echo '<td bgcolor=lightblue><input type=file name=file></td>';
echo '</tr>';
echo '<tr>';
	echo '<td bgcolor=lightgreen>Select location for storage at server</td>';
	echo '<td  bgcolor=lightgreen>';
		mk_select_from_array_return_value('storage_path', $grand_array,'','');
	echo '</td>';
echo '</tr>';
echo '<tr>';
	echo '<td><input type="submit" name="submit" value="Submit"></td>';
echo '<tr></form>';

echo '</body></html> ';


if(isset($_FILES['file']))
{
		if ($_FILES["file"]["error"] > 0)
		{
			echo "Error, Return Code: " . $_FILES["file"]["error"] . "<br />";
		}
Exemplo n.º 6
0
function edit_date_time($type, $d_year, $d_month, $d_day, $d_hour, $d_minute, $d_second)
{
    $year = array(strftime('%Y') - 1, strftime('%Y'), strftime('%Y') + 1);
    $month = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
    $day = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31');
    $hour = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24');
    $minute = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '26', '27', '28', '29', '30', '32', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60');
    $second = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '26', '27', '28', '29', '30', '32', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60');
    if ($type >= 1) {
        mk_select_from_array_return_value('year', $year, '', $d_year);
    }
    if ($type >= 2) {
        mk_select_from_array_return_value('month', $month, '', $d_month);
    }
    if ($type >= 3) {
        mk_select_from_array_return_value('day', $day, '', $d_day);
    }
    if ($type >= 4) {
        mk_select_from_array_return_value('hour', $hour, '', $d_hour);
    }
    if ($type >= 5) {
        mk_select_from_array_return_value('minute', $minute, '', $d_minute);
    }
    if ($type >= 6) {
        mk_select_from_array_return_value('second', $second, '', $d_second);
    }
}
Exemplo n.º 7
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>';
}