$info["filter_version"] = $fVersion; $info["filter_product"] = $fName; $comment = new Comment($dbConnectionInfo, "", $fullUser); if (isset($_POST["inPage"]) && trim($_POST["inPage"]) == "true") { $clean = Utils::getParam($_POST, 'clean'); $filter = new NoFilter(); $baserUrl = getBaseUrl($fName, $fVersion); $cellRenderer = new LinkCellRenderer($baserUrl); $cellRenderer->addLinkToField("page"); if ($clean == 'true') { $cellRenderer = null; $filter = new ExistingPageFilter(__BASE_DIR__, 'page'); } else { $filter = new MissingPageFilter(__BASE_DIR__, 'page'); } $exporter = new InLineExporter('commentId', array('commentId'), array(45, 24, 16, 7)); $exporter->setFilter($filter); $exporter->setCellRenderer($cellRenderer); $comment->exportForPage($info, $exporter, array('commentId', 'text', 'page', 'date', 'state')); if ($exporter->getContent() != "") { echo $exporter->getContent(); } else { echo Utils::translate("noDataAvailable"); } } else { $exporter = new XmlExporter("comments"); $comment->exportForPage($info, $exporter); header('Content-Description: File Transfer'); header('Content-Type: text/xml'); header('Content-Disposition: attachment; filename=comments_' . $fName . '_' . $fVersion . '.xml'); header('Content-Transfer-Encoding: binary');
require_once 'init.php'; $ses = Session::getInstance(); if (isset($_POST["productName"]) && trim($_POST["productName"]) != "" && (isset($_POST["productVersion"]) && trim($_POST["productVersion"]) != "")) { $product = isset($_POST['productName']) ? $_POST['productName'] : ""; $version = isset($_POST['productVersion']) ? $_POST['productVersion'] : ""; if (Utils::isAdministrator($product, $version)) { if (isset($_POST["inPage"]) && trim($_POST["inPage"]) == "true") { $clean = Utils::getParam($_POST, 'clean'); $filter = new NoFilter(); $cellRenderer = new DefaultCellRenderer("span"); if ($clean == 'true') { $filter = new UnconfirmedUserFilter(-7, "date"); } else { $filter = new ConfirmedUserFilter(-7, "date"); } $exporter = new InLineExporter('userId', array('userId'), array(17, 25, 30, 20)); $exporter->setFilter($filter); $exporter->setCellRenderer($cellRenderer); $tableExporter = new TableExporter("users", $dbConnectionInfo); $tableExporter->export($exporter, "userId,userName,name,email,date", "ORDER BY date DESC"); if ($exporter->getContent() != "") { echo $exporter->getContent(); } else { echo Utils::translate("noDataAvailable"); } } else { // $exporter = new XmlExporter("comments"); // $comment->exportForPage($info,$exporter); // header('Content-Description: File Transfer'); // header('Content-Type: text/xml'); // header('Content-Disposition: attachment; filename=comments_'.$fName.'_'.$fVersion.'.xml');