File: //home/posscale/public_html/jts/joomla_vlist.php
<?php
/**
* Joomla File List Check
* @author Russell Winter
* @copyright GNU/GPL (c) 2006 Bandhosting.nl
* @version 1.0
*
* @version $Id: joomla_flist.php 9 2006-09-16 15:06:10Z RussW $
* @package Joomla! Tools Suite
**/
// No Direct Access, Redirect To Index
if (!defined( '_VALID_JTS' )) {
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: http://$host$uri/");
exit;
}
define( '_VALID_MOS', 1 );
// echo "<style>";
// echo "TD { font-family: arial; font-size: 11px; padding-left: 8px; }";
// echo ".ext_desc { font-family: arial; font-size: 11px; padding-left: 8px; color: #778899; }";
// echo "TH { font-family: arial; font-size: 13px; background-color: #778899; color: #FFFFFF; border: 1px solid #C0C0C0; font-variant: small-caps; }";
// echo "</style>";
?>
<div id="ctr" align="center">
<div class="diag">
<div id="step">
</div>
<div class="clr"></div>
<table border='0' width='95%' cellspadding='1' cellspacing='0' align='left' align="center">
<tr>
<td class='advisor' width="170px" height="23px" valign="top">
<?php
echo "<b>". _VERNAME ." ". _VLIS_VERSION ." : ". _LANGUAGE ."</b><br />";
// echo "<b>". _HISA_TRANSLATEDBY.":</b><br />"._HISA_TRANSLATEDWHO ."<br />";
?>
</td>
<td> </td>
<td rowspan="2" width="250px" valign="top" style="font-size: 9px;">
<br /><b><?php echo _REF; ?>:</b><br />
<a href="http://forum.joomla.org/index.php/topic,102558.0.html" target="_new"><?php echo _REF_SECFAQ_URL; ?></a><br />
<a href="http://forum.joomla.org/index.php/topic,81058.0.html" target=_new"><?php echo _REF_SECADM_URL; ?></a><br />
<a href="http://forum.joomla.org/index.php/topic,101240.0.html" target="_new"><?php echo _REF_EXTFAQ_URL; ?></a>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<p>
<br clear=all />
</p>
<h1><?php echo _VLIS_TITLE ; ?></h1>
<div class="form-block">
<?php
//$PATH = $_ENV['DOCUMENT_ROOT'];
//define the path as relative
$dir = "../administrator/components/";
//using the opendir function
$dir_handle = @opendir($dir) or die("Unable to open $dir");
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85%\">";
echo "<tr><th class=\"vflist\" colspan=\"5\">". _VLIS_COMPONENTS."</th></tr>";
echo "<tr><td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_NAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VERNAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _AUTHOR ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_AUTHOR_SITE ."<b/></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;\"> <b>". _VLIS_TYPE ."<b/></td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"></td></tr>";
while ($file = readdir($dir_handle)) {
if($file!="." && $file!=".." && $file!="index.html") {
$newDir = $dir.''.$file;
$dir1 = opendir($newDir);
while ($f = readdir($dir1)) {
if (eregi("\.xml",$f)){ #if filename matches .txt in the name
// if (file_exists($f)) {
$content = file_get_contents($newDir.'/'.$f);
// }
echo "<tr><td class=\"vflist\" width=\"25%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>";
if (preg_match('#<name>(.*)</name>#', $content, $name)) {
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">". $name[1] ."</font>";
} else {
echo "<font color=\"maroon\">". $name[1] ."</font>";
}
}
}
echo "</td>";
echo "<td class=\"vflist\" width=\"12%\" style=\"color: navy; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> v <b>";
if (preg_match('#<version>(.*)</version>#', $content, $version)) {
echo $version[1];
}
echo "</b></td>";
echo "<td class=\"vflist\" width=\"26%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
echo $author[1];
}
echo "</td>";
echo "<td class=\"vflist\" width=\"27%\" style=\" border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<authorUrl>(.*)</authorUrl>#', $content, $authorUrl)) {
echo "<a href=\"http://". $authorUrl[1] ."\" target=\"_new\">". $authorUrl[1] ."</a>";
}
echo "</td>";
echo "<td class=\"vflist\" width=\"10%\" style=\"border-top: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">Core</font>";
} else {
echo "<font color=\"maroon\">3rd Party</font>";
}
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" class=\"ext_desc\" style=\"background-color: #F1F1F1; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-left: 1px solid #C0C0C0;\"> ";
if (preg_match('#<description>(.*)</description>#', $content, $description)) {
echo $description[1];
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"> </td></tr>";
}
}
}
}
echo "</table>";
echo "<div class=\"ext_desc\">Done Processing Components</div>";
//closing the directory
closedir($dir_handle);
?>
<br /><br />
<?php
//$PATH = $_ENV['DOCUMENT_ROOT'];
//define the path as relative
$dir = "../administrator/modules/";
//using the opendir function
////$dir_handle = @opendir($dir) or die("Unable to open $dir");
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85%\">";
echo "<tr><th class=\"vflist\" colspan=\"5\">". _VLIS_MODULES."</th></tr>";
echo "<tr><td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_NAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VERNAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _AUTHOR ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_AUTHOR_SITE ."<b/></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;\"> <b>". _VLIS_TYPE ."<b/></td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"></td></tr>";
if($file!="." && $file!=".." && $file!="index.html") {
$newDir = $dir.''.$file;
$dir1 = opendir($newDir);
while ($f = readdir($dir1)) {
if (eregi("\.xml",$f)){ #if filename matches .txt in the name
$content = file_get_contents($newDir.'/'.$f);
echo "<tr><td class=\"vflist\" width=\"25%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>";
if (preg_match('#<name>(.*)</name>#', $content, $name)) {
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">". $name[1] ."</font>";
} else {
echo "<font color=\"maroon\">". $name[1] ."</font>";
}
}
}
echo "</td>";
echo "<td class=\"vflist\" width=\"12%\" style=\"color: navy; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> v <b>";
if (preg_match('#<version>(.*)</version>#', $content, $version)) {
echo $version[1];
}
echo "</b></td>";
echo "<td class=\"vflist\" width=\"26%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
echo $author[1];
}
echo "</td>";
echo "<td class=\"vflist\" width=\"27%\" style=\" border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<authorUrl>(.*)</authorUrl>#', $content, $authorUrl)) {
echo "<a href=\"http://". $authorUrl[1] ."\" target=\"_new\">". $authorUrl[1] ."</a>";
}
echo "</td>";
echo "<td class=\"vflist\" width=\"10%\" style=\"border-top: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">Core</font>";
} else {
echo "<font color=\"maroon\">3rd Party</font>";
}
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" class=\"ext_desc\" style=\"background-color: #F1F1F1; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-left: 1px solid #C0C0C0;\"> ";
if (preg_match('#<description>(.*)</description>#', $content, $description)) {
echo $description[1];
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"> </td></tr>";
}
}
}
echo "</table>";
echo "<div class=\"ext_desc\">Done Processing Modules</div>";
?>
<br /><br />
<?php
//$PATH = $_ENV['DOCUMENT_ROOT'];
//define the path as relative
$dir = "../mambots/";
//using the opendir function
$dir_handle = @opendir($dir) or die("Unable to open $dir");
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85%\">";
echo "<tr><th class=\"vflist\" colspan=\"5\">". _VLIS_MAMBOTS."</th></tr>";
echo "<tr><td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_NAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VERNAME ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _AUTHOR ."</b></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>". _VLIS_AUTHOR_SITE ."<b/></td>";
echo "<td class=\"Heading\" style=\"border-left: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;\"> <b>". _VLIS_TYPE ."<b/></td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"></td></tr>";
while ($file = readdir($dir_handle)) {
if($file!="." && $file!=".." && $file!="index.html") {
$newDir = $dir.''.$file;
$dir1 = opendir($newDir);
while ($f = readdir($dir1)) {
if (eregi("\.xml",$f)){ #if filename matches .txt in the name
if($f!="none.xml") {
$content = file_get_contents($newDir.'/'.$f);
}
echo "<tr><td class=\"vflist\" width=\"25%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> <b>";
if (preg_match('#<name>(.*)</name>#', $content, $name)) {
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">". $name[1] ."</font>";
} else {
echo "<font color=\"maroon\">". $name[1] ."</font>";
}
}
}
echo "</td>";
echo "<td class=\"vflist\" width=\"12%\" style=\"color: navy; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> v <b>";
if (preg_match('#<version>(.*)</version>#', $content, $version)) {
echo $version[1];
}
echo "</b></td>";
echo "<td class=\"vflist\" width=\"26%\" style=\"border-left: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
echo $author[1];
}
echo "</td>";
echo "<td class=\"vflist\" width=\"27%\" style=\" border-top: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<authorUrl>(.*)</authorUrl>#', $content, $authorUrl)) {
echo "<a href=\"http://". $authorUrl[1] ."\" target=\"_new\">". $authorUrl[1] ."</a>";
}
echo "</td>";
echo "<td class=\"vflist\" width=\"10%\" style=\"border-top: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-bottom: 1px solid #C0C0C0;\"> ";
if (preg_match('#<author>(.*)</author>#', $content, $author)) {
if ($author[1] == "Joomla! Project") {
echo "<font color=\"green\">Core</font>";
} else {
echo "<font color=\"maroon\">3rd Party</font>";
}
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" class=\"ext_desc\" style=\"background-color: #F1F1F1; border-bottom: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-left: 1px solid #C0C0C0;\"> ";
if (preg_match('#<description>(.*)</description>#', $content, $description)) {
echo $description[1];
}
echo "</td></tr>";
echo "<tr><td colspan=\"5\" style=\"height: 10px;\"> </td></tr>";
}
}
}
}
echo "</table>";
echo "<div class=\"ext_desc\">Done Processing Mambots</div>";
//closing the directory
closedir($dir_handle);
?>
</div>
</div>
<div class="clr"></div>
</div>
<div class="ctr">
<center>
<div class="error" align="center" style="width: 755px; padding: 2px; font-size: 11px; font-weight: normal; background-color: yellow; text-align: center; background-image: url(../includes/js/ThemeOffice/warning.png); background-position: 4px 4px; background-repeat: no-repeat; border: 1px solid #cc0000;">
<?php echo _WARN_SECURITY; ?>
</div>
<br /><br />
<?php echo _JUST_LINK; ?><br />
<br />
<br />
<?php echo _JOOMLA_LINK; ?>
</center>
</div>
</body>
</html>