[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/include/utils/ -> CommonUtils.php (sommaire)

(pas de description)

Poids: 2531 lignes (86 kb)
Inclus ou requis: 18 fois
Référencé: 0 fois
Nécessite: 8 fichiers
 modules/Emails/mail.php
 modules/Users/CreateUserPrivilegeFile.php
 parent_tabdata.php
 tabdata.php
 include/utils/utils.php
 include/utils/RecurringType.php
 include/ComboUtil.php
 include/database/PearDatabase.php

Définit 75 fonctions

  is_admin()
  get_select_options()
  get_select_options_with_id()
  get_select_options_array()
  get_options_array_seperate_key()
  get_select_options_with_id_separate_key()
  parse_calendardate()
  from_html()
  popup_from_html()
  fetchCurrency()
  getCurrencyName()
  get_group_options()
  getTabid()
  getSalesEntityType()
  getAccountName()
  getProductName()
  getPotentialName()
  getContactName()
  getCampaignName()
  getVendorName()
  getQuoteName()
  getPriceBookName()
  getPoName()
  getSoName()
  getGroupName()
  getUserName()
  getUserFullName()
  getURLstring()
  getDisplayDate()
  getNewDisplayDate()
  getDisplayCurrency()
  convertToDollar()
  convertFromDollar()
  convertFromMasterCurrency()
  getCurrencySymbolandCRate()
  getTermsandConditions()
  getReminderSelectOption()
  getListPrice()
  br2nl()
  make_clickable()
  getBlocks()
  getView()
  getBlockId()
  getHeaderArray()
  getParentTabName()
  getParentTabFromModule()
  getParentTab()
  updateInfo()
  getProductImages()
  SaveImage()
  file_exist_fn()
  UserCount()
  mkdirs()
  DefHomeView()
  setObjectValuesFromRequest()
  create_tab_data_file()
  create_parenttab_data_file()
  getQuickCreateModules()
  QuickCreate()
  sendNotificationToOwner()
  getUserslist()
  getGroupslist()
  Button_Check()
  getEntityName()
  getAllParenttabmoduleslist()
  decideFilePath()
  getModuleFileStoragePath()
  validateImageFile()
  getTemplateDetails()
  getMergedDescription()
  getSingleFieldValue()
  get_announcements()
  getConvertedPrice()
  getConvertedPriceFromDollar()
  getrecurringObjValue()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

is_admin($user)   X-Ref
Check if user id belongs to a system admin.
Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
All Rights Reserved.
Contributor(s): ______________________________________..


get_select_options(&$option_list, $selected, $advsearch='false')   X-Ref
THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED; USE get_select_options_with_id()
Create HTML to display select options in a dropdown list.  To be used inside
of a select statement in a form.
param $option_list - the array of strings to that contains the option list
param $selected - the string which contains the default value
Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
All Rights Reserved.
Contributor(s): ______________________________________..


get_select_options_with_id(&$option_list, $selected_key, $advsearch='false')   X-Ref
Create HTML to display select options in a dropdown list.  To be used inside
of a select statement in a form.   This method expects the option list to have keys and values.  The keys are the ids.  The values is an array of the datas
param $option_list - the array of strings to that contains the option list
param $selected - the string which contains the default value
Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
All Rights Reserved.
Contributor(s): ______________________________________..


get_select_options_array(&$option_list, $selected_key, $advsearch='false')   X-Ref
Create HTML to display select options in a dropdown list.  To be used inside
of a select statement in a form.   This method expects the option list to have keys and values.  The keys are the ids.
The values are the display strings.


get_options_array_seperate_key(&$label_list, &$key_list, $selected_key, $advsearch='false')   X-Ref
Create HTML to display select options in a dropdown list.  To be used inside
of a select statement in a form.   This method expects the option list to have keys and values.  The keys are the ids.  The value is an array of data
param $label_list - the array of strings to that contains the option list
param $key_list - the array of strings to that contains the values list
param $selected - the string which contains the default value
Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
All Rights Reserved.
Contributor(s): ______________________________________..


get_select_options_with_id_separate_key(&$label_list, &$key_list, $selected_key, $advsearch='false')   X-Ref
Create HTML to display select options in a dropdown list.  To be used inside
of a select statement in a form.   This method expects the option list to have keys and values.  The keys are the ids.
The values are the display strings.


parse_calendardate($local_format)   X-Ref
Converts localized date format string to jscalendar format
Example: $array = array_csort($array,'town','age',SORT_DESC,'name');
Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
All Rights Reserved.
Contributor(s): ______________________________________..


from_html($string, $encode=true)   X-Ref
Decodes the given set of special character
input values $string - string to be converted, $encode - flag to decode
returns the decoded value in string fromat


popup_from_html($string, $encode=true)   X-Ref
Function used to decodes the given single quote and double quote only. This function used for popup selection

param: string $string - string to be converted, $encode - flag to decode
return: string $string - the decoded value in string fromat where as only single and double quotes will be decoded

fetchCurrency($id)   X-Ref
Pas de description

getCurrencyName($currencyid)   X-Ref
Pas de description

get_group_options()   X-Ref
Function to fetch the list of vtiger_groups from group vtiger_table
Takes no value as input
returns the query result set object


getTabid($module)   X-Ref
Function to get the tabid
Takes the input as $module - module name
returns the tabid, integer type


getSalesEntityType($crmid)   X-Ref
Function to get the tabid
Takes the input as $module - module name
returns the tabid, integer type


getAccountName($account_id)   X-Ref
Function to get the AccountName when a vtiger_account id is given
Takes the input as $acount_id - vtiger_account id
returns the vtiger_account name in string format.


getProductName($product_id)   X-Ref
Function to get the ProductName when a product id is given
Takes the input as $product_id - product id
returns the product name in string format.


getPotentialName($potential_id)   X-Ref
Function to get the Potentail Name when a vtiger_potential id is given
Takes the input as $potential_id - vtiger_potential id
returns the vtiger_potential name in string format.


getContactName($contact_id)   X-Ref
Function to get the Contact Name when a contact id is given
Takes the input as $contact_id - contact id
returns the Contact Name in string format.


getCampaignName($campaign_id)   X-Ref
Function to get the Campaign Name when a campaign id is given
Takes the input as $campaign_id - campaign id
returns the Campaign Name in string format.


getVendorName($vendor_id)   X-Ref
Function to get the Vendor Name when a vtiger_vendor id is given
Takes the input as $vendor_id - vtiger_vendor id
returns the Vendor Name in string format.


getQuoteName($quote_id)   X-Ref
Function to get the Quote Name when a vtiger_vendor id is given
Takes the input as $quote_id - quote id
returns the Quote Name in string format.


getPriceBookName($pricebookid)   X-Ref
Function to get the PriceBook Name when a vtiger_pricebook id is given
Takes the input as $pricebook_id - vtiger_pricebook id
returns the PriceBook Name in string format.


getPoName($po_id)   X-Ref
Pas de description

getSoName($so_id)   X-Ref
Function to get the Sales Order Name when a vtiger_salesorder id is given
Takes the input as $salesorder_id - vtiger_salesorder id
returns the Salesorder Name in string format.


getGroupName($id, $module)   X-Ref
Function to get the Group Information for a given groupid
Takes the input $id - group id and $module - module name
returns the group information in an array format.


getUserName($userid)   X-Ref
Get the username by giving the user id.   This method expects the user id


getUserFullName($userid)   X-Ref
Get the user full name by giving the user id.   This method expects the user id
DG 30 Aug 2006


getURLstring($focus)   X-Ref
Creates and returns database query. To be used for search and other text links.   This method expects the module object.
param $focus - the module object contains the column vtiger_fields


getDisplayDate($cur_date_val)   X-Ref
Pas de description

getNewDisplayDate()   X-Ref
Pas de description

getDisplayCurrency()   X-Ref
Pas de description

convertToDollar($amount,$crate)   X-Ref
Pas de description

convertFromDollar($amount,$crate)   X-Ref
Pas de description

convertFromMasterCurrency($amount,$crate)   X-Ref
Pas de description

getCurrencySymbolandCRate($id)   X-Ref
Pas de description

getTermsandConditions()   X-Ref
Pas de description

getReminderSelectOption($start,$end,$fldname,$selvalue='')   X-Ref
Create select options in a dropdown list.  To be used inside
a reminder select statement in a vtiger_activity form.
param $start - start value
param $end - end value
param $fldname - vtiger_field name
param $selvalue - selected value


getListPrice($productid,$pbid)   X-Ref
Pas de description

br2nl($str)   X-Ref
Pas de description

make_clickable($text)   X-Ref
Pas de description

getBlocks($module,$disp_view,$mode,$col_fields='',$info_type='')   X-Ref
This function returns the vtiger_blocks and its related information for given module.
Input Parameter are $module - module name, $disp_view = display view (edit,detail or create),$mode - edit, $col_fields - * column vtiger_fields/
This function returns an array


getView($mode)   X-Ref
This function is used to get the display type.
Takes the input parameter as $mode - edit  (mostly)
This returns string type value


getBlockId($tabid,$label)   X-Ref
This function is used to get the blockid of the customblock for a given module.
Takes the input parameter as $tabid - module tabid and $label - custom label
This returns string type value


getHeaderArray()   X-Ref
This function is used to get the Parent and Child vtiger_tab relation array.
Takes no parameter and get the data from parent_tabdata.php and vtiger_tabdata.php
This returns array type value


getParentTabName($parenttabid)   X-Ref
This function is used to get the Parent Tab name for a given parent vtiger_tab id.
Takes the input parameter as $parenttabid - Parent vtiger_tab id
This returns value string type


getParentTabFromModule($module)   X-Ref
This function is used to get the Parent Tab name for a given module.
Takes the input parameter as $module - module name
This returns value string type


getParentTab()   X-Ref
This function is used to get the Parent Tab name for a given module.
Takes no parameter but gets the vtiger_parenttab value from form request
This returns value string type


updateInfo($id)   X-Ref
This function is used to get the days in between the current time and the modified time of an entity .
Takes the input parameter as $id - crmid  it will calculate the number of days in between the
the current time and the modified time from the vtiger_crmentity vtiger_table and return the result as a string.
The return format is updated <No of Days> day ago <(date when updated)>


getProductImages($id)   X-Ref
This function is used to get the Product Images for the given Product  .
It accepts the product id as argument and returns the Images with the script for
rotating the product Images


SaveImage($_FILES,$module,$id,$mode)   X-Ref
This function is used to save the Images .
It acceps the File lists,modulename,id and the mode as arguments
It returns the array details of the upload


file_exist_fn($filename,$exist)   X-Ref
This function is used to generate file name if more than one image with same name is added to a given Product.
Param $filename - product file name
Param $exist - number time the file name is repeated.


UserCount()   X-Ref
This function is used get the User Count.
It returns the array which has the total vtiger_users ,admin vtiger_users,and the non admin vtiger_users


mkdirs($dir, $mode = 0777, $recursive = true)   X-Ref
This function is used to create folders recursively.
Param $dir - directory name
Param $mode - directory access mode
Param $recursive - create directory recursive, default true


DefHomeView()   X-Ref
Pas de description

setObjectValuesFromRequest($focus)   X-Ref
This function is used to set the Object values from the REQUEST values.

param: object reference $focus - reference of the object

create_tab_data_file()   X-Ref
Function to write the tabid and name to a flat file vtiger_tabdata.txt so that the data
is obtained from the file instead of repeated queries
returns null


create_parenttab_data_file()   X-Ref
Function to write the vtiger_parenttabid and name to a flat file parent_tabdata.txt so that the data
is obtained from the file instead of repeated queries
returns null


getQuickCreateModules()   X-Ref
This function is used to get the all the modules that have Quick Create Feature.
Returns Tab Name and Tablabel.


QuickCreate($module)   X-Ref
This function is used to get the Quick create form vtiger_field parameters for a given module.
Param $module - module name
returns the value in array format


sendNotificationToOwner($module,$focus)   X-Ref
Pas de description

getUserslist()   X-Ref
Pas de description

getGroupslist()   X-Ref
Pas de description

Button_Check($module)   X-Ref
Function to Check for Security whether the Buttons are permitted in List/Edit/Detail View of all Modules

param: string $module -- module name

getEntityName($module, $ids_list)   X-Ref
Function to Check whether the User is allowed to delete a particular record from listview of each module using
mass delete button.

param: string $module -- module name
param: array $ids_list -- Record id

getAllParenttabmoduleslist()   X-Ref
Pas de description

decideFilePath()   X-Ref
This function is used to decide the File Storage Path in where we will upload the file in the server.
return string $filepath  - filepath inwhere the file should be stored in the server will be return


getModuleFileStoragePath($module)   X-Ref
This function is used to get the Path in where we store the vtiger_files based on the module.

param: string $module   - module name

validateImageFile($file_details)   X-Ref
This function is used to check whether the attached file is a image file or not

param: string $file_details  - vtiger_files array which contains all the uploaded file details

getTemplateDetails($templateid)   X-Ref
This function is used to get the Email Template Details like subject and content for particular template.

param: integer $templateid  - Template Id for an Email Template

getMergedDescription($description,$id,$parent_type)   X-Ref
This function is used to merge the Template Details with the email description

param: string $description  -body of the mail(ie template)
param: integer $tid  - Id of the entity
param: string $parent_type - module of the entity

getSingleFieldValue($tablename, $fieldname, $idname, $id)   X-Ref
Pas de description

get_announcements()   X-Ref
Pas de description

getConvertedPrice($price)   X-Ref
Pas de description

getConvertedPriceFromDollar($price)   X-Ref
Pas de description

getrecurringObjValue()   X-Ref
Function to get recurring info depending on the recurring type
return  $recurObj       - Object of class RecurringType




Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7