public function actionAccountLoginSuccess($account_id = '', $args = '') { $testmod_path = \Module::exists('testmod'); $log_file_name = 'login-success.txt'; $log_file_path = $testmod_path . $log_file_name; // delete if exists. if (\File::exists($log_file_path) && !is_writable($log_file_path)) { return false; } elseif (\File::exists($log_file_path) && is_writable($log_file_path)) { \File::delete($log_file_path); } \File::create($testmod_path, $log_file_name, 'Account id ' . $account_id . ' log in success on ' . \Extension\Date::gmtDate()); return true; }
<?php foreach ($list_items['items'] as $row) { ?> <tr> <td class="check-column"><?php echo \Extension\Form::checkbox('id[]', $row->post_id); ?> </td> <td><?php echo $row->post_name; ?> </td> <td></td> <td><?php echo \Extension\Date::gmtDate('', $row->post_date); ?> </td> <td> <?php if (\Model_AccountLevelPermission::checkAdminPermission('blog_perm', 'blog_write_perm')) { echo \Extension\Html::anchor('blog/admin/index/edit/' . $row->post_id, '<span class="glyphicon glyphicon-pencil"></span> ' . \Lang::get('admin_edit'), array('class' => 'btn btn-default btn-xs')); } ?> </td> </tr> <?php } // endforeach; ?>
if ($i > 5) { echo '...'; break; } $i++; } unset($lvg, $lvl); ?> </td> <td><?php echo \Extension\Date::gmtDate('', $row->account_create); ?> </td> <td><?php if ($row->account_last_login != null) { echo \Extension\Date::gmtDate('', $row->account_last_login); } ?> </td> <td><span class="glyphicon glyphicon-<?php echo $row->account_status == '1' ? 'ok' : 'remove'; ?> "></span> <?php echo $row->account_status_text; ?> </td> <td> <?php if ($row->account_id != '0') { ?>
$tmp_account_timezone = \Extension\Date::getRealTimezoneValue($default_timezone); $account_timezone = $default_timezone; } foreach ($timezone_list as $tznum => $tzval) { echo '<option value="' . $tznum . '"' . (isset($account_timezone) && $account_timezone == $tznum ? ' selected="selected"' : '') . '>' . $tznum . '</option>' . "\n"; // selected, no more another selected because this list have many duplicate key. if (isset($account_timezone) && $account_timezone == $tznum) { unset($account_timezone); } } unset($timezone_list, $tznum, $tzval); ?> </select> <div class="help-block"><?php echo __('account_current_date_time_example', array('time' => \Extension\Date::gmtDate('%Y-%m-%d %H:%M:%S', (string) time(), $tmp_account_timezone))); ?> </div> </div> </div> </fieldset> <fieldset> <legend><?php echo __('account_personal_info'); ?> </legend> <div class="form-group"> <label for="account_firstname" class="col-sm-2 control-label"><?php echo __('account_firstname'); ?>
?> </a></td> <td><?php echo $row->login_ua; ?> </td> <td><?php echo $row->login_browser; ?> </td> <td><?php echo $row->login_ip; ?> </td> <td><?php echo \Extension\Date::gmtDate('', $row->login_time, $account->account_timezone); ?> </td> <td><span class="glyphicon glyphicon-<?php echo $row->login_attempt == '1' ? 'ok' : 'remove'; ?> "></span> <?php echo __('account.' . $row->login_attempt_text); ?> </td> </tr> <?php } // endofreach; ?>
?> </td> <td><?php echo $row->site_domain; ?> </td> <td><span class="glyphicon glyphicon-<?php echo $row->site_status == '1' ? 'ok' : 'remove'; ?> "></span></td> <td><?php echo \Extension\Date::gmtDate('', $row->site_create); ?> </td> <td><?php echo \Extension\Date::gmtDate('', $row->site_update); ?> </td> <td> <ul class="actions-inline"> <?php if (\Model_AccountLevelPermission::checkAdminPermission('siteman_perm', 'siteman_edit_perm')) { ?> <li><?php echo \Extension\Html::anchor('admin/siteman/edit/' . $row->site_id, '<span class="glyphicon glyphicon-pencil"></span> ' . __('admin_edit'), array('class' => 'btn btn-default btn-xs')); ?> </li><?php } ?> </ul>