Jump to content

StevenMarks

New Members
  • Posts

    6
  • Joined

  • Last visited

StevenMarks's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You are a star, that makes sense thanks for the assistance
  2. no because they don't need to be an admin to have access to this section. they can either have the permission through a group or if they are an admin they get the access. If I change it to AND will that mean they have to be admin and have the permission? it needs to be: IF !isadmin OR !Can_View_Users THEN die
  3. Hi Thanks for the reply, this seems to have fixed the error i was getting however it still states access denied on the page this is the code i use at the top of my php page is this incorrect? if(!$PermCheck->isAdmin() || !$PermCheck->GroupAccess('Can_View_Users') ) die('Access Denied');
  4. Hi All, A bit of a strange one here. I have created the below function and it works for the most part however I noticed that I was still getting access denied. I checked the httpd log and saw this error: [Tue Oct 01 10:12:46 2013] [error] [client 127.0.0.1] PHP Notice: Undefined index: $access in /var/www/xxxx/public_html/dev/v2.0/inc/functions.php on line 652 I then took a look at the MySQL log to see if there was an issue with the query that the function submits: SELECT grp.Can_View_Users, grp.group_id, group_name, group_enabled, grp.created, grp.updated FROM groups grp LEFT JOIN members AS users USING(group_id) WHERE users.id =27 GROUP BY grp.group_id as you can see here it is setting the parameter correctly but when setting it for the PHP code on line 652 it doesnt work :S confused. function GroupAccess($access){ $db = new DbConnector(); $db->connect(); $sql='SELECT grp.'.$access.', grp.group_id, group_name, group_enabled, grp.created, grp.updated ' .'FROM '.GROUP_TBL.' grp ' .'LEFT JOIN '.USER_TBL.' AS users USING(group_id) ' .'WHERE users.id ='.$_SESSION['uid'].' GROUP BY grp.group_id'; $result = $db->query($sql); $rows = $db->fetchArray($result); if($rows['$access'] == 1 && $rows['group_enabled'] == 1) return true; } the above starts at line 643 any assistance would be appreciated as im pulling my hair out here!!
  5. We need a way to allow web visitors to upload files (.xls, .csv, .txt) to our server, do any field mapping that is necessary, and then import data into MSSQL 2008. once this has been done once it would automatically happen every hour. and the user could login and change settings if required.
  6. Hi Guys, Not sure if this is the correct place or if it would be something better done in .net. I have a requirement at work for a web application that will be hosted on one of our internal servers and do the following: 1. allow users to provide ftp details to a file on a server 2. have the ability to map csv columns to database tables columns. 3. import the csv file into the mssql table 4. once settings have been entered once through a web browser a scheduled task or something similar would run every day with the settings that were supplied and download the new file and import it to the table. Basically it is a stock file supplied by our suppliers ftp feed that needs importing automatically into our mssql database, either by an application or a web application. any guidance would be appreciated. Steve
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.