Example #1
0
                        var cache = {};
                        $("#add-problem").click(add_problem_event);
                        $("#problem-new").keypress(function (e) {
                            var code = (e.keyCode ? e.keyCode : e.which);
                            if (code == 13) return false;
                        });

                        var datasource = function(request, response){
                            var term = request.term;
                            if ( term in cache )
                            {
                                response(cache[term]);
                                return;
                            }
                            $.getJSON('<?php 
e::url("/admin/problem/search");
?>
', request, function(data, status, xhr){
                                cache[ term ] = data;
                                response( data );
                            })
                        }
                        $("#problem-new").autocomplete({
                            minLength:2,
                            source: datasource,
                            focus:function (event, ui) {
                                $("#problem-new").val(ui.item.title);
                                return false;
                            },
                            select:function (event, ui) {
                                $("#problem-new").val(ui.item.title);
Example #2
0
echo __('admin.settings.index.name');
?>
</th>
        <th><?php 
echo __('admin.settings.index.description');
?>
</th>
    </tr>
    </thead>
    <tbody>
    <?php 
foreach (Model_Option::all_options() as $option) {
    ?>
        <tr>
            <td><a href="<?php 
    e::url("/admin/setting/edit/{$option['option_id']}");
    ?>
"><?php 
    echo $option['name'];
    ?>
</a></td>
            <td><?php 
    echo $option['desc'];
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
</table>
Example #3
0
<?php

$suffix = '';
if (isset($option['option_id'])) {
    $suffix = '/' . $option['option_id'];
}
?>
<form class="form-horizontal" role="form" method="post" action="<?php 
e::url("/admin/setting/edit{$suffix}");
?>
">
    <div class="form-group">
        <label for="name" class="col-sm-1 control-label"><?php 
echo __('admin.settings.edit.name');
?>
</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" id="name" name="name" value="<?php 
echo $option['name'];
?>
">
            <p class="help-block"><?php 
echo __('admin.settings.edit.unique');
?>
</p>
        </div>
    </div>
    <div class="form-group">
        <label for="desc" class="col-sm-1 control-label"><?php 
echo __('admin.settings.edit.description');
?>
Example #4
0
    ?>
 class="active" <?php 
}
?>
><?php 
echo HTML::anchor("/contest/statistics/{$cid}", __('contest.header.statistics'));
?>
</li>
    <li <?php 
if (Request::$current->action() == 'status') {
    ?>
 class="active" <?php 
}
?>
><a href="<?php 
e::url("/status?cid={$cid}");
?>
"><?php 
echo __('contest.header.status');
?>
</a></li>
    <li <?php 
if (Request::$current->action() == 'talk') {
    ?>
 class="active" <?php 
}
?>
><?php 
echo HTML::anchor("/contest/talk?cid={$cid}", __('contest.header.clarification'));
?>
</li>
Example #5
0
    ?>
</td>
            <td><?php 
    if ($u['solved'] == 0) {
        ?>
            0.00%
            <?php 
    } else {
        ?>
            <?php 
        echo sprintf("%.02lf%%", $u['solved'] / $u['submit'] * 100);
        ?>
            <?php 
    }
    ?>
            </td>
            <td><a class="edit-link" href="<?php 
    e::url("/admin/user/edit/{$u['user_id']}");
    ?>
"><?php 
    echo __('admin.user.list.edit');
    ?>
</a></td>
        </tr>
    <?php 
}
?>
    </tbody>
</table>
<?php 
echo View::factory('block/pager', array('base_url' => '/admin/user', 'total' => $total));
Example #6
0
<?php

/* @var Model_News $news */
$suffix = 'edit';
if ($news->news_id) {
    $suffix = $suffix . '/' . $news->news_id;
}
?>
<form class="form-horizontal" method="POST" action="<?php 
e::url("/admin/news/edit/{$news->news_id}");
?>
">
    <fieldset>
        <div class="form-group">
            <label class="control-label col-sm-2" for="title"><?php 
echo __('admin.news.edit.title');
?>
</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="title" id="title" value="<?php 
echo $news->title;
?>
">
                <div class="row col-sm-10">
                    <label class="checkbox col-md-2" for="top"><input type="checkbox" name="top" id="top" <?php 
if ($news->is_top_news()) {
    ?>
checked="checked" <?php 
}
?>
/><?php 
Example #7
0
<div class="edit-userinfo">
<h3 class="page-title"><?php 
echo __('user.edit.user_edit');
?>
</h3>
    <form action="<?php 
e::url(Request::current()->uri());
?>
" method="POST" class="form-horizontal" role="form">
        <div class="form-group">
            <label class="control-label col-sm-5" for="user_id"><?php 
echo __('user.register.username');
?>
</label>
            <div class="col-sm-7">
                <input class="form-control" type="text" id="user_id" disabled="disabled" value="<?php 
print $userinfo['user_id'];
?>
"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-5" for="nick"><?php 
echo __('user.register.nick');
?>
</label>
            <div class="col-sm-7">
                <input class="form-control" id="nick" name="nick" type="text" value="<?php 
print $userinfo['nick'];
?>
"/>
Example #8
0
<ul class="nav nav-pills nav-stacked">
    <li><a href="<?php 
e::url("/admin/problem/new");
?>
"><?php 
echo __('admin.problem.sidebar.new');
?>
</a></li>
</ul>
Example #9
0
        ?>
</a> <?php 
    }
    ?>
    </div>
    <div class="reply-content well"><?php 
    echo HTML::chars($r->content);
    ?>
</div>
</div>
<?php 
}
if (Auth::instance()->get_user()) {
    ?>
<form class="add-reply form" action="<?php 
    e::url("/discuss/topic/{$the_topic->tid}");
    ?>
" method="POST">
    <fieldset>
        <legend><?php 
    echo __('discuss.show.reply');
    ?>
</legend>
        <div class="form-group">
            <div>
                <textarea class="form-control" rows="8" id="content" name="content" cols="80"></textarea>
            </div>
        </div>
    </fieldset>
    <div class="form-group">
    <button type="submit" class="btn btn-primary"><?php 
Example #10
0
<ul class="pagination problem-pagination">
<?php 
for ($i = 1; $i <= $pages; $i++) {
    ?>
    <li<?php 
    if ($i == $page) {
        ?>
 class="active"<?php 
    }
    ?>
><a href="<?php 
    e::url("/problem/list/{$i}");
    ?>
"><?php 
    echo $i;
    ?>
</a></li>
<?php 
}
?>
</ul>
<div class="problem-search">
<?php 
echo View::factory('problem/searchform');
?>
</div>
<table class="table table-striped">
<thead>
    <tr>
        <th><?php 
echo __('problem.list.id');
Example #11
0
<ul class="nav nav-pills nav-stacked">
    <li><a href="<?php 
e::url("/admin/news/add");
?>
"><?php 
echo __('admin.news.sidebar.new');
?>
</a></li>
</ul>
Example #12
0
                </td>
                <?php 
    if (Request::current()->action() == 'outbox') {
        ?>
                <td class="col-md-3"><a class="mail-recevier" href="<?php 
        e::url("/u/{$mail->to_user}");
        ?>
"><?php 
        echo $mail->to_user;
        ?>
</a></td>
                <?php 
    } else {
        ?>
                <td class="col-md-3"><a class="mail-author" href="<?php 
        e::url("/u/{$mail->from_user}");
        ?>
"><?php 
        echo $mail->from_user;
        ?>
</a></td>
                <?php 
    }
    ?>
                <td ><?php 
    echo $mail->in_date;
    ?>
</td>
            </tr>
            <?php 
}
Example #13
0
</a><?php 
    if ($news->is_top_news()) {
        ?>
<span class="label label-danger">top</span><?php 
    }
    ?>
</h4>
            <div class="news-content readability">
                <?php 
    if (mb_strlen($news->content) > 150) {
        ?>
                <?php 
        echo mb_substr($news->content, 0, 100);
        ?>
<a href="<?php 
        e::url("/news/{$news->news_id}");
        ?>
" class="readmore">...</a>
                <?php 
    } else {
        ?>
                <?php 
        echo $news->content;
        ?>
                <?php 
    }
    ?>
            </div>
        </div>
        <?php 
}
echo __("top_frontend.contest");
?>
</a></li>
    <li <?php 
if (Request::$current->action() == 'faqs') {
    ?>
class="active" <?php 
}
?>
><a href="<?php 
e::url('faqs');
?>
"><?php 
echo __("top_frontend.faqs");
?>
</a></li>
    <li <?php 
if (Request::$current->controller() == 'Discuss') {
    ?>
class="active" <?php 
}
?>
><a href="<?php 
e::url('discuss');
?>
"><?php 
echo __("top_frontend.discuss");
?>
</a></li>
</ul>
Example #15
0
<ul class="nav nav-pills nav-stacked">
    <li><a href="<?php 
e::url("/admin/setting");
?>
"><?php 
echo __('admin.settings.sidebar.all_options');
?>
</a></li>
    <li><a href="<?php 
e::url("/admin/setting/defaults");
?>
"><?php 
echo __('admin.settings.sidebar.defaults');
?>
</a></li>
    <li><a href="<?php 
e::url("/admin/setting/edit");
?>
"><?php 
echo __('admin.settings.sidebar.new_option');
?>
</a></li>
</ul>
Example #16
0
            <?php 
    if ($t->pid) {
        ?>
<a href="<?php 
        e::url("problem/show/{$t->pid}");
        ?>
" style="color: #000000"> <?php 
        echo $t->pid;
        ?>
 </a><?php 
    }
    ?>
</td>
        <td>
            <a href="<?php 
    e::url("t/{$t->tid}");
    ?>
"><strong><?php 
    echo $t->title;
    ?>
</strong></a>
        </td>
        <td><a href="<?php 
    echo Route::url('profile', array('uid' => $t->author_id));
    ?>
"><?php 
    echo $t->author_id;
    ?>
</a></td>
    </tr>
        <?php 
Example #17
0
                </li>
                <li><span class="label label-default">Compile Error</span> : The compiler (gcc/g++/gpc) could not compile
                    your ANSI program. Of course, warning messages are not error messages. Click the link at the judge reply
                    to see the actual error message.
                </li>
            </ul>
        </div>
    </dd>
    <dt class="q"><span>Q:</span>How to attend Online Contests?</dt>
    <dd>
        <span class="sp-a">A:</span>
        <div class="a well">
            <p> Can you submit programs for any practice problems on this Online Judge?
                If you can, then that is the account you use in an online contest.
                If you can't, then please <a href="<?php 
e::url('/user/register');
?>
">register</a> an id with password first.</p>
        </div>
    </dd>
    <dt>
        Any questions/suggestions please post to <a target="_blank" href="http://algorithm.byhh.net/">Algorithm@BYHH</a>, or post at our <a href="<?php 
e::url('/discuss');
?>
">FORUM</a>.
    </dt>
</dl>

<script type="text/javascript">
    $(prettyPrint());
</script>
                    <li><a href="<?php 
        e::url('admin');
        ?>
" data-no-turbolink><?php 
        echo __("top_frontend.adminctl");
        ?>
</a></li>
                <?php 
    }
    ?>
                <?php 
    if ($cu) {
        ?>
                    <li class="divider"></li>
                    <li><a href="<?php 
        e::url('logout');
        ?>
" data-no-turbolink><?php 
        echo __("top_frontend.logout");
        ?>
</a></li>
                <?php 
    }
    ?>
            </ul>
        </li>
    <?php 
}
?>
</ul>
Example #19
0
    if ($i->result == 4) {
        echo $i->memory, 'kb';
    } else {
        echo '----';
    }
    ?>
</td>
        <td><?php 
    echo e::lang($i->language);
    ?>
</td>
        <td><?php 
    if ($current_user and $i->allow_view_code($current_user)) {
        ?>
        <a href="<?php 
        e::url("/solution/source/{$i->solution_id}");
        ?>
" title="click view details"><?php 
        echo $i->code_length;
        ?>
B</a>
        <?php 
    } else {
        ?>
        <?php 
        echo $i->code_length;
        ?>
B
        <?php 
    }
    ?>
Example #20
0
<h3 class="page-title"><?php 
echo __('discuss.edit.new_topic');
?>
</h3>
<form class="new-topic form-horizontal" action="<?php 
e::url('discuss/new');
?>
" method="POST" >
    <div class="form-group">
        <label class="control-label col-sm-5" for="pid"><?php 
echo __('discuss.edit.problem_id');
?>
</label>
        <div class="col-sm-7">
            <?php 
if (Request::$current->query('cid')) {
    ?>
            <input name="cid" value="<?php 
    echo Request::$current->query('cid');
    ?>
" type="hidden"/>
            <?php 
}
?>
            <input class="form-control" type="text" name="pid" id="pid"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-5" for="title"><?php 
echo __('discuss.edit.title');
?>
Example #21
0
<form role="form" class="form-horizontal submit" action="<?php 
e::url('/problem/submit');
?>
" method="POST">
<fieldset>
<?php 
if ($cid) {
    ?>
    <input type="hidden" value="<?php 
    echo $cid;
    ?>
" name="cid"/>
    <input type="hidden" value="<?php 
    echo $cpid;
    ?>
" name="cpid"/>
    <div class="title-contest-problem">
        <h3><?php 
    echo __('problem.submit.problem_:cpid_of_:cid', array(':cpid' => e::contest_pid($cpid), ':cid' => $cid));
    ?>
</h3>
    </div>
<?php 
} else {
    ?>
<div class="form-group">
    <label class="control-label col-sm-3" for="pid"><?php 
    echo __('problem.submit.problem_id');
    ?>
</label>
    <div class="col-sm-9">
Example #22
0
</label>
        <div class="col-sm-10">
            <ul class="list-unstyled" id="out-data">
                <?php 
    foreach ($problem->out_data_files() as $f) {
        ?>
                    <li>
                        <a target="_blank" href="<?php 
        e::url("/admin/problem/showdata/{$problem->problem_id}/{$f}");
        ?>
"><?php 
        echo $f;
        ?>
</a>
                        | <a href="<?php 
        e::url("/admin/problem/deldata/{$problem->problem_id}/{$f}");
        ?>
" class="make-sure"><?php 
        echo __('admin.problem.edit.delete');
        ?>
</a>
                    </li>
                <?php 
    }
    ?>
            </ul>
        </div>
    </div>
    <?php 
}
?>
Example #23
0
    ?>
    <div class="form-group">
        <label class="col-sm-4 control-label" ><?php 
    echo __('user.login.captcha');
    ?>
</label>
        <div class="col-sm-8">
            <?php 
    echo View::factory('captcha/' . $mode);
    ?>
        </div>
    </div>
    <?php 
}
?>
    <div class="form-group">
        <div class="col-sm-offset-4 col-sm-8">
            <button type="submit" class="btn btn-primary col-sm-4"><?php 
echo __('user.login.login');
?>
</button><a href="<?php 
e::url('/help');
?>
" class="forget-password"><?php 
echo __('user.login.forget');
?>
</a>
        </div>
    </div>
</form>
Example #24
0
?>
                </div>
            </div>
            <div class="panel panel-primary content">
                <div class="panel-body">
                    <?php 
echo HTML::chars($mail->content);
?>
                </div>
            </div>
        </div>
        <?php 
if ($mail->from_user != $current_user->user_id) {
    ?>
        <form role="form" class="form-horizontal" method="post" action="<?php 
    e::url('/mail/send');
    ?>
">
            <input class="hidden" type="hidden" name="receiver" value="<?php 
    echo $mail->from_user;
    ?>
">
            <div class="form-group">
                <label class="control-label col-sm-1" for="title"><?php 
    echo __('mail.new.title');
    ?>
</label>
                <div class="col-sm-10">
                    <input class="form-control" type="text" name="title" id="title"/>
                </div>
            </div>
Example #25
0
    e::url('js/turbolinks.js');
    ?>
"></script>
<script type="text/javascript" src="<?php 
    e::url('js/jquery.turbolinks.js');
    ?>
"></script>
<script type="text/javascript" src="<?php 
    e::url('js/nprogress.js');
    ?>
"></script>
<script type="text/javascript" src="<?php 
    e::url('js/respond.js');
    ?>
"></script>
<script type="text/javascript" src="<?php 
    e::url('js/jquery.html5-placeholder-shim.js');
    ?>
"></script>
<?php 
}
?>
<script type="text/javascript" src="<?php 
e::url('js/jquery.bs.js');
?>
"></script>
<script type="text/javascript" src="<?php 
e::url('js/site.js');
?>
"></script>
Example #26
0
<ul class="nav nav-pills nav-stacked">
    <li><a href="<?php 
e::url('/admin');
?>
"><?php 
echo __('admin.index.sidebar.home');
?>
</a></li>
</ul>
Example #27
0
<form class="form-inline well" role="form" action="<?php 
e::url('/problem/search');
?>
" method="GET">
    <div class="form-group">
        <label class="sr-only" for="text"><?php 
echo __('problem.searchform.search_text');
?>
</label>
        <input placeholder="<?php 
echo __('problem.searchform.search');
?>
" name="text" id="text" class="form-control"/>
    </div>
    <div class="form-group">
        <label class="sr-only" for="area"><?php 
echo __('problem.searchform.type');
?>
</label>
        <select name="area" class="form-control">
            <option value="title"><?php 
echo __('problem.searchform.title');
?>
</option>
            <option value="source"><?php 
echo __('problem.searchform.source');
?>
</option>
        </select>
    </div>
    <input type="submit" value="<?php 
Example #28
0
<img src="<?php 
e::url('/index/captcha');
?>
"/>
<input class="form-control" name="code" id="code" type="text" />
Example #29
0
<ul class="nav nav-pills nav-stacked">
    <li><a href="<?php 
e::url('user/register');
?>
"><?php 
echo __('admin.user.sidebar.new');
?>
</a></li>
</ul>
Example #30
0
<div class="dashboard-widget row">
    <form role="form" action="<?php 
e::url('/admin/index/rejudge');
?>
" method="post" class="form-horizontal col-sm-4">
    <fieldset>
        <legend><?php 
echo __('admin.index.index.rejudge');
?>
</legend>
        <div class="form-group">
            <label class="control-label col-sm-6" for="type"><?php 
echo __('admin.index.index.choose_type');
?>
</label>
            <div class="col-sm-6">
                <select class="form-control" name="type" id="type">
                    <option value="PROBLEM"><?php 
echo __('admin.index.index.problem');
?>
</option>
                    <option value="SOLUTION"><?php 
echo __('admin.index.index.runid');
?>
</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-6" for="typeid"><?php 
echo __('admin.index.index.id');