46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Process all actions to list and edit records
|
|
//
|
|
|
|
$CurrentTable = "classified_ads";
|
|
$FormFile = "classified.dialog.php";
|
|
$DialogWidth = 600;
|
|
$TitleText = getLanguageText('TEXT-CLASSIFIED-ADS');
|
|
$SequenceFlag = 'N';
|
|
$tableAction = 'classified-ads';
|
|
$RequiredFields = array('subcategory_num','title','description','contact_info','contact_email');
|
|
|
|
$post_until_date = date("Y-m-d",time() + 60 * 60 * 24 * $school_record['classified_duration']);
|
|
$status = $school_record['default_classified_status'];
|
|
$FieldDefaultValues = array(
|
|
'post_until_date' => $post_until_date,
|
|
'status' => $status,
|
|
);
|
|
|
|
if ($userType != 'Admin') {
|
|
$JSinitForm = "
|
|
$('#dialog_post_until_date').prop('disabled', true);
|
|
$('#dialog_status').prop('disabled', true);
|
|
";
|
|
}
|
|
|
|
// Start the template and output buffering
|
|
startTemplate();
|
|
$templatePageTitle = $TitleText;
|
|
|
|
|
|
include "form.js.php";
|
|
|
|
endTemplate();
|
|
|
|
?>
|