当前位置: 首页>>代码示例>>PHP>>正文


PHP Users_Record_Model类代码示例

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


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

示例1: getInstanceByCreator

 public static function getInstanceByCreator(Users_Record_Model $user)
 {
     $db = PearDatabase::getInstance();
     $query = 'SELECT * FROM ' . self::tableName . ' WHERE creatorid=?';
     $result = $db->pquery($query, array($user->getId()));
     $instance = new self();
     if ($db->num_rows($result) > 0) {
         $row = $db->query_result_rowdata($result, 0);
         $instance->setData($row);
     }
     return $instance;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:12,代码来源:Announcement.php

示例2: process

 function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $record = $request->get('record');
     vimport('~~modules/com_vtiger_workflow/include.inc');
     vimport('~~modules/com_vtiger_workflow/VTEntityCache.inc');
     vimport('~~modules/com_vtiger_workflow/include.inc');
     vimport('~~include/Webservices/Utils.php');
     vimport('~~include/Webservices/Retrieve.php');
     $adb = PearDatabase::getInstance();
     $wfs = new VTWorkflowManager($adb);
     $workflows = $wfs->getWorkflowsForModule($moduleName, VTWorkflowManager::$TRIGGER);
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $wsId = vtws_getWebserviceEntityId($moduleName, $record);
     $entityCache = new VTEntityCache($currentUser);
     $entityData = $entityCache->forId($wsId);
     foreach ($workflows as $id => $workflow) {
         if (!$workflow->evaluate($entityCache, $entityData->getId())) {
             unset($workflows[$id]);
         }
     }
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORD', $record);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('WORKFLOWS', $workflows);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->view('WorkflowTrigger.tpl', $moduleName);
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:28,代码来源:WorkflowTrigger.php

示例3: process

 public function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $qualifiedModuleName = $request->getModule(false);
     $mode = '';
     $selectedFieldsList = $allFieldsList = array();
     if ($recordId) {
         $recordModel = Settings_Webforms_Record_Model::getInstanceById($recordId, $qualifiedModuleName);
         $selectedFieldsList = $recordModel->getSelectedFieldsList();
         $allFieldsList = $recordModel->getAllFieldsList();
         $sourceModule = $recordModel->get('targetmodule');
         $mode = 'edit';
     } else {
         $recordModel = Settings_Webforms_Record_Model::getCleanInstance($qualifiedModuleName);
         $sourceModule = $request->get('sourceModule');
         if (!$sourceModule) {
             $sourceModule = reset(array_keys(Settings_Webforms_Module_Model::getSupportedModulesList()));
         }
         $allFieldsList = $recordModel->getAllFieldsList($sourceModule);
     }
     $recordStructure = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
     $viewer = $this->getViewer($request);
     $viewer->assign('MODE', $mode);
     $viewer->assign('RECORD_ID', $recordId);
     $viewer->assign('RECORD_MODEL', $recordModel);
     $viewer->assign('MODULE', $qualifiedModuleName);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('SOURCE_MODULE', $sourceModule);
     $viewer->assign('ALL_FIELD_MODELS_LIST', $allFieldsList);
     $viewer->assign('SELECTED_FIELD_MODELS_LIST', $selectedFieldsList);
     $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructure);
     $viewer->assign('RECORD_STRUCTURE', $recordStructure->getStructure());
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->view('EditView.tpl', $qualifiedModuleName);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:35,代码来源:Edit.php

示例4: getListViewLinks

 /**
  * Function to get the list of listview links for the module
  * @param <Array> $linkParams
  * @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances
  */
 public function getListViewLinks($linkParams)
 {
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $moduleModel = $this->getModule();
     $linkTypes = array('LISTVIEWBASIC', 'LISTVIEW', 'LISTVIEWSETTING');
     $links = Vtiger_Link_Model::getAllByType($moduleModel->getId(), $linkTypes, $linkParams);
     $createPermission = Users_Privileges_Model::isPermitted($moduleModel->getName(), 'EditView');
     if ($createPermission) {
         $basicLinks = array(array('linktype' => 'LISTVIEWBASIC', 'linklabel' => 'LBL_ADD_RECORD', 'linkurl' => $moduleModel->getCreateRecordUrl(), 'linkicon' => ''));
         foreach ($basicLinks as $basicLink) {
             $links['LISTVIEWBASIC'][] = Vtiger_Link_Model::getInstanceFromValues($basicLink);
         }
     }
     $exportPermission = Users_Privileges_Model::isPermitted($moduleModel->getName(), 'Export');
     if ($exportPermission) {
         $advancedLink = array('linktype' => 'LISTVIEW', 'linklabel' => 'LBL_EXPORT', 'linkurl' => 'javascript:Vtiger_List_Js.triggerExportAction("' . $moduleModel->getExportUrl() . '")', 'linkicon' => '');
         $links['LISTVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($advancedLink);
     }
     if ($currentUserModel->isAdminUser()) {
         $settingsLinks = $this->getSettingLinks();
         foreach ($settingsLinks as $settingsLink) {
             $links['LISTVIEWSETTING'][] = Vtiger_Link_Model::getInstanceFromValues($settingsLink);
         }
     }
     return $links;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:31,代码来源:ListView.php

示例5: process

 public function process(Vtiger_Request $request)
 {
     $recordId = $request->get('record');
     $qualifiedModuleName = $request->getModule(false);
     $sourceModule = $request->get('sourceModule');
     $viewer = $this->getViewer($request);
     $mode = '';
     $selectedFieldsList = array();
     if ($recordId) {
         $recordModel = Settings_Webforms_Record_Model::getInstanceById($recordId, $qualifiedModuleName);
         $mode = 'edit';
         if ($sourceModule === $recordModel->get('targetmodule')) {
             $selectedFieldsList = $recordModel->getSelectedFieldsList();
         }
     } else {
         $recordModel = Settings_Webforms_Record_Model::getCleanInstance($qualifiedModuleName);
     }
     $viewer->assign('MODE', $mode);
     $viewer->assign('SOURCE_MODULE', $sourceModule);
     $viewer->assign('MODULE', $qualifiedModuleName);
     $viewer->assign('SELECTED_FIELD_MODELS_LIST', $selectedFieldsList);
     $viewer->assign('ALL_FIELD_MODELS_LIST', $recordModel->getAllFieldsList($sourceModule));
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->view('FieldsEditView.tpl', $qualifiedModuleName);
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:25,代码来源:GetSourceModuleFields.php

示例6: process

	public function process(Vtiger_Request $request)
	{
		$currentUser = Users_Record_Model::getCurrentUserModel();
		$viewer = $this->getViewer($request);
		$moduleName = $request->getModule();

		$stateActivityLabels = Calendar_Module_Model::getComponentActivityStateLabel();

		$page = $request->get('page');
		$linkId = $request->get('linkid');
		$sortOrder = $request->get('sortorder');
		$orderBy = $request->get('orderby');
		$params = ['status' => $stateActivityLabels['in_realization']];
		if ($request->get('switchParams')) {
			$params = ['status' => $request->get('switchParams')];
		}

		$widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
		if (!$request->has('owner'))
			$owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
		else
			$owner = $request->get('owner');

		$pagingModel = new Vtiger_Paging_Model();
		$pagingModel->set('page', $page);
		$pagingModel->set('limit', (int) $widget->get('limit'));
		$pagingModel->set('orderby', $orderBy);
		$pagingModel->set('sortorder', $sortOrder);

		$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
		$calendarActivities = ($owner === false) ? array() : $moduleModel->getCalendarActivities('upcoming', $pagingModel, $owner, false, $params);

		$switchLabels = [];
		$switchLabels[] = ['label' => vtranslate($stateActivityLabels['in_realization'], 'Calendar'), 'name' => $stateActivityLabels['in_realization']];
		$switchLabels[] = ['label' => vtranslate($stateActivityLabels['not_started'], 'Calendar'), 'name' => $stateActivityLabels['not_started']];

		$msgLabel = 'LBL_NO_SCHEDULED_ACTIVITIES';
		if ($params['status'] == $stateActivityLabels['in_realization']) {
			$msgLabel = 'LBL_NO_CURRENT_ACTIVITIES';
		}
		$viewer->assign('WIDGET', $widget);
		$viewer->assign('MODULE_NAME', $moduleName);
		$viewer->assign('ACTIVITIES', $calendarActivities);
		$viewer->assign('PAGING', $pagingModel);
		$viewer->assign('CURRENTUSER', $currentUser);
		$title_max_length = vglobal('title_max_length');
		$href_max_length = vglobal('href_max_length');
		$viewer->assign('NAMELENGHT', $title_max_length);
		$viewer->assign('OWNER', $owner);
		$viewer->assign('HREFNAMELENGHT', $href_max_length);
		$viewer->assign('NODATAMSGLABLE', $msgLabel);
		$viewer->assign('SWITCH', $switchLabels);
		$viewer->assign('LISTVIEWLINKS', true);
		$content = $request->get('content');
		if (!empty($content)) {
			$viewer->view('dashboards/CalendarActivitiesContents.tpl', $moduleName);
		} else {
			$viewer->view('dashboards/CalendarActivities.tpl', $moduleName);
		}
	}
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:60,代码来源:CalendarActivities.php

示例7: process

 /**
  * Funtioin to process the Edit view
  * @param Vtiger_Request $request
  */
 public function process(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $record = $request->get('record');
     if (!empty($record)) {
         $recordModel = EmailTemplates_Record_Model::getInstanceById($record);
         $viewer->assign('RECORD_ID', $record);
         $viewer->assign('MODE', 'edit');
     } else {
         $recordModel = new EmailTemplates_Record_Model();
         $viewer->assign('MODE', '');
         $recordModel->set('templatename', '');
         $recordModel->set('description', '');
         $recordModel->set('subject', '');
         $recordModel->set('body', '');
     }
     $recordModel->setModule('EmailTemplates');
     if (!$this->record) {
         $this->record = $recordModel;
     }
     $allFiledsOptions = $this->record->getEmailTemplateFields();
     $viewer->assign('RECORD', $this->record);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('CURRENTDATE', date('Y-n-j'));
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('ALL_FIELDS', $allFiledsOptions);
     $viewer->view('EditView.tpl', $moduleName);
 }
开发者ID:xrstf,项目名称:vtiger-mirror,代码行数:33,代码来源:Edit.php

示例8: initialize

 public function initialize(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $record = $request->get('record');
     $fromRecord = $request->get('from_record');
     if (!empty($record)) {
         $recordModel = Settings_Profiles_Record_Model::getInstanceById($record);
         $viewer->assign('MODE', 'edit');
     } elseif (!empty($fromRecord)) {
         $recordModel = Settings_Profiles_Record_Model::getInstanceById($fromRecord);
         $recordModel->getModulePermissions();
         $recordModel->getGlobalPermissions();
         $recordModel->set('profileid', '');
         $viewer->assign('MODE', '');
         $viewer->assign('IS_DUPLICATE_RECORD', $fromRecord);
     } else {
         $recordModel = new Settings_Profiles_Record_Model();
         $viewer->assign('MODE', '');
     }
     $viewer->assign('ALL_PROFILES', $recordModel->getAll());
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('ALL_BASIC_ACTIONS', Vtiger_Action_Model::getAllBasic(true));
     $viewer->assign('ALL_UTILITY_ACTIONS', Vtiger_Action_Model::getAllUtility(true));
     $viewer->assign('RECORD_MODEL', $recordModel);
     $viewer->assign('RECORD_ID', $record);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:30,代码来源:Edit.php

示例9: process

 public function process(Vtiger_Request $request, $widget = NULL)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     // Initialize Widget to the right-state of information
     if ($widget && !$request->has('widgetid')) {
         $widgetId = $widget->get('id');
     } else {
         $widgetId = $request->get('widgetid');
     }
     $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
     if (!$request->has('owner')) {
         $owner = Settings_WidgetsManagement_Module_Model::getDefaultUserId($widget);
     } else {
         $owner = $request->get('owner');
     }
     $minilistWidgetModel = new Vtiger_MiniList_Model();
     $minilistWidgetModel->setWidgetModel($widget);
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('USER', $owner);
     $viewer->assign('CURRENTUSER', $currentUser);
     $viewer->assign('MINILIST_WIDGET_MODEL', $minilistWidgetModel);
     $viewer->assign('BASE_MODULE', $minilistWidgetModel->getTargetModule());
     $viewer->assign('SCRIPTS', $this->getFooterScripts());
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/MiniListContents.tpl', $moduleName);
     } else {
         $widget->set('title', $minilistWidgetModel->getTitle());
         $viewer->view('dashboards/MiniList.tpl', $moduleName);
     }
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:34,代码来源:MiniList.php

示例10: getHeaderLinks

 /**
  * Function to get the list of Header Links
  * @return <Array> - List of Vtiger_Link_Model instances
  */
 function getHeaderLinks()
 {
     global $log;
     $appUniqueKey = vglobal('application_unique_key');
     $vtigerCurrentVersion = vglobal('vtiger_current_version');
     $site_URL = vglobal('site_URL');
     $userModel = Users_Record_Model::getCurrentUserModel();
     $userEmail = $userModel->get('email1');
     $headerLinks = array(array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_FEEDBACK', 'linkurl' => "javascript:window.open('http://vtiger.com/products/crm/od-feedback/index.php?version=" . $vtigerCurrentVersion . "&email=" . $userEmail . "&uid=" . $appUniqueKey . "&ui=6','feedbackwin','height=400,width=550,top=200,left=300')", 'linkicon' => 'info.png', 'childlinks' => array(array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_DOCUMENTATION', 'linkurl' => 'https://wiki.vtiger.com/vtiger6/index.php/Main_Page', 'linkicon' => '', 'target' => '_blank'), array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_VIDEO_TUTORIAL', 'linkurl' => 'https://www.vtiger.com/crm/videos', 'linkicon' => '', 'target' => '_blank'), array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_FEEDBACK', 'linkurl' => "javascript:window.open('http://vtiger.com/products/crm/od-feedback/index.php?version=" . $vtigerCurrentVersion . "&email=" . $userEmail . "&uid=" . $appUniqueKey . "&ui=6','feedbackwin','height=400,width=550,top=200,left=300')", 'linkicon' => ''))));
     if ($userModel->isAdminUser()) {
         $crmSettingsLink = array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_CRM_SETTINGS', 'linkurl' => '', 'linkicon' => 'setting.png', 'childlinks' => array(array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_CRM_SETTINGS', 'linkurl' => '?module=Vtiger&parent=Settings&view=Index', 'linkicon' => ''), array(), array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_MANAGE_USERS', 'linkurl' => '?module=Users&parent=Settings&view=List', 'linkicon' => '')));
         array_push($headerLinks, $crmSettingsLink);
     }
     $userPersonalSettingsLinks = array('linktype' => 'HEADERLINK', 'linklabel' => $userModel->getDisplayName(), 'linkurl' => '', 'linkicon' => '', 'childlinks' => array(array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_MY_PREFERENCES', 'linkurl' => $userModel->getPreferenceDetailViewUrl(), 'linkicon' => ''), array(), array('linktype' => 'HEADERLINK', 'linklabel' => 'LBL_SIGN_OUT', 'linkurl' => '?module=Users&parent=Settings&action=Logout', 'linkicon' => '')));
     array_push($headerLinks, $userPersonalSettingsLinks);
     $headerLinkInstances = array();
     $index = 0;
     foreach ($headerLinks as $headerLink) {
         $headerLinkInstance = Vtiger_Link_Model::getInstanceFromValues($headerLink);
         foreach ($headerLink['childlinks'] as $childLink) {
             $headerLinkInstance->addChildLink(Vtiger_Link_Model::getInstanceFromValues($childLink));
         }
         $headerLinkInstances[$index++] = $headerLinkInstance;
     }
     $headerLinks = Vtiger_Link_Model::getAllByType(Vtiger_Link::IGNORE_MODULE, array('HEADERLINK'));
     foreach ($headerLinks as $headerType => $headerLinks) {
         foreach ($headerLinks as $headerLink) {
             $headerLinkInstances[$index++] = Vtiger_Link_Model::getInstanceFromLinkObject($headerLink);
         }
     }
     return $headerLinkInstances;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:36,代码来源:Header.php

示例11: content_54d2436e8ce6e

    function content_54d2436e8ce6e($_smarty_tpl)
    {
        ?>
<!DOCTYPE html><html><head><title><?php 
        echo vtranslate($_smarty_tpl->tpl_vars['PAGETITLE']->value, $_smarty_tpl->tpl_vars['MODULE_NAME']->value);
        ?>
</title><link REL="SHORTCUT ICON" HREF="layouts/vlayout/skins/images/favicon.ico"><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" href="libraries/jquery/chosen/chosen.css" type="text/css" media="screen" /><link rel="stylesheet" href="libraries/jquery/jquery-ui/css/custom-theme/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" /><link rel="stylesheet" href="libraries/jquery/select2/select2.css" type="text/css" media="screen" /><link rel="stylesheet" href="libraries/bootstrap/css/bootstrap.css" type="text/css" media="screen" /><link rel="stylesheet" href="resources/styles.css" type="text/css" media="screen" /><link rel="stylesheet" href="libraries/jquery/posabsolute-jQuery-Validation-Engine/css/validationEngine.jquery.css" /><link rel="stylesheet" href="libraries/jquery/select2/select2.css" /><link rel="stylesheet" href="libraries/guidersjs/guiders-1.2.6.css"/><link rel="stylesheet" href="libraries/jquery/pnotify/jquery.pnotify.default.css"/><link rel="stylesheet" href="libraries/jquery/pnotify/use for pines style icons/jquery.pnotify.default.icons.css"/><link rel="stylesheet" media="screen" type="text/css" href="libraries/jquery/datepicker/css/datepicker.css" /><?php 
        $_smarty_tpl->tpl_vars['cssModel'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['cssModel']->_loop = false;
        $_smarty_tpl->tpl_vars['index'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['STYLES']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['cssModel']->key => $_smarty_tpl->tpl_vars['cssModel']->value) {
            $_smarty_tpl->tpl_vars['cssModel']->_loop = true;
            $_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['cssModel']->key;
            ?>
<link rel="<?php 
            echo $_smarty_tpl->tpl_vars['cssModel']->value->getRel();
            ?>
" href="<?php 
            echo $_smarty_tpl->tpl_vars['cssModel']->value->getHref();
            ?>
?&v=<?php 
            echo $_smarty_tpl->tpl_vars['VTIGER_VERSION']->value;
            ?>
" type="<?php 
            echo $_smarty_tpl->tpl_vars['cssModel']->value->getType();
            ?>
" media="<?php 
            echo $_smarty_tpl->tpl_vars['cssModel']->value->getMedia();
            ?>
" /><?php 
        }
        ?>
<style type="text/css">@media print {.noprint { display:none; }}</style><script type="text/javascript" src="libraries/jquery/jquery.min.js"></script></head><body data-skinpath="<?php 
        echo $_smarty_tpl->tpl_vars['SKIN_PATH']->value;
        ?>
" data-language="<?php 
        echo $_smarty_tpl->tpl_vars['LANGUAGE']->value;
        ?>
"><div id="js_strings" class="hide noprint"><?php 
        echo Zend_Json::encode($_smarty_tpl->tpl_vars['LANGUAGE_STRINGS']->value);
        ?>
</div><?php 
        $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL'] = new Smarty_variable(Users_Record_Model::getCurrentUserModel(), null, 0);
        ?>
<input type="hidden" id="start_day" value="<?php 
        echo $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->get('dayoftheweek');
        ?>
" /><input type="hidden" id="row_type" value="<?php 
        echo $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->get('rowheight');
        ?>
" /><input type="hidden" id="current_user_id" value="<?php 
        echo $_smarty_tpl->tpl_vars['CURRENT_USER_MODEL']->value->get('id');
        ?>
" /><div id="page"><!-- container which holds data temporarly for pjax calls --><div id="pjaxContainer" class="hide noprint"></div>
<?php 
    }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:60,代码来源:fbc9727615d78029030bd5a0990abb90449622ce.file.Header.tpl.php

示例12: process

 public function process(Vtiger_Request $request)
 {
     $LIMIT = 10;
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $type = $request->get('type');
     $page = $request->get('page');
     $linkId = $request->get('linkid');
     if (empty($page)) {
         $page = 1;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $page);
     $pagingModel->set('limit', $LIMIT);
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $history = $moduleModel->getHistory($pagingModel, $type);
     $widget = Vtiger_Widget_Model::getInstance($linkId, $currentUser->getId());
     $modCommentsModel = Vtiger_Module_Model::getInstance('ModComments');
     $viewer->assign('WIDGET', $widget);
     $viewer->assign('MODULE_NAME', $moduleName);
     $viewer->assign('HISTORIES', $history);
     $viewer->assign('PAGE', $page);
     $viewer->assign('NEXTPAGE', count($history) < $LIMIT ? 0 : $page + 1);
     $viewer->assign('COMMENTS_MODULE_MODEL', $modCommentsModel);
     $content = $request->get('content');
     if (!empty($content)) {
         $viewer->view('dashboards/HistoryContents.tpl', $moduleName);
     } else {
         $viewer->view('dashboards/History.tpl', $moduleName);
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:32,代码来源:History.php

示例13: process

 /**
  * Function that saves SMS records
  * @param Vtiger_Request $request
  */
 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $recordIds = $this->getRecordsListFromRequest($request);
     $phoneFieldList = $request->get('fields');
     $message = $request->get('message');
     foreach ($recordIds as $recordId) {
         $recordModel = Vtiger_Record_Model::getInstanceById($recordId);
         $numberSelected = false;
         foreach ($phoneFieldList as $fieldname) {
             $fieldValue = $recordModel->get($fieldname);
             if (!empty($fieldValue)) {
                 $toNumbers[] = $fieldValue;
                 $numberSelected = true;
             }
         }
         if ($numberSelected) {
             $recordIds[] = $recordId;
         }
     }
     $response = new Vtiger_Response();
     if (!empty($toNumbers)) {
         SMSNotifier_Record_Model::SendSMS($message, $toNumbers, $currentUserModel->getId(), $recordIds, $moduleName);
         $response->setResult(true);
     } else {
         $response->setResult(false);
     }
     return $response;
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:34,代码来源:MassSaveAjax.php

示例14: getDisplayValue

	/**
	 * Function to get the Display Value, for the current field type with given DB Insert Value
	 * @param <Object> $value
	 * @return <Object>
	 */
	public function getDisplayValue($values)
	{
		if ($values == NULL && !is_array($values))
			return;
		foreach ($values as $value) {
			if (self::getOwnerType($value) === 'User') {
				$userModel = Users_Record_Model::getCleanInstance('Users');
				$userModel->set('id', $value);
				$detailViewUrl = $userModel->getDetailViewUrl();
				$currentUser = Users_Record_Model::getCurrentUserModel();
				if (!$currentUser->isAdminUser()) {
					return getOwnerName($value);
				}
			} else {
				$currentUser = Users_Record_Model::getCurrentUserModel();
				if (!$currentUser->isAdminUser()) {
					return getOwnerName($value);
				}
				$recordModel = new Settings_Groups_Record_Model();
				$recordModel->set('groupid', $value);
				$detailViewUrl = $recordModel->getDetailViewUrl();
			}
			$displayvalue[] = "<a href=" . $detailViewUrl . ">" . getOwnerName($value) . "</a>&nbsp";
		}
		$displayvalue = implode(',', $displayvalue);
		return $displayvalue;
	}
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:32,代码来源:Multiowner.php

示例15: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     parent::preProcess($request, false);
     $viewer = $this->getViewer($request);
     $menuModelsList = Vtiger_Menu_Model::getAll(true);
     $selectedModule = $request->getModule();
     $menuStructure = Vtiger_MenuStructure_Model::getInstanceFromMenuList($menuModelsList, $selectedModule);
     $companyDetails = Vtiger_CompanyDetails_Model::getInstanceById();
     $companyLogo = $companyDetails->getLogo();
     $currentDate = Vtiger_Date_UIType::getDisplayDateValue(date('Y-n-j'));
     $viewer->assign('CURRENTDATE', $currentDate);
     $viewer->assign('MODULE', $selectedModule);
     $viewer->assign('MODULE_NAME', $selectedModule);
     $viewer->assign('QUALIFIED_MODULE', $selectedModule);
     $viewer->assign('PARENT_MODULE', $request->get('parent'));
     $viewer->assign('VIEW', $request->get('view'));
     // Order by pre-defined automation process for QuickCreate.
     uksort($menuModelsList, array('Vtiger_MenuStructure_Model', 'sortMenuItemsByProcess'));
     $viewer->assign('MENUS', $menuModelsList);
     $viewer->assign('MENU_STRUCTURE', $menuStructure);
     $viewer->assign('MENU_SELECTED_MODULENAME', $selectedModule);
     $viewer->assign('MENU_TOPITEMS_LIMIT', $menuStructure->getLimit());
     $viewer->assign('COMPANY_LOGO', $companyLogo);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $homeModuleModel = Vtiger_Module_Model::getInstance('Home');
     $viewer->assign('HOME_MODULE_MODEL', $homeModuleModel);
     $viewer->assign('HEADER_LINKS', $this->getHeaderLinks());
     $viewer->assign('ANNOUNCEMENT', $this->getAnnouncement());
     $viewer->assign('SEARCHABLE_MODULES', Vtiger_Module_Model::getSearchableModules());
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:33,代码来源:Basic.php


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