<?php 
if (!isset($_SESSION)){
  session_start();
}

require_once("Connections/courier.php");

$typesearch = "Item_Name";
$typesearch2 = "Item_Id";
$searchtext = mysql_real_escape_string(trim($_POST["searchtext_invoice_drug"]));
$searcby=$_POST["searchby_drug"];

if($searchtext != ""){
  $queryItems = "SELECT * FROM service_items WHERE service='Drugs' and (item LIKE '%$searchtext%') ORDER BY item DESC limit 0,100";
  $resultItems = mysql_query($queryItems) or die(mysql_error());
  $arrayItems = mysql_fetch_assoc($resultItems);
  $totalRows = mysql_num_rows($resultItems);
}
?>
<div class="task-content" id="view_items_response_drug_pres">
  <ul class="task-list"> 
    <?php if ($totalRows> 0) { ?>                    
      <?php
      $i = 0;
      do {
        $i = $i + 1;
        ?>
        <li onclick="searchItemsName('drug_edit_claim_details_his','#claimsno_drugs_prescriptions','<?php echo $arrayItems["id"]; ?>','no_field');" onkeypress="javascript: if(isEnterKey(event)){ searchItemsName('drug_edit_claim_details_his','#claimsno_drugs_prescriptions','<?php echo $arrayItems["id"]; ?>','no_field'); }" tabindex="2">
          <div style="font-size: 12px;" class="task-title">
            <span class="task-title-sp"><?php echo strtoupper($arrayItems["item"]); ?></span>
          </div>

          <div style="margin-top: -20px;color: red;" class="pull-right">
           <i id="plus_<?php echo $arrayItems['id']; ?>" class="fa fa-plus"></i>
           <i style="display: none;" id="spin_refresh_plus_<?php echo $arrayItems['id']; ?>" class="fa fa-refresh fa-spin fa-fw"></i>
         </div>
       </li>

     <?php } while ($arrayItems = mysql_fetch_assoc($resultItems)); ?>


   <?php }else{ ?>
    <li>
      <div class="task-checkbox"></div>
      <div class="task-title">
        <span class="task-title-sp"> <b> No Drug Found </b></span>
      </div>
    </li>
  <?php }?>
</ul>
</div>




