本文整理汇总了PHP中Vtiger_Util_Helper::getAllSkins方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Util_Helper::getAllSkins方法的具体用法?PHP Vtiger_Util_Helper::getAllSkins怎么用?PHP Vtiger_Util_Helper::getAllSkins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Util_Helper
的用法示例。
在下文中一共展示了Vtiger_Util_Helper::getAllSkins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertIntoEntityTable
/** Function to insert values in the specifed table for the specified module
* @param $table_name -- table name:: Type varchar
* @param $module -- module:: Type varchar
*/
function insertIntoEntityTable($table_name, $module)
{
$log = vglobal('log');
$log->info("function insertIntoEntityTable " . $module . ' vtiger_table name ' . $table_name);
$adb = PearDatabase::getInstance();
$current_user = vglobal('current_user');
$insertion_mode = $this->mode;
//Checkin whether an entry is already is present in the vtiger_table to update
if ($insertion_mode == 'edit') {
$check_query = "select * from " . $table_name . " where " . $this->tab_name_index[$table_name] . "=?";
$check_result = $this->db->pquery($check_query, array($this->id));
$num_rows = $this->db->num_rows($check_result);
if ($num_rows <= 0) {
$insertion_mode = '';
}
}
// We will set the crypt_type based on the insertion_mode
$crypt_type = '';
if ($insertion_mode == 'edit') {
$update = '';
$update_params = array();
$tabid = getTabid($module);
$sql = "select * from vtiger_field where tabid=? and tablename=? and displaytype in (1,3,5) and vtiger_field.presence in (0,2)";
$params = array($tabid, $table_name);
} else {
$column = $this->tab_name_index[$table_name];
if ($column == 'id' && $table_name == 'vtiger_users') {
$currentuser_id = $this->db->getUniqueID("vtiger_users");
$this->id = $currentuser_id;
}
$qparams = array($this->id);
$tabid = getTabid($module);
$sql = "select * from vtiger_field where tabid=? and tablename=? and displaytype in (1,3,4,5) and vtiger_field.presence in (0,2)";
$params = array($tabid, $table_name);
$crypt_type = $this->DEFAULT_PASSWORD_CRYPT_TYPE;
}
$result = $this->db->pquery($sql, $params);
$noofrows = $this->db->num_rows($result);
for ($i = 0; $i < $noofrows; $i++) {
$fieldname = $this->db->query_result($result, $i, "fieldname");
$columname = $this->db->query_result($result, $i, "columnname");
$uitype = $this->db->query_result($result, $i, "uitype");
$typeofdata = $adb->query_result($result, $i, "typeofdata");
$typeofdata_array = explode("~", $typeofdata);
$datatype = $typeofdata_array[0];
if (isset($this->column_fields[$fieldname])) {
if ($uitype == 56) {
if ($this->column_fields[$fieldname] === 'on' || $this->column_fields[$fieldname] == 1) {
$fldvalue = 1;
} else {
$fldvalue = 0;
}
} elseif ($uitype == 15) {
if ($this->column_fields[$fieldname] == $app_strings['LBL_NOT_ACCESSIBLE']) {
//If the value in the request is Not Accessible for a picklist, the existing value will be replaced instead of Not Accessible value.
$sql = "select {$columname} from {$table_name} where " . $this->tab_name_index[$table_name] . "=?";
$res = $adb->pquery($sql, array($this->id));
$pick_val = $adb->query_result($res, 0, $columname);
$fldvalue = $pick_val;
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 5 || $uitype == 6 || $uitype == 23) {
if (isset($current_user->date_format)) {
$fldvalue = getValidDBInsertDateValue($this->column_fields[$fieldname]);
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 33) {
if (is_array($this->column_fields[$fieldname])) {
$field_list = implode(' |##| ', $this->column_fields[$fieldname]);
} else {
$field_list = $this->column_fields[$fieldname];
}
$fldvalue = $field_list;
} elseif ($uitype == 99) {
$plain_text = $this->column_fields[$fieldname];
$fldvalue = $this->encrypt_password($plain_text, $crypt_type);
// Update the plain-text value with encrypted value and dependent fields
$this->column_fields[$fieldname] = $fldvalue;
$this->column_fields['crypt_type'] = $crypt_type;
$this->column_fields['user_hash'] = $this->get_user_hash($plain_text);
} else {
$fldvalue = $this->column_fields[$fieldname];
$fldvalue = stripslashes($fldvalue);
}
$fldvalue = from_html($fldvalue, $insertion_mode == 'edit' ? true : false);
} else {
$fldvalue = '';
}
if ($uitype == 31) {
$themeList = array_keys(Vtiger_Util_Helper::getAllSkins());
if (!in_array($fldvalue, $themeList) || $fldvalue == '') {
global $default_theme;
if (!empty($default_theme) && in_array($default_theme, $themeList)) {
$fldvalue = $default_theme;
//.........这里部分代码省略.........
示例2: getAllSkins
/**
* Function to returns all skins(themes)
* @return <Array>
*/
public static function getAllSkins()
{
return Vtiger_Util_Helper::getAllSkins();
}