  <?
  // Tab -----------------------------------------
  $tab_quantity=3;
  $tab_style=1;	// (single-row)
  $tab_name=array("&nbsp;&nbsp;<b>New ITQ</b>&nbsp;&nbsp;","&nbsp;&nbsp;<b>ITQ List</b>&nbsp;&nbsp;","&nbsp;RFQ History&nbsp;");
  if (isset($_REQUEST['tabid'])) $_SESSION['Xactivetab']=$_REQUEST['tabid'];
  include_once('tab.php');
  //----------------------------------------------
  ?>
  
  <table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr valign=top>
  <td valign=top>
   <div id='tab-body:0' class='tab-body' <? if ($_SESSION['Xactivetab']=="0") { echo "style='border: none; display: block;'"; } else { echo "style='border: none; display: none;'"; } ?>>

  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=210 class=listheader>MRO Type</td>
  <td valign=top width=100 class=listheader>MRO No</td>
  <td valign=top width=120 class=listheader>Request Date</td>
  <td valign=top width=120 class=listheader>Delivery Date</td>
  <td valign=top width=130 class=listheader>ITQ Status</td>
  <td valign=top width=200 class=listheader>Options</td>
  </tr>

  <? foreach ($mro_list as $mymro) { ?>

    <?
	
	
    $itq_data = $myitqModel->getdata_itqbymro($mymro['mro_pkey']);    
    if ($itq_data['itq_pkey']=="") {
      $itq_data['itq_cancel']="0";
      $itq_data['itq_status']="0";
    }
	if ($itq_data['itq_cancel']=="1") { } else {
	
    ?>

    <tr valign=top>
    <td valign=top width=48 class=listnumber><?=$mymro['recordno'];?></td>
    <td valign=top width=210 class=listcontent>
    <?
    if ($mymro['mro_type']=="1") {
      echo "Budgeted Material";
    } else if ($mymro['mro_type']=="2") {
      echo "Budgeted Material Exceeded";
    } else if ($mymro['mro_type']=="3") {
      echo "Non Budgeted Material - VO";
    } else if ($mymro['mro_type']=="4") {
      echo "Non Budgeted Material - Subcon";
    }
    ?>
    </td>
    <td valign=top width=100 class=listcontent><?=mroidstr($mymro['mro_id']);?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_requestdate']);?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_deliverydate']);?>&nbsp;</td>
    <td valign=top width=130 class=listcontent>
    <?
    if ($itq_data['itq_cancel']=="0") {
      if ($itq_data['itq_status']=="0") {
        echo "Not Created";
      } else if ($itq_data['itq_status']=="1") {
        echo "ITQ Created";
      } else {
        echo "Unknown";
      }
    } else if ($itq_data['itq_cancel']=="1") {
      echo "Cancelled ITQ";
	  //yusrul edit
	  //$sql1 = "SELECT * FROM zikay_pmsv5.itq_details WHERE itq_pkey = '" .$itq_data['itq_pkey']. "'";
	  $sql1 = "SELECT * FROM zikay_pmsv5.itq_details WHERE itq_pkey = '" .$itq_data['itq_pkey']. "'";
	  $sql2 = mysql_query($sql1);
	  $sql3 = mysql_fetch_array($sql2);
	  //echo $sql3['itq_mropkey'];
	  
	  //$sql = "UPDATE zikay_pmsv5.mro_details SET mro_cancel = '1' WHERE mro_pkey = '" .$sql3['itq_mropkey']. "'";
	  $sql = "UPDATE zikay_pmsv5.mro_details SET mro_cancel = '1' WHERE mro_pkey = '" .$sql3['itq_mropkey']. "'";
	  //echo $itq_data['itq_pkey'];
	  mysql_query($sql);

    } else if ($itq_data['itq_cancel']=="2") {
      echo "<b style='color:red;'>Rejected Supplier</b>";
    }
    ?>
    &nbsp;
    </td>
    <td valign=top width=200 class=listcontent>
    <? if ($itq_data['itq_cancel']!="1") { ?>
      <? if ($itq_data['itq_status']=="0") { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 150px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite supplier</button>&nbsp;
          <button name="print<?=$mymro['recordno'];?>" id="print<?=$mymro['recordno'];?>" type="button" style="width: 150px;" onClick="location.href='index.php?module=itq&task=print&itemid=<?=$itq_data['itq_pkey'];?>'"><img src="gfx/options/b_print1.png" class="actionbutton">&nbsp;Print</button>
        <? } ?>
      <? } else if ($itq_data['itq_status']=="1") { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 150px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite supplier</button>&nbsp;
          <button name="print<?=$mymro['recordno'];?>" id="print<?=$mymro['recordno'];?>" type="button" style="width: 150px;" onClick="location.href='index.php?module=itq&task=print&itemid=<?=$itq_data['itq_pkey'];?>'"><img src="gfx/options/b_print1.png" class="actionbutton">&nbsp;Print</button>
        <? } ?>
      <? } else { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 150px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite supplier</button>
        <? } ?>
      <? } ?>
    <? } ?>
    &nbsp;
    </td>
    </tr>

  <? } }?>

  </table>

  </div>
  
  
  
  
  
  
  
  <div id='tab-body:1' class='tab-body' <? if ($_SESSION['Xactivetab']=="1") { echo "style='border: none; display: block;'"; } else { echo "style='border: none; display: none;'"; } ?>>

  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">
  <form action="index.php?module=itq&task=list" method="post" name="filterform" id="filterform">
  <tr valign=top>
  <td valign=top width=928 colspan=9 class=listfilterheader>Filters</td>
  </tr>
  <tr valign=top>
  <td valign=top width=60 class=listcontent>RFQ No :</td>
  <td valign=top width=120 class=listcontent><input name="rfqno" id="rfqno" value="<?=$filterrfqno;?>" style="width: 115px;" onKeypress="integerOnly();"></td>
  <td valign=top width=60 class=listcontent>MRO No:</td>
  <td valign=top width=120 class=listcontent><input name="mrono" id="mrono" value="<?=$filtermrono;?>" style="width: 115px;" onKeypress="integerOnly();"></td>
  <td valign=top width=120 class=listcontent>Vendor Name :</td>
  <td valign=top width=240 class=listcontent>
  <select name="vendorname" id="vendorname" style="width: 235px;">
  <? $objsupplierpkey = $filtervendorname; ?>
  <? include('object-selectsupplier.tpl'); ?>
  </select>
  </td>
  <td valign=top width=208 class=listcontent>
  <input name="tabid" id="tabid" type="hidden" value="1">
  <input name="pageno1" id="pageno1" type="hidden" value="1">
  <button name="filter" id="filter" type="submit" style="width: 80px;">&nbsp;<img src='gfx/options/b_find.png' class='actionbutton'>&nbsp;Search&nbsp;</button>&nbsp;
  <button name="showall" id="showall" style="width: 90px;" onClick="unFilter();">&nbsp;<img src='gfx/options/b_clear.png' class='actionbutton'>&nbsp;Show All&nbsp;</button>&nbsp;
  </td>
  </tr>
  </form>
  </table>
  <br>

  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=80 class=listheader>RFQ No</td>
  <td valign=top width=80 class=listheader>MRO No</td>
  <td valign=top width=160 class=listheader>Vendor Name</td>
  <td valign=top width=80 class=listheader>Trade</td>
  <td valign=top width=150 class=listheader>Requestor</td>
  <td valign=top width=150 class=listheader>Approved/Cancel By</td>
  <td valign=top width=100 class=listheader>Status</td>
  <td valign=top width=80 class=listheader>Options</td>
  </tr>

  <?
  $firstrec1 = (($pubpageno1-1)*20)+1;
  $lastrec1 = $firstrec1 + 19;
  $pagecount1 = 1;
  ?>

  <? foreach ($itq_list as $myitq) { ?>

    <? if (($myitq['recordno']>=$firstrec1)&&($myitq['recordno']<=$lastrec1)) { ?>

      <?
      $itq_data = $myitqModel->getdata_itqbymro($myitq['mro_pkey']);    
      $mysupplier = $mysupplierModel->getdata_supplier($myitq['itq_supplierpkey']);
      
	  if ($itq_data['itq_cancel']=="1") { // filter cancel
	  
	  
	  }
	  else { 
	  
	  ?>

      <tr valign=top>
      <td valign=top width=48 class=listnumber><?=$myitq['recordno'];?></td>
      <td valign=top width=80 class=listcontent><?=itqidstr($myitq['itq_rfqno']); //,$myitq['itq_revno']);?></td>
      <td valign=top width=80 class=listcontent><?=mroidstr($myitq['mro_id']);?>&nbsp;</td>
      <td valign=top width=160 class=listcontent><?=$mysupplier['supplier_name'];?>&nbsp;</td>
      <td valign=top width=80 class=listcontent>
	  <?php
	  $ish = "SELECT * FROM zikay_pmsv5.itq_details WHERE itq_mropkey ='".$myitq['mro_pkey']."'";
	  $ish1 = mysql_query($ish);
	  $ish2 = mysql_fetch_assoc($ish1);
	  
	  //echo $ish2['itq_subtradepkey'];
	  
	  $ish3 = "SELECT * FROM zikay_pmsv5.settings_trades WHERE tradepkey ='".$ish2['itq_subtradepkey']."'";
	  $ish4 = mysql_query($ish3);
	  $ish5 = mysql_fetch_assoc($ish4);
	  
	  echo $ish5['tradedescription'];
	  
	  
	  ?>
	  <?=$trade_data['tradedescription'];?></td>
	  <td valign=top width=150 class=listcontent><?=$myitq['itq_requestor'];?>&nbsp;</td>
      <td valign=top width=150 class=listcontent><?=$myitq['itq_approver'];?>&nbsp;</td>
      <td valign=top width=100 class=listcontent>
      <?
      if ($itq_data['itq_cancel']=="1") {
        echo "Cancelled ITQ";
      } else if ($itq_data['itq_cancel']=="2") {
        echo "Rejected Item";
      } else {
        if ($itq_data['itq_evalstatus']=="0") {
          echo "New"; $set_edit_type = "New"; //27-12-2011 yusr
        } else if ($itq_data['itq_evalstatus']=="1" AND $itq_data['itq_approval1'] == "") {
          //echo "ITQ"; //tukar
					$ztotal = "SELECT * FROM zikay_pmsv5.mro_items WHERE item_mropkey = '".$myitq['mro_pkey']."'";
					$ztotal1 = mysql_query($ztotal);
					$ztotal2 = mysql_fetch_assoc($ztotal1);
					//echo $ztotal2['zikaytotal'];
					 
      $mymroamount = floatval($mymroModel->gettotal_mroitems($myitq['mro_pkey']));
      
					/*
					if($ztotal2['zikaytotal'] == 1 OR $mymroamount>100000 ){
					//echo "To Recommend";
					echo "To Approved";
					}else{
				    echo "To Recommendx";
					}
					*/
					if($mymroamount<100000 ){
					//echo "To Recommend";
					echo "To Approved"; $set_edit_type = "To Approved"; //27-12-2011 yusr
					}else{
				    echo "To Recommend"; $set_edit_type = "To Recommend"; //27-12-2011 yusr
					}
					
					
		} else if ($itq_data['itq_evalstatus']=="1" AND $itq_data['itq_approval1'] != "") {
					
					echo "To Approved"; $set_edit_type = "To Approved"; //27-12-2011 yusr
					
			
        } else if ($itq_data['itq_evalstatus']=="2") {
          echo "To Approved"; $set_edit_type = "To Approved"; //27-12-2011 yusr
        } else if ($itq_data['itq_evalstatus']=="3") {
          echo "PO";	// Approved
        } else if ($itq_data['itq_evalstatus']=="4") {
          echo "Oops";
        } else {
          if ($itq_data['itq_status']=="0") {
            echo "Not Created";
          } else if ($itq_data['itq_status']=="1") {
            echo "Created";
          } else {
            echo "Unknown";
          }
        }
      }
	  
	 
      ?>
      &nbsp;
      </td>

      <?
      $mymroamount = floatval($mymroModel->gettotal_mroitems($myitq['mro_pkey']));
      ?>

      <td valign=top width=80 class=listcontent>
     <?php
	 /********************************************** 
	 new permission mod by yusrul date: 29/12/2011 
	 ***********************************************/
	 
	 $set_approval_button = "<a href=\"index.php?module=itq&task=approve&itemid=".$myitq['mro_pkey']."\"><img src=\"gfx/options/b_approve2.png\" border=0 title=\"To Approved\" alt=\"To Approved\"></a>";
	 $set_approval_new_button = "<a href=\"index.php?module=itq&task=evaluate&itemid=".$myitq['mro_pkey']."\"><img src=\"gfx/options/b_approve2.png\" border=0 title=\"Submit ITQ\" alt=\"Submit ITQ\"></a>";
	// echo $itq_data['itq_evalstatus']; //echo $mymroamount;
	 /*
	 Approval and recommended button
	 */
	 //echo $itq_data['itq_evalstatus'];
	 switch($mymroamount)
	 {
		case $mymroamount >= 100000:
		       if((($pubuseraccess['access_itq_review'] == 1) && ($myitq['itq_approval1'] == NULL )) OR  // rekemen utk besar dari 100k
		       ($pubuseraccess['access_itq_review_approved'] == 1)) // approved utk besar dari 100k
			      { 
				      if($itq_data['itq_evalstatus']=="1") /*OR ($pubuserrole>=2))*/ { echo $set_approval_button;
					  } else {
				      //echo $set_approval_new_button;
                      }					  
				  }  
		break;
	    case $mymroamount < 100000:
	            if($pubuseraccess['access_itq_approve100k'] == 1)
				  { 
				      if($itq_data['itq_evalstatus']==1) /*OR($pubuserrole>=2))*/{ echo $set_approval_button;
					  } else {
				      //echo $set_approval_new_button;
                      }			 
				  } // approve utk kecil dari 100k
	    break;
	 }
	 /*
	 Approval and recommended button end
	 */
	 ?>
	 
	 <?php
	 $set_edit_button2 = "<a href=\"index.php?module=itq&task=evaluate&yus=1&itemid=".$myitq['mro_pkey']."\"><img src=\"gfx/options/b_edit.png\" border=0 title=\"Edit\" alt=\"Edit\"></a>";
	 //$set_edit_button2 = "<a href=\"index.php?module=itq&task=view&itemid=".$myitq['mro_pkey']."><img src=\"gfx/options/b_edit.png\" border=0 title=\"Edit\" alt=\"Edit\"></a>"
	 $set_view_button = "<a href=\"views/rpt_evaluation.php?itemid=".$myitq['mro_pkey']."\" target=\"_blanks\"><img src=\"gfx/options/b_view.png\" border=0 title=\"View\" alt=\"View\"></a>";
	 //echo $pubuseracess['itq_edit_recommend'];
	// echo $set_edit_type;
	 switch($set_edit_type)
	 {
		case "New":
		   if($_SESSION['Xuseraccess']['itq_edit_new'] == 1){ 
		           //if ($pubuseraccess['access_itq_evaluate']==1){ 
				   echo $set_approval_new_button; //} 
			 // echo $set_edit_button2;  
			 }
		break;
		case "To Recommend":
		   if($pubuseraccess['itq_edit_recommend'] == 1) { echo $set_edit_button2;}
		break;
		case "To Approved":
		   if((($pubuseraccess['itq_edit_approved'] == 1) && ($mymroamount < 100000)) OR (($pubuseraccess['itq_edit_approved100k'] == 1) && ($mymroamount > 100000)))
		   {echo $set_edit_button2;}
		break;
	 }
	 echo $set_view_button;
	
    /************************************
	end permission yusrul date 29/12/2011 
	*************************************/
	
	?>
	
    
	  
      </td>
      </tr>

    <? }}} //filter end ?>

  
  <?
  $pagecount1 = intval($myitq['recordno']/20) + 1;
  ?>

  </table>

  <br>
  <?
  echo "<b>Page : </b>";
  for ($i=1;$i<=$pagecount1;$i++) {
    if ($i==$pubpageno1) {
      echo "[<u>".$i."</u>]&nbsp;";	//-&nbsp;";
    } else {
      echo "<span style='cursor: hand;' onClick='switchPage1(".$i.");'><b>".$i."</b></span>&nbsp;";	//-&nbsp;";
    }
    if (($i % 25)==0) echo "<br>";
  }
  ?>

  </div>

 
 
 
 
 
 
 

  <div id='tab-body:2' class='tab-body' <? if ($_SESSION['Xactivetab']=="2") { echo "style='border: none; display: block;'"; } else { echo "style='border: none; display: none;'"; } ?>>

   <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">
  <form action="index.php?module=itq&task=list" method="post" name="filterform1" id="filterform1">
  <tr valign=top>
  <td valign=top width=928 colspan=9 class=listfilterheader>Filters</td>
  </tr>
  <tr valign=top>
  <td valign=top width=60 class=listcontent>RFQ No :</td>
  <td valign=top width=120 class=listcontent><input name="rfqno1" id="rfqno1" value="<?=$filterrfqno1;?>" style="width: 115px;" onKeypress="integerOnly();"></td>
  <td valign=top width=60 class=listcontent>MRO No:</td>
  <td valign=top width=120 class=listcontent><input name="mrono1" id="mrono1" value="<?=$filtermrono1;?>" style="width: 115px;" onKeypress="integerOnly();"></td>
  <td valign=top width=120 class=listcontent>Vendor Name :</td>
  <td valign=top width=240 class=listcontent>
  <select name="vendorname1" id="vendorname1" style="width: 235px;">
  <? $objsupplierpkey = $filtervendorname; ?>
  <? include('object-selectsupplier.tpl'); ?>
  </select>
  </td>
  <td valign=top width=208 class=listcontent>
  <input name="tabid" id="tabid" type="hidden" value="2">
  <input name="pageno2" id="pageno2" type="hidden" value="1">
  <button name="filter1" id="filter1" type="submit" style="width: 80px;">&nbsp;<img src='gfx/options/b_find.png' class='actionbutton'>&nbsp;Search&nbsp;</button>&nbsp;
  <button name="showall" id="showall" style="width: 90px;" onClick="unFilter2();">&nbsp;<img src='gfx/options/b_clear.png' class='actionbutton'>&nbsp;Show All&nbsp;</button>&nbsp;
  </td>
  </tr>
  </form>
  </table>
  <br>
  

  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=120 class=listheader>RFQ No</td>
  <td valign=top width=120 class=listheader>MRO No</td>
  <td valign=top width=160 class=listheader>Vendor Name</td>
  <td valign=top width=150 class=listheader>Requestor</td>
  <td valign=top width=150 class=listheader>Approved/Cancel By</td>
  <td valign=top width=100 class=listheader>Status</td>
  <td valign=top width=80 class=listheader>Options</td>
  </tr>

  <?
  $firstrec2 = (($pubpageno2-1)*20)+1;
  $lastrec2 = $firstrec2 + 19;
  $pagecount2 = 1;
  ?>

  <? 
  
  $kaunt = 1;
  foreach ($itq_hist as $myitq) { ?>
  
  
  
  

    <? if (($myitq['recordno']>=$firstrec2)&&($myitq['recordno']<=$lastrec2)) { ?>

      <?
      $itq_data = $myitqModel->getdata_itqbymro($myitq['mro_pkey']);    
      $mysupplier = $mysupplierModel->getdata_supplier($myitq['itq_supplierpkey']);
      
	  
	  
	  
 
	//filter
	$awarded="";
	$awardedno=0;
	$award_list = $myitqModel->getlist_itqawardedsuppliers_yus($itq_data['itq_pkey']); // edit on 7-12-2011
	
	/*ori
	foreach ($award_list as $award_data) {
    $supplier = $mysupplierModel->getdata_supplier($award_data['approval_supplierpkey']);
    $awarded .= ", ".$supplier['supplier_name'];
	}
	$awarded = substr($awarded,2);
   */
   $kount = 1;
	foreach ($award_list as $award_data) {
    $supplier = $mysupplierModel->getdata_supplier($award_data['approval_supplierpkey']);
    if($kount == 1){
	$awarded .= ", ".$supplier['supplier_name'];
	}else{
	
	}
	$kount++;
	}
	$awarded = substr($awarded,2);
	  
	  ?>

	  <?php
	  //filter
	  
	  if ($mysupplier['supplier_name'] == $awarded){
	  ?>
	  
      <tr valign=top>
      <td valign=top width=48 class=listnumber><?php echo $kaunt; ?><?//=$myitq['recordno'];?></td>
      <td valign=top width=120 class=listcontent><?=itqidstr($myitq['itq_rfqno']);//,$myitq['itq_revno']);?></td>
      <td valign=top width=100 class=listcontent><?=mroidstr($myitq['mro_id']);?>&nbsp;</td>
      <td valign=top width=160 class=listcontent>
	  <?php /* temporary hardcoded 5-3-2012 */
	
	  if (mroidstr($myitq['mro_id']) == "MRO0537"){
	  echo "SPM HARDWARE SDN BHD";
	  }else{
	  echo $mysupplier['supplier_name'];
	  }
	  ?>&nbsp;</td>
      <td valign=top width=150 class=listcontent><?=$myitq['itq_requestor'];?>&nbsp;</td>
      <td valign=top width=150 class=listcontent><?=$myitq['itq_approver'];?>&nbsp;</td>
      <td valign=top width=100 class=listcontent>
      <?
      if ($itq_data['itq_cancel']=="1") {
        echo "Cancelled ITQ";
      } else if ($itq_data['itq_cancel']=="2") {
        echo "Rejected Item";
      } else {
        if ($itq_data['itq_evalstatus']=="0") {
          echo "New";
        } else if ($itq_data['itq_evalstatus']=="1") {
          echo "ITQ"; // tukar
        } else if ($itq_data['itq_evalstatus']=="2") {
          echo "Reviewed";
        } else if ($itq_data['itq_evalstatus']=="3") {
          //echo $awarded."<br />";
		  echo "PO";	// Approved
        } else if ($itq_data['itq_evalstatus']=="4") {
          echo "Oops";
        } else {
          if ($itq_data['itq_status']=="0") {
            echo "Not Created";
          } else if ($itq_data['itq_status']=="1") {
            echo "Created";
          } else {
            echo "Unknown";
          }
        }
      }
      ?>
      &nbsp;
      </td>

      <?
      $mymroamount = floatval($mymroModel->gettotal_mroitems($myitq['mro_pkey']));
      ?>

      <td valign=top width=80 class=listcontent>
      <? if (($pubuseraccess['access_itq_view']==1)||($pubuserrole>=2)) { ?>
	  <!--
        <a href="index.php?module=itq&task=view&itemid=<?=$myitq['mro_pkey'];?>"><img src="gfx/options/b_edit.png" border=0 title="Edit" alt="Edit"></a>
		-->
		<a href="views/rpt_evaluation.php?itemid=<?=$myitq['mro_pkey'];?>" target="_blanks"><img src="gfx/options/b_view.png" border=0 title="View" alt="View"></a>
      <? } ?>
      &nbsp;
      </td>
      </tr>

    <?   $kaunt++;}  }
	?>

  <? } ?>

  <?
  $pagecount2 = intval($myitq['recordno']/20) + 1;
  ?>

  </table>

  <br>
  <?
  echo "<b>Page : </b>";
  for ($i=1;$i<=$pagecount2;$i++) {
    if ($i==$pubpageno2) {
      echo "[<u>".$i."</u>]&nbsp;";	//-&nbsp;";
    } else {
      echo "<span style='cursor: hand;' onClick='switchPage2(".$i.");'><b>".$i."</b></span>&nbsp;";	//-&nbsp;";
    }
    if (($i % 25)==0) echo "<br>";
  }
  ?>

  </div>
<?php //print_r($_POST); ?>
  <script type="text/javascript">

  function unFilter() {
    document.filterform.rfqno.value="";
    document.filterform.mrono.value="";
    document.filterform.vendorname.value="";
    document.filterform.submit();
  }
   function unFilter2() {
    document.filterform1.rfqno.value="";
    document.filterform1.mrono.value="";
    document.filterform1.vendorname.value="";
    document.filterform1.submit();
  }

  function switchPage1(pageno) {
    document.filterform.pageno1.value=pageno;
    document.filterform.submit();
  }

  function switchPage2(pageno) {
    document.filterform1.pageno2.value=pageno;
    document.filterform1.submit();
  }

  </script>

  <pre>
  <?php  
  //print_r($_SESSION);
  //echo $set_edit_type;
  ?>
  </pre>
  
