<?php
require "../commonincludefiles.php";
error_reporting(1);
if ($_SESSION["VedantnrCollegeId"] != "" && isset($_SESSION["VedantnrCollegeId"])) {
	$bid = $_REQUEST['branch_id'];
	$action = $_REQUEST['action'];

	switch ($action) {
		
		case "mlhp":
			$objmlhp = new MlhpCertificateMgmt();
			$num = $objmlhp->getMaxRecordNumber($bid);
			echo "{success:true,certno:'" . $num . "'}";
			break;
		case "conduct":
			$objconduct = new conductCertificateMgmt();
			$num = $objconduct->getMaxRecordNumber($bid);
			echo "{success:true,certno:'" . $num . "'}";
			break;

		case "cum":
			$objcum = new cumrelivingCertificateMgmt();
			$num = $objcum->getMaxRecordNumber($bid);
			echo "{success:true,certno:'" . $num . "'}";
			break;
		case "relievingorder":
			$objrelievingorder = new relievingorderCertificateMgmt();
			$num = $objrelievingorder->getMaxRecordNumber($bid);
			echo "{success:true,certno:'" . $num . "'}";
			break;
		case "moi":
			$objmoiCertificate = new moiCertificateMgmt();
			$num = $objmoiCertificate->getMaxRecordNumber($bid);
			echo "{success:true,certno:'" . $num . "'}";
			break;
			case "midwifery":
				$objmidwifery = new midwiferyCertificateMgmt();
				$num = $objmidwifery->getMaxRecordNumber($bid);
				echo "{success:true,certno:'" . $num . "'}";
				break;
				case "attempt":
					$objattempt = new attemptCertificateMgmt();
					$num = $objattempt->getMaxRecordNumber($bid);
					echo "{success:true,certno:'" . $num . "'}";
					break;
	}
}
?>