/** * Get link to shared list for current user * @param string $text [optional] * @return string */ public static function getListLinkForCurrentUser($text = null) { if (!Configuration::Privacy()->listIsPublic()) { return ''; } if (is_null($text)) { $text = Icon::$ATTACH; } return '<a href="shared/' . SessionAccountHandler::getUsername() . '/" target="_blank" ' . Ajax::tooltip('', __('Public list'), false, true) . '>' . $text . '</a>'; }
echo System::getFullDomain(); ?> " title="Runalyze">Runalyze</a> <?php if (SessionAccountHandler::isLoggedIn()) { ?> <a class="tab right" href="login.php?out" title="<?php _e('Logout'); ?> "> <i class="fa fa-fw fa-lg fa-sign-out"></i> <?php _e('Logout'); ?> </a> <?php echo Ajax::window('<a class="tab right b" href="' . ConfigTabs::$CONFIG_URL . '?key=config_tab_account"><i class="fa fa-fw fa-lg fa-user"></i>' . NBSP . SessionAccountHandler::getUsername() . '</a>'); ?> <?php } ?> <span class="left b"> <?php echo Ajax::window('<a class="tab" href="' . ConfigTabs::$CONFIG_URL . '"><i class="fa fa-fw fa-lg fa-cog"></i>' . NBSP . __('Configuration') . '</a>'); ?> <?php echo Ajax::window('<a class="tab" href="' . PluginTool::$DISPLAY_URL . '"><i class="fa fa-fw fa-lg fa-dashboard"></i>' . NBSP . __('Tools') . '</a>'); ?> <?php echo Ajax::window('<a class="tab" href="' . Frontend::$HELP_URL . '"><i class="fa fa-fw fa-lg fa-question-circle"></i>' . NBSP . __('Help') . '</a>'); ?>
/** * Try to change password */ private function tryToChangePassword() { if ($_POST['new_pw'] == $_POST['new_pw_repeat']) { $Account = DB::getInstance()->query('SELECT `password`, `salt` FROM `' . PREFIX . 'account`' . ' WHERE id = ' . SessionAccountHandler::getId())->fetch(); if (AccountHandler::comparePasswords($_POST['old_pw'], $Account['password'], $Account['salt'])) { if (strlen($_POST['new_pw']) < AccountHandler::$PASS_MIN_LENGTH) { ConfigTabs::addMessage(HTML::error(sprintf(__('The password has to contain at least %s characters.'), AccountHandler::$PASS_MIN_LENGTH))); } else { AccountHandler::setNewPassword(SessionAccountHandler::getUsername(), $_POST['new_pw']); ConfigTabs::addMessage(HTML::okay(__('Your password has been changed.'))); } } else { ConfigTabs::addMessage(HTML::error(__('You current password is wrong.'))); } } else { ConfigTabs::addMessage(HTML::error(__('The passwords have to be the same.'))); } }