Zen Cart Logo
Forums / All Other Contributions/Addons / Admin Profiles (for v1.3.x only!) Support Thread

Admin Profiles (for v1.3.x only!) Support Thread

Views: 334,195

Results 941 to 960 of 1,242
15 Jan 2010, 4:09 PM
#941
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Admin Profiles (for v1.3.x only!) Support Thread

This sounds like normal Zen Cart behaviour and nothing to do with Admin Profiles.

Because the main menu is built from javascript, it doesn't work for users who don't have it enabled. So there is a fallback, namely that if any of the menu headings are clicked, the alt_nav page is called to list all the menu contents as per your screenshot.

Frankly it's a pain, click slightly away from where you intended and you end up where you are. I rather suspect that this will all be handled better in Zen Cart 2.0!

18 Jan 2010, 3:29 PM
#942
moomo avatar

moomo

New Zenner

Join Date:
Dec 2009
Posts:
27
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

But Javascript is enabled. I'm using the same computer to log in the different admin accounts, and the menu just works with the superuser.

18 Jan 2010, 3:51 PM
#943
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

I wonder if you're describing two different problems. Absence of pulldowns in the menu could occur if you have authorised a user to have access to some of the menus, but not authorised them to access any pages within those menus..

The menu headings stacked vertically has to be because you clicked on the a menu heading, that's the only way that you can to the alt_nav page, and it doesn't matter whether you have javascript enabled or not, this will happen and is normal (if irritating) behaviour for the current version of Zen Cart.

18 Jan 2010, 7:04 PM
#944
moomo avatar

moomo

New Zenner

Join Date:
Dec 2009
Posts:
27
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Problem fixed. I had authorized access to the menus, but hadn't checked the pages inside. The list has dissapeared now when I log in, and everything works fine. Thanks a lot for your help. :smile:

29 Jan 2010, 6:35 AM
#945
leilanddale avatar

leilanddale

New Zenner

Join Date:
Jan 2010
Posts:
69
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

I love this mod and it works perfectly. I have one question. I'm looking for one specific function. That is relative to this mod. I am the admin on the site, so I have access to all products in the cart.

What I would like is for other admins that I've selected with special permission via this mod to only have access to the products they've added. It would be awesome if that could be done.

I REALLY need this.

29 Jan 2010, 10:47 AM
#946
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

leilanddale:

What I would like is for other admins that I've selected with special permission via this mod to only have access to the products they've added. It would be awesome if that could be done.That's been covered several times before in this thread, so I won't go into detail here, you can find that above. But in summary, Admin Profiles controls which admin pages a user sees; products are accessed and manipulated within pages - quite a lot of them. So for Admin Profiles it's all or nothing.

It is possible to add code to restrict which products an individual user can manipulate, but to do it properly would require a lot of code spread thinly over a wide area, making subsequent maintenance and upgrades of your Zen Cart difficult. I suspect that it will be easier in future versions of Zen Cart, especially once the Admin area has been re-written.

29 Jan 2010, 6:45 PM
#947
newagekat avatar

newagekat

Zen Follower

Join Date:
Nov 2005
Location:
Vancouver, Canada
Posts:
151
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Kuroi:

I have been using this mod for every zen cart site I've developed. and it works great!

Currently, i have adminProfiles v1.0.7 running on ZC v1.3.8a with security patches and highly customized.

i've noticed that when a menu item is not selected, it still appears in the menu along with its children, although when clicked the page has this message:
Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.

Sorry for any inconvenience.

It did not use to be that way with adminProfiles v1.0.3. Can you suggest what i can do to ensure that access to critical areas are not viewed by the various users with limited access?

Thank you for your time.

29 Jan 2010, 8:12 PM
#948
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

newagekat:

Currently, i have adminProfiles v1.0.7 running on ZC v1.3.8a with security patches and highly customized.

i've noticed that when a menu item is not selected, it still appears in the menu along with its children, although when clicked the page has this message:
Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.

Sorry for any inconvenience.

It did not use to be that way with adminProfiles v1.0.3. Can you suggest what i can do to ensure that access to critical areas are not viewed by the various users with limited access?It's not that way in 1.0.7 either.

A bit of background. Admin Profiles has two sides, one controls access to pages, the other limits what appears in the admin menu. Both are driven by shared database files maintained through the admin control page, but otherwise function independently.

The page blocking message shows that you have Admin Profiles installed and the database part is likely to be OK. So your problem must be in the box files.

You don't say whether the page in question is part of an add-on or a core Zen Cart page, and whether it affects one page, one menu or all menu entries. But whichever is the case, the problem is likely to lie with your box files not containing the AP function call to check whether a particular item should be excluded from the menu system.

29 Jan 2010, 11:13 PM
#949
newagekat avatar

newagekat

Zen Follower

Join Date:
Nov 2005
Location:
Vancouver, Canada
Posts:
151
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Thanks for responding. Here's some more info and please note I'm no programmer.

if I prevent a user from accessing the Module menu (core files) and it's children, i unchecked the Module check box and the check boxes directly under it. I then save my changes.

when I log in as the user with limited access, I can still see the Module menu and it's children. When I click anyone of the Module listed, I get that message. In v1.0.3, the module menu item and it's children would have disappeared and the user would not be any the wiser.

Can you provide a list of the box files so I can compare the download files with with the ones I have and see if I missed something. thank you.

8 Feb 2010, 3:16 PM
#950
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

newagekat:

Can you provide a list of the box files so I can compare the download files with with the ones I have and see if I missed something.No, as that would depend on which mods you have installed and whether they have their own box files ... information that I don't have. But you can see the Admin Profiles equivalents of the default Zen Cart box files in the admin/includes/boxes folder.

10 Feb 2010, 9:19 AM
#951
crusader avatar

crusader

Zen Follower

Join Date:
Jun 2004
Posts:
98
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Hi,

An administrator who periodically does some maintainance of my site did some security upgrades recently (ZC 1.3.8a) and changed location of admin files to new path different than domain/admin/. After that Admin Profiles stopped working properly. I have added new admin in Admin Panel. I can accces Admin Profiles without any errors but when I assign permissions by ticking boxes and save changes all seems to work ok but no permisions are changed. Newly added admin can log in but no menus are available to him. Changing permissions for admins that were present in the system before upgrade also doesn't work. What should I do to get old fuctionality back?

Regards,

Crusader

10 Feb 2010, 12:19 PM
#952
cslakans avatar

cslakans

New Zenner

Join Date:
Mar 2009
Posts:
64
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Crusader:

Hi,

An administrator who periodically does some maintainance of my site did some security upgrades recently (ZC 1.3.8a) and changed location of admin files to new path different than domain/admin/. After that Admin Profiles stopped working properly. I have added new admin in Admin Panel. I can accces Admin Profiles without any errors but when I assign permissions by ticking boxes and save changes all seems to work ok but no permisions are changed. Newly added admin can log in but no menus are available to him. Changing permissions for admins that were present in the system before upgrade also doesn't work. What should I do to get old fuctionality back?

Regards,

Crusader

Maybe this thread and the the one given by DrByte can help you!

http://www.zen-cart.com/forum/showthread.php?t=138776

10 Feb 2010, 1:12 PM
#953
crusader avatar

crusader

Zen Follower

Join Date:
Jun 2004
Posts:
98
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Thanks for reply. In my case adding items in admin works ok, from description looks like this is a patch that have been applied by administrator. Is it possible that other parts of admin work ok though patch has been applied incorrectly and that's why Admin Profiles don't work?

10 Feb 2010, 2:23 PM
#954
crusader avatar

crusader

Zen Follower

Join Date:
Jun 2004
Posts:
98
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Problem solved. It just needed reading more pages in this thread. I have applied patch from page #87, post #865 sucessfully.

10 Feb 2010, 2:32 PM
#955
cslakans avatar

cslakans

New Zenner

Join Date:
Mar 2009
Posts:
64
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Crusader:

Problem solved. It just needed reading more pages in this thread. I have applied patch from page #87, post #865 sucessfully.

:clap: Hooray for you! I've been working on my admin problem for 2 full days now. :yuck: Don't think it's related to this thread tho, but searching brought me here.

30 Mar 2010, 1:49 PM
#956
onnengling avatar

onnengling

New Zenner

Join Date:
Mar 2010
Posts:
4
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Please help!!:shocking:
I received this error message when trying upload the files via SQL Query Executor:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'in:

30 Mar 2010, 2:19 PM
#957
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

onnengling:

I received this error message when trying upload the files via SQL Query Executor:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'in:
You need to post the full error message for us to be able to help. Information about what you were doing at the time and the version numbers of your Zen Cart and Admin Profile mods would help too.

30 Mar 2010, 11:22 PM
#958
onnengling avatar

onnengling

New Zenner

Join Date:
Mar 2010
Posts:
4
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Pls ignore my previous message as I had execute the step incorrectly.

I'm now stuck with Step 3 of the installation on Patch One instruction.
There are no line containing constant ICON_RESET in my admin.php file. I must have missed something.... Please help..:mellow:

I'm using Zen Cart V1.3.8a.

30 Mar 2010, 11:33 PM
#959
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

onnengling:

Pls ignore my previous message as I had execute the step incorrectly.

I'm now stuck with Step 3 of the installation on Patch One instruction.
There are no line containing constant ICON_RESET in my admin.php file. I must have missed something.... Please help..:mellow:

I'm using Zen Cart V1.3.8a.It's at line 193 give or take a line.

30 Mar 2010, 11:35 PM
#960
onnengling avatar

onnengling

New Zenner

Join Date:
Mar 2010
Posts:
4
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Additional information: I'm fiollowing Install Notes for Admin Profiles v1.0.7.1.

My admin.php file content attached:

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2006 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: admin.php 4701 2006-10-08 01:09:44Z drbyte $ // require('includes/application_top.php'); $action = (isset($_GET['action']) ? $_GET['action'] : ''); if (zen_not_null($action)) { switch ($action) { // demo active test case (zen_admin_demo()): $action=''; $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution'); zen_redirect(zen_href_link(FILENAME_ADMIN)); break; //------------------------------------------------------------------------------------------------------------------------- case 'insert': case 'save': case 'reset': $error = false; if ( ($action == 'insert') || ($action == 'reset') ){ $password_new = zen_db_prepare_input($_POST['password_new']); $password_confirmation = zen_db_prepare_input($_POST['password_confirmation']); if (strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) { $error = true; $messageStack->add(ENTRY_PASSWORD_NEW_ERROR, 'error'); } if ($password_new != $password_confirmation) { $error = true; $messageStack->add(ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING, 'error'); } } if ($error == false) { if (isset($_GET['adminID'])) $admins_id = zen_db_prepare_input($_GET['adminID']); $admin_name = zen_db_prepare_input($_POST['admin_name']); $admin_email = zen_db_prepare_input($_POST['admin_email']); $password_new = zen_db_prepare_input($password_new); $admin_level = zen_db_prepare_input($_POST['admin_level']); $password_new = zen_db_prepare_input($password_new); $sql_data_array = array( 'admin_name' => $admin_name, 'admin_email' => $admin_email, 'admin_level' => (int)$admin_level ); if ($action == 'insert') { $insert_sql_data = array('admin_pass' => zen_encrypt_password($password_new)); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); zen_db_perform(TABLE_ADMIN, $sql_data_array); $new_admin_id = zen_db_insert_id(); $admins_id = $new_admin_id; } elseif ($action == 'save') { zen_db_perform(TABLE_ADMIN, $sql_data_array, 'update', "admin_id = '" . (int)$admins_id . "'"); $db->Execute("UPDATE " . TABLE_CONFIGURATION . " set configuration_value='" . (int)$_POST['demo_status'] . "' where configuration_key='ADMIN_DEMO'"); } elseif ($action == 'reset') { $update_sql_data = array('admin_pass' => zen_encrypt_password($password_new)); $sql_data_array = array_merge($sql_data_array, $update_sql_data); zen_db_perform(TABLE_ADMIN, $sql_data_array, 'update', "admin_id = '" . (int)$admins_id . "'"); } // end action check zen_redirect(zen_href_link(FILENAME_ADMIN, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'adminID=' . $admins_id)); } // end error check //echo $action; // zen_redirect(zen_href_link(FILENAME_ADMIN, (isset($_GET['page']) ? 'page=' . '&' : '') . 'adminID=' . $admins_id)); break; //------------------------------------------------------------------------------------------------------------------------- case 'deleteconfirm': $new_admin_id = zen_db_prepare_input($_GET['adminID']); $db->Execute("delete from " . TABLE_ADMIN . " where admin_id = '" . (int)$new_admin_id . "'"); zen_redirect(zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'])); break; //------------------------------------------------------------------------------------------------------------------------- } // end switch } // end zen_not_null ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS"> <script language="javascript" src="includes/menu.js"></script> <script language="javascript" src="includes/general.js"></script> <script type="text/javascript"> <!-- function init() { cssjsmenu('navbar'); if (document.getElementById) { var kill = document.getElementById('hoverJS'); kill.disabled = true; } } // --> </script> </head> <body onLoad="init()"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <!-- body_text //--> <td width="100%" valign="top"> <?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table> <?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td width="10%" class="dataTableHeadingContent"><?php echo TABLE_HEADING_ADMINS_ID; ?></td> <td width="35%" class="dataTableHeadingContent"><?php echo TABLE_HEADING_ADMINS_NAME; ?></td> <td width="35%" class="dataTableHeadingContent"><?php echo TABLE_HEADING_ADMINS_EMAIL; ?></td> <td width="20%" class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $admins_query_raw = "select admin_id, admin_name, admin_email, admin_pass, admin_level from " . TABLE_ADMIN . " order by admin_name"; $admins_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $admins_query_raw, $admins_query_numrows); $admins = $db->Execute($admins_query_raw); while (!$admins->EOF) { if ((!isset($_GET['adminID']) || (isset($_GET['adminID']) && ($_GET['adminID'] == $admins->fields['admin_id']))) && !isset($adminInfo) && (substr($action, 0, 3) != 'new')) { $adminInfo = new objectInfo($admins->fields); } if (isset($adminInfo) && is_object($adminInfo) && ($admins->fields['admin_id'] == $adminInfo->admin_id)) { echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $admins->fields['admin_id'] . '&action=edit') . '\'">' . "\n"; } else { echo '<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $admins->fields['admin_id'] . '') . '\'">' . "\n"; } ?>
	<td class="dataTableContent"><?php echo $admins->fields['admin_id']; ?></td>
	<td class="dataTableContent"><?php echo $admins->fields['admin_name']; ?></td>
	<td class="dataTableContent"><?php echo $admins->fields['admin_email']; ?></td>
	<td class="dataTableContent" align="right">
<?php echo '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $admins->fields['admin_id'] . '&action=edit') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>'; ?> <?php echo '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $admins->fields['admin_id'] . '&action=delete') . '">' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . '</a>'; ?> <?php echo '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $admins->fields['admin_id'] . '&action=resetpassword') . '">' . zen_image(DIR_WS_IMAGES . 'icon_reset.gif', ICON_RESET) . '</a>'; ?>
	</td>
</tr> <?php $admins->MoveNext(); } ?>
<tr>
	<td colspan="2">
<table border="0" width="100%" cellspacing="0" cellpadding="4"> <tr> <td class="smallText" valign="top"><?php echo $admins_split->display_count($admins_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ADMINS); ?></td> <td class="smallText" align="right"><?php echo $admins_split->display_links($admins_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td> </tr> </table>
	</td>
</tr>
<?php if (empty($action)) { ?>
<tr>
	<td align="right" colspan="4" class="smallText">
<?php echo '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=new') . '">' . zen_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?>
	</td>
</tr>
<?php } ?> </table> </td> <?php $heading = array(); $contents = array(); switch ($action) { //------------------------------------------------------------------------------------------------------------------------- case 'new': $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_ADMIN . '</b>'); $contents = array('form' => zen_draw_form('new_admin', FILENAME_ADMIN, 'action=insert', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_INTRO); $contents[] = array('text' => '<br>' . TEXT_ADMINS_NAME . '<br>' . zen_draw_input_field('admin_name', '', zen_set_field_length(TABLE_ADMIN, 'admin_name', $max=30)) ); $contents[] = array('text' => '<br>' . TEXT_ADMINS_EMAIL . '<br>' . zen_draw_input_field('admin_email', '', zen_set_field_length(TABLE_ADMIN, 'admin_email', $max=30)) ); $contents[] = array('text' => '<br>' . TEXT_ADMINS_PASSWORD . '<br>' . zen_draw_password_field('password_new', '', zen_set_field_length(TABLE_ADMIN, 'admin_pass', $max=20)) ); $contents[] = array('text' => '<br>' . TEXT_ADMINS_CONFIRM_PASSWORD . '<br>' . zen_draw_password_field('password_confirmation', '', zen_set_field_length(TABLE_ADMIN, 'admin_pass', $max=20)) ); $contents[] = array('text' => zen_draw_hidden_field('admin_level', '1') ); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_save.gif', IMAGE_SAVE) . '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $_GET['adminID']) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; //------------------------------------------------------------------------------------------------------------------------- case 'edit': $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_ADMIN . '</b>'); $contents = array('form' => zen_draw_form('edit_admin', FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=save', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $adminInfo->admin_id . '</b> - ' . $adminInfo->admin_name . '</b>'); $contents[] = array('text' => '<br>' . TEXT_ADMINS_NAME . '<br>' . zen_draw_input_field('admin_name', $adminInfo->admin_name, zen_set_field_length(TABLE_ADMIN, 'admin_name', $max=30)) ); $contents[] = array('text' => '<br>' . TEXT_ADMINS_EMAIL . '<br>' . zen_draw_input_field('admin_email', $adminInfo->admin_email, zen_set_field_length(TABLE_ADMIN, 'admin_email', $max=30)) ); $admin_current = $db->Execute("select admin_level from " . TABLE_ADMIN . " where admin_id='" . $_SESSION['admin_id'] . "'"); /* if ($admin_current->fields['admin_level'] == '1') { $contents[] = array('text' => '<br>' . TEXT_ADMIN_LEVEL_INSTRUCTIONS); $contents[] = array( 'text' => '<strong>' . TEXT_ADMINS_LEVEL . '</strong><br>' . zen_draw_input_field('admin_level', $adminInfo->admin_level, zen_set_field_length(TABLE_ADMIN, 'admin_level')) ); */ $demo_status= zen_get_configuration_key_value('ADMIN_DEMO'); switch ($demo_status) { case '0': $on_status = false; $off_status = true; break; case '1': $on_status = true; $off_status = false; break; default: $on_status = false; $off_status = true; break; } if ($on_status == true) { $contents[] = array('text' => '<br>' . TEXT_ADMIN_DEMO); $contents[] = array('text' => '<strong>' . TEXT_DEMO_STATUS . '</strong><br>' . zen_draw_radio_field('demo_status', '1', $on_status) . ' ' . TEXT_DEMO_ON . ' ' . zen_draw_radio_field('demo_status', '0', $off_status) . ' ' . TEXT_DEMO_OFF); } else { $contents[] = array('text' => zen_draw_hidden_field('demo_status', 0) ); } $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_save.gif', IMAGE_SAVE) . '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; //------------------------------------------------------------------------------------------------------------------------- case 'resetpassword': $heading[] = array('text' => '<b>' . TEXT_HEADING_RESET_PASSWORD . '</b>'); $contents = array('form' => zen_draw_form('reset_password', FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=reset', 'post', 'enctype="multipart/form-data"') . zen_draw_hidden_field('admin_name', $adminInfo->admin_name) . zen_draw_hidden_field('admin_email', $adminInfo->admin_email) . zen_draw_hidden_field('admin_level', $adminInfo->admin_level)); $contents[] = array('text' => TEXT_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $adminInfo->admin_id . '</b> - ' . $adminInfo->admin_name . '</b>'); $contents[] = array('text' => '<br>' . TEXT_ADMINS_PASSWORD . '<br>' . zen_draw_password_field('password_new', '', zen_set_field_length(TABLE_ADMIN, 'admin_pass', $max=25)) ); $contents[] = array('text' => '<br>' . TEXT_ADMINS_CONFIRM_PASSWORD . '<br>' . zen_draw_password_field('password_confirmation', '', zen_set_field_length(TABLE_ADMIN, 'admin_pass', $max=25)) ); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_save.gif', IMAGE_SAVE) . '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; //------------------------------------------------------------------------------------------------------------------------- case 'delete': $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_ADMIN . '</b>'); $contents = array('form' => zen_draw_form('delete_admin', FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $adminInfo->admin_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; //------------------------------------------------------------------------------------------------------------------------- default: //------------------------------------------------------------------------------------------------------------------------- if (isset($adminInfo) && is_object($adminInfo)) { $heading[] = array('text' => '<b>' . $adminInfo->admin_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a><a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=resetpassword') . '">' . zen_image_button('button_reset_pwd.gif', IMAGE_RESET) . '</a><a href="' . zen_href_link(FILENAME_ADMIN, 'page=' . $_GET['page'] . '&adminID=' . $adminInfo->admin_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br /><a href="' . zen_href_link(FILENAME_ADMIN_CONTROL, 'adminID=' . $adminInfo->admin_id) . '">' . zen_image_button('button_edit_permissions.gif', IMAGE_PERMISSIONS) . '</a>'); } break; //------------------------------------------------------------------------------------------------------------------------- } // end switch action if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { echo '<td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '</td>' . "\n"; } ?>
</tr>
</table>
	</td>
<!-- body_text_eof //-->
</tr>
</table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Thank you.