<?php
//#################################################################################################
// Helper functions for the moduleinfo
//#################################################################################################
// chillyCMS - Content Management System
// Copyright (C) 2008
// Stefanie Wiegand <hide@address.com> & Johannes Cox <hide@address.com>
//
// This program is licensed under the GPL 3.0 license. For more information see LICENSE.txt.
//#################################################################################################
// moduleinfo($id)
//#################################################################################################
defined('DOIT') or die('Restricted access');
//moduleinfo///////////////////////////////////////////////////////////////////////////////////////
function moduleinfo($id) {
global $l_gen,$l_mods;
$moduleinfo = "<h1 style='float:left;'>$l_gen[lbl_info]</h1><a class='bulb'></a><br /><br /><br />";
$error=true;
if ($id>0) {
$mod=new Module();
$mod->load($id);
$name=cut_doubledots($mod->name);
$infofile=PATH."/modules/$name/info";
if (is_file($infofile)) {
$handle=@fopen($infofile, "r");
if ($handle) {
$error=false;
while (!feof($handle)) {
$line=fgets($handle);
$moduleinfo .= "$line<br />";
}
fclose($handle);
}
}
}
if ($error) { $moduleinfo .= "<h3>$l_gen[lbl_sorry]</h3><br /><p>$l_mods[txt_noinfo]<p><br />"; }
$moduleinfo .= "<form action='".URL."/admin/modules.site.php'>
<input class='button' type='submit' value='$l_gen[lbl_back]'></input></form>";
return $moduleinfo;
} ?>