PHP Classes

File: modules/article.php

Recommend this page to a friend!
  Packages of andreas altendorfer   XML Weblication   modules/article.php   Download  
File: modules/article.php
Role: Application script
Content type: text/plain
Description: Module Article for xmlWeblication
Class: XML Weblication
XML based content management framework
Author: By
Last change:
Date: 22 years ago
Size: 448 bytes
 

 

Contents

Class file image Download
<?php

function module_article() {

  global $cfg,$aid;
  
  $fname = $cfg["articles"] . "/" . $aid . ".xml";
  if ( ! file_exists( $fname ) ) {
    return( Error( "Couldn't find/open article $fname" ));
  }
  
  $xml = new xml( $fname );
  if ( $xml->load() ) {
    $article = new Article( $xml->element );
    $rc .= $article->display();;
    $xml->free();
  }
  else {
    return( Error( "Couldn't parse $fname" ));
  }
  
  return( $rc );
}


?>