<?php require_once 'include/function.php'; set_ojinfo('title', 'ECUST Online Judge - Error'); include 'include/header.php'; ?> <center><h1>Error: <?php echo get_to_html($_GET['msg']); ?> </h1> <br/> <a href='javascript:history.go(-1);'>Go Back</a> </center> <?php include 'include/footer.php'; ?>
$_GET['pro_id'] = $_POST['pro_id']; } ?> <form name="form1" method="post" action="problemsubmit.php"> <label>Problem ID: <input type="text" name="pro_id" value="<?php if (isset($_GET['pro_id'])) { echo htmlspecialchars($_GET['pro_id']); } ?> "> </label> <?php if (!empty($_GET['contest_id'])) { $contest_id = get_to_html($_GET['contest_id']); echo "<label>Contest ID:<input name='contest_id' value='{$contest_id}'></label>"; } ?> <p> <label>Language: <?php $submit_language = $language_array; unset($submit_language['']); unset($submit_language[3]); //pascal //unset($submit_language[4]);//java unset($submit_language[5]); //python Draw_Options($submit_language, 'language', 2); ?>
} else { function draw_fillin($left, $name, $right) { echo '<tr>'; echo '<td>' . htmlspecialchars($left) . '</td>'; echo "<td><input name={$name} value='" . htmlspecialchars($right) . "'/></td>"; echo '</tr>'; } include 'include/header.php'; ?> <form action="modifyuser.php" method="post" onsubmit="return check_update()"> <table align="center"> <?php if (isset($_GET['msg'])) { echo "<tr><td colspan=2 style='text-align:center'>" . get_to_html($_GET['msg']) . "</td></tr>"; } ?> <tr> <td>User ID:</td> <td><?php echo htmlspecialchars($row['name']); ?> </td> </tr> <tr> <td>Password:</td> <td><input name="pwd" id="old_pwd" type="password"/></td> </tr> <tr> <td>New Password:</td>
?> <form action="" method="get"> User ID: <input name="user_id" <?php if (isset($status_user_name)) { echo ' value="' . htmlspecialchars($status_user_name) . '"'; } ?> /> Problem ID: <input name="pro_id" <?php if (!empty($_GET['pro_id'])) { echo ' value="' . get_to_html($_GET['pro_id']) . '"'; } ?> /> Result: <?php Draw_Options($result_array, 'result', $_GET['result']); ?> Language: <?php Draw_Options($language_array, 'language', $_GET['language']); ?> <input type="submit" value="Go" /> </form> <table class='table_list wide_list' border=1> <tr>
set_ojinfo('title', 'ECUST Online Judge - SendMail'); include 'include/header.php'; if (isset($_POST['to'])) { $title = get_to_mysql($_POST['title']); $text = get_to_mysql($_POST['textarea']); $query = "insert into mails (to_user_id,from_user_id,mail_time,title,content,readed,reader_del,writer_del)" . " values({$to_user_id}, {$from_user_id}, now(), '{$title}', '{$text}', 0, 0, 0)"; oj_query($query); echo "<center><h1>Send Mail Successfully!</h1></center>"; } else { ?> <center><h1 style="color:#00f;">Write Mail</h1></center> <form name="form1" method="post" action="mailsend.php" onsubmit="return check_mail()"> <label><strong>To(name):</strong> <input name="to" type="text" id="mail_to" size="25" <?php if (strlen($to_user_name) > 0) { echo 'value="' . get_to_html($to_user_name) . '"'; } ?> > </label> <p> <label><strong>Title:</strong> <input name="title" type="text" id="mail_title" size="50"> </label> </p> <p> <label> <textarea name="textarea" id="mail_text" cols="100" rows="25"></textarea> </label> </p> <p>
$search_url = 'search.php?text=' . urlencode($search_text) . '&field=' . urlencode($search_field); $search_table = $search_array[$search_field]; if (!isset($search_table)) { $search_table = $search_array['title']; } if ($search_table[1] == 'user_mark') { if (!isset($_SESSION['user_id'])) { redirect('error.php?msg=' . urlencode('Please login first')); } if (!is_numeric($search_text)) { redirect('error.php?msg=' . urlencode('Failed to search')); } } set_ojinfo('title', 'ECUST Online Judge - Search'); include 'include/header.php'; Draw_search_box($search_field, get_to_html($_GET['text'])); echo '<table class="table_list row_hover" border=1>'; if ($search_table[1] == 'users') { $query = 'select user_id,name,emailaddr,submits,solved,nick_name,school,fromaddr ' . "from users where {$search_table[0]} like '%{$search_text}%' " . 'order by solved desc,submits asc '; $ret = oj_query($query); echo '<tr>'; echo '<th>No.</th>'; echo '<th>User ID</th>'; echo '<th>Nick name</th>'; echo '<th>Email</th>'; echo '<th>School</th>'; echo '<th>Come from</th>'; echo '<th>Solved</th>'; echo '<th>Submits</th>'; echo '</tr>'; $i = 1;
redirect('error.php?msg=' . urlencode('Access denied')); } if (isset($_GET['do_unban'])) { $pro_unban = implode(',', explode(' ', $_GET['do_unban'])); $query = "update problems set banned=0 where pro_id in ({$pro_unban})"; $ret = oj_query($query); redirect('problemlist.php'); } if (isset($_GET['do_ban'])) { $pro_unban = implode(',', explode(' ', $_GET['do_ban'])); $query = "update problems set banned=1 where pro_id in ({$pro_unban})"; $ret = oj_query($query); redirect('problemlist.php'); } if (isset($_GET['pro_id'])) { $pro_id = get_to_html($_GET['pro_id']); } if (isset($_POST['title'])) { $pro_title = get_to_mysql($_POST['title']); $pro_des = get_to_mysql($_POST['description']); $pro_in = get_to_mysql($_POST['input']); $pro_out = get_to_mysql($_POST['output']); $pro_samin = get_to_mysql($_POST['sample_input']); $pro_samout = get_to_mysql($_POST['sample_output']); $pro_hint = get_to_mysql($_POST['hint']); $pro_source = get_to_mysql($_POST['source']); $pro_tle = get_to_mysql($_POST['time_limit']); $pro_ctle = get_to_mysql($_POST['case_time_limit']); $pro_mle = get_to_mysql($_POST['mem_limit']); $pro_ban = get_to_mysql($_POST['banned']); $pro_spj = get_to_mysql($_POST['isspj']);