Location: PHPKode > projects > phpSC > modules/plus.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.plus_style1 {
	font-size: 1.6em;
	font-weight: bold;
}
table {
border: thin solid black;
}

-->
</style>
</head>

<body>
<div align="center" class="plus_style1">
  <blockquote>
    <p>Plus Packages </p>
  </blockquote>
</div>
<p align="center">Currently installed packages: </p>
<div align="center">
<center>
    <table width="90%" border="0" cellspacing="0">
    <tr class="title">
      <td class="title" width="61%" bgcolor="#999999"><div align="left">Name</div></td>
      <td class="title" width="14%" bgcolor="#999999"><div align="center">Version</div></td>
      <td class="title" width="25%" bgcolor="#999999"><div align="center">Install Date </div></td>
    </tr>
<?PHP
$sql = "SELECT * FROM plus";
$result = mysql_query($sql,$conn);
if(mysql_num_rows($result) == 0) {
$installed_message = "<center><i>No Plus Packages have been installed!</i></center>";
} else {
$installed_message = "";
while($addon = mysql_fetch_array($result)) {
?>
     <tr class="title">
      <td>&nbsp;<?=$addon['package']?></td>
      <td><center><?=$addon['version']?></center></td>
      <td><center><?=$addon['date_installed']?></center></td>
    </tr>
<?PHP
}
}
?>
    </table>
</center>
</div>
<p align="center"><?=$installed_message?></p>
<hr />
<p align="center"><strong>Waiting to be installed:</strong><br />
<div align="center">
<?PHP
$i = 0;
$group = searchdir(_DOCUMENT_ROOT."/addons",1,"DIRS");
foreach($group as $key => $value) {
	if(file_exists($value."addon_info.php")) {
	include_once($value."addon_info.php");
	$sql = "SELECT * FROM plus WHERE package = \"".$addon_name."\" LIMIT 1";
	$result = mysql_query($sql,$conn) or die(mysql_error());
	if(mysql_num_rows($result) == 0) {
	$i++;
	?>
	<center>
    <table width="90%" border="0" cellspacing="0">
    <tr class="title">
      <td class="title" width="61%" bgcolor="#999999"><div align="left">Name: <strong><?=$addon_name?></strong></div></td>
      <td align="right" bgcolor="#999999" class="title">Version <strong>
        <?=$addon_version?></td>
      </tr>
     <tr class="title">
      <td><font size="0.9em"><?=$addon_description?></font></td>
      <td align="center" valign="middle"><div align="right" valign="middle"><form id="<?=$addon_name?>" name="<?=$addon_name?>" method="post" action="index.php?module=plus-installer">
          <input name="addon" type="hidden" value="<?=$value?>" />
          <input type="submit" name="Submit" value="Install" />
          </form>
		</div>        </td>
      </tr>
	</table>
	<BR />
<?PHP
		}
}
}
if($i > 0) {
$uninstalled_message = "";
}
else
{
$uninstalled_message = "<center><i>We couldn't find any qualifying packages!</i></center>";
}
?>
</center>
</div>
<p align="center"><?=$uninstalled_message?></p>
</p>
</body>
</html>
Return current item: phpSC