} catch (Exception e) {
}
}
ReceivedSms sms=new ReceivedSms();
sms.setSender(msisdn+"");
sms.setContent(g.getId()+" "+achieved);
//send message to MDB
sendSMS(req, sms);
MessageBean.setMyMessage(req, ("User "+userFriendlyName+" achieved "+achieved+" point(s) in game "+g.getName()+"."));
form.reset();
MessageBean.addSpeedOMeterCheckPoint(req, "point4");
return am.findForward("list");
} else if (req.getParameter("simulateSeveralSMS")!=null) {
//send several SMSs
if (!SecurityCenter.canIManualyInsertPlayingResults(webUser.getId(), g,session)) {
MessageBean.setMyMessage(req, ("Error: Insufficient privileges."));
form.reset();
return am.findForward("list");
}
long[] users={form.getSimulatedUser1(),form.getSimulatedUser2(),form.getSimulatedUser3(),form.getSimulatedUser4(),
form.getSimulatedUser5(),form.getSimulatedUser6(),form.getSimulatedUser7(),form.getSimulatedUser8(),
form.getSimulatedUser9(),form.getSimulatedUser10()};
int[] scores={form.getSimulatedScore1(),form.getSimulatedScore2(),form.getSimulatedScore3(),form.getSimulatedScore4(),
form.getSimulatedScore5(),form.getSimulatedScore6(),form.getSimulatedScore7(),form.getSimulatedScore8(),
form.getSimulatedScore9(),form.getSimulatedScore10()};
for (int i=0;i<10;i++) {
int achieved=scores[i];
long msisdn=-1;
String userFriendlyName=msisdn+"";
if (achieved<0) continue;
//selected user
if (msisdn==-1) {
try {
User u=UserDao.findUser(users[i], session);
msisdn=u.getMsisdn();
userFriendlyName=u.getLastName()+" "+u.getFirstName();
} catch (Exception e) {
}
}
ReceivedSms sms=new ReceivedSms();
sms.setSender(msisdn+"");
sms.setContent(g.getId()+" "+achieved);
//send message to MDB
sendSMS(req, sms);
}