Subversion Repositories php_library

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 rodolico 1
<?php session_start(); ?>
2
 
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml">
5
   <head>
6
     <title>Contact Us</title>
7
     <meta name="GENERATOR" content="Quanta Plus" />
8
     <meta name="AUTHOR" content="Daily Data, Inc." />
9
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
     <link href="/contact_us.css" rel="stylesheet" type="text/css" />
11
     <script language="javascript" type="text/javascript">
12
     // <!--
13
        function resizeOuterTo(w,h) {
14
        if (parseInt(navigator.appVersion)>3) {
15
          if (navigator.appName=="Netscape") {
16
            top.outerWidth=w;
17
            top.outerHeight=h;
18
          }
19
          else top.resizeTo(w,h);
20
        }
21
        window.self.menubar = 0;
22
        }
23
     // -->
24
     </script>
25
   </head>
26
   <body>
27
      <?php
28
            if ( strlen (  $_SESSION['contact_us home'] ) == 0 ) {
29
               $whocalled = parse_url($_SERVER['HTTP_REFERER']);
30
               if ($whocalled['scheme'])  $callback .= $whocalled['scheme'] . '://';
31
               if ($whocalled['host'])  $callback .= $whocalled['host'];
32
               if ($whocalled['port'])  $callback .= ':' . $whocalled['port'];
33
               if ($whocalled['path'])  $callback .= dirname($whocalled['path']) . '/';
34
               $callback .= 'contact_us_local.php';
35
               $_SESSION['contact_us home'] = $_SERVER['DOCUMENT_ROOT'] . dirname($whocalled['path']) . '/' . 'contact_us_local.php';
36
            }
37
            include_once( $_SESSION['contact_us home'] );
38
            //include_once( $_SERVER['DOCUMENT_ROOT'] . "/contact_us_local.php");
39
            include_once("contact_us_lib.php");
40
      ?>
41
      <div id='everything'> <!--This is a box around everything so we can block it in-->
42
        <div id="header">
43
          <?php print $HEADER; ?>
44
        </div> <!-- id="header" -->
45
        <div id="content">
46
          <div class="main-text">
47
              <?php
48
                if ( verifyForm( $FIELDS ) ) {
49
                    unset($_SESSION['in_contact_us']); // so if they want to try again, they can
50
                    if ( SEND_EMAIL ) {
51
                      if (! sendMessage( $CATEGORIES, $FIELDS ) ) {
52
                          print $FAILURE_MESSAGE;
53
                      } else { // following is text for a message successfully sent
54
                          print $SUCCESS_MESSAGE;
55
                      } // end else, ie we successfully sent the message
56
                    } // if defined SEND_EMAIL
57
                    if (defined('DATABASE') ) {
58
                      storeMessage( $CATEGORIES, $FIELDS );
59
                      echo ('You can close this window now');
60
                    }
61
                } else { // we did not get a from_address, so display the form for the user to fill out
62
                  // this code will execute unless the paramter "no resize" is set on the URL or in a post.
63
                  // it will resize the window to the parameters stored in contact_us_local.php
64
                  if (!( $_GET['no_resize'] || $_POST['no_resize'] || $_SESSION['no_resize']) ) {
65
                      $_SESSION['no_resize'] = 1;
66
              ?>
67
                  <script language="javascript" type="text/javascript">
68
                    // <!--
69
                    resizeOuterTo(<?php print "$WINDOW_WIDTH,$WINDOW_HEIGHT"; ?>);
70
                    // -->
71
                </script>
72
              <?php } //else
73
                  if ($_SESSION['in_contact_us']) {
74
              ?>
75
                 <p class='missing_information'>Please fill out the required information before submitting the form</p>
76
              <?php
77
                  }
78
                  $_SESSION['in_contact_us'] = true;
79
              ?>
80
                <form action="<?php print $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
81
                  <table class="form-table">
82
                      <tbody>
83
                        <tr>
84
                            <?php if (count($CATEGORIES) > 1 ) { ?>
85
                            <td>Category</td>
86
                            <td>
87
                              <select name="category" class="select">
88
                                  <?php print getAvailableCategoryList( $CATEGORIES ); ?>
89
                              </select>
90
                            </td>
91
                            <?php } ?>
92
                        </tr>
93
                        <?php print makeForm($FIELDS, $MAX_DISPLAY_WIDTH); ?>
94
                        <tr>
95
                            <td width="100%" colspan="2">
96
                              <table width="100%">
97
                                  <tr>
98
                                    <td width="50%" align="center">
99
                                        <input type="submit" value="Send" class="button">
100
                                    </td>
101
                                    <td width="50%" align="center">
102
                                        <input type="reset" class="button">
103
                                    </td>
104
                                  </tr>
105
                              </table>
106
                            </td>
107
                        </tr>
108
                      </tbody>
109
                      </table>
110
                  </form>
111
                <!--End of form to be filled out-->
112
              <?php
113
                } // end else
114
              ?>
115
          <!--Common footer HTML should go here-->
116
          </p><!-- class="main-text"-->
117
        </div><!-- id="content" -->
118
      </div> <!-- id=everything-->
119
   </body>
120
</html>