Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
universe:earth:officers2 [ 9 Feb 2008 21:20] jamesuniverse:earth:officers2 [ 9 Feb 2008 21:28] (current) james
Line 3: Line 3:
 <php> <php>
 // work out how many officers to promote.  // work out how many officers to promote. 
-// $Ensigns = rand(1,20); +$Ensigns = rand(1,20); 
-// $Lts = $Ensigns + rand(1,10); +$Lts = $Ensigns + rand(1,10); 
-// $LtCdrs = $Lts + rand (0,10); +$LtCdrs = $Lts + rand (0,10); 
-// $Cdrs = $LtCdrs + rand (0,8); +$Cdrs = $LtCdrs + rand (0,8); 
-// $Capts = $Cdrs + rand (0,4); +$Capts = $Cdrs + rand (0,4); 
-// $RAdms = $Capts + rand (0,1);+$RAdms = $Capts + rand (0,1);
 $apps = rand (6,200); $apps = rand (6,200);
 $no = 590000; $no = 590000;
Line 16: Line 16:
 $Ranks=array("Ensign", "Lieutenant", "Lt.Commander", "Commander", "Captain", "Rear_Admiral", "Vice_Admiral", "Admiral_of_the_White", "Admiral_of_the_Black","Grand_Admiral"); $Ranks=array("Ensign", "Lieutenant", "Lt.Commander", "Commander", "Captain", "Rear_Admiral", "Vice_Admiral", "Admiral_of_the_White", "Admiral_of_the_Black","Grand_Admiral");
 // set up a table inside a form so that the chosen applicants can be taken forwards to the next stage.  // set up a table inside a form so that the chosen applicants can be taken forwards to the next stage. 
-echo "The following Officers have been promoted with effect from 3209.001 \n"; +echo "<p>The following Officers have been promoted with effect from 3209.001 \n"; 
-echo "\n"; +echo "       <table width = 85% cellpadding = 1>\n 
-Echo "\^  Last  \^  Rank  \^  Firstname  \^  Surname  \^  Branch  \^  Posting  \^  Location  \n"; +       <tr> \
 +         <td>last 4 \
 +         <td>Rank \
 +         <td>Firstname \
 +         <td>Surname \
 +         <td>Branch 
 +         <td>Posting \
 +         <td>Location \n 
 +       </tr>";  
 $appl=1; $appl=1;
 // for each applicant then roll the various dice and then set the variables // for each applicant then roll the various dice and then set the variables
Line 105: Line 114:
 $no=rand(0,9); $no=rand(0,9);
  
-echo "\| $no.$post.$gen.$Gender \| $Ranks[$rank] \|  $Forename  \|  $Surname  \|  $Branch[$Experience]  \|  $Posting[$posting]  \|  $Homeworld   \| \n  ";+echo "<tr><td> $no.$post.$gen.$Gender <td> $Ranks[$rank] <td>  $Forename  <td>  $Surname  <td>  $Branch[$Experience]  <td>  $Posting[$posting]  <td>  $Homeworld   <td></tr> \n  ";
 $appl++; $appl++;
        
 } while ($appl<=$apps);  } while ($appl<=$apps); 
 +echo "</table>";
  
 </php> </php>
  
Print/export
QR Code
QR Code universe:earth:officers2 (generated for current page)