| Current Path : /var/www/cesa.co.za/cceadmin/ |
| Current File : /var/www/cesa.co.za/cceadmin/CCEExamQuestionsview.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 "CCEExamQuestionsinfo.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
$CCEExamQuestions_view = new cCCEExamQuestions_view();
$Page =& $CCEExamQuestions_view;
// Page init
$CCEExamQuestions_view->Page_Init();
// Page main
$CCEExamQuestions_view->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($CCEExamQuestions->Export == "") { ?>
<script type="text/javascript">
<!--
// Create page object
var CCEExamQuestions_view = new ew_Page("CCEExamQuestions_view");
// page properties
CCEExamQuestions_view.PageID = "view"; // page ID
CCEExamQuestions_view.FormID = "fCCEExamQuestionsview"; // form ID
var EW_PAGE_ID = CCEExamQuestions_view.PageID; // for backward compatibility
// extend page with Form_CustomValidate function
CCEExamQuestions_view.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) { ?>
CCEExamQuestions_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEExamQuestions_view.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 } ?>
<p><span class="phpmaker"><?php echo $Language->Phrase("View") ?> <?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCEExamQuestions->TableCaption() ?>
<?php if ($CCEExamQuestions->Export == "") { ?>
<a href="<?php echo $CCEExamQuestions_view->ExportPrintUrl ?>"><img src="images/print.gif" alt="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" title="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" width="16" height="16" border="0"></a>
<a href="<?php echo $CCEExamQuestions_view->ExportExcelUrl ?>"><img src='images/exportxls.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' width='16' height='16' border='0'></a>
<a href="<?php echo $CCEExamQuestions_view->ExportWordUrl ?>"><img src='images/exportdoc.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' width='16' height='16' border='0'></a>
<a name="emf_CCEExamQuestions" id="emf_CCEExamQuestions" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_CCEExamQuestions',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($CCEExamQuestions_view->arRecKey) ?>,sel:false});"><img src='images/exportemail.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' width='16' height='16' border='0'></a>
<?php } ?>
<br><br>
<?php if ($CCEExamQuestions->Export == "") { ?>
<a href="<?php echo $CCEExamQuestions_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>
<?php if ($Security->CanAdd()) { ?>
<a href="<?php echo $CCEExamQuestions_view->AddUrl ?>"><?php echo $Language->Phrase("ViewPageAddLink") ?></a>
<?php } ?>
<?php if ($Security->CanEdit()) { ?>
<a href="<?php echo $CCEExamQuestions_view->EditUrl ?>"><?php echo $Language->Phrase("ViewPageEditLink") ?></a>
<?php } ?>
<?php if ($Security->CanAdd()) { ?>
<a href="<?php echo $CCEExamQuestions_view->CopyUrl ?>"><?php echo $Language->Phrase("ViewPageCopyLink") ?></a>
<?php } ?>
<?php if ($Security->CanDelete()) { ?>
<a href="<?php echo $CCEExamQuestions_view->DeleteUrl ?>"><?php echo $Language->Phrase("ViewPageDeleteLink") ?></a>
<?php } ?>
<?php if ($Security->AllowList('CCEExamAnswers')) { ?>
<a href="CCEExamAnswerslist.php?<?php echo EW_TABLE_SHOW_MASTER ?>=CCEExamQuestions&Question_ID=<?php echo urlencode(strval($CCEExamQuestions->Question_ID->CurrentValue)) ?>"><?php echo $Language->Phrase("ViewPageDetailLink") ?><?php echo $Language->TablePhrase("CCEExamAnswers", "TblCaption") ?>
</a>
<?php } ?>
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$CCEExamQuestions_view->ShowMessage();
?>
<p>
<?php if ($CCEExamQuestions->Export == "") { ?>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
<tr>
<td nowrap>
<?php if (!isset($CCEExamQuestions_view->Pager)) $CCEExamQuestions_view->Pager = new cPrevNextPager($CCEExamQuestions_view->lStartRec, $CCEExamQuestions_view->lDisplayRecs, $CCEExamQuestions_view->lTotalRecs) ?>
<?php if ($CCEExamQuestions_view->Pager->RecordCount > 0) { ?>
<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?> </span></td>
<!--first page button-->
<?php if ($CCEExamQuestions_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--previous page button-->
<?php if ($CCEExamQuestions_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--current page number-->
<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CCEExamQuestions_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CCEExamQuestions_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--last page button-->
<?php if ($CCEExamQuestions_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<td><span class="phpmaker"> <?php echo $Language->Phrase("of") ?> <?php echo $CCEExamQuestions_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($CCEExamQuestions_view->sSrchWhere == "0=101") { ?>
<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
<?php } ?>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
<?php } ?>
<?php } ?>
</td>
</tr>
</table>
</form>
<br>
<?php } ?>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
<?php if ($CCEExamQuestions->Question_ID->Visible) { // Question_ID ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Question_ID->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Question_ID->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Question_ID->ViewAttributes() ?>><?php echo $CCEExamQuestions->Question_ID->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Questionnaire_ID->Visible) { // Questionnaire_ID ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Questionnaire_ID->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Questionnaire_ID->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Questionnaire_ID->ViewAttributes() ?>><?php echo $CCEExamQuestions->Questionnaire_ID->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Section_ID->Visible) { // Section_ID ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Section_ID->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Section_ID->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Section_ID->ViewAttributes() ?>><?php echo $CCEExamQuestions->Section_ID->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Question->Visible) { // Question ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Question->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Question->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Question->ViewAttributes() ?>><?php echo $CCEExamQuestions->Question->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Display_Order->Visible) { // Display_Order ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Display_Order->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Display_Order->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Display_Order->ViewAttributes() ?>><?php echo $CCEExamQuestions->Display_Order->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->IsMulti->Visible) { // IsMulti ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->IsMulti->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->IsMulti->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->IsMulti->ViewAttributes() ?>><?php echo $CCEExamQuestions->IsMulti->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->IsOptional->Visible) { // IsOptional ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->IsOptional->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->IsOptional->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->IsOptional->ViewAttributes() ?>><?php echo $CCEExamQuestions->IsOptional->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Answer_Type->Visible) { // Answer_Type ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Answer_Type->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Answer_Type->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Answer_Type->ViewAttributes() ?>><?php echo $CCEExamQuestions->Answer_Type->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Answer_Template->Visible) { // Answer_Template ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Answer_Template->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Answer_Template->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Answer_Template->ViewAttributes() ?>><?php echo $CCEExamQuestions->Answer_Template->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->Model_Answer->Visible) { // Model_Answer ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->Model_Answer->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->Model_Answer->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->Model_Answer->ViewAttributes() ?>><?php echo $CCEExamQuestions->Model_Answer->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->ParentQuestionID->Visible) { // ParentQuestionID ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->ParentQuestionID->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->ParentQuestionID->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->ParentQuestionID->ViewAttributes() ?>><?php echo $CCEExamQuestions->ParentQuestionID->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->RequireNumber->Visible) { // RequireNumber ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->RequireNumber->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->RequireNumber->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->RequireNumber->ViewAttributes() ?>><?php echo $CCEExamQuestions->RequireNumber->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->MinNum->Visible) { // MinNum ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->MinNum->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->MinNum->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->MinNum->ViewAttributes() ?>><?php echo $CCEExamQuestions->MinNum->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->MaxNum->Visible) { // MaxNum ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->MaxNum->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->MaxNum->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->MaxNum->ViewAttributes() ?>><?php echo $CCEExamQuestions->MaxNum->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->RecallPrevAnswer->Visible) { // RecallPrevAnswer ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->RecallPrevAnswer->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->RecallPrevAnswer->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->RecallPrevAnswer->ViewAttributes() ?>><?php echo $CCEExamQuestions->RecallPrevAnswer->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->QuestionTitle->Visible) { // QuestionTitle ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->QuestionTitle->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->QuestionTitle->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->QuestionTitle->ViewAttributes() ?>><?php echo $CCEExamQuestions->QuestionTitle->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->NumMarks->Visible) { // NumMarks ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->NumMarks->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->NumMarks->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->NumMarks->ViewAttributes() ?>><?php echo $CCEExamQuestions->NumMarks->ViewValue ?></div></td>
</tr>
<?php } ?>
<?php if ($CCEExamQuestions->InUse->Visible) { // InUse ?>
<tr<?php echo $CCEExamQuestions->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEExamQuestions->InUse->FldCaption() ?></td>
<td<?php echo $CCEExamQuestions->InUse->CellAttributes() ?>>
<div<?php echo $CCEExamQuestions->InUse->ViewAttributes() ?>><?php echo $CCEExamQuestions->InUse->ViewValue ?></div></td>
</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($CCEExamQuestions->Export == "") { ?>
<br>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
<tr>
<td nowrap>
<?php if (!isset($CCEExamQuestions_view->Pager)) $CCEExamQuestions_view->Pager = new cPrevNextPager($CCEExamQuestions_view->lStartRec, $CCEExamQuestions_view->lDisplayRecs, $CCEExamQuestions_view->lTotalRecs) ?>
<?php if ($CCEExamQuestions_view->Pager->RecordCount > 0) { ?>
<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?> </span></td>
<!--first page button-->
<?php if ($CCEExamQuestions_view->Pager->FirstButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--previous page button-->
<?php if ($CCEExamQuestions_view->Pager->PrevButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--current page number-->
<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CCEExamQuestions_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
<?php if ($CCEExamQuestions_view->Pager->NextButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<!--last page button-->
<?php if ($CCEExamQuestions_view->Pager->LastButton->Enabled) { ?>
<td><a href="<?php echo $CCEExamQuestions_view->PageUrl() ?>start=<?php echo $CCEExamQuestions_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>
<?php } else { ?>
<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
<?php } ?>
<td><span class="phpmaker"> <?php echo $Language->Phrase("of") ?> <?php echo $CCEExamQuestions_view->Pager->PageCount ?></span></td>
</tr></table>
<?php } else { ?>
<?php if ($Security->CanList()) { ?>
<?php if ($CCEExamQuestions_view->sSrchWhere == "0=101") { ?>
<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
<?php } ?>
<?php } else { ?>
<span class="phpmaker"><?php echo $Language->Phrase("NoPermission") ?></span>
<?php } ?>
<?php } ?>
</td>
</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($CCEExamQuestions->Export == "") { ?>
<script language="JavaScript" type="text/javascript">
<!--
// Write your table-specific startup script here
// document.write("page loaded");
//-->
</script>
<?php } ?>
<?php include "footer.php" ?>
<?php
$CCEExamQuestions_view->Page_Terminate();
?>
<?php
//
// Page class
//
class cCCEExamQuestions_view {
// Page ID
var $PageID = 'view';
// Table name
var $TableName = 'CCEExamQuestions';
// Page object name
var $PageObjName = 'CCEExamQuestions_view';
// Page name
function PageName() {
return ew_CurrentPage();
}
// Page URL
function PageUrl() {
$PageUrl = ew_CurrentPage() . "?";
global $CCEExamQuestions;
if ($CCEExamQuestions->UseTokenInUrl) $PageUrl .= "t=" . $CCEExamQuestions->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, $CCEExamQuestions;
if ($CCEExamQuestions->UseTokenInUrl) {
if ($objForm)
return ($CCEExamQuestions->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($CCEExamQuestions->TableVar == $_GET["t"]);
} else {
return TRUE;
}
}
//
// Page class constructor
//
function __construct() {
global $conn, $Language;
// Language object
$Language = new cLanguage();
// Table object (CCEExamQuestions)
$GLOBALS["CCEExamQuestions"] = new cCCEExamQuestions();
// Table object (CCEUsers)
$GLOBALS['CCEUsers'] = new cCCEUsers();
// Page ID
if (!defined("EW_PAGE_ID"))
define("EW_PAGE_ID", 'view', TRUE);
// Table name (for backward compatibility)
if (!defined("EW_TABLE_NAME"))
define("EW_TABLE_NAME", 'CCEExamQuestions', 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 $CCEExamQuestions;
// 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->CanView()) {
$Security->SaveLastUrl();
$this->Page_Terminate("CCEExamQuestionslist.php");
}
// Get export parameters
if (@$_GET["export"] <> "") {
$CCEExamQuestions->Export = $_GET["export"];
} elseif (ew_IsHttpPost()) {
if (@$_POST["exporttype"] <> "")
$CCEExamQuestions->Export = $_POST["exporttype"];
} else {
$CCEExamQuestions->setExportReturnUrl(ew_CurrentUrl());
}
$gsExport = $CCEExamQuestions->Export; // Get export parameter, used in header
$gsExportFile = $CCEExamQuestions->TableVar; // Get export file, used in header
if (@$_GET["Question_ID"] <> "") {
if ($gsExportFile <> "") $gsExportFile .= "_";
$gsExportFile .= ew_StripSlashes($_GET["Question_ID"]);
}
if ($CCEExamQuestions->Export == "excel") {
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
}
if ($CCEExamQuestions->Export == "word") {
header('Content-Type: application/vnd.ms-word');
header('Content-Disposition: attachment; filename=' . $gsExportFile .'.doc');
}
// 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 $lDisplayRecs = 1;
var $lStartRec;
var $lStopRec;
var $lTotalRecs = 0;
var $lRecRange = 10;
var $lRecCnt;
var $arRecKey = array();
//
// Page main
//
function Page_Main() {
global $Language, $CCEExamQuestions;
// Load current record
$bLoadCurrentRecord = FALSE;
$sReturnUrl = "";
$bMatchRecord = FALSE;
if ($this->IsPageRequest()) { // Validate request
if (@$_GET["Question_ID"] <> "") {
$CCEExamQuestions->Question_ID->setQueryStringValue($_GET["Question_ID"]);
$this->arRecKey["Question_ID"] = $CCEExamQuestions->Question_ID->QueryStringValue;
} else {
$bLoadCurrentRecord = TRUE;
}
// Get action
$CCEExamQuestions->CurrentAction = "I"; // Display form
switch ($CCEExamQuestions->CurrentAction) {
case "I": // Get a record to display
$this->lStartRec = 1; // Initialize start position
if ($rs = $this->LoadRecordset()) // Load records
$this->lTotalRecs = $rs->RecordCount(); // Get record count
if ($this->lTotalRecs <= 0) { // No record found
$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
$this->Page_Terminate("CCEExamQuestionslist.php"); // Return to list page
} elseif ($bLoadCurrentRecord) { // Load current record position
$this->SetUpStartRec(); // Set up start record position
// Point to current record
if (intval($this->lStartRec) <= intval($this->lTotalRecs)) {
$bMatchRecord = TRUE;
$rs->Move($this->lStartRec-1);
}
} else { // Match key values
while (!$rs->EOF) {
if (strval($CCEExamQuestions->Question_ID->CurrentValue) == strval($rs->fields('Question_ID'))) {
$CCEExamQuestions->setStartRecordNumber($this->lStartRec); // Save record position
$bMatchRecord = TRUE;
break;
} else {
$this->lStartRec++;
$rs->MoveNext();
}
}
}
if (!$bMatchRecord) {
$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
$sReturnUrl = "CCEExamQuestionslist.php"; // No matching record, return to list
} else {
$this->LoadRowValues($rs); // Load row values
}
}
// Export data only
if (in_array($CCEExamQuestions->Export, array("html","word","excel","xml","csv","email"))) {
$this->ExportData();
if ($CCEExamQuestions->Export <> "email")
$this->Page_Terminate(); // Terminate response
exit();
}
} else {
$sReturnUrl = "CCEExamQuestionslist.php"; // Not page request, return to list
}
if ($sReturnUrl <> "")
$this->Page_Terminate($sReturnUrl);
// Render row
$CCEExamQuestions->RowType = EW_ROWTYPE_VIEW;
$this->RenderRow();
}
// Set up starting record parameters
function SetUpStartRec() {
global $CCEExamQuestions;
if ($this->lDisplayRecs == 0)
return;
if ($this->IsPageRequest()) { // Validate request
if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
$this->lStartRec = $_GET[EW_TABLE_START_REC];
$CCEExamQuestions->setStartRecordNumber($this->lStartRec);
} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
$this->nPageNo = $_GET[EW_TABLE_PAGE_NO];
if (is_numeric($this->nPageNo)) {
$this->lStartRec = ($this->nPageNo-1)*$this->lDisplayRecs+1;
if ($this->lStartRec <= 0) {
$this->lStartRec = 1;
} elseif ($this->lStartRec >= intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1) {
$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1;
}
$CCEExamQuestions->setStartRecordNumber($this->lStartRec);
}
}
}
$this->lStartRec = $CCEExamQuestions->getStartRecordNumber();
// Check if correct start record counter
if (!is_numeric($this->lStartRec) || $this->lStartRec == "") { // Avoid invalid start record counter
$this->lStartRec = 1; // Reset start record counter
$CCEExamQuestions->setStartRecordNumber($this->lStartRec);
} elseif (intval($this->lStartRec) > intval($this->lTotalRecs)) { // Avoid starting record > total records
$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to last page first record
$CCEExamQuestions->setStartRecordNumber($this->lStartRec);
} elseif (($this->lStartRec-1) % $this->lDisplayRecs <> 0) {
$this->lStartRec = intval(($this->lStartRec-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to page boundary
$CCEExamQuestions->setStartRecordNumber($this->lStartRec);
}
}
// Load recordset
function LoadRecordset($offset = -1, $rowcnt = -1) {
global $conn, $CCEExamQuestions;
// Call Recordset Selecting event
$CCEExamQuestions->Recordset_Selecting($CCEExamQuestions->CurrentFilter);
// Load List page SQL
$sSql = $CCEExamQuestions->SelectSQL();
if ($offset > -1 && $rowcnt > -1)
$sSql .= " LIMIT $offset, $rowcnt";
// Load recordset
$rs = ew_LoadRecordset($sSql);
// Call Recordset Selected event
$CCEExamQuestions->Recordset_Selected($rs);
return $rs;
}
// Load row based on key values
function LoadRow() {
global $conn, $Security, $CCEExamQuestions;
$sFilter = $CCEExamQuestions->KeyFilter();
// Call Row Selecting event
$CCEExamQuestions->Row_Selecting($sFilter);
// Load SQL based on filter
$CCEExamQuestions->CurrentFilter = $sFilter;
$sSql = $CCEExamQuestions->SQL();
$res = FALSE;
$rs = ew_LoadRecordset($sSql);
if ($rs && !$rs->EOF) {
$res = TRUE;
$this->LoadRowValues($rs); // Load row values
// Call Row Selected event
$CCEExamQuestions->Row_Selected($rs);
$rs->Close();
}
return $res;
}
// Load row values from recordset
function LoadRowValues(&$rs) {
global $conn, $CCEExamQuestions;
$CCEExamQuestions->Question_ID->setDbValue($rs->fields('Question_ID'));
$CCEExamQuestions->Questionnaire_ID->setDbValue($rs->fields('Questionnaire_ID'));
$CCEExamQuestions->Section_ID->setDbValue($rs->fields('Section_ID'));
$CCEExamQuestions->Question->setDbValue($rs->fields('Question'));
$CCEExamQuestions->Display_Order->setDbValue($rs->fields('Display_Order'));
$CCEExamQuestions->IsMulti->setDbValue($rs->fields('IsMulti'));
$CCEExamQuestions->IsOptional->setDbValue($rs->fields('IsOptional'));
$CCEExamQuestions->Answer_Type->setDbValue($rs->fields('Answer_Type'));
$CCEExamQuestions->Answer_Template->setDbValue($rs->fields('Answer_Template'));
$CCEExamQuestions->Model_Answer->setDbValue($rs->fields('Model_Answer'));
$CCEExamQuestions->ParentQuestionID->setDbValue($rs->fields('ParentQuestionID'));
$CCEExamQuestions->RequireNumber->setDbValue($rs->fields('RequireNumber'));
$CCEExamQuestions->MinNum->setDbValue($rs->fields('MinNum'));
$CCEExamQuestions->MaxNum->setDbValue($rs->fields('MaxNum'));
$CCEExamQuestions->RecallPrevAnswer->setDbValue($rs->fields('RecallPrevAnswer'));
$CCEExamQuestions->QuestionTitle->setDbValue($rs->fields('QuestionTitle'));
$CCEExamQuestions->NumMarks->setDbValue($rs->fields('NumMarks'));
$CCEExamQuestions->DropDown->setDbValue($rs->fields('DropDown'));
$CCEExamQuestions->InUse->setDbValue($rs->fields('InUse'));
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $CCEExamQuestions;
// Initialize URLs
$this->ExportPrintUrl = $this->PageUrl() . "export=print&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->ExportHtmlUrl = $this->PageUrl() . "export=html&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->ExportExcelUrl = $this->PageUrl() . "export=excel&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->ExportWordUrl = $this->PageUrl() . "export=word&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->ExportXmlUrl = $this->PageUrl() . "export=xml&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->ExportCsvUrl = $this->PageUrl() . "export=csv&" . "Question_ID=" . urlencode($CCEExamQuestions->Question_ID->CurrentValue);
$this->AddUrl = $CCEExamQuestions->AddUrl();
$this->EditUrl = $CCEExamQuestions->EditUrl();
$this->CopyUrl = $CCEExamQuestions->CopyUrl();
$this->DeleteUrl = $CCEExamQuestions->DeleteUrl();
$this->ListUrl = $CCEExamQuestions->ListUrl();
// Call Row_Rendering event
$CCEExamQuestions->Row_Rendering();
// Common render codes for all row types
// Question_ID
$CCEExamQuestions->Question_ID->CellCssStyle = ""; $CCEExamQuestions->Question_ID->CellCssClass = "";
$CCEExamQuestions->Question_ID->CellAttrs = array(); $CCEExamQuestions->Question_ID->ViewAttrs = array(); $CCEExamQuestions->Question_ID->EditAttrs = array();
// Questionnaire_ID
$CCEExamQuestions->Questionnaire_ID->CellCssStyle = ""; $CCEExamQuestions->Questionnaire_ID->CellCssClass = "";
$CCEExamQuestions->Questionnaire_ID->CellAttrs = array(); $CCEExamQuestions->Questionnaire_ID->ViewAttrs = array(); $CCEExamQuestions->Questionnaire_ID->EditAttrs = array();
// Section_ID
$CCEExamQuestions->Section_ID->CellCssStyle = ""; $CCEExamQuestions->Section_ID->CellCssClass = "";
$CCEExamQuestions->Section_ID->CellAttrs = array(); $CCEExamQuestions->Section_ID->ViewAttrs = array(); $CCEExamQuestions->Section_ID->EditAttrs = array();
// Question
$CCEExamQuestions->Question->CellCssStyle = ""; $CCEExamQuestions->Question->CellCssClass = "";
$CCEExamQuestions->Question->CellAttrs = array(); $CCEExamQuestions->Question->ViewAttrs = array(); $CCEExamQuestions->Question->EditAttrs = array();
// Display_Order
$CCEExamQuestions->Display_Order->CellCssStyle = ""; $CCEExamQuestions->Display_Order->CellCssClass = "";
$CCEExamQuestions->Display_Order->CellAttrs = array(); $CCEExamQuestions->Display_Order->ViewAttrs = array(); $CCEExamQuestions->Display_Order->EditAttrs = array();
// IsMulti
$CCEExamQuestions->IsMulti->CellCssStyle = ""; $CCEExamQuestions->IsMulti->CellCssClass = "";
$CCEExamQuestions->IsMulti->CellAttrs = array(); $CCEExamQuestions->IsMulti->ViewAttrs = array(); $CCEExamQuestions->IsMulti->EditAttrs = array();
// IsOptional
$CCEExamQuestions->IsOptional->CellCssStyle = ""; $CCEExamQuestions->IsOptional->CellCssClass = "";
$CCEExamQuestions->IsOptional->CellAttrs = array(); $CCEExamQuestions->IsOptional->ViewAttrs = array(); $CCEExamQuestions->IsOptional->EditAttrs = array();
// Answer_Type
$CCEExamQuestions->Answer_Type->CellCssStyle = ""; $CCEExamQuestions->Answer_Type->CellCssClass = "";
$CCEExamQuestions->Answer_Type->CellAttrs = array(); $CCEExamQuestions->Answer_Type->ViewAttrs = array(); $CCEExamQuestions->Answer_Type->EditAttrs = array();
// Answer_Template
$CCEExamQuestions->Answer_Template->CellCssStyle = ""; $CCEExamQuestions->Answer_Template->CellCssClass = "";
$CCEExamQuestions->Answer_Template->CellAttrs = array(); $CCEExamQuestions->Answer_Template->ViewAttrs = array(); $CCEExamQuestions->Answer_Template->EditAttrs = array();
// Model_Answer
$CCEExamQuestions->Model_Answer->CellCssStyle = ""; $CCEExamQuestions->Model_Answer->CellCssClass = "";
$CCEExamQuestions->Model_Answer->CellAttrs = array(); $CCEExamQuestions->Model_Answer->ViewAttrs = array(); $CCEExamQuestions->Model_Answer->EditAttrs = array();
// ParentQuestionID
$CCEExamQuestions->ParentQuestionID->CellCssStyle = ""; $CCEExamQuestions->ParentQuestionID->CellCssClass = "";
$CCEExamQuestions->ParentQuestionID->CellAttrs = array(); $CCEExamQuestions->ParentQuestionID->ViewAttrs = array(); $CCEExamQuestions->ParentQuestionID->EditAttrs = array();
// RequireNumber
$CCEExamQuestions->RequireNumber->CellCssStyle = ""; $CCEExamQuestions->RequireNumber->CellCssClass = "";
$CCEExamQuestions->RequireNumber->CellAttrs = array(); $CCEExamQuestions->RequireNumber->ViewAttrs = array(); $CCEExamQuestions->RequireNumber->EditAttrs = array();
// MinNum
$CCEExamQuestions->MinNum->CellCssStyle = ""; $CCEExamQuestions->MinNum->CellCssClass = "";
$CCEExamQuestions->MinNum->CellAttrs = array(); $CCEExamQuestions->MinNum->ViewAttrs = array(); $CCEExamQuestions->MinNum->EditAttrs = array();
// MaxNum
$CCEExamQuestions->MaxNum->CellCssStyle = ""; $CCEExamQuestions->MaxNum->CellCssClass = "";
$CCEExamQuestions->MaxNum->CellAttrs = array(); $CCEExamQuestions->MaxNum->ViewAttrs = array(); $CCEExamQuestions->MaxNum->EditAttrs = array();
// RecallPrevAnswer
$CCEExamQuestions->RecallPrevAnswer->CellCssStyle = ""; $CCEExamQuestions->RecallPrevAnswer->CellCssClass = "";
$CCEExamQuestions->RecallPrevAnswer->CellAttrs = array(); $CCEExamQuestions->RecallPrevAnswer->ViewAttrs = array(); $CCEExamQuestions->RecallPrevAnswer->EditAttrs = array();
// QuestionTitle
$CCEExamQuestions->QuestionTitle->CellCssStyle = ""; $CCEExamQuestions->QuestionTitle->CellCssClass = "";
$CCEExamQuestions->QuestionTitle->CellAttrs = array(); $CCEExamQuestions->QuestionTitle->ViewAttrs = array(); $CCEExamQuestions->QuestionTitle->EditAttrs = array();
// NumMarks
$CCEExamQuestions->NumMarks->CellCssStyle = ""; $CCEExamQuestions->NumMarks->CellCssClass = "";
$CCEExamQuestions->NumMarks->CellAttrs = array(); $CCEExamQuestions->NumMarks->ViewAttrs = array(); $CCEExamQuestions->NumMarks->EditAttrs = array();
// InUse
$CCEExamQuestions->InUse->CellCssStyle = ""; $CCEExamQuestions->InUse->CellCssClass = "";
$CCEExamQuestions->InUse->CellAttrs = array(); $CCEExamQuestions->InUse->ViewAttrs = array(); $CCEExamQuestions->InUse->EditAttrs = array();
if ($CCEExamQuestions->RowType == EW_ROWTYPE_VIEW) { // View row
// Question_ID
$CCEExamQuestions->Question_ID->ViewValue = $CCEExamQuestions->Question_ID->CurrentValue;
$CCEExamQuestions->Question_ID->CssStyle = "";
$CCEExamQuestions->Question_ID->CssClass = "";
$CCEExamQuestions->Question_ID->ViewCustomAttributes = "";
// Questionnaire_ID
if (strval($CCEExamQuestions->Questionnaire_ID->CurrentValue) <> "") {
$sFilterWrk = "`Questionnaire_ID` = " . ew_AdjustSql($CCEExamQuestions->Questionnaire_ID->CurrentValue) . "";
$sSqlWrk = "SELECT `Questionnaire_Name` FROM `CCEExams`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CCEExamQuestions->Questionnaire_ID->ViewValue = $rswrk->fields('Questionnaire_Name');
$rswrk->Close();
} else {
$CCEExamQuestions->Questionnaire_ID->ViewValue = $CCEExamQuestions->Questionnaire_ID->CurrentValue;
}
} else {
$CCEExamQuestions->Questionnaire_ID->ViewValue = NULL;
}
$CCEExamQuestions->Questionnaire_ID->CssStyle = "";
$CCEExamQuestions->Questionnaire_ID->CssClass = "";
$CCEExamQuestions->Questionnaire_ID->ViewCustomAttributes = "";
// Section_ID
if (strval($CCEExamQuestions->Section_ID->CurrentValue) <> "") {
$sFilterWrk = "`Section_ID` = " . ew_AdjustSql($CCEExamQuestions->Section_ID->CurrentValue) . "";
$sSqlWrk = "SELECT `Section_Name` FROM `CCEExamSections`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `Display_Order` Asc";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CCEExamQuestions->Section_ID->ViewValue = $rswrk->fields('Section_Name');
$rswrk->Close();
} else {
$CCEExamQuestions->Section_ID->ViewValue = $CCEExamQuestions->Section_ID->CurrentValue;
}
} else {
$CCEExamQuestions->Section_ID->ViewValue = NULL;
}
$CCEExamQuestions->Section_ID->CssStyle = "";
$CCEExamQuestions->Section_ID->CssClass = "";
$CCEExamQuestions->Section_ID->ViewCustomAttributes = "";
// Question
$CCEExamQuestions->Question->ViewValue = $CCEExamQuestions->Question->CurrentValue;
$CCEExamQuestions->Question->CssStyle = "";
$CCEExamQuestions->Question->CssClass = "";
$CCEExamQuestions->Question->ViewCustomAttributes = "";
// Display_Order
$CCEExamQuestions->Display_Order->ViewValue = $CCEExamQuestions->Display_Order->CurrentValue;
$CCEExamQuestions->Display_Order->CssStyle = "";
$CCEExamQuestions->Display_Order->CssClass = "";
$CCEExamQuestions->Display_Order->ViewCustomAttributes = "";
// IsMulti
if (strval($CCEExamQuestions->IsMulti->CurrentValue) <> "") {
switch ($CCEExamQuestions->IsMulti->CurrentValue) {
case "1":
$CCEExamQuestions->IsMulti->ViewValue = "Yes";
break;
case "0":
$CCEExamQuestions->IsMulti->ViewValue = "No";
break;
default:
$CCEExamQuestions->IsMulti->ViewValue = $CCEExamQuestions->IsMulti->CurrentValue;
}
} else {
$CCEExamQuestions->IsMulti->ViewValue = NULL;
}
$CCEExamQuestions->IsMulti->CssStyle = "";
$CCEExamQuestions->IsMulti->CssClass = "";
$CCEExamQuestions->IsMulti->ViewCustomAttributes = "";
// IsOptional
if (strval($CCEExamQuestions->IsOptional->CurrentValue) <> "") {
switch ($CCEExamQuestions->IsOptional->CurrentValue) {
case "1":
$CCEExamQuestions->IsOptional->ViewValue = "Yes";
break;
case "0":
$CCEExamQuestions->IsOptional->ViewValue = "No";
break;
default:
$CCEExamQuestions->IsOptional->ViewValue = $CCEExamQuestions->IsOptional->CurrentValue;
}
} else {
$CCEExamQuestions->IsOptional->ViewValue = NULL;
}
$CCEExamQuestions->IsOptional->CssStyle = "";
$CCEExamQuestions->IsOptional->CssClass = "";
$CCEExamQuestions->IsOptional->ViewCustomAttributes = "";
// Answer_Type
if (strval($CCEExamQuestions->Answer_Type->CurrentValue) <> "") {
switch ($CCEExamQuestions->Answer_Type->CurrentValue) {
case "a":
$CCEExamQuestions->Answer_Type->ViewValue = "Text Box";
break;
case "m":
$CCEExamQuestions->Answer_Type->ViewValue = "Radio/ Check Box";
break;
case "s":
$CCEExamQuestions->Answer_Type->ViewValue = "Select";
break;
case "f":
$CCEExamQuestions->Answer_Type->ViewValue = "File";
break;
default:
$CCEExamQuestions->Answer_Type->ViewValue = $CCEExamQuestions->Answer_Type->CurrentValue;
}
} else {
$CCEExamQuestions->Answer_Type->ViewValue = NULL;
}
$CCEExamQuestions->Answer_Type->CssStyle = "";
$CCEExamQuestions->Answer_Type->CssClass = "";
$CCEExamQuestions->Answer_Type->ViewCustomAttributes = "";
// Answer_Template
$CCEExamQuestions->Answer_Template->ViewValue = $CCEExamQuestions->Answer_Template->CurrentValue;
$CCEExamQuestions->Answer_Template->CssStyle = "";
$CCEExamQuestions->Answer_Template->CssClass = "";
$CCEExamQuestions->Answer_Template->ViewCustomAttributes = "";
// Model_Answer
$CCEExamQuestions->Model_Answer->ViewValue = $CCEExamQuestions->Model_Answer->CurrentValue;
$CCEExamQuestions->Model_Answer->CssStyle = "";
$CCEExamQuestions->Model_Answer->CssClass = "";
$CCEExamQuestions->Model_Answer->ViewCustomAttributes = "";
// ParentQuestionID
if (strval($CCEExamQuestions->ParentQuestionID->CurrentValue) <> "") {
$sFilterWrk = "`Question_ID` = " . ew_AdjustSql($CCEExamQuestions->ParentQuestionID->CurrentValue) . "";
$sSqlWrk = "SELECT `QuestionTitle`, `Question` FROM `CCEExamQuestions`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `Display_Order`";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CCEExamQuestions->ParentQuestionID->ViewValue = $rswrk->fields('QuestionTitle');
$CCEExamQuestions->ParentQuestionID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('Question');
$rswrk->Close();
} else {
$CCEExamQuestions->ParentQuestionID->ViewValue = $CCEExamQuestions->ParentQuestionID->CurrentValue;
}
} else {
$CCEExamQuestions->ParentQuestionID->ViewValue = NULL;
}
$CCEExamQuestions->ParentQuestionID->CssStyle = "";
$CCEExamQuestions->ParentQuestionID->CssClass = "";
$CCEExamQuestions->ParentQuestionID->ViewCustomAttributes = "";
// RequireNumber
$CCEExamQuestions->RequireNumber->ViewValue = $CCEExamQuestions->RequireNumber->CurrentValue;
$CCEExamQuestions->RequireNumber->CssStyle = "";
$CCEExamQuestions->RequireNumber->CssClass = "";
$CCEExamQuestions->RequireNumber->ViewCustomAttributes = "";
// MinNum
$CCEExamQuestions->MinNum->ViewValue = $CCEExamQuestions->MinNum->CurrentValue;
$CCEExamQuestions->MinNum->CssStyle = "";
$CCEExamQuestions->MinNum->CssClass = "";
$CCEExamQuestions->MinNum->ViewCustomAttributes = "";
// MaxNum
$CCEExamQuestions->MaxNum->ViewValue = $CCEExamQuestions->MaxNum->CurrentValue;
$CCEExamQuestions->MaxNum->CssStyle = "";
$CCEExamQuestions->MaxNum->CssClass = "";
$CCEExamQuestions->MaxNum->ViewCustomAttributes = "";
// RecallPrevAnswer
if (strval($CCEExamQuestions->RecallPrevAnswer->CurrentValue) <> "") {
switch ($CCEExamQuestions->RecallPrevAnswer->CurrentValue) {
case "1":
$CCEExamQuestions->RecallPrevAnswer->ViewValue = "Yes";
break;
case "0":
$CCEExamQuestions->RecallPrevAnswer->ViewValue = "No";
break;
default:
$CCEExamQuestions->RecallPrevAnswer->ViewValue = $CCEExamQuestions->RecallPrevAnswer->CurrentValue;
}
} else {
$CCEExamQuestions->RecallPrevAnswer->ViewValue = NULL;
}
$CCEExamQuestions->RecallPrevAnswer->CssStyle = "";
$CCEExamQuestions->RecallPrevAnswer->CssClass = "";
$CCEExamQuestions->RecallPrevAnswer->ViewCustomAttributes = "";
// QuestionTitle
$CCEExamQuestions->QuestionTitle->ViewValue = $CCEExamQuestions->QuestionTitle->CurrentValue;
$CCEExamQuestions->QuestionTitle->CssStyle = "";
$CCEExamQuestions->QuestionTitle->CssClass = "";
$CCEExamQuestions->QuestionTitle->ViewCustomAttributes = "";
// NumMarks
$CCEExamQuestions->NumMarks->ViewValue = $CCEExamQuestions->NumMarks->CurrentValue;
$CCEExamQuestions->NumMarks->CssStyle = "";
$CCEExamQuestions->NumMarks->CssClass = "";
$CCEExamQuestions->NumMarks->ViewCustomAttributes = "";
// InUse
if (strval($CCEExamQuestions->InUse->CurrentValue) <> "") {
switch ($CCEExamQuestions->InUse->CurrentValue) {
case "1":
$CCEExamQuestions->InUse->ViewValue = "Yes";
break;
case "0":
$CCEExamQuestions->InUse->ViewValue = "No";
break;
default:
$CCEExamQuestions->InUse->ViewValue = $CCEExamQuestions->InUse->CurrentValue;
}
} else {
$CCEExamQuestions->InUse->ViewValue = NULL;
}
$CCEExamQuestions->InUse->CssStyle = "";
$CCEExamQuestions->InUse->CssClass = "";
$CCEExamQuestions->InUse->ViewCustomAttributes = "";
// Question_ID
$CCEExamQuestions->Question_ID->HrefValue = "";
$CCEExamQuestions->Question_ID->TooltipValue = "";
// Questionnaire_ID
$CCEExamQuestions->Questionnaire_ID->HrefValue = "";
$CCEExamQuestions->Questionnaire_ID->TooltipValue = "";
// Section_ID
$CCEExamQuestions->Section_ID->HrefValue = "";
$CCEExamQuestions->Section_ID->TooltipValue = "";
// Question
$CCEExamQuestions->Question->HrefValue = "";
$CCEExamQuestions->Question->TooltipValue = "";
// Display_Order
$CCEExamQuestions->Display_Order->HrefValue = "";
$CCEExamQuestions->Display_Order->TooltipValue = "";
// IsMulti
$CCEExamQuestions->IsMulti->HrefValue = "";
$CCEExamQuestions->IsMulti->TooltipValue = "";
// IsOptional
$CCEExamQuestions->IsOptional->HrefValue = "";
$CCEExamQuestions->IsOptional->TooltipValue = "";
// Answer_Type
$CCEExamQuestions->Answer_Type->HrefValue = "";
$CCEExamQuestions->Answer_Type->TooltipValue = "";
// Answer_Template
$CCEExamQuestions->Answer_Template->HrefValue = "";
$CCEExamQuestions->Answer_Template->TooltipValue = "";
// Model_Answer
$CCEExamQuestions->Model_Answer->HrefValue = "";
$CCEExamQuestions->Model_Answer->TooltipValue = "";
// ParentQuestionID
$CCEExamQuestions->ParentQuestionID->HrefValue = "";
$CCEExamQuestions->ParentQuestionID->TooltipValue = "";
// RequireNumber
$CCEExamQuestions->RequireNumber->HrefValue = "";
$CCEExamQuestions->RequireNumber->TooltipValue = "";
// MinNum
$CCEExamQuestions->MinNum->HrefValue = "";
$CCEExamQuestions->MinNum->TooltipValue = "";
// MaxNum
$CCEExamQuestions->MaxNum->HrefValue = "";
$CCEExamQuestions->MaxNum->TooltipValue = "";
// RecallPrevAnswer
$CCEExamQuestions->RecallPrevAnswer->HrefValue = "";
$CCEExamQuestions->RecallPrevAnswer->TooltipValue = "";
// QuestionTitle
$CCEExamQuestions->QuestionTitle->HrefValue = "";
$CCEExamQuestions->QuestionTitle->TooltipValue = "";
// NumMarks
$CCEExamQuestions->NumMarks->HrefValue = "";
$CCEExamQuestions->NumMarks->TooltipValue = "";
}
// Call Row Rendered event
if ($CCEExamQuestions->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$CCEExamQuestions->Row_Rendered();
}
// Export data in HTML/CSV/Word/Excel/XML/Email format
function ExportData() {
global $CCEExamQuestions;
$utf8 = FALSE;
$bSelectLimit = FALSE;
// Load recordset
if ($bSelectLimit) {
$this->lTotalRecs = $CCEExamQuestions->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset())
$this->lTotalRecs = $rs->RecordCount();
}
$this->lStartRec = 1;
$this->SetUpStartRec(); // Set up start record position
// Set the last record to display
if ($this->lDisplayRecs < 0) {
$this->lStopRec = $this->lTotalRecs;
} else {
$this->lStopRec = $this->lStartRec + $this->lDisplayRecs - 1;
}
if (!$rs) {
header("Content-Type:"); // Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
if ($CCEExamQuestions->Export == "xml") {
$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
$XmlDoc->AddRoot();
} else {
$ExportDoc = new cExportDocument($CCEExamQuestions, "v");
$ExportDoc->ExportHeader();
if ($ExportDoc->Horizontal) { // Horizontal format, write header
$ExportDoc->BeginExportRow();
$ExportDoc->ExportCaption($CCEExamQuestions->Question_ID);
$ExportDoc->ExportCaption($CCEExamQuestions->Questionnaire_ID);
$ExportDoc->ExportCaption($CCEExamQuestions->Section_ID);
$ExportDoc->ExportCaption($CCEExamQuestions->Question);
$ExportDoc->ExportCaption($CCEExamQuestions->Display_Order);
$ExportDoc->ExportCaption($CCEExamQuestions->IsMulti);
$ExportDoc->ExportCaption($CCEExamQuestions->IsOptional);
$ExportDoc->ExportCaption($CCEExamQuestions->Answer_Type);
$ExportDoc->ExportCaption($CCEExamQuestions->Answer_Template);
$ExportDoc->ExportCaption($CCEExamQuestions->Model_Answer);
$ExportDoc->ExportCaption($CCEExamQuestions->ParentQuestionID);
$ExportDoc->ExportCaption($CCEExamQuestions->RequireNumber);
$ExportDoc->ExportCaption($CCEExamQuestions->MinNum);
$ExportDoc->ExportCaption($CCEExamQuestions->MaxNum);
$ExportDoc->ExportCaption($CCEExamQuestions->RecallPrevAnswer);
$ExportDoc->ExportCaption($CCEExamQuestions->QuestionTitle);
$ExportDoc->ExportCaption($CCEExamQuestions->NumMarks);
$ExportDoc->EndExportRow();
}
}
// Move to first record
$this->lRecCnt = $this->lStartRec - 1;
if (!$rs->EOF) {
$rs->MoveFirst();
if (!$bSelectLimit && $this->lStartRec > 1)
$rs->Move($this->lStartRec - 1);
}
while (!$rs->EOF && $this->lRecCnt < $this->lStopRec) {
$this->lRecCnt++;
if (intval($this->lRecCnt) >= intval($this->lStartRec)) {
$this->LoadRowValues($rs);
// Render row
$CCEExamQuestions->CssClass = "";
$CCEExamQuestions->CssStyle = "";
$CCEExamQuestions->RowType = EW_ROWTYPE_VIEW; // Render view
$this->RenderRow();
if ($CCEExamQuestions->Export == "xml") {
$XmlDoc->AddRow();
$XmlDoc->AddField('Question_ID', $CCEExamQuestions->Question_ID->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Questionnaire_ID', $CCEExamQuestions->Questionnaire_ID->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Section_ID', $CCEExamQuestions->Section_ID->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Question', $CCEExamQuestions->Question->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Display_Order', $CCEExamQuestions->Display_Order->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('IsMulti', $CCEExamQuestions->IsMulti->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('IsOptional', $CCEExamQuestions->IsOptional->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Answer_Type', $CCEExamQuestions->Answer_Type->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Answer_Template', $CCEExamQuestions->Answer_Template->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('Model_Answer', $CCEExamQuestions->Model_Answer->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('ParentQuestionID', $CCEExamQuestions->ParentQuestionID->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('RequireNumber', $CCEExamQuestions->RequireNumber->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('MinNum', $CCEExamQuestions->MinNum->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('MaxNum', $CCEExamQuestions->MaxNum->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('RecallPrevAnswer', $CCEExamQuestions->RecallPrevAnswer->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('QuestionTitle', $CCEExamQuestions->QuestionTitle->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
$XmlDoc->AddField('NumMarks', $CCEExamQuestions->NumMarks->ExportValue($CCEExamQuestions->Export, $CCEExamQuestions->ExportOriginalValue));
} else {
$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
$ExportDoc->ExportField($CCEExamQuestions->Question_ID);
$ExportDoc->ExportField($CCEExamQuestions->Questionnaire_ID);
$ExportDoc->ExportField($CCEExamQuestions->Section_ID);
$ExportDoc->ExportField($CCEExamQuestions->Question);
$ExportDoc->ExportField($CCEExamQuestions->Display_Order);
$ExportDoc->ExportField($CCEExamQuestions->IsMulti);
$ExportDoc->ExportField($CCEExamQuestions->IsOptional);
$ExportDoc->ExportField($CCEExamQuestions->Answer_Type);
$ExportDoc->ExportField($CCEExamQuestions->Answer_Template);
$ExportDoc->ExportField($CCEExamQuestions->Model_Answer);
$ExportDoc->ExportField($CCEExamQuestions->ParentQuestionID);
$ExportDoc->ExportField($CCEExamQuestions->RequireNumber);
$ExportDoc->ExportField($CCEExamQuestions->MinNum);
$ExportDoc->ExportField($CCEExamQuestions->MaxNum);
$ExportDoc->ExportField($CCEExamQuestions->RecallPrevAnswer);
$ExportDoc->ExportField($CCEExamQuestions->QuestionTitle);
$ExportDoc->ExportField($CCEExamQuestions->NumMarks);
$ExportDoc->EndExportRow();
}
}
$rs->MoveNext();
}
if ($CCEExamQuestions->Export <> "xml")
$ExportDoc->ExportFooter();
// Close recordset
$rs->Close();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length())
ob_end_clean();
// Write BOM if utf-8
if ($utf8 && !in_array($CCEExamQuestions->Export, array("email", "xml")))
echo "\xEF\xBB\xBF";
// Write debug message if enabled
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
// Output data
if ($CCEExamQuestions->Export == "xml") {
header("Content-Type: text/xml");
echo $XmlDoc->XML();
} elseif ($CCEExamQuestions->Export == "email") {
$this->ExportEmail($ExportDoc->Text);
$this->Page_Terminate($CCEExamQuestions->ExportReturnUrl());
} else {
echo $ExportDoc->Text;
}
}
// Export email
function ExportEmail($EmailContent) {
global $Language, $CCEExamQuestions;
$sSender = @$_GET["sender"];
$sRecipient = @$_GET["recipient"];
$sCc = @$_GET["cc"];
$sBcc = @$_GET["bcc"];
$sContentType = @$_GET["contenttype"];
// Subject
$sSubject = ew_StripSlashes(@$_GET["subject"]);
$sEmailSubject = $sSubject;
// Message
$sContent = ew_StripSlashes(@$_GET["message"]);
$sEmailMessage = $sContent;
// Check sender
if ($sSender == "") {
$this->setMessage($Language->Phrase("EnterSenderEmail"));
return;
}
if (!ew_CheckEmail($sSender)) {
$this->setMessage($Language->Phrase("EnterProperSenderEmail"));
return;
}
// Check recipient
if (!ew_CheckEmailList($sRecipient, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperRecipientEmail"));
return;
}
// Check cc
if (!ew_CheckEmailList($sCc, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperCcEmail"));
return;
}
// Check bcc
if (!ew_CheckEmailList($sBcc, EW_MAX_EMAIL_RECIPIENT)) {
$this->setMessage($Language->Phrase("EnterProperBccEmail"));
return;
}
// Check email sent count
if (!isset($_SESSION[EW_EXPORT_EMAIL_COUNTER]))
$_SESSION[EW_EXPORT_EMAIL_COUNTER] = 0;
if (intval($_SESSION[EW_EXPORT_EMAIL_COUNTER]) > EW_MAX_EMAIL_SENT_COUNT) {
$this->setMessage($Language->Phrase("ExceedMaxEmailExport"));
return;
}
if ($sEmailMessage <> "") {
$sEmailMessage = ew_RemoveXSS($sEmailMessage);
$sEmailMessage .= ($sContentType == "url") ? "\r\n\r\n" : "<br><br>";
}
if ($sContentType == "url") {
$sUrl = ew_ConvertFullUrl(ew_CurrentPage() . "?" . $this->ExportQueryString());
$sEmailMessage .= $sUrl; // send URL only
} else {
$sEmailMessage .= $EmailContent; // send HTML
}
// Send email
$Email = new cEmail();
$Email->Sender = $sSender; // Sender
$Email->Recipient = $sRecipient; // Recipient
$Email->Cc = $sCc; // Cc
$Email->Bcc = $sBcc; // Bcc
$Email->Subject = $sEmailSubject; // Subject
$Email->Content = $sEmailMessage; // Content
$Email->Format = ($sContentType == "url") ? "text" : "html";
$Email->Charset = EW_EMAIL_CHARSET;
$EventArgs = array();
$bEmailSent = FALSE;
if ($CCEExamQuestions->Email_Sending($Email, $EventArgs))
$bEmailSent = $Email->Send();
// Check email sent status
if ($bEmailSent) {
// Update email sent count
$_SESSION[EW_EXPORT_EMAIL_COUNTER]++;
// Sent email success
$this->setMessage($Language->Phrase("SendEmailSuccess"));
} else {
// Sent email failure
$this->setMessage($Email->SendErrDescription);
}
}
// Export QueryString
function ExportQueryString() {
global $CCEExamQuestions;
// Initialize
$sQry = "export=html";
// Add record key QueryString
$sQry .= "&" . substr($CCEExamQuestions->KeyUrl("", ""), 1);
return $sQry;
}
// 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";
}
}
?>