コード例 #1
0
     unset($_SESSION['rlvs']);
 }
 if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
     $userid = $current_user->id;
     $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 7 and vtiger_field.presence in (0,2)";
     $result = $adb->pquery($sql, array());
     $num_fieldnames = $adb->num_rows($result);
     for ($i = 0; $i < $num_fieldnames; $i++) {
         $fieldname = $adb->query_result($result, $i, "fieldname");
         $permit = getFieldVisibilityPermission("Leads", $userid, $fieldname);
     }
 }
 $smarty->assign("TODO_PERMISSION", CheckFieldPermission('parent_id', 'Calendar'));
 $smarty->assign("EVENT_PERMISSION", CheckFieldPermission('parent_id', 'Events'));
 $smarty->assign("CATEGORY", $category);
 $parent_email = getEmailParentsList('Leads', $focus->id, $focus);
 $smarty->assign("HIDDEN_PARENTS_LIST", $parent_email);
 // Module Sequence Numbering
 $mod_seq_field = getModuleSequenceField($currentModule);
 if ($mod_seq_field != null) {
     $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
 } else {
     $mod_seq_id = $focus->id;
 }
 $smarty->assign('MOD_SEQ_ID', $mod_seq_id);
 // END
 $smarty->assign("ID", $focus->id);
 $smarty->assign("NAME", $focus->lastname . ' ' . $focus->firstname);
 $smarty->assign("EMAIL", $focus->column_fields['email']);
 $smarty->assign("SECONDARY_EMAIL", $focus->column_fields['secondaryemail']);
 $related_array = getRelatedLists($currentModule, $focus);
コード例 #2
0
    $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
    $mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("ID", $_REQUEST['record']);
if (isPermitted("Contacts", "EditView", $_REQUEST['record']) == 'yes') {
    $smarty->assign("EDIT_DUPLICATE", "permitted");
}
if (isPermitted("Contacts", "Delete", $_REQUEST['record']) == 'yes') {
    $smarty->assign("DELETE", "permitted");
}
if (isPermitted("Emails", "EditView", '') == 'yes') {
    //Added to pass the parents list as hidden for Emails -- 09-11-2005
    $parent_email = getEmailParentsList('Contacts', $_REQUEST['record'], $focus);
    $smarty->assign("HIDDEN_PARENTS_LIST", $parent_email);
    $smarty->assign("SENDMAILBUTTON", "permitted");
    $smarty->assign("EMAIL1", $focus->column_fields['email']);
    $smarty->assign("EMAIL2", $focus->column_fields['secondaryemail']);
}
if (isPermitted("Contacts", "Merge", '') == 'yes') {
    global $current_user;
    require "user_privileges/user_privileges_" . $current_user->id . ".php";
    require_once 'include/utils/UserInfoUtil.php';
    $wordTemplateResult = fetchWordTemplateList("Contacts");
    $tempCount = $adb->num_rows($wordTemplateResult);
    $tempVal = $adb->fetch_array($wordTemplateResult);
    for ($templateCount = 0; $templateCount < $tempCount; $templateCount++) {
        $optionString[$tempVal["templateid"]] = $tempVal["filename"];
        $tempVal = $adb->fetch_array($wordTemplateResult);
コード例 #3
0
if (isPermitted("Leads", "EditView", $_REQUEST['record']) == 'yes') {
    $smarty->assign("EDIT_DUPLICATE", "permitted");
}
require_once 'modules/Leads/ConvertLeadUI.php';
$uiinfo = new ConvertLeadUI($_REQUEST['record'], $current_user);
if (isPermitted("Leads", "EditView", $_REQUEST['record']) == 'yes' && isPermitted("Leads", "ConvertLead") == 'yes' && (isPermitted("Accounts", "EditView") == 'yes' || isPermitted("Contacts", "EditView") == 'yes') && (vtlib_isModuleActive('Contacts') || vtlib_isModuleActive('Accounts')) && !isLeadConverted($focus->id) && ($uiinfo->getCompany() != null || $uiinfo->isModuleActive('Contacts') == true)) {
    $smarty->assign("CONVERTLEAD", "permitted");
}
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
if (isPermitted("Leads", "Delete", $_REQUEST['record']) == 'yes') {
    $smarty->assign("DELETE", "permitted");
}
if (isPermitted("Emails", "EditView", '') == 'yes') {
    //Added to pass the parents list as hidden for Emails -- 09-11-2005
    $parent_email = getEmailParentsList('Leads', $_REQUEST['record'], $focus);
    $smarty->assign("HIDDEN_PARENTS_LIST", $parent_email);
    $vtwsObject = VtigerWebserviceObject::fromName($adb, $currentModule);
    $vtwsCRMObjectMeta = new VtigerCRMObjectMeta($vtwsObject, $current_user);
    $emailFields = $vtwsCRMObjectMeta->getEmailFields();
    $smarty->assign("SENDMAILBUTTON", "permitted");
    $emails = array();
    foreach ($emailFields as $key => $value) {
        $emails[] = $value;
    }
    $smarty->assign("EMAILS", $emails);
    $cond = "LTrim('%s') !=''";
    $condition = array();
    foreach ($emails as $key => $value) {
        $condition[] = sprintf($cond, $value);
    }
コード例 #4
0
ファイル: CallRelatedList.php プロジェクト: kduqi/corebos
 // Identify this module as custom module.
 $smarty->assign('CUSTOM_MODULE', $focus->IsCustomModule);
 $smarty->assign('APP', $app_strings);
 $smarty->assign('MOD', $mod_strings);
 $smarty->assign('MODULE', $currentModule);
 // TODO: Update Single Module Instance name here.
 $smarty->assign('SINGLE_MOD', getTranslatedString('SINGLE_' . $currentModule, $currentModule));
 $smarty->assign('CATEGORY', $category);
 $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
 $smarty->assign('THEME', $theme);
 $smarty->assign('ID', $focus->id);
 $smarty->assign('MODE', $focus->mode);
 $smarty->assign('CHECK', $tool_buttons);
 $smarty->assign('NAME', $focus->name);
 $smarty->assign('UPDATEINFO', updateInfo($focus->id));
 $parent_email = getEmailParentsList('Contacts', $record, $focus);
 $smarty->assign('HIDDEN_PARENTS_LIST', $parent_email);
 if (!empty($record)) {
     $userid = $current_user->id;
     $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 4 and vtiger_field.presence in (0,2)";
     $result = $adb->pquery($sql, array());
     $num_fieldnames = $adb->num_rows($result);
     for ($i = 0; $i < $num_fieldnames; $i++) {
         $fieldname = $adb->query_result($result, $i, 'fieldname');
         $permit = getFieldVisibilityPermission('Contacts', $userid, $fieldname);
     }
 }
 $smarty->assign('TODO_PERMISSION', CheckFieldPermission('parent_id', 'Calendar'));
 $smarty->assign('CONTACT_PERMISSION', CheckFieldPermission('contact_id', 'Calendar'));
 $smarty->assign('EVENT_PERMISSION', CheckFieldPermission('parent_id', 'Events'));
 $smarty->assign('EMAIL', $focus->column_fields['email']);