\n";
$output .= "
\n";
$output .= " Region 1 (North Coast) | \n";
$output .= " Facilities Regulated | \n";
$output .= " Inspections | \n";
$output .= " Permits Issued, Revised and Renewed | \n";
$output .= " Enforcement Actions | \n";
$output .= " Budget | \n";
$output .= " Staff (PY) | \n";
$output .= "
\n";
$output .= " \n";
$output .= " Program | \n";
$output .= " Actual | \n";
$output .= " Target | \n";
$output .= " % Target | \n";
$output .= " Actual | \n";
$output .= " Target | \n";
$output .= " % Target | \n";
$output .= "
\n";
$result = mysql_query("SELECT * FROM 71121_tbl1 WHERE region='1' ORDER BY id", $link) or die(mysql_error());
while ($row = mysql_fetch_assoc($result)) {
if ($row['program'] == "All Other Programs") {
$output .= " \n";
$output .= " " . $row['program'] . " | \n";
$output .= " " . $row['regulated'] . " | \n";
$output .= " " . $row['insp_actual'] . " | \n";
$output .= " " . $row['perm_actual'] . " | \n";
$output .= " " . $row['actions'] . " | \n";
$output .= " " . $row['budget'] . " | \n";
$output .= " " . $row['staff'] . " | \n";
$output .= "
\n";
}
if ($row['program'] == "Timber Harvest/Confined Animal Facilities") {
$output .= " \n";
$output .= " " . $row['program'] . " | \n";
$output .= " " . $row['regulated'] . " | \n";
$output .= " " . $row['insp_actual'] . " | \n";
$output .= " " . $row['insp_target'] . " | \n";
$output .= " " . $row['perm_actual'] . " | \n";
$output .= " " . $row['perm_target'] . " | \n";
$output .= " " . $row['actions'] . " | \n";
$output .= " " . $row['budget'] . " | \n";
$output .= " " . $row['staff'] . " | \n";
$output .= "
\n";
}
$output .= "\n";
if (file_exists("table1")) {
unlink("table1");
}
}
$handle = fopen("table1", 'w') or die("can't open file");
fwrite($handle, $output);
fclose($handle);
chmod("/work2a/web/server/docs/about_us/performance_report_1011/mgmt/targets/table1.html", 0666);
/*
mysql_real_escape_string($_POST[$insp_actual2]),
mysql_real_escape_string($_POST[$insp_target2]),
mysql_real_escape_string($_POST[$perm_actual2]),
mysql_real_escape_string($_POST[$perm_target2]),
mysql_real_escape_string($_POST[$actions2]),
mysql_real_escape_string($_POST[$budget2]),
mysql_real_escape_string($_POST[$staff2]),
mysql_real_escape_string($row2['id']));
$result = mysql_query($sqlquery, $link) or die(mysql_error());
} else {
$sqlquery = sprintf("UPDATE 71121_tbl1 SET regulated = '%s', insp_actual = '%s', insp_target = '%s', perm_actual = '%s', perm_target = '%s' WHERE id = '%s'",
mysql_real_escape_string($_POST[$regulated2]),
mysql_real_escape_string($_POST[$insp_actual2]),
mysql_real_escape_string($_POST[$insp_target2]),
mysql_real_escape_string($_POST[$perm_actual2]),
mysql_real_escape_string($_POST[$perm_target2]),
mysql_real_escape_string($row2['id']));
$result = mysql_query($sqlquery, $link) or die(mysql_error());
if (isset($_POST[$actions2])) {
$sqlquery = sprintf("UPDATE 71121_tbl1 SET actions = '%s', budget = '%s', staff = '%s' WHERE id = '%s'",
mysql_real_escape_string($_POST[$actions2]),
mysql_real_escape_string($_POST[$budget2]),
mysql_real_escape_string($_POST[$staff2]),
mysql_real_escape_string($row2['id']));
$result = mysql_query($sqlquery, $link) or die(mysql_error());
}
}
}
} // end of Measurements table update
*/
?>