[Phpslash-commit] CVS: phpslash-ft/class MailingList.class,1.9,1.10
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2002-06-17 18:02:08
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv8907/phpslash-ft/class Modified Files: MailingList.class Log Message: list method returns Index: MailingList.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/MailingList.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MailingList.class 16 Mar 2002 17:15:12 -0000 1.9 --- MailingList.class 17 Jun 2002 18:02:05 -0000 1.10 *************** *** 46,58 **** function newList() { - titlebar("100%",pslgetText("Email Headline Updates")); - $this->templ->set_var(array( 'ACTION_URL' => $this->psl['phpself'], ! 'SITEOWNER' => $this->psl['site_owner'] )); ! $this->templ->parse('OUT',array("formmail")); ! $this->templ->p('OUT'); } --- 46,57 ---- function newList() { $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%",pslgetText("Email Headline Updates")), 'ACTION_URL' => $this->psl['phpself'], ! 'SITEOWNER' => $this->psl['site_owner'] )); ! return $this->templ->parse('OUT',array("formmail")); ! // $this->templ->p('OUT'); } *************** *** 97,102 **** break; default: ! echo "ERROR! ERROR! We're inside of the insertFrequency ! switch and hit the default. Now exiting!<BR><BR>\n"; exit; } --- 96,100 ---- break; default: ! $this->message = "ERROR! ERROR! We're inside of the insertFrequency switch and hit the default. Now exiting!<BR><BR>\n"; exit; } *************** *** 127,131 **** 'SITENAME' => $this->psl['site_name'], 'SITEOWNER' => $this->psl['site_owner'], ! 'MAILINGLIST_URL' => $this->psl['rooturl'] . "/mailinglistAdmin.php3", 'ADDRESS' => $to_address )); --- 125,129 ---- 'SITENAME' => $this->psl['site_name'], 'SITEOWNER' => $this->psl['site_owner'], ! 'MAILINGLIST_URL' => $this->psl['rooturl'] . "/mailinglist.php3", 'ADDRESS' => $to_address )); *************** *** 137,141 **** $this->templ->parse('OUT',array("unsubscribemail")); $body = $this->wrap_mail($this->templ->get('OUT'),76); ! $this->templ->p('OUT'); }; --- 135,140 ---- $this->templ->parse('OUT',array("unsubscribemail")); $body = $this->wrap_mail($this->templ->get('OUT'),76); ! $this->message = $this->templ->get('OUT'); ! // $this->templ->p('OUT'); }; *************** *** 236,244 **** function mass_delete($addresses) { ! print("<strong>".pslgetText("Unsubscribing all Mailing List Members")."<br></strong>\n"); $total = sizeof($addresses); while( list($num, $address) = each($addresses) ) { $num = $num + 1; // Array indexes start at 0, add 1 to get it "right" ! print("Unsubscribing: $address ($num of $total)<br>\n"); $this->unsubscribe($address); } --- 235,243 ---- function mass_delete($addresses) { ! $this->message = "<strong>".pslgetText("Unsubscribing all Mailing List Members")."<br></strong>\n"; $total = sizeof($addresses); while( list($num, $address) = each($addresses) ) { $num = $num + 1; // Array indexes start at 0, add 1 to get it "right" ! $this->message .= "Unsubscribing: $address ($num of $total)<br>\n"; $this->unsubscribe($address); } *************** *** 269,274 **** } ! $this->templ->parse('OUT',array("adminmail")); ! $this->templ->p('OUT'); } --- 268,273 ---- } ! return $this->templ->parse('OUT',array("adminmail")); ! // $this->templ->p('OUT'); } *************** *** 297,302 **** 'TO_YEAR' => "$to_year" )); ! $this->templ->parse('OUT',array("messageform")); ! $this->templ->p('OUT'); } --- 296,302 ---- 'TO_YEAR' => "$to_year" )); ! ! return $this->templ->parse('OUT',array("messageform")); ! // $this->templ->p('OUT'); } *************** *** 350,355 **** $this->templ->parse("rows","row",true); } //End While next_record ! $this->templ->parse('OUT',array("messagebodymail")); ! return $this->templ->get('OUT'); } //END FUNCTION --- 350,356 ---- $this->templ->parse("rows","row",true); } //End While next_record ! ! return $this->templ->parse('OUT',array("messagebodymail")); ! // return $this->templ->get('OUT'); } //END FUNCTION *************** *** 390,395 **** ignore_user_abort(); ! print(pslgetText("Now ignoring abort calls...")."<br>\n"); ! print(pslgetText("Sending mail to the following users:")."<br>\n"); flush(); --- 391,396 ---- ignore_user_abort(); ! $this->message = pslgetText("Now ignoring abort calls...")."<br>\n"; ! $this->message .= pslgetText("Sending mail to the following users:")."<br>\n"; flush(); *************** *** 413,417 **** } ! print("To: $email <$name>"); if ( ($dayback != $tmpDay) && ( !($ary['override']) ) ) { --- 414,418 ---- } ! $this->messge .= "To: $email <$name>"; if ( ($dayback != $tmpDay) && ( !($ary['override']) ) ) { *************** *** 433,437 **** $mail_subject = $ary['subject']; } ! print(" Subject: $mail_subject ->"); $this->templ->set_var(array( --- 434,438 ---- $mail_subject = $ary['subject']; } ! $this->message .= " Subject: $mail_subject ->"; $this->templ->set_var(array( *************** *** 443,450 **** if ( mail($email, $mail_subject, $final_body, "From: ".$ary['sender']) ) { ! echo pslgetText("Mail Sent Successfully!")."<br>\n"; } else { $errors[] = $email; ! print(pslgetText("Error Sending Email!")); debug("mailingList::newsletterSend::Error", $errors); } --- 444,451 ---- if ( mail($email, $mail_subject, $final_body, "From: ".$ary['sender']) ) { ! $this->message .= pslgetText("Mail Sent Successfully!")."<br>\n"; } else { $errors[] = $email; ! $this->message .= pslgetText("Error Sending Email!"); debug("mailingList::newsletterSend::Error", $errors); } *************** *** 452,461 **** } // End: while ( $this->db->next_record() ) ! } else { ! die("</td>".pslgetText("You didn't give a email subject! Halting.")."<br>\n"); } // End: if ( $ary['subject'] && $ary['body'] ) } // End of function } // End of class --- 453,475 ---- } // End: while ( $this->db->next_record() ) ! return true; } else { ! $this->message ="</td>".pslgetText("You didn't give a email subject! Halting.")."<br>\n"; ! return false; } // End: if ( $ary['subject'] && $ary['body'] ) } // End of function + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); + } + } // End of class |