namespace Noalyss;
use \HtmlInput;
use \Dossier;
use \User;
/**
* @file
* @brief Main class for Mobile device
*/
/**
* @class Mobile
* @brief Main class for Mobile device
*/
class Mobile
{
/**
* @brief Load a module with all its data from database thanks the access_code
* @global \Noalyss\type $g_user
* @param type $p_access_code
* @return type
*/
function load_module($p_access_code)
{
global $g_user;
$cn=Dossier::connect();
$aModule=$cn->get_row("
select
me_file,me_parameter,me_javascript,me_type,menu_ref.me_code,
pmo_id,pmo_order,pmo_default
from menu_ref
join profile_mobile using (me_code)
where
me_code=$1 and
(me_file is not null or trim(me_file) <>'' or
me_javascript is not null or trim (me_javascript) <> '')
and profile_mobile.p_id=$2",
array($p_access_code,$g_user->get_profile()));
if (count($aModule)==0)
{
return [];
}
return $aModule;
}
/**
* @brief HTML Page
* @staticvar int $already_call
* @return type
*/
function page_start()
{
global $version_noalyss;
// check not called twiced
static $already_call=0;
if ($already_call==1)
return;
$already_call=1;
$style="style-classic7.css";
$title="NOALYSS";
echo '';
printf("\n");
echo "";
echo "