public function listReport() { $orderBy = $_GET['orderBy']; if (!$orderBy) { $orderBy = "Date DESC"; } $whereStatus = mysql_real_escape_string($_GET['Status']); $whereQueue = mysql_real_escape_string($_GET['Queue']); $whereWPLGeo = mysql_real_escape_string($_GET['WPLGeo']); $whereWBGeo = mysql_real_escape_string($_GET['WBGeo']); $whereQAGeo = mysql_real_escape_string($_GET['QAGeo']); // $rs = mysql_query(" // SELECT Date, // DueDate, // Task, // Complexity, // PlatImplementation, // Category, // NumberOfPages, // Comments, // flag_comment, // WPL.Name, // WPL.Geography, // Builder.Name, // Builder.Geography, // Builder.Queue, // QA.Name, // QA.Geography, // QA.Queue, // Errors.TypeError_IdTypeError, // Errors.ErrorName, // Errors_has_Report.Quantity // FROM Report // LEFT JOIN Builder ON Report.Builder_Email = Builder.Email // LEFT JOIN QA ON Report.QA_Email = QA.Email // LEFT JOIN WPL ON Report.WPL_Email = WPL.Name // LEFT JOIN Errors_has_Report ON Report.idReport = Errors_has_Report.Report_idReport // LEFT JOIN Errors ON Errors_has_Report.Errors_idErrors = Errors.idErrors // LEFT JOIN TypeError ON TypeError.idTypeError = Errors.TypeError_IdTypeError // ORDER BY {$orderBy} LIMIT 100"); $rs = mysql_query("\r\n SELECT {$_GET['target']},Report.QAapproved,Report.flagged\r\n FROM Report\r\n LEFT JOIN Builder ON Report.Builder_Email = Builder.Email\r\n LEFT JOIN QA ON Report.QA_Email = QA.Email\r\n LEFT JOIN WPL ON Report.WPL_Email = WPL.Name\r\n LEFT JOIN Errors_has_Report ON Report.idReport = Errors_has_Report.Report_idReport\r\n LEFT JOIN Errors ON Errors_has_Report.Errors_idErrors = Errors.idErrors\r\n LEFT JOIN TypeError ON TypeError.idTypeError = Errors.TypeError_IdTypeError\r\n LEFT JOIN Queues ON Report.PlatImplementation = Queues.PlatImplement\r\n WHERE Report.Date BETWEEN '{$_GET['From']}' AND '{$_GET['To']}' \r\n AND (Report.QAapproved = '{$whereStatus}' OR '{$whereStatus}' = '')\r\n AND (Queues.Queue LIKE '%{$whereQueue}%' OR '{$whereQueue}' = '')\r\n AND (WPL.Geography LIKE '%{$whereWPLGeo}%' OR '{$whereWPLGeo}' = '')\r\n AND (Builder.Geography LIKE '%{$whereWBGeo}%' OR '{$whereWBGeo}' = '')\r\n AND (QA.Geography LIKE '%{$whereQAGeo}%' OR '{$whereQAGeo}' = '')\r\n ORDER BY {$orderBy} LIMIT 1000"); $rows = ""; while ($data = mysql_fetch_array($rs)) { $rows .= Main::generateRows($data, null, array("QAapproved", "flagged"), create_function('$data', 'return $data["QAapproved"] == 0 ? "OrangeRed" : ($data["QAapproved"] == 1 ? "Green" : ($data["QAapproved"] == 2 ? "MediumAquaMarine" : ($data["flagged"] == 1 ? "Orange" : "")));')); } return $rows == "" ? "<tr><td colspan='20'><font color='red'>No data was found.</font></td></tr>" : $rows; }
public function listMember() { $role = $_GET['Role']; $rs = mysql_query("SELECT * FROM {$_GET['Role']}"); $rows = ""; while ($data = mysql_fetch_array($rs)) { $rows .= Main::generateRows($data); } return $rows; }