1) { header("Location: index.php3?HeadType=$HeadType"); } else { if (!$email) $email=pg_result($result, 0, "email"); $password=pg_result($result, 0, "email"); if ($send != "true") { $city=pg_result($result, 0, "city"); $school=pg_result($result, 0, "school"); $grade=pg_result($result, 0, "grade"); $state=pg_result($result, 0, "state"); $level=pg_result($result, 0, "level"); } } # Letezik a user? if ($sub_oid) { $result=pg_exec("select oid,* from subscribers where oid=$sub_oid"); } if (pg_numrows($result) <> 1) { header("Location: index.php3?HeadType=$HeadType"); } else { if (!$email) $email=pg_result($result, 0, "email"); } # Newsletterek feltöltése $result=pg_exec("select oid,* from newsletters where ord<4 order by ord"); $newsl_db=pg_numrows($result); for ($ind=0; $ind < $newsl_db; $ind++) { $name[] = pg_result($result, $ind, "name"); $descr[] = pg_result($result, $ind, "descr"); $nl_name[] = pg_result($result, $ind, "nl_name"); $oid[] = pg_result($result, $ind, "oid"); } if ($send == "true") { $checksum=0; #if (!$school) {$checksum=$checksum+16384;} if ((!$newemail) || (!strpos($newemail,"@")) || (!strpos($newemail,".")) || (strpos($newemail," "))) { $checksum++; } } if ($send == "true") { $van_e=0; $result=pg_exec("select oid from newsletters where ord<4 order by ord"); for ($ind=0; $ind < pg_numrows($result); $ind++) { $newsl_oid=pg_result($result, $ind, "oid"); $result2=pg_exec("select * from subscribe where sub_oid=$sub_oid and newsl_oid=$newsl_oid"); $valt_nev="regi_subscribe".($ind+1); if (pg_numrows($result2) > 0) { $$valt_nev=1; } else { $$valt_nev=0; } $ss="subscribe".($ind+1); $uj=$$ss; $regi=$$valt_nev; if (!$uj) { $uj=0; } if ($uj!=1) { mail("majordomo@news.edgate.com","","unsubscribe ".$nl_name[$ind]." $oldemail","From:glucz@streamgroup.com"); } if ($uj==1) { $van_e=1; mail("majordomo@news.edgate.com","","subscribe ".$nl_name[$ind]." $email","From:glucz@streamgroup.com"); } # Ha volt változás if ($regi <> $uj) { # Unsubcribe -> Subscribe if (($uj)==1 && ($regi)==0) { # mail("majordomo@ews.edgate.com","","subscribe ".$nl_name[$ind]." $email"); pg_exec("insert into subscribe (sub_oid, newsl_oid) values ($sub_oid, $oid[$ind])"); pg_exec("update subscribers set unsub_date=null where oid=$sub_oid"); } # Subcribe -> Unsubscribe if (($uj==0) && ($regi)==1) { # mail("majordomo@ews.edgate.com","","unsubscribe ".$nl_name[$ind]." $email"); pg_exec("delete from subscribe where sub_oid=$sub_oid and newsl_oid=$newsl_oid"); pg_exec("update subscribers set unsub_date='now' where oid=$sub_oid"); } } } if ($van_e==0) {pg_exec("delete from subscribers where oid=$sub_oid");} # header("Location: thankyou.php3?sub_oid=$sub_oid&HeadType=$HeadType"); } else { ## Alapbeállitások betöltése $result=pg_exec("select oid from newsletters where ord<4 order by ord"); for ($ind=0; $ind < pg_numrows($result); $ind++) { $newsl_oid=pg_result($result, $ind, "oid"); $result2=pg_exec("select * from subscribe where sub_oid=$sub_oid and newsl_oid=$newsl_oid"); $valt_nev="subscribe".($ind+1); if (pg_numrows($result2) > 0) { $$valt_nev=1; } else { $$valt_nev=0; } } } if ($send == "true") { if ($checksum == 0) { pg_exec("update subscribers set email=lower('$newemail'), city='$city', school='$school', grade='$grade', state='$state', level='$level' where oid=$sub_oid"); $result=pg_exec("select nl_name from newsletters where oid in (select newsl_oid from subscribe where sub_oid=$sub_oid)"); for ($ind=0; $ind < pg_numrows($result); $ind++) { $nl_name = pg_result($result, $ind, "nl_name"); # mail("majordomo@gocopernicus.com","","subscribe ".$nl_name." $email"); # mail("majordomo@gocopernicus.com","","unsubscribe ".$nl_name." $email"); } header("Location: thankyou.php3?sub_oid=$sub_oid&HeadType=$HeadType"); } } ?> EdGate Newsletter Center
EdGate Education Gateway
spacer
  School NotesTeachers' PlaceParents' Placehelp
spacer

Please modify your subscription data below:


Your email address is invalid!

>
>Sign-Up Checkbox  
value=1>
* Required
*"; } ?>New email address:
City:
State:
16383) { echo ""; } ?> School District:
Grade Subject:
Level:

Back to Newsletter Center.