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

PHP isPermitted函数代码示例

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

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



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

示例1: updateEvent

 public function updateEvent(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $recordId = $request->get('id');
     $date_start = date('Y-m-d', strtotime($request->get('start')));
     $time_start = date('H:i:s', strtotime($request->get('start')));
     $succes = false;
     if (isPermitted($moduleName, 'EditView', $recordId) === 'no') {
         $succes = false;
     } else {
         if (!empty($recordId)) {
             try {
                 $delta = $request->get('delta');
                 $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName);
                 $recordData = $recordModel->entity->column_fields;
                 $end = self::changeDateTime($recordData['due_date'] . ' ' . $recordData['time_end'], $delta);
                 $due_date = $end['date'];
                 $time_end = $end['time'];
                 $recordModel->set('id', $recordId);
                 $recordModel->set('mode', 'edit');
                 $recordModel->set('date_start', $date_start);
                 $recordModel->set('time_start', $time_start);
                 $recordModel->set('due_date', $due_date);
                 $recordModel->set('time_end', $time_end);
                 $recordModel->save();
                 $succes = true;
             } catch (Exception $e) {
                 $succes = false;
             }
         }
     }
     $response = new Vtiger_Response();
     $response->setResult($succes);
     $response->emit();
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:35,代码来源:Calendar.php


示例2: getWidget

 /**
  * Get widget instance by name
  */
 static function getWidget($name)
 {
     if ($name == 'DetailViewBlockCommentWidget' && isPermitted('ModComments', 'DetailView') == 'yes') {
         require_once dirname(__FILE__) . '/widgets/DetailViewBlockComment.php';
         return new ModComments_DetailViewBlockCommentWidget();
     }
     return false;
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:11,代码来源:ModComments.php


示例3: isModuleActive

 function isModuleActive($module)
 {
     include_once 'include/utils/VtlibUtils.php';
     if (vtlib_isModuleActive($module) && isPermitted($module, 'EditView') == 'yes') {
         return true;
     }
     return false;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:8,代码来源:ConvertLeadUI.php


示例4: getModulesList

 function getModulesList()
 {
     foreach ($this->module_list as $key => $value) {
         if (isPermitted($key, 'index') == "yes") {
             $modules[$key] = vtranslate($key, $key);
         }
     }
     asort($modules);
     return $modules;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:10,代码来源:ITS4YouReport.php


示例5: isViewPermitted

	function isViewPermitted() {
		global $current_user;
		if (isset($current_user) && is_admin($current_user))
			return true;
		// Does current user has access to view the record that was tracked?
		if ($this->module == 'Events') {
			$moduleName = 'Calendar';
		} else {
			$moduleName = $this->module;
		}
		return (isPermitted($moduleName, 'DetailView', $this->crmid) == "yes");
	}
开发者ID:nvh3010,项目名称:quancrm,代码行数:12,代码来源:ModTracker_Basic.php


示例6: getDetailViewLinks

 /**
  * Function to get the detail view links (links and widgets)
  * @param <array> $linkParams - parameters which will be used to calicaulate the params
  * @return <array> - array of link models in the format as below
  *                   array('linktype'=>list of link models);
  */
 public function getDetailViewLinks($linkParams)
 {
     $currentUserModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
     $linkModelList = parent::getDetailViewLinks($linkParams);
     $recordModel = $this->getRecord();
     $moduleName = $recordModel->getModuleName();
     $recordId = $recordModel->getId();
     $status = $recordModel->get('activitystatus');
     $statusActivity = Calendar_Module_Model::getComponentActivityStateLabel('current');
     $lockEdit = Users_Privileges_Model::checkLockEdit($moduleName, $recordId);
     if (Users_Privileges_Model::isPermitted($moduleName, 'EditView', $recordId) && $currentUserModel->hasModuleActionPermission($this->getModule()->getId(), 'DetailView') && !$lockEdit && isPermitted($moduleName, 'ActivityComplete', $recordId) == 'yes' && isPermitted($moduleName, 'ActivityCancel', $recordId) == 'yes' && isPermitted($moduleName, 'ActivityPostponed', $recordId) == 'yes' && in_array($status, $statusActivity)) {
         $basicActionLink = ['linktype' => 'DETAILVIEW', 'linklabel' => 'LBL_SET_RECORD_STATUS', 'linkurl' => '#', 'linkdata' => ['url' => $recordModel->getActivityStateModalUrl()], 'linkicon' => 'glyphicon glyphicon-ok', 'linkclass' => 'showModal closeCalendarRekord'];
         $linkModelList['DETAILVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($basicActionLink);
     }
     return $linkModelList;
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:22,代码来源:DetailView.php


示例7: updateEvent

 public function updateEvent(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $recordId = $request->get('id');
     $actionname = 'EditView';
     if (isPermitted($moduleName, $actionname, $recordId) === 'no') {
         $succes = false;
     } else {
         $delta = $request->get('delta');
         $start = DateTimeField::convertToDBTimeZone($request->get('start'));
         $date_start = $start->format('Y-m-d');
         $time_start = $start->format('H:i:s');
         $succes = false;
         if (!empty($recordId)) {
             try {
                 $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName);
                 $recordData = $recordModel->entity->column_fields;
                 $end = self::changeDateTime($recordData['due_date'] . ' ' . $recordData['time_end'], $delta);
                 $due_date = $end['date'];
                 $time_end = $end['time'];
                 $recordModel->set('id', $recordId);
                 $recordModel->set('mode', 'edit');
                 $recordModel->set('date_start', $date_start);
                 $recordModel->set('due_date', $due_date);
                 if ($request->get('allDay') == 'true') {
                     $recordModel->set('allday', 1);
                     $start = self::changeDateTime($recordData['date_start'] . ' ' . $recordData['time_start'], $delta);
                     $recordModel->set('date_start', $start['date']);
                 } else {
                     $recordModel->set('time_start', $time_start);
                     $recordModel->set('time_end', $time_end);
                     $recordModel->set('allday', 0);
                 }
                 $recordModel->save();
                 $succes = true;
             } catch (Exception $e) {
                 $succes = false;
             }
         }
     }
     $response = new Vtiger_Response();
     $response->setResult($succes);
     $response->emit();
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:44,代码来源:Calendar.php


示例8: getDashboards

 /**
  * Function returns List of User's selected Dashboard Widgets
  * @return <Array of Vtiger_Widget_Model>
  */
 public function getDashboards($action = 1)
 {
     $db = PearDatabase::getInstance();
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $moduleModel = $this->getModule();
     if ($action == 'Header') {
         $action = 0;
     }
     $sql = " SELECT vtiger_links.*, mdw.userid, mdw.data, mdw.active,  mdw.title, mdw.filterid, mdw.id as widgetid, mdw.position as position, vtiger_links.linkid as id \n\t\t\tFROM vtiger_links \n\t\t\tINNER JOIN vtiger_module_dashboard_widgets mdw ON vtiger_links.linkid = mdw.linkid\n\t\t\tWHERE mdw.userid = ? AND linktype = ? AND tabid = ? AND `active` = ?";
     $params = array($currentUser->getId(), 'DASHBOARDWIDGET', $moduleModel->getId(), $action);
     $result = $db->pquery($sql, $params);
     $widgets = array();
     for ($i = 0, $len = $db->num_rows($result); $i < $len; $i++) {
         $row = $db->query_result_rowdata($result, $i);
         $row['linkid'] = $row['id'];
         if ($row['linklabel'] == 'Mini List') {
             $minilistWidget = Vtiger_Widget_Model::getInstanceFromValues($row);
             $minilistWidgetModel = new Vtiger_MiniList_Model();
             $minilistWidgetModel->setWidgetModel($minilistWidget);
             $minilistWidget->set('title', $minilistWidgetModel->getTitle());
             $widgets[] = $minilistWidget;
         } else {
             $widgets[] = Vtiger_Widget_Model::getInstanceFromValues($row);
         }
     }
     foreach ($widgets as $index => $widget) {
         $label = $widget->get('linklabel');
         $url = $widget->get('linkurl');
         $redex = '/module=(.+?)&+/';
         preg_match($redex, $url, $match);
         if (isPermitted($match[1], 'Index') == 'no') {
             unset($widgets[$index]);
         }
         if ($label == 'Tag Cloud') {
             $isTagCloudExists = getTagCloudView($currentUser->getId());
             if ($isTagCloudExists === 'false') {
                 unset($widgets[$index]);
             }
         }
     }
     return $widgets;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:46,代码来源:DashBoard.php


示例9: if

<?php if ($_valid && !is_callable('content_56059e5cd6c07')) {function content_56059e5cd6c07($_smarty_tpl) {?>
<?php $_smarty_tpl->tpl_vars['MODULE_NAME'] = new Smarty_variable("Calendar", null, 0);?><div  class="summaryWidgetContainer"><div class="widget_header row-fluid"><span class="span8"><h4 class="textOverflowEllipsis"><?php echo vtranslate('LBL_ACTIVITIES',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</h4></span><span class="span4"><button class="btn pull-right addButton createActivity" data-url="sourceModule=<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getModuleName();?>
&sourceRecord=<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
&relationOperation=true" type="button"><strong><?php echo vtranslate('LBL_ADD',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</strong></button></span></div><div class="widget_contents"><?php if (count($_smarty_tpl->tpl_vars['ACTIVITIES']->value)!='0'){?><?php  $_smarty_tpl->tpl_vars['RECORD'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['RECORD']->_loop = false;
 $_smarty_tpl->tpl_vars['KEY'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['ACTIVITIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['RECORD']->key => $_smarty_tpl->tpl_vars['RECORD']->value){
$_smarty_tpl->tpl_vars['RECORD']->_loop = true;
 $_smarty_tpl->tpl_vars['KEY']->value = $_smarty_tpl->tpl_vars['RECORD']->key;
?><?php $_smarty_tpl->tpl_vars['START_DATE'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->get('date_start'), null, 0);?><?php $_smarty_tpl->tpl_vars['START_TIME'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->get('time_start'), null, 0);?><?php $_smarty_tpl->tpl_vars['EDITVIEW_PERMITTED'] = new Smarty_variable(isPermitted('Calendar','EditView',$_smarty_tpl->tpl_vars['RECORD']->value->get('crmid')), null, 0);?><?php $_smarty_tpl->tpl_vars['DETAILVIEW_PERMITTED'] = new Smarty_variable(isPermitted('Calendar','DetailView',$_smarty_tpl->tpl_vars['RECORD']->value->get('crmid')), null, 0);?><div class="activityEntries"><input type="hidden" class="activityId" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('activityid');?>
"/><div class="row-fluid"><span class="span6"><strong title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString(($_smarty_tpl->tpl_vars['START_DATE']->value)." ".($_smarty_tpl->tpl_vars['START_TIME']->value));?>
"><?php echo Vtiger_Util_Helper::formatDateIntoStrings($_smarty_tpl->tpl_vars['START_DATE']->value,$_smarty_tpl->tpl_vars['START_TIME']->value);?>
</strong></span><div class="activityStatus span6"><?php if ($_smarty_tpl->tpl_vars['RECORD']->value->get('activitytype')=='Task'){?><?php $_smarty_tpl->tpl_vars['MODULE_NAME'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->getModuleName(), null, 0);?><input type="hidden" class="activityModule" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getModuleName();?>
"/><input type="hidden" class="activityType" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('activitytype');?>
"/><div class="pull-right"><strong><span class="value"><?php echo vtranslate($_smarty_tpl->tpl_vars['RECORD']->value->get('status'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span></strong>&nbsp&nbsp;<span class="editStatus cursorPointer"><i class="icon-pencil" title="<?php echo vtranslate('LBL_EDIT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
"></i></span><span class="edit hide"><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->getModule()->getField('taskstatus'), null, 0);?><?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->set('fieldvalue',$_smarty_tpl->tpl_vars['RECORD']->value->get('status')), null, 0);?><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getTemplateName(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('FIELD_MODEL'=>$_smarty_tpl->tpl_vars['FIELD_MODEL']->value,'USER_MODEL'=>$_smarty_tpl->tpl_vars['USER_MODEL']->value,'MODULE'=>$_smarty_tpl->tpl_vars['MODULE_NAME']->value,'OCCUPY_COMPLETE_WIDTH'=>'true'), 0);?>
<input type="hidden" class="fieldname" value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');?>
' data-prev-value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue');?>
' /></span></div></div><?php }else{ ?><?php $_smarty_tpl->tpl_vars['MODULE_NAME'] = new Smarty_variable("Events", null, 0);?><input type="hidden" class="activityModule" value="Events"/><input type="hidden" class="activityType" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('activitytype');?>
"/><?php if ($_smarty_tpl->tpl_vars['EDITVIEW_PERMITTED']->value=='yes'){?><div class="pull-right"><strong><span class="value"><?php echo vtranslate($_smarty_tpl->tpl_vars['RECORD']->value->get('eventstatus'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span></strong>&nbsp&nbsp;<span class="editStatus cursorPointer"><i class="icon-pencil" title="<?php echo vtranslate('LBL_EDIT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
"></i></span><span class="edit hide"><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->getModule()->getField('eventstatus'), null, 0);?><?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->set('fieldvalue',$_smarty_tpl->tpl_vars['RECORD']->value->get('eventstatus')), null, 0);?><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getTemplateName(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('FIELD_MODEL'=>$_smarty_tpl->tpl_vars['FIELD_MODEL']->value,'USER_MODEL'=>$_smarty_tpl->tpl_vars['USER_MODEL']->value,'MODULE'=>$_smarty_tpl->tpl_vars['MODULE_NAME']->value,'OCCUPY_COMPLETE_WIDTH'=>'true'), 0);?>
<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType()=='multipicklist'){?><input type="hidden" class="fieldname" value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');?>
[]' data-prev-value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
' /><?php }else{ ?><input type="hidden" class="fieldname" value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('name');?>
' data-prev-value='<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'));?>
' /><?php }?></span></div><?php }?></div><?php }?></div><div class="summaryViewEntries"><?php echo vtranslate($_smarty_tpl->tpl_vars['RECORD']->value->get('activitytype'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
&nbsp;-&nbsp;<?php if ($_smarty_tpl->tpl_vars['DETAILVIEW_PERMITTED']->value=='yes'){?><a href="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getDetailViewUrl();?>
" ><?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('subject');?>
</a><?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('subject');?>
<?php }?>&nbsp;<?php if ($_smarty_tpl->tpl_vars['EDITVIEW_PERMITTED']->value=='yes'){?><a href="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getEditViewUrl();?>
" class="fieldValue"><i class="icon-pencil summaryViewEdit" title="<?php echo vtranslate('LBL_EDIT',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
"></i></a><?php }?></div></div><hr><?php } ?><?php }else{ ?><div class="summaryWidgetContainer"><p class="textAlignCenter"><?php echo vtranslate('LBL_NO_PENDING_ACTIVITIES',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</p></div><?php }?><?php if ($_smarty_tpl->tpl_vars['PAGING_MODEL']->value->isNextPageExists()){?><div class="row-fluid"><div class="pull-right"><a href="javascript:void(0)" class="moreRecentActivities"><?php echo vtranslate('LBL_MORE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
..</a></div></div><?php }?></div></div>
<?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:39,代码来源:d60edb6b10bd68a0dc43d71f5eaa197b57fd5e1d.file.RelatedActivities.tpl.php


示例10: updateDeltaOnDrop

 public function updateDeltaOnDrop(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $activityType = $request->get('activitytype');
     $recordId = $request->get('id');
     $dayDelta = $request->get('dayDelta');
     $minuteDelta = $request->get('minuteDelta');
     $actionname = 'EditView';
     $response = new Vtiger_Response();
     if (isPermitted($moduleName, $actionname, $recordId) === 'no') {
         $result = array('ispermitted' => false);
         $response->setResult($result);
         $response->emit();
     } else {
         $result = array('ispermitted' => true);
         $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName);
         $record->set('mode', 'edit');
         $oldStartDateTime[] = $record->get('date_start');
         $oldStartDateTime[] = $record->get('time_start');
         $oldStartDateTime = implode(' ', $oldStartDateTime);
         $resultDateTime = $this->changeDateTime($oldStartDateTime, $dayDelta, $minuteDelta);
         $parts = explode(' ', $resultDateTime);
         $record->set('date_start', $parts[0]);
         $record->set('time_start', $parts[1]);
         $oldEndDateTime[] = $record->get('due_date');
         $oldEndDateTime[] = $record->get('time_end');
         $oldEndDateTime = implode(' ', $oldEndDateTime);
         $resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta);
         $parts = explode(' ', $resultDateTime);
         $record->set('due_date', $parts[0]);
         if (activitytype != 'Task') {
             $record->set('time_end', $parts[1]);
         }
         $record->save();
         $response->setResult($result);
         $response->emit();
     }
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:38,代码来源:DragDropAjax.php


示例11: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $recordId = $request->get('record');
     $recordModel = Vtiger_Record_Model::getInstanceById($recordId);
     $moduleModel = $recordModel->getModule();
     $actionname = "EditView";
     if (isPermitted($moduleName, $actionname, $recordId) === 'yes') {
         //Start date Field required for validation
         $startDateFieldModel = $moduleModel->getField("date_start");
         $startDateTime = $recordModel->getDisplayValue('date_start');
         $startDate = explode(" ", $startDateTime);
         $startDate = $startDate[0];
         $viewer = $this->getViewer($request);
         $viewer->assign('STARTDATEFIELDMODEL', $startDateFieldModel);
         $viewer->assign('STARTDATE', $startDate);
         $viewer->assign('CURRENTDATE', date('Y-n-j'));
         $viewer->assign('MODULE', $moduleName);
         $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
         $viewer->assign('RECORD_MODEL', $recordModel);
         $viewer->view('QuickCreateFollowup.tpl', $moduleName);
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:23,代码来源:QuickCreateFollowupAjax.php


示例12: if

<?php if ($_valid && !is_callable('content_56059e5eb6b1a')) {function content_56059e5eb6b1a($_smarty_tpl) {?>
<div class="recentActivitiesContainer" id="updates"><input type="hidden" id="updatesCurrentPage" value="<?php echo $_smarty_tpl->tpl_vars['PAGING_MODEL']->value->get('page');?>
" /><div><?php if (!empty($_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value)){?><ul class="unstyled"><?php  $_smarty_tpl->tpl_vars['RECENT_ACTIVITY'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->key => $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value){
$_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->_loop = true;
?><?php $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(true, null, 0);?><?php if (($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink())||($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationUnLink())){?><?php $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);?><?php if (!($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord())){?><?php $_smarty_tpl->tpl_vars['PROCEED'] = new Smarty_variable(false, null, 0);?><?php }?><?php }?><?php if ($_smarty_tpl->tpl_vars['PROCEED']->value){?><?php if ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isCreate()){?><li><div><span><strong><?php echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getName();?>
</strong> <?php echo vtranslate('LBL_CREATED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getParent()->get('createdtime'));?>
</small></p></span></div></li><?php }elseif($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isUpdate()){?><li><div><span><strong><?php echo $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getModifiedBy()->getDisplayName();?>
</strong> <?php echo vtranslate('LBL_UPDATED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getActivityTime());?>
</small></p></span></div><?php  $_smarty_tpl->tpl_vars['FIELDMODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getFieldInstances(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['FIELDMODEL']->key => $_smarty_tpl->tpl_vars['FIELDMODEL']->value){
$_smarty_tpl->tpl_vars['FIELDMODEL']->_loop = true;
?><?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->isViewable()&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getDisplayType()!='5'){?><div class='font-x-small updateInfoContainer'><i><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getName(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</i> :&nbsp;<?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue')!=''&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')!=''&&!($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0'||$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue')=='0'))){?>&nbsp;<?php echo vtranslate('LBL_FROM');?>
 <b style="white-space:pre;"><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue'))));?>
</b><?php }elseif($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')==''||($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0')){?>&nbsp; <b> <?php echo vtranslate('LBL_DELETED');?>
 </b> ( <del><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('prevalue'))));?>
</del> )<?php }else{ ?>&nbsp;<?php echo vtranslate('LBL_CHANGED');?>
<?php }?><?php if ($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')!=''&&!($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getFieldInstance()->getFieldDataType()=='reference'&&$_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue')=='0')){?>&nbsp;<?php echo vtranslate('LBL_TO');?>
&nbsp;<b style="white-space:pre;"><?php echo Vtiger_Util_Helper::toVtiger6SafeHTML($_smarty_tpl->tpl_vars['FIELDMODEL']->value->getDisplayValue(decode_html($_smarty_tpl->tpl_vars['FIELDMODEL']->value->get('postvalue'))));?>
</b><?php }?></div><?php }?><?php } ?></li><?php }elseif(($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink()||$_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationUnLink())){?><li><div class="row-fluid"><?php $_smarty_tpl->tpl_vars['RELATION'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->getRelationInstance(), null, 0);?><span><?php echo vtranslate($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName(),$_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName());?>
</span> <span><?php if ($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRelationLink()){?><?php echo vtranslate('LBL_ADDED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
<?php }else{ ?><?php echo vtranslate('LBL_REMOVED',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
<?php }?> </span><span><?php if ($_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getModuleName()=='Calendar'){?><?php if (isPermitted('Calendar','DetailView',$_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getId())=='yes'){?> <strong><?php echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();?>
</strong> <?php }else{ ?> <?php }?><?php }else{ ?> <strong><?php echo $_smarty_tpl->tpl_vars['RELATION']->value->getLinkedRecord()->getName();?>
</strong> <?php }?></span><span class="pull-right"><p class="muted"><small title="<?php echo Vtiger_Util_Helper::formatDateTimeIntoDayString($_smarty_tpl->tpl_vars['RELATION']->value->get('changedon'));?>
"><?php echo Vtiger_Util_Helper::formatDateDiffInStrings($_smarty_tpl->tpl_vars['RELATION']->value->get('changedon'));?>
</small></p></span></div></li><?php }elseif($_smarty_tpl->tpl_vars['RECENT_ACTIVITY']->value->isRestore()){?><li></li><?php }?><?php }?><?php } ?></ul><?php }else{ ?><div class="summaryWidgetContainer"><p class="textAlignCenter"><?php echo vtranslate('LBL_NO_RECENT_UPDATES');?>
</p></div><?php }?></div><div class="row-fluid" id="moreLink"><?php if ($_smarty_tpl->tpl_vars['PAGING_MODEL']->value->isNextPageExists()){?><div class="pull-right"><a href="javascript:void(0)" class="moreRecentUpdates"><?php echo vtranslate('LBL_MORE',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
..</a></div><?php }?></div><span class="clearfix"></span></div><?php }} ?>
开发者ID:jeremyevans6,项目名称:kulturedTiger-,代码行数:36,代码来源:b354b6e8498540a842ac3bb61a4b6d1bab66eff5.file.RecentActivities.tpl.php


示例13: setCurrentLanguage

require_once 'modules/PickList/PickListUtils.php';
// Set the current language and the language strings, if not already set.
setCurrentLanguage();
global $allow_exports, $app_strings;
session_start();
$current_user = new Users();
if (isset($_SESSION['authenticated_user_id'])) {
    $result = $current_user->retrieveCurrentUserInfoFromFile($_SESSION['authenticated_user_id'], "Users");
    if ($result == null) {
        session_destroy();
        header("Location: index.php?action=Login&module=Users");
        exit;
    }
}
//Security Check
if (isPermitted($_REQUEST['module'], "Export") == "no") {
    $allow_exports = "none";
}
if ($allow_exports == 'none' || $allow_exports == 'admin' && !is_admin($current_user)) {
    ?>
	<script type='text/javascript'>
		alert("<?php 
    echo $app_strings['NOT_PERMITTED_TO_EXPORT'];
    ?>
");
		window.location="index.php?module=<?php 
    echo vtlib_purify($_REQUEST['module']);
    ?>
&action=index";
	</script>
	
开发者ID:nvh3010,项目名称:quancrm,代码行数:30,代码来源:export.php


示例14: get_project_mail

 function get_project_mail($id, $cur_tab_id, $rel_tab_id, $actions = false)
 {
     global $currentModule, $app_strings, $singlepane_view;
     $this_module = $currentModule;
     $related_module = vtlib_getModuleNameById($rel_tab_id);
     $other = CRMEntity::getInstance($related_module);
     vtlib_setup_modulevars($related_module, $other);
     $singular_modname = vtlib_toSingular($related_module);
     $button = '';
     if ($actions) {
         if (is_string($actions)) {
             $actions = explode(',', strtoupper($actions));
         }
         if (in_array('SELECT', $actions) && isPermitted($related_module, 4, '') == 'yes') {
             $button .= "<input title='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "' class='crmbutton small edit' type='button' onclick=\"return window.open('index.php?module={$related_module}&return_module={$currentModule}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$id}','test','width=640,height=602,resizable=0,scrollbars=0');\" value='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "'>&nbsp;";
         }
         if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
             $button .= "<input type='hidden' name='createmode' id='createmode' value='link' />" . "<input title='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$related_module}\"' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "'>&nbsp;";
         }
     }
     if ($singlepane_view == 'true') {
         $returnset = "&return_module={$this_module}&return_action=DetailView&return_id={$id}";
     } else {
         $returnset = "&return_module={$this_module}&return_action=CallRelatedList&return_id={$id}";
     }
     $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\tvtiger_crmentity.*, vtiger_project.*, vtiger_projectcf.*\n\t\t\t\tFROM vtiger_project\n\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_project.projectid\n\t\t\t\tLEFT JOIN vtiger_projectcf ON vtiger_projectcf.projectid = vtiger_project.projectid\n\t\t\t\tLEFT JOIN vtiger_ossmailview_project ON vtiger_ossmailview_project.crmid = vtiger_project.projectid\n\t\t\t\tLEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\tWHERE vtiger_crmentity.deleted = 0 AND vtiger_ossmailview_project.ossmailviewid = '{$id}'";
     $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
     if ($return_value == null) {
         $return_value = array();
     }
     $return_value['CUSTOM_BUTTON'] = $button;
     return $return_value;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:34,代码来源:OSSMailView.php


示例15: com_vtGetModules

function com_vtGetModules($adb)
{
    $sql = "select distinct vtiger_field.tabid, name\n\t\tfrom vtiger_field\n\t\tinner join vtiger_tab\n\t\t\ton vtiger_field.tabid=vtiger_tab.tabid\n\t\twhere vtiger_field.tabid not in(9,10,16,15,29) and vtiger_tab.presence = 0 and vtiger_tab.isentitytype=1";
    $it = new SqlResultIterator($adb, $adb->query($sql));
    $modules = array();
    foreach ($it as $row) {
        if (isPermitted($row->name, 'index') == "yes") {
            $modules[$row->name] = getTranslatedString($row->name);
        }
    }
    return $modules;
}
开发者ID:yunter,项目名称:crm,代码行数:12,代码来源:utils.php


示例16: Button_Check

if (isPermitted($module, "EditView", $_REQUEST['record']) == 'yes') {
    $smarty->assign("EDIT", "permitted");
    $smarty->assign("EDIT_PERMISSION", "yes");
} else {
    $smarty->assign("EDIT_PERMISSION", "no");
}
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
if (isPermitted($module, "Create", $_REQUEST['record']) == 'yes') {
    $smarty->assign("EDIT_DUPLICATE", "permitted");
}
if (isPermitted($module, "Delete", $_REQUEST['record']) == 'yes') {
    $smarty->assign("DELETE", "permitted");
}
if ((!isset($is_disable_approve) || isset($is_disable_approve) && !$is_disable_approve) && (isset($module_enable_approve) && $module_enable_approve)) {
    if (isPermitted($module, "Approve") == 'yes') {
        $smarty->assign("APPROVE", "permitted");
    }
    $smarty->assign("APPROVE_STATUS", $focus->column_fields['approved']);
    if ($focus->column_fields['approved'] == 1) {
        $smarty->assign("ANTI_RECORD_STATUS", "");
        $smarty->assign("APPROVE_RECORD_STATUS", "disabled");
        if (is_admin($current_user)) {
            $smarty->assign("APPROVE", "permitted");
        }
    } else {
        $smarty->assign("APPROVE_RECORD_STATUS", "");
        $smarty->assign("ANTI_RECORD_STATUS", "disabled");
    }
} else {
    //$smarty->assign("APPROVE_STATUS",0);
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:DetailView.php


示例17: CheckLeadViewPerm

function CheckLeadViewPerm($user_name)
{
    global $current_user, $log;
    require_once 'modules/Users/Users.php';
    $seed_user = new Users();
    $user_id = $seed_user->retrieve_user_id($user_name);
    $current_user = $seed_user;
    $current_user->retrieve_entity_info($user_id, "Users");
    if (isPermitted("Leads", "EditView") == "yes") {
        return "allowed";
    } else {
        return "denied";
    }
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:14,代码来源:thunderbirdplugin.php


示例18: get_recently_viewed

 /**
  * param $user_id - The id of the user to retrive the history for
  * param $module_name - Filter the history to only return records from the specified module.  If not specified all records are returned
  * return - return th 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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