Skip to content

Commit 447dd0c

Browse files
authored
Merge pull request #154 from zhblue/pdo
few add
2 parents 3c39296 + 81ea972 commit 447dd0c

File tree

7 files changed

+505
-6
lines changed

7 files changed

+505
-6
lines changed

trunk/web/admin/problem_add_loj.php

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
$spj = stripslashes ( $spj);
4242
$source = stripslashes ( $source );
4343
}
44+
$description ='<link href="https://dn-menci.qbox.me/libreoj/libs/KaTeX/katex.min.css" rel="stylesheet">'. $description ;
4445
//echo "->".$OJ_DATA."<-";
4546
$pid=addproblem ( $title, $time_limit, $memory_limit, $description, $input, $output, $sample_input, $sample_output, $hint, $source, $spj, $OJ_DATA );
4647
$basedir = "$OJ_DATA/$pid";

trunk/web/admin/problem_add_page_loj.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
$baseurl=substr($url,0,strrpos($url,"/")+1);
3434
//echo $baseurl;
3535
$html = file_get_html($url);
36-
foreach($html->find('img') as $element)
37-
$element->src=$baseurl.$element->src;
36+
// foreach($html->find('img') as $element)
37+
// $element->src=$baseurl.$element->src;
3838

3939
$element=$html->find('h1',0);
4040
$title=trim($element->plaintext);

trunk/web/admin/problem_list.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
$sql="";
4141
if($keyword) {
4242
$keyword="%$keyword%";
43-
$sql="select `problem_id`,`title`,`in_date`,`defunct` FROM `problem` where title like ? or source like ?";
43+
$sql="select `problem_id`,`title`,`accepted`,`in_date`,`defunct` FROM `problem` where title like ? or source like ?";
4444
$result=pdo_query($sql,$keyword,$keyword);
4545
}else{
46-
$sql="select `problem_id`,`title`,`in_date`,`defunct` FROM `problem` where problem_id>=? and problem_id<=? order by `problem_id` desc";
46+
$sql="select `problem_id`,`title`,`accepted`,`in_date`,`defunct` FROM `problem` where problem_id>=? and problem_id<=? order by `problem_id` desc";
4747
$result=pdo_query($sql,$pstart,$pend);
4848
}
4949
?>
@@ -53,7 +53,7 @@
5353
echo "<center><table class='table table-striped' width=90% border=1>";
5454
echo "<form method=post action=contest_add.php>";
5555
echo "<tr><td colspan=7><input type=submit name='problem2contest' value='CheckToNewContest'>";
56-
echo "<tr><td>PID<td>Title<td>Date";
56+
echo "<tr><td>PID<td>Title<td>AC<td>Date";
5757
if(isset($_SESSION['administrator'])||isset($_SESSION['problem_editor'])){
5858
if(isset($_SESSION['administrator'])) echo "<td>Status<td>Delete";
5959
echo "<td>Edit<td>TestData</tr>";
@@ -63,6 +63,7 @@
6363
echo "<td>".$row['problem_id'];
6464
echo "<input type=checkbox name='pid[]' value='".$row['problem_id']."'>";
6565
echo "<td><a href='../problem.php?id=".$row['problem_id']."'>".$row['title']."</a>";
66+
echo "<td>".$row['accepted'];
6667
echo "<td>".$row['in_date'];
6768
if(isset($_SESSION['administrator'])||isset($_SESSION['problem_editor'])){
6869
if(isset($_SESSION['administrator'])){

trunk/web/template/bs3/css.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
$dir=basename(getcwd());
4-
if($dir=="discuss3") $path_fix="../";
4+
if($dir=="discuss3"||$dir=="admin") $path_fix="../";
55
else $path_fix="";
66
?>
77

@@ -13,6 +13,10 @@
1313
<link rel="stylesheet" href="<?php echo $path_fix."template/$OJ_TEMPLATE/"?>bootstrap-theme.min.css">
1414
<?php }?>
1515
<link rel="stylesheet" href="<?php echo $path_fix."template/$OJ_TEMPLATE/$OJ_CSS"?>">
16+
<link rel="stylesheet" href="<?php echo $path_fix."template/$OJ_TEMPLATE/"?>katex.min.css">
17+
<link rel="stylesheet" href="<?php echo $path_fix."template/$OJ_TEMPLATE/"?>mathjax.css">
18+
<link rel="stylesheet" href="<?php echo $path_fix."template/$OJ_TEMPLATE/"?>semantic.min.css">
1619

1720

1821

22+
<link href="https://dn-menci.qbox.me/libreoj/mathjax.css" rel="stylesheet">

trunk/web/template/bs3/katex.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

trunk/web/template/bs3/mathjax.css

+127
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)