Example #1
0
 * 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 'include/database/PearDatabase.php';
require_once 'include/utils/CommonUtils.php';
require_once 'modules/PickList/PickListUtils.php';
global $app_strings, $app_list_strings, $current_language, $currentModule, $theme, $current_user;
if (!is_admin($current_user)) {
    echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
    echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>\n\t\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td rowspan='2' width='11%'><img src='" . vtiger_imageurl('denied.gif', $theme) . "' ></td>\n\t\t\t\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span class='genHeaderSmall'>{$app_strings['LBL_PERMISSION']}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='small' align='right' nowrap='nowrap'>\n\t\t\t\t\t\t<a href='javascript:window.history.back();'>{$app_strings['LBL_GO_BACK']}</a><br>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>";
    echo "</td></tr></table>";
    die;
}
$modules = getPickListModules();
if (!empty($_REQUEST['moduleName'])) {
    $fld_module = vtlib_purify($_REQUEST['moduleName']);
} else {
    $module = array_keys($modules);
    $fld_module = $module[0];
}
if (!empty($_REQUEST['roleid'])) {
    $roleid = vtlib_purify($_REQUEST['roleid']);
} else {
    $roleid = 'H2';
    //set default to CEO
}
if (!empty($_REQUEST['uitype'])) {
    $uitype = vtlib_purify($_REQUEST['uitype']);
}
Example #2
0
 public static function getPicklistSupportedModules()
 {
     vimport('~~/modules/PickList/PickListUtils.php');
     $modules = getPickListModules();
     $modulesModelsList = array();
     foreach ($modules as $moduleLabel => $moduleName) {
         $instance = new self();
         $instance->name = $moduleName;
         $instance->label = $moduleLabel;
         $modulesModelsList[] = $instance;
     }
     return $modulesModelsList;
 }
Example #3
0
require_once 'include/CRMSmarty.php';
require_once 'include/database/PearDatabase.php';
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $current_language, $currentModule;
if (isset($_REQUEST['fld_module']) && $_REQUEST['fld_module'] != '') {
    $fld_module = $_REQUEST['fld_module'];
} else {
    $fld_module = 'Accounts';
}
if (isset($_REQUEST['uitype']) && $_REQUEST['uitype'] != '') {
    $uitype = $_REQUEST['uitype'];
}
$smarty = new CRMSmarty();
$smarty->assign("MODULE_LISTS", getPickListModules());
$picklists_entries = getUserFldArray($fld_module);
if (sizeof($picklists_entries) % 3 != 0) {
    $value = sizeof($picklists_entries) + 3 - sizeof($picklists_entries) % 3;
} else {
    $value = sizeof($picklists_entries);
}
if ($fld_module == 'Events') {
    $temp_module_strings = return_module_language($current_language, 'Calendar');
} else {
    $temp_module_strings = return_module_language($current_language, $fld_module);
}
$smarty->assign("TEMP_MOD", $temp_module_strings);
if (is_array($picklists_entries) && count($picklists_entries) > 0) {
    $picklist_fields = array_chunk(array_pad($picklists_entries, $value, ''), 3);
}