Permalink
Browse files

Merge branch 'master' of github.com:meetup/meetupnow

  • Loading branch information...
2 parents 98302d5 + 73405ff commit 1226273184eb2c747b7051a9f0247114e071b152 @aquillano aquillano committed Jun 28, 2010
Showing with 52 additions and 1 deletion.
  1. +15 −0 src/meetupnow/SetPrefsServlet.java
  2. +36 −0 src/meetupnow/UserInfo.java
  3. 0 src/register.java
  4. +1 −1 war/UserPrefs.jsp
@@ -25,6 +25,9 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
String distance = "";
String cell = "";
String carrier = "";
+ String cellOpt = "";
+ String emailOpt = "";
+ String zip = "";
if (req.getQueryString() != null) {
callback = req.getParameter("callback");
mu_id = req.getParameter("id");
@@ -34,6 +37,9 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
distance = req.getParameter("distance");
cell = req.getParameter("cell");
carrier = req.getParameter("carrier");
+ cellOpt = req.getParameter("cellOpt");
+ emailOpt = req.getParameter("emailOpt");
+ zip = req.getParameter("zip");
}
javax.servlet.http.Cookie[] cookies = req.getCookies();
@@ -78,6 +84,15 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
if (distance != null) {
profs.get(0).setDistance(distance);
}
+ if (zip != null) {
+ profs.get(0).setZip(zip);
+ }
+ if (cellOpt.equals("yes")) {profs.get(0).setCellOpt(true);}
+ else if (cellOpt.equals("no")) {profs.get(0).setCellOpt(false);}
+
+ if (emailOpt.equals("yes")) {profs.get(0).setEmailOpt(true);}
+ else if (emailOpt.equals("no")) {profs.get(0).setEmailOpt(false);}
+
profs.get(0).incrementLoginCount();
} else {
@@ -28,6 +28,9 @@
private String email;
@Persistent
+ private String zip;
+
+ @Persistent
private String distance;
@Persistent
@@ -36,20 +39,53 @@
@Persistent
private String carrier;
+ @Persistent
+ private boolean cellOpt;
+
+ @Persistent
+ private boolean emailOpt;
+
public UserInfo() {
+ zip = "";
user_id = "";
groups = "";
loginCount = 0;
email = "";
distance = "";
cellNum = "";
carrier = "";
+ cellOpt = false;
+ emailOpt = false;
}
public Key getKey() {
return key;
}
+ public void setZip(String z) {
+ zip = z;
+ }
+
+ public String getZip() {
+ return zip;
+ }
+
+ public boolean getCellOpt() {
+ return cellOpt;
+ }
+
+ public boolean getEmailOpt() {
+ return emailOpt;
+ }
+
+ public void setCellOpt(boolean b) {
+ cellOpt = b;
+ }
+
+ public void setEmailOpt(boolean b) {
+ emailOpt = b;
+ }
+
public void setCellNum(String c) {
cellNum = c;
}
View
No changes.
View
@@ -141,7 +141,7 @@
<ul>
<li>
<label for="upZip">Zip Code</label>
- <input type="text" class="text" id="upZip" name="zipcode">
+ <input type="text" class="text" id="upZip" name="zip">
</li>
<li>
<label for="upSearchDistance">Radius (mi)</label>

0 comments on commit 1226273

Please sign in to comment.