• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vtlib_purify函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vtlib_purify函数的典型用法代码示例。如果您正苦于以下问题:PHP vtlib_purify函数的具体用法?PHP vtlib_purify怎么用?PHP vtlib_purify使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vtlib_purify函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: save_module

 function save_module()
 {
     global $adb;
     //in ajax save we should not call this function, because this will delete all the existing product values
     if ($_REQUEST['action'] != 'QuotesAjax' && $_REQUEST['ajxaction'] != 'DETAILVIEW' && $_REQUEST['action'] != 'MassEditSave' && $_REQUEST['action'] != 'ProcessDuplicates' && $_REQUEST['action'] != 'SaveAjax' && $this->isLineItemUpdate != false) {
         //Based on the total Number of rows we will save the product relationship with this entity
         saveInventoryProductDetails($this, 'Quotes');
     }
     // Update the currency id and the conversion rate for the quotes
     $update_query = "update vtiger_quotes set currency_id=?, conversion_rate=? where quoteid=?";
     $update_params = array($this->column_fields['currency_id'], $this->column_fields['conversion_rate'], $this->id);
     $adb->pquery($update_query, $update_params);
     $tot_no_prod = $_REQUEST['totalProductCount'];
     $calculationList = array();
     for ($i = 1; $i <= $tot_no_prod; $i++) {
         $calculationsid = vtlib_purify($_REQUEST['calculationId' . $i]);
         $calculationsid_old = vtlib_purify($_REQUEST['old_calculationId' . $i]);
         if ($calculationsid_old != '' && !in_array($calculationsid_old, $calculationList) && $calculationsid != $calculationsid_old) {
             $this->delete_related_module('Quotes', $this->id, 'Calculations', $calculationsid_old);
         }
         if ($calculationsid != '') {
             $calculationList[] = $calculationsid;
             $this->save_related_module('Quotes', $this->id, 'Calculations', $calculationsid);
         }
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:26,代码来源:Quotes.php


示例2: requestForgotPassword

 public function requestForgotPassword($request)
 {
     $request = new Vtiger_Request($request);
     $adb = PearDatabase::getInstance();
     $username = vtlib_purify($request->get('user_name'));
     $result = $adb->pquery('select id,email1 from vtiger_users where user_name = ? ', array($username));
     if ($adb->num_rows($result) > 0) {
         $email = $adb->query_result($result, 0, 'email1');
     }
     if (strcasecmp($request->get('emailId'), $email) === 0) {
         $userId = $adb->query_result($result, 0, 'id');
         $time = time();
         $options = array('handler_path' => 'modules/Users/handlers/ForgotPassword.php', 'handler_class' => 'Users_ForgotPassword_Handler', 'handler_function' => 'changePassword', 'handler_data' => array('username' => $username, 'email' => $email, 'time' => $time, 'hash' => md5($username . $time)));
         $trackURL = Vtiger_ShortURL_Helper::generateURL($options);
         $data = ['sysname' => 'UsersForgotPassword', 'to_email' => $email, 'module' => 'Users', 'record' => $userId, 'trackURL' => $trackURL];
         $recordModel = Vtiger_Record_Model::getCleanInstance('OSSMailTemplates');
         $status = $recordModel->sendMailFromTemplate($data);
         $site_URL = vglobal('site_URL') . 'index.php?modules=Users&view=Login';
         if ($status === 1) {
             header('Location:  ' . $site_URL . '&status=1');
         } else {
             header('Location:  ' . $site_URL . '&statusError=1');
         }
     } else {
         $site_URL = vglobal('site_URL') . 'index.php?modules=Users&view=Login';
         header('Location:  ' . $site_URL . '&fpError=1');
     }
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:28,代码来源:ForgotPassword.php


示例3: vtDeleteWorkflow

function vtDeleteWorkflow($adb, $request)
{
    $util = new VTWorkflowUtils();
    $module = new VTWorkflowApplication("deltetask");
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $wm = new VTTaskManager($adb);
    $wm->deleteTask($request['task_id']);
    if (isset($request["return_url"])) {
        $returnUrl = vtlib_purify($request["return_url"]);
    } else {
        $returnUrl = $module->editWorkflowUrl($wf->id);
    }
    ?>
		<script type="text/javascript" charset="utf-8">
			window.location="<?php 
    echo $returnUrl;
    ?>
";
		</script>
		<a href="<?php 
    echo $returnUrl;
    ?>
">Return</a>
		<?php 
}
开发者ID:shamimhasan,项目名称:Vtiger-CRM-5.4.0,代码行数:30,代码来源:deletetask.php


示例4: RBSearch

function RBSearch($module)
{
    global $log;
    $log->debug("Entering RBSearch(" . $module . ") method ...");
    $url_string = '';
    if (isset($_REQUEST['search_field']) && $_REQUEST['search_field'] != "") {
        $search_column = vtlib_purify($_REQUEST['search_field']);
    }
    if (isset($_REQUEST['search_text']) && $_REQUEST['search_text'] != "") {
        $search_string = $_REQUEST['search_text'];
    }
    if (isset($_REQUEST['searchtype']) && $_REQUEST['searchtype'] != "") {
        $search_type = vtlib_purify($_REQUEST['searchtype']);
        if ($search_type == "BasicSearch") {
            $where = basicRBsearch($module, $search_column, $search_string);
        } else {
        }
        $url_string = "&search_field=" . $search_column . "&search_text=" . $search_string . "&searchtype=BasicSearch";
        if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
            $url_string .= "&type=" . vtlib_purify($_REQUEST['type']);
        }
        return $where . "#@@#" . $url_string;
        $log->debug("Exiting RBSearch method ...");
    }
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:25,代码来源:RecycleBinUtils.php


示例5: getRelationQuery

 /**
  * Function to get relation query for particular module with function name
  * @param <record> $recordId
  * @param <String> $functionName
  * @param Vtiger_Module_Model $relatedModule
  * @return <String>
  */
 public function getRelationQuery($recordId, $functionName, $relatedModule, $relationModel = false)
 {
     if ($functionName === 'get_activities') {
         $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
         $query = "SELECT CASE WHEN (vtiger_users.user_name not like '') THEN {$userNameSql} ELSE vtiger_groups.groupname END AS user_name,\n\t\t\t\t\t\tvtiger_crmentity.*, vtiger_activity.activitytype, vtiger_activity.subject, vtiger_activity.date_start, vtiger_activity.time_start,\n\t\t\t\t\t\tvtiger_activity.recurringtype, vtiger_activity.due_date, vtiger_activity.time_end, vtiger_activity.visibility,\n\t\t\t\t\t\tCASE WHEN (vtiger_activity.activitytype = 'Task') THEN (vtiger_activity.status) ELSE (vtiger_activity.eventstatus) END AS status\n\t\t\t\t\t\tFROM vtiger_activity\n\t\t\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_activity.activityid\n\t\t\t\t\t\tLEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid\n\t\t\t\t\t\tLEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\t\t\t\tWHERE vtiger_crmentity.deleted = 0 AND vtiger_activity.process = " . $recordId;
         $time = vtlib_purify($_REQUEST['time']);
         if ($time == 'current') {
             $query .= " AND ((vtiger_activity.activitytype='Task' and vtiger_activity.status not in ('Completed','Deferred'))\n\t\t\t\tOR (vtiger_activity.activitytype not in ('Emails','Task') and vtiger_activity.eventstatus not in ('','Held')))";
         }
         if ($time == 'history') {
             $query .= " AND ((vtiger_activity.activitytype='Task' and vtiger_activity.status in ('Completed','Deferred'))\n\t\t\t\tOR (vtiger_activity.activitytype not in ('Emails','Task') and  vtiger_activity.eventstatus in ('','Held')))";
         }
         $relatedModuleName = $relatedModule->getName();
         $query .= $this->getSpecificRelationQuery($relatedModuleName);
         $instance = CRMEntity::getInstance($relatedModuleName);
         $securityParameter = $instance->getUserAccessConditionsQuerySR($relatedModuleName);
         if ($securityParameter != '') {
             $sql .= $securityParameter;
         }
     } elseif ($functionName === 'get_mails' && $relatedModule->getName() == 'OSSMailView') {
         $query = OSSMailView_Record_Model::getMailsQuery($recordId, $relatedModule->getName());
     } else {
         $query = parent::getRelationQuery($recordId, $functionName, $relatedModule, $relationModel);
     }
     return $query;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:33,代码来源:Module.php


示例6: getRelationQuery

 /**
  * Function to get relation query for particular module with function name
  * @param <record> $recordId
  * @param <String> $functionName
  * @param Vtiger_Module_Model $relatedModule
  * @return <String>
  */
 public function getRelationQuery($recordId, $functionName, $relatedModule, $relationModel = false)
 {
     if ($functionName === 'get_activities') {
         $focus = CRMEntity::getInstance($this->getName());
         $focus->id = $recordId;
         $entityIds = $focus->getRelatedContactsIds();
         $entityIds[] = $recordId;
         $entityIds = implode(',', $entityIds);
         $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
         $query = "SELECT CASE WHEN (vtiger_users.user_name not like '') THEN {$userNameSql} ELSE vtiger_groups.groupname END AS user_name,\n\t\t\t\t\t\tvtiger_crmentity.*, vtiger_activity.activitytype, vtiger_activity.subject, vtiger_activity.date_start, vtiger_activity.time_start,\n\t\t\t\t\t\tvtiger_activity.recurringtype, vtiger_activity.due_date, vtiger_activity.time_end, vtiger_activity.visibility, \n\t\t\t\t\t\tvtiger_activity.status AS status\n\t\t\t\t\t\tFROM vtiger_activity\n\t\t\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_activity.activityid\n\t\t\t\t\t\tLEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid\n\t\t\t\t\t\tLEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\t\t\tWHERE vtiger_crmentity.deleted = 0 AND vtiger_activity.link IN (" . $entityIds . ')';
         $time = vtlib_purify($_REQUEST['time']);
         if ($time == 'current') {
             $stateActivityLabels = Calendar_Module_Model::getComponentActivityStateLabel('current');
             $query .= " AND (vtiger_activity.activitytype NOT IN ('Emails') AND vtiger_activity.status IN ('" . implode("','", $stateActivityLabels) . "'))";
         }
         if ($time == 'history') {
             $stateActivityLabels = Calendar_Module_Model::getComponentActivityStateLabel('history');
             $query .= " AND (vtiger_activity.activitytype NOT IN ('Emails') AND vtiger_activity.status IN ('" . implode("','", $stateActivityLabels) . "'))";
         }
         $relatedModuleName = $relatedModule->getName();
         $query .= $this->getSpecificRelationQuery($relatedModuleName);
         $instance = CRMEntity::getInstance($relatedModuleName);
         $securityParameter = $instance->getUserAccessConditionsQuerySR($relatedModuleName, false, $recordId);
         if ($securityParameter != '') {
             $query .= $securityParameter;
         }
         // There could be more than one contact for an activity.
         $query .= ' GROUP BY vtiger_activity.activityid';
     } elseif ($functionName === 'get_mails' && $relatedModule->getName() == 'OSSMailView') {
         $query = OSSMailView_Record_Model::getMailsQuery($recordId, $relatedModule->getName());
     } else {
         $query = parent::getRelationQuery($recordId, $functionName, $relatedModule, $relationModel);
     }
     return $query;
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:42,代码来源:Module.php


示例7: process

 /**
  * Process the request for Folder opertions
  * @global <type> $list_max_entries_per_page
  * @param MailManager_Request $request
  * @return MailManager_Response
  */
 function process(MailManager_Request $request)
 {
     global $list_max_entries_per_page, $current_user;
     $response = new Vtiger_Response();
     if ('open' == $request->getOperationArg()) {
         $q = $request->get('q');
         $foldername = $request->get('_folder');
         $type = $request->get('type');
         $connector = $this->getConnector($foldername);
         $folder = $connector->folderInstance($foldername);
         if (empty($q)) {
             $connector->folderMails($folder, intval($request->get('_page', 0)), $list_max_entries_per_page);
         } else {
             if (empty($type)) {
                 $type = 'ALL';
             }
             if ($type == 'ON') {
                 $dateFormat = $current_user->date_format;
                 if ($dateFormat == 'mm-dd-yyyy') {
                     $dateArray = explode('-', $q);
                     $temp = $dateArray[0];
                     $dateArray[0] = $dateArray[1];
                     $dateArray[1] = $temp;
                     $q = implode('-', $dateArray);
                 }
                 $query = date('d M Y', strtotime($q));
                 $q = '' . $type . ' "' . vtlib_purify($query) . '"';
             } else {
                 $q = '' . $type . ' "' . vtlib_purify($q) . '"';
             }
             $connector->searchMails($q, $folder, intval($request->get('_page', 0)), $list_max_entries_per_page);
         }
         $folderList = $connector->getFolderList();
         $viewer = $this->getViewer();
         $viewer->assign('TYPE', $type);
         $viewer->assign('QUERY', $request->get('q'));
         $viewer->assign('FOLDER', $folder);
         $viewer->assign('FOLDERLIST', $folderList);
         $viewer->assign('SEARCHOPTIONS', self::getSearchOptions());
         $viewer->assign("JS_DATEFORMAT", parse_calendardate(getTranslatedString('NTC_DATE_FORMAT')));
         $response->setResult($viewer->fetch($this->getModuleTpl('FolderOpen.tpl')));
     } elseif ('drafts' == $request->getOperationArg()) {
         $q = $request->get('q');
         $type = $request->get('type');
         $page = intval($request->get('_page', 0));
         $connector = $this->getConnector('__vt_drafts');
         $folder = $connector->folderInstance();
         if (empty($q)) {
             $draftMails = $connector->getDrafts($page, $list_max_entries_per_page, $folder);
         } else {
             $draftMails = $connector->searchDraftMails($q, $type, $page, $list_max_entries_per_page, $folder);
         }
         $viewer = $this->getViewer();
         $viewer->assign('MAILS', $draftMails);
         $viewer->assign('FOLDER', $folder);
         $viewer->assign('SEARCHOPTIONS', MailManager_DraftController::getSearchOptions());
         $response->setResult($viewer->fetch($this->getModuleTpl('FolderDrafts.tpl')));
     }
     return $response;
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:66,代码来源:FolderController.php


示例8: show_error_import

/**	function used to show the error message occured during import process
 *	@param	string	$message - Error message to display in the screen, where the passed error message will be displayed in screen using Importerror.tpl file
 */
function show_error_import($message)
{
    global $import_mod_strings;
    global $theme;
    global $log;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $log->info("Upload Error");
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign("MOD", $mod_strings);
    $smarty->assign("APP", $app_strings);
    if (isset($_REQUEST['return_module'])) {
        $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
    }
    if (isset($_REQUEST['return_action'])) {
        $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
    }
    $smarty->assign("THEME", $theme);
    $category = getParenttab();
    $smarty->assign("CATEGORY", $category);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
    $smarty->assign("MODULE", vtlib_purify($_REQUEST['module']));
    $smarty->assign("MESSAGE", $message);
    $smarty->display('Importerror.tpl');
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:error.php


示例9: get

 /**
  * Get key value (otherwise default value)
  */
 function get($key, $defvalue = '')
 {
     $value = $defvalue;
     if (isset($this->valuemap[$key])) {
         $value = $this->valuemap[$key];
     }
     if ($value === '' && isset($this->defaultmap[$key])) {
         $value = $this->defaultmap[$key];
     }
     $isJSON = false;
     if (is_string($value)) {
         // NOTE: Zend_Json or json_decode gets confused with big-integers (when passed as string)
         // and convert them to ugly exponential format - to overcome this we are performin a pre-check
         if (strpos($value, "[") === 0 || strpos($value, "{") === 0) {
             $isJSON = true;
         }
     }
     if ($isJSON) {
         $oldValue = Zend_Json::$useBuiltinEncoderDecoder;
         Zend_Json::$useBuiltinEncoderDecoder = false;
         $decodeValue = Zend_Json::decode($value);
         if (isset($decodeValue)) {
             $value = $decodeValue;
         }
         Zend_Json::$useBuiltinEncoderDecoder = $oldValue;
     }
     //Handled for null because vtlib_purify returns empty string
     if (!empty($value)) {
         $value = vtlib_purify($value);
     }
     return $value;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:35,代码来源:Request.php


示例10: process

 function process(Mobile_API_Request $request)
 {
     $mode = $request->get('mode');
     $module = $this->cachedModule($request->get('module'));
     $searchIn = $this->cachedSearchFields($module->name());
     if ($mode == 'update') {
         $searchIn = array();
         foreach ($_REQUEST as $k => $v) {
             if (preg_match("/field_(.*)/i", $k, $m)) {
                 $searchIn[] = vtlib_purify($m[1]);
             }
         }
         $this->cacheSearchFields($module->name(), $searchIn);
         header("Location: index.php?_operation=listModuleRecords&module={$module->name()}&mode=search");
         exit;
     }
     $request->setDefault('record', "{$module->id()}x0");
     $wsResponse = parent::process($request);
     $wsResponseResult = $wsResponse->getResult();
     $templateRecord = Mobile_UI_ModuleRecordModel::buildModelFromResponse($wsResponseResult['record']);
     $viewer = new Mobile_UI_Viewer();
     $viewer->assign('_MODULE', $module);
     $viewer->assign('_RECORD', $templateRecord);
     $viewer->assign('_SEARCHIN', $searchIn);
     $viewer->assign('_SEARCHIN_ALL', empty($searchIn));
     $response = $viewer->process('generic/SearchConfig.tpl');
     return $response;
 }
开发者ID:kduqi,项目名称:corebos,代码行数:28,代码来源:SearchConfig.php


示例11: vtSaveWorkflowTemplate

function vtSaveWorkflowTemplate($adb, $request)
{
    $util = new VTWorkflowUtils();
    $module = new VTWorkflowApplication("savetemplate");
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $title = vtlib_purifyForSql($request['title']);
    $workflowId = $request['workflow_id'];
    $wfs = new VTworkflowManager($adb);
    $workflow = $wfs->retrieve($workflowId);
    $tm = new VTWorkflowTemplateManager($adb);
    $tpl = $tm->newTemplate($title, $workflow);
    $tm->saveTemplate($tpl);
    $returnUrl = vtlib_purify($request['return_url']);
    ?>
		<script type="text/javascript" charset="utf-8">
			 window.location="<?php 
    echo $returnUrl;
    ?>
";
		</script>
		<a href="<?php 
    echo $returnUrl;
    ?>
">Return</a>
	<?php 
}
开发者ID:shamimhasan,项目名称:Vtiger-CRM-5.4.0,代码行数:31,代码来源:savetemplate.php


示例12: 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();
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:29,代码来源:OutgoingServerSaveAjax.php


示例13: vtSaveTask

function vtSaveTask($adb, $request)
{
    $util = new VTWorkflowUtils();
    $module = new VTWorkflowApplication("savetask");
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $tm = new VTTaskManager($adb);
    if (isset($request["task_id"])) {
        $task = $tm->retrieveTask($request["task_id"]);
    } else {
        $taskType = vtlib_purifyForSql($request["task_type"]);
        $workflowId = $request["workflow_id"];
        $task = $tm->createTask($taskType, $workflowId);
    }
    $task->summary = $request["summary"];
    if ($request["active"] == "true") {
        $task->active = true;
    } else {
        if ($request["active"] == "false") {
            $task->active = false;
        }
    }
    if (isset($request['check_select_date'])) {
        $trigger = array('days' => ($request['select_date_direction'] == 'after' ? 1 : -1) * (int) $request['select_date_days'], 'field' => $request['select_date_field']);
        $task->trigger = $trigger;
    } else {
        $task->trigger = null;
    }
    $fieldNames = $task->getFieldNames();
    foreach ($fieldNames as $fieldName) {
        $task->{$fieldName} = $request[$fieldName];
        if ($fieldName == 'calendar_repeat_limit_date') {
            $task->{$fieldName} = DateTimeField::convertToDBFormat($request[$fieldName]);
        }
    }
    $tm->saveTask($task);
    if (isset(vtlib_purify($request["return_url"]))) {
        $returnUrl = vtlib_purify($request["return_url"]);
    } else {
        $returnUrl = $module->editTaskUrl($task->id);
    }
    ?>
		<script type="text/javascript" charset="utf-8">
			window.location="<?php 
    echo $returnUrl;
    ?>
";
		</script>
		<a href="<?php 
    echo $returnUrl;
    ?>
">Return</a>
		<?php 
}
开发者ID:shamimhasan,项目名称:Vtiger-CRM-5.4.0,代码行数:58,代码来源:savetask.php


示例14: vtWorkflowSave

function vtWorkflowSave($adb, $request)
{
    $util = new VTWorkflowUtils();
    $module = new VTWorkflowApplication("saveworkflow");
    $mod = return_module_language($current_language, $module->name);
    $request = vtlib_purify($request);
    // this cleans all values of the array
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $description = from_html($request["description"]);
    $moduleName = $request["module_name"];
    $conditions = $request["conditions"];
    $taskId = $request["task_id"];
    $saveType = $request["save_type"];
    $executionCondition = $request['execution_condition'];
    $wm = new VTWorkflowManager($adb);
    if ($saveType == 'new') {
        $wf = $wm->newWorkflow($moduleName);
        $wf->description = $description;
        $wf->test = $conditions;
        $wf->taskId = $taskId;
        $wf->executionConditionAsLabel($executionCondition);
        $wm->save($wf);
    } else {
        if ($saveType == 'edit') {
            $wf = $wm->retrieve($request["workflow_id"]);
            $wf->description = $description;
            $wf->test = $conditions;
            $wf->taskId = $taskId;
            $wf->executionConditionAsLabel($executionCondition);
            $wm->save($wf);
        } else {
            throw new Exception();
        }
    }
    if (isset($request["return_url"])) {
        $returnUrl = $request["return_url"];
    } else {
        $returnUrl = $module->editWorkflowUrl($wf->id);
    }
    ?>
		<script type="text/javascript" charset="utf-8">
			window.location="<?php 
    echo $returnUrl;
    ?>
";
		</script>
		<a href="<?php 
    echo $returnUrl;
    ?>
">Return</a>
		<?php 
}
开发者ID:mslokhat,项目名称:corebos,代码行数:56,代码来源:saveworkflow.php


示例15: get

 function get($key, $defvalue = '', $purify = true)
 {
     if (isset($this->valuemap[$key])) {
         return $purify ? vtlib_purify($this->valuemap[$key]) : $this->valuemap[$key];
     }
     if ($defvalue === '' && isset($this->defaultmap[$key])) {
         $defvalue = $this->defaultmap[$key];
     }
     return $defvalue;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:10,代码来源:Request.php


示例16: get

 function get($key, $defvalue = '')
 {
     $value = $defvalue;
     if (isset($this->valuemap[$key])) {
         $value = $this->valuemap[$key];
     }
     if (!empty($value)) {
         $value = vtlib_purify($value);
     }
     return $value;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:11,代码来源:Request.php


示例17: getFromContext

 function getFromContext($key, $purify = false)
 {
     if ($this->context) {
         $value = $this->context[$key];
         if ($purify && !empty($value)) {
             $value = vtlib_purify($value);
         }
         return $value;
     }
     return false;
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:11,代码来源:DetailViewBlockComment.php


示例18: getString

 function getString($key)
 {
     if (isset($this->valuemap[$key])) {
         $value = $this->valuemap[$key];
         if (Zend_Json::decode($value) != null) {
             return $this->valuemap[$key];
         } else {
             return vtlib_purify($this->valuemap[$key]);
         }
     }
     return '';
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:12,代码来源:Request.php


示例19: vtWorkflowEdit

function vtWorkflowEdit($adb, $request, $requestUrl, $current_language, $app_strings)
{
    global $theme;
    $util = new VTWorkflowUtils();
    $image_path = "themes/{$theme}/images/";
    $module = new VTWorkflowApplication("editworkflow");
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $smarty = new vtigerCRM_Smarty();
    if ($request['source'] == 'from_template') {
        $tm = new VTWorkflowTemplateManager($adb);
        $template = $tm->retrieveTemplate($request['template_id']);
        $workflow = $tm->createWorkflow($template);
    } else {
        $wfs = new VTWorkflowManager($adb);
        if (isset($request["workflow_id"])) {
            $workflow = $wfs->retrieve($request["workflow_id"]);
        } else {
            $moduleName = $request["module_name"];
            $workflow = $wfs->newWorkflow($moduleName);
        }
    }
    if ($workflow == null) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']);
        return;
    }
    $workflow->test = addslashes($workflow->test);
    $tm = new VTTaskManager($adb);
    $tasks = $tm->getTasksForWorkflow($workflow->id);
    $smarty->assign("tasks", $tasks);
    $taskTypes = $tm->getTaskTypes($workflow->moduleName);
    $smarty->assign("taskTypes", $taskTypes);
    $smarty->assign("newTaskReturnUrl", vtlib_purify($requestUrl));
    $smarty->assign("returnUrl", vtlib_purify($request["return_url"]));
    $smarty->assign("APP", $app_strings);
    $smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, $module->name)));
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", $module->label);
    $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_WORKFLOW']);
    $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_WORKFLOW_TITLE']);
    $smarty->assign("workflow", $workflow);
    $smarty->assign("saveType", isset($workflow->id) ? "edit" : "new");
    $smarty->assign("module", $module);
    $smarty->assign("WORKFLOW_TRIGGER_TYPES_HELP_LINK", WORKFLOW_TRIGGER_TYPES);
    $smarty->display("{$module->name}/EditWorkflow.tpl");
}
开发者ID:mslokhat,项目名称:corebos,代码行数:52,代码来源:editworkflow.php


示例20: process

 /**
  * Process the request for Folder opertions
  * @global <type> $list_max_entries_per_page
  * @param MailManager_Request $request
  * @return MailManager_Response
  */
 function process(MailManager_Request $request)
 {
     global $list_max_entries_per_page;
     $response = new MailManager_Response();
     if ('open' == $request->getOperationArg()) {
         $q = $request->get('q');
         $foldername = $request->get('_folder');
         $type = $request->get('type');
         $connector = $this->getConnector($foldername);
         $folder = $connector->folderInstance($foldername);
         if (empty($q)) {
             $connector->folderMails($folder, intval($request->get('_page', 0)), $list_max_entries_per_page);
         } else {
             if (empty($type)) {
                 $type = 'ALL';
             }
             $q = '' . $type . ' "' . vtlib_purify($q) . '"';
             $connector->searchMails($q, $folder, intval($request->get('_page', 0)), $list_max_entries_per_page);
         }
         $folderList = $connector->getFolderList();
         $viewer = $this->getViewer();
         $viewer->assign('TYPE', $type);
         $viewer->assign('QUERY', $request->get('q'));
         $viewer->assign('FOLDER', $folder);
         $viewer->assign('FOLDERLIST', $folderList);
         $viewer->assign('SEARCHOPTIONS', self::getSearchOptions());
         $response->setResult($viewer->fetch($this->getModuleTpl('Folder.Open.tpl')));
     } elseif ('drafts' == $request->getOperationArg()) {
         $q = $request->get('q');
         $type = $request->get('type');
         $page = intval($request->get('_page', 0));
         $connector = $this->getConnector('__vt_drafts');
         $folder = $connector->folderInstance();
         if (empty($q)) {
             $draftMails = $connector->getDrafts($page, $list_max_entries_per_page, $folder);
         } else {
             $draftMails = $connector->searchDraftMails($q, $type, $page, $list_max_entries_per_page, $folder);
         }
         $viewer = $this->getViewer();
         $viewer->assign('MAILS', $draftMails);
         $viewer->assign('FOLDER', $folder);
         $viewer->assign('SEARCHOPTIONS', MailManager_DraftController::getSearchOptions());
         $response->setResult($viewer->fetch($this->getModuleTpl('Folder.Drafts.tpl')));
     }
     return $response;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:52,代码来源:FolderController.php



注:本文中的vtlib_purify函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vtlib_purifyForSql函数代码示例发布时间:2022-05-23
下一篇:
PHP vtlib_isModuleActive函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap