<?php
// ── AJAX: append one blank JV grid row ───────────────────────────────────────
// Called by jv.js's AddRows(). Returns a single <tr> fragment rendered by the
// shared includes/jv_row.php partial (kept identical to the rows jv.php
// prints on initial load / edit, so markup never drifts between the two).
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
require("includes/function.php");

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

if (isset($_REQUEST["ctr"]) && $_REQUEST["ctr"] !== '') {
    $idx    = (int)$_REQUEST["ctr"];
    $accode = 0;
    $dr     = 0;
    $cr     = 0;
    include("includes/jv_row.php");
} else {
    echo "ERROR";
}
