|
From: <pan...@us...> - 2009-01-31 18:14:19
|
Revision: 464
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=464&view=rev
Author: panzaboi
Date: 2009-01-31 18:14:16 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
1) New layout
2) Spell error corrected - archieve to archive
3) Updated language files
4) Removed unneeded Ostacium library files (DB_Field, DB_Table_Rowset)
5) Added Prettify to highlight C++ Code
6) Added configurations to config.ini
7) Added Admin
Modified Paths:
--------------
website/application/layouts/layout.phtml
website/application/modules/acm/views/scripts/contest/index.phtml
website/application/modules/acm/views/scripts/contest/results.phtml
website/application/modules/acm/views/scripts/index/index.phtml
website/application/modules/acm/views/scripts/tester/entry.phtml
website/config/config.ini
website/httpdocs/scripts/main.js
website/httpdocs/styles/style.css
website/lang/en.csv
website/lang/uk.csv
Added Paths:
-----------
website/application/layouts/old_layout.phtml
website/application/modules/acm/controllers/ArchiveController.php
website/application/modules/acm/models/Archive.php
website/application/modules/acm/views/scripts/contest/notincontest.phtml
website/application/modules/acm/views/scripts/logedin.phtml
website/application/modules/acm/views/scripts/paginator.phtml
website/application/modules/acm/views/scripts/user/view.phtml
website/application/modules/admin/
website/application/modules/admin/views/
website/application/modules/admin/views/helpers/
website/application/modules/admin/views/scripts/
website/application/modules/admin/views/scripts/crud/
website/application/modules/admin/views/scripts/crud/list.phtml
website/application/modules/admin/views/scripts/paginator.phtml
website/httpdocs/images/acm/
website/httpdocs/images/acm/status.png
website/httpdocs/images/acm/submit.png
website/httpdocs/images/box_header.jpg
website/httpdocs/images/header_bg.gif
website/httpdocs/images/leftmenu.gif
website/httpdocs/images/leftmenu_bg.jpg
website/httpdocs/images/logo.png
website/httpdocs/images/noavatar.png
website/httpdocs/images/topmenu_bg.gif
website/httpdocs/scripts/prettify.js
website/httpdocs/styles/prettify.css
website/httpdocs/styles/style_.css
Removed Paths:
-------------
website/application/modules/acm/controllers/ArchieveController.php
website/httpdocs/images/0.gif
website/httpdocs/images/arrow.gif
website/httpdocs/images/arrow2.gif
website/httpdocs/images/b_find.gif
website/httpdocs/images/bg_menu.gif
website/httpdocs/images/blok.png
website/httpdocs/images/del.png
website/httpdocs/images/disable.png
website/httpdocs/images/enable.png
website/httpdocs/images/fromarhive.jpg
website/httpdocs/images/hide.jpg
website/httpdocs/images/logo.gif
website/httpdocs/images/logod.gif
website/httpdocs/images/mail.jpg
website/httpdocs/images/menu.gif
website/httpdocs/images/menu_.gif
website/httpdocs/images/pic1.jpg
website/httpdocs/images/pixel.gif
website/httpdocs/images/probstatus.png
website/httpdocs/images/props.png
website/httpdocs/images/reset.png
website/httpdocs/images/rpic.gif
website/httpdocs/images/show.jpg
website/httpdocs/images/toarhive.jpg
website/httpdocs/images/trash.gif
website/httpdocs/images/unblok.png
website/httpdocs/images/view.png
website/httpdocs/images/visible.jpg
website/httpdocs/styles/ie6.css
website/library/Ostacium/Db/Field.php
website/library/Ostacium/Db/Table/Rowset.php
Property Changed:
----------------
website/httpdocs/images/
Modified: website/application/layouts/layout.phtml
===================================================================
--- website/application/layouts/layout.phtml 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/layouts/layout.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -1,87 +1,135 @@
-<?= $this->doctype() ?>
-<? $this->dojo()->enable()
- ->setDjConfigOption('parseOnLoad', true)
- ->registerModulePath('custom', '../custom/')
- ->requireModule('dijit.form.FilteringSelect') ?>
-<html>
- <head>
- <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" />
- <?= $this->headTitle($this->placeholder('title')->toString()) ?>
- <?= $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ?>
-
- <?= $this->headLink()->appendStylesheet('styles/style.css') ?>
- <?= /*$this->headLink()->appendStylesheet('styles/ie6.css', 'screen', 'IE 6')*/'' ?>
- <?= /*$this->headLink()->appendStylesheet('styles/ie7.css', 'screen', 'IE 7')*/'' ?>
- <?= $this->headScript()->appendFile('/scripts/main.js') ?>
-
- <? if ($this->dojo()->isEnabled()):
- $this->dojo()->setLocalPath('/scripts/dojo/dojo.js')
- ->addStyleSheetModule('dijit.themes.tundra');
-
- echo $this->dojo();
- endif; ?>
- </head>
- <body class="tundra">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr bgcolor="#122a5b">
- <td><img height="43" src="images/logo.gif" width="490"></td>
- </tr>
- <tr bgcolor="#e1e1e1">
- <td><img height=26 src="images/logod.gif" width="490"></td>
- </tr>
- <tr>
- <td bgcolor=#122a5b colspan=2><img height=2 src="images/0.gif" width=1></td>
- </tr>
- </table>
- <table border=0 cellpadding=0 cellspacing=0 width="100%" summary="" height="20%">
- <tr>
- <td bgcolor=#e1e1e1 valign=top width="200">
- <table width="100%" border="0" cellpadding="0" cellspacing="5">
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/about">Що це за проект</a></td></tr>
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/rule">Правила</a></td></tr>
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archieve/index">Набір завдань</a></td></tr>
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archieve/submit">Протестувати Розв'язок</a></td></tr>
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archieve/results">Результати Тестувань</a></td></tr>
- <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archieve/ranks">Рейтинг Учасників</a></td></tr>
- <tr><td><hr></td></tr>
- </table>
-
- <table border=0 cellpadding=4 cellspacing=0 width="100%" summary="">
- <tr><td align=middle bgcolor=#122a5b><font color=#d4d0e2><b><small>вхід</small></b></font></td></tr>
- <tr><td>
- <form onsubmit="return checkform(this);" method="post" action="login.php?rid=45fed5d9b297f" style="margin:0">
- <input type="hidden" name="path" value="/">
- <table border=0 cellPadding=1 cellSpacing=0 summary="" width=100%>
- <tr>
- <td class=name nowrap><small><font color=#122a5b> логін:</font></small></td>
- <td><input name=lgn style="height: 18px; width: 100px"></td>
- <td> </td>
- </tr>
- <tr>
- <td class=name nowrap><small><font color=#122a5b> пароль:</font></small></td>
- <td><input name=pswd type=password style="height: 18px; width: 100px"></td>
- <td><input name="login" src="images/b_find.gif" type="image">
- </tr>
- </table>
- </form>
-
-<CENTER><A href="register.php">Зареєструватись</a><BR><a href=createteam.php>Створити команду</a></CENTER>
-</TABLE><TABLE border=0 cellPadding=4 cellSpacing=0 width="100%">
-<TR><TD align=middle bgColor=#122a5b>
-<FONT color=#d4d0e2><B><SMALL>F.A.Q.</SMALL></B></FONT>
-<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD><P>Мені здається що програма написана правильно, але система видає "Помилка під час виконання"...
-<P>Якщо Ви використовуєте С++, і описали функцію void main(){...} - навіть якщо програма видасть
-правильний результат, то система видасть "помилка під час виконання". Це пов'язано з тим, що
-в такому випадку код завершення програми непердбачуваний, і практично ніколи небуває нульовим.
-<BR>Для того, щоб програму Вам зарахувало (якщо все правильно), необхідно описувати основну
-функцію як int main(){...} і обов'язково завершувати програму через return 0.
-<TR><TD align=right><P><SMALL><A href="allfaq.php">[ Всі питання ]</p></SMALL></TABLE><TR><TD align=middle bgColor=#122a5b>
-<FONT color=#d4d0e2> </FONT>
-<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD align=center>
-
-</TABLE></TABLE><TD bgColor=#f4f3f8 vAlign=top height=100%><?= $this->placeholder('message') ?><br /><?= $this->layout()->content ?></table></table>
-<TABLE>
-<TR vAlign=Bottom><TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" summary=""><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1><TR bgColor=#122a5b><TD class=copyright>© 2004-2005, <a class=copyrightlink href="mailto: ac...@ia..."><B><FONT COLOR="#d1d1d1">A-S</FONT>tudio</B></A><TD align=middle><TD align=right class=copyright><A class=copyrightlink href="http://www.acm.lviv.ua">ACM Контестер</A><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1></TABLE>
- <?= $this->debugInfo(true) ?>
- </body>
+<?php
+$loggedin = Zend_Auth::getInstance()->getIdentity();
+
+if ($loggedin)
+{
+ $form = $this->partial('logedin.phtml');
+}
+elseif (!$this->dojo()->hasDijit('loginform'))
+{
+ $form = (new Form_SmallLogin());
+ $form = $form->render();
+}
+else $form = '';
+?>
+
+<?= $this->doctype() ?>
+<? $this->dojo()->enable()
+ ->setDjConfigOption('parseOnLoad', true)
+ ->registerModulePath('custom', '../custom/')
+ ->requireModule('dijit.form.FilteringSelect')
+ ->addOnLoad('init');
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta name="description" content="Site description" />
+ <meta name="keywords" content="key, words" />
+
+ <?= $this->headTitle($this->placeholder('title')->toString()) ?>
+ <?= $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ?>
+ <?= $this->headLink()->appendStylesheet('/styles/style.css') ?>
+ <?= $this->headLink()->appendStylesheet('/styles/prettify.css') ?>
+ <?= $this->headScript()->appendFile('/scripts/main.js') ?>
+ <?= $this->headScript()->appendFile('/scripts/prettify.js') ?>
+
+ <?
+ if ($this->dojo()->isEnabled()):
+ $this->dojo()->setLocalPath('/scripts/dojo/dojo.js')
+ ->addStyleSheetModule('dijit.themes.tundra');
+
+ echo $this->dojo();
+ endif;
+ ?>
+
+ <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" />
+</head>
+
+<body class="tundra">
+ <div id="wrapper">
+ <div id="header">
+ <a href="<?= $this->url(array('module' => 'acm'), null, true) ?>"><img src="images/logo.png" id="logo" /></a>
+
+ <div id="topmenu">
+ <ul>
+ <li><a href="#" class="current">home</a></li>
+ <li><a href="#">news</a></li>
+ <li><a href="#">forum</a></li>
+ <li><a href="#">links</a></li>
+ <li><a href="#">search</a></li>
+ <li><a href="#">contacts</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <div id="container">
+ <div id="right">
+ <div id="content">
+ <?= ($this->placeholder('message') ? $this->placeholder('message') : '') ?>
+ <?= $this->layout()->content ?>
+ </div>
+ </div>
+
+ <div id="left">
+ <ul id="nav">
+ <li>
+ <a href="#" onclick="return toggle('sub1');">Архів</a>
+ <ul id="sub1">
+ <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'archive'), null, true) ?>">Набір Завдань</a></li>
+ <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'archive', 'action' => 'results'), null, true) ?>">Результати</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#Archieve" onclick="return toggle('sub2');">Контести</a>
+ <ul id="sub2">
+ <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Зареєструватись</a></li>
+ <li><a href="#Problems">Набір Завдань</a></li>
+ <li><a href="#Results">Результати</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#Archieve" onclick="return toggle('sub3');">Віртуальні Контести</a>
+ <ul id="sub3">
+ <li><a href="#Problems">Створити</a></li>
+ <li><a href="#Problems">Зареєструватись</a></li>
+ <li><a href="#Problems">Набір Завдань</a></li>
+ <li><a href="#Results">Результати</a></li>
+ </ul>
+ </li>
+ <li><a href="#contact">Contact</a></li>
+ </ul>
+
+ <!--<div class="box2 c">
+ <form name="login" action="" method="post" class="form">
+ <div class="line">
+ <label for="username" class="label">Username:</label>
+ <input class="text" type="text" name="username" title="Username" value="" tabindex="1" />
+ </div>
+ <div class="line">
+ <label for="password" class="label">Password:</label>
+ <input class="text" type="password" name="password" title="Password" value="" tabindex="2" />
+
+ <input class="submit2" type="submit" name="submit" value=">" tabindex="3" />
+ </div>
+ </form>
+ </div>-->
+
+ <?= $form ?>
+
+ <!--<div id="clear"></div>-->
+ </div>
+ </div>
+
+ <div id="clear"></div>
+
+
+ </div>
+
+ <div id="footer">
+ <p>
+ Copyright 2009 ACM. Designed by <a href="#" rel="external">panza</a>. Valid <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="external">CSS</a> & <a href="http://validator.w3.org/check?uri=referer" rel="external">XHTML</a>
+ <br />
+ <!--<?= $this->debugInfo(true) ?>-->
+ </p>
+ </div>
+</body>
</html>
\ No newline at end of file
Added: website/application/layouts/old_layout.phtml
===================================================================
--- website/application/layouts/old_layout.phtml (rev 0)
+++ website/application/layouts/old_layout.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,87 @@
+<?= $this->doctype() ?>
+<? $this->dojo()->enable()
+ ->setDjConfigOption('parseOnLoad', true)
+ ->registerModulePath('custom', '../custom/')
+ ->requireModule('dijit.form.FilteringSelect') ?>
+<html>
+ <head>
+ <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" />
+ <?= $this->headTitle($this->placeholder('title')->toString()) ?>
+ <?= $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ?>
+
+ <?= $this->headLink()->appendStylesheet('styles/style.css') ?>
+ <?= /*$this->headLink()->appendStylesheet('styles/ie6.css', 'screen', 'IE 6')*/'' ?>
+ <?= /*$this->headLink()->appendStylesheet('styles/ie7.css', 'screen', 'IE 7')*/'' ?>
+ <?= $this->headScript()->appendFile('/scripts/main.js') ?>
+
+ <? if ($this->dojo()->isEnabled()):
+ $this->dojo()->setLocalPath('/scripts/dojo/dojo.js')
+ ->addStyleSheetModule('dijit.themes.tundra');
+
+ echo $this->dojo();
+ endif; ?>
+ </head>
+ <body class="tundra">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr bgcolor="#122a5b">
+ <td><img height="43" src="images/logo.gif" width="490"></td>
+ </tr>
+ <tr bgcolor="#e1e1e1">
+ <td><img height=26 src="images/logod.gif" width="490"></td>
+ </tr>
+ <tr>
+ <td bgcolor=#122a5b colspan=2><img height=2 src="images/0.gif" width=1></td>
+ </tr>
+ </table>
+ <table border=0 cellpadding=0 cellspacing=0 width="100%" summary="" height="20%">
+ <tr>
+ <td bgcolor=#e1e1e1 valign=top width="200">
+ <table width="100%" border="0" cellpadding="0" cellspacing="5">
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/about">Що це за проект</a></td></tr>
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/rule">Правила</a></td></tr>
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/index">Набір завдань</a></td></tr>
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/submit">Протестувати Розв'язок</a></td></tr>
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/results">Результати Тестувань</a></td></tr>
+ <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/ranks">Рейтинг Учасників</a></td></tr>
+ <tr><td><hr></td></tr>
+ </table>
+
+ <table border=0 cellpadding=4 cellspacing=0 width="100%" summary="">
+ <tr><td align=middle bgcolor=#122a5b><font color=#d4d0e2><b><small>вхід</small></b></font></td></tr>
+ <tr><td>
+ <form onsubmit="return checkform(this);" method="post" action="login.php?rid=45fed5d9b297f" style="margin:0">
+ <input type="hidden" name="path" value="/">
+ <table border=0 cellPadding=1 cellSpacing=0 summary="" width=100%>
+ <tr>
+ <td class=name nowrap><small><font color=#122a5b> логін:</font></small></td>
+ <td><input name=lgn style="height: 18px; width: 100px"></td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td class=name nowrap><small><font color=#122a5b> пароль:</font></small></td>
+ <td><input name=pswd type=password style="height: 18px; width: 100px"></td>
+ <td><input name="login" src="images/b_find.gif" type="image">
+ </tr>
+ </table>
+ </form>
+
+<CENTER><A href="register.php">Зареєструватись</a><BR><a href=createteam.php>Створити команду</a></CENTER>
+</TABLE><TABLE border=0 cellPadding=4 cellSpacing=0 width="100%">
+<TR><TD align=middle bgColor=#122a5b>
+<FONT color=#d4d0e2><B><SMALL>F.A.Q.</SMALL></B></FONT>
+<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD><P>Мені здається що програма написана правильно, але система видає "Помилка під час виконання"...
+<P>Якщо Ви використовуєте С++, і описали функцію void main(){...} - навіть якщо програма видасть
+правильний результат, то система видасть "помилка під час виконання". Це пов'язано з тим, що
+в такому випадку код завершення програми непердбачуваний, і практично ніколи небуває нульовим.
+<BR>Для того, щоб програму Вам зарахувало (якщо все правильно), необхідно описувати основну
+функцію як int main(){...} і обов'язково завершувати програму через return 0.
+<TR><TD align=right><P><SMALL><A href="allfaq.php">[ Всі питання ]</p></SMALL></TABLE><TR><TD align=middle bgColor=#122a5b>
+<FONT color=#d4d0e2> </FONT>
+<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD align=center>
+
+</TABLE></TABLE><TD bgColor=#f4f3f8 vAlign=top height=100%><?= $this->placeholder('message') ?><br /><?= $this->layout()->content ?></table></table>
+<TABLE>
+<TR vAlign=Bottom><TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" summary=""><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1><TR bgColor=#122a5b><TD class=copyright>© 2004-2005, <a class=copyrightlink href="mailto: ac...@ia..."><B><FONT COLOR="#d1d1d1">A-S</FONT>tudio</B></A><TD align=middle><TD align=right class=copyright><A class=copyrightlink href="http://www.acm.lviv.ua">ACM Контестер</A><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1></TABLE>
+ <?= $this->debugInfo(true) ?>
+ </body>
+</html>
\ No newline at end of file
Deleted: website/application/modules/acm/controllers/ArchieveController.php
===================================================================
--- website/application/modules/acm/controllers/ArchieveController.php 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/modules/acm/controllers/ArchieveController.php 2009-01-31 18:14:16 UTC (rev 464)
@@ -1,87 +0,0 @@
-<?php
-
-class Acm_ArchieveController extends Ostacium_Controller_Action
-{
- public function indexAction()
- {
- $this->view->challenges = $this->_model->getChallenges();
- }
-
- public function viewAction()
- {
- $id = $this->_getParam('id');
- $problem = $this->_model->getChallenge($id);
-
- if (!$problem)
- return $this->_forward('index', null, null, $this->_getAllParams() + array('message' => 'noProblem'));
-
- $this->view->assign($problem);
- }
-
- public function submitAction()
- {
- $this->_helper->getHelper('viewRenderer')->setNoRender(true);
-
- $form = new Form_Submit();
-
- $this->view->dojo()->addOnLoad('function(){ changeEditor('.$form->type->getValue().'); }');
-
- echo $form;
- }
-
- public function uploadAction()
- {
- $this->_helper->getHelper('viewRenderer')->setNoRender(true);
- $form = new Form_Submit();
-
- if (!$this->getRequest()->isPost())
- {
- return $this->_forward('submit', null, null, $this->_getAllParams());
- }
-
- if ($_POST['type'] == 0)
- {
- $form->code->setRequired(true);
- }
- elseif ($_POST['type'] == 1)
- {
- $form->codefile->setRequired(true);
- }
-
- $result = $form->isValid($this->getRequest()->getPost());
- $this->view->dojo()->addOnLoad('function(){ changeEditor('.$form->type->getValue().'); }');
-
- if ($form->type->getValue() == 0)
- {
- $form->code->setRequired(false);
- }
- elseif ($form->type->getValue() == 1)
- {
- $form->codefile->setRequired(false);
- }
-
- if (!$result)
- {
- echo $form;
- return;
- }
-
- $values = $form->getValues();
- $values += $this->_getAllParams();
- $id = $this->_model->addSubmit($values);
-
- if ($values['type'] == 0)
- {
- file_put_contents(Application::getDocRoot().'/other/submits/'.$id, $values['code']);
- }
- elseif ($values['type'] == 1)
- {
- rename($form->codefile->getFileName(), Application::getDocRoot().'/other/submits/'.$id);
- }
- }
-
- public function resultsAction()
- {
- $this->view->submits = $this->_model->getSubmits();
- }
-}
\ No newline at end of file
Added: website/application/modules/acm/controllers/ArchiveController.php
===================================================================
--- website/application/modules/acm/controllers/ArchiveController.php (rev 0)
+++ website/application/modules/acm/controllers/ArchiveController.php 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,126 @@
+<?php
+
+class Acm_ArchiveController extends Ostacium_Controller_Action
+{
+ public function indexAction()
+ {
+ $challenges = $this->_model->getChallenges();
+ $paginator = Zend_Paginator::factory($challenges);
+ $paginator->setItemCountPerPage($this->_config->table->perpage);
+ $paginator->setCurrentPageNumber($this->_getParam('page'));
+
+ $this->view->challenges = $paginator;
+ }
+
+ public function viewAction()
+ {
+ $id = $this->_getParam('id');
+ $problem = $this->_model->getChallenge($id);
+
+ if (!$problem)
+ return $this->_forward('index', null, null, $this->_getAllParams() + array('message' => 'noProblem'));
+
+ $this->view->assign($problem);
+ }
+
+ public function sourceAction()
+ {
+ $id = $this->_getParam('id');
+ $source = $this->_model->getSubmit($id);
+
+ if (!$source)
+ return $this->_forward('index', null, null, $this->_getAllParams() + array('message' => 'noProblem'));
+
+ $this->view->assign($source->toArray());
+ }
+
+ public function submitAction()
+ {
+ //$this->_helper->getHelper('viewRenderer')->setNoRender(true);
+
+ if (!$this->_getParam('id'))
+ return $this->_redirect($this->view->url(array('action' => 'index')));
+
+ $form = new Form_Submit();
+ $this->view->dojo()->addOnLoad('function(){ changeEditor('.$form->type->getValue().'); }');
+
+ $this->view->form = $form;
+
+ //echo $form;
+ }
+
+ public function uploadAction()
+ {
+ $this->_helper->getHelper('viewRenderer')->setNoRender(true);
+ $form = new Form_Submit();
+
+ if (!$this->getRequest()->isPost())
+ {
+ return $this->_forward('submit', null, null, $this->_getAllParams());
+ }
+
+ if ($_POST['type'] == 0)
+ {
+ $form->code->setRequired(true);
+ }
+ elseif ($_POST['type'] == 1)
+ {
+ $form->codefile->setRequired(true);
+ }
+
+ $result = $form->isValid($this->getRequest()->getPost());
+ $this->view->dojo()->addOnLoad('function(){ changeEditor('.$form->type->getValue().'); }');
+
+ if ($form->type->getValue() == 0)
+ {
+ $form->code->setRequired(false);
+ }
+ elseif ($form->type->getValue() == 1)
+ {
+ $form->codefile->setRequired(false);
+ }
+
+ if (!$result)
+ {
+ echo $form;
+ return;
+ }
+
+ $values = $form->getValues();
+ $values += $this->_getAllParams();
+ $id = $this->_model->addSubmit($values);
+
+ if ($values['type'] == 0)
+ {
+ file_put_contents(Application::getDocRoot().'/other/submits/'.$id, $values['code']);
+ }
+ elseif ($values['type'] == 1)
+ {
+ rename($form->codefile->getFileName(), Application::getDocRoot().'/other/submits/'.$id);
+ }
+ }
+
+ public function resultsAction()
+ {
+ $submits = $this->_model->getSubmits();
+
+ $paginator = Zend_Paginator::factory($submits);
+ $paginator->setItemCountPerPage($this->_config->table->perpage);
+ $paginator->setCurrentPageNumber($this->_getParam('page'));
+
+ $this->view->submits = $paginator;
+ }
+
+ public function statusAction()
+ {
+ $this->_helper->getHelper('viewRenderer')->setNoRender(true);
+ $id = $this->_getParam('id');
+
+ $challenge = $this->_model->getStatus($id);
+
+ if ($challenge)
+ $challenge = $challenge->toArray();
+
+ var_dump($challenge);
+ }
+}
\ No newline at end of file
Added: website/application/modules/acm/models/Archive.php
===================================================================
--- website/application/modules/acm/models/Archive.php (rev 0)
+++ website/application/modules/acm/models/Archive.php 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,92 @@
+<?php
+
+class Archive extends Ostacium_Model
+{
+ public function getChallenges()
+ {
+ $challenges = new Table_Challenges();
+ return $challenges->getAll();
+ }
+
+ public function getSubmit($id)
+ {
+ $submits = new Table_Submits();
+ return $submits->get($id);
+ }
+
+ public function getSubmits()
+ {
+ $submits = new Table_Submits();
+ return $submits->getAll();
+ }
+
+ public function getChallenge($id)
+ {
+ $challenges = new Table_Challenges();
+ return $challenges->get($id);
+ }
+
+ public function getStatus($id)
+ {
+ $username = Zend_Auth::getInstance()->getStorage()->read()->username;
+
+ $archresults = new Table_ArchiveResults();
+ return $archresults->get(array($username, $id));
+ }
+
+ public function addSubmit($values)
+ {
+ $data = array(
+ 'contestid' => 0,
+ 'username' => Zend_Auth::getInstance()->getStorage()->read()->username,
+ 'challengeid' => (int)$values['id'],
+ 'codelangid' => $values['languageid'],
+ 'firsttest' => $values['firsttest'],
+ 'when' => time()
+ );
+
+ $submits = new Table_Submits();
+ return $submits->insert($data);
+ }
+
+ public function updateResults($submit)
+ {
+ if ($submit['firsttest'] == 1) return;
+
+ $results = new Table_ArchiveResults();
+ $result = $results->get(array($submit['username'], $submit['challengeid']));
+
+ if ($result)
+ $result = $result->toArray();
+ else
+ $result = array(
+ 'username' => $submit['username'],
+ 'challengeid' => $submit['challengeid'],
+ 'tries' => 0,
+ 'accepted' => 0
+ );
+
+ if ($result['accepted'])
+ return false;
+
+ $result['tries']++;
+
+ if ($submit['state'] == 1)
+ $result['accepted'] = 1;
+
+ if ($result['tries'] > 1)
+ {
+ $where = array(
+ $this->_db->quoteInto('username = ?', $result['username']),
+ $this->_db->quoteInto('challengeid = ?', $result['challengeid']),
+ );
+
+ $results->update($result, $where);
+ }
+ else
+ {
+ $results->insert($result);
+ }
+
+ }
+}
\ No newline at end of file
Modified: website/application/modules/acm/views/scripts/contest/index.phtml
===================================================================
--- website/application/modules/acm/views/scripts/contest/index.phtml 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/modules/acm/views/scripts/contest/index.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -1,10 +1,21 @@
-<table cellspacing="1" cellpadding="8" border="0" width="100%"><tbody><tr><td width="100%" valign="top" class="name">
-
-<table cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td bgcolor="#d0d4de" width="4" class="name">
-
-<img height="18" width="4" src="http://web.archive.org/web/20070323032706/http://acm.lviv.ua/"/></td>
-
-<td nowrap="" bgcolor="#122a5b" width="*" class="name"> <font color="#d4d0e2"><b><small>Набiр контестів</small></b><small/></font></td><td nowrap="" bgcolor="#122a5b" align="right" class="name"> <font color="#d4d0e2"><b><small> 05:26 23 березня 2007 року </small></b><small/></font></td></tr></tbody></table> <table width="60%" cellspacing="0" cellpadding="0" border="0" summary="" align="center"><tbody><tr><td bgcolor="#f4f3f8" align="middle" colspan="14"><b>Архів контестів</b></td></tr><tr bgcolor="#e1e1e1" align="middle">
-<th>Номер</th><th>Назва</th><th>Початок</th><th>Кінець</th><th>Зареєструватись</th></tr>
-<?= $this->partialLoop('contest/contest.phtml', $this->contests) ?>
-</table><br/></td></tr></table>
\ No newline at end of file
+<h2><?= $this->translate('contests_list') ?></h2>
+<br />
+<table class="table">
+ <tr>
+ <th>Номер</th>
+ <th>Назва</th>
+ <th>Початок</th>
+ <th>Кінець</th>
+ <th>Зареєструватись</th>
+ </tr>
+ <? if (count($this->contests)): ?>
+ <?= $this->partialLoop('contest/contest.phtml', $this->contests) ?>
+ <? else: ?>
+ <tr>
+ <td colspan="5" class="tc error"><?= $this->translate('no_results') ?></td>
+ </tr>
+ <? endif; ?>
+ <tr>
+ <td colspan="5" class="footer tc"><?= $this->contests ?></td>
+ </tr>
+</table>
\ No newline at end of file
Added: website/application/modules/acm/views/scripts/contest/notincontest.phtml
===================================================================
--- website/application/modules/acm/views/scripts/contest/notincontest.phtml (rev 0)
+++ website/application/modules/acm/views/scripts/contest/notincontest.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1 @@
+You are not taking part in this contest
\ No newline at end of file
Modified: website/application/modules/acm/views/scripts/contest/results.phtml
===================================================================
--- website/application/modules/acm/views/scripts/contest/results.phtml 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/modules/acm/views/scripts/contest/results.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -27,7 +27,7 @@
<th>Час/Пам'ять</th>
</tr>
-<?= $this->partialLoop('archieve/result.phtml', $this->submits) ?>
+<?= $this->partialLoop('ontest/result.phtml', $this->submits) ?>
</table>
</td></tr></table>
\ No newline at end of file
Modified: website/application/modules/acm/views/scripts/index/index.phtml
===================================================================
--- website/application/modules/acm/views/scripts/index/index.phtml 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/modules/acm/views/scripts/index/index.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -1,9 +1 @@
-<table cellspacing="1" cellpadding="8" border="0" width="100%">
-<tbody>
- <tr>
- <td width="100%" valign="top" class="name">
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tbody>
- <tr>
- <td bgcolor="#d0d4de" width="4" class="name">
- <img height="18" width="4" src="http://web.archive.org/web/20070323032459/http://acm.lviv.ua/"/></td><td nowrap="" bgcolor="#122a5b" width="*" class="name"> <font color="#d4d0e2"><b><small>Про систему</small></b><small/></font></td><td nowrap="" bgcolor="#122a5b" align="right" class="name"> <font color="#d4d0e2"><b><small> 05:24 23 березня 2007 року </small></b><small/></font></td></tr></tbody></table> <p style="font-size: 20px; font-family: arial; text-align: center;"><b>ACM Contester</b></p><p align="justify" style="font-size: 20px; font-family: arial; text-align: justify;"><font size="3">Ми, команда розробників цієї системи, дуже раді вітати Вас - учасників цієї системи. </font></p><p align="justify" style="font-size: 20px; font-family: arial; text-align: justify;"><font size="3">Тут Ви маєте можливість спробувати свої сили у розв'язанні різних типів задач. Змагайтесь!!!</font></p><p> </p></td></tr></tbody></table>
\ No newline at end of file
+
\ No newline at end of file
Added: website/application/modules/acm/views/scripts/logedin.phtml
===================================================================
--- website/application/modules/acm/views/scripts/logedin.phtml (rev 0)
+++ website/application/modules/acm/views/scripts/logedin.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,4 @@
+<div class="box2 c">
+ <h2><?= $this->translate('user_menu') ?></h2>
+ <a href="<?= $this->url(array('module' => 'acm', 'controller' => 'index', 'action' => 'logout'), null, true) ?>"><?= $this->translate('log_out') ?></a>
+</div>
\ No newline at end of file
Added: website/application/modules/acm/views/scripts/paginator.phtml
===================================================================
--- website/application/modules/acm/views/scripts/paginator.phtml (rev 0)
+++ website/application/modules/acm/views/scripts/paginator.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,30 @@
+<?php if ($this->pageCount): ?>
+<div class="paginationControl">
+<!-- Previous page link -->
+<?php if (isset($this->previous)): ?>
+ <a href="<?= $this->url(array('page' => $this->previous)); ?>">
+ < Previous
+ </a> |
+<?php else: ?>
+ <span class="disabled">< Previous</span> |
+<?php endif; ?>
+
+<!-- Numbered page links -->
+<?php foreach ($this->pagesInRange as $page): ?>
+ <?php if ($page != $this->current): ?>
+ <a href="<?= $this->url(array('page' => $page)); ?>"><?= $page; ?></a> |
+ <?php else: ?>
+ <?= $page; ?> |
+ <?php endif; ?>
+<?php endforeach; ?>
+
+<!-- Next page link -->
+<?php if (isset($this->next)): ?>
+ <a href="<?= $this->url(array('page' => $this->next)); ?>">
+ Next >
+ </a>
+<?php else: ?>
+ <span class="disabled">Next ></span>
+<?php endif; ?>
+</div>
+<?php endif; ?>
\ No newline at end of file
Modified: website/application/modules/acm/views/scripts/tester/entry.phtml
===================================================================
--- website/application/modules/acm/views/scripts/tester/entry.phtml 2009-01-31 18:11:05 UTC (rev 463)
+++ website/application/modules/acm/views/scripts/tester/entry.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -1,6 +1,6 @@
<submit>
<id><?= $this->id ?></id>
- <sourceCode><?= htmlentities(file_get_contents(Application::getDocRoot().'/other/submits/'.$this->id)) ?></sourceCode>
+ <sourceCode><?= htmlspecialchars(file_get_contents(Application::getDocRoot().'/other/submits/'.$this->id)) ?></sourceCode>
<language><?= $this->codelangid ?></language>
<problem><?= $this->challengeid ?></problem>
</submit>
\ No newline at end of file
Added: website/application/modules/acm/views/scripts/user/view.phtml
===================================================================
--- website/application/modules/acm/views/scripts/user/view.phtml (rev 0)
+++ website/application/modules/acm/views/scripts/user/view.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,62 @@
+<table class="user c">
+ <tr>
+ <td style="border-right: none;"><?= $this->username ?></td>
+ <td style="border-left: none;" colspan="2" align="right"><?= $this->translate($this->role) ?></td>
+ </tr>
+ <tr>
+ <td rowspan="7" width="151" valign="top">
+ <img src="images/noavatar.png" />
+ </td>
+ <td class="b"><?= $this->translate('firstname') ?></td>
+ <td><?= $this->name ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('surname') ?></td>
+ <td><?= $this->surname ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('edu_place') ?></td>
+ <td><?= ($this->study ? $this->study : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('birthday') ?></td>
+ <td><?= ($this->birthday ? $this->date($this->birthday, "j F Y") : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('icq_handle') ?></td>
+ <td><?= ($this->topcoder ? $this->topcoder : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('msn_handle') ?></td>
+ <td><?= ($this->topcoder ? $this->topcoder : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('skype_handle') ?></td>
+ <td><?= ($this->skype ? $this->skype : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td rowspan="6"></td>
+ <td class="b"><?= $this->translate('yahoo_handle') ?></td>
+ <td><?= ($this->yahoo ? $this->yahoo : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('skype_handle') ?></td>
+ <td><?= ($this->skype ? $this->skype : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('aim_handle') ?></td>
+ <td><?= ($this->aim ? $this->aim : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('website') ?></td>
+ <td><?= ($this->web ? '<a href="'.$this->web.'">'.$this->web.'</a>' : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('timus_handle') ?></td>
+ <td><?= ($this->timus ? '<a href="http://acm.timus.ru/search.aspx?Str='.$this->timus.'">'.$this->timus.'</a>' : $this->translate('not_specified')) ?></a></td>
+ </tr>
+ <tr>
+ <td class="b"><?= $this->translate('tc_handle') ?></td>
+ <td><?= ($this->topcoder ? '<a href="http://www.topcoder.com/tc?module=SimpleSearch&ha='.$this->topcoder.'">'.$this->topcoder.'</a>' : '<span class="na">'.$this->translate('not_specified').'</span>') ?></td>
+ </tr>
+</table>
\ No newline at end of file
Property changes on: website/application/modules/admin
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/modules/admin/views
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/modules/admin/views/helpers
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/modules/admin/views/scripts
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/modules/admin/views/scripts/crud
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Added: website/application/modules/admin/views/scripts/crud/list.phtml
===================================================================
--- website/application/modules/admin/views/scripts/crud/list.phtml (rev 0)
+++ website/application/modules/admin/views/scripts/crud/list.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,47 @@
+<? if (count($this->paginator)): ?>
+<form action="<?= $this->url(array('action' => 'action')) ?>" method="POST" class="crudlistform">
+<table class="crudlisttable" width="60%" border="1" align="center" style="border-collapse: collapse; border: 1px solid #000000;">
+<tr>
+ <? if (count($this->multiactions)): ?>
+ <th><?= $this->formCheckbox('selectall', 'all', array('onclick' => 'toggleCheck(this.checked);')) ?></th>
+ <? endif; ?>
+
+ <? foreach ($this->headers as $name => $options): ?>
+ <th><?= $options['label'] ?></th>
+ <? endforeach; ?>
+
+ <? foreach ($this->actions as $name => $action): ?>
+ <th><?= $this->translate($name) ?></th>
+ <? endforeach; ?>
+</tr>
+<? foreach ($this->paginator as $item): ?>
+<?
+$values = array();
+foreach ($this->primary as $key) {
+ $values[$key] = $item[$key];
+}
+?>
+<tr>
+ <? if (count($this->multiactions)): ?>
+ <td align="center"><?= $this->formCheckbox(implode('-', array_keys($values)).'[]', implode('-', array_values($values)), array('class' => 'crudlistselect', 'id' => 'cruditems-'.implode('-', array_values($values)))) ?></td>
+ <? endif; ?>
+ <? foreach ($this->headers as $name => $options): ?>
+ <td><?= (isset($options['as']) ? $item[$options['as']] : $item[$name]) ?></td>
+ <? endforeach; ?>
+
+ <? foreach ($this->actions as $name => $action): ?>
+ <? if (is_array($action)) $values += $action[1] ?>
+ <td align="center"><a href="<?= $this->url(array('action' => (is_array($action) ? $action[0] : $action)) + $values) ?>"><?= $this->translate($name) ?></a></td>
+ <? endforeach; ?>
+</tr>
+<? endforeach; ?>
+</table>
+<? if (count($this->multiactions)): ?>
+ <? foreach ($this->multiactions as $name => $action): ?>
+ <?= $this->formSubmit('multiaction', $name, array('onclick' => 'setAction("crudlistform", "'.$action.'");')) ?>
+ <? endforeach; ?>
+<? endif; ?>
+</form>
+<? else: ?>
+<div>No items to display</div>
+<? endif; ?>
\ No newline at end of file
Added: website/application/modules/admin/views/scripts/paginator.phtml
===================================================================
--- website/application/modules/admin/views/scripts/paginator.phtml (rev 0)
+++ website/application/modules/admin/views/scripts/paginator.phtml 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,43 @@
+<?php if ($this->pageCount): ?>
+<div class="paginationControl">
+<?= $this->firstItemNumber; ?> - <?= $this->lastItemNumber; ?>
+of <?= $this->totalItemCount; ?>
+
+<!-- First page link -->
+<?php if (isset($this->previous)): ?>
+ <a href="<?= $this->url(array('page' => $this->first)); ?>">
+ First
+ </a> |
+<?php else: ?>
+ <span class="disabled">First</span> |
+<?php endif; ?>
+
+<!-- Previous page link -->
+<?php if (isset($this->previous)): ?>
+ <a href="<?= $this->url(array('page' => $this->previous)); ?>">
+ < Previous
+ </a> |
+<?php else: ?>
+ <span class="disabled">< Previous</span> |
+<?php endif; ?>
+
+<!-- Next page link -->
+<?php if (isset($this->next)): ?>
+ <a href="<?= $this->url(array('page' => $this->next)); ?>">
+ Next >
+ </a> |
+<?php else: ?>
+ <span class="disabled">Next ></span> |
+<?php endif; ?>
+
+<!-- Last page link -->
+<?php if (isset($this->next)): ?>
+ <a href="<?= $this->url(array('page' => $this->last)); ?>">
+ Last
+ </a>
+<?php else: ?>
+ <span class="disabled">Last</span>
+<?php endif; ?>
+
+</div>
+<?php endif; ?>
\ No newline at end of file
Modified: website/config/config.ini
===================================================================
--- website/config/config.ini 2009-01-31 18:11:05 UTC (rev 463)
+++ website/config/config.ini 2009-01-31 18:14:16 UTC (rev 464)
@@ -11,13 +11,13 @@
truncate.exact = "0"
truncate.considerHtml = "1"
-table.perpage = "10"
+table.perpage = "25"
date.format_type = "php"
#auth.noauth.module = "default"
auth.noauth.controller = "index"
-auth.noauth.action = "index"
+auth.noauth.action = "login"
auth.noacl.module = "default"
auth.noacl.controller = "error"
@@ -28,34 +28,34 @@
auth.user = "username"
auth.pass = "password"
auth.passtreat = "MD5(?) AND activated IS NULL"
-auth.referenceMap.0.table = "usersdetails";
-auth.referenceMap.0.reference = "usersdetails.username=users.username";
-auth.referenceMap.0.columns = "*";
-auth.referenceMap.1.table = "roles";
-auth.referenceMap.1.reference = "roles.id=users.roleid";
-auth.referenceMap.1.columns = "roles.name as role";
+auth.referenceMap.0.table = "usersdetails"
+auth.referenceMap.0.reference = "usersdetails.username=users.username"
+auth.referenceMap.0.columns = "*"
+auth.referenceMap.1.table = "roles"
+auth.referenceMap.1.reference = "roles.id=users.roleid"
+auth.referenceMap.1.columns = "roles.name as role"
-lang.languageKey = "language";
-lang.path = "lang/";
-lang.default = "uk";
-lang.langs[] = "uk";
-lang.langs[] = "en";
+lang.languageKey = "language"
+lang.path = "lang/"
+lang.default = "uk"
+lang.langs[] = "uk"
+lang.langs[] = "en"
-layout.layoutpath = "application/layouts";
-layout.layout = "layout";
-layout.contentKey = "content";
-layout.pluginclass = "Ostacium_Controller_Plugin_Layout";
+layout.layoutpath = "application/layouts"
+layout.layout = "layout"
+layout.contentKey = "content"
+layout.pluginclass = "Ostacium_Controller_Plugin_Layout"
-view.encoding = "UTF-8";
-view.helperPathPrefix = "Ostacium_View_Helper";
-view.helperPath = "/library/Ostacium/View/Helper";
+view.encoding = "UTF-8"
+view.helperPathPrefix = "Ostacium_View_Helper"
+view.helperPath = "/library/Ostacium/View/Helper"
-log.table = "log";
-log.columnMap.type = "priorityName";
-log.columnMap.message = "message";
-log.columnMap.username = "username";
-log.columnMap.when = "timestamp";
-log.columnMap.ip = "ip";
+log.table = "log"
+log.columnMap.type = "priorityName"
+log.columnMap.message = "message"
+log.columnMap.username = "username"
+log.columnMap.when = "timestamp"
+log.columnMap.ip = "ip"
email.from = "admin"
@@ -70,6 +70,13 @@
general.extention = "html"
general.roleid = "2"
+paginator.file = "paginator.phtml"
+paginator.style = "Sliding"
+
+crud.perpage = "25"
+
+calc.acm.penalty = "20"
+
[development: general]
db.adapter = "Mysqli"
Property changes on: website/httpdocs/images
___________________________________________________________________
Added: svn:ignore
+ *.db
Deleted: website/httpdocs/images/0.gif
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/acm
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Added: website/httpdocs/images/acm/status.png
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/acm/status.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: website/httpdocs/images/acm/submit.png
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/acm/submit.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/arrow.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/arrow2.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/b_find.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/bg_menu.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/blok.png
===================================================================
(Binary files differ)
Added: website/httpdocs/images/box_header.jpg
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/box_header.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/del.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/disable.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/enable.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/fromarhive.jpg
===================================================================
(Binary files differ)
Added: website/httpdocs/images/header_bg.gif
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/header_bg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/hide.jpg
===================================================================
(Binary files differ)
Added: website/httpdocs/images/leftmenu.gif
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/leftmenu.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: website/httpdocs/images/leftmenu_bg.jpg
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/leftmenu_bg.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/logo.gif
===================================================================
(Binary files differ)
Added: website/httpdocs/images/logo.png
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/logod.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/mail.jpg
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/menu.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/menu_.gif
===================================================================
(Binary files differ)
Added: website/httpdocs/images/noavatar.png
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/noavatar.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/pic1.jpg
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/pixel.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/probstatus.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/props.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/reset.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/rpic.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/show.jpg
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/toarhive.jpg
===================================================================
(Binary files differ)
Added: website/httpdocs/images/topmenu_bg.gif
===================================================================
(Binary files differ)
Property changes on: website/httpdocs/images/topmenu_bg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: website/httpdocs/images/trash.gif
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/unblok.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/view.png
===================================================================
(Binary files differ)
Deleted: website/httpdocs/images/visible.jpg
===================================================================
(Binary files differ)
Modified: website/httpdocs/scripts/main.js
===================================================================
--- website/httpdocs/scripts/main.js 2009-01-31 18:11:05 UTC (rev 463)
+++ website/httpdocs/scripts/main.js 2009-01-31 18:14:16 UTC (rev 464)
@@ -16,4 +16,43 @@
return false;
}
-function checkForm(form){if(form.lgn.value.length<3){alert('Логін повинен мати як мінімум 3 символи!');return false;}}
\ No newline at end of file
+function toggleCheck(value)
+{
+ dojo.query(".crudlistform input[type='checkbox'].crudlistselect").attr('checked', value);
+}
+
+function setAction(form, value)
+{
+ form = dojo.query('.'+form);
+ action = form.attr('action').toString().replace('action', value);
+ form.attr('action', action);
+}
+
+function toggle(id)
+{
+ var el = dojo.byId(id);
+
+ if ( el.className != 'show' ) {
+ dojo.query("#nav .show").removeClass('show');
+
+ dojo.addClass(el, 'show');
+ }
+ else {
+ dojo.removeClass(el, 'show');
+ }
+
+ return false;
+}
+
+function goToUrl(url)
+{
+ document.location = url;
+
+ return false;
+}
+
+function init()
+{
+ if(typeof prettyPrint == 'function')
+ prettyPrint();
+}
\ No newline at end of file
Added: website/httpdocs/scripts/prettify.js
===================================================================
--- website/httpdocs/scripts/prettify.js (rev 0)
+++ website/httpdocs/scripts/prettify.js 2009-01-31 18:14:16 UTC (rev 464)
@@ -0,0 +1,1330 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ *
+ * The lexer should work on a number of languages including C and friends,
+ * Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
+ * It works passably on Ruby, PHP and Awk and a decent subset of Perl, but,
+ * because of commenting conventions, doesn't work on Smalltalk, Lisp-like, or
+ * CAML-like languages.
+ *
+ * If there's a language not mentioned here, then I don't know it, and don't
+ * know whether it works. If it has a C-like, Bash-like, or XML-like syntax
+ * then it should work passably.
+ *
+ * Usage:
+ * 1) include this source file in an html page via
+ * <script type="text/javascript" src="/path/to/prettify.js"></script>
+ * 2) define style rules. See the example page for examples.
+ * 3) mark the <pre> and <code> tags in your source with class=prettyprint.
+ * You can also use the (html deprecated) <xmp> tag, but the pretty printer
+ * needs to do more substantial DOM manipulations to support that, so some
+ * css styles may not be preserved.
+ * That's it. I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in.
+ *
+ * Change log:
+ * cbeust, 2006/08/22
+ * Java annotations (start with "@") are now captured as literals ("lit")
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window */
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events.
+ * If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+/** the number of characters between tab columns */
+window['PR_TAB_WIDTH'] = 8;
+
+/** Walks the DOM returning a properly escaped version of innerHTML.
+ * @param {Node} node
+ * @param {Array.<string>} out output buffer that receives chunks of HTML.
+ */
+window['PR_normalizedHtml']
+
+/** Contains functions for creating and registering new language handlers.
+ * @type {Object}
+ */
+ = window['PR']
+
+/** Pretty print a chunk of code.
+ *
+ * @param {string} sourceCodeHtml code as html
+ * @return {string} code as html, but prettier
+ */
+ = window['prettyPrintOne']
+/** find all the < pre > and < code > tags in the DOM with class=prettyprint
+ * and prettify them.
+ * @param {Function} opt_whenDone if specified, called when the last entry
+ * has been finished.
+ */
+ = window['prettyPrint'] = void 0;
+
+/** browser detection. @extern */
+window['_pr_isIE6'] = function () {
+ var isIE6 = navigator && navigator.userAgent &&
+ /\bMSIE 6\./.test(navigator.userAgent);
+ window['_pr_isIE6'] = function () { return isIE6; };
+ return isIE6;
+};
+
+
+(function () {
+ /** Splits input on space and returns an Object mapping each non-empty part to
+ * true.
+ */
+ function wordSet(words) {
+ words = words.split(/ /g);
+ var set = {};
+ for (var i = words.length; --i >= 0;) {
+ var w = words[i];
+ if (w) { set[w] = null; }
+ }
+ return set;
+ }
+
+ // Keyword lists for various languages.
+ var FLOW_CONTROL_KEYWORDS =
+ "break continue do else for if return while ";
+ var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
+ "double enum extern float goto int long register short signed sizeof " +
+ "static struct switch typedef union unsigned void volatile ";
+ var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
+ "new operator private protected public this throw true try ";
+ var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
+ "concept concept_map const_cast constexpr decltype " +
+ "dynamic_cast explicit export friend inline late_check " +
+ "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
+ "template typeid typename typeof using virtual wchar_t where ";
+ var JAVA_KEYWORDS = COMMON_KEYWORDS +
+ "boolean byte extends final finally implements import instanceof null " +
+ "native package strictfp super synchronized throws transient ";
+ var CSHARP_KEYWORDS = JAVA_KEYWORDS +
+ "as base by checked decimal delegate descending event " +
+ "fixed foreach from group implicit in interface internal into is lock " +
+ "object out override orderby params readonly ref sbyte sealed " +
+ "stackalloc string select uint ulong unchecked unsafe ushort var ";
+ var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
+ "debugger eval export function get null set undefined var with " +
+ "Infinity NaN ";
+ var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
+ "goto if import last local my next no our print package redo require " +
+ "sub undef unless until use wantarra...
[truncated message content] |