<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.16.3428 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.16.3429 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
require_once('../initialize.php');
-$errors->add($i18n->getKey('error.access_denied'));
+$errors->add($i18n->getKey('error.access_denied'));
if ($auth->isAuthenticated()) $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display.
$smarty->assign('title', $i18n->getKey('label.error'));
}
else if ($user->isClient()) {
header('Location: ../reports.php');
- exit();
+ exit();
}
}
// Redirect to time.php or mobile/time.php for other roles.
// Validate user input.
if (!ttValidString($cl_login)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.login'));
if (!ttValidString($cl_password)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.password'));
-
+
if ($errors->isEmpty()) {
// Use the "limit" plugin if we have one. Ignore include errors.
// The "limit" plugin is not required for normal operation of the Time Tracker.
@include('../plugins/limit/access_check.php');
-
+
if ($auth->doLogin($cl_login, $cl_password)) {
// Set current user date (as determined by user browser) into session.
// Remember user login in a cookie.
setcookie('tt_login', $cl_login, time() + COOKIE_EXPIRE, '/');
-
+
$user = new ttUser(null, $auth->getUserId());
// Redirect, depending on user role.
if ($user->isAdmin()) {
}
else if ($user->isClient()) {
header('Location: ../reports.php');
- exit();
+ exit();
}
else {
header('Location: time.php');
} else
$errors->add($i18n->getKey('error.auth'));
}
-}
+} // POST
if(!isTrue(MULTITEAM_MODE) && !ttTeamHelper::getTeams())
$errors->add($i18n->getKey('error.no_teams'));
if(!$cl_date)
$cl_date = $selected_date->toString(DB_DATEFORMAT);
$_SESSION['date'] = $cl_date;
-
+
// Determine previous and next dates for simple navigation.
$prev_date = date('Y-m-d', strtotime('-1 day', strtotime($cl_date)));
$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date)));
'value'=>$cl_client,
'data'=>$active_clients,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Note: in other modes the client list is filtered to relevant clients only. See below.
}
'value'=>$cl_project,
'data'=>$project_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Dropdown for clients if the clients plugin is enabled.
if (in_array('cl', explode(',', $user->plugins))) {
'value'=>$cl_client,
'data'=>$client_list,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
}
'value'=>$cl_task,
'data'=>$task_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) {
$form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');"));
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
$form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('finish')->setEnable(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
$form->addInput(array('type'=>'checkbox','name'=>'billable','data'=>1,'value'=>$cl_billable));
$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_submit click.
$form->addInput(array('type'=>'submit','name'=>'btn_submit','onclick'=>'browser_today.value=get_date()','value'=>$i18n->getKey('button.submit')));
-
+
// If we have custom fields - add controls for them.
if ($custom_fields && $custom_fields->fields[0]) {
// Only one custom field is supported at this time.
if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) {
- $form->addInput(array('type'=>'text','name'=>'cf_1','value'=>$cl_cf_1));
+ $form->addInput(array('type'=>'text','name'=>'cf_1','value'=>$cl_cf_1));
} else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) {
$form->addInput(array('type'=>'combobox','name'=>'cf_1',
'style'=>'width: 250px;',
'value'=>$cl_cf_1,
'data'=>$custom_fields->options,
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
}
$errors->add($i18n->getKey('error.interval'), $i18n->getKey('label.finish'), $i18n->getKey('label.start'));
}
} else {
- if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) {
+ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) {
$errors->add($i18n->getKey('error.empty'), $i18n->getKey('label.start'));
$errors->add($i18n->getKey('error.empty'), $i18n->getKey('label.finish'));
- }
+ }
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$errors->add($i18n->getKey('error.empty'), $i18n->getKey('label.duration'));
}
}
if (!ttValidString($cl_note, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.note'));
// Finished validating user input.
-
+
// Prohibit creating entries in future.
if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$errors->add($i18n->getKey('error.future_date'));
}
-
+
// Prohibit creating time entries in locked interval.
if($lockdate && $selected_date->before($lockdate))
$errors->add($i18n->getKey('error.period_locked'));
-
+
// Prohibit creating another uncompleted record.
if ($errors->isEmpty()) {
if (($not_completed_rec = ttTimeHelper::getUncompleted($user->getActiveUser())) && (($cl_finish == '') && ($cl_duration == '')))
$errors->add($i18n->getKey('error.uncompleted_exists')." <a href = 'time_edit.php?id=".$not_completed_rec['id']."'>".$i18n->getKey('error.goto_uncompleted')."</a>");
}
-
+
// Prohibit creating an overlapping record.
if ($errors->isEmpty()) {
if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish))
$errors->add($i18n->getKey('error.overlap'));
- }
-
+ }
+
if ($errors->isEmpty()) {
$id = ttTimeHelper::insert(array(
'date' => $cl_date,
'duration' => $cl_duration,
'note' => $cl_note,
'billable' => $cl_billable));
-
+
// Insert a custom field if we have it.
$result = true;
if ($id && $custom_fields && $cl_cf_1) {
$errors->add($i18n->getKey('error.db'));
}
}
-}
+} // POST
$smarty->assign('next_date', $next_date);
$smarty->assign('prev_date', $prev_date);
$smarty->assign('title', $i18n->getKey('title.time'));
$smarty->assign('content_page_name', 'mobile/time.tpl');
$smarty->display('mobile/index.tpl');
-?>
\ No newline at end of file
// Prohibit deleting invoiced records.
if ($time_rec['invoice_id']) die($i18n->getKey('error.sys'));
-
+
// Escape comment for presentation.
$time_rec['comment'] = htmlspecialchars($time_rec['comment']);
-
+
if ($request->getMethod() == 'POST') {
if ($request->getParameter('delete_button')) { // Delete button pressed.
-
+
// Determine if it's okay to delete the record.
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
}
// Determine if the record is uncompleted.
$uncompleted = ($time_rec['duration'] == '0:00');
-
+
if($lockdate && $item_date->before($lockdate) && !$uncompleted) {
$errors->add($i18n->getKey('error.period_locked'));
}
-
+
if ($errors->isEmpty()) {
-
+
// Delete the record.
$result = ttTimeHelper::delete($cl_id, $user->getActiveUser());
}
}
if ($request->getParameter('cancel_button')) { // Cancel button pressed.
- header('Location: time.php');
- exit();
+ header('Location: time.php');
+ exit();
}
-}
-
+} // POST
+
$form = new Form('timeRecordForm');
$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
$form->addInput(array('type'=>'submit','name'=>'delete_button','value'=>$i18n->getKey('label.delete')));
if ($time_rec['invoice_id']) die($i18n->getKey('error.sys'));
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
-
+
// Initialize variables.
$cl_start = $cl_finish = $cl_duration = $cl_date = $cl_note = $cl_project = $cl_task = $cl_billable = null;
if ($request->getMethod() == 'POST') {
$cl_start = $time_rec['start'];
$cl_finish = $time_rec['finish'];
$cl_duration = $time_rec['duration'];
- $cl_date = $item_date->toString($user->date_format);
+ $cl_date = $item_date->toString($user->date_format);
$cl_note = $time_rec['comment'];
-
+
// If we have custom fields - obtain values for them.
if ($custom_fields) {
// Get custom field value for time record.
- $fields = $custom_fields->get($time_rec['id']);
- if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT)
+ $fields = $custom_fields->get($time_rec['id']);
+ if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT)
$cl_cf_1 = $fields[0]['value'];
else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN)
$cl_cf_1 = $fields[0]['option_id'];
}
-
+
$cl_billable = $time_rec['billable'];
-
+
// Add an info message to the form if we are editing an uncompleted record.
if (($cl_start == $cl_finish) && ($cl_duration == '0:00')) {
$cl_finish = '';
$messages->add($i18n->getKey('form.time_edit.uncompleted'));
}
}
-
+
// Initialize elements of 'timeRecordForm'.
$form = new Form('timeRecordForm');
'value'=>$cl_client,
'data'=>$active_clients,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Note: in other modes the client list is filtered to relevant clients only. See below.
}
'value'=>$cl_project,
'data'=>$project_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Dropdown for clients if the clients plugin is enabled.
if (in_array('cl', explode(',', $user->plugins))) {
$active_clients = ttTeamHelper::getActiveClients($user->team_id, true);
- // We need an array of assigned project ids to do some trimming.
+ // We need an array of assigned project ids to do some trimming.
foreach($project_list as $project)
$projects_assigned_to_user[] = $project['id'];
'value'=>$cl_client,
'data'=>$client_list,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
}
'value'=>$cl_task,
'data'=>$task_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
-
+
// Add other controls.
if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type)) {
$form->addInput(array('type'=>'text','name'=>'start','value'=>$cl_start,'onchange'=>"formDisable('start');"));
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
$form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('finish')->setEnable(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
if ($custom_fields && $custom_fields->fields[0]) {
// Only one custom field is supported at this time.
if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) {
- $form->addInput(array('type'=>'text','name'=>'cf_1','value'=>$cl_cf_1));
+ $form->addInput(array('type'=>'text','name'=>'cf_1','value'=>$cl_cf_1));
} else if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) {
$form->addInput(array('type'=>'combobox',
'name'=>'cf_1',
'style'=>'width: 250px;',
'value'=>$cl_cf_1,
'data'=>$custom_fields->options,
- 'empty' => array('' => $i18n->getKey('dropdown.select'))
- ));
+ 'empty' => array('' => $i18n->getKey('dropdown.select'))));
}
}
// Hidden control for record id.
if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $errors->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']);
}
if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- if (!$cl_project) $errors->add($i18n->getKey('error.project'));
+ if (!$cl_project) $errors->add($i18n->getKey('error.project'));
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
if (!$cl_task) $errors->add($i18n->getKey('error.task'));
if (!ttValidDate($cl_date)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.date'));
if (!ttValidString($cl_note, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.note'));
// Finished validating user input.
-
+
// Determine lock date.
$lock_interval = $user->lock_interval;
$lockdate = 0;
// This is a new date for the time record.
$new_date = new DateAndTime($user->date_format, $cl_date);
-
+
// Prohibit creating entries in future.
if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
// 1) Prohibit saving locked time entries in any form.
// 2) Prohibit saving completed unlocked entries into locked interval.
// 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists.
-
+
// Now, step by step.
if ($errors->isEmpty()) {
// 1) Prohibit saving locked time entries in any form.
if($lockdate && $item_date->before($lockdate))
- $errors->add($i18n->getKey('error.period_locked'));
+ $errors->add($i18n->getKey('error.period_locked'));
// 2) Prohibit saving completed unlocked entries into locked interval.
if($errors->isEmpty() && $lockdate && $new_date->before($lockdate))
- $errors->add($i18n->getKey('error.period_locked'));
+ $errors->add($i18n->getKey('error.period_locked'));
// 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists.
$uncompleted = ($cl_finish == '' && $cl_duration == '');
if ($uncompleted) {
}
}
}
-
+
// Prohibit creating an overlapping record.
if ($errors->isEmpty()) {
if (ttTimeHelper::overlaps($user->getActiveUser(), $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish, $cl_id))
'duration'=>$cl_duration,
'note'=>$cl_note,
'billable'=>$cl_billable));
-
+
// If we have custom fields - update values.
if ($res && $custom_fields) {
if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT)
}
}
}
-
+
if ($request->getParameter('btn_delete')) {
header("Location: time_delete.php?id=$cl_id");
exit();
}
-} // End of if ($request->getMethod() == 'POST')
+} // POST
$smarty->assign('client_list', $client_list);
$smarty->assign('project_list', $project_list);
$smarty->assign('title', $i18n->getKey('title.edit_time_record'));
$smarty->assign('content_page_name', 'mobile/time_edit.tpl');
$smarty->display('mobile/index.tpl');
-?>
\ No newline at end of file
$cl_date = $selected_date->toString(DB_DATEFORMAT);
$_SESSION['date'] = $cl_date;
// TODO: for time page we may limit the day to today only.
-
+
// Use custom fields plugin if it is enabled.
if (in_array('cf', explode(',', $user->plugins))) {
require_once('../plugins/CustomFields.class.php');
'value'=>$cl_client,
'data'=>$active_clients,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Note: in other modes the client list is filtered to relevant clients only. See below.
}
'value'=>$cl_project,
'data'=>$project_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
// Dropdown for clients if the clients plugin is enabled.
if (in_array('cl', explode(',', $user->plugins))) {
// Build a client list out of active clients. Use only clients that are relevant to user.
// Also trim their associated project list to only assigned projects (to user).
foreach($active_clients as $client) {
- $projects_assigned_to_client = explode(',', $client['projects']);
- $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user);
- if ($intersection) {
- $client['projects'] = implode(',', $intersection);
- $client_list[] = $client;
- }
+ $projects_assigned_to_client = explode(',', $client['projects']);
+ $intersection = array_intersect($projects_assigned_to_client, $projects_assigned_to_user);
+ if ($intersection) {
+ $client['projects'] = implode(',', $intersection);
+ $client_list[] = $client;
+ }
}
$form->addInput(array('type'=>'combobox',
'onchange'=>'fillProjectDropdown(this.value);',
'value'=>$cl_client,
'data'=>$client_list,
'datakeys'=>array('id', 'name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
}
'value'=>$cl_task,
'data'=>$task_list,
'datakeys'=>array('id','name'),
- 'empty'=>array(''=>$i18n->getKey('dropdown.select'))
- ));
+ 'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
}
if (in_array('iv', explode(',', $user->plugins)))
$form->addInput(array('type'=>'checkbox','name'=>'billable','data'=>1,'value'=>$cl_billable,'enable'=>$enable_controls));
$form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on button click.
$form->addInput(array('type'=>'hidden','name'=>'browser_time','value'=>'')); // User current time, which gets filled in on button click.
$enable_start = $uncompleted ? false : true;
-$enable_stop = $uncompleted ? true : false;
if (!$uncompleted)
$form->addInput(array('type'=>'submit','name'=>'btn_start','onclick'=>'browser_time.value=get_time()','value'=>$i18n->getKey('label.start'),'enable'=>$enable_start));
else
- $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_time.value=get_time()','value'=>$i18n->getKey('label.finish'),'enable'=>$enable_stop));
-
+ $form->addInput(array('type'=>'submit','name'=>'btn_stop','onclick'=>'browser_time.value=get_time()','value'=>$i18n->getKey('label.finish'),'enable'=>!$enable_start));
+
// If we have custom fields - add controls for them.
if ($custom_fields && $custom_fields->fields[0]) {
// Only one custom field is supported at this time.
}
}
-// Determine lock date. Time entries earlier than lock date cannot be created or modified.
+// Determine lock date. Time entries earlier than lock date cannot be created or modified.
$lock_interval = $user->lock_interval;
$lockdate = 0;
if ($lock_interval > 0) {
if (!$cl_task) $errors->add($i18n->getKey('error.task'));
}
// Finished validating user input.
-
+
// Prohibit creating entries in future.
if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
$errors->add($i18n->getKey('error.future_date'));
}
-
+
// Prohibit creating time entries in locked interval.
if($lockdate && $selected_date->before($lockdate))
$errors->add($i18n->getKey('error.period_locked'));
if ($errors->isEmpty() && $uncompleted) {
$errors->add($i18n->getKey('error.uncompleted_exists')." <a href = 'time_edit.php?id=".$not_completed_rec['id']."'>".$i18n->getKey('error.goto_uncompleted')."</a>");
}
-
+
// Prohibit creating an overlapping record.
if ($errors->isEmpty()) {
if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish))
$errors->add($i18n->getKey('error.overlap'));
- }
-
+ }
+
if ($errors->isEmpty()) {
$id = ttTimeHelper::insert(array(
'date' => $cl_date,
'duration' => $cl_duration,
'note' => $cl_note,
'billable' => $cl_billable));
-
+
// Insert a custom field if we have it.
$result = true;
if ($id && $custom_fields && $cl_cf_1) {
if (ttTimeHelper::isValidInterval($record['start'], $cl_finish) // finish time is greater than start time
&& !ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $record['start'], $cl_finish)) { // no overlap
$res = ttTimeHelper::update(array(
- 'id'=>$record['id'],
- 'date'=>$cl_date,
+ 'id'=>$record['id'],
+ 'date'=>$cl_date,
'user_id'=>$user->getActiveUser(),
- 'client'=>$record['client_id'],
- 'project'=>$record['project_id'],
- 'task'=>$record['task_id'],
- 'start'=>$record['start'],
+ 'client'=>$record['client_id'],
+ 'project'=>$record['project_id'],
+ 'task'=>$record['task_id'],
+ 'start'=>$record['start'],
'finish'=>$cl_finish,
'note'=>$record['comment'],
'billable'=>$record['billable']));
} else {
// Cannot complete, redirect for manual edit.
header('Location: time_edit.php?id='.$record['id']);
- exit();
+ exit();
}
}
-}
+} // POST
$week_total = ttTimeHelper::getTimeForWeek($user->getActiveUser(), $cl_date);
$smarty->assign('week_total', $week_total);
$smarty->assign('title', $i18n->getKey('title.time'));
$smarty->assign('content_page_name', 'mobile/timer.tpl');
$smarty->display('mobile/index.tpl');
-?>
\ No newline at end of file