Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\etip\report_examine1.php:26) in C:\AppServ\www\etip\rptinc\ewcommon.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\etip\report_examine1.php:26) in C:\AppServ\www\etip\rptinc\ewcommon.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\etip\report_examine1.php:26) in C:\AppServ\www\etip\rptinc\ewcommon.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\etip\report_examine1.php:26) in C:\AppServ\www\etip\rptinc\ewcommon.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\etip\report_examine1.php:26) in C:\AppServ\www\etip\rptinc\ewcommon.php on line 10
660: Illegal mix of collations for operation 'concat'
SQL: SELECT DISTINCT 'numST' AS FIELD_1, concat( etp_defend.dfn_date, '
', etp_defend.start_time, '-', etp_defend.end_time, ' ¹.' ) AS FIELD_2, concat( etp_student.std_title, etp_student.std_fname_thai, ' ', etp_student.std_lname_thai, '
', etp_student.std_id, '
', etp_plan.plan_name ) AS FIELD_3, concat( etp_defend.proposal_name_thai, '
(', etp_plan_type.plan_type_name ,')' ) AS FIELD_4, concat( etp_teacher.tea_position, etp_teacher.tea_fname_thai, ' ', etp_teacher.tea_lname_thai ) AS FIELD_5, etp_place.place_name FROM etp_student INNER JOIN etp_defend ON ( etp_student.std_id = etp_defend.std_id ) INNER JOIN etp_place ON ( etp_defend.place_id = etp_place.place_id ) INNER JOIN etp_plan ON ( etp_student.plan_id = etp_plan.plan_id ) INNER JOIN etp_plan_type ON ( etp_plan.plan_type_id = etp_plan_type.plan_type_id ) INNER JOIN etp_committee ON ( etp_defend.dfn_no = etp_committee.dfn_no ) AND ( etp_defend.dfn_type_id = etp_committee.dfn_type_id ) AND ( etp_defend.std_id = etp_committee.std_id )INNER JOIN etp_teacher ON ( etp_committee.tea_id = etp_teacher.tea_id ) WHERE ( (etp_defend.dfn_type_id = '01' ) and (etp_defend.is_pass = '' ) ) ORDER BY FIELD_2 , etp_committee.pos_id asc
<?php include "rptinc/ewcommon.php"; ?>
<?php include "rptinc/ewconfig.php"; ?>
<?php include "rptinc/phprptfn.php"; ?>
<?php include "rptinc/advsecu.php"; ?>
<?php
// Detail distinct & selection values
InitReportData($rs);
if ($nDisplayGrps <= 0) { // Display All Records
$nDisplayGrps = $nTotalGrps;
}
$nStartGrp = 1;
SetUpStartGroup(); // Set Up Start Record Position
?>
<?php include "rptinc/header2.php"; ?>
<?php if (@$sExport == "") { ?>
<!-- import the calendar script -->
<script type="text/javascript" src="rptjs/calendar.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="rptjs/lang/calendar-th.js"></script>
<script language="JavaScript" type="text/javascript">
// This function gets called when the end-user clicks on some date.
function selected(cal, date) {
cal.sel.value = date; // just update the date in the input field.
if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
// if we add this call we close the calendar on single-click.
// just to exemplify both cases, we are using this only for the 1st
// and the 3rd field, while 2nd and 4th will still require double-click.
cal.callCloseHandler();
}
// And this gets called when the end-user clicks on the _selected_ date,
// or clicks on the "Close" button. It just hides the calendar without
// destroying it.
function closeHandler(cal) {
cal.hide(); // hide the calendar
// cal.destroy();
_dynarch_popupCalendar = null;
}
// This function shows the calendar under the element having the given id.
// It takes care of catching "mousedown" signals on document and hiding the
// calendar if the click was outside.
function showCalendar(id, format, showsTime, showsOtherMonths) {
var el = document.getElementById(id);
if (_dynarch_popupCalendar != null) {
// we already have some calendar created
_dynarch_popupCalendar.hide(); // so we hide it first.
} else {
// first-time call, create the calendar.
var cal = new Calendar(1, null, selected, closeHandler);
// uncomment the following line to hide the week numbers
// cal.weekNumbers = false;
if (typeof showsTime == "string") {
cal.showsTime = true;
cal.time24 = (showsTime == "24");
}
if (showsOtherMonths) {
cal.showsOtherMonths = true;
}
_dynarch_popupCalendar = cal; // remember it in the global var
cal.setRange(1900, 2070); // min/max year allowed.
cal.create();
}
_dynarch_popupCalendar.setDateFormat(format); // set the specified date format
_dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field
_dynarch_popupCalendar.sel = el; // inform it what input field we use
// the reference element that we pass to showAtElement is the button that
// triggers the calendar. In this example we align the calendar bottom-right
// to the button.
_dynarch_popupCalendar.showAtElement(el.nextSibling, "Br"); // show the calendar
return false;
}
var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;
// If this handler returns true then the "date" given as
// parameter will be disabled. In this example we enable
// only days within a range of 10 days from the current
// date.
// You can use the functions date.getFullYear() -- returns the year
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
// and date.getDate() -- returns the date of the month as 1..31, to
// make heavy calculations here. However, beware that this function
// should be very fast, as it is called for each day in a month when
// the calendar is (re)constructed.
function isDisabled(date) {
var today = new Date();
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
}
function flatSelected(cal, date) {
var el = document.getElementById("preview");
el.innerHTML = date;
}
function showFlatCalendar() {
var parent = document.getElementById("display");
// construct a calendar giving only the "selected" handler.
var cal = new Calendar(0, null, flatSelected);
// hide week numbers
cal.weekNumbers = false;
// We want some dates to be disabled; see function isDisabled above
cal.setDisabledHandler(isDisabled);
cal.setDateFormat("%A, %B %e");
// this call must be the last as it might use data initialized above; if
// we specify a parent, as opposite to the "showCalendar" function above,
// then we create a flat calendar -- not popup. Hidden, though, but...
cal.create(parent);
// ... we can show it here.
cal.show();
}
</script>
<script language="JavaScript" src="rptjs/x/x_core.js" type="text/javascript"></script>
<script language="JavaScript" src="rptjs/x/x_event.js" type="text/javascript"></script>
<script language="JavaScript" src="rptjs/x/x_drag.js" type="text/javascript"></script>
<script language="JavaScript" src="rptjs/popup.js" type="text/javascript"></script>
<script language="JavaScript" src="rptjs/ewrptpop.js" type="text/javascript"></script>
<script language="JavaScript" src="rptjs/swfobject.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var EW_POPUP_ALL = "(All)";
var EW_POPUP_OK = " OK ";
var EW_POPUP_CANCEL = "Cancel";
var EW_POPUP_FROM = "From";
var EW_POPUP_TO = "To";
var EW_POPUP_PLEASE_SELECT = "Please Select";
var EW_POPUP_NO_VALUE = "No value selected!";
var EW_POPUP_CLASSNAME = "phpreportmaker";
//-------------------------------------------------------------------------------
// Function SetUpStartGroup
// - Set up Starting Record parameters based on Pager Navigation
// - Variables setup: nStartGrp
function SetUpStartGroup() {
global $PHP_SESSION, $PHP_GET;
global $nStartGrp, $nTotalGrps, $nDisplayGrps;
//-------------------------------------------------------------------------------
// Function ResetCmd
// - RESET: reset search parameters
function ResetCmd() {
global $PHP_SESSION, $PHP_POST, $PHP_GET;
// Skip if post back
if (count($PHP_POST) > 0) return;
// Get Reset Cmd
if (@$PHP_GET["cmd"] != "") {
$sCmd = $PHP_GET["cmd"];
if (strtolower($sCmd) == "reset") {
ResetPager();
}
}
}
// Reset pager
function ResetPager() {
// Reset Start Position (Reset Command)
global $PHP_SESSION, $nStartGrp;
$nStartGrp = 1;
$PHP_SESSION[EW_TABLE_SESSION_START_GROUP] = $nStartGrp;
}
// Set up selection
function SetupSelection() {
global $PHP_SESSION, $PHP_POST, $PHP_GET;
// Process post back form
$sName = @$PHP_POST["popup"]; // Get popup form name
$sName = (get_magic_quotes_gpc()) ? stripslashes($sName) : $sName;
if ($sName <> "") {
$arValues = @$PHP_POST["sel_" . $sName];
if (is_array($arValues)) {
if (get_magic_quotes_gpc()) array_walk($arValues, 'ew_StripSlashes');
if (trim($arValues[0]) == "") { // Select all
$PHP_SESSION["all_" . $sName] = TRUE;
array_shift($arValues); // Remove first entry
} else {
$PHP_SESSION["all_" . $sName] = FALSE;
}
$PHP_SESSION["sel_" . $sName] = $arValues;
$PHP_SESSION["rf_" . $sName] = (get_magic_quotes_gpc()) ? stripslashes(@$PHP_POST["from_" . $sName]) : @$PHP_POST["from_" . $sName];
$PHP_SESSION["rt_" . $sName] = (get_magic_quotes_gpc()) ? stripslashes(@$PHP_POST["to_" . $sName]) : @$PHP_POST["to_" . $sName];
ResetPager();
}
}
// Load selection criteria to array
}
// Initialize group data - total number of groups + grouping field arrays
function InitReportData(&$rs) {
global $conn, $nTotalGrps, $bFilterApplied;
global $EW_TABLE_SQL_WHERE, $sFilter;
// Initialize group count
$grpcnt = 0;
foreach ($rs as $row) {
$bValidRow = ValidRow($row);
if (!$bValidRow) $bFilterApplied = TRUE;
// Update group count
if ($bValidRow) $grpcnt++;
}
// Set up total number of groups
$nTotalGrps = $grpcnt;
}
// Check if row is valid
function ValidRow($row) {
$ValidRow = TRUE;
return $ValidRow;
}
?>
<?php
//-------------------------------------------------------------------------------
// Function SetUpDisplayGrps
// - Set up Number of Groups displayed per page based on Form element GrpPerPage
// - Variables setup: nDisplayGrps
function SetUpDisplayGrps() {
global $PHP_GET;
global $PHP_SESSION;
global $nDisplayGrps;
global $nStartGrp;
$sWrk = @$PHP_GET[EW_TABLE_GROUP_PER_PAGE];
if ($sWrk <> "") {
if (is_numeric($sWrk)) {
$nDisplayGrps = intval($sWrk);
} else {
if (strtoupper($sWrk) == "ALL") { // Display All Records
$nDisplayGrps = -1;
} else {
$nDisplayGrps = 500; // Non-numeric, Load Default
}
}
$PHP_SESSION[EW_TABLE_SESSION_GROUP_PER_PAGE] = $nDisplayGrps; // Save to Session
// Cookie names
define("EW_COOKIE_AUTOLOGIN", EW_PROJECT_VAR . "_autologin", TRUE); // Auto Login
define("EW_COOKIE_USERNAME", EW_PROJECT_VAR . "_username", TRUE); // Auto Login User Name
define("EW_COOKIE_PASSWORD", EW_PROJECT_VAR . "_password", TRUE);; // Auto Login Password
// Random key for encryption
define("EW_RANDOM_KEY", "&30sl84YY_g_RvSC", TRUE);
// Chart data encoding
// Note: If you use non English languages, you need to set the encoding for
// charting. Make sure your encoding is supported by your PHP and either
// iconv functions or multibyte string functions are enabled. See PHP manual
// for details
// eg. define("EW_ENCODING", "ISO-8859-1", true);
define("EW_ENCODING", "utf8", true); // enter your encoding here