" onsubmit="return check_editc();">
<table align=center>
	<tr>
		<td>Contest&nbsp;ID:</td>
		<td><?php 
echo $editc_id;
?>
</td>
	</tr>
<?php 
draw_fillin('Title:', 'input', 'title', " maxlength=200 value='{$row['title']}'");
draw_fillin('Description:', 'textarea', 'description', '', '', $row['description']);
draw_fillin('Start time:', 'input', 'start_time', " value='{$row['start_time']}'");
draw_fillin('End time:', 'input', 'end_time', " value='{$row['end_time']}'");
draw_fillin('Password:'******'input', 'att_pwd', ' type=password id="editc_pwd" ');
draw_fillin('Repeat password:'******'input', 'att_pwd2', ' type=password id="editc_pwd2" ');
?>
	<tr>
		<td></td>
		<td><input type='submit' name='submit' value='Submit'/></td>
	</tr>
</table>
</form>
<script src="include/md5.js"></script>
<script language="javascript">
function check_editc() {
	var ps = document.getElementById('editc_pwd');
	var ps2= document.getElementById('editc_pwd2');
	if (ps.value!=ps2.value) {
		alert("Password do not match.");
		return false;
Exemple #2
0
		<td>Password:</td>
		<td><input name="pwd" id="old_pwd" type="password"/></td>
	</tr>
	<tr>
		<td>New&nbsp;Password:</td>
		<td><input name="newpwd" id="new_pwd" type="password"/></td>
	</tr>
	<tr>
		<td>Repeat&nbsp;password:</td>
		<td><input name="newpwd2" id="new_pwd2" type="password"/></td>
	</tr>
<?php 
    draw_fillin('Email:', 'email', $row['emailaddr']);
    draw_fillin('Nick name:', 'nick', $row['nick_name']);
    draw_fillin('School:', 'school', $row['school']);
    draw_fillin('Come from:', 'fromaddr', $row['fromaddr']);
    ?>
	<tr>
		<td></td>
		<td><input name="submit" value="Update" type="submit"/></td>
	</tr>
</table>
</form>
<script src="include/md5.js"></script>
<script language="javascript">
function check_update() {
	var ps = document.getElementById('old_pwd');
	if (ps.value.length <= 0) {
		alert("Please input your Password.");
		return false;
	}
Exemple #3
0
draw_fillin('Source:', 'input', 'source', ' maxlength="200" style="width:800px;" value="' . htmlspecialchars($row['source']) . '" ');
draw_fillin('Time limit:', 'input', 'time_limit', ' value="' . htmlspecialchars($row['time_limit']) . '" ', 'MS');
draw_fillin('Case time limit:', 'input', 'case_time_limit', ' value="' . htmlspecialchars($row['case_time_limit']) . '" ', 'MS' . ' (if no case time limit, set case time limit=time limit)');
draw_fillin('Memory limit:', 'input', 'mem_limit', ' value="' . htmlspecialchars($row['mem_limit']) . '" ', 'K');
if ($row['banned'] != 0) {
    $pro_ban = 'checked';
} else {
    $pro_ban = '';
}
if ($row['isspj'] != 0) {
    $pro_spj = 'checked';
} else {
    $pro_spj = '';
}
draw_fillin('Banned:', 'input', 'banned', ' value="1" type=checkbox ' . $pro_ban);
draw_fillin('IsSpj:', 'input', 'isspj', ' value="1" type=checkbox ' . $pro_spj);
?>
        <tr>
            <td></td>
            <td><input type='submit' name='submit' value='Submit'/></td>
        </tr>
    </table>
</form>
<script type="text/javascript" src="libs/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="libs/ckfinder/ckfinder.js"></script>
<script type="text/javascript">
function replaceEditor(name, style) {
	style = style || 'OJBasic';
	var editor = CKEDITOR.replace(name, {toolbar: style});
	CKFinder.setupCKEditor( editor, 'libs/ckfinder/' ) ;
}