summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--login.php2
-rw-r--r--templates/admin_list-admin.tpl7
-rw-r--r--templates/admin_list-virtual.tpl2
-rw-r--r--templates/admin_search.tpl2
-rw-r--r--templates/footer.tpl4
-rw-r--r--templates/overview.tpl2
-rw-r--r--templates/search.tpl2
-rw-r--r--templates/viewlog.tpl10
-rw-r--r--users/login.php4
-rw-r--r--users/vacation.php2
10 files changed, 20 insertions, 17 deletions
diff --git a/login.php b/login.php
index b637cf3..f69b8b5 100644
--- a/login.php
+++ b/login.php
@@ -59,7 +59,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if ($error != 1)
{
session_start();
- session_register("sessid");
+# session_register("sessid");
$_SESSION['sessid']['username'] = $fUsername;
header("Location: main.php");
diff --git a/templates/admin_list-admin.tpl b/templates/admin_list-admin.tpl
index fde3cae..d102342 100644
--- a/templates/admin_list-admin.tpl
+++ b/templates/admin_list-admin.tpl
@@ -1,5 +1,6 @@
<?php
-if (sizeof ($list_admins) > 0)
+if (!empty ($list_admins)) { $list_admins_count = count ($list_admins); }
+if (is_array($list_admins) && $list_admins_count > 0)
{
print "<table id=\"admin_table\">\n";
print " <tr class=\"header\">\n";
@@ -10,9 +11,9 @@ if (sizeof ($list_admins) > 0)
print " <td colspan=\"2\">&nbsp;</td>\n";
print " </tr>\n";
- for ($i = 0; $i < sizeof ($list_admins); $i++)
+ for ($i = 0; $i < $list_admins_count; $i++)
{
- if ((is_array ($list_admins) and sizeof ($list_admins) > 0))
+ if ((is_array ($list_admins) and $list_admins_count > 0))
{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td><a href=\"list-domain.php?username=" . $list_admins[$i] . "\">" . $list_admins[$i] . "</a></td>";
diff --git a/templates/admin_list-virtual.tpl b/templates/admin_list-virtual.tpl
index 28bff22..5a41394 100644
--- a/templates/admin_list-virtual.tpl
+++ b/templates/admin_list-virtual.tpl
@@ -61,7 +61,7 @@ if (sizeof ($tAlias) > 0)
{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td>" . $tAlias[$i]['address'] . "</td>\n";
- print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n";
+ print " <td>" . preg_replace ("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n";
print " <td><a href=\"delete.php?table=alias" . "&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n";
diff --git a/templates/admin_search.tpl b/templates/admin_search.tpl
index 7370fb8..34fd110 100644
--- a/templates/admin_search.tpl
+++ b/templates/admin_search.tpl
@@ -25,7 +25,7 @@ if (sizeof ($tAlias) > 0)
{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td>" . $tAlias[$i]['address'] . "</td>\n";
- print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n";
+ print " <td>" . preg_replace ("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
print " <td><a href=\"delete.php?table=alias&delete=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n";
diff --git a/templates/footer.tpl b/templates/footer.tpl
index 779fa0f..065066c 100644
--- a/templates/footer.tpl
+++ b/templates/footer.tpl
@@ -1,7 +1,7 @@
<div id="footer">
-<a target="_blank" href="http://postfixadmin.com/">Postfix Admin <?php print $version; ?></a>
+<a target="_blank" href="http://postfixadmin.org/">Postfix Admin <?php print $version; ?></a>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp
-<a target="_blank" href="http://postfixadmin.com/?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>
+<a target="_blank" href="http://postfixadmin.org/?version=<?php print $version; ?>"><?php print $PALANG['check_update']; ?></a>
<?php
if (($CONF['show_footer_text'] == "YES") and ($CONF['footer_link']))
{
diff --git a/templates/overview.tpl b/templates/overview.tpl
index 7ab3761..ce1e8b0 100644
--- a/templates/overview.tpl
+++ b/templates/overview.tpl
@@ -59,7 +59,7 @@ if (sizeof ($tAlias) > 0)
{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td>" . $tAlias[$i]['address'] . "</td>\n";
- print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n";
+ print " <td>" . preg_replace ("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
if ($CONF['special_alias_control'] == 'YES')
diff --git a/templates/search.tpl b/templates/search.tpl
index d839258..410a2fe 100644
--- a/templates/search.tpl
+++ b/templates/search.tpl
@@ -25,7 +25,7 @@ if (sizeof ($tAlias) > 0)
{
print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">\n";
print " <td>" . $tAlias[$i]['address'] . "</td>\n";
- print " <td>" . ereg_replace (",", "<br>", $tAlias[$i]['goto']) . "</td>\n";
+ print " <td>" . preg_replace ("/,/", "<br>", $tAlias[$i]['goto']) . "</td>\n";
print " <td>" . $tAlias[$i]['modified'] . "</td>\n";
print " <td><a href=\"edit-alias.php?address=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\">" . $PALANG['edit'] . "</a></td>\n";
print " <td><a href=\"delete.php?delete=" . urlencode ($tAlias[$i]['address']) . "&domain=" . $tAlias[$i]['domain'] . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_aliases'] . ": ". $tAlias[$i]['address'] . "')\">" . $PALANG['del'] . "</a></td>\n";
diff --git a/templates/viewlog.tpl b/templates/viewlog.tpl
index 9c1c8e1..2c7ab0f 100644
--- a/templates/viewlog.tpl
+++ b/templates/viewlog.tpl
@@ -2,7 +2,8 @@
<form name="overview" method="post">
<select name="fDomain" onChange="this.form.submit()";>
<?php
-for ($i = 0; $i < sizeof ($list_domains); $i++)
+$count = count ($list_domains);
+for ($i = 0; $i < $count; $i++)
{
if ($fDomain == $list_domains[$i])
{
@@ -20,7 +21,8 @@ for ($i = 0; $i < sizeof ($list_domains); $i++)
</div>
<?php
- if (sizeof ($tLog) > 0)
+ if (!empty ($tLog)) { $tLog_count = count ($tLog); }
+ if ($tLog_count > 0)
{
print "<table id=\"log_table\">\n";
print " <tr>\n";
@@ -34,9 +36,9 @@ for ($i = 0; $i < sizeof ($list_domains); $i++)
print " <td>" . $PALANG['pViewlog_data'] . "</td>\n";
print " </tr>\n";
- for ($i = 0; $i < sizeof ($tLog); $i++)
+ for ($i = 0; $i < $tLog_count; $i++)
{
- if ((is_array ($tLog) and sizeof ($tLog) > 0))
+ if ((is_array ($tLog) and $tLog_count > 0))
{
$log_data = $tLog[$i]['data'];
$data_length = strlen ($log_data);
diff --git a/users/login.php b/users/login.php
index fba566c..2dc4e3d 100644
--- a/users/login.php
+++ b/users/login.php
@@ -59,8 +59,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if ($error != 1)
{
session_start();
- session_register("userid");
- $_SESSION['userid']['username'] = $fUsername;
+# session_register("userid");
+ $_SESSION['sessid']['username'] = $fUsername;
header("Location: main.php");
exit;
diff --git a/users/vacation.php b/users/vacation.php
index 8f96e54..d5cbbec 100644
--- a/users/vacation.php
+++ b/users/vacation.php
@@ -107,7 +107,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$tGoto = $row['goto'];
}
- $result = db_query ("INSERT INTO vacation (email,subject,body,domain,created) VALUES ('$USERID_USERNAME','$fSubject','$fBody','$USERID_DOMAIN',NOW())");
+ $result = db_query ("INSERT INTO vacation (email,subject,body,domain,created,active) VALUES ('$USERID_USERNAME','$fSubject','$fBody','$USERID_DOMAIN',NOW(),'1')");
if ($result['rows'] != 1)
{
$error = 1;