Fixed it. Accidentally unselected admin_control and had to reinsert it using SQL Query.
Printable View
Can you please tell me which SQL commands you used to fix it ?
Another way to make database repairs like this is to go into your SQL server console, if you have one. A common one for MySQL is phpMyAdmin. As part of that, there is an ability to browse a database and perform hand edits. There are different ways to get there, but many site will have it under the "CPanel" web site control console.
The first time I installed Profiles, I knew I needed the user with ID = 1 to be an Admin level user, and I was ready for that. What I didn't know was, they'd changed the password on that account! Everything was locked out! I went into phpMyAdmin and rearranged the user IDs to change the user ID on my account to 1. Problem solved!
I have installed profiles before and it works. However now I have an issue where the interface comes up, I can tick the boxes and save but next time I visit the user's permissions nothing is ticked.
Logging on as the user, nothing shows up in the menus either.
I did enact the security recommendations some time back to change the admin folder name. So, I renamed it back to admin (with the app cfg changes) but profiles still does not work.
Any ideas?
hey you guys.I could not find a new thread button so i will put my store here.
I uploaded the adminprofile package and now i get this error:
Parse error: syntax error, unexpected '}' in /admin/includes/boxes/modules_dhtml.php on line 46.
my line 46 is totally blank.
Can anybody help me out.?
thanks
This works great. But how can I do this with the orders, to prevent the users from deleting orders, go to packing slip and invoice.
It is about this code in orders.php
The red code I want to secureCode:$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete', 'NONSSL') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . zen_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . zen_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . zen_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>');
$contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . zen_date_short($oInfo->date_purchased));
$contents[] = array('text' => '<br />' . $oInfo->customers_email_address);
$contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $oInfo->ip_address);
if (zen_not_null($oInfo->last_modified)) $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . zen_date_short($oInfo->last_modified));
$contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
$contents[] = array('text' => '<br />' . ENTRY_SHIPPING . ' ' . $oInfo->shipping_method);
I have a zencart 1.38a .it have be set admin profiles, install ok. I can enter admin control home,but i can'nt set any .enter :tool/ admin setting.(there is one user of admin)/permission, all item have be select.but i can'nt change it. why ,how to get admin permission ,pl help!
Hi all :-) This is my first post here :-) I'am trying to install this mod and it all go's well if I leave the admin folder name as admin, but if i try to change the name of the admin folder either before I install or after I install the mod, I cant log in to the admin page as it redirects me to a Url with admin as the name of the folder and not the name I have made up for the admin folder ? this is after I have put my login detals in and press submit. Not to sure where I am going wrong here ? But any help or input would be great :-) Thanks for the help guys :-)
Although I havent tried this with any other than "admin" as the folder name, but my 1st question would be,
Did you change the config files to reflect the new name of the admin folder? :smile:
Thanks for the reply :-) Yes i have tryed it with the names changed in the config files, but no change :-( My only worry is that the install info says that you should change the admin folder name, but it seems that some ppl dont change the name of the admin folder.
:lamo:Hi all,
I have tried to install admin profiles in a German version of Zen Cart 1.3.8A, but this has failed. Indeed, the users page comes well, but the updates cannot be saved. The superadministrator can thereby open also no more folders. My Zen Cart version is completely reinstalled, without some updates and installed plug-ins. I have done a complete code comparison and have summarized all code paragraphs into a PDF file to find out whether I myself can find the cause. But I am too new in Zen Cart and know not enough in his API. Nevertheless, I would like to run with pleasure your Admin tool in the German version of Zen Cart. I hope, you can help me there. You can download the PDF file with the comparative code paragraphs under:
http://downloads.ateliershop.de/codeCompare.pdf (7,1 MB)
http://downloads.ateliershop.de/codeCompare.pdf.zip (6,1 MB)
With regards and Happy New Year
Tilopa
Hi everyone,
I ve installed the module on an new fresh zen cart installation ,following the instructions , and I ve got this error
1146 Table 'user-mysite.admin_allowed_categories' doesn't exist
in:
[select admin_id from admin_allowed_categories where categories_id = '0']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Does anyone know what i do wrong?
Best wishes for the 2010 to everyone!
Thanks in advance.
@Russell Sprout
This mod doesn't care what you admin is called. i have it installed on multiple client sites, all of which have their Admins renamed (and all to different things).
Provided that you renamed the files in the release package to reflect your new Admin name, then your problem must lie elsewhere.
Admin Profiles doesn't have a table called that or any reference to it.
I suspect that you have installed the mod that attempts to extend this mod into a new area but unfortunately didn't do so very well, and the documentation wasn't changed leaving the impression that it was this mod.
There is some discussion of it earlier in the thread. But in summary, the author appears to have been abandoned the attempt and I'm not aware of any support for it.
I just installed this mod, however there is something missing in the admin>customers menu.
Before installation:
Customers
Orders
Group Pricing
Paypal IPN
Subscription Manager
Add Tracking ID
After installation:
Customers
Group Pricing
Paypal IPN
It disappears whenever the "boxes" folder was upload to the server.
Even if I didn't overwrite the "boxes" folder (admin\includes\boxes) and login as ID #1 admin, I still couldn't access to the missing menus and being denied.
How to fix this?
JC,
You have some other add-on modules loaded. They need their "box" files edited. There is a file "updating box files (a step-by-step guide).txt" included in the installation package. It explains how to edit the box files for other add-ons so they'll work with Admin Profiles.
Hope that helps.
BTW. If anyone knows where I can find instructions for making box files for add-ons that don't come with them, please let me know.
Thanks
Hi guys I keep on having this same problem when i open from the admin the categories :
1146 Table 'rufuskat_rufuskateshop.admin_allowed_categories' doesn't exist
in:
[select admin_id from admin_allowed_categories where categories_id = '0']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Anyone could help?
Many thanks!
I have installed the patch sql, the add admin from the module and then add admin from extras patched files.
In configure.php I have
define('DB_PREFIX', '');
.
.
define('DB_DATABASE', 'rufuskat_rufuskateshop');
Should i make some changes on my installation in this case?
I understand that all the users have made this questions thousand times but I'm trying to find a solution for the problem and install the module . And the first Line is changed how you can see: 1146 Table 'rufuskat_rufuskateshop.admin_allowed_categories'.
I understand just now that the problem is when i upload the patch. This is the problem .
ERROR: Cannot create table admin_allowed_pages because it already exists
Warning Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
Do you have any advice?
Thanks
Hi,
I am using the latest versions of both zencart and Admin profiles (as of a few hours ago... LOL)
This is my 1st add-on - I have read thru most of this thread... ugh
It looks like I have installed everything correctly. I am using admin 1 and I can add admins and set permissions.
But when I sign in with the new admins(I am using firefox for me and chrome for the new admin) I can only see the main admin page. There are no drop down menus. This is the page that shows the stats. (I enabled everything - so that they would have full access - I was trying to add just product/category)
I started off adding only a few things and nothing changed - so that is why I went with adding everything - figured something would show up....
I still have full access to everything in my main admin - no error messages etc
Someone helped me figure this out.... there are menu boxes to select too.....
I have installed the Admin Profiles and now the admin area is a list of options when I log in with any user that is not a superuser.
The admin directory was not modified in any way except for the installation of the spanish language.
I need help, please.
I didn't express myself well. I tried to attach a screen capture but I don't know how, it asks for a URL, but the image is in my hard drive.
The problem is that the menu with "configuration", "catalogue", "tools" shows as a vertical list of options. And, nothing happens when you click on them. I also realized just now, that this menu also shows up horizontally as it should be, but ABOVE the powered by zen cart image. When you rollover no expandable menu shows up. And nothing happens when you click on anything.
I am using Zen Cart version 1.3.8, and the Admin Profiles is 1.0.7.1 I believe, from the folder named admin_profiles_v1_0_7_1
When I upload the sql patch in the admin area i got the problem that you can see in the image I upload .
Do you know how to solve it?
Thanks
Do you know how to give permission to an user admin to a restricted template?
The superdomain can access and edit all the templates while other users can only access to one template.
I found out how to upload the screen capture of my problem. This is the list I am talking about and the navigation above the "powered by zen cart" image:
http://www.zen-cart.com/forum/attach...1&d=1263484642
Please, could someone help me with this. The screen capture is the one from the previous post.
Quote:
The problem is that the menu with "configuration", "catalogue", "tools" shows as a vertical list of options. And, nothing happens when you click on them. I also realized just now, that this menu also shows up horizontally as it should be, but ABOVE the powered by zen cart image. When you rollover no expandable menu shows up. And nothing happens when you click on anything.
I am using Zen Cart version 1.3.8, and the Admin Profiles is 1.0.7.1 I believe, from the folder named admin_profiles_v1_0_7_1
Is the URL in the address bar something like http://yoursiteurl.com/admin/alt_nav.php and if you hover over the menu at the top, do the menu items drop down? Also, do you have javascript enabled?
Yest, The URL is something likeQuote:
Is the URL in the address bar something like http://yoursiteurl.com/admin/alt_nav.php and if you hover over the menu at the top, do the menu items drop down? Also, do you have javascript enabled?
http://yoursiteurl.com/mystore/admin/alt_nav.php
And Javascript is enabled. In fact, the admin works just fine if I sign in as the superuser. The problem just happens for the non-superuser admins.
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!
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.
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.
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:
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.
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.
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.
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.
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.
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
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?
Problem solved. It just needed reading more pages in this thread. I have applied patch from page #87, post #865 sucessfully.
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:
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.
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.
Why are you cluttering the forum with unnecessary code? The line is there as described in the installation instructions. I suggest that you try Ctrl-F (or Command-F on a Mac) in whatever editor you're using, put in the string ICON_RESET, and it will take you straight there.
:oops:
Sorry. I had read the word wrongly and also not aware that code is so long...
I've now managed to find the line & completed the installation instruction. It works.
Thank you very much...
Hi,
I tried looking through this forum but am having a hard time finding an answer to my problem; perhaps someone can help me.
I have two Admin profiles set up, with IDs of 6 and 8, meaning they're not the original Admin profile. I was hoping to use one of the two as the main admin profile, but at some point, some of the permissions were deselected for that user. So now, both admin user accounts do not have access to modify admin permissions, and I can't access about 1/2 of my admin panel because of deselected permissions. Is there a way to edit permissions in an actual file on the server, or a way to reset my admin profiles so they can access all of the Admin panel?
Thank you.
Eric
Zencart version: 5.1.12
Anyone?
Here's one quick solution. You can go to your MySQL phpMyAdmin console and edit the ID 0 user profile to some other number. Then edit wither the #6 or 7 to 0. You should be able to do everything.
Unfortunately when I go in my MySQL phpmyAdmin, looking under Admin there's only one user that appears, and it's not one of the two that appear when I'm logged into zencart Admin section. I tried logging in using this admin but zencart wouldn't accept it. Am I looking in the wrong section? This is the only place I could find to edit the Admin level status.
Thanks.
After Admin profile installed sucessfully, No effect in database / changes after click the Update button.
:frusty:
It sounds as though you're looking in the wrong database. If you see two admins via Admin Profiles and you login with a third, there must be at least three admins listed in the admin table of your store's database, otherwise AP would have nowhere to pull the information from.
ZC Security patch is not installed, but Admin Profiles patch is. I looked deeper & apparently there are two databases. The two users I mentioned earlier (IDs 6 and 8) that appear in Zencart's admin are in a separate database from what I mentioned earlier.
I changed the Admin ID to 1 for the profile that doesn't appear in Zencart Admin, and changed my main Admin login to 0 as bbsbcastle mentioned above. Unfortunately, when I log in as that user after that, none of the Admin menu appears. Changing that admin ID back to 6 shows some all menus and allows access to some things, but the ID as 0 cuts access off. Any ideas?
Thank you for your guidance.
The problem is after install Admin Profile, I logged in as admin (admin_id=1) and tried assigning rights to other admins.
After select menu and submenu rights to the admin I clicked on the Save Changes button and there was no rights assigned to that admin.
This is happened because of rewrite rule applied to the website.
Solution:
Page Name: admin/admin_control.php
Replaced
<form id="profileBoxes" name="profileBoxes" action="admin_control.php?adminID=<?php echo $adminID; ?>&action=saver" method="post">
with
<?php echo zen_draw_form('profileBoxes', FILENAME_ADMIN_CONTROL, 'adminID=' . $adminID . '&action=save', 'post', 'id="profileBoxes"', 'true'); ?>
Now it works! :)
Thanks!
I'm not a programmer but I've been designing for 7 years and have never had an issue like I'm having with this addon. When I installed Admin Profiles, my entire admin went out and I get a message saying:
"1146 Table 'eugenio60_IC_20100413_160113.zen_admin_menu_headers' doesn't exist
in:
[select id from zen_admin_menu_headers where header = 'Configuration']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields."
Now to ME....common sense would say that upon uploading the new files...nothing would change except for the actual permissions box with the menu "Tools -> Admin Profiles" (or where ever it was designed to be located.) And that AFTER they are uploaded...THEN you would assign permissions to the different profiles. But this SOB blocked me out right after uploading! Immediately after the FTP finished, I refreshed my admin tab and voila...this message above. I have searched in this thread for a solution under several key terms (because unfortunately I don't have enough time in my life to read all 97 pages of opinions) and I have seen many people with the same problem, however the solutions posted for them were not related to my particular problem.
Can someone point me in the direct direction or at least tell me where in the world I can get the original files for zen cart? I ask for original files because apparently, the admin .php files for Admin Profiles don't like to go back when you overright them with the backup files you make before installation.
This looks to me more like using an older version of Admin Profiles (i.e. anything prior to 1.0.7.1 on a site that has had the Zen Cart security patch for the admin applied. 1.0.7.1 was release in June of last year and already includes the "solution" that you posted.
This is an installation error, and everything else that you posted is irrelevant until the original error is fixed, e.g. putting back your admin.php file won't make any difference as your site is tripping over before it gets there, nor are you able to access the main Admin Profiles functions (so probably would be wise not to get over critical until you've actually installed the mod properly and seen them).
Did you do step 1 of the installation instructions?
If so, did you use the Zen Cart Install SQL Patch facility?
You're probably right about me trying not to be so critical...I guess the steps are not quite specific enough for me to understand.
As far as doing step 1, I THOUGHT I did...but it never said which admin->settings to modify. Is it talking about making these changes to the LIVE admin of the site, or an admin file that came with this module's download?
As far as the "Zen Cart Install SQL Patch facility" I'm not sure I know what you're referring to. Zen Cart and osCommerce are two of the shopping cart options available inside of my hosts' cPanel. I just choose which one I want and click an install button and voila...I go to the url to log in to admin. Not sure what a SQL Patch facility is and I've never written tables or anything that makes up DB's.
Is this something I have to get a programmer to do? Cause if I'm oblivious to the very first step...there's a high chance I'm gonna fail this horribly!!! lol :shocking:
Take a deep breath. This sound like a confidence issue more than anything else. You're in an unfamiliar place dealing with unfamiliar vocabulary.
If you've just installed Zen Cart then you probably only have one admin user, and their ID is probably 1. Step starts by asking you to to verify this to avoid the risk of awkwardness later.
You do so by logging into the Admin area and then finding the Admin Settings option on the Tools menu.
Provided that you are doing this as user one, you then find the Install SQL Patch facility on the same Tools menu in the Admin. From there you can browse to and run the SQL installation file.
This method is recommended as it's the easiest for new users. It avoids problems with database prefixes for example. But if you are unable to get into your Admin because of steps taken ealier, then we'll need to get into that - but even so, it's really not too difficult, and you'll learn at every step of the way.
Hello guys!
Nice work with this mod, but I have a problem.
I've installed correctly the mod in my website.
Now when I enter in the admin area, with my user and also with another, the configuration drop-down menu is visible, but when I go over with the mouse no option are listened, so I can't access any of the configuration functionality.
All the other menù like catalog or tools are correctly visible and works.
I've readed this thread and I've checked the category menù and also all is content in the admin profiles, but nothing changed.
Please,m can you help me?
Thank you
Alessandro
Solved it, it was a problem with extra modules and second lenguage I think, anyway now it is ok!
thank you
Alessandro
I was installing the Admin_Profiles to 3 carts (1.3.8) with no other admin add-ons.
The first store went well and works fine. However, I got interrupted and confused with the 2nd and 3rd stores and overwrote the files with one without first applying the patch.
When I tried to log-in, it gave me messages that it couldn't find the proper tables.
Using PHPMyAdmin, I was able to run the patch to create the proper tables. Now, when I try to log-in, I get this error:
1054 Unknown column 'admin_id' in 'field list'
in:
[select admin_id from zen_admin_visible_headers where header_id = '1']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Now that I have 'stepped in it', how can I fix it?
Prompt help is greatly appreciated!
OK... I think I have muddled my way through...
It seems that the "zen_" prefix is added to tables when created via the Admin's SQL Patch module. So I got the table names corrected using MyPHPAdmin.
However, the same prefix does NOT apply to field names.
By correcting this, I was able to log-in, but the profile functions did not work. Admin #1 was able to access everything but could not make the permissions work. All other logins only saw the home page - unable to navigate - no menu headers are visible...
However since Admin #1 was functioning, I patched the system via the admin tools - (as I should have originally).
NOW IT WORKS!
Hopefully, if any other knuckleheads repeat my folly, they can find this thread and save themselves a lot of grief!
Okey doke, our webhost is probably going to be switching to php 5.3 shortlyish, (hopefully after the 1.3.9 release), is anyone on here running this on a php 5.3 server?
I did check the download page for this mod for php 5.3 compatibility, but it is listed as "unknown or n/a"
My website got hacked last night. I had to restore my html files back to a version before I installed admin profiles. I also restored by database file back to a recent date after admin profiles was installed. I couldn't log on to the admin section so I used the script in the tutorials section to reset the account to username Admin password admin. I can now get into the admin area but none of the tabs are available including tools>admin setup. So I can't change usernames or passwords. I tried to install admin profiles again but of course I can't run the mysql script because I don't have access to that tab.
I noticed that the hacker had gained access to the database and had changed the username and password to the main administrator account. I tried to manually change the username and password using PhpMyAdmin in the admin table.
Is there a way to "uninstall" admin profiles or some other way to gain access to the admin features?
OK,
I figured it out. I was able to rerun the sql patch using cPanel, then PhpMyAdmin. I pasted the sql code from the patch file into the query box and ran it. After that I had to resend a password using that feature on the login screen but once I used the new password it emailed me I was in with full privileges. All the other users were reset with no privileges so I had to reset them all.
thanks, i had same problem. For some reason Firezilla didn't upload the extra_datafile folder. Go figure!
I've looked and don't see this. I apologize if I missed it.
I have AP v1.0.7.1 installed. Will this work with the new VC 1.3.9? If not, is there a newer version that will?
Thanks
hi
im trying to install ap automatic with zc installation i searched for the answer but cant find it
i rename the install file to mysql_install_admin_profiles.sql
and put it in zc_install\sql\plugins
after installation i see in phpmyadmin that the table structure are created but the data is not populated, i even tried to split the install file to to parts one for tables and other for insert data, still no luck
what im doing wrong ?
Hello everyone,
I caould really use some help figuring out an error message that i am getting when logging into my admin section of my cart. to give a breif history i was installing an addon i got for the zencart addon to create restricted admin profiles and things went wrong. i am getting this error message on the home page after i have logged in:
Fatal error: Call to undefined function: menu_header_visible() in D:\inetpub\foxmar\foxshoppe\admin\includes\boxes\extra_boxes\modules_dhtml.php on line 15
i have tried to restore the cart to the most recent backup (both file and database) and i am still getting the error message. Can anyone please help me to figure this out.
Thanks!!
Hi Kuroi
I have a weird problem in a zen of a friend. She have installed admin profiles working well. Have 2 languages.
For example, in the configuration menu, I have not access to Layout Settings page... in the admin settings page... that page is checked under Configuration Menu... but again... I have listed that page under 3rd. party contributions... I check this box... save... but never is saved... so I never have access to layout settings... and a lot of other pages...
The lady who install the zen for her... delete the user id 1, so my friend is 2 and she is the owner... so, she need all privileges... but she don't have it...
could you please help me?
thanks in advance...
Marta
when I edit admin permission in the Tools/admin setting
and check them all, when I return it's not saved and it says
"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."
my version of zencart is 1.3.0.1
there are some add ons I have installed, google analytics, emai archiver, ... and the box in front of them stays unchecked.
I also installed the security patch and rename my admin folder name. I 'm not sure if this name change has anything to do with it.
the admin
I have a new version of Admin Profiles with some distinct advantages over the older version.
It's written for Zen Cart 1.3.9 and tested against PHP 5.3.
It applies a much higher standard of data sanitization.
It does away with the need to edit box files.
It's been completely restructured to make the steps needed for installation, upgrade and even removal clearer.
However, every nook and cranny has had a Spring clean, so I want to get some feedback about usability and some beta testing before releasing it into the wild.
If you've got a few minutes and can help out, you can download it from here. Please don't use it on live sites yet, and don't post your feedback in this support thread. PM it too me.
I've installed Admin profiles (new site on ISP, 1.3.9c), only Cherry Zen & Image Handler 2.0-zc13, no products, but when I get into admin, I don't have the "Tools", "Gift Certificates/Coupons" or "Extras" !?
Those were available before I installed Admin Profiles.
I have done the sql 1st and than uploaded all the files, so what am I missing??
Veronika
Which version are you using?
Does the rest of the page display?
What changes have you made to your box files. and have you double checked the syntax?
Have you added any files in the extra_boxes folder?
Do you have any files in your boxes folder that don't normally live there (e.g. backups)?
Quick tip for anyone struggling with WHY is keeps on denying pages the first time you visit that page, even though you thought you'd ticked all the boxes:
Just get a plugin for your browser that lets you open ALL links on a page at once. Then click a heading so that you get the accessible menu (a great long list of links).
Then open them all. Yes, all of them, in new tabs in a new browser window.
THEN go back to the admin profiles menu, run it again, and you'll see lots of extra stuff to tick :)
well this is odd...
i have installed Admin Profiles on a test 139c site but nothing shows. (Stable version from downloads area (v1.0.7.1))
followed the instructions:
ran SQL, completed no errors
uploaded the ADMIN folder to my site
added the define statement to admin/includes/languages/english.php
went to the admin... and no change???
No sign at all that i have installed Admin Profiles.
No error messages, no nothing.. just the normal ZC admin before an Admin Profiles install.
I have checked with FileZilla and the Admin Profile files are there?
any ideas?
i have installed this mod tens of times while playing with ZC cart on test site and never had a problem before..?
*cough* forgot to upload the edited admin/admin.php file...:blush:
see, thats what c0cky familiarity does to you!!!