Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.85 KB | None | 0 0
  1. <form id="details" action="process.php" method="POST" onSubmit="return check_file_name();" >
  2. <table>
  3.  
  4. <tr>
  5.         <td style="width:100px;" valign="top">Lead Source</td>
  6.         <td>
  7.                 <select name="Lead_Source[]" class="large">
  8.                 <?php
  9.                 $leads = array("TD Scotland","IVA Compare","Debt Advice Company","Trust Deeds Direct" );
  10.                
  11.                 foreach($leads as $lead){
  12.                          if(in_array($lead,$_SESSION['details']['Lead Source']) || $lead == $_SESSION['details']['Lead Source']){
  13.                          $selected = "selected='true'";
  14.                          } else {
  15.                          $selected='';
  16.                          }
  17.                  echo "<option value='$lead' $selected>$lead</option>";
  18.         }
  19.                 ?>
  20.                
  21.                 </select>
  22.                                
  23.                
  24.         </td>
  25. </tr>
  26.  
  27. <tr>
  28.         <td style="width:100px;" valign="top">IP</td>
  29.         <td>
  30.                 <select name="IP" class="large">
  31.                 <?php
  32.                 $ips = array("Tenon","Carrington Dean");
  33.                
  34.                 foreach($ips as $ip){
  35.                          if($ip == $_SESSION['details']['IP']){
  36.                          $selected = "selected='true'";
  37.                          } else {
  38.                          $selected='';
  39.                          }
  40.                  echo "<option value='$ip' $selected>$ip</option>";
  41.         }
  42.                 ?>
  43.                            
  44.                                
  45.                 </select>
  46.         </td>
  47. </tr>
  48.  
  49. <tr>
  50.         <td style="width:100px;" valign="top">Product<br/><i>(Ctrl Click to Select more than one)</i></td>
  51.         <td>
  52.                 <select name="Product[]" class="large" size="6" multiple="true">
  53.                 <?php
  54.                 $products = array("TD","Double TD","IVA","DMP","LI","PPI","DAS");
  55.                
  56.                 foreach($products as $product){
  57.                          if(in_array($product,$_SESSION['details']['Product']) || $product == $_SESSION['details']['Product']){
  58.                          $selected = "selected='true'";
  59.                          } else {
  60.                          $selected='';
  61.                          }
  62.                  echo "<option value='$product' $selected>$product</option>";
  63.         }
  64.                 ?> 
  65.                            
  66.                                
  67.                 </select>
  68.         </td>
  69. </tr>
  70.  
  71. <tr>
  72.         <td style="width:100px;">Kelsom employee</td>
  73.         <td>
  74.                 <select name="Kelsom_Employee" class="large">
  75.                 <option value=""></option>
  76.                 <?php
  77.                 $users = array("JP","Mark Sommerville","Stuart Harris");
  78.                
  79.                 foreach($users as $user){
  80.                          if($user==$_SESSION['details']['Kelsom Employee']){
  81.                          $selected = "selected='true'";
  82.                          } else {
  83.                          $selected='';
  84.                          }
  85.                  echo "<option value='$user' $selected>$user</option>";
  86.         }
  87.                 ?> 
  88.            
  89.                
  90.                            
  91.                                
  92.                 </select>
  93.         </td>
  94. </tr>
  95.  
  96. <!--<tr>
  97.         <td>Lead Source</td>
  98.         <td>
  99.                 <select name="Lead_Source" class="large">
  100.                 <option value=""></option>
  101.                 <?php
  102.                 $sources = array("TD Scotland","IVA Compare");
  103.                
  104.                 foreach($sources as $source){
  105.                          if($source==$_SESSION['details']['Lead Source']){
  106.                          $selected = "selected='true'";
  107.                          } else {
  108.                          $selected='';
  109.                          }
  110.                  echo "<option value='$source' $selected>$source</option>";
  111.         }
  112.                
  113.                 ?>
  114.                
  115.                 </select>
  116.         </td>
  117. </tr>-->
  118.  
  119. <tr>
  120.         <td>Home Owner</td>
  121.         <td>
  122.                 <select name="Home_Owner" id="homeOwner" class="small">
  123.                                 <option value=""></option>
  124.                                
  125.                                 <?php
  126.                                 $bool = array("Yes","No");
  127.                
  128.                         foreach($bool as $value){
  129.                                  if($value==$_SESSION['details']['Home Owner']){
  130.                                  $selected = "selected='true'";
  131.                                  } else {
  132.                                  $selected='';
  133.                                  }
  134.                          echo "<option value='$value' $selected>$value</option>";
  135.                 }
  136.                                 ?>
  137.                                
  138.                 </select>
  139.         </td>
  140. </tr>
  141. </table>
  142.  
  143. <div id="show_parent">
  144. <div id="show_child">
  145. <table style='padding-top:0px;margin-top:0px;'>
  146.  
  147. <tr>
  148.         <td style="width:100px;">Equity</td>
  149.         <td>
  150.                             &pound; <input type="text" name="Equity" style="width:90px;" value="<?php echo substr($_SESSION['details']['Equity'],7); ?>" />
  151.         </td>
  152. </tr>
  153.  
  154. <tr>
  155.         <td>Last Survey Date</td>
  156.         <td>
  157.         <?php survey_date(); ?>
  158.         </td>
  159. </tr>
  160.  
  161. <tr>
  162.         <td>House Type</td>
  163.         <td>
  164.                 <select name="House_Type" class="large">
  165.                                 <option value=""></option>
  166.                                
  167.                                 <?php
  168.                                 $houseTypes = array("Detached","Semi-detached","Flat");
  169.                
  170.                         foreach($houseTypes as $type){
  171.                                  if($type==$_SESSION['details']['House Type']){
  172.                                  $selected = "selected='true'";
  173.                                  } else {
  174.                                  $selected='';
  175.                                  }
  176.                          echo "<option value='$type' $selected>$type</option>";
  177.                 }
  178.                                 ?>
  179.                 </select>
  180.         </td>
  181. </tr>
  182. </table>
  183. </div>
  184. </div>
  185.  
  186. <table style='padding-top:0px;margin-top:0px;'>
  187.  
  188. <tr>
  189.         <td style="width:100px;">Telephone 1</td>
  190.         <td>
  191.                 <input type="text" name="tel1" value="<?php echo $_SESSION['details']['Tel1']; ?>" />
  192.         </td>
  193. </tr>
  194.  
  195. <tr>
  196.         <td>Telephone 2</td>
  197.         <td>
  198.                 <input type="text" name="tel2" value="<?php echo $_SESSION['details']['Tel2']; ?>" />
  199.         </td>
  200. </tr>
  201.  
  202. <tr>
  203.         <td style="width:100px;" valign="top">Call</td>
  204.         <td>
  205.                 <select name="call" class="large">
  206.                 <?php
  207.                 $leads = array("anytime","morning","afternoon","evening");
  208.                
  209.                 foreach($leads as $lead){
  210.                          if(in_array($lead,$_SESSION['details']['call']) || $lead == $_SESSION['details']['Call']){
  211.                          $selected = "selected='true'";
  212.                          } else {
  213.                          $selected='';
  214.                          }
  215.                  echo "<option value='$lead' $selected>$lead</option>";
  216.         }
  217.                
  218.                 ?>             
  219.                                
  220.                 </select>
  221.         </td>
  222. </tr>
  223.  
  224. <tr>
  225.         <td style="width:100px;" valign="top">Time</td>
  226.         <td>
  227.                 <?php
  228.                             list($hour,$minute,$am_pm) = explode(":", $_SESSION['details']['Time']);
  229.                             echo hourmin("time[]","time[]","time[]",$hour,$minute,$am_pm);
  230.                 ?>
  231.         </td>
  232. </tr>
  233.  
  234. <tr>
  235.         <td style="width:100px;">Address</td>
  236.         <td>
  237.                 <textarea name="Contact_Details" style="height:100px;"><?php echo $_SESSION['details']['Contact Details']; ?></textarea>
  238.         </td>
  239. </tr>
  240.  
  241. <tr>
  242.         <td>Notes</td>
  243.         <td>
  244.                 <textarea name="Notes"><?php echo $_SESSION['details']['Notes']; ?></textarea>
  245.         </td>
  246. </tr>
  247.  
  248. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement