CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 UserID works, how do I filter via ComanyID?

Print topic Send  topic

Author Message
viktor
Posted: 03/01/2004, 3:45 AM

to All - thanks - I've managed to get "user page" done using UserID session: a user is able to edit / update his/her details without seeing others info using sessions. :-)

Two last questions left :-/

I understand I can filter in "DataSource" using sesions only

CCGetUserID
CCGetUserLogin
CCLoginUser
CCLogoutUser

How do I filter the data for let's say a field called "CompanyID"

Also I need this not just fir grid but for editing

Scenario:

Each company has an admin who can edit / delete / add new users ONLY whithin his / her company.

That is I have companyID field. If admin logs in - the system should filter all the records for user that "belong" to the company.

Also - last one :-/ - how do I make that the admin of the campany while adding a user to the system will automatically assign companyID to that user - shall I user hidden field here now is it not secure?

Thank!
DonB
Posted: 03/01/2004, 5:17 AM

You probably should generate a session variable when they login - and
CCDLookup() one time to get the company based on their login and put it into
the variable. Wherever you query for data, join the users table to the
table containing the data of interest. They be sure to add the session
variable to the query so that they results are restricted to that company.

--
DonB

http://www.gotodon.com/ccbth


"viktor" <viktor@forum.codecharge> wrote in message
news:54043223f08874@news.codecharge.com...
> to All - thanks - I've managed to get "user page" done using UserID
session: a user is able to edit / update his/her details without seeing
others info using sessions. :-)
>
> Two last questions left :-/
>
> I understand I can filter in "DataSource" using sesions only
>
> CCGetUserID
> CCGetUserLogin
> CCLoginUser
> CCLogoutUser
>
> How do I filter the data for let's say a field called "CompanyID"
>
> Also I need this not just fir grid but for editing
>
> Scenario:
>
> Each company has an admin who can edit / delete / add new users ONLY
whithin his / her company.
>
> That is I have companyID field. If admin logs in - the system should
filter all the records for user that "belong" to the company.
>
> Also - last one :-/ - how do I make that the admin of the campany while
adding a user to the system will automatically assign companyID to that
user - shall I user hidden field here now is it not secure?
>
> Thank!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.