微调变量名,主页面导航栏名称修复

This commit is contained in:
MascoSkray 2017-04-12 19:26:06 +08:00
parent 85de04ff6c
commit 521b2719fd
6 changed files with 18 additions and 18 deletions

View File

@ -24,9 +24,9 @@ $config = [
'profile' => [ 'profile' => [
'oj-name' => 'Universal Online Judge', 'oj-name' => 'Universal Online Judge',
'oj-name-short' => 'UOJ', 'oj-name-short' => 'UOJ',
'administrator' => 'admin', 'administrator' => 'root',
'admin-email' => 'admin@uoj', 'admin-email' => 'admin@local_uoj.ac',
'qq-group' => '', 'QQ-group' => '',
'ICP-license' => '' 'ICP-license' => ''
], ],
'database' => [ 'database' => [

View File

@ -3,9 +3,9 @@ return [
'profile' => [ 'profile' => [
'oj-name' => 'Universal Online Judge', 'oj-name' => 'Universal Online Judge',
'oj-name-short' => 'UOJ', 'oj-name-short' => 'UOJ',
'administrator' => 'admin', 'administrator' => 'root',
'admin-email' => 'admin@uoj', 'admin-email' => 'admin@local_uoj.ac',
'qq-group' => '', 'QQ-group' => '',
'ICP-license' => '' 'ICP-license' => ''
], ],
'database' => [ 'database' => [

View File

@ -60,8 +60,8 @@
<ul> <ul>
<li>私信联系<?= UOJConfig::$data['profile']['administrator'] ?>。</li> <li>私信联系<?= UOJConfig::$data['profile']['administrator'] ?>。</li>
<li>邮件联系<?= UOJConfig::$data['profile']['admin-email'] ?>。</li> <li>邮件联系<?= UOJConfig::$data['profile']['admin-email'] ?>。</li>
<?php if (UOJConfig::$data['profile']['qq-group']!=''): ?> <?php if (UOJConfig::$data['profile']['QQ-group']!=''): ?>
<li>你也可以进QQ群水水群号是<?= UOJConfig::$data['profile']['qq-group'] ?>。</li> <li>你也可以进QQ群水水群号是<?= UOJConfig::$data['profile']['QQ-group'] ?>。</li>
<?php endif ?> <?php endif ?>
</ul> </ul>
</section> </section>

View File

@ -20,14 +20,14 @@
$password = $user["password"]; $password = $user["password"];
$oj_name = UOJConfig::$data['profile']['oj-name']; $oj_name = UOJConfig::$data['profile']['oj-name'];
$oj_name-short = UOJConfig::$data['profile']['oj-name-short']; $oj_name_short = UOJConfig::$data['profile']['oj-name-short'];
$sufs = base64url_encode($user['username'] . "." . md5($user['username'] . "+" . $password)); $sufs = base64url_encode($user['username'] . "." . md5($user['username'] . "+" . $password));
$url = HTML::url("/reset-password", array('params' => array('p' => $sufs))); $url = HTML::url("/reset-password", array('params' => array('p' => $sufs)));
$html = <<<EOD $html = <<<EOD
<base target="_blank" /> <base target="_blank" />
<p>{$user['username']}您好,</p> <p>{$user['username']}您好,</p>
<p>您刚刚启用了{$oj_name-short}密码找回功能,请进入下面的链接重设您的密码:</p> <p>您刚刚启用了{$oj_name_short}密码找回功能,请进入下面的链接重设您的密码:</p>
<p><a href="$url">$url</a></p> <p><a href="$url">$url</a></p>
<p>{$oj_name}</p> <p>{$oj_name}</p>

View File

@ -20,7 +20,7 @@
<base target="_blank" /> <base target="_blank" />
<p>{$myUser['username']}您好,</p> <p>{$myUser['username']}您好,</p>
<p>您的svn密码是:{$myUser['svn_password']}</p> <p>您的SVN密码是:{$myUser['svn_password']}</p>
<p>{$oj_name}</p> <p>{$oj_name}</p>
<style type="text/css"> <style type="text/css">
@ -31,7 +31,7 @@ EOD;
$mailer = UOJMail::noreply(); $mailer = UOJMail::noreply();
$mailer->addAddress($myUser['email'], $myUser['username']); $mailer->addAddress($myUser['email'], $myUser['username']);
$mailer->Subject = "svn密码"; $mailer->Subject = "SVN密码";
$mailer->msgHTML($html); $mailer->msgHTML($html);
if ($mailer->send()) { if ($mailer->send()) {
echo 'good'; echo 'good';
@ -161,16 +161,16 @@ EOD;
<label class="col-sm-3 control-label">SVN地址</label> <label class="col-sm-3 control-label">SVN地址</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="form-control-static"> <div class="form-control-static">
<div type="" class="btn-info btn-xs pull-right">您的svn密码:{$myUser['svn_password']}</div> <div type="" class="btn-info btn-xs pull-right">您的SVN密码:{$myUser['svn_password']}</div>
<p><a>svn://{$http_host}/problem/{$problem['id']}</a></p> <p><a>svn://{$http_host}/problem/{$problem['id']}</a></p>
</div> </div>
</div> </div>
<label class="col-sm-3 control-label">zip上传数据</label> <label class="col-sm-3 control-label">ZIP上传数据</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="form-control-static"> <div class="form-control-static">
<row> <row>
<button type="button" style="width:30%" class="btn btn-primary" data-toggle="modal" data-target="#UploadDataModal">上传数据</button> <button type="button" style="width:30%" class="btn btn-primary" data-toggle="modal" data-target="#UploadDataModal">上传数据</button>
<button type="submit" style="width:30%" id="button-submit-data" name="submit-data" value="data" class="btn btn-danger">svn仓库同步</button> <button type="submit" style="width:30%" id="button-submit-data" name="submit-data" value="data" class="btn btn-danger">SVN仓库同步</button>
</row> </row>
</div> </div>
</div> </div>
@ -180,7 +180,7 @@ EOD;
<script type="text/javascript"> <script type="text/javascript">
$('#button-getsvn').click(function(){ $('#button-getsvn').click(function(){
if (!confirm("确定要发送你的svn密码到${myUser['email']}")) { if (!confirm("确定要发送你的SVN密码到${myUser['email']}")) {
return; return;
} }
$.post('${_SERVER['REQUEST_URI']}', { $.post('${_SERVER['REQUEST_URI']}', {
@ -189,7 +189,7 @@ $('#button-getsvn').click(function(){
if (res == "good") { if (res == "good") {
BootstrapDialog.show({ BootstrapDialog.show({
title : "操作成功", title : "操作成功",
message : "svn密码已经发送至您的邮箱,请查收。", message : "SVN密码已经发送至您的邮箱,请查收。",
type : BootstrapDialog.TYPE_SUCCESS, type : BootstrapDialog.TYPE_SUCCESS,
buttons: [{ buttons: [{
label: '好的', label: '好的',

View File

@ -6,7 +6,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="<?= HTML::url('/') ?>">UOJ</a> <a class="navbar-brand" href="<?= HTML::url('/') ?>"><?= UOJConfig::$data['profile']['oj-name-short'] ?></a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">