[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/templates/fallback/content/ -> gv_send.tpl.php (source)

   1  <table width="100%" border="0" cellspacing="2" cellpadding="1">
   2    <tr>
   3      <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
   4          <tr> 
   5            <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
   6                <tr> 
   7                  <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
   8                  <td align="right">&nbsp;</td>
   9                </tr>
  10              </table></td>
  11          </tr>
  12          <tr> 
  13            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  14          </tr>
  15          <?php
  16    if ($HTTP_GET_VARS['action'] == 'process') {
  17  ?>
  18        <tr>
  19          <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?><br><br><?php echo 'gv '.$id1; ?></td>
  20        </tr>
  21        <tr>
  22          <td align="right"><br><a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></a></td>
  23        </tr>
  24  <?php
  25    }  
  26    if ($HTTP_GET_VARS['action'] == 'send' && !$error) {
  27      // validate entries
  28        $gv_amount = (double) $gv_amount;
  29        $gv_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
  30        $gv_result = tep_db_fetch_array($gv_query);
  31        $send_name = $gv_result['customers_firstname'] . ' ' . $gv_result['customers_lastname'];
  32  ?>
  33        <tr>
  34          <td><form action="<?php echo tep_href_link(FILENAME_GV_SEND, 'action=process', 'NONSSL'); ?>" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  35            <tr>
  36              <td class="main"><?php echo sprintf(MAIN_MESSAGE, $currencies->format($HTTP_POST_VARS['amount']), stripslashes($HTTP_POST_VARS['to_name']), $HTTP_POST_VARS['email'], stripslashes($HTTP_POST_VARS['to_name']), $currencies->format($HTTP_POST_VARS['amount']), $send_name); ?></td>
  37            </tr>
  38  <?php
  39        if ($HTTP_POST_VARS['message']) {
  40  ?>
  41             <tr>
  42              <td class="main"><?php echo sprintf(PERSONAL_MESSAGE, $gv_result['customers_firstname']); ?></td>
  43            </tr>
  44            <tr>
  45              <td class="main"><?php echo stripslashes($HTTP_POST_VARS['message']); ?></td>
  46            </tr>
  47  <?php
  48        }
  49  
  50        echo tep_draw_hidden_field('send_name', $send_name) . tep_draw_hidden_field('to_name', stripslashes($HTTP_POST_VARS['to_name'])) . tep_draw_hidden_field('email', $HTTP_POST_VARS['email']) . tep_draw_hidden_field('amount', $gv_amount) . tep_draw_hidden_field('message', stripslashes($HTTP_POST_VARS['message']));
  51  ?>
  52            <tr>
  53              <td class="main"><?php echo tep_image_submit('button_back.gif', IMAGE_BUTTON_BACK, 'name=back') . '</a>'; ?></td>
  54              <td align="right"><br><?php echo tep_image_submit('button_send.gif', IMAGE_BUTTON_CONTINUE); ?></td>
  55            </tr>
  56          </table></form></td>
  57        </tr>
  58  <?php
  59    } elseif ($HTTP_GET_VARS['action']=='' || $error) {
  60  ?>
  61        <tr>
  62          <td class="main"><?php echo HEADING_TEXT; ?></td>
  63        </tr>
  64        <tr>
  65          <td><form action="<?php echo tep_href_link(FILENAME_GV_SEND, 'action=send', 'NONSSL'); ?>" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  66            <tr>
  67              <td class="main"><?php echo ENTRY_NAME; ?><br><?php echo tep_draw_input_field('to_name', stripslashes($HTTP_POST_VARS['to_name']));?></td>
  68            </tr>
  69            <tr>
  70              <td class="main"><?php echo ENTRY_EMAIL; ?><br><?php echo tep_draw_input_field('email', $HTTP_POST_VARS['email']); if ($error) echo $error_email; ?></td>
  71            </tr>
  72            <tr>
  73              <td class="main"><?php echo ENTRY_AMOUNT; ?><br><?php echo tep_draw_input_field('amount', $HTTP_POST_VARS['amount'], '', '', false); if ($error) echo $error_amount; ?></td>
  74            </tr>
  75            <tr>
  76              <td class="main"><?php echo ENTRY_MESSAGE; ?><br><?php echo tep_draw_textarea_field('message', 'soft', 50, 15, stripslashes($HTTP_POST_VARS['message'])); ?></td>
  77            </tr>
  78          </table>
  79          <table border="0" width="100%" cellspacing="0" cellpadding="2">
  80            <tr>
  81  <?php
  82      $back = sizeof($navigation->path)-2;
  83  ?>
  84              <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
  85              <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
  86            </tr>
  87          </table></form></td>
  88        </tr>
  89  <?php
  90    }
  91  ?>
  92        </table></td>
  93    </tr>
  94  </table>
  95  


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7