<td width="40%">' . $acad_publication->institution . '</td>
								<td width="5%">' . $acad_publication->qualification . '</td>
								<td width="5%">' . $acad_publication->year_of_publication . '</td>
							</tr>';
            $index++;
        }
        echo '</tbody>
		
		            </table>';
    }
    ?>
		    
		    
		    	<h4 align="center" class="alert alert-success">Other Publications</h4>
		    <?php 
    $other_publication = OtherPublication::find_by_sql("SELECT * FROM otherpublications WHERE applicant_id='" . $applicant_id . "'");
    if (empty($other_publication)) {
        $no_information = 'No Information Supplied';
        echo '
					<table class="table table-bordered table-hover">
		            	<thead>
		                	<th>S/N</th>
		                    <th>Title Of Publication</th>
		                    <th>Publisher</th>
		                </thead>
						<tbody>
							<tr>
								<td width="4%"> 1. </td>
								<td width="60%">' . $no_information . '</td>
								<td width="30%">' . $no_information . '</td>
							</tr>
    $pub_date_key = 'publication_date_' . $i;
    $publication->title_of_publication = $_POST[$pub_title_key];
    $publication->institution = $_POST[$pub_inst_key];
    $publication->qualification = $_POST[$pub_qual_key];
    $publication->year_of_publication = $_POST[$pub_date_key];
    if ($publication->title_of_publication == '') {
        continue;
    }
    $publication->applicant_id = $session->applicant_id;
    if (!$publication->save()) {
        $error_academic_publication = true;
    }
    unset($publication->publication_id);
}
if (!$error_academic_publication) {
    $o_publication = new OtherPublication();
    $error_other_publication = false;
    for ($j = 1; $j <= $_POST['num_of_o_pub_rows']; $j++) {
        if (isset($_POST['other_publications_id_' . $j])) {
            $o_publication->publication_id = $_POST['other_publications_id_' . $j];
        }
        $o_pub_title_key = 'other_publications_title_' . $j;
        $o_pub_publisher_key = 'other_publications_publisher_' . $j;
        $o_publication->title_of_publication = $_POST[$o_pub_title_key];
        $o_publication->publisher = $_POST[$o_pub_publisher_key];
        $o_publication->applicant_id = $session->applicant_id;
        if ($o_publication->title_of_publication == '') {
            continue;
        }
        if (!$o_publication->save()) {
            $error_other_publication = true;
Example #3
0
<?php

$database = new MySQLDatabase();
$session = new Session();
$academic_publications = Publication::find_by_sql("SELECT * FROM academic_publications WHERE applicant_id=" . $session->applicant_id);
$other_publications = OtherPublication::find_by_sql("SELECT * FROM otherpublications WHERE applicant_id=" . $session->applicant_id);
?>
<form action="" method="POST" class="publications" >

	<!-- Beginning of Publications -->
	<table class="table table-hover">
	  <caption><h3>Academic Publications</h3></caption>
	  <caption><h4>Thesis, Projects and Publications</h4></caption>
	  <thead>
		<tr>
		  <th>S/N</th>
		  <th>Title</th>
		  <th>Institution</th>
		  <th>Qualifications</th>
		  <th>Date</th>
		</tr>
	  </thead>
      
	  <tbody id="thesis_projects_publication">
      <?php 
if (!empty($academic_publications)) {
    $index = 1;
    foreach ($academic_publications as $academic) {
        $publication_title = 'publication_title_' . $index;
        $publication_inst = 'publication_institution_' . $index;
        $publication_qualification = 'publication_qualification_' . $index;