First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
header("Location: /");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Start the template and output buffering
|
||||
startTemplate();
|
||||
$CurrentTable = "classified_ads";
|
||||
$TitleText = getLanguageText('TEXT-CLASSIFIED-ADS');
|
||||
$templatePageTitle = "$TitleText " . getLanguageText('TEXT-ADMINISTRATION');
|
||||
$headerArgs = "";
|
||||
|
||||
|
||||
$school_name = $school_record['school_name'];
|
||||
|
||||
// Setup default values on insert
|
||||
if (!isset($naction)) {
|
||||
$naction = 'insert';
|
||||
if (array_key_exists('naction',$_GET)) $naction = $_GET['naction'];
|
||||
}
|
||||
|
||||
switch ($naction) {
|
||||
default:
|
||||
case 'add':
|
||||
$PageTitle = "Insert a New Classified Ad";
|
||||
$ButtonText = "Create Ad";
|
||||
$next_naction = 'insert';
|
||||
include "classified.form.php";
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
// Get ad record
|
||||
$num = intval($_REQUEST['num']);
|
||||
$uid = $_SESSION['UserInfo']['record_num'];
|
||||
|
||||
$query = "select * from classified_ads " .
|
||||
"where school_num = $school_num " .
|
||||
"and record_num = $num " .
|
||||
"and posted_by = $uid";
|
||||
$results = db_query($query);
|
||||
$row = db_fetch_array($results);
|
||||
extract($row);
|
||||
|
||||
$PageTitle = "Update a Classified Ad";
|
||||
$ButtonText = "Update Ad";
|
||||
$naction = 'update';
|
||||
include "classified.form.php";
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
$PageTitle = "Update a Classified Ad";
|
||||
$ButtonText = "Update Ad";
|
||||
$naction = 'update';
|
||||
include "classified.form.php";
|
||||
break;
|
||||
}
|
||||
|
||||
endTemplate();
|
||||
?>
|
||||
Reference in new issue
Block a user