/[pliva-si]/sections/pisite_nam.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /sections/pisite_nam.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Tue Sep 18 13:21:43 2001 UTC (22 years, 6 months ago) by dpavlin
Branch: MAIN
Changes since 1.1: +2 -2 lines
nova defaultna adresa

1 <?php
2
3 if (! isset($from) || $from == "") {
4 $from=str_replace(".php","",basename($HTTP_REFERER));
5 if (strstr($from,"?")) $from=substr($from,0,strpos($from,"?"));
6 if ($from == $HTTP_HOST || $from=="www.pliva.si") $from="index";
7 }
8
9 $email="info@pliva.si"; // default
10
11 $sth = $dbh->prepare("select email from emails where referer='$from' limit 1");
12 $sth->execute();
13 if ($row=$sth->fetchrow_hash()) {
14 $email=$row[email];
15 } else {
16 $sth = $dbh->prepare("select email from emails,menu where menu.section=referer and url like '$from%'");
17 $sth->execute();
18 if ($row=$sth->fetchrow_hash()) {
19 $email=$row[email];
20 }
21 }
22
23 $email=str_replace("\n","",$email);
24 $email=str_replace(" ","",$email);
25 $email_val=explode(",",$email);
26
27 $sth = $dbh->prepare("select iso,name from countries order by name");
28 $sth->execute();
29 while ($row=$sth->fetchrow_hash()) {
30 $countries[]=$row;
31 }
32 $smarty->assign(array(countries=>$countries,
33 email_val=>$email_val,
34 ));
35
36 if (isset($mailto) && check_required()) {
37 $main="Your comment is sent to $mailto. Thank you.";
38 include("quoted-printable.inc");
39 iso_mail("$fullname ($country) <$mailfrom>",$mailto,$subject,$comment);
40 # $main.="<pre>$mailto $fullname $mailfrom $country $subject $comment</pre>";
41 } else {
42 $main=$smarty->fetch("$main_file.tpl");
43 }
44
45 $smarty->assign( array(MAIN=>$main, from=>$from,
46 contact_section=>1,
47 ));
48
49 ?>

  ViewVC Help
Powered by ViewVC 1.1.26