2024-10-10

This commit is contained in:
2024-10-10 12:56:56 +08:00
commit 7b347c848a
2648 changed files with 643965 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<div class="navbar">
<div class="navbar-inner navbar-fixed-top" style="visibility: visible; position: fixed;">
<a class='brand' href="<?php echo $OJ_HOME?>">
ADMIN PANEL
</a>
<div class="nav-collapse"><ul class="nav pull-right"><li class="return"><a href="../">Return</a></li></ul></div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<?php
require_once("../include/db_info.inc.php");
require_once ("../include/my_func.inc.php");
;?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--<link rel=stylesheet href='../include/hoj.css' type='text/css'>-->
<script src="../template/bs3/jquery.min.js"></script>
<script>
$("document").ready(function (){
$("form").append("<div id='csrf' />");
$("#csrf").load("../csrf.php");
});
</script>
<?php if (!(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||
isset($_SESSION[$OJ_NAME.'_'.'contest_creator'])||
isset($_SESSION[$OJ_NAME.'_'.'problem_editor']))){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
//require_once("../template/$OJ_TEMPLATE/css.php");
if(file_exists("../lang/$OJ_LANG.php")) require_once("../lang/$OJ_LANG.php");
?>

297
web/swadmin/admin.css Normal file
View File

@@ -0,0 +1,297 @@
/*!
* author slixurd
* For the Online Judge Admin page
*/
@import url(../bootstrap/css/bootstrap.css);
.menu-btn{
text-decoration: none;
padding: 5px 10px;
display: list-item;
background: #242a2f;
min-width: 168px;
border: none;
color: #faf7f9;
font-weight: bold;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
text-shadow: -0.8px 0.5px 0.4px #333;
margin-top: 3px;
width: 100%;
text-align: center;
box-shadow: 0 0 4px 0 #242a2f;
-webkit-box-shadow: 0 0 4px 0 #242a2f;
-moz-box-shadow: 0 0 4px 0 #242a2f;
background-image: -webkit-linear-gradient(bottom, #242a2f, #1a1f1b);
}
.top-space{
margin-top: 52px;
}
body{
background-image: url("../image/back.png");
opacity: 0.95;
}
.menu-group{
padding-top: 15px;
}
.col{
background:#f9f9f9;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
box-shadow: 0 0 18px 0 #242a2f;
-webkit-box-shadow: 0 0 18px 0 #242a2f;
-moz-box-shadow: 0 0 18px 0 #242a2f;
min-width: 240px;
}
.align-center{
left:auto;
text-align:center;
text-align:-webkit-center;
vertical-align: center;
}
.clear-float{
float: none;
}
.btn-group .btn{
float: none;
}
div .bottom-space{
margin-bottom: 20px;
}
.marginTop{
margin-top: 15px;
}
.news-header{
padding-top: 15px;
font-size: 22px;
}
.news-content{
background:#f9f9f9;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
box-shadow: 0 0 18px 0 #242a2f;
-webkit-box-shadow: 0 0 18px 0 #242a2f;
-moz-box-shadow: 0 0 18px 0 #242a2f;
min-width: 708px;
max-width: 900px;
margin-left: auto;
margin-right: auto;
text-align: center;
padding-bottom: 6px;
}
.h2-head{
padding-top: 30px;
padding-bottom: 15px;
}
.h-head{
padding-top: 30px;
padding-bottom: 15px;
font-size: 28px;
}
.a-color{
color: #eee;
}
button a:hover{
color:#04ca3f;
}
.add-contest-p p{
text-align: center;
}
.add-contest-p input{
margin-bottom: 0;
}
.bk{
background:#f9f9f9;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
box-shadow: 0 0 18px 0 #242a2f;
-webkit-box-shadow: 0 0 18px 0 #242a2f;
-moz-box-shadow: 0 0 18px 0 #242a2f;
min-width: 240px;
padding-top: 10px;
padding-bottom: 10px;
}
.button-align input{
margin-bottom: 0;
}
.content-center{
margin-left:auto;margin-right:auto;margin-top:20px;
left:auto;
text-align:center;
text-align:-webkit-center;
vertical-align: center;
}
.padding-center{
padding-top: 10px;
padding-bottom: 15px;
}
.content-center input{
margin-bottom: 0;
}
.content-center div{
padding-top: 5px;
}
.text-notcenter{
margin-left:auto;
margin-right:auto;
margin-top:20px;
text-align:center;
text-align:-webkit-center;
vertical-align: center;
}
.changepass{
margin: 0 auto;
width: 280px;
font-size: 16px;
height: 175px;
padding-top: 10px;
background:#f9f9f9;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
box-shadow: 0 0 18px 0 #242a2f;
-webkit-box-shadow: 0 0 18px 0 #242a2f;
-moz-box-shadow: 0 0 18px 0 #242a2f;
padding-left: 20px;
padding-right: 20px;
margin-top: 45px;
}
.changepass .change{
margin: 0 auto;
width:170px;
font-size: 20px;
margin-top: 20px;
}
.changepass .btn{
margin-left: 110px;
margin-top: 8px;
}
.changepass .in{
width: 80%;
}
.changepass .in-title{
width: 20%;
}
.msg{
width: 530px;
height: 550px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
}
.msg .btn{
width: 140px;
margin-left: 195px;
}
.rejudge{
width: 300px;
height: 240px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
}
.span10 hr{
border-top: 1px solid rgb(209, 209, 208);
}
.give-source{
width: 300px;
height: 310px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
}
.give-source input{
width: 95%;
}
.database{
width: 460px;
height: 250px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
}
.database .btn{
margin-top: 15px;
}
.copy-problem{
width: 400px;
height: 370px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
padding-top: 10px;
font-size: 14px;
}
.copy-problem ol {
list-style: none;
}
.changeid{
width: 600px;
height: 210px;
margin: 30px auto;
padding-left: 15px;
padding-right: 15px;
padding-top: 10px;
font-size: 14px;
}
.changeid input{
margin-bottom: 0;
}
.menu-btn a:hover{
color: red;
text-decoration: none;
}
.menu-btn .a-color{
width: 120px;
}
.return{
font-size: 20px;
float: right;
}

View File

@@ -0,0 +1,34 @@
<?php require_once("admin-header.php");?>
<?php if (!(isset($_SESSION[$OJ_NAME.'_'.'administrator'])|| isset($_SESSION[$OJ_NAME.'_'.'password_setter']) )){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
if(isset($_POST['do'])){
require_once("../include/check_post_key.php");
require_once("../include/my_func.inc.php");
$user_id=$_POST['user_id'];
$passwd =$_POST['passwd'];
if (false) {
$user_id = stripslashes ( $user_id);
$passwd = stripslashes ( $passwd);
}
$passwd=pwGen($passwd);
$sql="update `users` set `password`=? where `user_id`=? and user_id not in( select user_id from privilege where rightstr='administrator') ";
if (pdo_query($sql,$passwd,$user_id)==1) echo "Password Changed!";
else echo "No such user! or He/Her is an administrator!";
}
?>
<div class="container">
<form action='changepass.php' method=post>
<b>Reset Password:</b><br />
<?php echo $MSG_USER_ID?>:<input type=text size=10 name="user_id"><br />
<?php echo $MSG_PASSWORD?>:<input type=text size=10 name="passwd"><br />
<?php require_once("../include/set_post_key.php");?>
<input type='hidden' name='do' value='do'>
<input type=submit value='Change'>
</form>
</div>

37
web/swadmin/check.php Normal file
View File

@@ -0,0 +1,37 @@
<?php require_once("admin-header.php");
if(isset($OJ_LANG)){
require_once("../lang/$OJ_LANG.php");
}
?>
<html>
<head>
<title>OJ Administration</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel=stylesheet href='admin.css' type='text/css'>
</head>
<body>
<div class="container-fluid">
<?php require_once("admin-bar.php"); ?>
<div class="row-fluid top-space">
<div class="span2" >
<div class="menu-group" >
<?php require_once("menu.php") ?>
</div>
</div>
<div class="span10">
<div class="">
</div>
</div>
</div>
</div>
</body>
</html>

241
web/swadmin/contest_add.php Normal file
View File

@@ -0,0 +1,241 @@
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Contest Add</title>
</head>
<hr>
<?php
require_once("../include/db_info.inc.php");
require_once("../lang/$OJ_LANG.php");
require_once("../include/const.inc.php");
require_once("admin-header.php");
if(!(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'contest_creator']))){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
echo "<center><h3>$MSG_ADD"."$MSG_CONTEST</h3></center>";
include_once("kindeditor.php") ;
?>
<body leftmargin="30" >
<?php
$description = "";
if(isset($_POST['startdate'])){
require_once("../include/check_post_key.php");
$starttime = $_POST['startdate']." ".intval($_POST['shour']).":".intval($_POST['sminute']).":00";
$endtime = $_POST['enddate']." ".intval($_POST['ehour']).":".intval($_POST['eminute']).":00";
echo $starttime;
echo $endtime;
$title = $_POST['title'];
$private = $_POST['private'];
$password = $_POST['password'];
$description = $_POST['description'];
if(false){
$title = stripslashes($title);
$private = stripslashes($private);
$password = stripslashes($password);
$description = stripslashes($description);
}
$lang = $_POST['lang'];
$langmask = 0;
foreach($lang as $t){
$langmask += 1<<$t;
}
$langmask = ((1<<count($language_ext))-1)&(~$langmask);
//echo $langmask;
$sql = "INSERT INTO `contest`(`title`,`start_time`,`end_time`,`private`,`langmask`,`description`,`password`)
VALUES(?,?,?,?,?,?,?)";
$description = str_replace("<p>", "", $description);
$description = str_replace("</p>", "<br />", $description);
$description = str_replace(",", "&#44; ", $description);
echo $sql.$title.$starttime.$endtime.$private.$langmask.$description.$password;
$cid = pdo_query($sql,$title,$starttime,$endtime,$private,$langmask,$description,$password) ;
echo "Add Contest ".$cid;
$sql = "DELETE FROM `contest_problem` WHERE `contest_id`=$cid";
$plist = trim($_POST['cproblem']);
$pieces = explode(",",$plist );
if(count($pieces)>0 && intval($pieces[0])>0){
$sql_1 = "INSERT INTO `contest_problem`(`contest_id`,`problem_id`,`num`) VALUES (?,?,?)";
$plist="";
for($i=0; $i<count($pieces); $i++){
if($plist)$plist.=",";
$plist.=$pieces[$i];
pdo_query($sql_1,$cid,$pieces[$i],$i);
}
//echo $sql_1;
$sql = "UPDATE `problem` SET defunct='N' WHERE `problem_id` IN ($plist)";
pdo_query($sql) ;
}
$sql = "DELETE FROM `privilege` WHERE `rightstr`=?";
pdo_query($sql,"c$cid");
$sql = "INSERT INTO `privilege` (`user_id`,`rightstr`) VALUES(?,?)";
pdo_query($sql,$_SESSION[$OJ_NAME.'_'.'user_id'],"m$cid");
$_SESSION[$OJ_NAME.'_'."m$cid"] = true;
$pieces = explode("\n", trim($_POST['ulist']));
if(count($pieces)>0 && strlen($pieces[0])>0){
$sql_1 = "INSERT INTO `privilege`(`user_id`,`rightstr`) VALUES (?,?)";
for($i=0; $i<count($pieces); $i++){
pdo_query($sql_1,trim($pieces[$i]),"c$cid") ;
}
}
echo "<script>window.location.href=\"contest_list.php\";</script>";
}
else{
if(isset($_GET['cid'])){
$cid = intval($_GET['cid']);
$sql = "SELECT * FROM contest WHERE `contest_id`=?";
$result = pdo_query($sql,$cid);
$row = $result[0];
$title = $row['title']."-Copy";
$private = $row['private'];
$langmask = $row['langmask'];
$description = $row['description'];
$plist = "";
$sql = "SELECT `problem_id` FROM `contest_problem` WHERE `contest_id`=? ORDER BY `num`";
$result = pdo_query($sql,$cid);
foreach($result as $row){
if($plist) $plist = $plist.',';
$plist = $plist.$row[0];
}
$ulist = "";
$sql = "SELECT `user_id` FROM `privilege` WHERE `rightstr`=? order by user_id";
$result = pdo_query($sql,"c$cid");
foreach($result as $row){
if($ulist) $ulist .= "\n";
$ulist .= $row[0];
}
}
else if(isset($_POST['problem2contest'])){
$plist = "";
sort($_POST['pid']);
foreach($_POST['pid'] as $i){
if($plist)
$plist.=','.intval($i);
else
$plist=$i;
}
}else if(isset($_GET['spid'])){
require_once("../include/check_get_key.php");
$spid = intval($_GET['spid']);
$plist = "";
$sql = "SELECT `problem_id` FROM `problem` WHERE `problem_id`>=? ";
$result = pdo_query($sql,$spid);
foreach($result as $row){
if($plist) $plist.=',';
$plist.=$row[0];
}
}
include_once("kindeditor.php") ;
?>
<div class="container">
<form method=POST>
<p align=left>
<?php echo "<h3>".$MSG_CONTEST."-".$MSG_TITLE."</h3>"?>
<input class="input input-xxlarge" style="width:100%;" type=text name=title value="<?php echo isset($title)?$title:""?>"><br><br>
</p>
<p align=left>
<?php echo $MSG_CONTEST.$MSG_Start?>:
<input class=input-large type=date name='startdate' value='<?php echo date('Y').'-'. date('m').'-'.date('d')?>' size=4 >
Hour: <input class=input-mini type=text name=shour size=2 value=<?php echo date('H')?>>&nbsp;
Minute: <input class=input-mini type=text name=sminute value=00 size=2 >
</p>
<p align=left>
<?php echo $MSG_CONTEST.$MSG_End?>:
<input class=input-large type=date name='enddate' value='<?php echo date('Y').'-'. date('m').'-'.date('d')?>' size=4 >
Hour: <input class=input-mini type=text name=ehour size=2 value=<?php echo (date('H')+4)%24?>>&nbsp;
Minute: <input class=input-mini type=text name=eminute value=00 size=2 >
</p>
<br>
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_PROBLEM_ID?>
<?php echo "( Add problemIDs with coma , )"?><br>
<input class=input-xxlarge placeholder="Example:1000,1001,1002" type=text style="width:100%" name=cproblem value="<?php echo isset($plist)?$plist:""?>">
</p>
<br>
<p align=left>
<?php echo "<h4>".$MSG_CONTEST."-".$MSG_Description."</h4>"?>
<textarea class=kindeditor rows=13 name=description cols=80><?php echo isset($description)?$description:""?></textarea>
<br>
<table width="100%">
<tr>
<td rowspan=2>
<p aligh=left>
<?php echo $MSG_CONTEST."-".$MSG_LANG?>
<?php echo "( Add PLs with Ctrl+click )"?><br>
<select name="lang[]" multiple="multiple" style="height:220px">
<?php
$lang_count = count($language_ext);
$lang = (~((int)$langmask))&((1<<$lang_count)-1);
if(isset($_COOKIE['lastlang'])) $lastlang=$_COOKIE['lastlang'];
else $lastlang = 0;
for($i=0; $i<$lang_count; $i++){
echo "<option value=$i ".( $lang&(1<<$i)?"selected":"").">".$language_name[$i]."</option>";
}
?>
</select>
</p>
</td>
<td height="10px">
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_Public?>:
<select name=private style="width:150px;">
<option value=0 <?php echo $private=='0'?'selected=selected':''?>><?php echo $MSG_Public?></option>
<option value=1 <?php echo $private=='1'?'selected=selected':''?>><?php echo $MSG_Private?></option>
</select>
<?php echo $MSG_CONTEST."-".$MSG_PASSWORD?>:
<input type=text name=password style="width:150px;" value="">
</p>
</td>
</tr>
<tr>
<td height="*">
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_USER?>
<?php echo "( Add private contest's userIDs with newline &#47;n )"?>
<br>
<textarea name="ulist" rows="10"style="width:100%;" placeholder="user1<?php echo "\n"?>user2<?php echo "\n"?>user3<?php echo "\n"?>*可以将学生学号从Excel整列复制过来然后要求他们用学号做UserID注册,就能进入Private的比赛作为作业和测验。"><?php if(isset($ulist)){ echo $ulist;}?></textarea>
</p>
</td>
</tr>
</table>
<div align=center>
<?php require_once("../include/set_post_key.php");?>
<input type=submit value=Submit name=submit>
</div>
</p>
</form>
</div>
<?php }
require_once("../oj-footer.php");
?>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<?php require_once("admin-header.php");
require_once("../include/check_get_key.php");
$cid=intval($_GET['cid']);
if(!(isset($_SESSION[$OJ_NAME.'_'."m$cid"])||isset($_SESSION[$OJ_NAME.'_'.'administrator']))) exit();
$sql="select `defunct` FROM `contest` WHERE `contest_id`=?";
$result=pdo_query($sql,$cid);
$num=count($result);
if ($num<1){
echo "No Such Contest!";
require_once("../oj-footer.php");
exit(0);
}
$row=$result[0];
if ($row[0]=='N')
$sql="UPDATE `contest` SET `defunct`='Y' WHERE `contest_id`=?";
else
$sql="UPDATE `contest` SET `defunct`='N' WHERE `contest_id`=?";
pdo_query($sql,$cid);
?>
<script language=javascript>
history.go(-1);
</script>

View File

@@ -0,0 +1,234 @@
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Edit Contest</title>
</head>
<hr>
<?php
require_once("../include/db_info.inc.php");
require_once("../lang/$OJ_LANG.php");
require_once("../include/const.inc.php");
require_once("admin-header.php");
if(!(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'contest_creator']))){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
echo "<center><h3>Edit-"."$MSG_CONTEST</h3></center>";
include_once("kindeditor.php") ;
?>
<body leftmargin="30" >
<?php
if(isset($_POST['startdate'])){
require_once("../include/check_post_key.php");
$starttime = $_POST['startdate']." ".intval($_POST['shour']).":".intval($_POST['sminute']).":00";
$endtime = $_POST['enddate']." ".intval($_POST['ehour']).":".intval($_POST['eminute']).":00";
//echo $starttime;
//echo $endtime;
$title = $_POST['title'];
$private = $_POST['private'];
$password = $_POST['password'];
$description = $_POST['description'];
if(false){
$title = stripslashes($title);
$private = stripslashes($private);
$password = stripslashes($password);
$description = stripslashes($description);
}
$lang = $_POST['lang'];
$langmask=0;
foreach($lang as $t){
$langmask += 1<<$t;
}
$langmask = ((1<<count($language_ext))-1)&(~$langmask);
//echo $langmask;
$cid=intval($_POST['cid']);
if(!(isset($_SESSION[$OJ_NAME.'_'."m$cid"])||isset($_SESSION[$OJ_NAME.'_'.'administrator']))) exit();
$description = str_replace("<p>", "", $description);
$description = str_replace("</p>", "<br />", $description);
$description = str_replace(",", "&#44;", $description);
$sql = "UPDATE `contest` SET `title`=?,`description`=?,`start_time`=?,`end_time`=?,`private`=?,`langmask`=?,`password`=? WHERE `contest_id`=?";
//echo $sql;
pdo_query($sql,$title,$description,$starttime,$endtime,$private,$langmask,$password,$cid);
$sql = "DELETE FROM `contest_problem` WHERE `contest_id`=?";
pdo_query($sql,$cid);
$plist=trim($_POST['cproblem']);
$pieces = explode(',', $plist);
if(count($pieces)>0 && strlen($pieces[0])>0){
$sql_1 = "INSERT INTO `contest_problem`(`contest_id`,`problem_id`,`num`) VALUES (?,?,?)";
for($i=0; $i<count($pieces); $i++){
pdo_query($sql_1,$cid,intval($pieces[$i]),$i);
}
pdo_query("update solution set num=-1 where contest_id=?",$cid);
$plist="";
for($i=0; $i<count($pieces); $i++){
if($plist) $plist.=",";
$plist .= $pieces[$i];
$sql_2 = "update solution set num=? where contest_id=? and problem_id=?;";
pdo_query($sql_2,$i,$cid,$pieces[$i]);
}
$sql = "update `problem` set defunct='N' where `problem_id` in ($plist)";
pdo_query($sql) ;
}
$sql = "DELETE FROM `privilege` WHERE `rightstr`=?";
pdo_query($sql,"c$cid");
$pieces = explode("\n", trim($_POST['ulist']));
if(count($pieces)>0 && strlen($pieces[0])>0){
$sql_1 = "INSERT INTO `privilege`(`user_id`,`rightstr`) VALUES (?,?)";
for($i=0; $i<count($pieces); $i++){
pdo_query($sql_1,trim($pieces[$i]),"c$cid") ;
}
}
echo "<script>window.location.href=\"contest_list.php\";</script>";
exit();
}else{
$cid = intval($_GET['cid']);
$sql = "SELECT * FROM `contest` WHERE `contest_id`=?";
$result = pdo_query($sql,$cid);
if(count($result)!=1){
echo "No such Contest!";
exit(0);
}
$row = $result[0];
$starttime = $row['start_time'];
$endtime = $row['end_time'];
$private = $row['private'];
$password = $row['password'];
$langmask = $row['langmask'];
$description = $row['description'];
$title = htmlentities($row['title'],ENT_QUOTES,"UTF-8");
$plist = "";
$sql = "SELECT `problem_id` FROM `contest_problem` WHERE `contest_id`=? ORDER BY `num`";
$result=pdo_query($sql,$cid);
foreach($result as $row){
if($plist) $plist .= ",";
$plist.=$row[0];
}
$ulist = "";
$sql = "SELECT `user_id` FROM `privilege` WHERE `rightstr`=? order by user_id";
$result = pdo_query($sql,"c$cid");
foreach($result as $row){
if($ulist) $ulist .= "\n";
$ulist .= $row[0];
}
}
?>
<div class="container">
<form method=POST>
<?php require_once("../include/set_post_key.php");?>
<input type=hidden name='cid' value=<?php echo $cid?>>
<p align=left>
<?php echo "<h3>".$MSG_CONTEST."-".$MSG_TITLE."</h3>"?>
<input class="input input-xxlarge" style="width:100%;" type=text name=title value="<?php echo $title?>"><br><br>
</p>
<p align=left>
<?php echo $MSG_CONTEST.$MSG_Start?>:
<input class=input-large type=date name='startdate' value='<?php echo substr($starttime,0,10)?>' size=4 >
Hour: <input class=input-mini type=text name=shour size=2 value='<?php echo substr($starttime,11,2)?>'>&nbsp;
Minute: <input class=input-mini type=text name=sminute value='<?php echo substr($starttime,14,2)?>' size=2 >
</p>
<p align=left>
<?php echo $MSG_CONTEST.$MSG_End?>:
<input class=input-large type=date name='enddate' value='<?php echo substr($endtime,0,10)?>' size=4 >
Hour: <input class=input-mini type=text name=ehour size=2 value='<?php echo substr($endtime,11,2)?>'>&nbsp;
Minute: <input class=input-mini type=text name=eminute value='<?php echo substr($endtime,14,2)?>' size=2 >
</p>
<br>
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_PROBLEM_ID?>
<?php echo "( Add problemIDs with coma , )"?><br>
<input class=input-xxlarge type=text style="width:100%" name=cproblem value='<?php echo $plist?>'>
</p>
<br>
<p align=left>
<?php echo "<h4>".$MSG_CONTEST."-".$MSG_Description."</h4>"?>
<textarea class=kindeditor rows=13 name=description cols=80>
<?php echo htmlentities($description,ENT_QUOTES,'UTF-8')?>
</textarea>
<br>
<table width="100%">
<tr>
<td rowspan=2>
<p aligh=left>
<?php echo $MSG_CONTEST."-".$MSG_LANG?>
<?php echo "( Add PLs with Ctrl+click )"?><br>
<select name="lang[]" multiple="multiple" style="height:220px">
<?php
$lang_count = count($language_ext);
$lang = (~((int)$langmask))&((1<<$lang_count)-1);
if(isset($_COOKIE['lastlang'])) $lastlang=$_COOKIE['lastlang'];
else $lastlang = 0;
for($i=0; $i<$lang_count; $i++){
echo "<option value=$i ".( $lang&(1<<$i)?"selected":"").">".$language_name[$i]."</option>";
}
?>
</select>
</p>
</td>
<td height="10px">
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_Public?>:
<select name=private style="width:150px;">
<option value=0 <?php echo $private=='0'?'selected=selected':''?>><?php echo $MSG_Public?></option>
<option value=1 <?php echo $private=='1'?'selected=selected':''?>><?php echo $MSG_Private?></option>
</select>
<?php echo $MSG_CONTEST."-".$MSG_PASSWORD?>:
<input type=text name=password style="width:150px;" value='<?php echo htmlentities($password,ENT_QUOTES,'utf-8')?>'>
</p>
</td>
</tr>
<tr>
<td height="*">
<p align=left>
<?php echo $MSG_CONTEST."-".$MSG_USER?>
<?php echo "( Add private contest's userIDs with newline &#47;n )"?>
<br>
<textarea name="ulist" rows="10"style="width:100%;" placeholder="user1<?php echo "\n"?>user2<?php echo "\n"?>user3<?php echo "\n"?>*可以将学生学号从Excel整列复制过来然后要求他们用学号做UserID注册,就能进入Private的比赛作为作业和测验。"><?php if(isset($ulist)){ echo $ulist;}?></textarea>
</p>
</td>
</tr>
</table>
<div align=center>
<?php require_once("../include/set_post_key.php");?>
<input type=submit value=Submit name=submit><input type=reset value=Reset name=reset>
</div>
</p>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,121 @@
<?php
require("admin-header.php");
require_once("../include/set_get_key.php");
if(!(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'contest_creator']))){
echo "<a href='../loginpage.php'>Please Login First!</a>";
exit(1);
}
if(isset($OJ_LANG)){
require_once("../lang/$OJ_LANG.php");
}
?>
<title>Contest List</title>
<hr>
<center><h3><?php echo $MSG_CONTEST.$MSG_LIST?></h3></center>
<div class='container'>
<?php
$sql = "SELECT COUNT('contest_id') AS ids FROM `contest`";
$result = pdo_query($sql);
$row = $result[0];
$ids = intval($row['ids']);
$idsperpage = 10;
$pages = intval(ceil($ids/$idsperpage));
if(isset($_GET['page'])){ $page = intval($_GET['page']);}
else{ $page = 1;}
$pagesperframe = 5;
$frame = intval(ceil($page/$pagesperframe));
$spage = ($frame-1)*$pagesperframe+1;
$epage = min($spage+$pagesperframe-1, $pages);
$sid = ($page-1)*$idsperpage;
$sql = "";
if(isset($_GET['keyword']) && $_GET['keyword']!=""){
$keyword = $_GET['keyword'];
$keyword = "%$keyword%";
$sql = "SELECT `contest_id`,`title`,`start_time`,`end_time`,`private`,`defunct` FROM `contest` WHERE (title LIKE ?) OR (description LIKE ?) ORDER BY `contest_id` DESC";
$result = pdo_query($sql,$keyword,$keyword);
}else{
$sql = "SELECT `contest_id`,`title`,`start_time`,`end_time`,`private`,`defunct` FROM `contest` ORDER BY `contest_id` DESC LIMIT $sid, $idsperpage";
$result = pdo_query($sql);
}
?>
<form action=contest_list.php class="center">
<input name=keyword><input type=submit value="<?php echo $MSG_SEARCH?>">
</form>
<center>
<table width=100% border=1 style="text-align:center;">
<tr>
<td>ID</td>
<td>TITLE</td>
<td>START</td>
<td>END</td>
<td>OPEN</td>
<td>NOW</td>
<td>EDIT</td>
<td>COPY</td>
<td>EXPORT</td>
<td>LOGS</td>
<td>SUSPECT</td>
</tr>
<?php
foreach($result as $row){
echo "<tr>";
echo "<td>".$row['contest_id']."</td>";
echo "<td><a href='../contest.php?cid=".$row['contest_id']."'>".$row['title']."</a></td>";
echo "<td>".$row['start_time']."</td>";
echo "<td>".$row['end_time']."</td>";
$cid = $row['contest_id'];
if(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'."m$cid"])){
echo "<td><a href=contest_pr_change.php?cid=".$row['contest_id']."&getkey=".$_SESSION[$OJ_NAME.'_'.'getkey'].">".($row['private']=="0"?"<span class=green>Public</span>":"<span class=red>Private<span>")."</a></td>";
echo "<td><a href=contest_df_change.php?cid=".$row['contest_id']."&getkey=".$_SESSION[$OJ_NAME.'_'.'getkey'].">".($row['defunct']=="N"?"<span class=green>Available</span>":"<span class=red>Reserved</span>")."</a></td>";
echo "<td><a href=contest_edit.php?cid=".$row['contest_id'].">Edit</a></td>";
echo "<td><a href=contest_add.php?cid=".$row['contest_id'].">Copy</a></td>";
if(isset($_SESSION[$OJ_NAME.'_'.'administrator'])){
echo "<td><a href=\"problem_export_xml.php?cid=".$row['contest_id']."&getkey=".$_SESSION[$OJ_NAME.'_'.'getkey']."\">Export</a></td>";
}else{
echo "<td></td>";
}
echo "<td> <a href=\"../export_contest_code.php?cid=".$row['contest_id']."&getkey=".$_SESSION[$OJ_NAME.'_'.'getkey']."\">Logs</a></td>";
}else{
echo "<td colspan=5 align=right><a href=contest_add.php?cid=".$row['contest_id'].">Copy</a><td>";
}
echo "<td><a href='suspect_list.php?cid=".$row['contest_id']."'>Suspect</a></td>";
echo "</tr>";
}
?>
</table>
</center>
<?php
if(!(isset($_GET['keyword']) && $_GET['keyword']!=""))
{
echo "<div style='display:inline;'>";
echo "<nav class='center'>";
echo "<ul class='pagination pagination-sm'>";
echo "<li class='page-item'><a href='contest_list.php?page=".(strval(1))."'>&lt;&lt;</a></li>";
echo "<li class='page-item'><a href='contest_list.php?page=".($page==1?strval(1):strval($page-1))."'>&lt;</a></li>";
for($i=$spage; $i<=$epage; $i++){
echo "<li class='".($page==$i?"active ":"")."page-item'><a title='go to page' href='contest_list.php?page=".$i."'>".$i."</a></li>";
}
echo "<li class='page-item'><a href='contest_list.php?page=".($page==$pages?strval($page):strval($page+1))."'>&gt;</a></li>";
echo "<li class='page-item'><a href='contest_list.php?page=".(strval($pages))."'>&gt;&gt;</a></li>";
echo "</ul>";
echo "</nav>";
echo "</div>";
}
?>
</div>

View File

@@ -0,0 +1,22 @@
<?php require_once("admin-header.php");
require_once("../include/check_get_key.php");
$cid=intval($_GET['cid']);
if(!(isset($_SESSION[$OJ_NAME.'_'."m$cid"])||isset($_SESSION[$OJ_NAME.'_'.'administrator']))) exit();
$sql="select `private` FROM `contest` WHERE `contest_id`=?";
$result=pdo_query($sql,$cid);
$num=count($result);
if ($num<1){
echo "No Such Problem!";
exit(0);
}
$row=$result[0];
if (intval($row[0])==0) $sql="UPDATE `contest` SET `private`='1' WHERE `contest_id`=?";
else $sql="UPDATE `contest` SET `private`='0' WHERE `contest_id`=?";
pdo_query($sql,$cid);
?>
<script language=javascript>
history.go(-1);
</script>

79
web/swadmin/help.php Normal file
View File

@@ -0,0 +1,79 @@
<?php require_once("admin-header.php");
if(isset($OJ_LANG)){
require_once("../lang/$OJ_LANG.php");
}
?>
<html>
<head>
<title><?php echo $MSG_ADMIN?></title>
</head>
<body>
<h3><?php echo $MSG_HELP?></h3>
<hr>
<h4>
<ul>
<li><a class='btn btn-primary' href="../status.php" target="_top"><b><?php echo $MSG_SEEOJ?></b></a><?php echo $MSG_HELP_SEEOJ?>
<?php if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="setmsg.php" target="main"><b><?php echo $MSG_SETMESSAGE?></b></a><?php echo $MSG_HELP_SETMESSAGE?>
<li><a class='btn btn-primary' href="news_list.php" target="main"><b><?php echo $MSG_NEWS.$MSG_LIST?></b></a><?php echo $MSG_HELP_NEWS_LIST?>
<li><a class='btn btn-primary' href="news_add_page.php" target="main"><b><?php echo $MSG_ADD.$MSG_NEWS?></b></a><?php echo $MSG_HELP_ADD_NEWS?>
<li><a class='btn btn-primary' href="user_list.php" target="main"><b><?php echo $MSG_USER.$MSG_LIST?></b></a><?php echo $MSG_HELP_USER_LIST?>
<li><a class='btn btn-primary' href="user_set_ip.php" target="main"><b><?php echo $MSG_SET_LOGIN_IP?></b></a><?php echo $MSG_SET_LOGIN_IP?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset( $_SESSION[$OJ_NAME.'_'.'password_setter'] )){?>
<li><a class='btn btn-primary' href="changepass.php" target="main"><b><?php echo $MSG_SETPASSWORD?></b></a><?php echo $MSG_HELP_SETPASSWORD?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="source_give.php" target="main"><b><?php echo $MSG_GIVESOURCE?></b></a><?php echo $MSG_HELP_GIVESOURCE?>
<li><a class='btn btn-primary' href="privilege_list.php" target="main"><b><?php echo $MSG_PRIVILEGE.$MSG_LIST?></b></a><?php echo $MSG_HELP_PRIVILEGE_LIST?>
<li><a class='btn btn-primary' href="privilege_add.php" target="main"><b><?php echo $MSG_ADD.$MSG_PRIVILEGE?></b></a><?php echo $MSG_HELP_ADD_PRIVILEGE?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'contest_creator'])||isset($_SESSION[$OJ_NAME.'_'.'problem_editor'])){?>
<li><a class='btn btn-primary' href="problem_list.php" target="main"><b><?php echo $MSG_PROBLEM.$MSG_LIST?></b></a><?php echo $MSG_HELP_PROBLEM_LIST?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'problem_editor'])){?>
<li><a class='btn btn-primary' href="problem_add_page.php" target="main"><b><?php echo $MSG_ADD.$MSG_PROBLEM?></b></a><?php echo $MSG_HELP_ADD_PROBLEM?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="problem_import.php" target="main"><b><?php echo $MSG_IMPORT.$MSG_PROBLEM?></b></a><?php echo $MSG_HELP_IMPORT_PROBLEM?>
<li><a class='btn btn-primary' href="problem_export.php" target="main"><b><?php echo $MSG_EXPORT.$MSG_PROBLEM?></b></a><?php echo $MSG_HELP_EXPORT_PROBLEM?>
<?php }?>
<li><a class='btn btn-primary' href="https://github.com/zhblue/freeproblemset/" target="_blank"><b>FreeProblemSet</b></a>
<?php
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'contest_creator'])){?>
<li><a class='btn btn-primary' href="contest_list.php" target="main"><b><?php echo $MSG_CONTEST.$MSG_LIST?></b></a><?php echo $MSG_HELP_CONTEST_LIST?>
<li><a class='btn btn-primary' href="contest_add.php" target="main"><b><?php echo $MSG_ADD.$MSG_CONTEST?></b></a><?php echo $MSG_HELP_ADD_CONTEST?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="team_generate.php" target="main"><b><?php echo $MSG_TEAMGENERATOR?></b></a><?php echo $MSG_HELP_TEAMGENERATOR?>
<?php }
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="rejudge.php" target="main"><b><?php echo $MSG_REJUDGE?></b></a><?php echo $MSG_HELP_REJUDGE?>
<?php }?>
<li><a class='btn btn-primary' href="https://github.com/zhblue/hustoj/" target="_blank"><b>HUSTOJ</b></a>
<?php
if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])){?>
<li><a class='btn btn-primary' href="update_db.php" target="main"><b><?php echo $MSG_UPDATE_DATABASE?></b></a><?php echo $MSG_HELP_UPDATE_DATABASE?>
<?php }
if (isset($OJ_ONLINE)&&$OJ_ONLINE){?>
<li><a class='btn btn-primary' href="../online.php" target="main"><b><?php echo $MSG_ONLINE?></b></a><?php echo $MSG_HELP_ONLINE?>
<?php }?>
<li><a class='btn btn-primary' href="http://tk.hustoj.com" target="_blank"><b>自助题库</b></a>
<li><a class='btn btn-primary' href="http://shang.qq.com/wpa/qunwpa?idkey=d52c3b12ddaffb43420d308d39118fafe5313e271769277a5ac49a6fae63cf7a" target="_blank">手机QQ加官方群23361372</a>
</ul>
<?php if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])&&!$OJ_SAE){
?>
<a href="problem_copy.php" target="main" title="Create your own data"><font color="eeeeee">CopyProblem</font></a> <br>
<a href="problem_changeid.php" target="main" title="Danger,Use it on your own risk"><font color="eeeeee">ReOrderProblem</font></a>
<?php }
?>
<h4>
</body>
</html>

51
web/swadmin/index.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
//$cur_path = "template/$OJ_TEMPLATE/";
//$dir=basename(getcwd());
//echo $cur_path;
//echo $dir;
//?>
<!--<html>-->
<!--<head>-->
<!-- <title>JudgeOnline Administration</title>-->
<!-- <link rel="stylesheet" href="layui/css/layui.css">-->
<!-- <script src="layui/layui.js"></script>-->
<!--</head>-->
<!--<frameset cols="20%,*">-->
<!-- <frame name="menu" src="menu.php">-->
<!-- <frame name="main" src="help.php">-->
<!-- <noframes>-->
<!-- </noframes>-->
<!--</frameset>-->
<!--<body>-->
<!--<div style="display: flex;flex-direction: row">-->
<!-- <div style="display: flex">-->
<?php include("swmenu.php");?>
<!-- </div>-->
<!-- <div><div style="width: 300px;height: 300px;background-color: #0e90d2"></div></div>-->
<!--</div>-->
<!--<ul class="layui-nav layui-nav-tree layui-nav-side" lay-filter="">-->
<!-- <li class="layui-nav-item"><a href="">最新活动</a></li>-->
<!-- <li class="layui-nav-item layui-this"><a href="">产品</a></li>-->
<!-- <li class="layui-nav-item"><a href="">大数据</a></li>-->
<!-- <li class="layui-nav-item">-->
<!-- <a href="javascript:;">解决方案</a>-->
<!-- <dl class="layui-nav-child"> <!-- 二级菜单 -->-->
<!-- <dd><a href="">移动模块</a></dd>-->
<!-- <dd><a href="">后台模版</a></dd>-->
<!-- <dd><a href="">电商平台</a></dd>-->
<!-- </dl>-->
<!-- </li>-->
<!-- <li class="layui-nav-item"><a href="">社区</a></li>-->
<!--</ul>-->
<!---->
<!--<script>-->
<!-- //注意:导航 依赖 element 模块,否则无法进行功能性操作-->
<!-- layui.use('element', function(){-->
<!-- var element = layui.element;-->
<!---->
<!-- //…-->
<!-- });-->
<!--</script>-->
<!--</body>-->
<!--</html>-->

View File

@@ -0,0 +1,30 @@
<meta charset="utf-8" />
<link rel="stylesheet" href="../kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="../kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="../kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="../kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../kindeditor/plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function(K) {
var editor1 = K.create('textarea[class="kindeditor"]', {
width : '100%',
cssPath : '../kindeditor/plugins/code/prettify.css',
uploadJson : '../kindeditor/php/upload_json.php',
fileManagerJson : '../kindeditor/php/file_manager_json.php',
allowFileManager : false,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});
}
});
prettyPrint();
});
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/** layui-v2.4.3 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,2 @@
/** layui-v2.4.3 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});

Some files were not shown because too many files have changed in this diff Show More