removeExtension() public method

Returns the supplied file name without an extension.
public removeExtension ( $fileName )
Exemplo n.º 1
0
 function display(&$pageData)
 {
     $common = new common($this);
     // Check if the portal is installed or needs upgraded.
     $thisVersion = "2.5.0";
     if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/classes/settings.class.php")) {
         header("Location: /install/install.php");
     } elseif ($common->getSetting("version") != $thisVersion) {
         header("Location: /install/upgrade.php");
     }
     // The Base URL of this page (needed for Plane Finder client link)
     $pageData['baseurl'] = $common->getBaseUrl();
     // Load the master template along with required data for the master template..
     $master = $this->readTemplate('master.tpl');
     require_once $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "classes" . DIRECTORY_SEPARATOR . "links.class.php";
     $links = new links();
     $pageData['links'] = $links->getAllLinks();
     // Load the template for the requested page.
     $page = $this->readTemplate($common->removeExtension($_SERVER["SCRIPT_NAME"]) . '.tpl');
     $output = $this->mergeAreas($master, $page);
     $output = $this->mergeSettings($output);
     $output = $this->mergePageData($output, $pageData);
     $output = $this->processIfs($output, $pageData);
     $output = $this->processForeach($output, $pageData);
     $output = $this->processFors($output, $pageData);
     $output = $this->processWhiles($output, $pageData);
     $output = $this->removeComments($output);
     // Insert page ID mainly used to mark an active navigation link when using Bootstrap.
     $output = str_replace("{template:pageId}", $common->removeExtension($_SERVER["SCRIPT_NAME"]) . "-link", $output);
     echo $output;
 }
Exemplo n.º 2
0
 function display(&$pageData)
 {
     $common = new common($this);
     // The Base URL of this page (needed for Plane Finder client link)
     $pageData['baseurl'] = $common->getBaseUrl();
     // Load the master template.
     $master = $this->readTemplate('master.tpl');
     // Load the template for the requested page.
     $page = $this->readTemplate($common->removeExtension($_SERVER["SCRIPT_NAME"]) . '.tpl');
     $output = $this->mergeAreas($master, $page);
     $output = $this->mergeSettings($output);
     $output = $this->mergePageData($output, $pageData);
     $output = $this->processIfs($output, $pageData);
     $output = $this->processForeach($output, $pageData);
     $output = $this->processFors($output, $pageData);
     $output = $this->processWhiles($output, $pageData);
     $output = $this->removeComments($output);
     // Insert page ID mainly used to mark an active navigation link when using Bootstrap.
     $output = str_replace("{template:pageId}", $common->removeExtension($_SERVER["SCRIPT_NAME"]) . "-link", $output);
     echo $output;
 }
Exemplo n.º 3
0
//                                                                                 //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR      //
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,        //
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE     //
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER          //
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,   //
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE   //
// SOFTWARE.                                                                       //
/////////////////////////////////////////////////////////////////////////////////////
// Start session
session_start();
// Load the common PHP classes.
require_once 'classes/common.class.php';
$common = new common();
// The title and navigation link ID of this page.
$pageTitle = "System Information";
// Get the name of the template to use from the settings.
$siteName = $common->getSetting("siteName");
$template = $common->getSetting("template");
// Enable/disable navigation links.
$enableBlog = $common->getSetting("enableBlog");
$enableInfo = $common->getSetting("enableInfo");
$enableGraphs = $common->getSetting("enableGraphs");
$enableDump1090 = $common->getSetting("enableDump1090");
$enableDump978 = $common->getSetting("enableDump978");
$enablePfclient = $common->getSetting("enablePfclient");
$linkId = $common->removeExtension($_SERVER["SCRIPT_NAME"]) . "-link";
// Include the index template.
require_once 'templates/' . $template . '/system.tpl.php';
// Include the master template.
require_once 'templates/' . $template . '/master.tpl.php';