Aller au contenu principal

set_args

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
}}

SEE ALSO

AUTHOR

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

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.