function subscribePage($id) { $data = PageData($id); list($attributes,$attributedata) = PageAttributes($data); $selected_lists = explode(',',$data["lists"]); $html = '<title>'.$GLOBALS["strSubscribeTitle"].'</title>'; $html .= $data["header"]; $html .= $data["intro"]; $html .= ' <br/><font class="required">'.$GLOBALS["strRequired"].'</font><br/> '.$GLOBALS["msg"].' <script language="Javascript" type="text/javascript"> var fieldstocheck = new Array(); fieldnames = new Array(); function checkform() { for (i=0;i<fieldstocheck.length;i++) { if (eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].value") == "") { alert("'.$GLOBALS["strPleaseEnter"].' "+fieldnames[i]); eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].focus()"); return false; } } return true; } function addFieldToCheck(value,name) { fieldstocheck[fieldstocheck.length] = value; fieldnames[fieldnames.length] = name; } </script>'; $html .= formStart('name="subscribeform"'); if ($_SESSION["adminloggedin"]) { $html .= '<p><b>You are logged in as '.$_SESSION["logindetails"]["adminname"].'</b></p>'; $html .= '<p><b>Please choose</b>: <br/><input type=radio name="makeconfirmed" value="1"> Make confirmed immediately <br/><input type=radio name="makeconfirmed" value="0"> Send request for confirmation email </p>'; } $html .= '<table border=0>'; $html .= ListAttributes($attributes,$attributedata,$data["htmlchoice"]); $html .= '</table>'; if (ENABLE_RSS) { $html .= RssOptions($data); } $html .= ListAvailableLists("",$data["lists"]); $html .= '<p><input type=submit name="subscribe" value="'.$data["button"].'" onClick="return checkform();"></p> </form><br/><br/> <p><a href="'.getConfig("unsubscribeurl").'">'.$GLOBALS["strUnsubscribe"].'</a></p> '.$GLOBALS["PoweredBy"]; $html .= $data["footer"]; ###### HACK FOR AMP ########################################################################### $html=''; ###### END HACK FOR AMP #################################################################### return $html; }
function subscribePage($id) { $data = PageData($id); if (isset($data['language_file']) && is_file(dirname(__FILE__) . '/texts/' . $data['language_file'])) { @(include dirname(__FILE__) . '/texts/' . $data['language_file']); } list($attributes, $attributedata) = PageAttributes($data); $selected_lists = explode(',', $data["lists"]); $html = '<title>' . $GLOBALS["strSubscribeTitle"] . '</title>'; $html .= $data["header"]; $html .= $data["intro"]; $html .= ' <br/><font class="required">' . $GLOBALS["strRequired"] . '</font><br/> ' . $GLOBALS["msg"] . ' <script language="Javascript" type="text/javascript"> function checkform() { for (i=0;i<fieldstocheck.length;i++) { if (eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].type") == "checkbox") { if (document.subscribeform.elements[fieldstocheck[i]].checked) { } else { alert("' . $GLOBALS["strPleaseEnter"] . ' "+fieldnames[i]); eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].focus()"); return false; } } else { if (eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].value") == "") { alert("' . $GLOBALS["strPleaseEnter"] . ' "+fieldnames[i]); eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].focus()"); return false; } } } for (i=0;i<groupstocheck.length;i++) { if (!checkGroup(groupstocheck[i],groupnames[i])) { return false; } } '; if ($data['emaildoubleentry'] == 'yes') { $html .= ' if(! compareEmail()) { alert("' . str_replace('"', '\\"', $GLOBALS["strEmailsNoMatch"]) . '"); return false; }'; } $html .= ' return true; } var fieldstocheck = new Array(); var fieldnames = new Array(); function addFieldToCheck(value,name) { fieldstocheck[fieldstocheck.length] = value; fieldnames[fieldnames.length] = name; } var groupstocheck = new Array(); var groupnames = new Array(); function addGroupToCheck(value,name) { groupstocheck[groupstocheck.length] = value; groupnames[groupnames.length] = name; } function compareEmail() { return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value); } function checkGroup(name,value) { option = -1; for (i=0;i<document.subscribeform.elements[name].length;i++) { if (document.subscribeform.elements[name][i].checked) { option = i; } } if (option == -1) { alert ("' . $GLOBALS["strPleaseEnter"] . ' "+value); return false; } return true; } </script>'; $html .= formStart('name="subscribeform"'); # @@@ update if (isset($_SESSION["adminloggedin"]) && $_SESSION["adminloggedin"]) { $html .= '<style type="text/css"> div.adminmessage { width: 100%; border: 2px dashed #000000; padding: 10px; margin-bottom: 15px; background-color: #E7BE8F; } </style>'; $html .= '<div class="adminmessage"><p><b>You are logged in as administrator (' . $_SESSION["logindetails"]["adminname"] . ') of this phplist system</b></p>'; $html .= '<p>You are therefore offered the following choice, which your users will not see when they load this page.</p>'; $html .= '<p><a href="' . $GLOBALS['adminpages'] . '">Go back to admin area</a></p>'; $html .= '<p><b>Please choose</b>: <br/><input type=radio name="makeconfirmed" value="1"> Make this user confirmed immediately <br/><input type=radio name="makeconfirmed" value="0" checked> Send this user a request for confirmation email </p></div>'; } $html .= '<table border=0>'; $html .= ListAttributes($attributes, $attributedata, $data["htmlchoice"], 0, $data['emaildoubleentry']); $html .= '</table>'; if (ENABLE_RSS) { $html .= RssOptions($data); } $html .= ListAvailableLists("", $data["lists"]); if (empty($data['button'])) { $data['button'] = $GLOBALS['strSubmit']; } if (USE_SPAM_BLOCK) { $html .= '<div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20"></div>'; } $html .= '<p><input type=submit name="subscribe" value="' . $data["button"] . '" onClick="return checkform();"></p> </form><br/><br/> <p><a href="' . getConfig("unsubscribeurl") . '&id=' . $id . '">' . $GLOBALS["strUnsubscribe"] . '</a></p> ' . $GLOBALS["PoweredBy"]; $html .= $data["footer"]; return $html; }
function subscribePage($id) { $data = PageData($id); list($attributes, $attributedata) = PageAttributes($data); $selected_lists = explode(',', $data["lists"]); $html = '<title>' . $GLOBALS["strSubscribeTitle"] . '</title>'; $html .= $data["header"]; $html .= $data["intro"]; $html .= ' <br/><font class="required">' . $GLOBALS["strRequired"] . '</font><br/> ' . $GLOBALS["msg"] . ' <script language="Javascript" type="text/javascript"> var fieldstocheck = new Array(); fieldnames = new Array(); function checkform() { for (i=0;i<fieldstocheck.length;i++) { if (eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].value") == "") { alert("' . $GLOBALS["strPleaseEnter"] . ' "+fieldnames[i]); eval("document.subscribeform.elements[\'"+fieldstocheck[i]+"\'].focus()"); return false; } } '; if ($data['emaildoubleentry'] == 'yes') { $html .= ' if(! compareEmail()) { alert("Email addresses you entered do not match"); return false; }'; } $html .= ' return true; } function addFieldToCheck(value,name) { fieldstocheck[fieldstocheck.length] = value; fieldnames[fieldnames.length] = name; } function compareEmail() { return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value); } </script>'; $html .= formStart('name="subscribeform"'); # @@@ update if (isset($_SESSION["adminloggedin"]) && $_SESSION["adminloggedin"]) { $html .= '<style type="text/css"> div.adminmessage { width: 100%; border: 2px dashed #000000; padding: 10px; margin-bottom: 15px; background-color: #E7BE8F; } </style>'; $html .= '<div class="adminmessage"><p><b>You are logged in as administrator (' . $_SESSION["logindetails"]["adminname"] . ') of this phplist system</b></p>'; $html .= '<p>You are therefore offered the following choice, which your users will not see when they load this page.</p>'; $html .= '<p><b>Please choose</b>: <br/><input type=radio name="makeconfirmed" value="1"> Make this user confirmed immediately <br/><input type=radio name="makeconfirmed" value="0" checked> Send this user a request for confirmation email </p></div>'; } $html .= '<table border=0>'; $html .= ListAttributes($attributes, $attributedata, $data["htmlchoice"], 0, $data['emaildoubleentry']); $html .= '</table>'; if (ENABLE_RSS) { $html .= RssOptions($data); } $html .= ListAvailableLists("", $data["lists"]); $html .= '<p><input type=submit name="subscribe" value="' . $data["button"] . '" onClick="return checkform();"></p> </form><br/><br/> <p><a href="' . getConfig("unsubscribeurl") . '&id=' . $id . '">' . $GLOBALS["strUnsubscribe"] . '</a></p> ' . $GLOBALS["PoweredBy"]; $html .= $data["footer"]; return $html; }