本文整理汇总了PHP中Vtiger_Request::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Request::set方法的具体用法?PHP Vtiger_Request::set怎么用?PHP Vtiger_Request::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Request
的用法示例。
在下文中一共展示了Vtiger_Request::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process(Vtiger_Request $request)
{
//To stop saveing the value of salutation as '--None--'
$salutationType = $request->get('salutationtype');
if ($salutationType === '--None--') {
$request->set('salutationtype', '');
}
parent::process($request);
}
示例2: process
public function process(Vtiger_Request $request)
{
// SalesPlatform.ru begin
require_once 'includes/SalesPlatform/NetIDNA/idna_convert.class.php';
// SalesPlatform.ru end
$outgoingServerSettingsModel = Settings_Vtiger_Systems_Model::getInstanceFromServerType('email', 'OutgoingServer');
$loadDefaultSettings = $request->get('default');
if ($loadDefaultSettings == "true") {
$outgoingServerSettingsModel->loadDefaultValues();
} else {
$outgoingServerSettingsModel->setData($request->getAll());
}
$response = new Vtiger_Response();
// SalesPlatform.ru begin
$idn = new idna_convert();
$server_username = $idn->encode(vtlib_purify($request->get('server')));
$from_email_field = $idn->encode(vtlib_purify($request->get('from_email_field')));
$request->set('server_username', $server_username);
$request->set('from_email_field', $from_email_field);
// SalesPlatform.ru end
try {
$id = $outgoingServerSettingsModel->save($request);
$data = $outgoingServerSettingsModel->getData();
$response->setResult($data);
} catch (Exception $e) {
$response->setError($e->getCode(), $e->getMessage());
}
$response->emit();
}
示例3: process
public function process(Vtiger_Request $request)
{
${"GLOBALS"}["ekosczsy"] = "tabid";
${${"GLOBALS"}["ekosczsy"]} = getTabId($request->get("workflowModule"));
${"GLOBALS"}["mhuirymtoy"] = "tabid";
${${"GLOBALS"}["hvamuhbnnwu"]} = \PearDatabase::getInstance();
if ($request->get("hidden") == true) {
ob_start();
}
if (!empty(${${"GLOBALS"}["mhuirymtoy"]})) {
${"GLOBALS"}["outajbzyo"] = "result";
${${"GLOBALS"}["rnhwfqjyx"]} = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["bxwgaby"]};
${${"GLOBALS"}["dsrfsmvy"]} = $adb->query(${${"GLOBALS"}["rnhwfqjyx"]});
${${"GLOBALS"}["xdyqgnxwn"]} = $request->get("MODE");
$xyxnkgw = "mode";
if (${${"GLOBALS"}["xdyqgnxwn"]} == "ADD" && $adb->num_rows(${${"GLOBALS"}["outajbzyo"]}) > 1) {
${"GLOBALS"}["cnubqpsfrtf"] = "tabid";
$adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["bxwgaby"]}, true);
${${"GLOBALS"}["rnhwfqjyx"]} = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["cnubqpsfrtf"]};
${${"GLOBALS"}["dsrfsmvy"]} = $adb->query(${${"GLOBALS"}["rnhwfqjyx"]});
}
if (${${"GLOBALS"}["xdyqgnxwn"]} == "DEL" || empty(${$xyxnkgw}) && $adb->num_rows(${${"GLOBALS"}["dsrfsmvy"]}) > 0) {
${"GLOBALS"}["jywgricc"] = "tabid";
$lxcddedp = "mode";
${$lxcddedp} = "DEL";
$adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["jywgricc"]}, true);
echo getTranslatedString("LBL_ACTIVATE_SIDEBAR", "Settings:Workflow2");
} elseif ($adb->num_rows(${${"GLOBALS"}["dsrfsmvy"]}) == 0) {
${"GLOBALS"}["ocotbv"] = "mode";
${${"GLOBALS"}["ocotbv"]} = "ADD";
${"GLOBALS"}["hdlxhrdrllur"] = "linkid";
${${"GLOBALS"}["rzgmacoc"]} = $adb->getUniqueID("vtiger_links");
$adb->query("INSERT INTO vtiger_links SET linkid = '" . ${${"GLOBALS"}["rzgmacoc"]} . "',linktype = 'DETAILVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = " . ${${"GLOBALS"}["bxwgaby"]} . ",linkurl='" . "module=Workflow2&view=SidebarWidget" . "'", true);
${${"GLOBALS"}["rzgmacoc"]} = $adb->getUniqueID("vtiger_links");
$qcahtlck = "tabid";
$adb->query("INSERT INTO vtiger_links SET linkid = '" . ${${"GLOBALS"}["hdlxhrdrllur"]} . "',linktype = 'LISTVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = " . ${$qcahtlck} . ",linkurl='" . "module=Workflow2&src_module=" . $request->get("workflowModule") . "&view=SidebarListWidget" . "'", true);
echo getTranslatedString("LBL_DEACTIVATE_SIDEBAR", "Settings:Workflow2");
}
}
if ($request->get("hidden") == true) {
ob_end_clean();
}
if ($request->get("workflowModule") == "Calendar") {
${"GLOBALS"}["jrpyqoyvdoz"] = "request2";
${${"GLOBALS"}["jrpyqoyvdoz"]} = ${${"GLOBALS"}["ognxjavta"]};
$request->set("MODE", ${${"GLOBALS"}["xdyqgnxwn"]});
$request->set("workflowModule", "Events");
$request->set("hidden", true);
$this->process(${${"GLOBALS"}["ognxjavta"]});
}
}
示例4: process
public function process(Vtiger_Request $request)
{
global $log, $adb, $moduleName;
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$request->set('assigned_user_id', $currentUserModel->getId());
$request->set('userid', $currentUserModel->getId());
$recordModel = $this->saveRecord($request);
$fieldModelList = $recordModel->getModule()->getFields();
$result = array();
foreach ($fieldModelList as $fieldName => $fieldModel) {
$fieldValue = $recordModel->get($fieldName);
$result[$fieldName] = array('value' => $fieldValue, 'display_value' => $fieldModel->getDisplayValue($fieldValue));
}
$result['id'] = $recordModel->getId();
$result['_recordLabel'] = $recordModel->getName();
$result['_recordId'] = $recordModel->getId();
//modify by jmangarret 11jun2015 Enviar email
$idCaso = $request->get("related_to");
$userid = $request->get("userid");
$comment = $request->get("commentcontent");
$query = $adb->pquery("select smcreatorid, smownerid from vtiger_crmentity where setype='HelpDesk' and crmid = ? ", array($idCaso));
$row = $adb->fetchByAssoc($query);
$idowner = $row['smownerid'];
$idcreator = $row['smcreatorid'];
if ($userid == $idowner) {
$userid = $idcreator;
} else {
$userid = $idowner;
}
$query = $adb->pquery("select * from vtiger_troubletickets where ticketid = ? ", array($idCaso));
$row = $adb->fetchByAssoc($query);
$title = $row['title'];
//Para Validar si es un comentario de un caso
$ticket = $row['ticket_no'];
//Para Validar si es un comentario de un caso
if ($title && $idowner != $idcreator) {
$query = $adb->pquery("select * from vtiger_users where id = ? ", array($userid));
$row = $adb->fetchByAssoc($query);
$email = $row["email1"];
$nombre = $row["first_name"];
$asunto = "Informacion";
$mensaje = " \n\t\t\t\t<html> \n\t\t\t\t<head> \n\t\t\t\t<title>Info - Tu Agencia 24</title> \n\t\t\t\t</head> \n\t\t\t\t<body> \n\t\t\t\t<p>" . $nombre . ",</p>\n\t\t\t\t<p>El siguiente caso ha sido comentado:</p>\n\t\t\t\t<p><b>Nro. Ticket: </b>" . $ticket . "</p>\n\t\t\t\t<p><b>Caso: </b>" . $title . "</p>\n\t\t\t\t<p><b>Comentario: </b>" . $comment . "</p>\n\t\t\t\t<BR><BR><BR>\n\t\t\t\t<i>\n\t\t\t\tGracias,\t\t\n\t\t\t\t<p>Equipo TuAgencia24.com</p>\n\t\t\t\t</i>\n\t\t\t\t</body> \n\t\t\t\t</html> ";
enviarEmail($email, $asunto, $mensaje);
}
//Fin enviar email
$response = new Vtiger_Response();
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
$response->setResult($result);
$response->emit();
}
示例5: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('record');
$scannerId = $request->get('scannerId');
$action = $request->get('action1');
$request->set('action', $action);
$qualifiedModuleName = $request->getModule(false);
if ($recordId) {
$recordModel = Settings_MailConverter_RuleRecord_Model::getInstanceById($recordId);
} else {
$recordModel = Settings_MailConverter_RuleRecord_Model::getCleanInstance($scannerId);
}
$recordModel->assignedTo = $request->get('assignedTo');
$recordModel->cc = $request->get('cc');
$recordModel->bcc = $request->get('bcc');
$fieldsList = $recordModel->getFields();
foreach ($fieldsList as $fieldName) {
$recordModel->set($fieldName, $request->get($fieldName));
}
$recordModel->set('newAction', $request->get('action'));
$ruleId = $recordModel->save();
$response = new Vtiger_Response();
$response->setResult(array('message' => vtranslate('LBL_SAVED_SUCCESSFULLY', $qualifiedModuleName), 'id' => $ruleId, 'scannerId' => $scannerId));
$response->emit();
}
示例6: process
public function process(Vtiger_Request $request)
{
//the new values are added to $_REQUEST for Ajax Save, are removing the Tax details depend on the 'ajxaction' value
$_REQUEST['ajxaction'] = 'DETAILVIEW';
$request->set('ajaxaction', 'DETAILVIEW');
parent::process($request);
}
示例7: preProcess
public function preProcess(Vtiger_Request $request)
{
date_default_timezone_set('Europe/London');
// to overcome the pre configuration settings
// Added to redirect to default module if already installed
$request->set('module', 'Install');
$configFileName = 'config/config.inc.php';
if (is_file($configFileName) && filesize($configFileName) > 0) {
$defaultModule = vglobal('default_module');
$defaultModuleInstance = Vtiger_Module_Model::getInstance($defaultModule);
$defaultView = $defaultModuleInstance->getDefaultViewName();
header('Location:../index.php?module=' . $defaultModule . '&view=' . $defaultView);
exit;
}
$request = $this->setLanguage($request);
$_SESSION['default_language'] = $defaultLanguage = $request->get('lang') ? $request->get('lang') : 'en_us';
vglobal('default_language', $defaultLanguage);
$viewer = new Vtiger_Viewer();
$viewer->setTemplateDir('install/tpl/');
$viewer->assign('LANGUAGE_STRINGS', $this->getJSLanguageStrings($request));
$viewer->assign('HTMLLANG', Vtiger_Language_Handler::getShortLanguageName());
define('INSTALLATION_MODE', true);
define('INSTALLATION_MODE_DEBUG', $this->debug);
echo $viewer->fetch('InstallPreProcess.tpl');
}
示例8: initializeListViewContents
public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
{
//src_module value is added just to stop showing inactive services
$request->set('src_module', $request->getModule());
parent::initializeListViewContents($request, $viewer);
$viewer->assign('MODULE', $request->getModule());
//$viewer->assign('GETURL', 'getTaxesURL');
$viewer->assign('VIEW', 'CalculationsPopup');
}
示例9: process
public function process(Vtiger_Request $request)
{
//the new values are added to $_REQUEST for MassSave, are removing the Tax details depend on the 'action' value
$_REQUEST['action'] = 'MassEditSave';
$request->set('action', 'MassEditSave');
//the new values are added to $_REQUEST for MassSave, the unit price depend on the 'mass_edit_check' value
$_REQUEST['unit_price_mass_edit_check'] = 'off';
parent::process($request);
}
示例10: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('record');
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$request->set('assigned_user_id', $currentUserModel->getId());
$request->set('userid', $currentUserModel->getId());
$this->saveRecord($request);
$recordModel = ModComments_Record_Model::getInstanceById($recordId);
$result['success'] = true;
$result['reasontoedit'] = $recordModel->get('reasontoedit');
$result['commentcontent'] = $recordModel->get('commentcontent');
$result['modifiedtime'] = Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime'));
$result['modifiedtimetitle'] = Vtiger_Util_Helper::formatDateTimeIntoDayString($recordModel->get('modifiedtime'));
$response = new Vtiger_Response();
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
$response->setResult($result);
$response->emit();
}
示例11: process
public function process(Vtiger_Request $request)
{
//Restrict to store indirect relationship from Potentials to Contacts
$sourceModule = $request->get('sourceModule');
$relationOperation = $request->get('relationOperation');
if ($relationOperation && $sourceModule === 'Contacts') {
$request->set('relationOperation', false);
}
parent::process($request);
}
示例12: process
public function process(Vtiger_Request $request)
{
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$request->set('assigned_user_id', $currentUserModel->getId());
$request->set('userid', $currentUserModel->getId());
$recordModel = $this->saveRecord($request);
$fieldModelList = $recordModel->getModule()->getFields();
$result = array();
foreach ($fieldModelList as $fieldName => $fieldModel) {
$fieldValue = $recordModel->get($fieldName);
$result[$fieldName] = array('value' => $fieldValue, 'display_value' => $fieldModel->getDisplayValue($fieldValue));
}
$result['id'] = $recordModel->getId();
$result['_recordLabel'] = $recordModel->getName();
$result['_recordId'] = $recordModel->getId();
$response = new Vtiger_Response();
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
$response->setResult($result);
$response->emit();
}
示例13: process
public function process(Vtiger_Request $request)
{
$result = Vtiger_Util_Helper::transformUploadedFiles($_FILES, true);
$_FILES = $result['imagename'];
//To stop saveing the value of salutation as '--None--'
$salutationType = $request->get('salutationtype');
if ($salutationType === '--None--') {
$request->set('salutationtype', '');
}
parent::process($request);
}
示例14: process
public function process(Vtiger_Request $request)
{
global $current_user;
${"GLOBALS"}["yiresb"] = "active";
${"GLOBALS"}["knunfcsjumu"] = "workflowID";
$kzjdunyh = "sql";
${"GLOBALS"}["jjsjrqhhjneu"] = "workflowID";
${${"GLOBALS"}["opwcyadpqbwr"]} = PearDatabase::getInstance();
${${"GLOBALS"}["jjsjrqhhjneu"]} = intval($request->get("workflow"));
${${"GLOBALS"}["yiresb"]} = intval($request->get("value"));
${${"GLOBALS"}["qiklrvjvw"]} = "UPDATE vtiger_wf_settings SET `active` = ? WHERE id = ?";
$adb->pquery(${$kzjdunyh}, array(${${"GLOBALS"}["ljpwhfqap"]}, intval(${${"GLOBALS"}["knunfcsjumu"]})));
${"GLOBALS"}["vztwzy"] = "active";
if (${${"GLOBALS"}["ljpwhfqap"]} == "1") {
$tvsadaoea = "result";
${${"GLOBALS"}["qiklrvjvw"]} = "SELECT module_name FROM vtiger_wf_settings WHERE id = ?";
$rdlqurtccaf = "request";
${"GLOBALS"}["ovgycf"] = "sidebar";
$ncascfhhoju = "result";
${$tvsadaoea} = $adb->pquery(${${"GLOBALS"}["qiklrvjvw"]}, array(intval(${${"GLOBALS"}["yhvtuimi"]})));
${${"GLOBALS"}["redluzuev"]} = $adb->fetchByAssoc(${$ncascfhhoju});
$request->set("workflowModule", ${${"GLOBALS"}["redluzuev"]}["module_name"]);
$request->set("hidden", true);
$request->set("MODE", "ADD");
${${"GLOBALS"}["ovgycf"]} = new Settings_Workflow2_SidebarToggle_Action();
$sidebar->process(${$rdlqurtccaf});
}
if (${${"GLOBALS"}["vztwzy"]} != "1") {
${"GLOBALS"}["lofseigxsa"] = "workflowObj";
${"GLOBALS"}["ncfqhsgvlvp"] = "runningCounter";
${${"GLOBALS"}["lofseigxsa"]} = new \Workflow\Main(${${"GLOBALS"}["yhvtuimi"]});
${${"GLOBALS"}["ncfqhsgvlvp"]} = $workflowObj->countRunningInstances();
if (${${"GLOBALS"}["noevuiecun"]} > 0) {
echo json_encode(array("show_warning" => 1));
exit;
}
}
echo json_encode(array("show_warning" => 0));
exit;
}
示例15: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('record');
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$request->set('assigned_user_id', $currentUserModel->getId());
$request->set('userid', $currentUserModel->getId());
$recordModel = $this->saveRecord($request);
$responseFieldsToSent = array('reasontoedit', 'commentcontent');
$fieldModelList = $recordModel->getModule()->getFields();
foreach ($responseFieldsToSent as $fieldName) {
$fieldModel = $fieldModelList[$fieldName];
$fieldValue = $recordModel->get($fieldName);
$result[$fieldName] = $fieldModel->getDisplayValue(Vtiger_Util_Helper::toSafeHTML($fieldValue));
}
$result['success'] = true;
$result['modifiedtime'] = Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime'));
$result['modifiedtimetitle'] = Vtiger_Util_Helper::formatDateTimeIntoDayString($recordModel->get('modifiedtime'));
$response = new Vtiger_Response();
$response->setEmitType(Vtiger_Response::$EMIT_JSON);
$response->setResult($result);
$response->emit();
}