This is an old revision of the document!


Applicants

<php> $ad=2; $loc=8; $time=20;

echo “AD = $ad \n Location = $loc \n Time = $time \n\n<br><br>”; if ($ad == 1)

{
 $cost = 1.5 * $time;
 if ($time == 30)
    {
     $ads = 2;
    }
 $ads = 1;  
}

if ($ad == 2)

{
 $cost = 5 * $time;
 if ($time == 10)
    {
     $ads = 2;
    }
 $ads = 3;  
}

if ($ad == 4)

{
 $cost = 25 * $time;
 $ads = $ad + ($time/10-1);
}

$d6 = rand (1,6); $apps = $d6 * $ads * $loc; echo “<b>Number of Applicants ($apps)</b> = Recruiting score for Advertising ($ads) x Location Score ($loc) x 1d6 ($d6).”; echo “<br>\n

    Recruitment cost $cost credits<br>";

echo ”<h2>Applicant Details</h2> \n

    \n       
     <table width = 85% cellpadding = 1>\n
     <tr> \n
       <td>App \n
       <td>Firstname \n
       <td>Surname \n
       <td>Gender \n
       <td>Genetics \n
       <td>References \n
       <td>CR Check \n
       <td>Experience \n
       <td>Interview? \n
       <td>Hire? \n
     </tr>"; 

$appl=1; do

{
  $CrimCheck=rand(0,9);
  $Experience=rand(0,9);
  $RefCheck=rand(0,9);
  $Gender=rand(0,9);
  $BirthGender=$Gender;
  $GenderChanged="No";
  if($Gender==0)
    {
     $GenderChanged="Yes";
     $BirthGender=rand(1,8);
     $Gender=rand(1,8);
    }
  if($Gender==9)
    {
     $BirthGender=rand(1,8);
    }
      if($Gender<5)
    { $sex="M"; }
  elseif($Gender<9)
    { $sex="F"; }
  elseif($BirthGender<5)
    { $sex="M"; }
  else
    { $sex="F"; }
  $Genetics="Natural";
  $gen=rand(1,6);
  if($Experience>8)
    { $Genetics="Perfect"; }
  elseif($gen>4)
    { $Genetics="Perfect"; }

$seed1=rand(1,1200); $seed2=rand(1,1200); include(“/var/www/html/IFU/sqlconnect.php”); include(“/var/www/html/IFU/sqlconnect2.php”);

$Surname = mysql_query(“SELECT Surname FROM Names Where NameID=$seed1”);

$FirstName = mysql_query(“SELECT Forename FROM Names WHERE Gender=$sex AND NameID>=$seed2 ORDER BY Surname LIMIT 1”);

echo “

     <tr> \n
       <td>$appl \n
       <td>$seed2 $FirstName \n
       <td>$seed1 $Surname \n
       <td>$sex \n
       <td>$Genetics \n
       <td>$RefCheck \n
       <td>$CrimCheck \n
       <td>$Experience \n
       <td>Interview? \n
       <td>Hire? \n
     </tr>";

$appl++; } while ($appl⇐$apps); echo ”</table>“; </php>

Print/export
QR Code
QR Code Applicants (generated for current page)