本文整理汇总了PHP中Vtiger_Request::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Request::isEmpty方法的具体用法?PHP Vtiger_Request::isEmpty怎么用?PHP Vtiger_Request::isEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Request
的用法示例。
在下文中一共展示了Vtiger_Request::isEmpty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process(Vtiger_Request $request)
{
PDFMaker_Debugger_Model::GetInstance()->Init();
$PDFMaker = new PDFMaker_PDFMaker_Model();
if ($PDFMaker->CheckPermissions("DELETE") == false) {
$PDFMaker->DieDuePermission();
}
$adb = PearDatabase::getInstance();
$id_array = array();
if ($request->has('templateid') && !$request->isEmpty('templateid')) {
$templateid = $request->get('templateid');
$checkSql = "select module from vtiger_pdfmaker where templateid=?";
$checkRes = $adb->pquery($checkSql, array($templateid));
$checkRow = $adb->fetchByAssoc($checkRes);
//if we are trying to delete template that is not allowed for current user then die because user should not be able to see the template
//$PDFMaker->CheckTemplatePermissions($checkRow["module"], $templateid);
$Template_Permissions_Data = $PDFMaker->returnTemplatePermissionsData($checkRow["module"], $templateid);
if ($Template_Permissions_Data["delete"] === false) {
$this->DieDuePermission();
}
$sql = "delete from vtiger_pdfmaker where templateid=?";
$adb->pquery($sql, array($templateid));
$sql = "delete from vtiger_pdfmaker_settings where templateid=?";
$adb->pquery($sql, array($templateid));
} else {
$idlist = $request->get('idlist');
$id_array = explode(';', $idlist);
$checkSql = "select templateid, module from vtiger_pdfmaker where templateid IN (" . generateQuestionMarks($id_array) . ")";
$checkRes = $adb->pquery($checkSql, $id_array);
$checkArr = array();
while ($checkRow = $adb->fetchByAssoc($checkRes)) {
$checkArr[$checkRow["templateid"]] = $checkRow["module"];
}
for ($i = 0; $i < count($id_array) - 1; $i++) {
//if we are trying to delete template that is not allowed for current user then die because user should not be able to see the template
//$PDFMaker->CheckTemplatePermissions($checkArr[$id_array[$i]], $id_array[$i]);
$Template_Permissions_Data = $PDFMaker->returnTemplatePermissionsData($checkArr[$id_array[$i]], $id_array[$i]);
if ($Template_Permissions_Data["delete"] === false) {
$this->DieDuePermission();
}
$sql = "delete from vtiger_pdfmaker where templateid=?";
$adb->pquery($sql, array($id_array[$i]));
$sql = "delete from vtiger_pdfmaker_settings where templateid=?";
$adb->pquery($sql, array($id_array[$i]));
}
}
$ajaxDelete = $request->get('ajaxDelete');
$listViewUrl = "index.php?module=PDFMaker&view=List";
if ($ajaxDelete) {
$response = new Vtiger_Response();
$response->setResult($listViewUrl);
return $response;
} else {
header("Location: {$listViewUrl}");
}
}
示例2: ReportLabels
public static function ReportLabels(Vtiger_Request $request, $viewer)
{
$adb = PearDatabase::getInstance();
$moduleName = $request->getModule();
$R_Data = $request->getAll();
$record = $request->get('record');
$viewer->assign("MODULE", $moduleName);
// ITS4YOU-CR SlOl 10. 9. 2013 16:13:47
$LBL_INFORMATIONS_4YOU = vtranslate("LBL_STEP7_INFO", $moduleName);
$viewer->assign("LBL_INFORMATIONS_4YOU", $LBL_INFORMATIONS_4YOU);
// ITS4YOU-END 10. 9. 2013 16:13:50
$reportModel = ITS4YouReports_Record_Model::getCleanInstance($record);
$Report_Informations = $reportModel->getReportInformations();
$Objects = array();
$selected_columns_array = $selectedSummaries_array = $curl_array = array();
// selected labels from url
$default_charset = vglobal("default_charset");
$lbl_url_string = html_entity_decode($R_Data["lblurl"], ENT_QUOTES, $default_charset);
$lbl_url_string = str_replace("@AMPKO@", "&", $lbl_url_string);
if ($lbl_url_string != "") {
$lbl_url_arr = explode('$_@_$', $lbl_url_string);
foreach ($lbl_url_arr as $key => $lbl_value) {
if (strpos($lbl_value, 'hidden_') === false) {
if (strpos($lbl_value, '_SC_lLbLl_') !== false) {
$temp = explode('_SC_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_url_selected["SC"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_SM_lLbLl_') !== false) {
$temp = explode('_SM_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_url_selected["SM"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_CT_lLbLl_') !== false) {
$temp = explode('_CT_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_url_selected["CT"][$lbl_key] = $lbl_value;
}
}
}
}
// COLUMNS labeltype SC
if (isset($R_Data["selectedColumnsStr"])) {
$selectedColumnsString = html_entity_decode($R_Data["selectedColumnsStr"], ENT_QUOTES, $default_charset);
$selectedColumnsString = str_replace("@AMPKO@", "&", $selectedColumnsString);
$selected_columns_array = explode("<_@!@_>", $selectedColumnsString);
} else {
$selectedColumnsString = html_entity_decode($Report_Informations["selectedColumnsString"], ENT_QUOTES, $default_charset);
$selected_columns_array = explode(";", $selectedColumnsString);
}
for ($gi = 1; $gi < 4; $gi++) {
if ($request->has("group{$gi}") && !$request->isEmpty("group{$gi}")) {
$group_col = $request->get("group{$gi}");
if ($group_col != "") {
$selected_columns_array[] = $group_col;
}
}
}
//ITS4YouReports::sshow($lbl_url_selected);
$labels_html["SC"] = $reportModel->report->getLabelsHTML($selected_columns_array, "SC", $lbl_url_selected);
// SUMMARIES labeltype SM
if (isset($R_Data["selectedSummariesString"])) {
$selectedColumnsString = trim($R_Data["selectedSummariesString"], ";");
$selectedColumnsString = str_replace("@AMPKO@", "&", $selectedColumnsString);
$selectedSummaries_array = explode(";", $selectedColumnsString);
} else {
if (isset($Report_Informations["summaries_columns"])) {
foreach ($Report_Informations["summaries_columns"] as $key => $sum_arr) {
$selectedSummaries_array[] = $sum_arr["columnname"];
}
}
}
$labels_html["SM"] = $reportModel->report->getLabelsHTML($selectedSummaries_array, "SM", $lbl_url_selected);
$viewer->assign("labels_html", $labels_html);
$viewer->assign("LABELS", $curl);
$viewer->assign("RECORDID", $record);
$viewer->assign("display_over", $Report_Informations["display_over"]);
$viewer->assign("display_under", $Report_Informations["display_under"]);
//added to avoid displaying "No data avaiable to total" when using related modules in report.
$rows_count = count($labels_html);
foreach ($labels_html as $key => $labels_type_arr) {
$rows_count += count($labels_type_arr);
}
$viewer->assign("ROWS_COUNT", $rows_count);
return $viewer->view('ReportLabels.tpl', $moduleName, true);
}
示例3: process
public function process(Vtiger_Request $request)
{
$log = vglobal('log');
$log->debug('Start ' . __CLASS__ . ':' . __FUNCTION__);
$db = PearDatabase::getInstance();
$qualifiedModule = $request->getModule(false);
$moduleModel = Settings_CurrencyUpdate_Module_Model::getCleanInstance();
$currentUser = Users_Record_Model::getCurrentUserModel();
// synchronise bank list
$moduleModel->refreshBanks();
$downloadBtn = !$request->isEmpty('download') ? $request->get('download') : false;
$date = !$request->isEmpty('duedate') ? Vtiger_Datetime_UIType::getDBInsertedValue($request->get('duedate')) : false;
$dateCur = '';
if ($date) {
// if its future date change it to present one
if (strtotime($date) > strtotime(date('Y-m-d'))) {
$date = date('Y-m-d');
}
$dateCur = $date;
} else {
$dateCur = date('Y-m-d');
}
// take currency rates for yesterday
if (strcmp(date('Y-m-d'), $dateCur) == 0) {
$dateCur = strtotime("-1 day", strtotime($dateCur));
$dateCur = date('Y-m-d', $dateCur);
}
$dateCur = Vtiger_Functions::getLastWorkingDay($dateCur);
// get currency if not already archived
if ($downloadBtn) {
$moduleModel->fetchCurrencyRates($dateCur);
}
$selectBankId = $moduleModel->getActiveBankId();
$history = $moduleModel->getRatesHistory($selectBankId, $dateCur, $request);
$bankTab = array();
$bankSQL = "SELECT * FROM yetiforce_currencyupdate_banks";
$bankResult = $db->query($bankSQL, true);
$i = 0;
while ($row = $db->fetchByAssoc($bankResult)) {
$bankTab[$i]['id'] = $row['id'];
$bankName = $row['bank_name'];
$bankTab[$i]['bank_name'] = $bankName;
$bankTab[$i]['active'] = $row['active'];
$i++;
}
// number of currencies
$curr_num = $moduleModel->getCurrencyNum();
// get info about main currency
$mainCurrencyInfo = Vtiger_Functions::getDefaultCurrencyInfo();
$viewer = $this->getViewer($request);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModule);
$viewer->assign('USER_MODEL', $currentUser);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('MODULENAME', 'CurrencyUpdate');
$viewer->assign('DATE', $request->has('duedate') ? Vtiger_Date_UIType::getDisplayValue($dateCur) : '');
$viewer->assign('CURRNUM', $curr_num);
$viewer->assign('BANK', $bankTab);
$viewer->assign('HISTORIA', $history);
$viewer->assign('MAINCURR', $mainCurrencyInfo);
$viewer->assign('SUPPORTED_CURRENCIES', $moduleModel->getSupportedCurrencies());
$viewer->assign('UNSUPPORTED_CURRENCIES', $moduleModel->getUnSupportedCurrencies());
$viewer->view('Index.tpl', $qualifiedModule);
$log->debug('End ' . __CLASS__ . ':' . __FUNCTION__);
}
示例4: save
//.........这里部分代码省略.........
if (strpos($lbl_value, '_SC_lLbLl_') !== false) {
$temp = explode('_SC_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["SC"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_SM_lLbLl_') !== false) {
$temp = explode('_SM_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["SM"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_CT_lLbLl_') !== false) {
$temp = explode('_CT_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["CT"][$lbl_key] = $lbl_value;
}
}
}
// ITS4YOU-END 13. 3. 2014 10:17:32
//<<<<<<<reportsortcol>>>>>>>>>
$sort_by1 = decode_html($request->get("Group1"));
$sort_order1 = $request->get("Sort1");
$sort_by2 = decode_html($request->get("Group2"));
$sort_order2 = $request->get("Sort2");
$sort_by3 = decode_html($request->get("Group3"));
$sort_order3 = $request->get("Sort3");
$timeline_type2 = $request->get("timeline_type2");
$timeline_type3 = $request->get("timeline_type3");
if ($request->has("TimeLineColumn_Group1") && !$request->isEmpty("TimeLineColumn_Group1") && $sort_by1 != "none") {
$TimeLineColumn_Group1 = $request->get("TimeLineColumn_Group1");
$TimeLineColumn_Group1_arr = explode("@vlv@", $TimeLineColumn_Group1);
$TimeLineColumn_str1 = $TimeLineColumn_Group1_arr[0];
$TimeLineColumn_frequency1 = $TimeLineColumn_Group1_arr[1];
}
if ($request->has("TimeLineColumn_Group2") && !$request->isEmpty("TimeLineColumn_Group2") && $sort_by2 != "none") {
$TimeLineColumn_Group2 = $request->get("TimeLineColumn_Group2");
$TimeLineColumn_Group2_arr = explode("@vlv@", $TimeLineColumn_Group2);
$TimeLineColumn_str2 = $TimeLineColumn_Group2_arr[0];
$TimeLineColumn_frequency2 = $TimeLineColumn_Group2_arr[1];
}
if ($request->has("TimeLineColumn_Group3") && !$request->isEmpty("TimeLineColumn_Group3") && $sort_by3 != "none") {
$TimeLineColumn_Group3 = $request->get("TimeLineColumn_Group3");
$TimeLineColumn_Group3_arr = explode("@vlv@", $TimeLineColumn_Group3);
$TimeLineColumn_str3 = $TimeLineColumn_Group3_arr[0];
$TimeLineColumn_frequency3 = $TimeLineColumn_Group3_arr[1];
}
$sort_by_column = decode_html($request->get("SortByColumn"));
$sort_order_column = $request->get("SortOrderColumn");
//<<<<<<<reportsortcol>>>>>>>>>
//<<<<<<<reportmodules>>>>>>>>>
$pmodule = $request->get("primarymodule");
$smodule = trim($request->get("secondarymodule"), ":");
//<<<<<<<reportmodules>>>>>>>>>
//<<<<<<<shared entities>>>>>>>>>
$sharetype = $request->get("sharing");
$shared_entities = $request->get("sharingSelectedColumnsString");
//<<<<<<<shared entities>>>>>>>>>
//<<<<<<<columnstototal>>>>>>>>>>
if ($request->has("curl_to_go") && !$request->isEmpty("curl_to_go")) {
$columnstototal = explode('$_@_$', $request->get("curl_to_go"));
}
示例5: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$requestAll = $request->getAll();
$record = $requestAll["record"];
if ($record != "") {
$mode = "edit";
} else {
$mode = "create";
}
global $default_charset;
$reportModel = new ITS4YouReports_Record_Model();
$reportModel->setModule("ITS4YouReports");
if (!empty($record) && !$request->get('isDuplicate')) {
$reportModel->setId($record);
}
//$reporttype = $request->get('reporttype');
//if(empty($reporttype)) $reporttype='tabular';
$reportModel->set('reportname', $requestAll['reportname']);
$reportModel->set('folderid', $requestAll['reportfolder']);
$reportModel->set('description', $requestAll['reports_description']);
//$reportModel->set('reporttype', $reporttype);
$reportModel->setPrimaryModule($requestAll['primarymodule']);
$reportModel->set('template_owner', $requestAll['template_owner']);
$reportModel->set('sharing', $requestAll['sharing']);
//$secondaryModules = $request->get('secondary_modules');
//$secondaryModules = implode(':', $secondaryModules);
//$reportModel->setSecondaryModule($secondaryModules);
$saveselectedcolumns = explode(";", trim($requestAll['selectedColumnsString'], ";"));
$reportModel->set('selectedFields', $saveselectedcolumns);
$selectedSummaries_array = explode(";", trim($requestAll['selectedSummariesString'], ";"));
$reportModel->set('selectedSummaries', $selectedSummaries_array);
$reportModel->set('summaries_orderby', $requestAll['summaries_orderby_columnString']);
$reportModel->set('summaries_orderby_type', $requestAll['summaries_orderby_type']);
$lbl_array = array();
$lbl_url_string = $requestAll['labels_to_go'];
$lbl_url_string = urldecode($lbl_url_string);
$lbl_url_string = html_entity_decode($lbl_url_string, ENT_QUOTES, $default_charset);
// $lbl_url_string = str_replace("@AMPKO@", "&", $lbl_url_string);
if ($lbl_url_string != "") {
$lbl_url_arr = explode('$_@_$', $lbl_url_string);
foreach ($lbl_url_arr as $key => $lbl_value) {
if (strpos($lbl_value, '_SC_lLbLl_') !== false) {
$temp = explode('_SC_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["SC"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_SM_lLbLl_') !== false) {
$temp = explode('_SM_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["SM"][$lbl_key] = $lbl_value;
}
if (strpos($lbl_value, '_CT_lLbLl_') !== false) {
$temp = explode('_CT_lLbLl_', $lbl_value);
$temp_lbls = explode('_lLGbGLl_', $temp[1]);
$lbl_key = $temp_lbls[0];
$lbl_value = $temp_lbls[1];
$lbl_array["CT"][$lbl_key] = $lbl_value;
}
}
}
$reportModel->set('lbl_array', $lbl_array);
for ($gi = 1; $gi < 4; $gi++) {
$reportModel->set('sort_by' . $gi, $requestAll['Group' . $gi]);
$reportModel->set('sort_order' . $gi, $requestAll['Sort' . $gi]);
}
$reportModel->set('timeline_type2', $requestAll['timeline_type2']);
$reportModel->set('timeline_type3', $requestAll['timeline_type3']);
for ($tgi = 1; $tgi < 4; $tgi++) {
if ($request->has('TimeLineColumn_Group' . $tgi) && !$request->isEmpty('TimeLineColumn_Group' . $tgi) && $requestAll['Group' . $tgi] != "none") {
$TimeLineColumn_Group = $requestAll['TimeLineColumn_Group' . $tgi];
$TimeLineColumn_Group_arr = explode("@vlv@", $TimeLineColumn_Group);
$TimeLineColumn_str = $TimeLineColumn_Group_arr[0];
$TimeLineColumn_frequency = $TimeLineColumn_Group_arr[1];
$reportModel->set('TimeLineColumn_str' . $tgi, $TimeLineColumn_str);
$reportModel->set('TimeLineColumn_frequency' . $tgi, $TimeLineColumn_frequency);
}
}
$reportModel->set('SortByColumn', $requestAll['SortByColumn']);
$reportModel->set('SortOrderColumn', $requestAll['SortOrderColumn']);
$pmodule = $requestAll['primarymodule'];
$reportModel->set('pmodule', $pmodule);
$smodule = trim($requestAll['secondarymodule'], ":");
$reportModel->set('smodule', $smodule);
$reportModel->set('sharetype', $requestAll['sharing']);
$reportModel->set('shared_entities', $requestAll['sharingSelectedColumnsString']);
$columnstototal = explode('$_@_$', $requestAll["curl_to_go"]);
$reportModel->set('columnstototal', $columnstototal);
$json = new Zend_Json();
//$std_filter_columns = $ITS4YouReports->getStdFilterColumns();
$advft_criteria = $requestAll['advft_criteria'];
$advft_criteria = $json->decode($advft_criteria);
$reportModel->set('advft_criteria', $advft_criteria);
$advft_criteria_groups = $requestAll['advft_criteria_groups'];
$advft_criteria_groups = $json->decode($advft_criteria_groups);
$reportModel->set('advft_criteria_groups', $advft_criteria_groups);
//.........这里部分代码省略.........
示例6: getStoredITS4YouReport
public function getStoredITS4YouReport()
{
$r4u_sesstion_name = ITS4YouReports::getITS4YouReportStoreName();
$request = new Vtiger_Request($_REQUEST, $_REQUEST);
// used to unlink sessioned reports !
if ($request->has("refresh") && $request->get('refresh') === "true") {
ITS4YouReports::sshow(ITS4YouReports::unsetITS4YouReportsSerialize($r4u_sesstion_name));
}
// to unlink all
if ($request->has("mode") && $request->get('mode') === "ChangeSteps") {
$run_construct = false;
} else {
if ($request->has("view") && $request->get('view') === "Edit" && isset($_SESSION[$r4u_sesstion_name])) {
$run_construct = false;
} else {
$run_construct = true;
}
}
$return_obj = new ITS4YouReports($run_construct);
if (ITS4YouReports::isStoredITS4YouReport() === true) {
$return_obj = unserialize($_SESSION[$r4u_sesstion_name]);
}
if (isset($return_obj->reportinformations["deleted"]) && $return_obj->reportinformations["deleted"] !== 0 && $return_obj->reportinformations["deleted"] !== "0") {
die("<br><br><center>" . vtranslate('LBL_RECORD_DELETE') . " <a href='javascript:window.history.back()'>" . vtranslate('LBL_GO_BACK') . ".</a></center>");
}
if ($request->has("record") && !$request->isEmpty("record")) {
$return_obj->primarymoduleid = $return_obj->reportinformations["primarymodule"];
$return_obj->primarymodule = vtlib_getModuleNameById($return_obj->primarymoduleid);
}
return $return_obj;
}