MairsContentManagementSystem

Fu? 斧!

We can do any damned thing we please. Well, I didn't want to bother JL about a DB so I pulled a Content Management System that didn't use one outta... thin air, that's it!

Here's some of how it works:

PHP Directory reader:

<?php
exec ('ls *html', $articles);
$i=0;
foreach ($articles as $article){
  exec ('egrep \'title|TITLE\' '.$article.'|head -1|cut -f2- -d \>|cut -f1 -d \<', $title);
?>
PHP file rotator:
<?php
$num=file_get_contents("bckrnd_counter");
if ($num>exec ("ls images/backgrounds|wc -l")) {$num=1;}
$bkg=exec ("ls images/backgrounds/*|head -".$num."|tail -1");
$num++; 
$handle = fopen("bckrnd_counter", "w"); 
fwrite($handle, $num); 
fclose($handle); 
?>
C++ header generator
#include <iostream>
#include <string>
using namespace std;
int main (int argc, char *argv[]){
  cout << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" << endl
  << "<html  xmlns=\"http://www.w3.org/1999/xhtml\">" << endl
  << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"
  << endl << "<title>";
  for (int i=2;i<argc;i++) 
    cout << argv[i] << " "; 
  cout << " </title>" <"
  << "<link rel=\"shortcut icon\" href=\"/icon.ico\"/>"
  << endl << "</head>" << endl 
  << "<body>" << endl ;
}
C++ footer generator
#include <iostream>
#include <string>
using namespace std;
int main (int argc, char *argv[]){
  cout << "</body></html>" << endl; 
}