show donate link only in non-Pro version

This commit is contained in:
Roland Gruber 2006-10-18 16:08:58 +00:00
parent b4b6bf10ca
commit 087f02d642
3 changed files with 29 additions and 4 deletions

View File

@ -35,6 +35,16 @@ include_once("modules.inc");
/** account types */ /** account types */
include_once("types.inc"); include_once("types.inc");
/**
* Returns if this is a LAM Pro installation.
*
* @return boolean LAM Pro installation
*/
function isLAMProVersion() {
$dir = substr(__FILE__, 0, strlen(__FILE__) - 20) . "/templates/selfService";
return is_dir($dir);
}
/** /**
* Returns a list of possible search attributes for the self service. * Returns a list of possible search attributes for the self service.

View File

@ -32,6 +32,8 @@ $Id$
include_once("../lib/status.inc"); include_once("../lib/status.inc");
/** security functions */ /** security functions */
include_once("../lib/security.inc"); include_once("../lib/security.inc");
/** self service functions */
include_once("../lib/selfService.inc");
// check environment // check environment
$criticalErrors = array(); $criticalErrors = array();
@ -174,7 +176,14 @@ function display_LoginPage($config_object) {
</p> </p>
<table width="100%" border="0"> <table width="100%" border="0">
<tr> <tr>
<td width="100%" align="right"> <TD width="50%" align="left">
<?PHP
if (!isLAMProVersion()) {
echo "<a href=\"http://lam.sourceforge.net/lamPro/index.htm\">" . _("Want more features? Get LAM Pro!") . "</a>";
}
?>
</TD>
<td width="50%" align="right">
<a href="./config/index.php"><IMG alt="configuration" src="../graphics/tools.png">&nbsp;<?php echo _("LAM configuration") ?></a> <a href="./config/index.php"><IMG alt="configuration" src="../graphics/tools.png">&nbsp;<?php echo _("LAM configuration") ?></a>
</td> </td>
</tr> </tr>
@ -335,7 +344,7 @@ function display_LoginPage($config_object) {
<TR><TD align="right"><HR> <TR><TD align="right"><HR>
<SMALL> <SMALL>
<?php <?php
if (is_dir("./selfService")) { if (isLAMProVersion()) {
echo "LDAP Account Manager <b>Pro</b>: <b>" . LAMVersion() . "</b>&nbsp;&nbsp;&nbsp;"; echo "LDAP Account Manager <b>Pro</b>: <b>" . LAMVersion() . "</b>&nbsp;&nbsp;&nbsp;";
} }
else { else {

View File

@ -32,6 +32,8 @@ $Id$
include_once("../lib/security.inc"); include_once("../lib/security.inc");
/** access to configuration options */ /** access to configuration options */
include_once("../lib/config.inc"); include_once("../lib/config.inc");
/** self service functions */
include_once("../lib/selfService.inc");
// start session // start session
startSecureSession(); startSecureSession();
@ -53,8 +55,12 @@ $types = $_SESSION['config']->get_ActiveTypes();
<table border=0 width="100%"> <table border=0 width="100%">
<tr> <tr>
<td width="200"> <td width="200">
<a href="http://lam.sourceforge.net/sponsors/donations.htm" target="_blank"><img alt="donations" src="../graphics/smile.png">&nbsp;<?php echo _("Donate") ?></a> <?PHP
<br><br> if (!isLAMProVersion()) {
echo "<a href=\"http://lam.sourceforge.net/sponsors/donations.htm\" target=\"_blank\"><img alt=\"donations\" src=\"../graphics/smile.png\">&nbsp;" . _("Donate") . "</a>";
echo "<br><br>";
}
?>
<a href="tools.php" target="mainpart"><img alt="tools" src="../graphics/tools.png">&nbsp;<BIG><B><?php echo _("Tools") ?></B></BIG></a> <a href="tools.php" target="mainpart"><img alt="tools" src="../graphics/tools.png">&nbsp;<BIG><B><?php echo _("Tools") ?></B></BIG></a>
</td> </td>
<td align="center"> <td align="center">