function display_card_form($name)
{
    //display form asking for credit card details
    ?>
  <table border = 0 width = 100% cellspacing = 0>
  <form action = process.php method = post>
  <tr><th colspan = 2 bgcolor="#cccccc">Credit Card Details</th></tr>
  <tr>
    <td>Type</td>
    <td><select name = card_type><option>VISA<option>MasterCard<option>American Express</select></td>
  </tr>
  <tr>
    <td>Number</td>
    <td><input type = text name = card_number value = "" maxlength = 16 size = 40></td>
  </tr>
  <tr>
    <td>AMEX code (if required)</td>
    <td><input type = text name = amex_code value = "" maxlength = 4 size = 4></td>
  </tr>
  <tr>
    <td>Expiry Date</td>
    <td>Month <select name = card_month><option>01<option>02<option>03<option>04<option>05<option>06<option>07<option>08<option>09<option>10<option>11<option>12</select>
    Year <select name = card_year><option>00<option>01<option>02<option>03<option>04<option>05<option>06<option>07<option>08<option>09<option>10</select></td>
  </tr>
  <tr>
    <td>Name on Card</td>
    <td><input type = text name = card_name value = "<?php 
    echo $name;
    ?>
" maxlength = 40 size = 40></td>
  </tr>
  <tr>
    <td colspan = 2 align = center>
      <b>Please press Purchase to confirm your purchase,
         or Continue Shopping to add or remove items</b>
     <?php 
    display_form_button('purchase', 'Purchase These Items');
    ?>
    </td>
  </tr>
  </table>
<?php 
}
示例#2
0
function display_list_form()
{
    // display html new list form
    ?>
   <br />
   <div align="center">
   <form action="index.php?action=store-list" method="post">
   <table cellpadding="2" cellspacing="0" bgcolor="#cccccc">
   <tr><th colspan="2" bgcolor="#5B69A6">Create New List</th></tr>
   <tr><td>List Name:</td>
       <td><input type="name" name="name" size="20" maxlength="20"/></td>
   </tr>
   <tr><td colspan="2">List Description:</td></tr>
   <tr><td colspan="2"><textarea rows="4" cols="72"
                        name="blurb"></textarea></td></tr>
   <tr><td colspan="2" align="center"><?php 
    display_form_button('save-list');
    ?>
   </td></tr>
   </table>
   </div>
   <br />
<?php 
}
function display_new_message_form($auth_user, $to = '', $cc = '', $subject = '', $message = '')
{
    // display html form either for a brand new message, or to allow user to
    // edit replies or forwards
    global $table_width;
    ?>
  <table cellpadding="4" cellspacing="0" border="0" width="<?php 
    echo $table_width;
    ?>
">
  <form action="index.php?action=send-message" method="post">
  <tr>
    <td bgcolor="#cccccc">To Address:</td>
    <td bgcolor="#cccccc">
      <input type="text" name="to" value="<?php 
    echo $to;
    ?>
" size="60" />
    </td>
  </tr>
  <tr>
    <td bgcolor="#cccccc">CC Address:</td>
    <td bgcolor="#cccccc">
      <input type="text" name="cc" value="<?php 
    echo $cc;
    ?>
" size="60" />
    </td>
  </tr>
  <tr>
    <td bgcolor="#cccccc">Subject:</td>
    <td bgcolor="#cccccc">
      <input type="text" name="subject" value="<?php 
    echo $subject;
    ?>
" size="60" />
  </tr>
  <tr>
    <td colspan="2" bgcolor="#cccccc">
      <textarea name="message" rows="10" cols="72"><?php 
    echo $message;
    ?>
</textarea>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center" bgcolor="#cccccc">
      <?php 
    display_form_button('send-message');
    ?>
    </td>
  </tr>
  </form>
  </table>
<?php 
}
function display_new_message_form($auth_user, $to = '', $cc = '', $subject = '', $message = '')
{
    // display html form either for a brand new message, or to allow user to
    // edit replies or forwards
    global $table_width;
    ?>
  <table cellpadding = 4 cellspacing = 0 border = 0 width = <?php 
    echo $table_width;
    ?>
>
  <form action = "index.php?action=send-message" method = post>
  <tr>
    <td bgcolor = "#cccccc">
      To Address:
    </td>
    <td bgcolor = "#cccccc"> 
      <input type = text name = to value = "<?php 
    echo $to;
    ?>
" size = 60 >
    </td>
  </tr>
  <tr>
    <td bgcolor = "#cccccc">
      CC Address:
    </td>
    <td bgcolor = "#cccccc"> 
      <input type = text name = cc value = "<?php 
    echo $cc;
    ?>
" size = 60 >
    </td>
  </tr>
  <tr>
    <td bgcolor = "#cccccc">
      Subject:
    </td>
    <td bgcolor = "#cccccc">
      <input type = text name = subject value = "<?php 
    echo $subject;
    ?>
" size = 60 ></td>
  </tr>
  <tr>
    <td colspan = 2 bgcolor = "#cccccc">
      <textarea name = message rows = 10 cols = 72><?php 
    echo $message;
    ?>
</textarea>
    </td>
  </tr>
  <tr>
    <td colspan = 2 align = center bgcolor = "#cccccc">
      <?php 
    display_form_button('send-message');
    ?>
    </td>
  </tr>
  </form>
  </table>
<?php 
}
function display_list_form()
{
    // display html new list form
    ?>
   <br />
   <center>
   <form action="index.php?action=store-list" method=post>
   <table cellpadding=2 cellspacing=0 bgcolor=#cccccc>
   <tr><th colspan = 2 bgcolor = "#5B69A6" > Create New List </th></tr> 
   <tr><td>List Name:</td>
       <td><input type=name name=name size=20 maxlength=20></td>
   </tr>
   <tr><td colspan = 2>List Description:</td></tr>
   <tr><td colspan = 2><textarea rows = 4 cols = 72 
                        name = blurb></textarea></td></tr>
   <tr><td colspan=2 align=center><?php 
    display_form_button('save-list');
    ?>
   </td></tr>
   </table>
   </center>
   <br />
<?php 
}
示例#6
0
function display_checkout_form()
{
    ?>
<style>
   .tb_checkout input{width: 85%;
   border: 1px solid #330;
   padding: 5px;
   margin: 5px 0px;
   font-family:Arial, Helvetica, sans-serif;
   font-size:14px;
   color:#333;
   
   }
   .tb_checkout input:hover{
	   border: 2px solid #C30;
	   background-color:#F9C; 
	   
	   }


</style>
	  <form action="index.php?dk=purchase" method="post">
      <table class="tb_checkout" border="0" width="100%" cellspacing="0">
      <tr>
      	<th colspan="2" bgcolor="#cccccc">
        Your details
        </th>
      </tr>
      <tr>
      	<td>Name</td> 
        <td><input type="text" name="name" value=""></td>
      </tr>
       <tr>
      	<td>Address</td> 
        <td><input type="text" name="address" value=""></td>
      </tr>
      <tr>
      	<td>City</td> 
        <td><input type="text" name="city" value=""></td>
      </tr>
      <tr>
      	<td>State</td> 
        <td><input type="text" name="state" value=""></td>
      </tr>
      <tr>
      	<td>Postal code</td> 
        <td><input type="text" name="zip" value=""></td>
      </tr>
      <tr>
      	<td>Country</td> 
        <td><input type="text" name="country" value=""></td>
      </tr>
      	<tr>
      	<th colspan="2" bgcolor="#cccccc">Shipping Address (Có thể bỏ trống)</th>     
        
       <!-- ----------------------------------  --> 
       <tr>
      	<td>Name</td> 
        <td><input type="text" name="ship_name" value=""></td>
      </tr>
       <tr>
      	<td>Address</td> 
        <td><input type="text" name="ship_address" value=""></td>
      </tr>
      <tr>
      	<td>City</td> 
        <td><input type="text" name="ship_city" value=""></td>
      </tr>
      <tr>
      	<td>State</td> 
        <td><input type="text" name="ship_state" value=""></td>
      </tr>
      <tr>
      	<td>Postal code</td> 
        <td><input type="text" name="ship_zip" value=""></td>
      </tr>
      <tr>
      	<td>Country</td> 
        <td><input type="text" name="ship_country" value=""></td>
      </tr>
      <!-- --------------- -->
      <tr>
      	<td colspan="2" align="center">
        <b>Vui lòng click purchase để xác nhận lại đặt hàng Hoặc Continue Shopping để tiếp tục mua sắm</b>
        <?php 
    display_form_button('purchase', 'Purchase these items');
    ?>
      	</td>      
      </tr>
      </table>
      </form> 
      <hr /> 			
	


<?php 
}
function display_card_form($name)
{
    //display form asking for credit card details
    ?>
  <table border="0" width="100%" cellspacing="0">
  <form action="process.php" method="post">
  <tr><th colspan="2" bgcolor="#cccccc">Credit Card Details</th></tr>
  <tr>
    <td>Type</td>
    <td><select name="card_type">
        <option value="VISA">VISA</option>
        <option value="MasterCard">MasterCard</option>
        <option value="American Express">American Express</option>
        </select>
    </td>
  </tr>
  <tr>
    <td>Number</td>
    <td><input type="text" name="card_number" value="" maxlength="16" size="40"></td>
  </tr>
  <tr>
    <td>AMEX code (if required)</td>
    <td><input type="text" name="amex_code" value="" maxlength="4" size="4"></td>
  </tr>
  <tr>
    <td>Expiry Date</td>
    <td>Month
       <select name="card_month">
       <option value="01">01</option>
       <option value="02">02</option>
       <option value="03">03</option>
       <option value="04">04</option>
       <option value="05">05</option>
       <option value="06">06</option>
       <option value="07">07</option>
       <option value="08">08</option>
       <option value="09">09</option>
       <option value="10">10</option>
       <option value="11">11</option>
       <option value="12">12</option>
       </select>
       Year
       <select name="card_year">
       <?php 
    for ($y = date("Y"); $y < date("Y") + 10; $y++) {
        echo "<option value=\"" . $y . "\">" . $y . "</option>";
    }
    ?>
       </select>
  </tr>
  <tr>
    <td>Name on Card</td>
    <td><input type="text" name="card_name" value = "<?php 
    echo $name;
    ?>
" maxlength="40" size="40"></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <p><strong>Please press Purchase to confirm your purchase, or Continue Shopping to
      add or remove items</strong></p>
     <?php 
    display_form_button('purchase', 'Purchase These Items');
    ?>
    </td>
  </tr>
  </table>
<?php 
}