本文整理汇总了PHP中CHttpRequest::get_value方法的典型用法代码示例。如果您正苦于以下问题:PHP CHttpRequest::get_value方法的具体用法?PHP CHttpRequest::get_value怎么用?PHP CHttpRequest::get_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHttpRequest
的用法示例。
在下文中一共展示了CHttpRequest::get_value方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
session_start();
include_once 'core/global.inc.php';
try {
// Initialise view and model
$view = new CView();
$dbSql = new Bweb($view);
require_once 'core/const.inc.php';
$backupjob_name = "";
$backupjob_bytes = 0;
$backupjob_files = 0;
$days = array();
$days_stored_bytes = array();
$days_stored_files = array();
// Backup job name
if (!is_null(CHttpRequest::get_value('backupjob_name'))) {
$backupjob_name = CHttpRequest::get_value('backupjob_name');
} else {
throw new Exception("Error: Backup job name not specified");
}
// Generate Backup Job report period string
$backupjob_period = "From " . date("Y-m-d", NOW - WEEK) . " to " . date("Y-m-d", NOW);
// Stored Bytes on the defined period
$backupjob_bytes = Jobs_Model::getStoredBytes($dbSql->db_link, array(LAST_WEEK, NOW), $backupjob_name);
$backupjob_bytes = CUtils::Get_Human_Size($backupjob_bytes);
// Stored files on the defined period
$backupjob_files = Jobs_Model::getStoredFiles($dbSql->db_link, array(LAST_WEEK, NOW), $backupjob_name);
$backupjob_files = CUtils::format_Number($backupjob_files);
// Get the last 7 days interval (start and end)
$days = DateTimeUtil::getLastDaysIntervals(7);
// ===============================================================
// Last 7 days stored Bytes graph
示例2:
break;
case STATUS_CANCELED:
$query .= "WHERE Job.JobStatus = 'A' ";
break;
case STATUS_ALL:
$query .= "WHERE Job.JobStatus != 'xxxx' ";
// This code must be improved
break;
}
$view->assign('job_status_filter', CHttpRequest::get_Value('status'));
}
// Selected client filter
if (!is_null(CHttpRequest::get_Value('client_id'))) {
$client_id = CHttpRequest::get_Value('client_id');
$view->assign('client_filter', $client_id);
if (!is_null(CHttpRequest::get_value('status'))) {
if ($client_id != 0) {
$query .= "AND Job.ClientId = '{$client_id}' ";
}
} else {
if ($client_id != 0) {
$query .= "WHERE Job.ClientId = '{$client_id}' ";
}
}
} else {
$view->assign('client_filter', 0);
}
$order_by = '';
$order_by_asc = 'DESC';
$result_order_asc_checked = '';
// Order result by