Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cceadmin/
Upload File :
Current File : /var/www/cesa.co.za/cceadmin/CCEExamSectionsdelete.php

<?php
session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include "ewcfg7.php" ?>
<?php include "ewmysql7.php" ?>
<?php include "phpfn7.php" ?>
<?php include "CCEExamSectionsinfo.php" ?>
<?php include "CCEUsersinfo.php" ?>
<?php include "userfn7.php" ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php

// Create page object
$CCEExamSections_delete = new cCCEExamSections_delete();
$Page =& $CCEExamSections_delete;

// Page init
$CCEExamSections_delete->Page_Init();

// Page main
$CCEExamSections_delete->Page_Main();
?>
<?php include "header.php" ?>
<script type="text/javascript">
<!--

// Create page object
var CCEExamSections_delete = new ew_Page("CCEExamSections_delete");

// page properties
CCEExamSections_delete.PageID = "delete"; // page ID
CCEExamSections_delete.FormID = "fCCEExamSectionsdelete"; // form ID
var EW_PAGE_ID = CCEExamSections_delete.PageID; // for backward compatibility

// extend page with Form_CustomValidate function
CCEExamSections_delete.Form_CustomValidate =  
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }
<?php if (EW_CLIENT_VALIDATE) { ?>
CCEExamSections_delete.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEExamSections_delete.ValidateRequired = false; // no JavaScript validation
<?php } ?>

//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--

// Write your client script here, no need to add script tags.
// To include another .js script, use:
// ew_ClientScriptInclude("my_javascript.js"); 
//-->

</script>
<?php

// Load records for display
if ($rs = $CCEExamSections_delete->LoadRecordset())
	$CCEExamSections_deletelTotalRecs = $rs->RecordCount(); // Get record count
if ($CCEExamSections_deletelTotalRecs <= 0) { // No record found, exit
	if ($rs)
		$rs->Close();
	$CCEExamSections_delete->Page_Terminate("CCEExamSectionslist.php"); // Return to list
}
?>
<p><span class="phpmaker"><?php echo $Language->Phrase("Delete") ?>&nbsp;<?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCEExamSections->TableCaption() ?><br><br>
<a href="<?php echo $CCEExamSections->getReturnUrl() ?>"><?php echo $Language->Phrase("GoBack") ?></a></span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$CCEExamSections_delete->ShowMessage();
?>
<form action="<?php echo ew_CurrentPage() ?>" method="post">
<p>
<input type="hidden" name="t" id="t" value="CCEExamSections">
<input type="hidden" name="a_delete" id="a_delete" value="D">
<?php foreach ($CCEExamSections_delete->arRecKeys as $key) { ?>
<input type="hidden" name="key_m[]" id="key_m[]" value="<?php echo ew_HtmlEncode($key) ?>">
<?php } ?>
<table class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable ewTableSeparate">
<?php echo $CCEExamSections->TableCustomInnerHtml ?>
	<thead>
	<tr class="ewTableHeader">
		<td valign="top"><?php echo $CCEExamSections->Section_ID->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->Questionnaire_ID->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->Section_Name->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->Display_Order->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->SelectRandom->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->NumToSelect->FldCaption() ?></td>
		<td valign="top"><?php echo $CCEExamSections->ShowHeading->FldCaption() ?></td>
	</tr>
	</thead>
	<tbody>
<?php
$CCEExamSections_delete->lRecCnt = 0;
$i = 0;
while (!$rs->EOF) {
	$CCEExamSections_delete->lRecCnt++;

	// Set row properties
	$CCEExamSections->CssClass = "";
	$CCEExamSections->CssStyle = "";
	$CCEExamSections->RowAttrs = array();
	$CCEExamSections->RowType = EW_ROWTYPE_VIEW; // View

	// Get the field contents
	$CCEExamSections_delete->LoadRowValues($rs);

	// Render row
	$CCEExamSections_delete->RenderRow();
?>
	<tr<?php echo $CCEExamSections->RowAttributes() ?>>
		<td<?php echo $CCEExamSections->Section_ID->CellAttributes() ?>>
<div<?php echo $CCEExamSections->Section_ID->ViewAttributes() ?>><?php echo $CCEExamSections->Section_ID->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->Questionnaire_ID->CellAttributes() ?>>
<div<?php echo $CCEExamSections->Questionnaire_ID->ViewAttributes() ?>><?php echo $CCEExamSections->Questionnaire_ID->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->Section_Name->CellAttributes() ?>>
<div<?php echo $CCEExamSections->Section_Name->ViewAttributes() ?>><?php echo $CCEExamSections->Section_Name->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->Display_Order->CellAttributes() ?>>
<div<?php echo $CCEExamSections->Display_Order->ViewAttributes() ?>><?php echo $CCEExamSections->Display_Order->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->SelectRandom->CellAttributes() ?>>
<div<?php echo $CCEExamSections->SelectRandom->ViewAttributes() ?>><?php echo $CCEExamSections->SelectRandom->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->NumToSelect->CellAttributes() ?>>
<div<?php echo $CCEExamSections->NumToSelect->ViewAttributes() ?>><?php echo $CCEExamSections->NumToSelect->ListViewValue() ?></div></td>
		<td<?php echo $CCEExamSections->ShowHeading->CellAttributes() ?>>
<div<?php echo $CCEExamSections->ShowHeading->ViewAttributes() ?>><?php echo $CCEExamSections->ShowHeading->ListViewValue() ?></div></td>
	</tr>
<?php
	$rs->MoveNext();
}
$rs->Close();
?>
</tbody>
</table>
</div>
</td></tr></table>
<p>
<input type="submit" name="Action" id="Action" value="<?php echo ew_BtnCaption($Language->Phrase("DeleteBtn")) ?>">
</form>
<script language="JavaScript" type="text/javascript">
<!--

// Write your table-specific startup script here
// document.write("page loaded");
//-->

</script>
<?php include "footer.php" ?>
<?php
$CCEExamSections_delete->Page_Terminate();
?>
<?php

//
// Page class
//
class cCCEExamSections_delete {

	// Page ID
	var $PageID = 'delete';

	// Table name
	var $TableName = 'CCEExamSections';

	// Page object name
	var $PageObjName = 'CCEExamSections_delete';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		global $CCEExamSections;
		if ($CCEExamSections->UseTokenInUrl) $PageUrl .= "t=" . $CCEExamSections->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Page URLs
	var $AddUrl;
	var $EditUrl;
	var $CopyUrl;
	var $DeleteUrl;
	var $ViewUrl;
	var $ListUrl;

	// Export URLs
	var $ExportPrintUrl;
	var $ExportHtmlUrl;
	var $ExportExcelUrl;
	var $ExportWordUrl;
	var $ExportXmlUrl;
	var $ExportCsvUrl;

	// Update URLs
	var $InlineAddUrl;
	var $InlineCopyUrl;
	var $InlineEditUrl;
	var $GridAddUrl;
	var $GridEditUrl;
	var $MultiDeleteUrl;
	var $MultiUpdateUrl;

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		if (@$_SESSION[EW_SESSION_MESSAGE] <> "") { // Append
			$_SESSION[EW_SESSION_MESSAGE] .= "<br>" . $v;
		} else {
			$_SESSION[EW_SESSION_MESSAGE] = $v;
		}
	}

	// Show message
	function ShowMessage() {
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage);
		if ($sMessage <> "") { // Message in Session, display
			echo "<p><span class=\"ewMessage\">" . $sMessage . "</span></p>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm, $CCEExamSections;
		if ($CCEExamSections->UseTokenInUrl) {
			if ($objForm)
				return ($CCEExamSections->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($CCEExamSections->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;

		// Language object
		$Language = new cLanguage();

		// Table object (CCEExamSections)
		$GLOBALS["CCEExamSections"] = new cCCEExamSections();

		// Table object (CCEUsers)
		$GLOBALS['CCEUsers'] = new cCCEUsers();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'delete', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'CCEExamSections', TRUE);

		// Start timer
		$GLOBALS["gsTimer"] = new cTimer();

		// Open connection
		$conn = ew_Connect();
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
		global $CCEExamSections;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$Security->TablePermission_Loading();
		$Security->LoadCurrentUserLevel($this->TableName);
		$Security->TablePermission_Loaded();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		if (!$Security->CanDelete()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("CCEExamSectionslist.php");
		}

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		$this->Page_Redirecting($url);
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $lTotalRecs = 0;
	var $lRecCnt;
	var $arRecKeys = array();

	//
	// Page main
	//
	function Page_Main() {
		global $Language, $CCEExamSections;

		// Load key parameters
		$sKey = "";
		$bSingleDelete = TRUE; // Initialize as single delete
		$nKeySelected = 0; // Initialize selected key count
		$sFilter = "";
		if (@$_GET["Section_ID"] <> "") {
			$CCEExamSections->Section_ID->setQueryStringValue($_GET["Section_ID"]);
			if (!is_numeric($CCEExamSections->Section_ID->QueryStringValue))
				$this->Page_Terminate("CCEExamSectionslist.php"); // Prevent SQL injection, exit
			$sKey .= $CCEExamSections->Section_ID->QueryStringValue;
		} else {
			$bSingleDelete = FALSE;
		}
		if ($bSingleDelete) {
			$nKeySelected = 1; // Set up key selected count
			$this->arRecKeys[0] = $sKey;
		} else {
			if (isset($_POST["key_m"])) { // Key in form
				$nKeySelected = count($_POST["key_m"]); // Set up key selected count
				$this->arRecKeys = ew_StripSlashes($_POST["key_m"]);
			}
		}
		if ($nKeySelected <= 0)
			$this->Page_Terminate("CCEExamSectionslist.php"); // No key specified, return to list

		// Build filter
		foreach ($this->arRecKeys as $sKey) {
			$sFilter .= "(";

			// Set up key field
			$sKeyFld = $sKey;
			if (!is_numeric($sKeyFld))
				$this->Page_Terminate("CCEExamSectionslist.php"); // Prevent SQL injection, return to list
			$sFilter .= "`Section_ID`=" . ew_AdjustSql($sKeyFld) . " AND ";
			if (substr($sFilter, -5) == " AND ") $sFilter = substr($sFilter, 0, strlen($sFilter)-5) . ") OR ";
		}
		if (substr($sFilter, -4) == " OR ") $sFilter = substr($sFilter, 0, strlen($sFilter)-4);

		// Set up filter (SQL WHHERE clause) and get return SQL
		// SQL constructor in CCEExamSections class, CCEExamSectionsinfo.php

		$CCEExamSections->CurrentFilter = $sFilter;

		// Get action
		if (@$_POST["a_delete"] <> "") {
			$CCEExamSections->CurrentAction = $_POST["a_delete"];
		} else {
			$CCEExamSections->CurrentAction = "I"; // Display record
		}
		switch ($CCEExamSections->CurrentAction) {
			case "D": // Delete
				$CCEExamSections->SendEmail = TRUE; // Send email on delete success
				if ($this->DeleteRows()) { // delete rows
					$this->setMessage($Language->Phrase("DeleteSuccess")); // Set up success message
					$this->Page_Terminate($CCEExamSections->getReturnUrl()); // Return to caller
				}
		}
	}

	//
	// Delete records based on current filter
	//
	function DeleteRows() {
		global $conn, $Language, $Security, $CCEExamSections;
		$DeleteRows = TRUE;
		$sWrkFilter = $CCEExamSections->CurrentFilter;

		// Set up filter (SQL WHERE clause) and get return SQL
		// SQL constructor in CCEExamSections class, CCEExamSectionsinfo.php

		$CCEExamSections->CurrentFilter = $sWrkFilter;
		$sSql = $CCEExamSections->SQL();
		$conn->raiseErrorFn = 'ew_ErrorFn';
		$rs = $conn->Execute($sSql);
		$conn->raiseErrorFn = '';
		if ($rs === FALSE) {
			return FALSE;
		} elseif ($rs->EOF) {
			$this->setMessage($Language->Phrase("NoRecord")); // No record found
			$rs->Close();
			return FALSE;
		}
		$conn->BeginTrans();

		// Clone old rows
		$rsold = ($rs) ? $rs->GetRows() : array();
		if ($rs)
			$rs->Close();

		// Call row deleting event
		if ($DeleteRows) {
			foreach ($rsold as $row) {
				$DeleteRows = $CCEExamSections->Row_Deleting($row);
				if (!$DeleteRows) break;
			}
		}
		if ($DeleteRows) {
			$sKey = "";
			foreach ($rsold as $row) {
				$sThisKey = "";
				if ($sThisKey <> "") $sThisKey .= EW_COMPOSITE_KEY_SEPARATOR;
				$sThisKey .= $row['Section_ID'];
				$conn->raiseErrorFn = 'ew_ErrorFn';
				$DeleteRows = $conn->Execute($CCEExamSections->DeleteSQL($row)); // Delete
				$conn->raiseErrorFn = '';
				if ($DeleteRows === FALSE)
					break;
				if ($sKey <> "") $sKey .= ", ";
				$sKey .= $sThisKey;
			}
		} else {

			// Set up error message
			if ($CCEExamSections->CancelMessage <> "") {
				$this->setMessage($CCEExamSections->CancelMessage);
				$CCEExamSections->CancelMessage = "";
			} else {
				$this->setMessage($Language->Phrase("DeleteCancelled"));
			}
		}
		if ($DeleteRows) {
			$conn->CommitTrans(); // Commit the changes
		} else {
			$conn->RollbackTrans(); // Rollback changes
		}

		// Call Row Deleted event
		if ($DeleteRows) {
			foreach ($rsold as $row) {
				$CCEExamSections->Row_Deleted($row);
			}	
		}
		return $DeleteRows;
	}

	// Load recordset
	function LoadRecordset($offset = -1, $rowcnt = -1) {
		global $conn, $CCEExamSections;

		// Call Recordset Selecting event
		$CCEExamSections->Recordset_Selecting($CCEExamSections->CurrentFilter);

		// Load List page SQL
		$sSql = $CCEExamSections->SelectSQL();
		if ($offset > -1 && $rowcnt > -1)
			$sSql .= " LIMIT $offset, $rowcnt";

		// Load recordset
		$rs = ew_LoadRecordset($sSql);

		// Call Recordset Selected event
		$CCEExamSections->Recordset_Selected($rs);
		return $rs;
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $CCEExamSections;
		$sFilter = $CCEExamSections->KeyFilter();

		// Call Row Selecting event
		$CCEExamSections->Row_Selecting($sFilter);

		// Load SQL based on filter
		$CCEExamSections->CurrentFilter = $sFilter;
		$sSql = $CCEExamSections->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values

			// Call Row Selected event
			$CCEExamSections->Row_Selected($rs);
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn, $CCEExamSections;
		$CCEExamSections->Section_ID->setDbValue($rs->fields('Section_ID'));
		$CCEExamSections->Questionnaire_ID->setDbValue($rs->fields('Questionnaire_ID'));
		$CCEExamSections->Section_Name->setDbValue($rs->fields('Section_Name'));
		$CCEExamSections->Section_Text->setDbValue($rs->fields('Section_Text'));
		$CCEExamSections->Display_Order->setDbValue($rs->fields('Display_Order'));
		$CCEExamSections->SelectRandom->setDbValue($rs->fields('SelectRandom'));
		$CCEExamSections->NumToSelect->setDbValue($rs->fields('NumToSelect'));
		$CCEExamSections->ShowHeading->setDbValue($rs->fields('ShowHeading'));
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language, $CCEExamSections;

		// Initialize URLs
		// Call Row_Rendering event

		$CCEExamSections->Row_Rendering();

		// Common render codes for all row types
		// Section_ID

		$CCEExamSections->Section_ID->CellCssStyle = ""; $CCEExamSections->Section_ID->CellCssClass = "";
		$CCEExamSections->Section_ID->CellAttrs = array(); $CCEExamSections->Section_ID->ViewAttrs = array(); $CCEExamSections->Section_ID->EditAttrs = array();

		// Questionnaire_ID
		$CCEExamSections->Questionnaire_ID->CellCssStyle = ""; $CCEExamSections->Questionnaire_ID->CellCssClass = "";
		$CCEExamSections->Questionnaire_ID->CellAttrs = array(); $CCEExamSections->Questionnaire_ID->ViewAttrs = array(); $CCEExamSections->Questionnaire_ID->EditAttrs = array();

		// Section_Name
		$CCEExamSections->Section_Name->CellCssStyle = ""; $CCEExamSections->Section_Name->CellCssClass = "";
		$CCEExamSections->Section_Name->CellAttrs = array(); $CCEExamSections->Section_Name->ViewAttrs = array(); $CCEExamSections->Section_Name->EditAttrs = array();

		// Display_Order
		$CCEExamSections->Display_Order->CellCssStyle = ""; $CCEExamSections->Display_Order->CellCssClass = "";
		$CCEExamSections->Display_Order->CellAttrs = array(); $CCEExamSections->Display_Order->ViewAttrs = array(); $CCEExamSections->Display_Order->EditAttrs = array();

		// SelectRandom
		$CCEExamSections->SelectRandom->CellCssStyle = ""; $CCEExamSections->SelectRandom->CellCssClass = "";
		$CCEExamSections->SelectRandom->CellAttrs = array(); $CCEExamSections->SelectRandom->ViewAttrs = array(); $CCEExamSections->SelectRandom->EditAttrs = array();

		// NumToSelect
		$CCEExamSections->NumToSelect->CellCssStyle = ""; $CCEExamSections->NumToSelect->CellCssClass = "";
		$CCEExamSections->NumToSelect->CellAttrs = array(); $CCEExamSections->NumToSelect->ViewAttrs = array(); $CCEExamSections->NumToSelect->EditAttrs = array();

		// ShowHeading
		$CCEExamSections->ShowHeading->CellCssStyle = ""; $CCEExamSections->ShowHeading->CellCssClass = "";
		$CCEExamSections->ShowHeading->CellAttrs = array(); $CCEExamSections->ShowHeading->ViewAttrs = array(); $CCEExamSections->ShowHeading->EditAttrs = array();
		if ($CCEExamSections->RowType == EW_ROWTYPE_VIEW) { // View row

			// Section_ID
			$CCEExamSections->Section_ID->ViewValue = $CCEExamSections->Section_ID->CurrentValue;
			$CCEExamSections->Section_ID->CssStyle = "";
			$CCEExamSections->Section_ID->CssClass = "";
			$CCEExamSections->Section_ID->ViewCustomAttributes = "";

			// Questionnaire_ID
			if (strval($CCEExamSections->Questionnaire_ID->CurrentValue) <> "") {
				$sFilterWrk = "`Questionnaire_ID` = " . ew_AdjustSql($CCEExamSections->Questionnaire_ID->CurrentValue) . "";
			$sSqlWrk = "SELECT `Questionnaire_Name` FROM `CCEExams`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `Questionnaire_Name` Asc";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$CCEExamSections->Questionnaire_ID->ViewValue = $rswrk->fields('Questionnaire_Name');
					$rswrk->Close();
				} else {
					$CCEExamSections->Questionnaire_ID->ViewValue = $CCEExamSections->Questionnaire_ID->CurrentValue;
				}
			} else {
				$CCEExamSections->Questionnaire_ID->ViewValue = NULL;
			}
			$CCEExamSections->Questionnaire_ID->CssStyle = "";
			$CCEExamSections->Questionnaire_ID->CssClass = "";
			$CCEExamSections->Questionnaire_ID->ViewCustomAttributes = "";

			// Section_Name
			$CCEExamSections->Section_Name->ViewValue = $CCEExamSections->Section_Name->CurrentValue;
			$CCEExamSections->Section_Name->CssStyle = "";
			$CCEExamSections->Section_Name->CssClass = "";
			$CCEExamSections->Section_Name->ViewCustomAttributes = "";

			// Display_Order
			$CCEExamSections->Display_Order->ViewValue = $CCEExamSections->Display_Order->CurrentValue;
			$CCEExamSections->Display_Order->CssStyle = "";
			$CCEExamSections->Display_Order->CssClass = "";
			$CCEExamSections->Display_Order->ViewCustomAttributes = "";

			// SelectRandom
			if (strval($CCEExamSections->SelectRandom->CurrentValue) <> "") {
				switch ($CCEExamSections->SelectRandom->CurrentValue) {
					case "1":
						$CCEExamSections->SelectRandom->ViewValue = "Yes";
						break;
					case "0":
						$CCEExamSections->SelectRandom->ViewValue = "No";
						break;
					default:
						$CCEExamSections->SelectRandom->ViewValue = $CCEExamSections->SelectRandom->CurrentValue;
				}
			} else {
				$CCEExamSections->SelectRandom->ViewValue = NULL;
			}
			$CCEExamSections->SelectRandom->CssStyle = "";
			$CCEExamSections->SelectRandom->CssClass = "";
			$CCEExamSections->SelectRandom->ViewCustomAttributes = "";

			// NumToSelect
			$CCEExamSections->NumToSelect->ViewValue = $CCEExamSections->NumToSelect->CurrentValue;
			$CCEExamSections->NumToSelect->CssStyle = "";
			$CCEExamSections->NumToSelect->CssClass = "";
			$CCEExamSections->NumToSelect->ViewCustomAttributes = "";

			// ShowHeading
			if (strval($CCEExamSections->ShowHeading->CurrentValue) <> "") {
				switch ($CCEExamSections->ShowHeading->CurrentValue) {
					case "1":
						$CCEExamSections->ShowHeading->ViewValue = "Yes";
						break;
					case "0":
						$CCEExamSections->ShowHeading->ViewValue = "No";
						break;
					default:
						$CCEExamSections->ShowHeading->ViewValue = $CCEExamSections->ShowHeading->CurrentValue;
				}
			} else {
				$CCEExamSections->ShowHeading->ViewValue = NULL;
			}
			$CCEExamSections->ShowHeading->CssStyle = "";
			$CCEExamSections->ShowHeading->CssClass = "";
			$CCEExamSections->ShowHeading->ViewCustomAttributes = "";

			// Section_ID
			$CCEExamSections->Section_ID->HrefValue = "";
			$CCEExamSections->Section_ID->TooltipValue = "";

			// Questionnaire_ID
			$CCEExamSections->Questionnaire_ID->HrefValue = "";
			$CCEExamSections->Questionnaire_ID->TooltipValue = "";

			// Section_Name
			$CCEExamSections->Section_Name->HrefValue = "";
			$CCEExamSections->Section_Name->TooltipValue = "";

			// Display_Order
			$CCEExamSections->Display_Order->HrefValue = "";
			$CCEExamSections->Display_Order->TooltipValue = "";

			// SelectRandom
			$CCEExamSections->SelectRandom->HrefValue = "";
			$CCEExamSections->SelectRandom->TooltipValue = "";

			// NumToSelect
			$CCEExamSections->NumToSelect->HrefValue = "";
			$CCEExamSections->NumToSelect->TooltipValue = "";

			// ShowHeading
			$CCEExamSections->ShowHeading->HrefValue = "";
			$CCEExamSections->ShowHeading->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($CCEExamSections->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$CCEExamSections->Row_Rendered();
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	function Message_Showing(&$msg) {

		// Example:
		//$msg = "your new message";

	}
}
?>