<?php
include_once("../public/config.php");
$do = $_GET['do'];
$today = date("Y-m-d H:i:s");
$date = date('Y-m-d');
$userid = $_SESSION['userid'];
if ($do = "getChasis") {
  $clientId = filter_input(INPUT_POST, 'clientid');

  if ($clientId && $clientId > 0) {
    $allChasis = R::getCol('select chasisno from importcontract where chasisno != "" and del <2 and clientid = ' . $clientId);
    $ret = '<option value=""></option>';
    foreach ($allChasis as $ch) {
      $ret .= '<option value="' . $ch . '">' . $ch . '</option>';
    }
    echo $ret;
  } else
    echo -1;
}
