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

PHP getParentTab函数代码示例

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

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



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

示例1: process

 public function process(Vtiger_Request $request)
 {
     PDFMaker_Debugger_Model::GetInstance()->Init();
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     if ($PDFMaker->CheckPermissions("DETAIL") == false) {
         $PDFMaker->DieDuePermission();
     }
     $viewer = $this->getViewer($request);
     if ($request->has('templateid') && !$request->isEmpty('templateid')) {
         $pdftemplateResult = $PDFMaker->GetDetailViewData($_REQUEST['templateid']);
         $viewer->assign("TEMPLATEID", $pdftemplateResult["templateid"]);
         $viewer->assign("MODULENAME", getTranslatedString($pdftemplateResult["module"]));
         $viewer->assign("BODY", decode_html($pdftemplateResult["body"]));
         $viewer->assign("HEADER", decode_html($pdftemplateResult["header"]));
         $viewer->assign("FOOTER", decode_html($pdftemplateResult["footer"]));
     }
     $version_type = $PDFMaker->GetVersionType();
     $viewer->assign("VERSION", $version_type . " " . PDFMaker_Version_Helper::$version);
     if ($PDFMaker->CheckPermissions("EDIT") && $PDFMaker->GetVersionType() != "deactivate") {
         $viewer->assign("EDIT", "permitted");
     }
     $category = getParentTab();
     $viewer->assign("CATEGORY", $category);
     $viewer->view('Detail.tpl', 'PDFMaker');
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:25,代码来源:Detail.php


示例2: __construct

 function __construct()
 {
     parent::__construct();
     global $app_strings, $mod_strings, $currentModule, $theme;
     $this->assign('CUSTOM_MODULE', true);
     $this->assign('APP', $app_strings);
     $this->assign('MOD', $mod_strings);
     $this->assign('MODULE', $currentModule);
     // TODO: Update Single Module Instance name here.
     $this->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
     $this->assign('CATEGORY', getParentTab($currentModule));
     $this->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $this->assign('THEME', $theme);
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:14,代码来源:index.php


示例3: MailManager_Viewer

 function MailManager_Viewer()
 {
     parent::vtigerCRM_Smarty();
     global $app_strings, $mod_strings, $currentModule, $theme;
     $this->assign('CUSTOM_MODULE', true);
     $this->assign('APP', $app_strings);
     $this->assign('MOD', $mod_strings);
     $this->assign('MODULE', $currentModule);
     // TODO: Update Single Module Instance name here.
     $this->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
     $this->assign('CATEGORY', getParentTab());
     $this->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $this->assign('THEME', $theme);
     return parent::vtigerCRM_Smarty();
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:15,代码来源:Viewer.php


示例4: process

 public function process(Vtiger_Request $request)
 {
     PDFMaker_Debugger_Model::GetInstance()->Init();
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     if ($PDFMaker->CheckPermissions("DETAIL") == false) {
         $PDFMaker->DieDuePermission();
     }
     $viewer = $this->getViewer($request);
     if ($request->has('templateid') && !$request->isEmpty('templateid')) {
         $pdftemplateResult = $PDFMaker->GetDetailViewData($_REQUEST['templateid']);
         $viewer->assign("FILENAME", $pdftemplateResult["filename"]);
         $viewer->assign("DESCRIPTION", $pdftemplateResult["description"]);
         $viewer->assign("TEMPLATEID", $pdftemplateResult["templateid"]);
         $viewer->assign("MODULENAME", getTranslatedString($pdftemplateResult["module"]));
         $viewer->assign("BODY", decode_html($pdftemplateResult["body"]));
         $viewer->assign("HEADER", decode_html($pdftemplateResult["header"]));
         $viewer->assign("FOOTER", decode_html($pdftemplateResult["footer"]));
         $viewer->assign("IS_ACTIVE", $pdftemplateResult["is_active"]);
         $viewer->assign("IS_DEFAULT", $pdftemplateResult["is_default"]);
         $viewer->assign("ACTIVATE_BUTTON", $pdftemplateResult["activateButton"]);
         $viewer->assign("DEFAULT_BUTTON", $pdftemplateResult["defaultButton"]);
     }
     $version_type = $PDFMaker->GetVersionType();
     $viewer->assign("VERSION", $version_type . " " . PDFMaker_Version_Helper::$version);
     if ($pdftemplateResult["permissions"]["edit"]) {
         //if ($PDFMaker->CheckPermissions("EDIT")) {
         $viewer->assign("EXPORT", "yes");
     }
     if ($PDFMaker->GetVersionType() != "deactivate") {
         if ($pdftemplateResult["permissions"]["edit"]) {
             //if ($PDFMaker->CheckPermissions("EDIT") && $PDFMaker->GetVersionType() != "deactivate") {
             $viewer->assign("EDIT", "permitted");
             $viewer->assign("IMPORT", "yes");
         }
         if ($pdftemplateResult["permissions"]["delete"]) {
             $viewer->assign("DELETE", "permitted");
         }
     }
     //$tool_buttons = Button_Check('PDFMaker');
     //$viewer->assign('CHECK', $tool_buttons);
     $category = getParentTab();
     $viewer->assign("CATEGORY", $category);
     $viewer->view('Detail.tpl', 'PDFMaker');
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:44,代码来源:Detail.php


示例5: die

require_once 'include/utils/utils.php';
require_once 'Smarty_setup.php';
global $app_strings;
global $list_max_entries_per_page;
global $currentModule, $current_user;
if ($current_user->is_admin != 'on') {
    die("<br><br><center>" . $app_strings['LBL_PERMISSION'] . " <a href='javascript:window.history.back()'>" . $app_strings['LBL_GO_BACK'] . ".</a></center>");
}
$log = LoggerManager::getLogger('user_list');
global $mod_strings, $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
global $current_language;
$mod_strings = return_module_language($current_language, 'Users');
$category = getParentTab();
$focus = new Users();
$no_of_users = UserCount();
//Display the mail send status
$smarty = new vtigerCRM_Smarty();
if ($_REQUEST['mail_error'] != '') {
    require_once "modules/Emails/mail.php";
    $error_msg = strip_tags(parseEmailErrorString($_REQUEST['mail_error']));
    $error_msg = $app_strings['LBL_MAIL_NOT_SENT_TO_USER'] . ' ' . vtlib_purify($_REQUEST['user']) . '. ' . $app_strings['LBL_PLS_CHECK_EMAIL_N_SERVER'];
    $smarty->assign("ERROR_MSG", $mod_strings['LBL_MAIL_SEND_STATUS'] . ' <b><font class="warning">' . $error_msg . '</font></b>');
}
//Retreiving the start value from request
if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
    $start = vtlib_purify($_REQUEST['start']);
} elseif ($_SESSION['user_pagestart'] != '') {
    $start = $_SESSION['user_pagestart'];
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:ListView.php


示例6: getParentTab

/*+**********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ************************************************************************************/
require_once 'Smarty_setup.php';
require_once 'user_privileges/default_module_view.php';
global $mod_strings, $app_strings, $currentModule, $current_user, $theme, $singlepane_view;
$category = getParentTab();
$action = vtlib_purify($_REQUEST['action']);
$record = vtlib_purify($_REQUEST['record']);
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
$parenttab = getParentTab();
if ($singlepane_view == 'true' && $action == 'CallRelatedList') {
    header("Location:index.php?action=DetailView&module={$currentModule}&record={$record}&parenttab={$parenttab}");
} else {
    $tool_buttons = Button_Check($currentModule);
    $focus = CRMEntity::getInstance($currentModule);
    if ($record != '') {
        $focus->retrieve_entity_info($record, $currentModule);
        $focus->id = $record;
    }
    $smarty = new vtigerCRM_Smarty();
    if ($isduplicate == 'true') {
        $focus->id = '';
    }
    if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
        $smarty->assign("OP_MODE", vtlib_purify($_REQUEST['mode']));
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:CallRelatedList.php


示例7: get_activities

 /**	function used to get the list of activities which are related to the Quotes
  *	@param int $id - quote id
  *	@return array - return an array which will be returned from the function GetRelatedList
  */
 function get_activities($id, $cur_tab_id, $rel_tab_id, $actions = false)
 {
     global $log, $singlepane_view, $currentModule, $current_user;
     $log->debug("Entering get_activities(" . $id . ") method ...");
     $this_module = $currentModule;
     $related_module = vtlib_getModuleNameById($rel_tab_id);
     require_once "modules/{$related_module}/Activity.php";
     $other = new Activity();
     vtlib_setup_modulevars($related_module, $other);
     $singular_modname = vtlib_toSingular($related_module);
     $parenttab = getParentTab();
     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;
     }
     $button = '';
     $button .= '<input type="hidden" name="activity_mode">';
     if ($actions) {
         if (is_string($actions)) {
             $actions = explode(',', strtoupper($actions));
         }
         if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
             $button .= "<input title='" . getTranslatedString('LBL_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$related_module}\";this.form.return_module.value=\"{$this_module}\";this.form.activity_mode.value=\"Task\";' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "'>&nbsp;";
         }
     }
     $query = "SELECT case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name, vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,vtiger_recurringevents.recurringtype from vtiger_activity inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid where vtiger_seactivityrel.crmid=" . $id . " and vtiger_crmentity.deleted=0 and activitytype='Task' and (vtiger_activity.status is not NULL and vtiger_activity.status != 'Completed') and (vtiger_activity.status is not NULL and vtiger_activity.status != 'Deferred')";
     $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
     if ($return_value == null) {
         $return_value = array();
     }
     $return_value['CUSTOM_BUTTON'] = $button;
     $log->debug("Exiting get_activities method ...");
     return $return_value;
 }
开发者ID:hardikk,项目名称:HNH,代码行数:39,代码来源:Quotes.php


示例8: array

$image_path = $theme_path . "images/";
global $log, $default_charset;
$mode = 'create';
if (isset($_REQUEST['templateid']) && $_REQUEST['templateid'] != '') {
    $mode = 'edit';
    $templateid = $_REQUEST['templateid'];
    $log->debug("the templateid is set to the value " . $templateid);
}
$sql = "select * from vtiger_emailtemplates where templateid=?";
$result = $adb->pquery($sql, array($templateid));
$emailtemplateResult = str_replace('"', '&quot;', $adb->fetch_array($result));
$smod_strings = return_module_language($current_language, 'Settings');
//To get Email Template variables -- Pavani
$allOptions = getEmailTemplateVariables();
$smarty = new vtigerCRM_smarty();
$smarty->assign("UMOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme_path);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MOD", $smod_strings);
$smarty->assign("FOLDERNAME", $emailtemplateResult["foldername"]);
$smarty->assign("TEMPLATENAME", $emailtemplateResult["templatename"]);
$smarty->assign("TEMPLATEID", $emailtemplateResult["templateid"]);
$smarty->assign("DESCRIPTION", $emailtemplateResult["description"]);
$smarty->assign("SUBJECT", $emailtemplateResult["subject"]);
$smarty->assign("BODY", $emailtemplateResult["body"]);
$smarty->assign("MODULE", 'Settings');
$smarty->assign("PARENTTAB", getParentTab());
$smarty->assign("EMODE", $mode);
$smarty->assign("ALL_VARIABLES", $allOptions);
$smarty->display("CreateEmailTemplate.tpl");
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:editemailtemplate.php


示例9: get_invoices

 /**	function used to get the list of invoices which are related to the service
  *	@param int $id - service id
  *	@return array - array which will be returned from the function GetRelatedList
  */
 function get_invoices($id, $cur_tab_id, $rel_tab_id, $actions = false)
 {
     global $log, $singlepane_view, $currentModule, $current_user;
     $log->debug("Entering get_invoices(" . $id . ") method ...");
     $this_module = $currentModule;
     $related_module = vtlib_getModuleNameById($rel_tab_id);
     require_once "modules/{$related_module}/{$related_module}.php";
     $other = new $related_module();
     vtlib_setup_modulevars($related_module, $other);
     $singular_modname = vtlib_toSingular($related_module);
     $parenttab = getParentTab();
     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;
     }
     $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}&parenttab={$parenttab}','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 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;";
         }
     }
     $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
     $query = "SELECT vtiger_crmentity.*,\n\t\t\tvtiger_invoice.*,\n\t\t\tvtiger_account.accountname,\n\t\t\tcase when (vtiger_users.user_name not like '') then {$userNameSql}\n\t\t\t\telse vtiger_groups.groupname end as user_name\n\t\t\tFROM vtiger_invoice\n\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\tON vtiger_crmentity.crmid = vtiger_invoice.invoiceid\n\t\t\tLEFT OUTER JOIN vtiger_account\n\t\t\t\tON vtiger_account.accountid = vtiger_invoice.accountid\n\t\t\tINNER JOIN (SELECT DISTINCT(vtiger_inventoryproductrel.id) as id FROM vtiger_inventoryproductrel WHERE vtiger_inventoryproductrel.productid = {$id}) as invrel\n\t\t\t\tON invrel.id = vtiger_invoice.invoiceid\n\t\t\tLEFT JOIN vtiger_groups\n\t\t\t\tON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\tLEFT JOIN vtiger_users\n\t\t\t\tON  vtiger_users.id = vtiger_crmentity.smownerid\n\t\t\tWHERE vtiger_crmentity.deleted = 0";
     $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
     if ($return_value == null) {
         $return_value = array();
     }
     $return_value['CUSTOM_BUTTON'] = $button;
     $log->debug("Exiting get_invoices method ...");
     return $return_value;
 }
开发者ID:mslokhat,项目名称:corebos,代码行数:42,代码来源:Services.php


示例10: vtlib_purify

<?php

/*+********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
require_once 'include/database/PearDatabase.php';
$id = vtlib_purify($_REQUEST['record']);
$sql = "delete from vtiger_seattachmentsrel where attachmentsid =?";
$adb->pquery($sql, array($id));
$sql = "delete from vtiger_attachments where attachmentsid =?";
$adb->pquery($sql, array($id));
header("Location:index.php?module=" . vtlib_purify($_REQUEST['return_module']) . "&action=" . vtlib_purify($_REQUEST['return_action']) . "&record=" . vtlib_purify($_REQUEST['return_id']) . "&parenttab=" . getParentTab());
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:17,代码来源:deleteattachments.php


示例11: get_related_list

 /**
  * Function to handle the related list for the module.
  * NOTE: Vtiger_Module::setRelatedList sets reference to this function in vtiger_relatedlists table
  * if function name is not explicitly specified.
  */
 function get_related_list($id, $cur_tab_id, $rel_tab_id, $actions = false)
 {
     global $currentModule, $app_strings, $singlepane_view, $log;
     $log->debug("Entering get_related_list(" . $id . "," . $cur_tab_id . "," . $rel_tab_id . "," . $actions . ") method ...");
     $parenttab = getParentTab();
     $related_module = vtlib_getModuleNameById($rel_tab_id);
     $other = CRMEntity::getInstance($related_module);
     // Some standard module class doesn't have required variables
     // that are used in the query, they are defined in this generic API
     vtlib_setup_modulevars($currentModule, $this);
     vtlib_setup_modulevars($related_module, $other);
     $singular_modname = 'SINGLE_' . $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}&parenttab={$parenttab}','test','width=640,height=602,resizable=0,scrollbars=0');\"" . " value='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module, $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, $related_module) . "'>&nbsp;";
         }
     }
     // To make the edit or del link actions to return back to same view.
     if ($singlepane_view == 'true') {
         $returnset = "&return_module={$currentModule}&return_action=DetailView&return_id={$id}";
     } else {
         $returnset = "&return_module={$currentModule}&return_action=CallRelatedList&return_id={$id}";
     }
     $more_relation = '';
     if (!empty($other->related_tables)) {
         foreach ($other->related_tables as $tname => $relmap) {
             $query .= ", {$tname}.*";
             // Setup the default JOIN conditions if not specified
             if (empty($relmap[1])) {
                 $relmap[1] = $other->table_name;
             }
             if (empty($relmap[2])) {
                 $relmap[2] = $relmap[0];
             }
             $more_relation .= " LEFT JOIN {$tname} ON {$tname}.{$relmap['0']} = {$relmap['1']}.{$relmap['2']}";
         }
     }
     $entityIds = $this->getRelatedContactsIds();
     array_push($entityIds, $id);
     $entityIds = implode(',', $entityIds);
     $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
     $query = "SELECT vtiger_crmentity.*, {$other->table_name}.*,\n\t\t\t\tCASE WHEN (vtiger_users.user_name NOT LIKE '') THEN {$userNameSql} ELSE vtiger_groups.groupname END AS user_name FROM {$other->table_name}\n\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = {$other->table_name}.{$other->table_index}\n\t\t\t\tINNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid)\n\t\t\t\t{$more_relation}\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_crmentityrel.crmid IN (" . $entityIds . ") OR vtiger_crmentityrel.relcrmid IN (" . $entityIds . "))";
     $return_value = GetRelatedList($currentModule, $related_module, $other, $query, $button, $returnset);
     if ($return_value == null) {
         $return_value = array();
     }
     $return_value['CUSTOM_BUTTON'] = $button;
     $log->debug("Exiting get_related_list(" . $id . "," . $cur_tab_id . "," . $rel_tab_id . "," . $actions . ") method ...");
     return $return_value;
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:62,代码来源:Accounts.php


示例12: getListViewEntries2

function getListViewEntries2($focus, $module, $list_result, $navigation_array, $relatedlist = '', $returnset = '', $edit_action = 'EditView', $del_action = 'Delete', $oCv = '', $page = '', $selectedfields = '', $contRelatedfields = '', $skipActions = false)
{
    global $log;
    global $mod_strings;
    $log->debug("Entering getListViewEntries(" . get_class($focus) . "," . $module . "," . $list_result . "," . $navigation_array . "," . $relatedlist . "," . $returnset . "," . $edit_action . "," . $del_action . "," . (is_object($oCv) ? get_class($oCv) : $oCv) . ") method ...");
    $tabname = getParentTab();
    global $adb, $current_user;
    global $app_strings;
    $noofrows = $adb->num_rows($list_result);
    $list_block = array();
    global $theme;
    $evt_status = '';
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //getting the vtiger_fieldtable entries from database
    $tabid = getTabid($module);
    //added for vtiger_customview 27/5
    if ($oCv) {
        if (isset($oCv->list_fields)) {
            $focus->list_fields = $oCv->list_fields;
        }
    }
    if (is_array($selectedfields) && $selectedfields != '') {
        $focus->list_fields = $selectedfields;
    }
    // Remove fields which are made inactive
    $focus->filterInactiveFields($module);
    //Added to reduce the no. of queries logging for non-admin user -- by minnie-start
    $field_list = array();
    $j = 0;
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    foreach ($focus->list_fields as $name => $tableinfo) {
        $fieldname = $focus->list_fields_name[$name];
        if ($oCv) {
            if (isset($oCv->list_fields_name)) {
                $fieldname = $oCv->list_fields_name[$name];
            }
        }
        if ($fieldname == 'accountname' && $module != 'Accounts') {
            $fieldname = 'account_id';
        }
        if ($fieldname == 'lastname' && ($module == 'SalesOrder' || $module == 'PurchaseOrder' || $module == 'Invoice' || $module == 'Quotes' || $module == 'Calendar')) {
            $fieldname = 'contact_id';
        }
        if ($fieldname == 'productname' && $module != 'Products') {
            $fieldname = 'product_id';
        }
        array_push($field_list, $fieldname);
        $j++;
    }
    $field = array();
    if ($is_admin == false) {
        if ($module == 'Emails') {
            $query = "SELECT fieldname FROM vtiger_field WHERE tabid = ? and vtiger_field.presence in (0,2)";
            $params = array($tabid);
        } else {
            $profileList = getCurrentUserProfileList();
            $params = array();
            $query = "SELECT DISTINCT vtiger_field.fieldname\r\n\t\t\t\tFROM vtiger_field\r\n\t\t\t\tINNER JOIN vtiger_profile2field\r\n\t\t\t\t\tON vtiger_profile2field.fieldid = vtiger_field.fieldid\r\n\t\t\t\tINNER JOIN vtiger_def_org_field\r\n\t\t\t\t\tON vtiger_def_org_field.fieldid = vtiger_field.fieldid";
            if ($module == "Calendar") {
                $query .= " WHERE vtiger_field.tabid in (9,16) and vtiger_field.presence in (0,2)";
            } else {
                $query .= " WHERE vtiger_field.tabid = ? and vtiger_field.presence in (0,2)";
                array_push($params, $tabid);
            }
            $query .= " AND vtiger_profile2field.visible = 0\r\n\t\t\t\t\tAND vtiger_profile2field.visible = 0\r\n\t\t\t\t\tAND vtiger_def_org_field.visible = 0\r\n\t\t\t\t\tAND vtiger_profile2field.profileid IN (" . generateQuestionMarks($profileList) . ")\r\n\t\t\t\t\tAND vtiger_field.fieldname IN (" . generateQuestionMarks($field_list) . ")";
            array_push($params, $profileList, $field_list);
        }
        $result = $adb->pquery($query, $params);
        for ($k = 0; $k < $adb->num_rows($result); $k++) {
            $field[] = $adb->query_result($result, $k, "fieldname");
        }
    }
    //constructing the uitype and columnname array
    $ui_col_array = array();
    $params = array();
    $query = "SELECT uitype, columnname, fieldname FROM vtiger_field ";
    if ($module == "Calendar") {
        $query .= " WHERE vtiger_field.tabid in (9,16) and vtiger_field.presence in (0,2)";
    } else {
        $query .= " WHERE vtiger_field.tabid = ? and vtiger_field.presence in (0,2)";
        array_push($params, $tabid);
    }
    $query .= " AND fieldname IN (" . generateQuestionMarks($field_list) . ") ";
    array_push($params, $field_list);
    $result = $adb->pquery($query, $params);
    $num_rows = $adb->num_rows($result);
    for ($i = 0; $i < $num_rows; $i++) {
        $tempArr = array();
        $uitype = $adb->query_result($result, $i, 'uitype');
        $columnname = $adb->query_result($result, $i, 'columnname');
        $field_name = $adb->query_result($result, $i, 'fieldname');
        $tempArr[$uitype] = $columnname;
        $ui_col_array[$field_name] = $tempArr;
    }
    //end
    if ($navigation_array['start'] != 0) {
        for ($i = 1; $i <= $noofrows; $i++) {
            $list_header = array();
            //Getting the entityid
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:101,代码来源:ListViewUtils2.php


示例13: getContactHierarchy

 /**
  * Function to get Contact hierarchy of the given Contact
  * @param  integer   $id      - contactid
  * returns Contact hierarchy in array format
  */
 function getContactHierarchy($id)
 {
     global $log, $adb, $current_user;
     $log->debug("Entering getContactHierarchy({$id}) method ...");
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     $tabname = getParentTab();
     $listview_header = array();
     $listview_entries = array();
     foreach ($this->list_fields_name as $fieldname => $colname) {
         if (getFieldVisibilityPermission('Contacts', $current_user->id, $colname) == '0') {
             $listview_header[] = getTranslatedString($fieldname);
         }
     }
     $contacts_list = array();
     // Get the contacts hierarchy from the top most contact in the hierarchy of the current contact, including the current contact
     $encountered_contacts = array($id);
     $contacts_list = $this->__getParentContacts($id, $contacts_list, $encountered_contacts);
     // Get the contacts hierarchy (list of child contacts) based on the current contact
     $contacts_list = $this->__getChildContacts($id, $contacts_list, $contacts_list[$id]['depth']);
     // Create array of all the contacts in the hierarchy
     foreach ($contacts_list as $contact_id => $contact_info) {
         $contact_info_data = array();
         $hasRecordViewAccess = is_admin($current_user) || isPermitted('Contacts', 'DetailView', $contact_id) == 'yes';
         foreach ($this->list_fields_name as $fieldname => $colname) {
             // Permission to view contact is restricted, avoid showing field values (except contact name)
             if (!$hasRecordViewAccess && $colname != 'lastname') {
                 $contact_info_data[] = '';
             } else {
                 if (getFieldVisibilityPermission('Contacts', $current_user->id, $colname) == '0') {
                     $data = $contact_info[$colname];
                     if ($colname == 'lastname') {
                         if ($contact_id != $id) {
                             if ($hasRecordViewAccess) {
                                 $data = '<a href="index.php?module=Contacts&action=DetailView&record=' . $contact_id . '&parenttab=' . $tabname . '">' . $data . '</a>';
                             } else {
                                 $data = '<i>' . $data . '</i>';
                             }
                         } else {
                             $data = '<b>' . $data . '</b>';
                         }
                         // - to show the hierarchy of the Contacts
                         $contact_depth = str_repeat(" .. ", $contact_info['depth'] * 1);
                         // * 2
                         $data = $contact_depth . $data;
                     } else {
                         if ($colname == 'website') {
                             $data = '<a href="http://' . $data . '" target="_blank">' . $data . '</a>';
                         }
                     }
                     $contact_info_data[] = $data;
                 }
             }
         }
         $listview_entries[$contact_id] = $contact_info_data;
     }
     $contact_hierarchy = array('header' => $listview_header, 'entries' => $listview_entries);
     $log->debug('Exiting getContactHierarchy method ...');
     return $contact_hierarchy;
 }
开发者ID:kduqi,项目名称:corebos,代码行数:64,代码来源:Contacts.php


示例14: get_payments

 static function get_payments($module, $id, $cur_tab_id, $rel_tab_id, $actions = false)
 {
     global $log, $singlepane_view, $currentModule, $current_user;
     $log->debug("Entering get_contacts(" . $id . ") method ...");
     $this_module = $currentModule;
     $related_module = vtlib_getModuleNameById($rel_tab_id);
     require_once "modules/{$related_module}/{$related_module}.php";
     $other = new $related_module();
     vtlib_setup_modulevars($related_module, $other);
     $singular_modname = vtlib_toSingular($related_module);
     $parenttab = getParentTab();
     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;
     }
     $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}&parenttab={$parenttab}','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 title='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString('SINGLE_Accounting', 'Accounting') . "' 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('SINGLE_Accounting', 'Accounting') . "'>&nbsp;";
         }
     }
     if ($module == "Invoice") {
         $rel_tabla = "vtiger_invoice";
         $rel_id = "invoiceid";
         $acc_rel_field = "accountingrelated2";
     } else {
         if ($module == "SalesOrder") {
             $rel_tabla = "vtiger_salesorder";
             $rel_id = "salesorderid";
             $acc_rel_field = "accountingrelated2";
         } else {
             if ($module == "PurchaseOrder") {
                 $rel_tabla = "vtiger_purchaseorder";
                 $rel_id = "purchaseorderid";
                 $acc_rel_field = "accountingrelated2";
             } else {
                 if ($module == "Accounts") {
                     $rel_tabla = "vtiger_account";
                     $rel_id = "accountid";
                     $acc_rel_field = "accountingrelated1";
                 } else {
                     if ($module == "Contacts") {
                         $rel_tabla = "vtiger_contactdetails";
                         $rel_id = "contactid";
                         $acc_rel_field = "accountingrelated1";
                     } else {
                         if ($module == "Vendors") {
                             $rel_tabla = "vtiger_vendor";
                             $rel_id = "vendorid";
                             $acc_rel_field = "accountingrelated1";
                         } else {
                             if ($module == "Project") {
                                 $rel_tabla = "vtiger_project";
                                 $rel_id = "projectid";
                                 $acc_rel_field = "accountingrelated1";
                             } else {
                                 if ($module == "Potentials") {
                                     $rel_tabla = "vtiger_potential";
                                     $rel_id = "potentialid";
                                     $acc_rel_field = "accountingrelated1";
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $query = "SELECT vtiger_accounting.*,\n\t\t\t\tvtiger_crmentity.crmid,\n\t                        vtiger_crmentity.smownerid,\n\t\t\t\tvtiger_accounting.paymentref,\n\t\t\t\tcase when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name\n\t\t\t\tFROM vtiger_accounting\n\t\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\t\tON vtiger_crmentity.crmid = vtiger_accounting.accountingid\n\t\t\t\tLEFT JOIN " . $rel_tabla . "\n\t\t\t\t\tON " . $rel_tabla . "." . $rel_id . " = vtiger_accounting.accountingid\n\t\t\t\tLEFT JOIN vtiger_groups\n\t\t\t\t\tON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_users\n\t\t\t\t\tON vtiger_crmentity.smownerid = vtiger_users.id\n\t\t\t\tWHERE vtiger_crmentity.deleted = 0\n\t\t\t\tAND vtiger_accounting." . $acc_rel_field . " = " . $id;
     $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
     if (($module == "Invoice" || $module == "PurchaseOrder" || $module == "SalesOrder") && count($return_value['entries']) > 0) {
         $button = "";
     }
     if ($return_value == null) {
         $return_value = array();
     }
     $return_value['CUSTOM_BUTTON'] = $button;
     $log->debug("Exiting get_contacts method ...");
     return $return_value;
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:87,代码来源:Accounting.php


示例15: getList

    public function getList(Vtiger_Request $request) {

        PDFMaker_Debugger_Model::GetInstance()->Init();

        $PDFMaker = new PDFMaker_PDFMaker_Model();
        
        if ($PDFMaker->CheckPermissions("DETAIL") == false)
            $PDFMaker->DieDuePermission();

        $viewer = $this->getViewer($request);
        $orderby = "templateid";
        $dir = "asc";

        if (isset($_REQUEST["dir"]) && $_REQUEST["dir"] == "desc")
            $dir = "desc";

        if (isset($_REQUEST["orderby"])) {
            switch ($_REQUEST["orderby"]) {
                case "name":
                    $orderby = "filename";
                    break;

                case "module":
                    $orderby = "module";
                    break;

                case "description":
                    $orderby = "description";
                    break;

                case "order":
                    $orderby = "order";
                    break;
                default:
                    $orderby = $_REQUEST["orderby"];
                    break;
            }
        }

        $version_type = $PDFMaker->GetVersionType();
        $license_key = $PDFMaker->GetLicenseKey();

        $viewer->assign("VERSION_TYPE", $version_type);
        $viewer->assign("VERSION", ucfirst($version_type) . " " . PDFMaker_Version_Helper::$version);
    
        if ($PDFMaker->CheckPermissions("EDIT")) {
            $viewer->assign("EDIT", "permitted");
        }

        $notif = $PDFMaker->GetReleasesNotif();
        $viewer->assign("RELEASE_NOTIF", $notif);

        $php_version = phpversion();
        $notif = false;
        $max_in_vars = ini_get("max_input_vars");
        if ($max_in_vars <= 1000 && $php_version >= "5.3.9")
            $notif = true;

        $test = ini_set("memory_limit", "256M");
        $memory_limit = ini_get("memory_limit");
        if (substr($memory_limit, 0, -1) <= 128)
            $notif = true;

        $max_exec_time = ini_get("max_execution_time");
        if ($max_exec_time <= 60)
            $notif = true;

        if (extension_loaded('suhosin')) {
            $request_max_vars = ini_get("suhosin.request.max_vars");
            $post_max_vars = ini_get("suhosin.post.max_vars");
            if ($request_max_vars <= 1000)
                $notif = true;
            if ($post_max_vars <= 1000)
                $notif = true;
        }

        $viewer->assign("MOD", $mod_strings);
        $viewer->assign("APP", $app_strings);
        $viewer->assign("THEME", $theme);
        $viewer->assign("PARENTTAB", getParentTab());
        $viewer->assign("IMAGE_PATH", $image_path);

        $return_data = $PDFMaker->GetListviewData($orderby, $dir);
        $viewer->assign("PDFTEMPLATES", $return_data);
        $category = getParentTab();
        $viewer->assign("CATEGORY", $category);

        if (is_admin($current_user)) {
          

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getParents函数代码示例发布时间:2022-05-15
下一篇:
PHP getParentName函数代码示例发布时间: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