/kickup/trunk/webapp/copyright.jsp |
---|
File deleted |
/kickup/trunk/webapp/WEB-INF/struts-config.xml |
---|
157,13 → 157,6 |
</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" /> |
294,18 → 287,6 |
<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,16 → 80,14 |
</form> |
<form name="ParticipantListForm"> |
<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 property="event" depends="long"> |
<msg name="long" key="ak.kickup.core.participant.edit.event.wrong" /> |
</field> |
</form> |
<form name="ParticipantForm"> |
<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 property="event" depends="long"> |
<msg name="long" 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" /> |
97,9 → 95,8 |
</form> |
<form name="ParticipantLoginForm"> |
<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 property="event" depends="long"> |
<msg name="long" 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" /> |
107,9 → 104,8 |
</form> |
<form name="ParticipantEditForm"> |
<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 property="event" depends="long"> |
<msg name="long" 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" /> |
143,9 → 139,8 |
</form> |
<form name="ParticipantRegisterForm"> |
<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 property="event" depends="long"> |
<msg name="long" 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" /> |
176,9 → 171,8 |
<field property="ident" depends="required"> |
<msg name="required" key="ak.kickup.core.participant.edit.ident.required" /> |
</field> |
<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 property="event" depends="long"> |
<msg name="long" 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" /> |
198,17 → 192,6 |
</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,6 → 1,16 |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<!-- footer begin --> |
<table border=0 cellspacing=0 cellpadding=4 width=840> |
<%@ include file="/copyright.jsp" %> |
<tr> |
<td colspan=2> </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> |
</table> |
<!-- footer end --> |
/kickup/trunk/webapp/participant/reminded.jsp |
---|
File deleted |
/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:image page="/images/login.gif" alt="Перейти к изменению" /></td> |
<td colspan=2><html:submit>Перейти к изменению</html:submit></td> |
</tr> |
<tr> |
<td colspan=2> </td> |
61,7 → 61,7 |
<td><html:text property="ident" style="width:240px" maxlength="10" /></td> |
</tr> |
<tr> |
<td colspan=2><html:image page="/images/unregister.gif" alt="Я не еду" /></td> |
<td colspan=2><html:submit>Я не еду</html:submit></td> |
</tr> |
<tr> |
<td colspan=2> </td> |
73,9 → 73,10 |
<p>Срок отказа от регистрации прошел.</p> |
</logic:equal> |
<!-- |
<h2>Напомнить ваш номер</h2> |
<html:form action="/participant/remind" method="GET"> |
<html:form action="/participant/login" method="GET"> |
<input type=hidden name="event" value="<bean:write name="event" property="id" />"> |
<table border=0 cellspacing=0 cellpadding=4 width=500> |
<tr> |
86,10 → 87,10 |
</tr> |
<tr> |
<th width=120>Ваш e-mail</th> |
<td><html:text property="email" style="width:240px" maxlength="255" /></td> |
<td><html:text property="ident" style="width:240px" maxlength="10" /></td> |
</tr> |
<tr> |
<td colspan=2><html:image page="/images/remind.gif" alt="Выслать номер" /></td> |
<td colspan=2><html:submit>Выслать номер</html:submit></td> |
</tr> |
<tr> |
<td colspan=2> </td> |
96,6 → 97,7 |
</tr> |
</table> |
</html:form> |
--> |
<%@ include file="/footer.jsp" %> |
/kickup/trunk/webapp/participant/register.jsp |
---|
143,7 → 143,9 |
</logic:notEmpty> |
<tr> |
<td colspan=3><html:image page="/images/register-small.gif" alt="Зарегистрироватьсяу" /></td> |
<td colspan=3> |
<html:submit>Зарегистрироваться</html:submit> |
</td> |
</tr> |
</table> |
/kickup/trunk/webapp/participant/edit.jsp |
---|
140,7 → 140,9 |
</logic:notEmpty> |
<tr> |
<td colspan=3><html:image page="/images/save.gif" alt="Сохранить" /></td> |
<td colspan=3> |
<html:submit>Сохранить</html:submit> |
</td> |
</tr> |
</table> |
/kickup/trunk/webapp/event/list.jsp |
---|
26,52 → 26,35 |
</div> |
</strutsx:notEmpty> |
<table border=0 cellspacing=0 cellpadding=4 width=860> |
<table border=1> |
<tr> |
<th class="headerCell">Название</th> |
<th class="headerCell">Место/город</th> |
<th class="headerCell">Начало</th> |
<th class="headerCell">Окончание</th> |
<th class="headerCell">Регистрация разрешена</th> |
<th>Название</th> |
<th>Место/город</th> |
<th>Начало</th> |
<th>Окончание</th> |
<th>Регистрация разрешена</th> |
</tr> |
<logic:iterate name="events" id="e"> |
<tr> |
<td class="listCell"> |
<td> |
<html:link action="/event/show" paramId="id" paramName="e" paramProperty="id"> |
<bean:write name="e" property="name" /> |
</html:link> |
</td> |
<td class="listCell"><bean:write name="e" property="place" /> </td> |
<td class="listCell"><bean:write name="e" property="start" format="dd.MM.yyyy" /> </td> |
<td class="listCell"><bean:write name="e" property="stop" format="dd.MM.yyyy" /> </td> |
<td class="listCell"> |
<td><bean:write name="e" property="place" /> </td> |
<td><bean:write name="e" property="start" format="dd.MM.yyyy" /> </td> |
<td><bean:write name="e" property="stop" format="dd.MM.yyyy" /> </td> |
<td> |
<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> </td> |
</tr> |
</table> |
<!-- 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> </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> |
<p><html:link page="/admin">Администрирование</html:link></<> |
<%@ include file="/copyright.jsp" %> |
</table> |
<!-- footer end --> |
</body> |
</html> |
/kickup/trunk/webapp/footer.jsp |
---|
2,9 → 2,6 |
<!-- footer begin --> |
<table border=0 cellspacing=0 cellpadding=4> |
<tr> |
<td colspan=2> </td> |
</tr> |
<tr> |
<td colspan=2><img src="<strutsx:root />/images/line.gif" alt=""></td> |
</tr> |
<tr> |
16,7 → 13,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" > |
26,6 → 23,16 |
<tr> |
</logic:notEmpty> |
<%@ include file="/copyright.jsp" %> |
<tr> |
<td colspan=2> </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> |
</table> |
<!-- footer end --> |
/kickup/trunk/webapp/images/login.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: 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: |
Deleted: 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: |
Deleted: 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: |
Deleted: 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: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/kickup/trunk/src/ak/kickup/core/RemindMail.txt |
---|
File deleted |
/kickup/trunk/src/ak/kickup/core/action/ParticipantAction.java |
---|
40,8 → 40,7 |
throws Exception |
{ |
if("submit".equals(mapping.getParameter()) || "update".equals(mapping.getParameter()) |
|| "unregister".equals(mapping.getParameter()) || "login".equals(mapping.getParameter()) |
|| "remind".equals(mapping.getParameter())) |
|| "unregister".equals(mapping.getParameter()) || "login".equals(mapping.getParameter())) |
{ |
DynaActionForm theForm = (DynaActionForm)form; |
Long eventId = StringConverter.parseLong(theForm.get("event")); |
304,30 → 303,6 |
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/mail/Messages.java |
---|
16,7 → 16,7 |
public abstract class Messages |
{ |
public static final String HOST = "26th.net"; |
public static final String HOST = "localhost"; |
public static final String CHARSET = "windows-1251"; |
public static void send(String from, String to, String subject, String body) |
46,24 → 46,12 |
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(subjectKey); |
String subjectString = res.getString("ak.kickup.core.mail.subject"); |
subject = MessageFormat.format(subjectString, |
new String[] { participant.getEvent().getName() } ); |
73,7 → 61,7 |
if(cl == null) cl = ClassLoader.getSystemClassLoader(); |
BufferedReader file = new BufferedReader(new InputStreamReader(cl.getResourceAsStream( |
messageFile), "UTF-8")); |
"ak/kickup/core/RegistrationMail.txt"), "UTF8")); |
char[] buf = new char[2048]; |
int bufLen; |
while((bufLen = file.read(buf)) >= 0) { |
/kickup/trunk/src/ak/kickup/core/model/ParticipantManager.java |
---|
86,25 → 86,6 |
} |
} |
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/RegistrationMail.txt |
---|
6,7 → 6,7 |
или изменить свои данные. |
Участие в "%eventName%" стоит %eventPrice% евро. |
Переведите, пожалуйста, деньги на счет: |
Переведите, полжалуйста, деньги на счет: |
%eventMoneyAccount% |
/kickup/trunk/src/ak/kickup/core/CoreResources.properties |
---|
39,12 → 39,8 |
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/doc/todo.txt |
---|
6,7 → 6,7 |
+ Max length |
+ Remind number to email |
Send number to email |
+ Image buttons: save, change, unregister, register |
Image buttons: save, change, unregister, register |