<?php

namespace PHPMaker2021\rdigital21;

// Page object
$GuruDelete = &$Page;
?>
<script>
var currentForm, currentPageID;
var fgurudelete;
loadjs.ready("head", function () {
    var $ = jQuery;
    // Form object
    currentPageID = ew.PAGE_ID = "delete";
    fgurudelete = currentForm = new ew.Form("fgurudelete", "delete");
    loadjs.done("fgurudelete");
});
</script>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<script>
if (!ew.vars.tables.guru) ew.vars.tables.guru = <?= JsonEncode(GetClientVar("tables", "guru")) ?>;
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<form name="fgurudelete" id="fgurudelete" class="form-inline ew-form ew-delete-form" action="<?= CurrentPageUrl(false) ?>" method="post">
<?php if (Config("CHECK_TOKEN")) { ?>
<input type="hidden" name="<?= $TokenNameKey ?>" value="<?= $TokenName ?>"><!-- CSRF token name -->
<input type="hidden" name="<?= $TokenValueKey ?>" value="<?= $TokenValue ?>"><!-- CSRF token value -->
<?php } ?>
<input type="hidden" name="t" value="guru">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($Page->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("COMPOSITE_KEY_SEPARATOR"), $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?= HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid">
<div class="<?= ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
    <thead>
    <tr class="ew-table-header">
<?php if ($Page->guru_id->Visible) { // guru_id ?>
        <th class="<?= $Page->guru_id->headerCellClass() ?>"><span id="elh_guru_guru_id" class="guru_guru_id"><?= $Page->guru_id->caption() ?></span></th>
<?php } ?>
<?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <th class="<?= $Page->kode_tapel->headerCellClass() ?>"><span id="elh_guru_kode_tapel" class="guru_kode_tapel"><?= $Page->kode_tapel->caption() ?></span></th>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
        <th class="<?= $Page->nama->headerCellClass() ?>"><span id="elh_guru_nama" class="guru_nama"><?= $Page->nama->caption() ?></span></th>
<?php } ?>
<?php if ($Page->nip->Visible) { // nip ?>
        <th class="<?= $Page->nip->headerCellClass() ?>"><span id="elh_guru_nip" class="guru_nip"><?= $Page->nip->caption() ?></span></th>
<?php } ?>
<?php if ($Page->user->Visible) { // user ?>
        <th class="<?= $Page->user->headerCellClass() ?>"><span id="elh_guru_user" class="guru_user"><?= $Page->user->caption() ?></span></th>
<?php } ?>
<?php if ($Page->pass->Visible) { // pass ?>
        <th class="<?= $Page->pass->headerCellClass() ?>"><span id="elh_guru_pass" class="guru_pass"><?= $Page->pass->caption() ?></span></th>
<?php } ?>
    </tr>
    </thead>
    <tbody>
<?php
$Page->RecordCount = 0;
$i = 0;
while (!$Page->Recordset->EOF) {
    $Page->RecordCount++;
    $Page->RowCount++;

    // Set row properties
    $Page->resetAttributes();
    $Page->RowType = ROWTYPE_VIEW; // View

    // Get the field contents
    $Page->loadRowValues($Page->Recordset);

    // Render row
    $Page->renderRow();
?>
    <tr <?= $Page->rowAttributes() ?>>
<?php if ($Page->guru_id->Visible) { // guru_id ?>
        <td <?= $Page->guru_id->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_guru_id" class="guru_guru_id">
<span<?= $Page->guru_id->viewAttributes() ?>>
<?= $Page->guru_id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->kode_tapel->Visible) { // kode_tapel ?>
        <td <?= $Page->kode_tapel->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_kode_tapel" class="guru_kode_tapel">
<span<?= $Page->kode_tapel->viewAttributes() ?>>
<?= $Page->kode_tapel->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->nama->Visible) { // nama ?>
        <td <?= $Page->nama->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_nama" class="guru_nama">
<span<?= $Page->nama->viewAttributes() ?>>
<?= $Page->nama->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->nip->Visible) { // nip ?>
        <td <?= $Page->nip->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_nip" class="guru_nip">
<span<?= $Page->nip->viewAttributes() ?>>
<?= $Page->nip->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->user->Visible) { // user ?>
        <td <?= $Page->user->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_user" class="guru_user">
<span<?= $Page->user->viewAttributes() ?>>
<?= $Page->user->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($Page->pass->Visible) { // pass ?>
        <td <?= $Page->pass->cellAttributes() ?>>
<span id="el<?= $Page->RowCount ?>_guru_pass" class="guru_pass">
<span<?= $Page->pass->viewAttributes() ?>>
<?= $Page->pass->getViewValue() ?></span>
</span>
</td>
<?php } ?>
    </tr>
<?php
    $Page->Recordset->moveNext();
}
$Page->Recordset->close();
?>
</tbody>
</table>
</div>
</div>
<div>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?= $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?= HtmlEncode(GetUrl($Page->getReturnUrl())) ?>"><?= $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
