Commit 649f61e2 authored by thiaramus's avatar thiaramus
Browse files

Added messagebase class to work with the area list

parent b0783ed1
<?php
/*
* webJAM - A modern JAM MessageBase Editor
* Copyright (C) 2017 Philipp Giebel (stimpy@kuehlbox.wtf)
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see (http://www.gnu.org/licenses/).
*
* * filename: messagebase.class.php
* * description: Echo area list processor.
* * author: Roman Litvinenko (temp@thiaramus.com)
*
*/
class messagebase
{
function getAreaList() {
$file = $GLOBALS['cfg']['areasFile'];
$type = $GLOBALS['cfg']['areasFileType'];
$areas = [];
if ($type == 'areas.ini') {
if (file_exists($file) && is_file($file) && is_readable($file)) {
$areas = parse_ini_file($file, true);
}
} elseif ($type == 'fidoconf') {
$fidoconf = new fidoconf($file);
$areas = $fidoconf->parseAreas();
}
return $areas;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment