| Current Path : /var/www/html/mmishra/iws8/html/istore/ |
| Current File : /var/www/html/mmishra/iws8/html/istore/inaccount.inc |
<h3>Account Status</h3>
<?php
$empno = $_REQUEST["emp_no"];
$indentno = $_REQUEST["indent_no"];
if ($_REQUEST['MailCopy'] == 1) {
$rs = mysql_query("select * from employees where emp_no=(select emp_no from indents where indent_no=$indentno)");
if (mysql_num_rows($rs)) {
$o = mysql_fetch_object($rs);
$empname = $o->emp_name;
$email = $o->email;
if (!$email) $email = 'istore@iiita.ac.in'; //send email to istore
}
$str = "Dear Indentor
<br><br>
With reference to your indent (Ref. No. $indentno) following items have been issued from the Central Store as per details given below.<br>
This 'Material Out Receipt' is for your information and record pl.
<br><br>". issued_indent($indentno). "<br>
In case of any defect/malfunctioning/poor quality, items may kindly be returned to the Central Store within 24 hours for replacement/warranty.<br><br>
At the time of nodues certification, you need to settle your personal account for returnable items only.
However, all the non-consumable including fixture items will be handed over to your successor on the day.
<br><br>Thanks,<br><br>";
automailer($email, "Material Out Receipt", $str);
}
//automailer('mmishra@iiita.ac.in', "Material Issued", 'test');
echo "Select indentor <select name='emp_no' onchange=\"javascript: document.location.href='?pg=$pg&emp_no='+this.value\">
<option value=''></option>";
$rs = mysql_query("select emp_no,emp_name,designation from employees order by emp_name");
while ($o = mysql_fetch_object($rs)) {
echo "<option value='$o->emp_no'";
if ($o->emp_no == $empno) echo " selected";
echo ">$o->emp_name</option>";
}
?>
</select> Only ISSUED indents of selected indentor are listed here.
<?php
if ($empno) {
echo "<h3>List of processed Indents</h3>
<ol>";
$rs = mysql_query("select * from indents where emp_no='$empno' and status='Issued' order by date_indent desc");
if (mysql_num_rows($rs)) {
while ($o = mysql_fetch_object($rs)) {
if ($indentno == $o->indent_no) {
echo "<li><b>$o->indent_no dated $o->date_indent</b>
". issued_indent($o->indent_no) ."
<p align='right'> [
<a href='?pg=$pg&emp_no=$empno&indent_no=$o->indent_no&MailCopy=1'>Mail Copy of Receipt</a>
]</p></li>";
} else {
echo "<li><a href='?pg=$pg&emp_no=$empno&indent_no=$o->indent_no'>$o->indent_no</a> dated $o->date_indent</li>";
}
}
} else {
echo "<li>None</li>";
}
echo "</ol>";
}
?>