Please Login First!"; exit(1); } ?> Edit Problem

"."Edit-".$MSG_PROBLEM."

"; include_once("kindeditor.php") ; ?>
'>

: '>

sec MiB

".$MSG_Description.""?>

".$MSG_Input.""?>

".$MSG_Output.""?>

".$MSG_Sample_Input.""?>

".$MSG_Sample_Output.""?>

".$MSG_HINT.""?>

".$MSG_SPJ.""?>
title='Normal Judger'>
title='Special Judger'>
title='Raw Text Judger' >

".$MSG_SOURCE." 用空格分隔".""?>
".$MSG_REMOTE_OJ.""?> ' placeholder='' > ' placeholder='' >

", "", $description); // $description = str_replace("

", "
", $description); // $description = str_replace(",", ",", $description); // $description = html_entity_decode($description,ENT_QUOTES,"UTF-8"); $input = $_POST['input']; // $input = str_replace("

", "", $input); // $input = str_replace("

", "
", $input); // $input = str_replace(",", ",", $input); // $input = html_entity_decode($input,ENT_QUOTES,"UTF-8"); $output = $_POST['output']; // $output = str_replace("

", "", $output); // $output = str_replace("

", "
", $output); // $output = str_replace(",", ",", $output); // $output = html_entity_decode($output,ENT_QUOTES,"UTF-8"); $sample_input = $_POST['sample_input']; $sample_output = $_POST['sample_output']; //if ($sample_input=="") $sample_input="\n"; //if ($sample_output=="") $sample_output="\n"; $hint = $_POST['hint']; // $hint = str_replace("

", "", $hint); // $hint = str_replace("

", "
", $hint); // $hint = str_replace(",", ",", $hint); // $hint = html_entity_decode($hint,ENT_QUOTES,"UTF-8"); $source = $_POST['source']; $remote_oj= $_POST['remote_oj']; $remote_id = $_POST['remote_id']; $spj = $_POST['spj']; if (false) { $title = stripslashes($title); $time_limit = stripslashes($time_limit); $memory_limit = stripslashes($memory_limit); $description = stripslashes($description); $input = stripslashes($input); $output = stripslashes($output); $sample_input = stripslashes($sample_input); $sample_output = stripslashes($sample_output); //$test_input = stripslashes($test_input); //$test_output = stripslashes($test_output); $hint = stripslashes($hint); $source = stripslashes($source); $spj = stripslashes($spj); } $title = ($title); $description = ($description); $input = ($input); $output = ($output); $hint = ($hint); $basedir = $OJ_DATA."/$id"; echo "Problem Updated!
"; if ($sample_input && file_exists($basedir."/sample.in")) { //mkdir($basedir); $fp = fopen($basedir."/sample.in","w"); fputs($fp,preg_replace("(\r\n)","\n",$sample_input)); fclose($fp); $fp = fopen($basedir."/sample.out","w"); fputs($fp,preg_replace("(\r\n)","\n",$sample_output)); fclose($fp); } $spj = intval($spj); $sql = "UPDATE `problem` SET `title`=?,`time_limit`=?,`memory_limit`=?, `description`=?,`input`=?,`output`=?,`sample_input`=?,`sample_output`=?,`hint`=?,`source`=?,`spj`=?,remote_oj=?,remote_id=?,`in_date`=NOW() WHERE `problem_id`=?"; @pdo_query($sql,$title,$time_limit,$memory_limit,$description,$input,$output,$sample_input,$sample_output,$hint,$source,$spj,$remote_oj,$remote_id,$id); echo "Edit OK!
"; echo "See The Problem!"; } ?>