SF.net SVN: postfixadmin: [256] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2007-12-02 19:23:14
|
Revision: 256 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=256&view=rev Author: christian_boltz Date: 2007-12-02 11:23:08 -0800 (Sun, 02 Dec 2007) Log Message: ----------- common.php - define('POSTFIXADMIN', 1) templates/*.php - check if POSTFIXADMIN is defined to prevent direct access to the template files Modified Paths: -------------- trunk/common.php trunk/templates/admin_create-admin.php trunk/templates/admin_create-domain.php trunk/templates/admin_edit-admin.php trunk/templates/admin_edit-domain.php trunk/templates/admin_list-admin.php trunk/templates/admin_list-domain.php trunk/templates/admin_search.php trunk/templates/broadcast-message.php trunk/templates/create-alias.php trunk/templates/create-mailbox.php trunk/templates/edit-alias.php trunk/templates/edit-mailbox.php trunk/templates/edit-vacation.php trunk/templates/fetchmail.php trunk/templates/footer.php trunk/templates/header.php trunk/templates/index.php trunk/templates/list-virtual.php trunk/templates/login.php trunk/templates/main.php trunk/templates/menu.php trunk/templates/message.php trunk/templates/overview-get.php trunk/templates/password.php trunk/templates/search.php trunk/templates/sendmail.php trunk/templates/users_edit-alias.php trunk/templates/users_login.php trunk/templates/users_main.php trunk/templates/users_menu.php trunk/templates/users_password.php trunk/templates/users_vacation.php trunk/templates/viewlog.php Modified: trunk/common.php =================================================================== --- trunk/common.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/common.php 2007-12-02 19:23:08 UTC (rev 256) @@ -16,6 +16,9 @@ * All pages should include this file - which itself sets up the necessary * environment and ensures other functions are loaded. */ + +define('POSTFIXADMIN', 1); # checked in included files + $incpath = dirname(__FILE__); (ini_get('magic_quotes_gpc') ? ini_set('magic_quotes_runtime', '0') : '1'); (ini_get('magic_quotes_gpc') ? ini_set('magic_quotes_sybase', '0') : '1'); Modified: trunk/templates/admin_create-admin.php =================================================================== --- trunk/templates/admin_create-admin.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_create-admin.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="create_admin" method="post"> <table> Modified: trunk/templates/admin_create-domain.php =================================================================== --- trunk/templates/admin_create-domain.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_create-domain.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="create_domain" method="post"> <table> Modified: trunk/templates/admin_edit-admin.php =================================================================== --- trunk/templates/admin_edit-admin.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_edit-admin.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="alias" method="post"> <table> Modified: trunk/templates/admin_edit-domain.php =================================================================== --- trunk/templates/admin_edit-domain.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_edit-domain.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="edit_domain" method="post"> <table> Modified: trunk/templates/admin_list-admin.php =================================================================== --- trunk/templates/admin_list-admin.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_list-admin.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php if (sizeof ($list_admins) > 0) { Modified: trunk/templates/admin_list-domain.php =================================================================== --- trunk/templates/admin_list-domain.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_list-domain.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="overview"> <form name="overview" method="post"> <select name="fUsername" onChange="this.form.submit();"> Modified: trunk/templates/admin_search.php =================================================================== --- trunk/templates/admin_search.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/admin_search.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php require(dirname(__FILE__) . '/search.tpl'); Modified: trunk/templates/broadcast-message.php =================================================================== --- trunk/templates/broadcast-message.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/broadcast-message.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="broadcast-message" method="post"> <table> Modified: trunk/templates/create-alias.php =================================================================== --- trunk/templates/create-alias.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/create-alias.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="alias" method="post"> <table> Modified: trunk/templates/create-mailbox.php =================================================================== --- trunk/templates/create-mailbox.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/create-mailbox.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="mailbox" method="post"> <table> Modified: trunk/templates/edit-alias.php =================================================================== --- trunk/templates/edit-alias.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/edit-alias.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="alias" method="post"> <table> Modified: trunk/templates/edit-mailbox.php =================================================================== --- trunk/templates/edit-mailbox.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/edit-mailbox.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="mailbox" method="post"> <table> Modified: trunk/templates/edit-vacation.php =================================================================== --- trunk/templates/edit-vacation.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/edit-vacation.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <script type="text/javascript"> function newLocation() { Modified: trunk/templates/fetchmail.php =================================================================== --- trunk/templates/fetchmail.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/fetchmail.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php $headers=array(); Modified: trunk/templates/footer.php =================================================================== --- trunk/templates/footer.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/footer.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="footer"> <a target="_blank" href="http://postfixadmin.com/">Postfix Admin <?php print $version; ?></a> | Modified: trunk/templates/header.php =================================================================== --- trunk/templates/header.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/header.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php @header ("Expires: Sun, 16 Mar 2003 05:00:00 GMT"); @header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT"); Modified: trunk/templates/index.php =================================================================== --- trunk/templates/index.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/index.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php // // Postfix Admin Modified: trunk/templates/list-virtual.php =================================================================== --- trunk/templates/list-virtual.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/list-virtual.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="overview"> <form name="overview" method="post"> <select name="fDomain" onChange="this.form.submit();"> Modified: trunk/templates/login.php =================================================================== --- trunk/templates/login.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/login.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="login"> <form name="login" method="post"> <table id="login_table" cellspacing="10"> Modified: trunk/templates/main.php =================================================================== --- trunk/templates/main.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/main.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="main_menu"> <table> <tr> Modified: trunk/templates/menu.php =================================================================== --- trunk/templates/menu.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/menu.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php function _menulink ($href, $title, $submenu = "") { if ($submenu != "") $submenu = "<ul><li><a target='_top' href='$href'>$title</a>$submenu</li></ul>"; Modified: trunk/templates/message.php =================================================================== --- trunk/templates/message.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/message.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1 +1,2 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <?php print $tMessage; ?> Modified: trunk/templates/overview-get.php =================================================================== --- trunk/templates/overview-get.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/overview-get.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="overview"> <form name="overview" method="get"> <select class="flat" name="domain" onChange="this.form.submit();"> Modified: trunk/templates/password.php =================================================================== --- trunk/templates/password.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/password.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="mailbox" method="post"> <table> Modified: trunk/templates/search.php =================================================================== --- trunk/templates/search.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/search.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="overview"> <form name="search" method="post" action="search.php"> <table width=750><tr> Modified: trunk/templates/sendmail.php =================================================================== --- trunk/templates/sendmail.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/sendmail.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="mailbox" method="post"> <table> Modified: trunk/templates/users_edit-alias.php =================================================================== --- trunk/templates/users_edit-alias.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_edit-alias.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="alias" method="post"> <table> Modified: trunk/templates/users_login.php =================================================================== --- trunk/templates/users_login.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_login.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="login"> <form name="login" method="post"> <table id="login_table" cellspacing="10"> Modified: trunk/templates/users_main.php =================================================================== --- trunk/templates/users_main.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_main.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="main_menu"> <table> <tr> Modified: trunk/templates/users_menu.php =================================================================== --- trunk/templates/users_menu.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_menu.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="menu"> <ul> <li><a target="_top" href="<?php print $CONF['user_footer_link']; ?>"><?php print $PALANG['pMenu_main']; ?></a></li> Modified: trunk/templates/users_password.php =================================================================== --- trunk/templates/users_password.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_password.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="alias" method="post"> <table> Modified: trunk/templates/users_vacation.php =================================================================== --- trunk/templates/users_vacation.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/users_vacation.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="edit_form"> <form name="vacation" method="post"> <table> Modified: trunk/templates/viewlog.php =================================================================== --- trunk/templates/viewlog.php 2007-12-02 16:54:49 UTC (rev 255) +++ trunk/templates/viewlog.php 2007-12-02 19:23:08 UTC (rev 256) @@ -1,3 +1,4 @@ +<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?> <div id="overview"> <form name="overview" method="post"> <select name="fDomain" onChange="this.form.submit();"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |