<?php
//error_reporting(E_ALL & ~E_NOTICE);
//ini_set("display_errors", 1);
$docTotal = file_get_contents("http://facjobs.westga.edu/");
$LINES = explode("\n", "$docTotal");
$outFG = 0;
foreach ( $LINES as $lineNum => $lineText ) {
if ( (strpos(strtoupper($lineText), "IMAGE1") !== FALSE ) ) {
$newDoc .= "<div class=\"facjobs-container\">\n";
$newDoc .= "<table id=\"TBL1\" cellpadding=\"10\">\n";
//echo "<pre>IMAGE1</pre>\n";
continue;
}
if ( (strpos(strtoupper($lineText), "<FORM") !== FALSE ) ) {
$newDoc .= "<div class=\"facjobs-space\"></div>\n";
$newDoc .= "<form method=\"post\" action=\"https://www.westga.edu/administration/facjobs_view.php\" id=\"Form1\">\n";
$outFG = 1;
continue;
}
//if ( (strpos(strtoupper($lineText), "<TABLE") !== FALSE ) ) {
// $newDoc .= "<div class=\"facjobs-container\">\n";
// $newDoc .= "<table id=\"TBL1\" cellpadding=\"10\">\n";
// continue;
// }
if ( (strpos(strtoupper($lineText), "</BODY") !== FALSE ) ) {
$outFG = 0;
}
if ( (strpos(strtoupper($lineText), "<FORM") !== FALSE ) ) {
$newDoc .= "<form method=\"post\" action=\"test2.php\" id=\"Form1\">\n";
}
if ( (strpos(strtoupper($lineText), "<B>VIEW</B>") !== FALSE ) ) {
$newDoc .= "<td width=\"35\"><b>View</b></td><td><b>Position</b></td><td><b>Nature of Work</b></td><td><b>Salary</b></td><td><b>Deadline</b></td>\n";
}
else if ( $outFG == 1 )
$newDoc .= "$lineText\n";
}
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/_resources/css/facjobs.css">
</head>
<body ms_positioning="GridLayout">

<header>
<div class="facjobs-top">
<a class="facjobs-logo" href="https:www.westga.edu"></a>
</div>
<div class="facjobs-header">
<div class="facjobs-header-content">
<div class="facjobs-header-content-inner">
Current Position Openings
</div>
</div>
</div>
</header>
<?php
print "$newDoc\n";
?>
</html>