<?php
include("../../classes/manager.class.php");
$m = new Manager();
$id = $_REQUEST['id'];
$cus_id = $_REQUEST['cus_id'];
if ($id) {
    $customersfilter = " WHERE status = 'active' AND category_id = '$id'";
    $qry = CustomerSetup::GetCustomerSetupList($customersfilter);
    if($qry)
    {
        echo '<option>All</option>';
        foreach($qry AS $row){
            if($row->status != 'Draft'){
                echo '<option ';
                if ($cus_id == $row->id) {
                    echo 'selected ';
                }
                echo 'value="'.$row->id.'">'.$row->name.'</option>';
            }
        }
    }else{
        echo '<option>All</option>';
    }
}
?>