<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

//$manualno = $_REQUEST["manualno"];
//$myvouch = $_REQUEST["myvouch"];

$getbroker = mysqli_query($conn, "SELECT max(mannum) as maxcode FROM `visamain`") or die(mysqli_error($conn));

$r = mysqli_fetch_array($getbroker);
//     $passport = $r['passport']; 
$manualno = $r['maxcode'] + 1;

//header("Content-type: application\json");
echo "AH-" . $manualno;
?>