Example #1
0
<?php

require "./navigation.php";
include_once "./FCKeditor/fckeditor.php";
$cid = tryget('cid', 0);
$rs = new RecordSet($conn);
if ($cid) {
    $contest = new ContestsTbl($cid);
    $contest->Get() or error("contest not exists");
    $contest_title = $contest->detail['title'];
    $problems_n = gen_new_cpid($cid);
} else {
    $contest_title = "";
    $problems_n = gen_new_pid();
}
?>
  

<script type="text/javascript">

    var datanum=0;

    function insert()
    {
        var box = "";
        box += "<tr>";
        box += "<td>Input Data"+datanum+"</td>";
        box += "<td><input type=file name=\"input_data"+datanum+"\" id=\"input_data"+datanum+"\"></td>";
        box += "</tr>";

        box += "<tr>";
Example #2
0
function AddContestProblem(&$arg)
{
    $cid = $arg['cid'];
    if ($cid == 0) {
        AddProblem($arg);
        exit;
    }
    $cpid = $arg['pid'];
    $pid = gen_new_pid();
    $arg['pid'] = $pid;
    AddProblem($arg, false);
    set_problem_cid($pid, $cid, $cpid);
    MsgAndRedirect("contest_detail.php?cid={$cid}");
}