/[corp_html]/inc/newsletter.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /inc/newsletter.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Thu Apr 11 12:57:03 2002 UTC (22 years, 1 month ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
newsletter promjene

1 dpavlin 1.1 <?php
2    
3     $smarty->assign("PHP_SELF",$PHP_SELF);
4     if (isset($email)) {
5    
6     $sql="select count(email) as nr from news_sub where email = '$email'";
7     $sth = $dbh->prepare("$sql");
8     $sth->execute();
9     if ($row=$sth->fetchrow_hash()) {
10     if ($row[nr] == 0) {
11     $dbh->dbh_do("insert into news_sub (email) values ('$email')");
12     $what="sub";
13     } else {
14     $what="unsub";
15     }
16     include_once("quoted-printable.inc");
17     $smarty->assign(array(
18     "what"=>$what,
19     "email"=>$email
20     ));
21     iso_sendmail_t($smarty->fetch("newsletter_request.tpl"));
22     #print "<pre>".$smarty->fetch("newsletter_request.tpl")."</pre>";
23    
24     } else {
25     $what="error";
26     }
27    
28     $smarty->assign(array(
29     "what"=>$what,
30     "email"=>$email
31     ));
32     }
33 dpavlin 1.2 $smarty->assign("left_box",$smarty->fetch("newsletter.tpl"));
34 dpavlin 1.1
35     ?>

  ViewVC Help
Powered by ViewVC 1.1.26