Пример #1
0
require_once 'Smarty_setup.php';
$tasklabel = getAllModulesWithDateFields();
$category = getParentTab($currentModule);
$smarty = new vtigerCRM_Smarty();
$smarty->assign('APP', $app_strings);
$smarty->assign('MOD', $mod_strings);
$Calendar4You = new Calendar4You();
$Calendar4You->GetDefPermission($current_user->id);
$Calendar4You->setgoogleaccessparams($current_user->id);
$Ch_Views = $Calendar4You->GetView();
if (count($Ch_Views) > 0) {
    $load_ch = true;
} else {
    $load_ch = false;
}
$Calendar_Settings = $Calendar4You->getSettings();
$smarty->assign('CALENDAR_SETTINGS', $Calendar_Settings);
$c_mod_strings = return_specified_module_language($current_language, "Calendar");
$smarty->assign('CMOD', $c_mod_strings);
$smarty->assign('MODULE', $currentModule);
// TODO: Update Single Module Instance name here.
$smarty->assign('SINGLE_MOD', 'SINGLE_' . $currentModule);
$smarty->assign('CATEGORY', $category);
$smarty->assign("THEME", $theme);
$smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
$smarty->assign('ID', $focus->id);
$smarty->assign('MODE', $focus->mode);
$viewBox = 'hourview';
if ($Calendar4You->CheckPermissions("EDIT")) {
    $smarty->assign('EDIT', 'permitted');
    $hour_startat = timeString(array('hour' => date('H:i', time() + 5 * 60), 'minute' => 0), '24');