forked from BNUACM/bnuoj-web-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontest_convert_tool.php
More file actions
36 lines (35 loc) · 998 Bytes
/
Copy pathcontest_convert_tool.php
File metadata and controls
36 lines (35 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
include_once("header.php");
include_once("menu.php");
?>
<div id="site_content">
<div id="one_content_container">
<div id="one_content_top"></div>
<div id="one_content">
<!-- insert the page content here -->
<?php
// mysql_query("update problem set title=trim(title)");
$res=mysql_query("select cid from contest");
while ($row=mysql_fetch_array($res)) {
$cres=mysql_query("select problem.title from contest_problem,problem where cid=".$row[0]." and contest_problem.pid=problem.pid");
$str=array();
while ($crow=mysql_fetch_array($cres)) {
$str[]=trim(strtolower($crow[0]));
}
sort($str);
mysql_query("update contest set allp='".md5(implode($str,"[-,-]"))."' where cid=".$row[0]);
}
echo "Converted.";
?>
</div>
<div id="one_content_base"></div>
</div>
</div>
<?php
include("footer.php");
?>
<script type="text/javascript">
</script>
<?php
include("end.php");
?>