package ONO::FW::Apps::Exec;
################################################################################
# COPYRIGHT / LICENSE #
################################################################################
#
# This file is part of the ONO Software Project.
#
# Copyright (C) 2000-2025 Jos KIRPS [ www.kirps.com | jos_AT_kirps_DOT_com ]
# and The Joopita Project [ www.joopita.org | contact_AT_joopita_DOT_com ]
#
# This file, as well as other parts of the ONO Software Project or related
# elements, are FREE SOFTWARE available under the ARTISTIC LICENSE 2.0.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# For the full license, see /ono/osr/license/LICENSE.txt, or write to
# jos_AT_kirps_DOT_com or contact_AT_joopita_DOT_com.
#
################################################################################
# END OF COPYRIGHT / LICENSE, HERE COMES THE CODE ... #
################################################################################
use strict;
use ONO::IO;
use ONO::FW::Apps::PDF;
use ONO::FW::Apps::ToolBox;
#use ONO::Lib::Lang::LoginMessage;
use ONO::Lib::Image::QR;
###############################################################################
# exec
###############################################################################
sub exec {
my (
$self,
$db,
$community,
$lang,
$setup_ref,
$BLK_ref,
$vars_ref,
) = @_;
#: Display / execute an ONO app in an iframe.
my %setup = %$setup_ref;
my %BLK = %$BLK_ref;
my %vars = %$vars_ref;
$vars{'app'} =~ s~[^a-z0-9\_]~~g;
my $apps_dir = "/elearning/";
if ($setup{'url_base'}) {
$apps_dir = $setup{'url_base'};
}
my ($WARN,$WARN1,$WARN2,$PHONE_MODE);
# load the conf file and configure the app...
my %info;
foreach my $line (ONO::IO->list("var/community/$community/apps/$vars{'app'}.txt")) {
if ($line =~ m~^(.*?):(.*):~) {
$info{$1} = $2;
}
}
if ($info{"title_$lang"}) {
$info{'title_en'} = $info{"title_$lang"};
}
# build the app URL
my $LINK = $info{'url'};
# add variables
my $VARS = "&app_name=$vars{'app'}";
my $app_lang;
if ($lang || $ENV{'REQUEST_URI'} =~ /app_lang=/) {
$app_lang = $lang;
if ($vars{'app_lang'}) {
$app_lang = $vars{'app_lang'};
}
if ($ENV{'REQUEST_URI'} =~ m~/apps/(.*?)/run/\?(.*)$~) {
if ($2 =~ /app_lang=(.*)/) {
$app_lang = substr($1,0,2);
}
}
$VARS .= "&app_lang=$app_lang";
}
# add more custom variables
if ($ENV{'REQUEST_URI'} =~ m~/input-vars/(.*)$~) {
my $IN = $1;
$VARS .= "&$IN";
}
# add setup variables
$VARS .= $setup{'variables'};
# add exercise configuration variables
if ($vars{'exercise'} && $vars{'exercise_id'}) {
$vars{'exercise'} =~ s~[^A-Za-z0-9]~~g;
$vars{'exercise_id'} =~ s~[^A-Za-z0-9]~~g;
$VARS .= qq~&exercise=$vars{'exercise'}&exercise_id=$vars{'exercise_id'}~;
foreach my $line (ONO::IO->list("var/community/${community}/apps/storage/".ONO::IO->deepdir($vars{'exercise_id'})."/$vars{'exercise_id'}/config.txt")) {
$line =~ s~(\n|\r|\t)~~g;
my @lp = split(/:/,$line);
$VARS .= qq~&$lp[0]=$lp[1]~;
}
}
# add external variables
# THIS WILL PROBABLY NO LONGER BE NEEDED -- THE APP FRAMEWORK V2 WILL BE TAKING OVER THOSE TASKS...
if ($ENV{'REQUEST_URI'} =~ m~/apps/(.*?)/run/\?(.*)$~) {
# read the configuration
# pos:input:variable:filter:range:description:
my %var_conf;
foreach my $line (sort ONO::IO->list("apps/$vars{'app'}/core/input_vars.txt")) {
$line =~ m~^(.*?):(.*?):~;
$var_conf{$2} = $line;
}
# process the variables
foreach my $var (split(/\//,"/$2/")) {
my @vp = split(/=/,$var);
if ($var_conf{$vp[0]}) {
my @cp = split(/:/,$var_conf{$vp[0]});
my $target_var = $cp[2];
my $filter = $cp[3];
my $range = $cp[4];
# filters and ranges are still missing!
if ($filter eq "INT") {
}
if ($filter eq "INT_SIGNED") {
}
if ($filter eq "DEC") {
}
if ($filter eq "DEC_SIGNED") {
}
if ($filter eq "CHAR") {
}
if ($filter eq "BOOLEAN") {
}
$VARS .= "&app_$cp[2]=$vp[1]";
}
}
}
# add all variables to the base app URL
if ($LINK =~ /\?/) {
$LINK .= $VARS;
} else {
$VARS =~ s~^\&\;~~;
$LINK .= "?$VARS";
}
# this is the screen resolution optimized for computers, laptops and tablets
my $width = 920;
my $height = 480;
my $xwidth = $width + 2;
my $margin_top = 5;
my $scrolling;
if ($ENV{'HTTP_USER_AGENT'} =~ /(ipad|iphone)/i) {
$WARN2 = $WARN;
$margin_top = 0;
} else {
$WARN1 = $WARN;
}
$info{'icon'} =~ s~256~32~;
my $domain = $ENV{'SERVER_NAME'};
$domain =~ s~(www|de|fr|en|lu)\.~~;
my $link_info = "${apps_dir}-/$vars{'app'}/info/";
my $link_exec = "${apps_dir}-/$vars{'app'}/";
if ($vars{'exercise'} && $vars{'exercise_id'}) {
$link_exec = "/exercise/$vars{'exercise'}/";
}
my ($LIKE,$ERR,$ERR2);
if ($setup{'like'}) {
$LIKE = $setup{'like'};
}
if ($info{'flags'} =~ /(p|r)/ && ONO::IO->device eq "phone") {
$LIKE = "";
}
if ($ENV{'REQUEST_URI'} =~ m~/apps/(.*?)/run/\?/(.*)$~) {
$LINK .= qq~&app_request_uri=$2~;
}
if ($ENV{'REQUEST_URI'} =~ m~${apps_dir}-/(.*?)/\?/(.*)$~) {
$LINK .= qq~&app_request_uri=$2~;
}
$LINK =~ s~ ~~g;
my $WIDTH = "width:${width}px";
if ($info{'flags'} =~ /r/) {
$WIDTH = "width:100%;max-width:${width}px";
}
my $IFRAME = qq~<iframe class="block" id="appiframe" style="$WIDTH;height:${height}px;overflow:hidden;margin-top:${margin_top}px" $scrolling frameborder="0" src="$LINK">
</iframe>
~;
if (ONO::IO->devstation) {
$IFRAME .= qq~flags: $info{'flags'}<br>~;
$IFRAME .= $LINK;
}
my $APPS_BASE = ONO::FW::Apps::ToolBox->apps_base();
if (!$info{'url'}) {
$ERR = "app '$vars{'app'}' not found (missing info_url)";
}
# note that (.*?)/(.*?)/(cgi-bin|apps) is an exception added for oli.education.lu, which requires /oli/lu/ as prefix
if ($LINK =~ m~^/~ && $LINK !~ m~^/(cgi-bin|apps)/~ && $LINK !~ m~^/(.*?)/(.*?)/(cgi-bin|apps)/~) {
$ERR = "bad app path (only /apps/, /cgi-bin/ or external URLs are allowed)";
$ERR2 = qq~<div class="p10"><a href="$info{'url'}" target="_parent" class="button_green">$BLK{'continue'}...</a></div>~;
}
if ($ERR) {
$IFRAME = qq~<div class="block bg_red radius10" id="appiframe" style="$WIDTH;margin-top:${margin_top}px">
<div class="p10 red">Error: $ERR</div>
</div>
$ERR2
~;
}
my $BB;
if (!$WARN1 && !$setup{'disable_header'}) {
$BB = "bb";
}
my $VIRCLASS_AUTH;
if (($setup{'virclass_auth_id'} && $setup{'virclass_auth_name'}) || ONO::IO->devstation) {
$VIRCLASS_AUTH = qq~<td onmouseover="onojs_block('virclass_auth_info');" onmouseout="onojs_hide('virclass_auth_info');">
<div class="rel">
<div class="app32w ml10 cole nowrap" style="background:#3366bb">
<div class="ml5 mr5" style="max-width:54px;overflow:hidden">
<table class="default_table fr" style="height:32px"><tr><td>$setup{'virclass_auth_name'}</td><tr></table>
</div>
</div>
<div id="virclass_auth_info" class="app32w ml10 cole nowrap abs hide" style="background:#3366bb;top:0px;right:0px">
<div class="ml5 mr5">
<table class="default_table fr" style="height:32px"><tr><td>$setup{'virclass_auth_name'}</td><tr></table>
</div>
</div>
</div>
</td>
<td id="ono_fw_apps_exec_virclass_auth_user" class="hide">
<div class="app32w cole nowrap" style="background:#3366bb;max-width:100px;overflow:hidden">
<div class="ml5 mr5">
<table class="default_table auto" style="height:32px">
<tr>
<td>
<div id="ono_fw_apps_exec_virclass_auth_username" class="center bold">$BLK{'anonymous'}</div>
</td>
<tr>
</table>
</div>
</div>
</td>
~;
}
my $LANGS;
if ($info{'language'}) {
my $LINK = $ENV{'REQUEST_URI'};
$LINK =~ s~app_lang\=(.*)~~;
$LINK =~ s~\&\&~\&~;
if ($LINK !~ /\?/) {
$LINK .= "?";
}
foreach my $key (sort keys %info) {
if ($key =~ /^language_(.*?)$/ && $info{$key} eq "on") {
my $la = $1;
if ($la =~ /(en|de|lu|fr)/) {
$LANGS .= qq~<a href="$LINK&app_lang=$la"><img class="flag mb10" src="/ono/osr/images/flags/languages/$la.png" style="width:28px;height:20px" alt=""></a>~;
}
}
}
}
if ($LANGS) {
my $default = $info{'language'};
if ($vars{'app_lang'} ne $info{'language'}) {
$default = $vars{'app_lang'};
}
if ($app_lang) {
$default = $app_lang;
}
if (!$default) {
$default = $lang;
}
$LANGS = qq~<td onmouseover="onojs_block('ono_apps_flags');" onmouseout="onojs_hide('ono_apps_flags');">
<div class="rel">
<div class="app32 bg_fabric ml10"><img class="block32 radius5" src="/ono/osr/images/flags/countries_large_tld/$default.jpg" alt=""></div>
<div id="ono_apps_flags" class="hide abs box_white radius10" style="top:-5px;left:-5px">$LANGS</div>
</div>
</td>
~;
}
my $HEADER;
if (!$setup{'disable_header'}) {
my @txts = (
"Fullscreen Mode",
"You are using a mobile device, this app will therefore be running in fullscreen mode.",
"You may leave fullscreen mode at any time by pressing the approprite icon in the upper right corner of the screen.",
"OK, let's go!",
"bookmark (add to my account)",
"app info, copyright, etc, ...",
"reload this app",
);
if ($lang eq "de") {
@txts = (
"Vollbildmodus",
"Du benutzt gerade ein mobiles Gerät, diese App daher im Vollbildmodus angezeigt.",
"Du kanns den Vollbildmodus jederzeit verlassen, indem du das entsprechende Icon in der oberen rechten Ecke des Bildschirms anklickst.",
"OK, los geht's",
"Lesezeichen (mein Konto)",
"App Info, Copyright, usw, ...",
"App neu starten",
);
}
if ($lang eq "lu") {
@txts = (
"Vollbildmodus",
"Du benotz e mobilt Gerät, dës App gëtt dofir am Vollbildmodus ugewisen.",
"Du kanns zu all Moment aus dem Vollbildmodus erausgoen, andeems du den entspriechenden Icon uewe riets am Eck vum Display uklicks.",
"OK, a lass!",
"Lieszeechen (mäi Konto)",
"App Info, Copyright, etc, ...",
"App nei starten",
);
}
if ($lang eq "fr") {
@txts = (
"Mode plein écran",
"Vous utilisez un appareil mobile, cette application fonctionnera donc en mode plein écran.",
"Vous pouvez quitter le mode plein écran à tout moment en appuyant sur l'icône appropriée dans le coin supérieur droit de l'écran.",
"OK, on y va!",
"signet (mon compte)",
"Info, droits d'auteur, etc, ...",
"relancer l'app",
);
}
my $MOBILE;
if (ONO::IO->device("mobile") || ONO::IO->device("mac")) {
$MOBILE .= qq~<div id="onofw_apps_fullscreen_info" class="box_blue abs hide" style="z-index:9999;max-width:400px">
<h2 style="color:#eeeeee">$txts[0]</h2>
<div class="box_paper large col6">
<table class="default_table">
<tr class="vtop">
<td><img class="block32 mr5" src="/ono/osr/images/icons/crystal/32x32/ono/help.png" alt=""></td>
<td><div class="lh125">$txts[1]</div></td>
</tr>
<tr>
<td></td>
<td class="p5"></td>
</tr>
<tr class="vtop">
<td><img class="block32 mr5" src="/ono/osr/images/icons/ono/32x32/collapse.png" alt=""></td>
<td><div class="lh125">$txts[2]</div></td>
</tr>
<tr class="vtop">
<td></td>
<td>
<div id="onofw_apps_fullscreen_info_button">
<a href="javascript:void(0);" onclick="onofw_apps_exec_expand();onofw_apps_fullscreen_info_close();" class="button_green button_big mt10">$txts[3]</a>
</div>
<div id="onofw_apps_fullscreen_info_wait" class="hide">
<img class="block32 mt10" src="/ono/osr/images/loading/wheel_32.gif" alt="">
</div>
</td>
</tr>
</table>
</div>
</div>
~;
if ($ENV{'REQUEST_URI'} !~ /onofw_apps_exec_close=1/) {
if (ONO::IO->device("mac")) {
$MOBILE .= qq~<script>
function onofw_apps_fullscreen_info_close() {
onojs_hide('onofw_apps_fullscreen_info_button');
onojs_block('onofw_apps_fullscreen_info_wait');
setTimeout(function(){onojs_hide('ono_render_darken');onojs_hide('onofw_apps_fullscreen_info');},1500);
}
if (navigator.maxTouchPoints > 1) {
onofw_apps_exec_expand();
onojs_block('onofw_apps_fullscreen_info');
onojs_block('ono_render_darken');
}
</script>
~;
} else {
$MOBILE .= qq~<script>
function onofw_apps_fullscreen_info_close() {
onojs_hide('onofw_apps_fullscreen_info_button');
onojs_block('onofw_apps_fullscreen_info_wait');
setTimeout(function(){onojs_hide('ono_render_darken');onojs_hide('onofw_apps_fullscreen_info');},1500);
}
onofw_apps_exec_expand();
onojs_block('onofw_apps_fullscreen_info');
onojs_block('ono_render_darken');
</script>
~;
}
}
}
my $DOMAIN = ONO::IO->http_domain_base();
my ($QR,$QRAPP,$QREX);
my $qrfile = "$DOMAIN/apps/$vars{'app'}/run";
$qrfile =~ s~^(http|https)://~~g;
$qrfile =~ s~[^A-Za-z0-9]~-~g;
if (!ONO::IO->exists("images/qr/$qrfile.jpg") || ONO::IO->devstation) {
ONO::Lib::Image::QR->make("$DOMAIN${apps_dir}-/$vars{'app'}/");
}
if ($vars{'exercise'}) {
$QRAPP = qq~<a href="$DOMAIN${apps_dir}-/qrcode/?/qrcode/$qrfile/" class="col6">($BLK{'app'})</a>~;
my $qrfile = "$DOMAIN/exercise/$vars{'exercise'}";
$qrfile =~ s~^(http|https)://~~g;
$qrfile =~ s~[^A-Za-z0-9]~-~g;
if (!ONO::IO->exists("images/qr/$qrfile.jpg") || ONO::IO->devstation) {
ONO::Lib::Image::QR->make("$DOMAIN/exercise/$vars{'exercise'}/");
}
if (ONO::IO->exists("images/qr/$qrfile.jpg")) {
$QREX = qq~<div class="fl mr10 center">
<div class="rel" style="right:8px">
<a href="$DOMAIN${apps_dir}-/qrcode/?/qrcode/$qrfile/">
<img class="block150" src="/images/qr/$qrfile.jpg" alt="">
</a>
<a href="$DOMAIN${apps_dir}-/qrcode/?/qrcode/$qrfile/" class="col6">($BLK{'exercise'})</a>
</div>
</div>
~;
}
}
if (ONO::IO->exists("images/qr/$qrfile.jpg")) {
$QR = qq~<tr>
<td></td>
<td class="p0">
<div class="fl mr10 center">
<div class="rel" style="right:8px">
<a href="$DOMAIN${apps_dir}-/qrcode/?/qrcode/$qrfile/">
<img class="block150" src="/images/qr/$qrfile.jpg" alt="">
</a>
$QRAPP
</div>
</div>
$QREX
</td>
</tr>
~;
}
my $EXPAND = qq~<td id="onofw_apps_exec_expand">
<a href="javascript:void(0);" onclick="onofw_apps_exec_expand();">
<div class="app32 bg_fabric ml10"><img class="block32 radius5" src="/ono/osr/images/icons/ono/32x32/expand.png" alt=""></div>
</a>
</td>
~;
if (ONO::IO->device("computer")) {
$EXPAND = qq~<td id="onofw_apps_exec_expand_computer" onmouseover="onojs_block('ono_apps_expand');" onmouseout="onojs_hide('ono_apps_expand');">
<div class="rel cursorlink" onclick="onofw_apps_exec_expand();">
<div class="app32 bg_fabric ml10"><img class="block32 radius5" src="/ono/osr/images/icons/ono/32x32/expand.png" alt=""></div>
<div id="ono_apps_expand" class="hide abs box_white radius10 nowrap" style="top:32px;right:-10px">
$txts[0]
</div>
</div>
</td>
<td id="onofw_apps_exec_expand_tablet" class="hide">
<a href="javascript:void(0);" onclick="onofw_apps_exec_expand();">
<div class="app32 bg_fabric ml10"><img class="block32 radius5" src="/ono/osr/images/icons/ono/32x32/expand.png" alt=""></div>
</a>
</td>
~;
if (ONO::IO->device("mac")) {
$EXPAND .= qq~<script>if (navigator.maxTouchPoints > 1) {onojs_hide('onofw_apps_exec_expand_computer');onojs_tablecell('onofw_apps_exec_expand_tablet');}</script>~;
}
}
$HEADER = qq~<div class="hide block800 p5"></div>
<div class="rel">
<table class="wide_table">
<tr>
<td class="p0"><div class="hide block800 p5"></div></td>
<td class="p0">
<a href="$link_exec">
<div class="rel mb5 mr10">
<div class="auto" style="width:32px">
<img class="app32" src="$info{'icon'}" alt="">
<div class="abs app32_inset" style="top:0px"></div>
</div>
</div>
</a>
</td>
<td class="nowrap">
<div class="hide800"><h1 style="margin:0px 10px 0px 5px"><a href="$link_exec">$info{'title_en'}</a></h1></div>
<div class="hide block800"><h3 class="m0"><a href="$link_exec">$info{'title_en'}</a></h3></div>
</td>
<td class="w100"><div class="hide800">$LIKE</div></td>
$VIRCLASS_AUTH
$LANGS
<td onmouseover="onojs_block('ono_apps_share');" onmouseout="onojs_hide('ono_apps_share');">
<div class="rel">
<a href="$link_info">
<div class="app32 bg_fabric ml10 cursorlink"><div class="p2"><img class="block28" src="/ono/osr/images/icons/crystal/32x32/actions/up.png" alt=""></div></div>
</a>
<div id="ono_apps_share" class="hide abs box_white radius10" style="top:32px;right:-10px;min-width:320px">
<table class="widet_table mt10">
<tr>
<td class="p5">
<a href="$setup{'url_account'}?community_screen=bookmarks&add=app_$vars{'app'}">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/ono/bookmark.png" alt="">
</a>
</td>
<td class="p5 w100">
<a href="$setup{'url_account'}?community_screen=bookmarks&add=app_$vars{'app'}" class="col6">
$txts[4]
</a>
</td>
</tr>
$setup{'share_menu_custom'}
<tr>
<td class="p5">
<a href="$link_exec">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/ono/link.png" alt="">
</a>
</td>
<td class="p5">
<a href="$link_exec" class="col6">$DOMAIN$link_exec</a>
</td>
</tr>
$QR
</table>
</div>
</div>
</td>
<td onmouseover="onojs_block('ono_apps_system');" onmouseout="onojs_hide('ono_apps_system');">
<div class="rel">
<a href="$link_info">
<div class="app32 bg_dark ml10 cursorlink"><div class="p2"><img class="block28" src="/ono/osr/images/icons/crystal/32x32/apps/ktip.png" alt=""></div></div>
</a>
<div id="ono_apps_system" class="hide abs box_white radius10" style="top:32px;right:-10px;min-width:320px">
<table class="widet_table mt10">
<tr>
<td class="p5">
<a href="$link_info">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/apps/ktip.png" alt="">
</a>
</td>
<td class="p5 w100">
<a href="$link_info" class="col6">
$txts[5]
</a>
</td>
</tr>
<tr>
<td class="p5">
<a href="$link_info">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/actions/knewstuff.png" alt="">
</a>
</td>
<td class="p5 w100">
<a href="$link_info" class="col6">
$BLK{'comments'} & $BLK{'ratings'}
</a>
</td>
</tr>
<tr>
<td class="p5">
<a href="/goto/-/helpdesk/">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/apps/khelpcenter.png" alt="">
</a>
</td>
<td class="p5 w100">
<a href="/goto/-/helpdesk/" class="col6">
HelpDesk / $BLK{'report_bugs'}
</a>
</td>
</tr>
<tr>
<td class="p5">
<a href="$link_exec">
<img class="block24" src="/ono/osr/images/icons/crystal/32x32/actions/reload.png" alt="">
</a>
</td>
<td class="p5">
<a href="$link_exec" class="col6">
$txts[6]
</a>
</td>
</tr>
</table>
</div>
</div>
</td>
$EXPAND
<td id="onofw_apps_exec_collapse" class="hide">
<a href="javascript:void(0);" onclick="onofw_apps_exec_collapse();">
<div class="app32 bg_fabric ml10"><img class="block32 radius5" src="/ono/osr/images/icons/ono/32x32/collapse.png" alt=""></div>
</a>
</td>
<td id="onofw_apps_exec_close" class="hide">
<a href="/$APPS_BASE/$vars{'app'}/run/?onofw_apps_exec_close=1">
<img class="block32 ml10" src="/ono/osr/images/icons/crystal/32x32/ono/close.png" alt="close button">
</a>
</td>
<td class="p0"><div class="hide block800 p5"></div></td>
</tr>
</table>
<script>
function onofw_apps_exec_expand() {
onojs_tablecell('onofw_apps_exec_collapse');
onojs_tablecell('onofw_apps_exec_close');
onojs_hide('onofw_apps_exec_expand');
onojs_hide('onofw_apps_exec_expand_computer');
onojs_hide('onofw_apps_exec_expand_tablet');
onojs_hide('onofw_apps_exec_warn1');
onojs_hide('onofw_apps_exec_warn2');
onojs_hide('ono_platform_header');
onojs_hide('ono_toolbox_legal_footer_links');
onojs_hide('ono_toolbox_legal_footer');
onojs_top('onofw_apps_exec_frame','-100');
}
function onofw_apps_exec_collapse() {
onojs_tablecell('onofw_apps_exec_expand');
onojs_tablecell('onofw_apps_exec_expand_tablet');
onojs_hide('onofw_apps_exec_close');
onojs_hide('onofw_apps_exec_collapse');
onojs_block('onofw_apps_exec_warn1');
onojs_block('onofw_apps_exec_warn2');
onojs_block('ono_platform_header');
onojs_block('ono_toolbox_legal_footer_links');
onojs_block('ono_toolbox_legal_footer');
onojs_top('onofw_apps_exec_frame','0');
}
</script>
$MOBILE
</div>
~;
}
my $STYLE = "width:${xwidth}px";
if ($info{'flags'} =~ /r/) {
$STYLE = "max-width:${xwidth}px";
}
my $RETURN = qq~<div class="auto" style="$STYLE">
<div id="onofw_apps_exec_frame" class="rel">
$PHONE_MODE
<div class="$BB">
<!-- ono_app_engine_header_start -->
<div id="onofw_apps_exec_header">$HEADER</div>
<!-- ono_app_engine_header_end -->
</div>
<div id="onofw_apps_exec_warn1">$WARN1</div>
$IFRAME
<div id="onofw_apps_exec_warn2">$WARN2</div>
<!-- ono_app_engine_footer_start -->
<div id="onofw_apps_exec_footer" class="$setup{'footer_class'}">$setup{'footer'}</div>
<!-- ono_app_engine_footer_end -->
</div>
</div>
~;
if ($setup{'return_array'}) {
return ($RETURN,$info{'title_en'});
} else {
return $RETURN;
}
}
###############################################################################
# end of script
###############################################################################
1;
__END__