Subversion Repositories general

Compare Revisions

No changes between revisions

Ignore whitespace Rev 976 → Rev 977

/kickup/trunk/doc/todo.txt
6,7 → 6,7
+ Max length
 
Send number to email
+ Remind number to email
Image buttons: save, change, unregister, register
+ Image buttons: save, change, unregister, register
/kickup/trunk/src/ak/kickup/core/RegistrationMail.txt
6,7 → 6,7
или изменить свои данные.
 
Участие в "%eventName%" стоит %eventPrice% евро.
Переведите, полжалуйста, деньги на счет:
Переведите, пожалуйста, деньги на счет:
 
%eventMoneyAccount%
 
/kickup/trunk/src/ak/kickup/core/action/ParticipantAction.java
40,7 → 40,8
throws Exception
{
if("submit".equals(mapping.getParameter()) || "update".equals(mapping.getParameter())
|| "unregister".equals(mapping.getParameter()) || "login".equals(mapping.getParameter()))
|| "unregister".equals(mapping.getParameter()) || "login".equals(mapping.getParameter())
|| "remind".equals(mapping.getParameter()))
{
DynaActionForm theForm = (DynaActionForm)form;
Long eventId = StringConverter.parseLong(theForm.get("event"));
303,6 → 304,30
request.setAttribute("participant", participant);
return mapping.findForward("default");
}
else if("remind".equals(mapping.getParameter())) {
DynaActionForm theForm = (DynaActionForm)form;
Long eventId = StringConverter.parseLong(theForm.get("event"));
Event event = EventManager.getInstance().get(eventId, true);
String email = ((String)theForm.get("email")).trim();
 
request.setAttribute("event", event);
 
Participant participant = ParticipantManager.getInstance().findForEmail(email);
 
if(participant == null) {
Thread.sleep(1000);
throw new UserException("ak.kickup.core.participant.remind.email.notfound");
}
 
try {
Messages.sendRemindMessage(participant, request.getRemoteAddr());
}
catch(Exception ex) {
throw ex;
}
 
return mapping.findForward("default");
}
else {
throw new Exception("unknown mapping parameter");
}
/kickup/trunk/src/ak/kickup/core/CoreResources.properties
39,8 → 39,12
ak.kickup.core.participant.edit.registration.unavailable=Время регистрации прошло
ak.kickup.core.participant.edit.unregistration.unavailable=Время отмены регистрации прошло
ak.kickup.core.participant.edit.payed.wrong=Оплаченная сумма должна быть числом, например 12,35
ak.kickup.core.participant.remind.email.required=Вы не указали свой e-mail
ak.kickup.core.participant.remind.email.wrong=Некорректный e-mail
ak.kickup.core.participant.remind.email.notfound=Этот e-mail не зарегистрирован
ak.kickup.core.mail.send.error=Не могу отправить вам e-mail. Проверьте свой адрес и обратитесь к организаторам.
ak.kickup.core.mail.read.error=Не могу отправить вам e-mail. Ошибка в системе.
ak.kickup.core.mail.subject=Registration for {0}
ak.kickup.core.remindmail.subject=Registration number remind for {0}
 
org.apache.struts.taglib.bean.format.sql.timestamp=dd.MM.yyyy HH:mm:ss.SSS
/kickup/trunk/src/ak/kickup/core/RemindMail.txt
0,0 → 1,13
Высылаем вам запрошенную информацию.
 
Регистрационный номер: %ident%.
 
Участие в "%eventName%" стоит %eventPrice% евро.
Переведите, пожалуйста, деньги на счет:
 
%eventMoneyAccount%
 
В качестве Verwendungszweck укажите ваш номер, %ident%.
 
Если у вас есть вопросы, обращайтесь к организаторам
(%eventAdmins%) по адресу %eventEmail% или телефонам %eventPhones%
/kickup/trunk/src/ak/kickup/core/model/ParticipantManager.java
86,6 → 86,25
}
}
 
public Participant findForEmail(String email)
throws ModelException
{
try {
List list = HibernateUtil.currentSession().find(
"from Participant where email = ?",
email, Hibernate.STRING );
 
if(list.size() == 0)
return null;
else
return (Participant)list.get(0);
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
}
 
public boolean emailExists(Participant participant, String email)
throws ModelException
{
/kickup/trunk/src/ak/kickup/core/mail/Messages.java
16,7 → 16,7
 
public abstract class Messages
{
public static final String HOST = "localhost";
public static final String HOST = "26th.net";
public static final String CHARSET = "windows-1251";
 
public static void send(String from, String to, String subject, String body)
46,12 → 46,24
public static void sendRegistrationMessage(Participant participant, String ip)
throws UserException
{
prepareMail(participant, ip, "ak.kickup.core.mail.subject", "ak/kickup/core/RegistrationMail.txt");
}
 
public static void sendRemindMessage(Participant participant, String ip)
throws UserException
{
prepareMail(participant, ip, "ak.kickup.core.remindmail.subject", "ak/kickup/core/RemindMail.txt");
}
 
private static void prepareMail(Participant participant, String ip, String subjectKey, String messageFile)
throws UserException
{
String subject;
StringBuffer message = new StringBuffer();
 
// get subject
ResourceBundle res = ResourceBundle.getBundle("ak/kickup/core/CoreResources");
String subjectString = res.getString("ak.kickup.core.mail.subject");
String subjectString = res.getString(subjectKey);
subject = MessageFormat.format(subjectString,
new String[] { participant.getEvent().getName() } );
 
61,7 → 73,7
if(cl == null) cl = ClassLoader.getSystemClassLoader();
 
BufferedReader file = new BufferedReader(new InputStreamReader(cl.getResourceAsStream(
"ak/kickup/core/RegistrationMail.txt"), "UTF8"));
messageFile), "UTF-8"));
char[] buf = new char[2048];
int bufLen;
while((bufLen = file.read(buf)) >= 0) {
/kickup/trunk/webapp/participant/ident.jsp
42,7 → 42,7
<td><html:text property="ident" style="width:240px" maxlength="10" /></td>
</tr>
<tr>
<td colspan=2><html:submit>Перейти к изменению</html:submit></td>
<td colspan=2><html:image page="/images/login.gif" alt="Перейти к изменению" /></td>
</tr>
<tr>
<td colspan=2>&nbsp;</td>
61,7 → 61,7
<td><html:text property="ident" style="width:240px" maxlength="10" /></td>
</tr>
<tr>
<td colspan=2><html:submit>Я не еду</html:submit></td>
<td colspan=2><html:image page="/images/unregister.gif" alt="Я не еду" /></td>
</tr>
<tr>
<td colspan=2>&nbsp;</td>
73,10 → 73,9
<p>Срок отказа от регистрации прошел.</p>
</logic:equal>
 
<!--
<h2>Напомнить ваш номер</h2>
 
<html:form action="/participant/login" method="GET">
<html:form action="/participant/remind" method="GET">
<input type=hidden name="event" value="<bean:write name="event" property="id" />">
<table border=0 cellspacing=0 cellpadding=4 width=500>
<tr>
87,10 → 86,10
</tr>
<tr>
<th width=120>Ваш e-mail</th>
<td><html:text property="ident" style="width:240px" maxlength="10" /></td>
<td><html:text property="email" style="width:240px" maxlength="255" /></td>
</tr>
<tr>
<td colspan=2><html:submit>Выслать номер</html:submit></td>
<td colspan=2><html:image page="/images/remind.gif" alt="Выслать номер" /></td>
</tr>
<tr>
<td colspan=2>&nbsp;</td>
97,7 → 96,6
</tr>
</table>
</html:form>
-->
 
<%@ include file="/footer.jsp" %>
 
/kickup/trunk/webapp/participant/register.jsp
143,9 → 143,7
</logic:notEmpty>
 
<tr>
<td colspan=3>
<html:submit>Зарегистрироваться</html:submit>
</td>
<td colspan=3><html:image page="/images/register-small.gif" alt="Зарегистрироватьсяу" /></td>
</tr>
</table>
 
/kickup/trunk/webapp/participant/edit.jsp
140,9 → 140,7
</logic:notEmpty>
 
<tr>
<td colspan=3>
<html:submit>Сохранить</html:submit>
</td>
<td colspan=3><html:image page="/images/save.gif" alt="Сохранить" /></td>
</tr>
</table>
 
/kickup/trunk/webapp/participant/reminded.jsp
0,0 → 1,35
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/ak-strutsx.tld" prefix="strutsx" %>
<html>
 
<head>
<meta http-equiv="expires" content="0">
<title>Пьянка XP - <bean:write name="event" property="name" /> - Напомнить номер</title>
<link rel="stylesheet" type="text/css" href="<strutsx:root />/style/general.css">
</head>
 
<body>
 
<%@ include file="/header.jsp" %>
 
<strutsx:errorsIterator id="errors" />
<strutsx:notEmpty name="errors">
<div class="error">Ошибки:
<ul>
<logic:iterate name="errors" id="error">
<li><strutsx:message name="error" property="key" valuesProperty="values" /></li>
</logic:iterate>
</ul>
</div>
</strutsx:notEmpty>
 
<h2>На указаный e-mail выслан ваш регистрационный номер</h2>
 
<%@ include file="/footer.jsp" %>
 
</body>
 
</html>
/kickup/trunk/webapp/event/list.jsp
26,35 → 26,52
</div>
</strutsx:notEmpty>
 
<table border=1>
<table border=0 cellspacing=0 cellpadding=4 width=860>
<tr>
<th>Название</th>
<th>Место/город</th>
<th>Начало</th>
<th>Окончание</th>
<th>Регистрация разрешена</th>
<th class="headerCell">Название</th>
<th class="headerCell">Место/город</th>
<th class="headerCell">Начало</th>
<th class="headerCell">Окончание</th>
<th class="headerCell">Регистрация разрешена</th>
</tr>
 
<logic:iterate name="events" id="e">
<tr>
<td>
<td class="listCell">
<html:link action="/event/show" paramId="id" paramName="e" paramProperty="id">
<bean:write name="e" property="name" />
</html:link>
</td>
<td><bean:write name="e" property="place" />&nbsp;</td>
<td><bean:write name="e" property="start" format="dd.MM.yyyy" />&nbsp;</td>
<td><bean:write name="e" property="stop" format="dd.MM.yyyy" />&nbsp;</td>
<td>
<td class="listCell"><bean:write name="e" property="place" />&nbsp;</td>
<td class="listCell"><bean:write name="e" property="start" format="dd.MM.yyyy" />&nbsp;</td>
<td class="listCell"><bean:write name="e" property="stop" format="dd.MM.yyyy" />&nbsp;</td>
<td class="listCell">
<logic:equal name="e" property="registrationAvailable" value="true">да</logic:equal>
<logic:notEqual name="e" property="registrationAvailable" value="true">нет</logic:notEqual>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan=5>&nbsp;</td>
</tr>
</table>
 
<p><html:link page="/admin">Администрирование</html:link></<>
<!-- footer begin -->
<table border=0 cellspacing=0 cellpadding=4>
<tr>
<td colspan=2><img src="<strutsx:root />/images/line.gif" alt=""></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align=right valign=top style="text-align: right; ">
<html:link page="/admin"><img src="<strutsx:root />/images/admin.gif" alt="Администрирование" border=0></html:link>
</td>
</tr>
 
<%@ include file="/copyright.jsp" %>
</table>
<!-- footer end -->
 
</body>
 
</html>
/kickup/trunk/webapp/copyright.jsp
0,0 → 1,12
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<tr>
<td colspan=2>&nbsp;</td>
</tr>
<tr>
<td style="font-size: 8pt; background-color:#E0E0E0">
Copyleft 2004 RusBook, toader, dev
</td>
<td style="font-size: 8pt; background-color:#E0E0E0; text-align: right">
Hosting: <a href="http://www.26th.net/public/hosting">26th.net</a>
</td>
</tr>
/kickup/trunk/webapp/images/login.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kickup/trunk/webapp/images/remind.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kickup/trunk/webapp/images/unregister.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kickup/trunk/webapp/images/register-small.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kickup/trunk/webapp/images/save.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/kickup/trunk/webapp/WEB-INF/struts-config.xml
157,6 → 157,13
</form-bean>
 
<form-bean
name="ParticipantRemindForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="event" type="java.lang.String" />
<form-property name="email" type="java.lang.String" />
</form-bean>
 
<form-bean
name="ParticipantActListForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="act" type="java.lang.String" />
287,6 → 294,18
<forward name="default" path="/participant/unregistered.jsp" />
</action>
 
<action
path="/participant/remind"
type="ak.kickup.core.action.ParticipantAction"
parameter="remind"
name="ParticipantRemindForm"
validate="true"
scope="request"
input="/participant/ident.jsp"
>
<forward name="default" path="/participant/reminded.jsp" />
</action>
 
<!-- == act ================================================================================= -->
 
<action
/kickup/trunk/webapp/WEB-INF/validation.xml
80,14 → 80,16
</form>
 
<form name="ParticipantListForm">
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
</form>
 
<form name="ParticipantForm">
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="id" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.id.wrong" />
95,8 → 97,9
</form>
 
<form name="ParticipantLoginForm">
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="ident" depends="required">
<msg name="required" key="ak.kickup.core.participant.edit.ident.required" />
104,8 → 107,9
</form>
 
<form name="ParticipantEditForm">
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="id" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.id.wrong" />
139,8 → 143,9
</form>
 
<form name="ParticipantRegisterForm">
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="nick" depends="required">
<msg name="required" key="ak.kickup.core.participant.edit.nick.required" />
171,8 → 176,9
<field property="ident" depends="required">
<msg name="required" key="ak.kickup.core.participant.edit.ident.required" />
</field>
<field property="event" depends="long">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="persons" depends="required,integer,intRange">
<msg name="required" key="ak.kickup.core.participant.edit.persons.required" />
192,6 → 198,17
</field>
</form>
 
<form name="ParticipantRemindForm">
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
<msg name="required" key="ak.kickup.core.participant.edit.event.wrong" />
</field>
<field property="email" depends="required,email">
<msg name="required" key="ak.kickup.core.participant.remind.email.required" />
<msg name="email" key="ak.kickup.core.participant.remind.email.wrong" />
</field>
</form>
 
<form name="ParticipantActListForm">
<field property="event" depends="long,required">
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" />
/kickup/trunk/webapp/admin/footer.jsp
1,16 → 1,6
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- footer begin -->
<table border=0 cellspacing=0 cellpadding=4 width=840>
<tr>
<td colspan=2>&nbsp;</td>
</tr>
<tr>
<td style="font-size: 8pt; background-color:#E0E0E0">
Copyleft 2004 RusBook, toader, dev
</td>
<td style="font-size: 8pt; background-color:#E0E0E0; text-align: right">
Hosting: <a href="http://www.26th.net/public/hosting">26th.net</a>
</td>
</tr>
<%@ include file="/copyright.jsp" %>
</table>
<!-- footer end -->
/kickup/trunk/webapp/footer.jsp
2,6 → 2,9
<!-- footer begin -->
<table border=0 cellspacing=0 cellpadding=4>
<tr>
<td colspan=2>&nbsp;</td>
</tr>
<tr>
<td colspan=2><img src="<strutsx:root />/images/line.gif" alt=""></td>
</tr>
<tr>
13,7 → 16,7
<tr>
<td>Контактный e-mail: <a href="mailto:<bean:write name="event" property="email" />"><bean:write name="event" property="email" /></a></td>
<td align=right valign=top style="text-align: right; ">
<html:link page="/"><img src="<strutsx:root />/images/list.gif" alt="Администрирование" border=0></html:link>
<html:link page="/"><img src="<strutsx:root />/images/list.gif" alt="Полный список" border=0></html:link>
</td>
<tr>
<logic:notEmpty name="event" property="phones" >
23,16 → 26,6
<tr>
</logic:notEmpty>
 
<tr>
<td colspan=2>&nbsp;</td>
</tr>
<tr>
<td style="font-size: 8pt; background-color:#E0E0E0">
Copyleft 2004 RusBook, toader, dev
</td>
<td style="font-size: 8pt; background-color:#E0E0E0; text-align: right">
Hosting: <a href="http://www.26th.net/public/hosting">26th.net</a>
</td>
</tr>
<%@ include file="/copyright.jsp" %>
</table>
<!-- footer end -->