mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 13:28:41 +00:00
添加一些方便修改的配置信息
This commit is contained in:
parent
949ef0e573
commit
7d1c1cc82a
@ -1,5 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
|
'profile' => [
|
||||||
|
'oj-name' => 'Universal Online Judge',
|
||||||
|
'oj-name-small' => 'UOJ',
|
||||||
|
'administrator' => 'vfleaking',
|
||||||
|
'admin-email' => 'vfleaking@163.com',
|
||||||
|
'qq-group' => '197293072',
|
||||||
|
'ICP-license' => '鄂ICP备14016048号'
|
||||||
|
],
|
||||||
'database' => [
|
'database' => [
|
||||||
'database' => 'app_uoj233',
|
'database' => 'app_uoj233',
|
||||||
'username' => 'root',
|
'username' => 'root',
|
||||||
@ -10,12 +18,12 @@ return [
|
|||||||
'domain' => null,
|
'domain' => null,
|
||||||
'main' => [
|
'main' => [
|
||||||
'protocol' => 'http',
|
'protocol' => 'http',
|
||||||
'host' => isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''),
|
'host' => UOJContext::httpHost(),
|
||||||
'port' => 80
|
'port' => 80
|
||||||
],
|
],
|
||||||
'blog' => [
|
'blog' => [
|
||||||
'protocol' => 'http',
|
'protocol' => 'http',
|
||||||
'host' => isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''),
|
'host' => UOJContext::httpHost(),
|
||||||
'port' => 80
|
'port' => 80
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -49,7 +57,6 @@ return [
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'switch' => [
|
'switch' => [
|
||||||
'ICP-license' => false,
|
|
||||||
'web-analytics' => false,
|
'web-analytics' => false,
|
||||||
'blog-use-subdomain' => false
|
'blog-use-subdomain' => false
|
||||||
]
|
]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
<header>
|
<header>
|
||||||
<h4>1. 什么是UOJ</h4>
|
<h4>1. 什么是<?= UOJConfig::$data['profile']['oj-name-small'] ?></h4>
|
||||||
</header>
|
</header>
|
||||||
<p>见 <a href="http://uoj.ac/blog/4">http://uoj.ac/blog/4</a>。 </p>
|
<p>见 <a href="http://uoj.ac/blog/4">http://uoj.ac/blog/4</a>。 </p>
|
||||||
</section>
|
</section>
|
||||||
@ -13,14 +13,14 @@
|
|||||||
<header>
|
<header>
|
||||||
<h4>2. 注册后怎么上传头像</h4>
|
<h4>2. 注册后怎么上传头像</h4>
|
||||||
</header>
|
</header>
|
||||||
<p>UOJ不提供头像存储服务。每到一个网站都要上传一个头像挺烦的对不对?UOJ支持Gravatar,请使用Gravatar吧!Gravatar是一个全球的头像存储服务,你的头像将会与你的电子邮箱绑定。在各大网站比如各种Wordpress还有各种OJ比如Vijos、Contest Hunter上,只要你电子邮箱填对了,那么你的头像也就立即能显示了!</p>
|
<p><?= UOJConfig::$data['profile']['oj-name-small'] ?>不提供头像存储服务。每到一个网站都要上传一个头像挺烦的对不对?我们支持Gravatar,请使用Gravatar吧!Gravatar是一个全球的头像存储服务,你的头像将会与你的电子邮箱绑定。在各大网站比如各种Wordpress还有各种OJ比如Vijos、Contest Hunter上,只要你电子邮箱填对了,那么你的头像也就立即能显示了!</p>
|
||||||
<p>快使用Gravatar吧! Gravatar地址:<a href="https://cn.gravatar.com/">https://cn.gravatar.com/</a>。进去后注册个帐号然后与邮箱绑定并上传头像,就ok啦!</p>
|
<p>快使用Gravatar吧! Gravatar地址:<a href="https://cn.gravatar.com/">https://cn.gravatar.com/</a>。进去后注册个帐号然后与邮箱绑定并上传头像,就ok啦!</p>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<header>
|
<header>
|
||||||
<h4>3. UOJ的测评环境</h4>
|
<h4>3. <?= UOJConfig::$data['profile']['oj-name-small'] ?>的测评环境</h4>
|
||||||
</header>
|
</header>
|
||||||
<p>测评环境是Linux,Ubuntu 14.04,64位系统。</p>
|
<p>测评环境是 Ubuntu Linux 14.04 LTS x64。</p>
|
||||||
<p>C++的编译器是 g++ 4.8.4,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
<p>C++的编译器是 g++ 4.8.4,编译命令:<code>g++ code.cpp -o code -lm -O2 -DONLINE_JUDGE</code>。如果选择C++11会在编译命令后面添加<code>-std=c++11</code>。</p>
|
||||||
<p>C的编译器是 gcc 4.8.4,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
<p>C的编译器是 gcc 4.8.4,编译命令:<code>gcc code.c -o code -lm -O2 -DONLINE_JUDGE</code>。</p>
|
||||||
<p>Pascal的编译器是 fpc 2.6.2,编译命令:<code>fpc code.pas -O2</code>。</p>
|
<p>Pascal的编译器是 fpc 2.6.2,编译命令:<code>fpc code.pas -O2</code>。</p>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<h4>4. 递归 10<sup>7</sup> 层怎么没爆栈啊</h4>
|
<h4>4. 递归 10<sup>7</sup> 层怎么没爆栈啊</h4>
|
||||||
</header>
|
</header>
|
||||||
<p>没错就是这样!除非是特殊情况,UOJ测评程序时的栈大小与该题的空间限制是相等的!</p>
|
<p>没错就是这样!除非是特殊情况,<?= UOJConfig::$data['profile']['oj-name-small'] ?>测评程序时的栈大小与该题的空间限制是相等的!</p>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<header>
|
<header>
|
||||||
@ -56,11 +56,13 @@
|
|||||||
<header>
|
<header>
|
||||||
<h4>7. 联系方式</h4>
|
<h4>7. 联系方式</h4>
|
||||||
</header>
|
</header>
|
||||||
<p>如果你想出题、想办比赛,或者发现了BUG,或者对网站有什么建议,可以通过下面的方式联系我们:</p>
|
<p>如果你想出题、想办比赛,或者发现了BUG,以及对网站有什么建议,可以通过下面的方式联系我们:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>UOJ私信联系vfleaking。</li>
|
<li>私信联系<?= UOJConfig::$data['profile']['administrator'] ?>。</li>
|
||||||
<li>邮件联系vfleaking@163.com。</li>
|
<li>邮件联系<?= UOJConfig::$data['profile']['admin-email'] ?>。</li>
|
||||||
<li>你也可以进QQ群水水,群号是197293072,Universal OJ用户群。</li>
|
<?php if (UOJConfig::$data['profile']['qq-group']!=''): ?>
|
||||||
|
<li>你也可以进QQ群水水,群号是<?= UOJConfig::$data['profile']['qq-group'] ?>。</li>
|
||||||
|
<?php endif ?>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
@ -19,15 +19,17 @@
|
|||||||
$user = $vdata['user'];
|
$user = $vdata['user'];
|
||||||
$password = $user["password"];
|
$password = $user["password"];
|
||||||
|
|
||||||
|
$oj-name = UOJConfig::$data['profile']['oj-name'];
|
||||||
|
$oj-name-small = UOJConfig::$data['profile']['oj-name-small'];
|
||||||
$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>您刚刚启用了UOJ密码找回功能,请进入下面的链接重设您的密码:</p>
|
<p>您刚刚启用了{$oj-name-small}密码找回功能,请进入下面的链接重设您的密码:</p>
|
||||||
<p><a href="$url">$url</a></p>
|
<p><a href="$url">$url</a></p>
|
||||||
<p>Universal Online Judge</p>
|
<p>{$oj-name}</p>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
||||||
@ -37,7 +39,7 @@ EOD;
|
|||||||
|
|
||||||
$mailer = UOJMail::noreply();
|
$mailer = UOJMail::noreply();
|
||||||
$mailer->addAddress($user['email'], $user['username']);
|
$mailer->addAddress($user['email'], $user['username']);
|
||||||
$mailer->Subject = "UOJ密码找回";
|
$mailer->Subject = $oj-name-small."密码找回";
|
||||||
$mailer->msgHTML($html);
|
$mailer->msgHTML($html);
|
||||||
if (!$mailer->send()) {
|
if (!$mailer->send()) {
|
||||||
error_log($mailer->ErrorInfo);
|
error_log($mailer->ErrorInfo);
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
become403Page();
|
become403Page();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$oj-name = UOJConfig::$data['profile']['oj-name'];
|
||||||
$problem_extra_config = getProblemExtraConfig($problem);
|
$problem_extra_config = getProblemExtraConfig($problem);
|
||||||
|
|
||||||
if (isset($_POST['getsvn'])) {
|
if (isset($_POST['getsvn'])) {
|
||||||
@ -20,7 +21,7 @@
|
|||||||
|
|
||||||
<p>{$myUser['username']}您好,</p>
|
<p>{$myUser['username']}您好,</p>
|
||||||
<p>您的svn密码是:{$myUser['svn_password']}</p>
|
<p>您的svn密码是:{$myUser['svn_password']}</p>
|
||||||
<p>BNDS Online Judge</p>
|
<p>{$oj-name}</p>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
body{font-size:14px;font-family:arial,verdana,sans-serif;line-height:1.666;padding:0;margin:0;overflow:auto;white-space:normal;word-wrap:break-word;min-height:100px}
|
||||||
|
@ -6,13 +6,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php if ($ShowPageFooter): ?>
|
<?php if ($ShowPageFooter): ?>
|
||||||
<div class="uoj-footer">
|
<div class="uoj-footer">
|
||||||
<p><a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'zh-cn'))) ?>"><img src="//img.uoj.ac/utility/flags/24/cn.png" alt="中文" /></a> <a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'en'))) ?>"><img src="//img.uoj.ac/utility/flags/24/gb.png" alt="English" /></a></p>
|
<p>
|
||||||
<?php if (UOJConfig::$data['switch']['ICP-license']): ?>
|
<a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'zh-cn'))) ?>"><img src="//img.uoj.ac/utility/flags/24/cn.png" alt="中文" /></a>
|
||||||
<ul class="list-inline"><li>Universal Online Judge</li>|<li><a href="http://www.miitbeian.gov.cn">鄂ICP备14016048号</a></li></ul>
|
<a href="<?= HTML::url(UOJContext::requestURI(), array('params' => array('locale' => 'en'))) ?>"><img src="//img.uoj.ac/utility/flags/24/gb.png" alt="English" /></a>
|
||||||
<?php else: ?>
|
</p>
|
||||||
<ul class="list-inline"><li>Universal Online Judge</li></ul>
|
|
||||||
<?php endif ?>
|
<ul class="list-inline">
|
||||||
<p>Server time: <?= UOJTime::$time_now_str ?></p>
|
<li><?= UOJConfig::$data['profile']['oj-name'] ?></li>
|
||||||
|
<?php if (UOJConfig::$data['profile']['ICP-license']!=''): ?>
|
||||||
|
| <li><a href="http://www.miitbeian.gov.cn"><?= UOJConfig::$data['profile']['ICP-license'] ?></a></li>
|
||||||
|
<?php endif ?>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Server time: <?= UOJTime::$time_now_str ?> | <a href="http://github.com/UniversalOJ/UOJ-System">开源项目</a></p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($PageMainTitle)) {
|
if (!isset($PageMainTitle)) {
|
||||||
$PageMainTitle = 'Universal Online Judge';
|
$PageMainTitle = UOJConfig::$data['profile']['oj-name'];
|
||||||
}
|
}
|
||||||
if (!isset($PageMainTitleOnSmall)) {
|
if (!isset($PageMainTitleOnSmall)) {
|
||||||
$PageMainTitleOnSmall = 'UOJ';
|
$PageMainTitleOnSmall = UOJConfig::$data['profile']['oj-name-small'];
|
||||||
}
|
}
|
||||||
if (!isset($ShowPageHeader)) {
|
if (!isset($ShowPageHeader)) {
|
||||||
$ShowPageHeader = true;
|
$ShowPageHeader = true;
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<?php if (isset($_GET['locale'])): ?>
|
<?php if (isset($_GET['locale'])): ?>
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<title><?= isset($PageTitle) ? $PageTitle : 'UOJ' ?> - <?= $PageMainTitle ?></title>
|
<title><?= isset($PageTitle) ? $PageTitle : UOJConfig::$data['profile']['oj-name-small'] ?> - <?= $PageMainTitle ?></title>
|
||||||
|
|
||||||
<script type="text/javascript">uojHome = '<?= HTML::url('/') ?>'</script>
|
<script type="text/javascript">uojHome = '<?= HTML::url('/') ?>'</script>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title><?= isset($PageTitle) ? $PageTitle : 'UOJ' ?> - <?= isset($PageMainTitle) ? $PageMainTitle : 'Universal Online Judge' ?></title>
|
<title><?= isset($PageTitle) ? $PageTitle : UOJConfig::$data['profile']['oj-name-small'] ?> - <?= isset($PageMainTitle) ? $PageMainTitle : UOJConfig::$data['profile']['oj-name'] ?></title>
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
|
Loading…
Reference in New Issue
Block a user