Location: PHPKode > projects > Yappa-ng > yappa-ng/admin_modules/admin_main.inc.php
<?php

/*
 * ***********************************************************************************************
 * Project:      yappa-ng (yet another php photo album - next generation)
 * Filename:     admin_main.inc.php
 * Type:         Include File
 * Module:       Admin-Module
 * Subcategory:  Central Admin Module Control Unit
 * Description:  Provides control for all Admin-Modules
 *               Left Admin-Navigation bar
 * ***********************************************************************************************
 * Author:       Fritz Berger <hide@address.com>
 * Copyright:    2003, 2004 Fritz Berger
 * Homepage:     http://www.zirkon.at/zirkon/scripts/yappa-ng/yappa-ng_main_eng.html
 * ***********************************************************************************************
 * $Header: /cvsroot/yappa-ng/yappa-ng/admin_modules/admin_main.inc.php,v 1.24 2005/04/25 18:01:56 zirkon13 Exp $
 * ***********************************************************************************************
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

?>

<?php

/*
 * Standard Security Check
 */

if (!defined('SecCheck')) {
	die("You Cannot Access This Script Directly - Have a Nice Day.");
}

// register_globals
if(isset($_GET['admintask'])) {
	$admintask = $_GET['admintask'];
} else {
	$admintask = "";
}
?>

<table cellspacing="0" cellpadding="5" border="0" width=100%>
<tr valign="top">
<?php
/* LEFT Album Selection Bar START ********************************************************************* */
?>
<td class="menubarCell" width=10%>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="subalbumsBar">
	<tr>
	<td class="albumCellA"><a href="<?php print $page["album_link_up"] ?>"><img src="<?php print $theme['icon_up']; ?>" border="0" <?php print $theme['icon_up_wh']; ?> alt="up"></a></td>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;logout=yes"; ?>"><b><?php print $lang_akt["logout"]; ?></b></a></td>
	</tr>


	<tr>
	<td class="albumCellB" nowrap colspan=2 align=left><?php print $lang_akt["current_album"]; ?></td>
	</tr>

	<tr>
	<td class="albumCellA">&nbsp;</td>
	<?php if ($selected_album != "") { ?>
		<td class="albumCellA"><b><?php print $selected_album; ?></b></td>
	<?php } else { ?>
		<td class="albumCellA" nowrap><b><?php print "/home"; ?></b></td>
	<?php } ?>

	</tr>

	<tr>
	<?php 
	// *** Album Info ********************************************************************************
	if ($admintask == "Info") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Info"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Info"; ?>"><b><?php print $lang_akt["admin_ainfo_hmain"]; ?></b></a></td>
	</tr>


	<tr>
	<td class="albumCellB" colspan=2 align=left><?php print $lang_akt["general_t"]; ?></td>
	</tr>

	<?php 
	// *** General Album Settings ********************************************************************************
	// no access for "upload-user" 
	if ($admin_upload_user_ok != 1) { 
		// upload user not active
		?><tr>
		<?php if ($admintask == "") { ?>
			<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
		<?php } else { ?>
			<td class="albumCellA">&nbsp;</td>
		<?php } ?>
		<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes"; ?>"><b><?php print $lang_akt["admin_main_hmain"]; ?></b></a></td>
		</tr>
	<?php }  else {
		// upload user active
		// check if access to this admin module is permitted
		// conf1 = 1: General Album Settings
		if((int)"1" & (int)$config_album['up_user_conf1'])  { ?>
			<tr>
			<?php if ($admintask == "") { ?>
				<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
			<?php } else { ?>
				<td class="albumCellA">&nbsp;</td>
			<?php } ?>
			<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes"; ?>"><b><?php print $lang_akt["admin_main_hmain"]; ?></b></a></td>
			</tr>
		<?php }
	} ?>

	<?php
	// *** Thumbnail Display Settings ********************************************************************************
	// no access for "upload-user"
	if (($admin_upload_user_ok != 1) || ((int)"2" & (int)$config_album['up_user_conf1'])) { ?>
	<tr>
	<?php if ($admintask == "Thumbs") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Thumbs"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Thumbs"; ?>"><b><?php print $lang_akt["admin_main_hthumb"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php 
	// *** Image Display Settings ********************************************************************************
	// no access for "upload-user" 
	if (($admin_upload_user_ok != 1)  || ((int)"4" & (int)$config_album['up_user_conf1'])){ ?>
	<tr>
	<?php if ($admintask == "Images") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Images"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Images"; ?>"><b><?php print $lang_akt["admin_main_himage_b"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php 
	// *** Album/Image Rating ********************************************************************************
	// no access for "upload-user"
	if (($admin_upload_user_ok != 1) || ((int)"8" & (int)$config_album['up_user_conf1'])){ ?>
	<tr>
	<?php if ($admintask == "Rating") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Rating"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Rating"; ?>"><b><?php print $lang_akt["admin_main_hrating"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** User Comments ********************************************************************************
	// no access for "upload-user"
	if (($admin_upload_user_ok != 1) || ((int)"64" & (int)$config_album['up_user_conf1'])){ ?>
	<tr>
	<?php if ($admintask == "Comments") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Comments"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Comments"; ?>"><b><?php print $lang_akt["admin_comm_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<tr>
	<td class="albumCellB" colspan=2 align=left><?php print $lang_akt["lang_spec"]; ?></td>
	</tr>

	<?php
	// *** Edit Album Description ********************************************************************************
	// no access for "upload-user" 
	if (($admin_upload_user_ok != 1) || ((int)"16" & (int)$config_album['up_user_conf1'])){ ?>
	<tr>
	<?php if ($admintask == "Description") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Description"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Description"; ?>"><b><?php print $lang_akt["admin_info_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<tr>
	<?php 
	// *** Edit Image-Captions ********************************************************************************
	if (($admin_upload_user_ok != 1) || ((int)"32" & (int)$config_album['up_user_conf1'])){
	if ($admintask == "Captions") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Captions"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Captions"; ?>"><b><?php print $lang_akt["admin_capt_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<tr>
	<td class="albumCellB" colspan=2 align=left><?php print $lang_akt["album_handling"]; ?></td>
	</tr>


	<?php 
	// *** Create New Album ********************************************************************************
	// it is possible to prevent users to access the "Create New Album" if you deselect it in the config.inc.php, section ADMIN 
	// no access for "upload-user" 
	if (($config['permit_newalbum'] != "no") &&  (($admin_upload_user_ok != 1)  || ((int)"1" & (int)$config_album['up_user_conf2']))) { ?>
	<tr>
	<?php if ($admintask == "CreateNew") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=CreateNew"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=CreateNew"; ?>"><b><?php print $lang_akt["admin_new_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<tr>
	<?php 
	// *** Upload Images ********************************************************************************
	if (($admin_upload_user_ok != 1) || ((int)"2" & (int)$config_album['up_user_conf2'])){
	if ($admintask == "Upload") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Upload"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Upload"; ?>"><b><?php print $lang_akt["admin_upload_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** Initialize Album ********************************************************************************
	if (($config['use_initialize'] != "no") &&  (($admin_upload_user_ok != 1)  || ((int)"4" & (int)$config_album['up_user_conf2']))) { ?>
		<tr>
		<?php if ($admintask == "Initialize") { ?>
			<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Initialize"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
		<?php } else { ?>
			<td class="albumCellA">&nbsp;</td>
		<?php } ?>
		<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Initialize"; ?>"><b><?php print $lang_akt["admin_init_hmain"]; ?></b></a></td>
		</tr>
	<?php } ?>

	<tr>
	<?php 
	// *** Rotate Images ********************************************************************************
	if (($admin_upload_user_ok != 1) || ((int)"8" & (int)$config_album['up_user_conf2'])){ ?>
	<tr>
	<?php
	if ($admintask == "Rotate") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Rotate"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Rotate"; ?>"><b><?php print $lang_akt["admin_rotimage_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** Delete Images ********************************************************************************
	// check access for "PowerUser"
	if (($admin_upload_user_ok != 1) || ((int)"16" & (int)$config_album['up_user_conf2'])){ ?>
	<tr>
	<?php if ($admintask == "Delete") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Delete"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=Delete"; ?>"><b><?php print $lang_akt["admin_delimage_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** Delete UserCommnets ********************************************************************************
	// check access for "PowerUser"
	if (($admin_upload_user_ok != 1) || ((int)"128" & (int)$config_album['up_user_conf2'])){ ?>
	<tr>
	<?php if ($admintask == "DelComments") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=DelComments"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=DelComments"; ?>"><b><?php print $lang_akt["admin_delcomm_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php 
	// *** Change Admin Password ********************************************************************************
	// NO access for "upload-user" - NEVER !!
	if ($admin_upload_user_ok != 1) { ?>
	<tr>
	<?php if ($admintask == "ChangeAdmPwd") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=ChangeAdmPwd"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=ChangeAdmPwd"; ?>"><b><?php print $lang_akt["admin_cpwdadmin_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** Set/Delete Userpassword ********************************************************************************
	// no access for "upload-user"
	if (($admin_upload_user_ok != 1) || ((int)"32" & (int)$config_album['up_user_conf2'])){ ?>
	<tr>
	<?php if ($admintask == "UserPasswd") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=UserPasswd"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=UserPasswd"; ?>"><b><?php print $lang_akt["admin_cpwduser_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** configure PowerUser ********************************************************************************
	// No access for "upload-user" - NEVER !!
	if (($admin_upload_user_ok != 1) && ($config['permit_uploaduser'] == "yes")) { ?>
	<tr>
	<?php if ($admintask == "UploadUser") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=UploadUser"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=UploadUser"; ?>"><b><?php print $lang_akt["admin_uploaduser_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	// *** Album Info ********************************************************************************
	// no access for "upload-user"
	if (($admin_upload_user_ok != 1) || ((int)"64" & (int)$config_album['up_user_conf2'])){ ?>
	<tr>
	<?php if ($admintask == "DelAlbum") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=DelAlbum"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=DelAlbum"; ?>"><b><?php print $lang_akt["admin_deldir_hmain"]; ?></b></a></td>
	</tr>
	<?php } ?>

	<?php
	/*
	// *** External ********************************************************************************
	// is implemented but not documented!
	<tr>
	<?php if ($admintask == "External") { ?>
		<td class="albumCellA"><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=External"; ?>"><img src="<?php print $theme['icon_forward']; ?>" border="0" <?php print $theme['icon_forward_wh']; ?> alt="forward"></a></td>
	<?php } else { ?>
		<td class="albumCellA">&nbsp;</td>
	<?php } ?>
	<td class="albumCellA" nowrap><a href="<?php print makeselflink(array("album" => $selected_album)) . "&amp;adminlogin=yes&amp;admintask=External"; ?>"><b><?php print $lang_akt["link_ext"]; ?></b></a></td>
	</tr>
	*/ ?>
</table>
</td><td class="albumCellA">

<?php

// check if the upload module is enabled in the config for the upload user
// if yes: load the upload module as default
// if no: load the info module as default
if((int)"2" & (int)$config_album['up_user_conf2'])  {
	$load_default = "admin_module_upload.inc.php";
} else {
	$load_default = "admin_module_info.inc.php";
}

// now load the selected admin module
switch ($admintask) {
	case "Info":
		include($config['path_admin_include'] . "admin_module_info.inc.php");
		break;
	case "Thumbs":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_thumbs.inc.php"));
		} else {
			// conf1 = 2: Thumbnail Display Settings
			if((int)"2" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_thumbs.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Images":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_images.inc.php"));
		} else {
			// conf1 = 4: Image Display Settings
			if((int)"4" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_images.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Rating":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_rating.inc.php"));
		} else {
			// conf1 = 8: Album/Image Rating
			if((int)"8" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_rating.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Comments":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_comments.inc.php"));
		} else {
			// conf1 = 8: Album/Image Rating
			if((int)"64" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_comments.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Description":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_edit.inc.php"));
		} else {
			// conf1 = 16: Edit Album Description
			if((int)"16" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_edit.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Captions":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_captions.inc.php"));
		} else {
			// conf1 = 32: Edit Image Captions
			if((int)"32" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_captions.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "CreateNew":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_new.inc.php"));
		} else {
			// conf2 = 1: Create New Album
			if((int)"1" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_new.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Upload":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_upload.inc.php"));
		} else {
			// conf2 = 2: Upload Images
			if((int)"2" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_upload.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Initialize":
		// if the Initializing is enabled in the global config
		if ($config['use_initialize'] != "no") {
			// check access for upload-user
			if ($admin_upload_user_ok != 1) {
				include(singleslash($config['path_admin_include'] . "admin_module_init.inc.php"));
			} else {
				// conf2 = 4: Upload Images
				if((int)"4" & (int)$config_album['up_user_conf2'])  {
					include(singleslash($config['path_admin_include'] . "admin_module_init.inc.php"));
				} else {
					include(singleslash($config['path_admin_include'] . $load_default));
				}
			}
		} elseif($admin_upload_user_ok != 1) {
			// if initialize is disabled global and NOT an uploaduser include the General Album Settings
			include(singleslash($config['path_admin_include'] . "admin_module_main.inc.php"));
		}
		break;
	case "Rotate":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_rotimage.inc.php"));
		} else {
			// conf2 = 8: Rotate Images
			if((int)"8" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_rotimage.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "Delete":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_delimage.inc.php"));
		} else {
			// conf2 = 16: Delete Images
			if((int)"16" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_delimage.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "DelComments":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_delcomments.inc.php"));
		} else {
			// conf2 = 128: Delete Comments
			if((int)"128" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_delcomments.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "ChangeAdmPwd":
		// NO access for upload-user to 'Change Admin Password'!!!
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_cpwdadmin.inc.php"));
		} else {
			include(singleslash($config['path_admin_include'] . $load_default));
		}
		break;
	case "UserPasswd":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_cpwduser.inc.php"));
		} else {
			// conf2 = 32: Set/Delete Userpassword
			if((int)"32" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_cpwduser.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "UploadUser":
		// NO access for upload-user to 'Change Admin Password'!!!
		if (($admin_upload_user_ok != 1) && ($config['permit_uploaduser'] == "yes")) {
			include(singleslash($config['path_admin_include'] . "admin_module_uploaduser.inc.php"));
		} else {
			include(singleslash($config['path_admin_include'] . $load_default));
		}
		break;
	case "DelAlbum":
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_deldir.inc.php"));
		} else {
			// conf2 = 64: Delete Album
			if((int)"64" & (int)$config_album['up_user_conf2'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_deldir.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	case "External":
		print "Link/Unlink External File!! ToDo - NotDone!";
		break;
	default:
		// check access for upload-user
		if ($admin_upload_user_ok != 1) {
			include(singleslash($config['path_admin_include'] . "admin_module_main.inc.php"));
		} else {
			// conf1 = 1: General Album Settings
			if((int)"1" & (int)$config_album['up_user_conf1'])  {
				include(singleslash($config['path_admin_include'] . "admin_module_main.inc.php"));
			} else {
				include(singleslash($config['path_admin_include'] . $load_default));
			}
		}
		break;
	}

// Now close the table again! 
?>
</td></tr></table>
<?php
//end admin
?>
Return current item: Yappa-ng