本文整理汇总了PHP中TTDate类的典型用法代码示例。如果您正苦于以下问题:PHP TTDate类的具体用法?PHP TTDate怎么用?PHP TTDate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TTDate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: smarty_function_gettimeunit
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_gettimeunit($params, &$smarty)
{
$value = $params['value'];
$default = $params['default'];
$abs = $params['abs'];
//var_dump($default);
if ($default == 'TRUE') {
$default = 'N/A';
} elseif ($default == '0') {
if ($value === FALSE or $value === NULL) {
$value = 0;
}
} else {
$default = NULL;
}
if ($abs == 'TRUE') {
$value = abs($value);
}
//var_dump($value);
//Make sure the default is set to TRUE to get "N/A"
if ($value === FALSE or $value === NULL) {
return $default;
}
$retval = TTDate::getTimeUnit($value);
return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:function.gettimeunit.php
示例2: getHolidayDefaultData
/**
* Get default holiday data for creating new holidayes.
* @return array
*/
function getHolidayDefaultData()
{
$company_obj = $this->getCurrentCompanyObject();
Debug::Text('Getting holiday default data...', __FILE__, __LINE__, __METHOD__, 10);
$data = array('company_id' => $company_obj->getId(), 'date_stamp' => TTDate::getAPIDate('DATE', TTDate::getTime()));
return $this->returnHandler($data);
}
开发者ID:alachaum,项目名称:timetrex,代码行数:11,代码来源:APIHoliday.class.php
示例3: __construct
public function __construct()
{
global $db, $cache;
$this->tax_table_file = dirname(__FILE__) . '/CAPayrollDeductionTest2009.csv';
require_once Environment::getBasePath() . '/classes/payroll_deduction/PayrollDeduction.class.php';
TTDate::setTimeZone('PST');
}
开发者ID:alachaum,项目名称:timetrex,代码行数:7,代码来源:CAPayrollDeductionTest2009.php
示例4: __construct
public function __construct()
{
global $db, $cache;
require_once Environment::getBasePath() . '/classes/payroll_deduction/PayrollDeduction.class.php';
$this->company_id = PRIMARY_COMPANY_ID;
TTDate::setTimeZone('PST');
}
开发者ID:alachaum,项目名称:timetrex,代码行数:7,代码来源:USPayrollDeductionTest2006.php
示例5: getRecurringScheduleControlDefaultData
/**
* Get default recurring_schedule_control data for creating new recurring_schedule_controles.
* @return array
*/
function getRecurringScheduleControlDefaultData()
{
$company_obj = $this->getCurrentCompanyObject();
Debug::Text('Getting recurring_schedule_control default data...', __FILE__, __LINE__, __METHOD__, 10);
$data = array('company_id' => $company_obj->getId(), 'start_week' => 1, 'start_date' => TTDate::getAPIDate('DATE', TTDate::getBeginWeekEpoch(TTDate::getTime())), 'end_date' => NULL);
return $this->returnHandler($data);
}
开发者ID:alachaum,项目名称:timetrex,代码行数:11,代码来源:APIRecurringScheduleControl.class.php
示例6: parse_effective_date
function parse_effective_date($input, $default_value = NULL, $parse_hint = NULL)
{
if (isset($parse_hint) and $parse_hint != '') {
TTDate::setDateFormat($parse_hint);
}
return TTDate::parseDateTime($input);
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:7,代码来源:import_ps_amendment.php
示例7: getPayrollDeductionObject
function getPayrollDeductionObject()
{
if (!isset($this->payroll_deduction_obj)) {
require_once Environment::getBasePath() . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'payroll_deduction' . DIRECTORY_SEPARATOR . 'PayrollDeduction.class.php';
$this->payroll_deduction_obj = new PayrollDeduction('CA', NULL);
$this->payroll_deduction_obj->setDate(TTDate::getTimeStamp($this->year, 12, 31));
}
return $this->payroll_deduction_obj;
}
开发者ID:alachaum,项目名称:timetrex,代码行数:9,代码来源:t4.class.php
示例8: getDateStamp
function getDateStamp($raw = FALSE)
{
if (isset($this->data['date_stamp'])) {
if ($raw === TRUE) {
return $this->data['date_stamp'];
} else {
return TTDate::strtotime($this->data['date_stamp']);
}
}
return FALSE;
}
开发者ID:alachaum,项目名称:timetrex,代码行数:11,代码来源:CompanyUserCountFactory.class.php
示例9: __construct
public function __construct()
{
global $db, $cache;
require_once '../includes/global.inc.php';
require_once Environment::getBasePath() . '/classes/payroll_deduction/PayrollDeduction.class.php';
$profiler = new Profiler(true);
Debug::setBufferOutput(FALSE);
Debug::setEnable(TRUE);
TTDate::setTimeZone('PST');
if (PRODUCTION != FALSE) {
echo "DO NOT RUN ON A PRODUCTION SERVER<br>\n";
exit;
}
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:14,代码来源:CAPayrollDeductionTest2006.php
示例10: setCrumb
static function setCrumb($name, $url = NULL)
{
global $db, $current_user;
//
// If bread crumbs "seem" like they are getting overwritten, make sure the
// setCrumb function is being called ONLY in the default section of the switch statement. NOT THE TOP.
//
if ($url == '') {
$url = $_SERVER['REQUEST_URI'];
}
if (!is_object($current_user)) {
return FALSE;
}
Debug::text('Dropping Bread Crumb: ' . $name . ' URL: ' . $url, __FILE__, __LINE__, __METHOD__, 10);
$ph = array('user_id' => $current_user->getId(), 'name' => $name);
//Determine if we should update or insert bread crumb.
$query = 'select name
FROM bread_crumb
WHERE user_id = ?
AND name = ?
LIMIT 1';
try {
$rs = $db->Execute($query, $ph);
} catch (Exception $e) {
throw new DBError($e);
}
if ($rs->RecordCount() == 1) {
$ph = array('url' => $url, 'created_date' => TTDate::getTime(), 'user_id' => $current_user->getId(), 'name' => $name);
$query = 'UPDATE bread_crumb
SET url = ?,
created_date = ?
WHERE user_id = ?
AND name = ?';
} else {
$ph = array('user_id' => $current_user->getId(), 'name' => $name, 'url' => $url, 'created_date' => TTDate::getTime());
$query = 'insert into bread_crumb (user_id,name,url,created_date)
VALUES(
?,
?,
?,
?
)';
}
try {
$db->Execute($query, $ph);
} catch (Exception $e) {
throw new DBError($e);
}
return TRUE;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:50,代码来源:BreadCrumb.class.php
示例11: getROEDefaultData
/**
* Get default roe data for creating new roe.
* @return array
*/
function getROEDefaultData($user_id = NULL)
{
$company_obj = $this->getCurrentCompanyObject();
if ($user_id > 0) {
//Debug::Text('Current User Id: '.$user_id, __FILE__, __LINE__, __METHOD__,10);
$rf = new ROEFactory();
$first_date = $rf->calculateFirstDate($user_id);
$last_date = $rf->calculateLastDate($user_id);
$pay_period = $rf->calculatePayPeriodType($user_id, $last_date);
Debug::Text('Getting roe default data...', __FILE__, __LINE__, __METHOD__, 10);
$data = array('company_id' => $company_obj->getId(), 'user_id' => $user_id, 'pay_period_type_id' => $pay_period['pay_period_type_id'], 'first_date' => TTDate::getAPIDate('DATE', $first_date), 'last_date' => TTDate::getAPIDate('DATE', $last_date), 'pay_period_end_date' => TTDate::getAPIDate('DATE', $pay_period['pay_period_end_date']));
} else {
$data = array('company_id' => $company_obj->getId());
}
return $this->returnHandler($data);
}
开发者ID:alachaum,项目名称:timetrex,代码行数:20,代码来源:APIROE.class.php
示例12: postInstall
function postInstall()
{
Debug::text('postInstall: ' . $this->getVersion(), __FILE__, __LINE__, __METHOD__, 9);
//New Pay Period Schedule format, update any current schedules.
$ppslf = new PayPeriodScheduleListFactory();
$ppslf->getAll();
Debug::text('Found Pay Period Schedules: ' . $ppslf->getRecordCount(), __FILE__, __LINE__, __METHOD__, 9);
if ($ppslf->getRecordCount() > 0) {
foreach ($ppslf as $pps_obj) {
if ($pps_obj->getType() == 10 or $pps_obj->getType() == 20) {
$pps_obj->setStartDayOfWeek(TTDate::getDayOfWeek(TTDate::strtotime($pps_obj->getColumn('anchor_date'))));
$pps_obj->setTransactionDate(floor((TTDate::strtotime($pps_obj->getColumn('primary_transaction_date')) - TTDate::strtotime($pps_obj->getColumn('primary_date'))) / 86400) + 1);
} elseif ($pps_obj->getType() == 30) {
$pps_obj->setPrimaryDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('anchor_date'))) + 1);
if ($pps_obj->getColumn('primary_transaction_date_ldom') == 1) {
$pps_obj->setPrimaryTransactionDayOfMonth(-1);
} else {
$pps_obj->setPrimaryTransactionDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('primary_transaction_date'))));
}
$pps_obj->setSecondaryDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('primary_date'))));
if ($pps_obj->getColumn('secondary_transaction_date_ldom') == 1) {
$pps_obj->setSecondaryTransactionDayOfMonth(-1);
} else {
$pps_obj->setSecondaryTransactionDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('secondary_transaction_date'))));
}
} elseif ($pps_obj->getType() == 50) {
$pps_obj->setPrimaryDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('anchor_date'))));
if ($pps_obj->getColumn('primary_transaction_date_ldom') == 1) {
$pps_obj->setPrimaryTransactionDayOfMonth(-1);
} else {
$pps_obj->setPrimaryTransactionDayOfMonth(TTDate::getDayOfMonth(TTDate::strtotime($pps_obj->getColumn('primary_transaction_date'))));
}
}
if ($pps_obj->getColumn('transaction_date_bd') == 1 or $pps_obj->getColumn('secondary_transaction_date_bd') == 1) {
$pps_obj->setTransactionDateBusinessDay(TRUE);
}
if ($pps_obj->isValid()) {
$pps_obj->Save();
}
}
}
return TRUE;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:43,代码来源:InstallSchema_1007A.class.php
示例13: smarty_function_getDate
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
function smarty_function_getDate($params, &$smarty)
{
$type = $params['type'];
$epoch = $params['epoch'];
$nodst = $params['nodst'];
//var_dump($epoch);
//echo "Epoch: $epoch<br>\n";
$default = $params['default'];
//var_dump($default);
if ($default == 'TRUE') {
$default = '--';
} else {
$default = NULL;
}
if ((int) $epoch == 0) {
return $default;
}
$retval = TTDate::getDate($type, $epoch, $nodst);
return $retval;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:25,代码来源:function.getdate.php
示例14: isActiveLengthOfService
function isActiveLengthOfService($u_obj, $epoch)
{
if ($this->getMinimumLengthOfServiceUnit() == 50 or $this->getMaximumLengthOfServiceUnit() == 50) {
//Hour based length of service, get users hours up until this period.
$worked_time = TTDate::getHours($this->getWorkedTimeByUserIdAndEndDate($u_obj->getId(), $epoch));
Debug::Text(' Worked Time: ' . $worked_time . 'hrs', __FILE__, __LINE__, __METHOD__, 10);
}
$employed_days = TTDate::getDays($epoch - $u_obj->getHireDate());
Debug::Text(' Employed Days: ' . $employed_days, __FILE__, __LINE__, __METHOD__, 10);
$minimum_length_of_service_result = FALSE;
$maximum_length_of_service_result = FALSE;
//Check minimum length of service
if ($this->getMinimumLengthOfService() == 0 or $this->getMinimumLengthOfServiceUnit() == 50 and $worked_time >= $this->getMinimumLengthOfService() or $this->getMinimumLengthOfServiceUnit() != 50 and $employed_days >= $this->getMinimumLengthOfServiceDays()) {
$minimum_length_of_service_result = TRUE;
}
//Check maximum length of service.
if ($this->getMaximumLengthOfService() == 0 or $this->getMaximumLengthOfServiceUnit() == 50 and $worked_time <= $this->getMaximumLengthOfService() or $this->getMaximumLengthOfServiceUnit() != 50 and $employed_days <= $this->getMaximumLengthOfServiceDays()) {
$maximum_length_of_service_result = TRUE;
}
Debug::Text(' Min Result: : ' . (int) $minimum_length_of_service_result . ' Max Result: ' . (int) $maximum_length_of_service_result, __FILE__, __LINE__, __METHOD__, 10);
if ($minimum_length_of_service_result == TRUE and $maximum_length_of_service_result == TRUE) {
return TRUE;
}
return FALSE;
}
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:25,代码来源:CompanyDeductionFactory.class.php
示例15: getObjectAsArray
function getObjectAsArray($include_columns = NULL, $permission_children_ids = FALSE)
{
$uf = TTnew('UserFactory');
$variable_function_map = $this->getVariableToFunctionMap();
if (is_array($variable_function_map)) {
foreach ($variable_function_map as $variable => $function_stub) {
if ($include_columns == NULL or isset($include_columns[$variable]) and $include_columns[$variable] == TRUE) {
$function = 'get' . $function_stub;
switch ($variable) {
case 'first_name':
case 'last_name':
if ($this->getColumn('user_id') > 0) {
$data[$variable] = $this->getColumn($variable);
} else {
$data[$variable] = TTi18n::getText('OPEN');
}
break;
case 'user_id':
//Make sure getUser() returns the proper user_id, otherwise mass edit will always assign shifts to OPEN employee.
//We have to make sure the 'user_id' function map is FALSE as well, so we don't get a SQL error when getting the empty record set.
$data[$variable] = $this->tmp_data['user_id'] = $this->getColumn($variable);
break;
case 'user_status_id':
case 'group_id':
case 'group':
case 'title_id':
case 'title':
case 'default_branch_id':
case 'default_branch':
case 'default_department_id':
case 'default_department':
case 'schedule_policy_id':
case 'schedule_policy':
case 'pay_period_id':
case 'branch':
case 'department':
case 'job':
case 'job_item':
$data[$variable] = $this->getColumn($variable);
break;
case 'status':
$function = 'get' . $variable;
if (method_exists($this, $function)) {
$data[$variable] = Option::getByKey($this->{$function}(), $this->getOptions($variable));
}
break;
case 'user_status':
$data[$variable] = Option::getByKey((int) $this->getColumn('user_status_id'), $uf->getOptions('status'));
break;
case 'date_stamp':
$data[$variable] = TTDate::getAPIDate('DATE', strtotime($this->getColumn('date_stamp')));
break;
case 'start_date_stamp':
$data[$variable] = TTDate::getAPIDate('DATE', $this->getStartTime());
//Include both date+time
break;
case 'start_date':
$data[$variable] = TTDate::getAPIDate('DATE+TIME', $this->getStartTime());
//Include both date+time
break;
case 'end_date':
$data[$variable] = TTDate::getAPIDate('DATE+TIME', $this->getEndTime());
//Include both date+time
break;
case 'start_time_stamp':
$data[$variable] = $this->getStartTime();
//Include start date/time in epoch format for sorting...
break;
case 'end_time_stamp':
$data[$variable] = $this->getEndTime();
//Include end date/time in epoch format for sorting...
break;
case 'start_time':
case 'end_time':
if (method_exists($this, $function)) {
$data[$variable] = TTDate::getAPIDate('TIME', $this->{$function}());
//Just include time, so Mass Edit sees similar times without dates
}
break;
default:
if (method_exists($this, $function)) {
$data[$variable] = $this->{$function}();
}
break;
}
}
}
$this->getPermissionColumns($data, $this->getColumn('user_id'), $this->getCreatedBy(), $permission_children_ids, $include_columns);
$this->getCreatedAndUpdatedColumns($data, $include_columns);
}
return $data;
}
开发者ID:alachaum,项目名称:timetrex,代码行数:92,代码来源:ScheduleFactory.class.php
示例16: array
if (!($data['start_full_time_stamp'] != '' and $data['end_full_time_stamp'] != '' and $data['start_full_time_stamp'] >= time() - 86400 * 365 and $data['end_full_time_stamp'] <= time() + 86400 * 365)) {
$sf->Validator->isTrue('date_stamp', FALSE, TTi18n::getText('Start or End dates are invalid'));
}
if ($sf->Validator->isValid()) {
Redirect::Page(URLBuilder::getURL(array('action' => 'add_mass_schedule', 'filter_user_id' => $filter_user_id, 'data' => $data), '../progress_bar/ProgressBarControl.php'));
}
default:
if ($action != 'submit' and !is_array($data)) {
Debug::Text(' ID was NOT passed: ' . $id, __FILE__, __LINE__, __METHOD__, 10);
$user_id = NULL;
$user_date_id = NULL;
$user_full_name = NULL;
$user_default_branch = NULL;
$user_default_department = NULL;
$pay_period_is_locked = FALSE;
$time_stamp = $start_date_stamp = $end_date_stamp = TTDate::getBeginDayEpoch(TTDate::getTime()) + 3600 * 12;
//Noon
$data = array('start_date_stamp' => $start_date_stamp, 'end_date_stamp' => $end_date_stamp, 'start_time' => strtotime('08:00 AM'), 'parsed_start_time' => strtotime('08:00 AM'), 'end_time' => strtotime('05:00 PM'), 'parsed_end_time' => strtotime('05:00 PM'), 'total_time' => 3600 * 9, 'branch_id' => $user_default_branch, 'department_id' => $user_default_department, 'dow' => array(1 => TRUE, 2 => TRUE, 3 => TRUE, 4 => TRUE, 5 => TRUE));
}
//var_dump($data);
$ulf = TTnew('UserListFactory');
$ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
$src_user_options = UserListFactory::getArrayByListFactory($ulf, FALSE, FALSE);
$user_options = Misc::arrayDiffByKey((array) $filter_user_id, $src_user_options);
$filter_user_options = Misc::arrayIntersectByKey((array) $filter_user_id, $src_user_options);
$prepend_array_option = array(0 => '--', -1 => TTi18n::gettext('-- Default --'));
$splf = TTnew('SchedulePolicyListFactory');
$schedule_policy_options = $splf->getByCompanyIdArray($current_company->getId());
$aplf = TTnew('AbsencePolicyListFactory');
$absence_policy_options = $aplf->getByCompanyIdArray($current_company->getId());
$blf = TTnew('BranchListFactory');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:AddMassSchedule.php
示例17: parse_wage_weekly_time
function parse_wage_weekly_time($input, $default_value = NULL, $parse_hint = NULL)
{
if (isset($parse_hint) and $parse_hint != '') {
TTDate::setTimeUnitFormat($parse_hint);
}
$retval = TTDate::parseTimeUnit($input);
return $retval;
}
开发者ID:alachaum,项目名称:timetrex,代码行数:8,代码来源:ImportUser.class.php
示例18: getUserDefaultData
/**
* Get default user data for creating new users.
* @return array
*/
function getUserDefaultData($tmp_company_id = NULL)
{
//Allow getting default data from other companies, so it makes it easier to create the first employee of a company.
if ($tmp_company_id != '' and $tmp_company_id > 0 and $this->getPermissionObject()->Check('company', 'enabled') and $this->getPermissionObject()->Check('company', 'view')) {
$company_id = $tmp_company_id;
} else {
$company_id = $this->getCurrentCompanyObject()->getId();
}
Debug::Text('Getting user default data for Company ID: ' . $company_id . ' TMP Company ID: ' . $tmp_company_id, __FILE__, __LINE__, __METHOD__, 10);
//Get New Hire Defaults.
$udlf = TTnew('UserDefaultListFactory');
$udlf->getByCompanyId($company_id);
if ($udlf->getRecordCount() > 0) {
Debug::Text('Using User Defaults, as they exist...', __FILE__, __LINE__, __METHOD__, 10);
$udf_obj = $udlf->getCurrent();
$data = array('company_id' => $company_id, 'status_id' => 10, 'title_id' => $udf_obj->getTitle(), 'employee_number' => UserFactory::getNextAvailableEmployeeNumber($company_id), 'city' => $udf_obj->getCity(), 'country' => $udf_obj->getCountry(), 'province' => $udf_obj->getProvince(), 'work_phone' => $udf_obj->getWorkPhone(), 'work_phone_ext' => $udf_obj->getWorkPhoneExt(), 'work_email' => $udf_obj->getWorkEmail(), 'hire_date' => TTDate::getAPIDate('DATE', $udf_obj->getHireDate()), 'sex_id' => 5, 'default_branch_id' => $udf_obj->getDefaultBranch(), 'default_department_id' => $udf_obj->getDefaultDepartment(), 'permission_control_id' => $udf_obj->getPermissionControl(), 'pay_period_schedule_id' => $udf_obj->getPayPeriodSchedule(), 'policy_group_id' => $udf_obj->getPolicyGroup(), 'currency_id' => $udf_obj->getCurrency());
}
if (!isset($data['company_id'])) {
$data['company_id'] = $company_id;
}
if (!isset($data['country'])) {
$data['country'] = 'US';
}
$ulf = TTnew('UserListFactory');
$ulf->getHighestEmployeeNumberByCompanyId($company_id);
if ($ulf->getRecordCount() > 0) {
Debug::Text('Highest Employee Number: ' . $ulf->getCurrent()->getEmployeeNumber(), __FILE__, __LINE__, __METHOD__, 10);
if (is_numeric($ulf->getCurrent()->getEmployeeNumber()) == TRUE) {
$data['next_available_employee_number'] = $ulf->getCurrent()->getEmployeeNumber() + 1;
} else {
Debug::Text('Highest Employee Number is not an integer.', __FILE__, __LINE__, __METHOD__, 10);
$data['next_available_employee_number'] = NULL;
}
} else {
$data['next_available_employee_number'] = 1;
}
if (!isset($data['hire_date']) or $data['hire_date'] == '') {
$data['hire_date'] = TTDate::getAPIDate('DATE', time());
}
return $this->returnHandler($data);
}
开发者ID:alachaum,项目名称:timetrex,代码行数:45,代码来源:APIUser.class.php
示例19: foreach
//Sort Branches/Departments first
foreach ($tmp_schedule_shifts as $day_epoch => $day_tmp_schedule_shift) {
ksort($day_tmp_schedule_shift);
$tmp_schedule_shifts[$day_epoch] = $day_tmp_schedule_shift;
foreach ($day_tmp_schedule_shift as $branch => $department_schedule_shifts) {
ksort($tmp_schedule_shifts[$day_epoch][$branch]);
}
}
//Sort each department by start time.
foreach ($tmp_schedule_shifts as $day_epoch => $day_tmp_schedule_shift) {
foreach ($day_tmp_schedule_shift as $branch => $department_schedule_shifts) {
foreach ($department_schedule_shifts as $department => $department_schedule_shift) {
//var_dump($department_schedule_shift);
$schedule_shifts[$day_epoch][$branch][$department] = Sort::multiSort($department_schedule_shift, 'start_time', 'last_name');
}
}
}
}
//print_r($schedule_shift_totals);
$calendar_array = TTDate::getCalendarArray($start_date, $end_date, $current_user_prefs->getStartWeekDay(), FALSE);
$smarty->assign_by_ref('calendar_array', $calendar_array);
$hlf = TTnew('HolidayListFactory');
$holiday_array = $hlf->getArrayByPolicyGroupUserId($user_ids, $start_date, $end_date);
$smarty->assign_by_ref('holidays', $holiday_array);
$smarty->assign_by_ref('schedule_shifts', $schedule_shifts);
$smarty->assign_by_ref('schedule_shift_totals', $schedule_shift_totals);
$smarty->assign_by_ref('do', $do);
break;
}
Debug::writeToLog();
$smarty->display('schedule/ViewScheduleWeek.tpl');
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:ViewScheduleWeek.php
示例20: foreach
}
//var_dump($rows);
foreach ($filter_data['column_ids'] as $column_key) {
$filter_columns[Misc::trimSortPrefix($column_key)] = $columns[$column_key];
}
if ($action == 'export') {
if (isset($rows) and isset($filter_columns)) {
Debug::Text('Exporting as CSV', __FILE__, __LINE__, __METHOD__, 10);
$data = Misc::Array2CSV($rows, $filter_columns);
Misc::FileDownloadHeader('report.csv', 'application/csv', strlen($data));
echo $data;
} else {
echo TTi18n::gettext("No Data To Export!") . "<br>\n";
}
} else {
$smarty->assign_by_ref('generated_time', TTDate::getTime());
$smarty->assign_by_ref('pay_period_options', $pay_period_options);
$smarty->assign_by_ref('filter_data', $filter_data);
$smarty->assign_by_ref('columns', $filter_columns);
$smarty->assign_by_ref('rows', $rows);
$smarty->display('report/TimesheetSummaryReport.tpl');
}
break;
case 'delete':
case 'save':
Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
$generic_data['id'] = UserGenericDataFactory::reportFormDataHandler($action, $filter_data, $generic_data, URLBuilder::getURL(NULL, $_SERVER['SCRIPT_NAME']));
unset($generic_data['name']);
default:
BreadCrumb::setCrumb($title);
if ($action == 'load') {
开发者ID:alachaum,项目名称:timetrex,代码行数:31,代码来源:TimesheetSummary.php
注:本文中的TTDate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论