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

PHP Users_Record_Model类代码示例

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

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



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


示例16: getQueryByModuleField

 /**
  * Function to get list view query for popup window
  * @param <String> $sourceModule Parent module
  * @param <String> $field parent fieldname
  * @param <Integer> $record parent id
  * @param <String> $listQuery
  * @return <String> Listview Query
  */
 public function getQueryByModuleField($sourceModule, $field, $record, $listQuery)
 {
     if ($sourceModule == 'Accounts' && $field == 'account_id' && $record || in_array($sourceModule, array('Campaigns', 'Products', 'Services', 'Emails', 'Potentials'))) {
         if ($sourceModule === 'Campaigns') {
             $condition = " vtiger_account.accountid NOT IN (SELECT accountid FROM vtiger_campaignaccountrel WHERE campaignid = '{$record}')";
         } elseif ($sourceModule === 'Products') {
             $condition = " vtiger_account.accountid NOT IN (SELECT crmid FROM vtiger_seproductsrel WHERE productid = '{$record}')";
         } elseif ($sourceModule === 'Services') {
             $condition = " vtiger_account.accountid NOT IN (SELECT relcrmid FROM vtiger_crmentityrel WHERE crmid = '{$record}' UNION SELECT crmid FROM vtiger_crmentityrel WHERE relcrmid = '{$record}') ";
         } elseif ($sourceModule === 'Emails') {
             $condition = ' vtiger_account.emailoptout = 0';
         } elseif ($sourceModule === 'Potentials') {
             $config = Settings_SalesProcesses_Module_Model::getConfig('potential');
             $currentUser = Users_Record_Model::getCurrentUserModel();
             $accessibleGroups = $currentUser->getAccessibleGroupForModule('Accounts');
             if ($config['add_potential'] && $accessibleGroups) {
                 $condition = " vtiger_crmentity.smownerid NOT IN (" . implode(',', array_keys($accessibleGroups)) . ")";
             } else {
                 return $listQuery;
             }
         } else {
             $condition = " vtiger_account.accountid != '{$record}'";
         }
         $position = stripos($listQuery, 'where');
         if ($position) {
             $overRideQuery = $listQuery . ' AND ' . $condition;
         } else {
             $overRideQuery = $listQuery . ' WHERE ' . $condition;
         }
         return $overRideQuery;
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:40,代码来源:Module.php


示例17: postupdate

 function postupdate()
 {
     global $log, $adb;
     if ($this->filesToDeleteNew) {
         foreach ($this->filesToDeleteNew as $path) {
             $this->recurseDelete($path);
         }
     }
     $result = true;
     self::recurseCopy('cache/updates/files_new', '', true);
     $this->recurseDelete('cache/updates');
     Vtiger_Deprecated::createModuleMetaFile();
     Vtiger_Access::syncSharingAccess();
     $adb->query('SET FOREIGN_KEY_CHECKS = 1;');
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $adb->query("INSERT INTO `yetiforce_updates` (`user`, `name`, `from_version`, `to_version`, `result`) VALUES ('" . $currentUser->get('user_name') . "', '" . $this->modulenode->label . "', '" . $this->modulenode->from_version . "', '" . $this->modulenode->to_version . "','" . $result . "');", true);
     if ($result) {
         $adb->query("UPDATE vtiger_version SET current_version = '" . $this->modulenode->to_version . "';");
     }
     $dirName = 'cache/updates';
     $this->recurseDelete($dirName . '/files');
     $this->recurseDelete($dirName . '/init.php');
     $this->recurseDelete('cache/templates_c');
     header('Location: ' . vglobal('site_URL'));
     exit;
     return true;
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:27,代码来源:init.php


示例18: process

 public function process(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $record = $request->get('record');
     $parentRoleId = $request->get('parent_roleid');
     $roleDirectlyRelated = false;
     if (!empty($record)) {
         $recordModel = Settings_Roles_Record_Model::getInstanceById($record);
         $viewer->assign('MODE', 'edit');
     } else {
         $recordModel = new Settings_Roles_Record_Model();
         $recordModel->setParent(Settings_Roles_Record_Model::getInstanceById($parentRoleId));
         $viewer->assign('MODE', '');
         $roleDirectlyRelated = true;
     }
     $profileId = $recordModel->getDirectlyRelatedProfileId();
     if ($profileId) {
         $viewer->assign('PROFILE_ID', $profileId);
         $roleDirectlyRelated = true;
     }
     $viewer->assign('PROFILE_DIRECTLY_RELATED_TO_ROLE', $roleDirectlyRelated);
     $viewer->assign('ALL_PROFILES', Settings_Profiles_Record_Model::getAll());
     $viewer->assign('ROLE_USERS', $recordModel->getUsers());
     $viewer->assign('RECORD_MODEL', $recordModel);
     $viewer->assign('RECORD_ID', $record);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->view('EditView.tpl', $qualifiedModuleName);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:31,代码来源:Edit.php


示例19: NoteBookCreate

 function NoteBookCreate(Vtiger_Request $request)
 {
     $adb = PearDatabase::getInstance();
     $userModel = Users_Record_Model::getCurrentUserModel();
     $linkId = $request->get('linkId');
     $noteBookName = $request->get('notePadName');
     $noteBookContent = $request->get('notePadContent');
     $blockid = $request->get('blockid');
     $isdefault = $request->get('isdefault');
     $width = $request->get('width');
     $height = $request->get('height');
     $date_var = date("Y-m-d H:i:s");
     $date = $adb->formatDate($date_var, true);
     $dataValue = array();
     $dataValue['contents'] = $noteBookContent;
     $dataValue['lastSavedOn'] = $date;
     $data = Zend_Json::encode((object) $dataValue);
     $size = Zend_Json::encode(array('width' => $width, 'height' => $height));
     $query = "INSERT INTO vtiger_module_dashboard(`linkid`, `blockid`, `filterid`, `title`, `data`, `isdefault`, `size`) VALUES(?,?,?,?,?,?,?)";
     $params = array($linkId, $blockid, 0, $noteBookName, $data, $isdefault, $size);
     $adb->pquery($query, $params);
     $id = $adb->getLastInsertID();
     $result = array();
     $result['success'] = TRUE;
     $result['widgetId'] = $id;
     $response = new Vtiger_Response();
     $response->setResult($result);
     $response->emit();
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:29,代码来源:NoteBook.php


示例20: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $qualifiedModuleName = $request->getModule(false);
     $lang = $request->get('lang');
     $mod = $request->get('mod');
     $tpl = $request->get('tpl');
     $ShowDifferences = $request->get('sd');
     $moduleModel = Settings_LangManagement_Module_Model::getInstance($qualifiedModuleName);
     if ($lang != '' && $mod != '') {
         if ($tpl == 'editLang') {
             $data = $moduleModel->loadLangTranslation($lang, $mod, $ShowDifferences);
         } else {
             $data = $moduleModel->loadAllFieldsFromModule($lang, $mod, $ShowDifferences);
         }
     }
     $Mods = $moduleModel->getModFromLang($lang);
     $Langs = $moduleModel->getLang();
     $viewer->assign('MODS', $Mods);
     $viewer->assign('MODULE_MODEL', $moduleModel);
     $viewer->assign('REQUEST', $request);
     $viewer->assign('LANGS', $Langs);
     $viewer->assign('DATA', $data);
     $viewer->assign('LANGS', $Langs);
     $viewer->assign('SD', $ShowDifferences);
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('MODULE', $moduleName);
     $viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
     if ($tpl == 'editLang') {
         $viewer->view('Edit.tpl', $qualifiedModuleName);
     } else {
         $viewer->view('EditHelpIcon.tpl', $qualifiedModuleName);
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:35,代码来源:Edit.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Usuario类代码示例发布时间:2022-05-23
下一篇:
PHP Users_Privileges_Model类代码示例发布时间: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