<?php
namespace PHPMaker2020\project2;

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	session_start(); // Init session data

// Output buffering
ob_start();

// Autoload
include_once "autoload.php";
?>
<?php

// Write header
WriteHeader(FALSE);

// Create page object
$courses_delete = new courses_delete();

// Run the page
$courses_delete->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$courses_delete->Page_Render();
?>
<?php include_once "header.php"; ?>
<script>
var fcoursesdelete, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "delete";
	fcoursesdelete = currentForm = new ew.Form("fcoursesdelete", "delete");
	loadjs.done("fcoursesdelete");
});
</script>
<script>
loadjs.ready("head", function() {

	// Client script
	// Write your client script here, no need to add script tags.

});
</script>
<?php $courses_delete->showPageHeader(); ?>
<?php
$courses_delete->showMessage();
?>
<form name="fcoursesdelete" id="fcoursesdelete" class="form-inline ew-form ew-delete-form" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($Page->CheckToken) { ?>
<input type="hidden" name="<?php echo Config("TOKEN_NAME") ?>" value="<?php echo $Page->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="courses">
<input type="hidden" name="action" id="action" value="delete">
<?php foreach ($courses_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode(Config("COMPOSITE_KEY_SEPARATOR"), $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?php echo HtmlEncode($keyvalue) ?>">
<?php } ?>
<div class="card ew-card ew-grid">
<div class="<?php echo ResponsiveTableClass() ?>card-body ew-grid-middle-panel">
<table class="table ew-table">
	<thead>
	<tr class="ew-table-header">
<?php if ($courses_delete->id->Visible) { // id ?>
		<th class="<?php echo $courses_delete->id->headerCellClass() ?>"><span id="elh_courses_id" class="courses_id"><?php echo $courses_delete->id->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->time->Visible) { // time ?>
		<th class="<?php echo $courses_delete->time->headerCellClass() ?>"><span id="elh_courses_time" class="courses_time"><?php echo $courses_delete->time->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->courses_name->Visible) { // courses_name ?>
		<th class="<?php echo $courses_delete->courses_name->headerCellClass() ?>"><span id="elh_courses_courses_name" class="courses_courses_name"><?php echo $courses_delete->courses_name->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->description->Visible) { // description ?>
		<th class="<?php echo $courses_delete->description->headerCellClass() ?>"><span id="elh_courses_description" class="courses_description"><?php echo $courses_delete->description->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->courses_name_in->Visible) { // courses_name_in ?>
		<th class="<?php echo $courses_delete->courses_name_in->headerCellClass() ?>"><span id="elh_courses_courses_name_in" class="courses_courses_name_in"><?php echo $courses_delete->courses_name_in->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->description_in->Visible) { // description_in ?>
		<th class="<?php echo $courses_delete->description_in->headerCellClass() ?>"><span id="elh_courses_description_in" class="courses_description_in"><?php echo $courses_delete->description_in->caption() ?></span></th>
<?php } ?>
<?php if ($courses_delete->image->Visible) { // image ?>
		<th class="<?php echo $courses_delete->image->headerCellClass() ?>"><span id="elh_courses_image" class="courses_image"><?php echo $courses_delete->image->caption() ?></span></th>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$courses_delete->RecordCount = 0;
$i = 0;
while (!$courses_delete->Recordset->EOF) {
	$courses_delete->RecordCount++;
	$courses_delete->RowCount++;

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

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

	// Render row
	$courses_delete->renderRow();
?>
	<tr <?php echo $courses->rowAttributes() ?>>
<?php if ($courses_delete->id->Visible) { // id ?>
		<td <?php echo $courses_delete->id->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_id" class="courses_id">
<span<?php echo $courses_delete->id->viewAttributes() ?>><?php echo $courses_delete->id->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->time->Visible) { // time ?>
		<td <?php echo $courses_delete->time->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_time" class="courses_time">
<span<?php echo $courses_delete->time->viewAttributes() ?>><?php echo $courses_delete->time->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->courses_name->Visible) { // courses_name ?>
		<td <?php echo $courses_delete->courses_name->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_courses_name" class="courses_courses_name">
<span<?php echo $courses_delete->courses_name->viewAttributes() ?>><?php echo $courses_delete->courses_name->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->description->Visible) { // description ?>
		<td <?php echo $courses_delete->description->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_description" class="courses_description">
<span<?php echo $courses_delete->description->viewAttributes() ?>><?php echo $courses_delete->description->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->courses_name_in->Visible) { // courses_name_in ?>
		<td <?php echo $courses_delete->courses_name_in->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_courses_name_in" class="courses_courses_name_in">
<span<?php echo $courses_delete->courses_name_in->viewAttributes() ?>><?php echo $courses_delete->courses_name_in->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->description_in->Visible) { // description_in ?>
		<td <?php echo $courses_delete->description_in->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_description_in" class="courses_description_in">
<span<?php echo $courses_delete->description_in->viewAttributes() ?>><?php echo $courses_delete->description_in->getViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($courses_delete->image->Visible) { // image ?>
		<td <?php echo $courses_delete->image->cellAttributes() ?>>
<span id="el<?php echo $courses_delete->RowCount ?>_courses_image" class="courses_image">
<span<?php echo $courses_delete->image->viewAttributes() ?>><?php echo $courses_delete->image->getViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$courses_delete->Recordset->moveNext();
}
$courses_delete->Recordset->close();
?>
</tbody>
</table>
</div>
</div>
<div>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("DeleteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $courses_delete->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
</div>
</form>
<?php
$courses_delete->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

});
</script>
<?php include_once "footer.php"; ?>
<?php
$courses_delete->terminate();
?>