Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print syzoj #1029

Merged
merged 2 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions trunk/web/template/syzoj/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ class="edit icon"></i><?php echo $MSG_REG_INFO;?></a>


?>
<?php
if(isset($OJ_PRINTER) && $OJ_PRINTER)
{
?>
<a class="item" href="printer.php">
<i class="print icon"></i> <?php echo $MSG_PRINTER?>
</a>
<?php
}
?>
<a class="item" href="logout.php"><i class="power icon"></i><?php echo $MSG_LOGOUT;?></a>
</div>
</div>
Expand Down
24 changes: 24 additions & 0 deletions trunk/web/template/syzoj/printer_add.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
$show_title="$MSG_ERROR_INFO - $OJ_NAME";
if(isset($OJ_MEMCACHE)) include(dirname(__FILE__)."/header.php");
if($mark==100) {
$ui_class="positive";
$ui_icon="check";
}else{
$ui_class="negative";
$ui_icon="remove";
}
?>
<div class="ui <?php echo $ui_class?> icon message">

<center>
<form id=frmSolution action="printer.php" method="post">
<textarea style="width:80%" cols=180 rows=20 id="source" name="content">
</textarea><br>
<input type="submit" value="<?php echo $MSG_PRINTER?>">
<?php require_once(dirname(__FILE__)."/../../include/set_post_key.php")?>
</form>
</center>
</div>

<?php include(dirname(__FILE__)."/footer.php");?>
45 changes: 45 additions & 0 deletions trunk/web/template/syzoj/printer_list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
$show_title="$MSG_ERROR_INFO - $OJ_NAME";
if(isset($OJ_MEMCACHE)) include(dirname(__FILE__)."/header.php");
if($mark==100) {
$ui_class="positive";
$ui_icon="check";
}else{
$ui_class="negative";
$ui_icon="remove";
}
?>
<div class="ui <?php echo $ui_class?> icon message">

<?php include("template/$OJ_TEMPLATE/nav.php");?>
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<form action="printer.php" method="post" onsubmit="return confirm('Delete All Tasks?');">
<input type="hidden" name="clean" >
<input type="submit" class='btn btn-danger' value="Clean">
<?php require_once(dirname(__FILE__)."/../../include/set_post_key.php")?>
</form>

<table class="table table-striped content-box-header">
<tr><td>id<td><?php echo $MSG_USER_ID?><td><?php echo $MSG_STATUS?><td></tr>
<?php
foreach($view_printer as $row){
echo "<tr>\n";
foreach($row as $table_cell){
echo "<td>";
echo $table_cell;
echo "</td>";
}
$i++;
echo "</tr>\n";
}
?>
</table>

<p>
</p>
</div>

</div>

<?php include(dirname(__FILE__)."/footer.php");?>
38 changes: 38 additions & 0 deletions trunk/web/template/syzoj/printer_view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title><?php echo htmlentities(str_replace("\n\r","\n",$view_user),ENT_QUOTES,"utf-8")?></title>
</head>
<body>
<link href='<?php echo $OJ_CDN_URL?>highlight/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='<?php echo $OJ_CDN_URL?>highlight/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='<?php echo $OJ_CDN_URL?>highlight/scripts/shCore.js' type='text/javascript'></script>
<script src='<?php echo $OJ_CDN_URL?>highlight/scripts/shBrushCpp.js' type='text/javascript'></script>
<script language='javascript'>
function draw(){
SyntaxHighlighter.config.bloggerMode = false;
SyntaxHighlighter.config.clipboardSwf = '<?php echo $OJ_CDN_URL?>highlight/scripts/clipboard.swf';
SyntaxHighlighter.highlight();
}
</script>

<input onclick="draw()" type="button" value="Line Number">
<input onclick="window.print();" type="button" value="<?php echo $MSG_PRINTER?>">
<input onclick="location.href='printer.php?id=<?php echo $id?>';" type="button" value="<?php echo $MSG_PRINT_DONE?>"><br>
<?php
echo "<h2>".htmlentities(str_replace("\n\r","\n",$view_user),ENT_QUOTES,"utf-8")."\n";
echo "-".htmlentities(str_replace("\n\r","\n",$view_school),ENT_QUOTES,"utf-8")."-".htmlentities(str_replace("\n\r","\n",$view_nick),ENT_QUOTES,"utf-8")."\n"."</h2>";
echo "<pre class='brush:c'>".htmlentities(str_replace("\n\r","\n",$view_content),ENT_QUOTES,"utf-8")."\n"."</pre>";
?>
<input onclick="draw()" type="button" value="Line Number">
<input onclick="window.print();" type="button" value="<?php echo $MSG_PRINTER?>">
<input onclick="location.href='printer.php?id=<?php echo $id?>';" type="button" value="<?php echo $MSG_PRINT_DONE?>">
<img src="image/wx.jpg" height="100px" width="100px">
</body>
Loading