本文整理匯總了PHP中Reports::saveReport方法的典型用法代碼示例。如果您正苦於以下問題:PHP Reports::saveReport方法的具體用法?PHP Reports::saveReport怎麽用?PHP Reports::saveReport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Reports
的用法示例。
在下文中一共展示了Reports::saveReport方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: realpath
include_once realpath(dirname(__FILE__) . '/inc/code/globalIncludes.php');
/* Load classes */
if (isset($_POST['requestType'])) {
switch ($_POST['requestType']) {
case "saveReport":
/* Report name and category */
$formData = $core->parseQueryString(urldecode($_POST['formData']));
/* Report Name */
if (!isset($formData['reportName']) || strlen($formData['reportName']) <= 0) {
$name = "untitled";
} else {
$name = $formData['reportName'];
}
/* Report Category */
if ($formData['reportCatType'] == "new") {
/* New Category */
$reportCategory = $formData['reportCatNew'];
} else {
/* Existing Category */
$reportCategory = intval($formData['reportCatExisting']);
}
/* Report Parameters */
$reportParams = json_decode(urldecode($formData['reportParams']));
/* Load report class */
$report = new Reports();
/* Save Report */
$report->saveReport($reportParams->domain, $formData['reportName'], $reportCategory, $reportParams);
break;
}
}