Your IP : 216.73.217.117


Current Path : /var/www/cesa.co.za/members/AnnualDeclaration/
Upload File :
Current File : /var/www/cesa.co.za/members/AnnualDeclaration/schedule1_page2GENERIC_A.php4

<?php 
// Configuration and Autentication
include( '../inc/auth.inc' );
include( '../inc/func.inc' );
switch ($auth) {
    case valid:
	// System Includes
	//include( '../inc/pref.inc' );
	// Variables Unique to page
	$title = "members.saace.co.za - Annual Declaration " & $DeclarationYear;
	$description = "South African Association of Consulting Engineers. Annual Declaration " & $DeclarationYear & ".";
	$keywords = "online, services, members, consulting, engineers";

	// Start Page Includes
       include( '../inc/conf.inc' );
	// include( '../inc/header.inc' );
	   include( '../inc/db.inc' );
	   include( '../inc/declaration.inc' );
	?>
	<!-- Start Page Content Here -->
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<title>Jaarlikse Verklaring <?php echo $DeclarationYear; ?></title>
<link rel="stylesheet" href="adecstyles.css" type="text/css">
<body bgcolor="#FFFFFF">
<?php	
$host = "localhost";
$user = "webaccessUser";
$password = "password";
$db = "saace";
    mysql_connect("$host","$user","$password") or die("Unable to connect to SQL server");
    mysql_select_db("$db") or die("Unable to select database");
  // start page updates here
  
  // ACTION X ************************************************************************
  // *********************************************************************************
  if ($action == "X") 
  {
  $section = "A";
   if ($form[principal] == "No")
	{
	$Oprincipal = 0;
	}
	else
	{
	$Oprincipal = 1;			
	}
    $query = "UPDATE OfficeContacts SET ContactPosition = '$form[pos]', Principal = '$Oprincipal' WHERE OfficeContacts.ContactsID = '$therightid'";
    $result = mysql_query($query) or die("Select of id Failed");
	// UPDATE Contacts.
   $query2 = "UPDATE Contacts SET Contacts.ContactSurname = '$form[surname]', Contacts.ContactInitials = '$form[initials]', Contacts.ContactFirstName = '$form[alsoknown]', Contacts.ProfessionalRegistrations = '$form[proffreg]', Contacts.Qualifications = '$form[qual]', Contacts.Comments = '$form[fields]', Contacts.PreferredEmail = '$form[email]' WHERE Contacts.ContactsID = '$therightid'";
   $result2 = mysql_query($query2) or die("Select of id Failed");
  }
  // *********************************** END *****************************************

  // ACTION A ************************************************************************
  // *********************************************************************************
  if ($action == "A") 
  { 
  $section = "A"; 
  }
  // *********************************** END *****************************************

  // ACTION C ************************************************************************
  // *********************************************************************************
  if ($action == "C") 
  { 
  $section = "X";
  $displaybutton = "no";
  $messages = "U het die dokument voltooi. Maak ASB die venster toe en gaan terug na die Beheer Bladsy. ";
  $query9 = "UPDATE ADec_tblMemberFirmOffices SET ProfessionalStaff = '$form[proff]', NonProfTechStaff = '$form[nonprof]', OtherStaff = '$form[other]' WHERE Prev_OfficeID = '$SelectOfficeID'";
  $result = mysql_query($query9) or die("Select of id Failed"); 
  
  $query101 = "SELECT OfficeID, Prev_OfficeID FROM ADec_tblMemberFirmOffices WHERE Prev_OfficeID = '$SelectOfficeID'";
  $Hresult = mysql_query($query101) or die("Select failed");
  $Hrow = mysql_fetch_array($Hresult);
  $Hf[1] = $Hrow['OfficeID'];
  $reftype = "OfficeID";
  $refdoc = "Schedule1P2";
$adecdate = date("M d Y g:iA");
  $query102 = "INSERT INTO ADec_Done (RefID,RefType,RefDoc,ADecDate) 
  values('$Hf[1]','$reftype','$refdoc','$adecdate')";
  $Jresult = mysql_query($query102) or die("Insert Failed");  
    
  }    
  // *********************************** END *****************************************

  // ACTION B ************************************************************************
  // *********************************************************************************
  if ($action == "B") 
  { 
  $section = "B"; 
  $query22 = "SELECT OfficeID, Prev_OfficeID FROM ADec_tblMemberFirmOffices WHERE Prev_OfficeID = '$SelectOfficeID'";
  $result22 = mysql_query($query22) or die("Select of id Failed");
  $rs22 = mysql_fetch_array($result22);
  $NewOfficeID = $rs22['OfficeID'];  
  $query = "SELECT * FROM OfficeContacts WHERE OfficeContacts.OfficeID = '$SelectOfficeID'";
  $result = mysql_query($query) or die("Select of id Failed");
  while ($rs = mysql_fetch_array($result))
  {
	$therightid = $rs[0];
	$principal = $rs[5];
	if ($rs[5] == 0) { $yesno = "no"; }
	else { $yesno = "yes"; }
    $query2 = "SELECT  * FROM Contacts WHERE Contacts.ContactsID = '$therightid'";
    $result2 = mysql_query($query2) or die("Select of id Failed");
    $OCrow = mysql_fetch_array($result2);
	$ocs[0] = $OCrow['ContactsID'];
	$ocs[1] = $OCrow['ContactSurname'];
	$ocs[2] = $OCrow['ContactInitials'];
	$ocs[3] = $OCrow['ContactFirstName'];
	$ocs[4] = $OCrow['ContactDesignation'];
	$ocs[5] = $OCrow['Language'];
	$ocs[6] = $OCrow['BirthDate'];
	$ocs[7] = $OCrow['NameOfSpouse'];
	$ocs[8] = $OCrow['CellPhone'];
	$ocs[10] = $OCrow['PersonalTel'];
	$ocs[11] = $OCrow['PersonalFax'];
	$ocs[12] = $OCrow['Comments'];
	$ocs[13] = $OCrow['ProfessionalRegistrations'];
	$ocs[14] = $OCrow['Qualifications'];
	$ocs[15] = $CCrow['ContactID'];
	$ocs[16] = $OCrow['PreferredEmail'];
	$ocs[17] = $OCrow['ContactType'];
	$ocs[18] = $OCrow['UniqueCode'];
	$ocs[19] = $OCrow['PostalAddress'];
	$ocs[10] = $OCrow['Address2'];
	$ocs[21] = $OCrow['TownCity'];
	$ocs[22] = $OCrow['Country'];
	$ocs[23] = $OCrow['PostalCode'];
	$ocs[24] = $OCrow['OrgName'];
	$ocs[25] = $OCrow['DocumentAccess'];
			
    $query3 = "SELECT  * FROM ADec_Contacts WHERE ADec_Contacts.Prev_ContactsID = '$therightid'";
    $result3 = mysql_query($query3) or die("Select of id Failed");
    if (mysql_fetch_array($result3))
	{
      $messages = "Rekord reeds geskryf: ";
	}
    else
	{
     $queryX = "INSERT INTO ADec_Contacts (Prev_ContactsID, ContactSurname, ContactInitials, ContactFirstName, ContactDesignation, Language, BirthDate, NameOfSpouse, CellPhone, PersonalTel, PersonalFax, Comments, ProfessionalRegistrations, Qualifications, ContactID, Prev_ContactID, PreferredEmail, ContactType, UniqueCode, PostalAddress, Address2, TownCity, Country, PostalCode, OrgName, DocumentAccess) 
     values('$therightid'
     ,'$ocs[1]'
     ,'$ocs[2]'
     ,'$ocs[3]'
     ,'$ocs[4]'
     ,'$ocs[5]'
     ,'$ocs[6]'
     ,'$ocs[7]'
     ,'$ocs[8]'
     ,'$ocs[10]'
     ,'$ocs[11]'
     ,'$ocs[12]'	 
     ,'$ocs[13]'
     ,'$ocs[14]'
     ,'$ocs[15]'
	 ,'$ocs[15]'
     ,'$ocs[16]'
     ,'$ocs[17]'
     ,'$ocs[18]'
     ,'$ocs[19]'
     ,'$ocs[20]'
     ,'$ocs[21]'
     ,'$ocs[22]'
     ,'$ocs[23]'
     ,'$ocs[24]'
	 ,'$ocs[25]')";
     $resultX = mysql_query($queryX) or die("Insert Failed");
	 
	 // Fetch the Details of the ADEC_CONTACTS just written ************************
	 // ****************************************************************************
	 $queryE = "SELECT  * FROM ADec_Contacts WHERE ADec_Contacts.Prev_ContactsID = '$therightid'";
	 $resultE = mysql_query($queryE) or die("Select failed");
	 $ICrow = mysql_fetch_array($resultE);
	 $icr[0] = $ICrow[0];
	 $queryF = "SELECT  * FROM OfficeContacts WHERE ContactsID = '$therightid'";
	 $resultF = mysql_query($queryF) or die("Select failed");
	 $CCrow = mysql_fetch_array($resultF);
	 $ccs[1] = $therightid;
	 $ccs[2] = $CCrow['ContactPosition'];
	 $ccs[3] = $CCrow['MandatedPrincipal'];
	 $ccs[4] = $CCrow['OfficeHead'];
	 $ccs[5] = $CCrow['OfficeID'];
	 $ccs[6] = $SelectOfficeID;
	 $ccs[7] = $CCrow['Principal'];
	 $ccs[8] = $CCrow['Email'];
	 $ccs[9] = $CCrow['Mail'];
	 $ccs[10] = $CCrow['OfficeLiaison'];
	 $ccs[11] = $CCrow['OfficeLiaisonB'];
	 $ccs[12] = $CCrow['SchoolMail'];
	 $queryG = "INSERT INTO ADec_OfficeContacts (ContactsID,
	 Prev_ContactsID, 
	 ContactPosition, 
	 MandatedPrincipal, 
	 OfficeHead, 
	 OfficeID, 
	 Prev_OfficeID, 
	 Principal, 
	 Email, 
	 Mail,
	 OfficeLiaison,
	 OfficeLiaisonB,
	 SchoolMail) values('$icr[0]',
	 '$ccs[1]',
	 '$ccs[2]',
	 '$ccs[3]',
	 '$ccs[4]',
	 '$NewOfficeID',
	 '$ccs[6]',
	 '$ccs[7]',
	 '$ccs[8]',
	 '$ccs[9]',
	 '$ccs[10]',
	 '$ccs[11]',
	 '$ccs[12]')";
	 $resultG = mysql_query($queryG) or die("Insert Failed");
	 echo " wrote 1 ";
	}
  }
  } 
  // *********************************** END *****************************************

  // ACTION E ************************************************************************
  // *********************************************************************************
  if ($action == "E") 
  { 
  $section = "E";
  
		   // get the relevant data
            $query = "SELECT * FROM OfficeContacts WHERE OfficeContacts.ContactsID = '$therightid'";
	        $result = mysql_query($query) or die("Select of id Failed");
		    $rs = mysql_fetch_array($result);
			if ($rs[5] == 0) 
			{ 
			$selected1 = "selected";
			$selected2 = "";
			}
		    else 
			{ 
			$selected1 = ""; 
			$selected2 = "selected"; 
			}
			// get the rest of the results
            $query2 = "SELECT  * FROM Contacts WHERE Contacts.ContactsID = '$therightid'";
	        $result2 = mysql_query($query2) or die("Select of id Failed");
		    $ps = mysql_fetch_array($result2);
            $messages = "Verander ASB die velde en druk die SUBMIT knoppie om voort te gaan.";  
    }   
  // *********************************** END *****************************************  
  
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
<table width="100%" border="1" cellspacing="1" cellpadding="0">
  <tr> 
    <td bgcolor="#336699"> 
      <div align="center">
          <div align="center"> </div>
          <div align="left"><font face="sans-serif"><b><font color="#CCCCCC" size="2">Welkom 
            by die <font color="#999999">AANLYNSE JAARLIKSE VERKLARING VORM</font>.<br>
            Vul asseblief al die <font color="#999999">FELDE</font> in en druk 
            die <font color="#999999">SUBMIT</font> knoppie on aan te gaan..</font> 
            <font size="2" color="#CCCCCC"><br>
            Enigge vrae? Kontak gerus: <a href="mailto:members@saace.co.za">SUPPORT</a></font></b></font> 
            <font face="sans-serif"><br>
            <font size="2"><b><font color="#CCCCCC">Alle </font><font size="2" color="#CCCCCC"><b><font color="#FF0000">VERPLIGTE</font></b></font><font color="#CCCCCC"> 
            vrae word aangedui deer die: <font color="#FF0000">*</font></font></b></font></font> 
          </div>
      </div>
        </td>
  </tr>
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="10%"> 
            <div align="left"><font size="1" face="sans-serif"><img width=66 height=84
  src="images/image002.gif" v:shapes="_x0000_i1026"></font></div>
          </td>
          <td width="79%"> 
              <div align="center"><font size="1" face="sans-serif">DIE SUID-AFRIKAANSE 
                VERENIGING VAN RAADGEWENDE INGENIEURS<br>
                BESONDERHEDE OOR KANTORE BINNE DIE REPUBLIEK VAN SUID-AFRIKA<br>
                <br>
                </font></div>
          </td>
          <td width="11%"> 
              <div align="right"><font size="1" face="sans-serif"><b>BYLAAG 1<br>
              <?php echo $DeclarationYear; ?><br>
                Bladsy 2</b></font></div>
          </td>
        </tr>
        <tr> 
            <td colspan="3"> <font face="sans-serif" size="2"> <b>
              <?php
		  // ALL PAGE CONTENT STARTS HERE ****************************************
 		  // *********************************************************************
          
		  // SECTION X ************************************************************************
          // *********************************************************************************
          if ($section == "X") 
           {
		   ?>
              </b></font> 
              <div align="center">
                <p><b><font face="sans-serif" size="2">Dankie dat U die dokument 
                  voltooi het.</font></b> 
              </div>
			  <p> 
                  <?php
           }   
          // *********************************** END *****************************************
     	  // SECTION E ***********************************************************
		  // *********************************************************************
          if ($section == "E")
		  {
		   $action = "X";
		  ?>
                </p>
              
              <table width="100%" border="0" cellspacing="2" cellpadding="0">
                <tr> 
                  <td width="55%" bgcolor="#336699"><font face="Times New Roman, Times, serif" size="1" color="#CCCCCC">Van</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[surname]" size="30" value="<?php echo $ps[1]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699" height="27"><font face="Times New Roman, Times, serif" size="1" color="#CCCCCC">Voorletters</font></td>
                  <td width="50%" height="27"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[initials]" size="30" value="<?php echo $ps[2]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">NOEMNAAM(bv. 
                    &quot;Koos&quot; vir&quot;Jacobus&quot;)</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[alsoknown]" size="30" value="<?php echo $ps[3]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">Professionele 
                    Registrasie (indien enige) nommer en datum(PrIng, PrTegIng, 
                    Bestek-opnemer, Argitek, GR(SA) ens</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[proffreg]" size="30" value="<?php echo $ps[13]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">Kwalifikasies(Grade/Diplomas, 
                    vollelidmaatskap van professionele instellings, ens</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[qual]" size="30" value="<?php echo $ps[14]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">Kundigheidsvelde</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[fields]" size="30" value="<?php echo $ps[12]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">Posisie 
                    in firma(bv. Maatskappydirekteur, vennoot, takbestuurder, 
                    of ander posbenaming)</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[pos]" size="30" value="<?php echo $rs[1]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">E-pos 
                    adres </font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <input type="text" name="form[email]" size="30" value="<?php echo $ps[16]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="55%" bgcolor="#336699"><font size="1" face="Times New Roman, Times, serif" color="#CCCCCC">Prinsipaal</font></td>
                  <td width="50%"> <font face="Times New Roman, Times, serif" size="1" color="#CCCCCC"> 
                    <select name="form[principal]">
                      <option value="No" <?php echo $selected1; ?>>No</option>
                      <option value="Yes" <?php echo $selected2; ?>>Yes</option>
                    </select>
                    </font></td>
                </tr>
                <tr> 
                  <td colspan="2"><b><font color="#CCCCCC"></font> </b></td>
                </tr>
              </table>
              <?php
          }
		  // ****************   END **********************************************
		  
		  // SECTION B ***********************************************************
		  // *********************************************************************
          if ($section == "B")
		  {
		   $action = "C";
		   ?>
              <p><font size="1" face="Times New Roman, Times, serif"><b> B.�������TOTALE 
                PERSONEEL <i><u>BY HIERDIE KANTOOR </u></i></b></font>
              <table border=1 cellspacing=0 cellpadding=0 width="100%">
                <tr> 
                  <td colspan=2 valign=top class="Normal" bgcolor="#336699"> 
                    <p align=left style='text-align:center'><b><font color="#CCCCCC"><font size="1" face="Times New Roman, Times, serif"><span
  style='font-size:10.0pt;font-family:"Times New Roman"'>TOTALE AANTAL PRINSIPALE 
                      EN PROFESSIONELE PERSONE EN KONTRAKPERSONEEL SOOS IN A HIERBO</span></font></font></b></p>
                  </td>
                  <td width=182 valign=top class="Normal"><font size="1" face="Times New Roman, Times, serif"> 
                    <input type="text" name="form[proff]" value="<?php echo $MemberProffStaff; ?>" size="10">
                    </font></td>
                </tr>
                <tr> 
                  <td colspan=2 valign=top class="Normal" bgcolor="#336699"> 
                    <p align=left style='
  text-align:center'><b><font color="#CCCCCC"><font size="1" face="Times New Roman, Times, serif"><span
  style='font-size:10.0pt;font-family:"Times New Roman"'>TOTALE NIE-PROFESSIONELE 
                      TEGNIESE PERSONEEL EN KONTRAKPERSONEEL (bv. gegradueerdes, 
                      tekenaars, laboratoriumassistente, ens)</span></font></font></b></p>
                  </td>
                  <td width=182 valign=top class="Normal"><font size="1" face="Times New Roman, Times, serif"> 
                    <input type="text" name="form[nonprof]" value="<?php echo $MemberNonProff; ?>" size="10">
                    </font></td>
                </tr>
                <tr> 
                  <td colspan=2 valign=top class="Normal" bgcolor="#336699"> 
                    <p align=left style='
  text-align:center'><b><font color="#CCCCCC"><font size="1" face="Times New Roman, Times, serif"><span
  style='font-size:10.0pt;font-family:"Times New Roman"'>TOTALE ANDER PERSONEEL 
                      EN KONTRAKPERSONEEL (bv. sekretari&euml;le personeel, boekhouers 
                      ens)</span></font></font></b></p>
                  </td>
                  <td width=182 valign=top class="Normal"><font size="1" face="Times New Roman, Times, serif"> 
                    <input type="text" name="form[other]" value="<?php echo $MemberOtherStaff; ?>" size="10">
                    </font></td>
                </tr>
              </table>
              <?php
          }		  
		  // ****************   END **********************************************		  
		  
		  // SECTION A ***********************************************************
		  // *********************************************************************
		  if ($section == "A")
		  {
		   $action = "B";
		  ?>
              <p> <font size="1" face="sans-serif"> <b> </b></font><font size="1" face="Times New Roman, Times, serif"><b>A.������� 
                BESONDERHEDE VAN PRINSIPALE EN ALLE PROFESSIONELE PERSONEEL <i><u>BY 
                HIERDIE KANTOOR</u></i></b></font><font size="1" face="sans-serif"> 
                </font> </p>
          <?php
		  $messages = "VERANDER of hou die inligting soos dit is. Druk die SUBMIT knoppie om na seksie B te gaan";
   
          $query = "SELECT * FROM OfficeContacts WHERE OfficeContacts.OfficeID = '$SelectOfficeID'";
	      $result = mysql_query($query) or die("Select of id Failed");
		  echo "<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\">";
		  echo "<tr bgcolor=\"#336699\">
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">VAN</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">VOOR-LETTERS</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">NOEMNAAM(bv. 
            &quot;Koos&quot; vir&quot;Jacobus&quot;)</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">Professionele 
            Registrasie (indien enige) nommer en datum(PrIng, PrTegIng, Bestek-opnemer, 
            Argitek, GR(SA) ens</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">Kwalifikasies(Grade/Diplomas, 
            vollelidmaatskap van professionele instellings, ens)</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">Kundigheidsvelde</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">Posisie 
            in firma(bv. Maatskappydirekteur, vennoot, takbestuurder, of ander 
            posbenaming)</font></th>		  		  
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">E-pos adres</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">Prinsipaal</font></th>
		  <th valign=\"top\"><font color=\"#CCCCCC\" size=\"2\">AKSIE</font></th>
		  </tr>";
		  while ($rs = mysql_fetch_array($result))
          {
		  $therightid = $rs[0];
		  $principal = $rs[5];
		  if ($rs[5] == 0) { $yesno = "no"; }
		  else { $yesno = "yes"; }
		  // Get the relevant details to display
		  mysql_connect("$host","$user","$password") or die("Unable to connect to SQL server");
          mysql_select_db("$db") or die("Unable to select database");   
          $query2 = "SELECT  * FROM Contacts WHERE Contacts.ContactsID = '$therightid'";
	      $result2 = mysql_query($query2) or die("Select of id Failed");
		  $ps = mysql_fetch_array($result2);		
		  echo "<tr>
		  <td valign=\"top\"><font size=\"2\">".$ps[1]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["2"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["3"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["13"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["14"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["12"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$rs["1"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$ps["16"]."</font></td>
		  <td valign=\"top\"><font size=\"2\">".$yesno."</font></td>		  
		  <td valign=\"top\"><font size=\"2\">" ?>
            <?php $NewFile = "schedule1_page2GENERIC_A.php4"; printf ("<a href=\"%s?SelectOfficeID=%s&action=E&therightid=%s\")'>VERANDER</a>\n", $NewFile, $SelectOfficeID, $therightid); ?>
            <?php "</font></td>		  		  		  
		  </tr>";
		  		    }
			echo "</table>";
		  }
		  // ****************   END **********************************************
		  
		  
		  // ALL PAGE CONTENT ENDS HERE *****************************************
		  // ********************************************************************
		  ?>
		  </td>
        </tr>
        <tr> 
            <td colspan="3" height="31"> 
              <p align=center style='text-align:center'><font size="1" face="sans-serif"><b><i><span style='font-size:10.0pt;
font-family:&quot;Times New Roman&quot;'>(Gebruik asb 'n NUWE form as u personeel 
                wil verwyder of byvoeg)</span></i></b></font></p>
              <p align=center style='text-align:center'><font size="1" face="sans-serif"><b>(Voltooi 
                'n afsonderlike vel vir elke kantoor)</b></font></p>
          </td>
        </tr>
        <tr> 
          <td colspan="3"> 
              <div align="center"></div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr bgcolor="#336699"> 
    <td bgcolor="#336699"> 
      <div align="center"><font face="sans-serif" size="2"><b><font color="#CCCCCC"> 
        <?php echo $messages; ?>
        :</font> <br>
		<?php
		if ($displaybutton == "no")
		{
		echo "";
		}
		else
		{
		?>
        <input type="submit" name="Submit" value="Submit">
		<?php
		}
		?>
        </b></font></div>
    </td>
  </tr>
</table>
<INPUT TYPE="HIDDEN" NAME="SelectOfficeID" VALUE ="<?php echo $SelectOfficeID; ?>">
<INPUT TYPE="HIDDEN" NAME="therightid" VALUE ="<?php echo $therightid; ?>">
<INPUT TYPE="HIDDEN" NAME="principal" VALUE ="<?php echo $principal; ?>">
<INPUT TYPE="HIDDEN" NAME="Qofficeid" VALUE ="<?php echo $Qofficeid; ?>">
<INPUT TYPE="HIDDEN" NAME="therightid" VALUE ="<?php echo $therightid; ?>">
<INPUT TYPE="HIDDEN" NAME="action" VALUE ="<?php echo $action; ?>">
</form>
<!-- End Page Content Here -->
<?php
	// End page Includes
	include( '../inc/footer2.inc' );
        break;
    case invalid:
        header("Location: http://www.saace.co.za/login.php4?pageurl=".$_SERVER['REQUEST_URI']);
        //systemerror("Login Error","Initial Login Failure",getenv ("PATH_INFO"), $authorized);
        break;
    default:
        systemerror("System Error","System Failure on Authentication",getenv ("PATH_INFO"), "There is a problem logging into our system. Try again later or if the problem persists, please contact SAACE to report the problem.");
        break;
}
?>