CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Applying CC security to non CC pages

Print topic Send  topic

Author Message
OIG_User
Posted: 08/24/2004, 7:10 AM

I have several pages that I coded myself and use in the application. I was wondering if there was a way to apply CC security to these pages.

I previously included the page in a basic CC page however with the CC upgrade, I now get fatal errors.

Thanks
Damian
Posted: 08/25/2004, 6:06 AM

Create a "Blank Page" in Code Charge and copy your HTML into the HTML tab.
The Code Charge security is applied in the PHP page, which uses the HTML
page as a template...


"OIG_User" <OIG_User@forum.codecharge> wrote in message
news:5412b4c5d9314b@news.codecharge.com...
> I have several pages that I coded myself and use in the application. I
was
> wondering if there was a way to apply CC security to these pages.
>
> I previously included the page in a basic CC page however with the CC
upgrade,
> I now get fatal errors.
>
> Thanks
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

OIG_User
Posted: 08/25/2004, 6:20 AM

Is there a way to do this without having to separate the PHP and HTML?
Damian
Posted: 08/25/2004, 8:01 PM

CCS uses PHP with Templates... the HTML is a Template and the viewer
basically sees the HTML but it is renderred by the PHP with all the other
things that the php code is doing, including the security.



"OIG_User" <OIG_User@forum.codecharge> wrote in message
news:5412c922a86446@news.codecharge.com...
> Is there a way to do this without having to separate the PHP and HTML?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 08/25/2004, 9:54 PM

OIG,

Templates and HTML are not related to security.
The answer can be found by brief analysis of the generated code.
If you make any CCS page restricted, you will see that the generate page will contain code like:
//Authenticate User @1-D9DBF8C9  
CCSecurityRedirect("1;2", "");  
//End Authenticate User
Thus if you add the same code to any other of your pages (created CCS or not) then you will have the same "CCS Security".
Of course you also need to include the function "CCSecurityRedirect" in your non-CCS programs. You can do this by including the Common.php file generated by CCS, or extracting the relevant code from Common.php and placing in your program.

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
OIG-USer
Posted: 09/16/2004, 9:09 AM

Every time i include the common file i get lots of header errors....I have not been able to work them out.
Nicole

Posts: 586
Posted: 09/17/2004, 2:22 AM

Please check the Include path for common files and out include directive at the top of your file.

What errors have you got and when?

_________________
Regards,
Nicole
View profile  Send private message
klw
Posted: 09/22/2004, 10:49 AM

At the top of each of your customer generated pages, place
a check for the UserID and GroupID values - this assumes
you require users to login before being able to access pages.

If not, then you'll have to come up with your own method that
performs page validation prior to displaying the page contents.

Quote OIG_User:
I have several pages that I coded myself and use in the application. I was wondering if there was a way to apply CC security to these pages.

I previously included the page in a basic CC page however with the CC upgrade, I now get fatal errors.

Thanks
feha


Posts: 712
Posted: 10/15/2004, 2:54 PM

if you get error "headers ..."
than try to remove session_start(); in your 3-rd party php as sessions are being started in Common.php

example i use for htmlArea

error_reporting('0');
ini_set('display_errors', '0');

/*
** Change ONLY the following lines to match your server setup
*/

//modified by www.vision.to to use integrated login system on CodeChargeStudio projects
define("RelativePath", "../../");
include(RelativePath . "Common.php");
if(CCGetGroupID() < 3){
echo "ACCESS DENIED!";exit;
}

_________________
Regards
feha

www.vision.to
feedpixel.com
View profile  Send private message

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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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