function

set_args . request_library . sncode

VERSIONlatest Set current args to process.

SET_ARGS

NAME

set_args - Set current args to process.

SYNOPSIS

set_args (string);

DESCRIPTION

This function is used to set current args for execution.

This is used in the preload function.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

{_{

%include "/usr/local/websiteincludes/extenso.sn";
%include "/usr/local/websiteextenso/functions/login.snc";

config = config();
request = request();
user = login();
ext = extention(request.filename);
if ext ne "sn" && ext ne "snc" then
        status(-1);
        sncode = false;
else
        status(0);
        sncode = true;
endif
//"Checking request\n";
if request.filename st config.document_root .+ "extranet" then
        //"Checking User\n";
        if user.uid == undefined then
                if sncode then
                        set_args("page=" .+  request.filename);
                        set_filename("html/fr/login.snc");
                else
                        status(HTTP_FORBIDDEN);
                endif
        else
                status(0);
        endif
endif
}}

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>