New: a specialized menu is now used when using smartphones
This commit is contained in:
parent
a903d9c9c7
commit
a8f9a9d0c6
@ -5,6 +5,7 @@ $Id$
|
|||||||
|
|
||||||
***** ChangeLog for 3.1 compared to 3.0 *****
|
***** ChangeLog for 3.1 compared to 3.0 *****
|
||||||
For users:
|
For users:
|
||||||
|
- New: A specialized menu is now used when using smartphones.
|
||||||
- New: Can add information on current user on odt generation
|
- New: Can add information on current user on odt generation
|
||||||
- New: Prefix on third party is not used by default. Hidden option
|
- New: Prefix on third party is not used by default. Hidden option
|
||||||
SOCIETE_USEPREFIX can restore old feature.
|
SOCIETE_USEPREFIX can restore old feature.
|
||||||
|
|||||||
@ -164,18 +164,15 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Menu smartphone
|
// Menu smartphone
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
$var=!$var;
|
||||||
{
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
|
||||||
$var=!$var;
|
print '<td>';
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
|
print $htmladmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'main_menu_smartphone', array($dirtop,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled="disabled"');
|
||||||
print '<td>';
|
print '</td>';
|
||||||
print $htmladmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'main_menu_smartphone', $dirsmartphone, empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled="disabled"');
|
print '<td>';
|
||||||
print '</td>';
|
print $htmladmin->select_menu(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED, 'main_menufront_smartphone', array($dirtop,$dirsmartphone), empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?'':' disabled="disabled"');
|
||||||
print '<td>';
|
print '</td>';
|
||||||
print $htmladmin->select_menu(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED, 'main_menufront_smartphone', $dirsmartphone, empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?'':' disabled="disabled"');
|
print '</tr>';
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \class Conf
|
* \class Conf
|
||||||
* \brief Classe de stockage de la config courante
|
* \brief Class to stock current configuration
|
||||||
*/
|
*/
|
||||||
class Conf
|
class Conf
|
||||||
{
|
{
|
||||||
@ -207,8 +207,8 @@ class Conf
|
|||||||
// Clean some variables
|
// Clean some variables
|
||||||
if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php";
|
if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php";
|
||||||
if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php";
|
if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php";
|
||||||
if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="iphone_backoffice.php";
|
if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="smartphone_backoffice.php";
|
||||||
if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="iphone_frontoffice.php";
|
if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="smartphone_frontoffice.php";
|
||||||
|
|
||||||
// Variable globales LDAP
|
// Variable globales LDAP
|
||||||
if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME='';
|
if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME='';
|
||||||
@ -426,8 +426,26 @@ class Conf
|
|||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
$this->produit=$this->product;
|
$this->produit=$this->product;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
// Define menu manager in setup
|
||||||
|
if (empty($user->societe_id)) // If internal user or not defined
|
||||||
|
{
|
||||||
|
$this->top_menu=(empty($this->global->MAIN_MENU_STANDARD_FORCED)?$this->global->MAIN_MENU_STANDARD:$this->global->MAIN_MENU_STANDARD_FORCED);
|
||||||
|
$this->smart_menu=(empty($this->global->MAIN_MENU_SMARTPHONE_FORCED)?$this->global->MAIN_MENU_SMARTPHONE:$this->global->MAIN_MENU_SMARTPHONE_FORCED);
|
||||||
|
// For backward compatibility
|
||||||
|
if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php';
|
||||||
|
if ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php';
|
||||||
|
}
|
||||||
|
else // If external user
|
||||||
|
{
|
||||||
|
$this->top_menu=(empty($this->global->MAIN_MENUFRONT_STANDARD_FORCED)?$this->global->MAIN_MENUFRONT_STANDARD:$this->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
||||||
|
$this->smart_menu=(empty($this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$this->global->MAIN_MENUFRONT_SMARTPHONE:$this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
||||||
|
// For backward compatibility
|
||||||
|
if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_frontoffice.php';
|
||||||
|
if ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_frontoffice.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class FormAdmin
|
|||||||
* Return list of available menus (eldy_backoffice, ...)
|
* Return list of available menus (eldy_backoffice, ...)
|
||||||
* @param selected Preselected menu value
|
* @param selected Preselected menu value
|
||||||
* @param htmlname Name of html select
|
* @param htmlname Name of html select
|
||||||
* @param dirmenu Directory to scan
|
* @param dirmenu Directory to scan or array of directories to scan
|
||||||
* @param moreattrib More attributes on html select tag
|
* @param moreattrib More attributes on html select tag
|
||||||
*/
|
*/
|
||||||
function select_menu($selected='', $htmlname, $dirmenu, $moreattrib='')
|
function select_menu($selected='', $htmlname, $dirmenu, $moreattrib='')
|
||||||
@ -138,39 +138,44 @@ class FormAdmin
|
|||||||
$menuarray=array();
|
$menuarray=array();
|
||||||
foreach ($conf->file->dol_document_root as $dirroot)
|
foreach ($conf->file->dol_document_root as $dirroot)
|
||||||
{
|
{
|
||||||
$dir=$dirroot.$dirmenu;
|
if (is_array($dirmenu)) $dirmenus=$dirmenu;
|
||||||
if (is_dir($dir))
|
else $dirmenus=array($dirmenu);
|
||||||
|
foreach($dirmenus as $dirtoscan)
|
||||||
{
|
{
|
||||||
$handle=opendir($dir);
|
$dir=$dirroot.$dirtoscan;
|
||||||
if (is_resource($handle))
|
if (is_dir($dir))
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
$handle=opendir($dir);
|
||||||
{
|
if (is_resource($handle))
|
||||||
if (is_file($dir."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
{
|
||||||
{
|
while (($file = readdir($handle))!==false)
|
||||||
if (preg_match('/lib\.php$/i',$file)) continue; // We exclude library files
|
{
|
||||||
$filelib=preg_replace('/\.php$/i','',$file);
|
if (is_file($dir."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
||||||
$prefix='';
|
{
|
||||||
if (preg_match('/^eldy|^iphone/i',$file)) $prefix='0'; // 0=Recommanded, 1=Experimental, 2=Other
|
if (preg_match('/lib\.php$/i',$file)) continue; // We exclude library files
|
||||||
else $prefix='2';
|
$filelib=preg_replace('/\.php$/i','',$file);
|
||||||
|
$prefix='';
|
||||||
|
if (preg_match('/^eldy|^smartphone/i',$file)) $prefix='0'; // 0=Recommanded, 1=Experimental, 2=Other
|
||||||
|
else $prefix='2';
|
||||||
|
|
||||||
if ($file == $selected)
|
if ($file == $selected)
|
||||||
{
|
{
|
||||||
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected="selected">'.$filelib.'</option>';
|
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected="selected">'.$filelib.'</option>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'">'.$filelib.'</option>';
|
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'">'.$filelib.'</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ksort($menuarray);
|
ksort($menuarray);
|
||||||
|
|
||||||
// Affichage liste deroulante des menus
|
// Output combo list of menus
|
||||||
print '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($moreattrib?' '.$moreattrib:'').'>';
|
print '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($moreattrib?' '.$moreattrib:'').'>';
|
||||||
$oldprefix='';
|
$oldprefix='';
|
||||||
foreach ($menuarray as $key => $val)
|
foreach ($menuarray as $key => $val)
|
||||||
@ -202,7 +207,8 @@ class FormAdmin
|
|||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|
||||||
$expdevmenu=array('iphone_backoffice.php','iphone_frontoffice.php'); // Menu to disable if $conf->global->MAIN_FEATURES_LEVEL is not set
|
//$expdevmenu=array('smartphone_backoffice.php','smartphone_frontoffice.php'); // Menu to disable if $conf->global->MAIN_FEATURES_LEVEL is not set
|
||||||
|
$expdevmenu=array();
|
||||||
|
|
||||||
$menuarray=array();
|
$menuarray=array();
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \class Smartphone
|
* \class Smartphone
|
||||||
* \brief Classe de gestion des smartphones
|
* \brief Class to manage Smartphones
|
||||||
*/
|
*/
|
||||||
class Smartphone {
|
class Smartphone {
|
||||||
|
|
||||||
@ -41,52 +41,25 @@ class Smartphone {
|
|||||||
* Constructor for class
|
* Constructor for class
|
||||||
* @param DB Handler acces base de donnees
|
* @param DB Handler acces base de donnees
|
||||||
*/
|
*/
|
||||||
function Smartphone($DB)
|
function Smartphone($DB,$phone)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
$dirt='others'; // default
|
||||||
* Get template directory
|
|
||||||
*/
|
|
||||||
function getTemplateDir()
|
|
||||||
{
|
|
||||||
// iWebKit template
|
|
||||||
if (preg_match('/android|blackberry|iphone|maemo/i',$this->phone))
|
|
||||||
{
|
|
||||||
$this->theme = 'default';
|
|
||||||
$this->template_dir=DOL_DOCUMENT_ROOT."/theme/phones/smartphone/tpl/";
|
|
||||||
}
|
|
||||||
// Special template
|
|
||||||
elseif (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$this->phone))
|
|
||||||
{
|
|
||||||
$this->theme = 'default';
|
|
||||||
$this->template_dir=DOL_DOCUMENT_ROOT."/theme/phones/".$this->phone."/tpl/";
|
|
||||||
}
|
|
||||||
// Default template
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->template_dir=DOL_DOCUMENT_ROOT."/theme/phones/others/tpl/";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
if (preg_match('/android|blackberry|iphone|maemo/i',$phone)) // iWebKit template
|
||||||
* Show HTML header
|
{
|
||||||
* @param title Web page title
|
$this->theme = 'default';
|
||||||
*/
|
$dirt='smartphone';
|
||||||
function smartheader($type='default')
|
}
|
||||||
{
|
elseif (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$phone)) // Special template
|
||||||
global $conf;
|
{
|
||||||
|
$this->theme = 'default';
|
||||||
|
$dirt=$phone;
|
||||||
|
}
|
||||||
|
|
||||||
if ($type == 'default') include_once($this->template_dir.'header.tpl.php');
|
$this->phone=$phone;
|
||||||
}
|
$this->template_dir=DOL_DOCUMENT_ROOT.'/theme/phones/'.$dirt.'/tpl/';
|
||||||
|
|
||||||
/**
|
|
||||||
* Show HTML footer
|
|
||||||
*/
|
|
||||||
function smartfooter()
|
|
||||||
{
|
|
||||||
include_once($this->template_dir.'footer.tpl.php');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,7 +69,7 @@ class Smartphone {
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if (! $conf->smart_menu) $conf->smart_menu ='iphone_backoffice.php';
|
if (! $conf->smart_menu) $conf->smart_menu ='smartphone_backoffice.php';
|
||||||
$smart_menu=$conf->smart_menu;
|
$smart_menu=$conf->smart_menu;
|
||||||
if (GETPOST('top_menu')) $smart_menu=GETPOST('top_menu');
|
if (GETPOST('top_menu')) $smart_menu=GETPOST('top_menu');
|
||||||
|
|
||||||
@ -104,7 +77,7 @@ class Smartphone {
|
|||||||
$result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu);
|
$result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu);
|
||||||
if (! $result) // If failed to include, we try with standard
|
if (! $result) // If failed to include, we try with standard
|
||||||
{
|
{
|
||||||
$conf->smart_menu='iphone_backoffice.php';
|
$conf->smart_menu='smartphone_backoffice.php';
|
||||||
include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu);
|
include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu);
|
||||||
}
|
}
|
||||||
$menusmart = new MenuSmart($this->db);
|
$menusmart = new MenuSmart($this->db);
|
||||||
|
|||||||
@ -92,7 +92,7 @@ function donnefocus() {
|
|||||||
|
|
||||||
<?php if ($captcha) { ?>
|
<?php if ($captcha) { ?>
|
||||||
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
<tr><td valign="middle" nowrap="nowrap"> <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
|
||||||
<td valign="top" nowrap="nowrap" align="left" class="none">
|
<td valign="middle" nowrap="nowrap" align="left" class="none">
|
||||||
|
|
||||||
<table style="width: 100px;"><tr>
|
<table style="width: 100px;"><tr>
|
||||||
<td><input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="3"></td>
|
<td><input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="3"></td>
|
||||||
|
|||||||
0
htdocs/includes/menus/init_menu_iphone.sql → htdocs/includes/menus/init_menu_smartphone.sql
Normal file → Executable file
0
htdocs/includes/menus/init_menu_iphone.sql → htdocs/includes/menus/init_menu_smartphone.sql
Normal file → Executable file
16
htdocs/includes/menus/smartphone/iphone.lib.php → htdocs/includes/menus/smartphone/smartphone.lib.php
Normal file → Executable file
16
htdocs/includes/menus/smartphone/iphone.lib.php → htdocs/includes/menus/smartphone/smartphone.lib.php
Normal file → Executable file
@ -19,20 +19,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/menus/smartphone/iphone.lib.php
|
* \file htdocs/includes/menus/smartphone/smartphone.lib.php
|
||||||
* \brief Library for file iphone menus
|
* \brief Library for file smartphone menus
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core function to output top menu iphone
|
* Core function to output top menu smartphone
|
||||||
*
|
*
|
||||||
* @param $db
|
* @param $db
|
||||||
* @param $atarget
|
* @param $atarget
|
||||||
* @param $type_user 0=Internal,1=External,2=All
|
* @param $type_user 0=Internal,1=External,2=All
|
||||||
*/
|
*/
|
||||||
function print_iphone_menu($db,$atarget,$type_user)
|
function print_smartphone_menu($db,$atarget,$type_user)
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php");
|
||||||
|
|
||||||
@ -40,9 +40,9 @@ function print_iphone_menu($db,$atarget,$type_user)
|
|||||||
|
|
||||||
$submenus='';
|
$submenus='';
|
||||||
|
|
||||||
$menutop = new Menubase($db,'iphone','top');
|
$menutop = new Menubase($db,'smartphone','top');
|
||||||
$menuleft = new Menubase($db,'iphone','left');
|
$menuleft = new Menubase($db,'smartphone','left');
|
||||||
$tabMenu = $menutop->menuTopCharger($type_user, '', 'iphone');
|
$tabMenu = $menutop->menuTopCharger($type_user, '', 'smartphone');
|
||||||
$numTabMenu = count($tabMenu);
|
$numTabMenu = count($tabMenu);
|
||||||
|
|
||||||
print_start_menu_array();
|
print_start_menu_array();
|
||||||
@ -66,7 +66,7 @@ function print_iphone_menu($db,$atarget,$type_user)
|
|||||||
print_text_menu_entry($title);
|
print_text_menu_entry($title);
|
||||||
|
|
||||||
$newmenu = new Menu();
|
$newmenu = new Menu();
|
||||||
$leftmenu = $menuleft->menuLeftCharger($newmenu,$tabMenu[$i]['mainmenu'],'',($user->societe_id?1:0),'iphone');
|
$leftmenu = $menuleft->menuLeftCharger($newmenu,$tabMenu[$i]['mainmenu'],'',($user->societe_id?1:0),'smartphone');
|
||||||
$menus = $leftmenu->liste;
|
$menus = $leftmenu->liste;
|
||||||
//var_dump($menus);
|
//var_dump($menus);
|
||||||
|
|
||||||
12
htdocs/includes/menus/smartphone/iphone_backoffice.php → htdocs/includes/menus/smartphone/smartphone_backoffice.php
Normal file → Executable file
12
htdocs/includes/menus/smartphone/iphone_backoffice.php → htdocs/includes/menus/smartphone/smartphone_backoffice.php
Normal file → Executable file
@ -18,19 +18,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/menus/smartphone/iphone_backoffice.php
|
* \file htdocs/includes/menus/smartphone/smartphone_backoffice.php
|
||||||
* \brief Gestionnaire nomme iphone du menu smartphone
|
* \brief Gestionnaire nomme smartphone du menu smartphone
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class MenuSmart
|
* \class MenuSmart
|
||||||
* \brief Class to manage smartphone menu Iphone (for internal users)
|
* \brief Class to manage smartphone menu smartphone (for internal users)
|
||||||
*/
|
*/
|
||||||
class MenuSmart {
|
class MenuSmart {
|
||||||
|
|
||||||
var $require_left=array("iphone_backoffice"); // Si doit etre en phase avec un gestionnaire de menu particulier
|
var $require_left=array("smartphone_backoffice"); // Si doit etre en phase avec un gestionnaire de menu particulier
|
||||||
var $hideifnotallowed=0; // Put 0 for back office menu, 1 for front office menu
|
var $hideifnotallowed=0; // Put 0 for back office menu, 1 for front office menu
|
||||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ class MenuSmart {
|
|||||||
*/
|
*/
|
||||||
function showmenu()
|
function showmenu()
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/menus/smartphone/iphone.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/includes/menus/smartphone/smartphone.lib.php');
|
||||||
|
|
||||||
print_iphone_menu($this->db,$this->atarget,$this->hideifnotallowed);
|
print_smartphone_menu($this->db,$this->atarget,$this->hideifnotallowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
12
htdocs/includes/menus/smartphone/iphone_frontoffice.php → htdocs/includes/menus/smartphone/smartphone_frontoffice.php
Normal file → Executable file
12
htdocs/includes/menus/smartphone/iphone_frontoffice.php → htdocs/includes/menus/smartphone/smartphone_frontoffice.php
Normal file → Executable file
@ -18,19 +18,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/menus/smartphone/iphone_frontoffice.php
|
* \file htdocs/includes/menus/smartphone/smartphone_frontoffice.php
|
||||||
* \brief Gestionnaire nomme iphone du menu smartphone
|
* \brief Gestionnaire nomme smartphone du menu smartphone
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class MenuSmart
|
* \class MenuSmart
|
||||||
* \brief Class to manage smartphone menu Iphone (for external users)
|
* \brief Class to manage smartphone menu smartphone (for external users)
|
||||||
*/
|
*/
|
||||||
class MenuSmart {
|
class MenuSmart {
|
||||||
|
|
||||||
var $require_left=array("iphone_frontoffice"); // Si doit etre en phase avec un gestionnaire de menu particulier
|
var $require_left=array("smartphone_frontoffice"); // Si doit etre en phase avec un gestionnaire de menu particulier
|
||||||
var $hideifnotallowed=1; // Put 0 for back office menu, 1 for front office menu
|
var $hideifnotallowed=1; // Put 0 for back office menu, 1 for front office menu
|
||||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ class MenuSmart {
|
|||||||
*/
|
*/
|
||||||
function showmenu()
|
function showmenu()
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/menus/smartphone/iphone.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/includes/menus/smartphone/smartphone.lib.php');
|
||||||
|
|
||||||
print_iphone_menu($this->db,$this->atarget,$this->hideifnotallowed);
|
print_smartphone_menu($this->db,$this->atarget,$this->hideifnotallowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -46,16 +46,6 @@ if (! isset($_GET["mainmenu"])) $_GET["mainmenu"]="home";
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Smartphone
|
|
||||||
if (class_exists('Smartphone'))
|
|
||||||
{
|
|
||||||
// Template directory
|
|
||||||
$smartphone->getTemplateDir();
|
|
||||||
$smartphone->title = $langs->trans("Home");
|
|
||||||
$smartphone->smartmenu();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if company name is defined (first install)
|
// Check if company name is defined (first install)
|
||||||
if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM))
|
if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM))
|
||||||
{
|
{
|
||||||
@ -63,6 +53,18 @@ if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_IN
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// If smartphone mode, we do no show main page, we show only menu
|
||||||
|
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
|
||||||
|
{
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/smartphone.class.php');
|
||||||
|
$smartphone = new Smartphone($db,$conf->browser->phone); // This class is only to know template dir according to phone type
|
||||||
|
$smartphone->title = $langs->trans("Home");
|
||||||
|
$smartphone->smartmenu();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("HomeArea"));
|
print_fiche_titre($langs->trans("HomeArea"));
|
||||||
|
|||||||
@ -62,8 +62,8 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_S
|
|||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_backoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs internes',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_STANDARD','eldy_backoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs internes',0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_STANDARD','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs externes',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_STANDARD','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu pour utilisateurs externes',0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_SMARTPHONE','iphone_backoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs internes',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENU_SMARTPHONE','eldy_backoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs internes',0);
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_SMARTPHONE','iphone_frontoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs externes',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_MENUFRONT_SMARTPHONE','eldy_frontoffice.php','chaine','Module de gestion de la barre de menu smartphone pour utilisateurs externes',0);
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible) values ('MAIN_THEME','eldy','chaine','Default theme',0);
|
insert into llx_const (name, value, type, note, visible) values ('MAIN_THEME','eldy','chaine','Default theme',0);
|
||||||
|
|
||||||
|
|||||||
@ -57,10 +57,11 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
||||||
|
|
||||||
// Select templates
|
// Select templates
|
||||||
if (class_exists('Smartphone'))
|
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
|
||||||
{
|
{
|
||||||
// Template directory
|
// Template directory
|
||||||
$smartphone->getTemplateDir();
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/smartphone.class.php');
|
||||||
|
$smartphone = new Smartphone($db,$conf->browser->phone); // This class is only to know template dir according to phone type
|
||||||
$smartphone->title = $title;
|
$smartphone->title = $title;
|
||||||
$template_dir = $smartphone->template_dir;
|
$template_dir = $smartphone->template_dir;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -264,14 +264,6 @@ if (sizeof($conf->need_smarty) > 0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init Smartphone (for dev only)
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 && isset($conf->browser->phone))
|
|
||||||
{
|
|
||||||
include_once(DOL_DOCUMENT_ROOT."/core/class/smartphone.class.php");
|
|
||||||
|
|
||||||
$smartphone = new Smartphone($db);
|
|
||||||
$smartphone->phone = $conf->browser->phone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Phase authentication / login
|
* Phase authentication / login
|
||||||
@ -666,23 +658,6 @@ if (! empty($_GET["theme"]))
|
|||||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define menu manager to use
|
|
||||||
if (empty($user->societe_id)) // If internal user or not defined
|
|
||||||
{
|
|
||||||
$conf->top_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
|
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
|
|
||||||
// For backward compatibility
|
|
||||||
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
|
|
||||||
if ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
|
|
||||||
}
|
|
||||||
else // If external user
|
|
||||||
{
|
|
||||||
$conf->top_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
|
||||||
// For backward compatibility
|
|
||||||
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_frontoffice.php';
|
|
||||||
if ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_frontoffice.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! defined('NOLOGIN'))
|
if (! defined('NOLOGIN'))
|
||||||
{
|
{
|
||||||
@ -704,6 +679,7 @@ if (! defined('NOLOGIN'))
|
|||||||
$user->getrights();
|
$user->getrights();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]);
|
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]);
|
||||||
//Another call for easy debugg
|
//Another call for easy debugg
|
||||||
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));
|
||||||
@ -770,8 +746,8 @@ if (! function_exists("llxHeader"))
|
|||||||
{
|
{
|
||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
||||||
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring);
|
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring);
|
||||||
left_menu('', $help_url, '', '', 1);
|
left_menu('', $help_url, '', '', 1, $title);
|
||||||
main_area();
|
main_area($title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1075,9 +1051,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
// Show menu
|
// Show menu
|
||||||
$menutop = new MenuTop($db);
|
$menutop = new MenuTop($db);
|
||||||
$menutop->atarget=$target;
|
$menutop->atarget=$target;
|
||||||
$menutop->showmenu();
|
$menutop->showmenu(); // This contains a \n
|
||||||
|
|
||||||
print "\n</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
// Link to login card
|
// Link to login card
|
||||||
$loginhtmltext=''; $logintext='';
|
$loginhtmltext=''; $logintext='';
|
||||||
@ -1180,6 +1156,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
print "<!-- End top horizontal menu -->\n";
|
print "<!-- End top horizontal menu -->\n";
|
||||||
|
|
||||||
if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
|
if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1192,16 +1170,15 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
* @param moresearchform Search Form Permanent Supplemental
|
* @param moresearchform Search Form Permanent Supplemental
|
||||||
* @param menu_array_after Table of menu entries to show after entries of menu handler
|
* @param menu_array_after Table of menu entries to show after entries of menu handler
|
||||||
* @param leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules.
|
* @param leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules.
|
||||||
|
* @param title Title of web page
|
||||||
*/
|
*/
|
||||||
function left_menu($menu_array_before, $helppagename='', $moresearchform='', $menu_array_after='', $leftmenuwithoutmainarea=0)
|
function left_menu($menu_array_before, $helppagename='', $moresearchform='', $menu_array_after='', $leftmenuwithoutmainarea=0, $title='')
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs, $db;
|
global $user, $conf, $langs, $db;
|
||||||
|
|
||||||
$searchform='';
|
$searchform='';
|
||||||
$bookmarks='';
|
$bookmarks='';
|
||||||
|
|
||||||
// print '<div class="vmenuplusfiche">'."\n";
|
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
||||||
else print '<td class="vmenu" valign="top">';
|
else print '<td class="vmenu" valign="top">';
|
||||||
|
|
||||||
@ -1262,7 +1239,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Left column
|
// Left column
|
||||||
print '<!-- Begin left vertical menu '.$left_menu.' -->'."\n";
|
print '<!-- Begin left area - menu '.$left_menu.' -->'."\n";
|
||||||
|
|
||||||
print '<div class="vmenu">'."\n";
|
print '<div class="vmenu">'."\n";
|
||||||
|
|
||||||
@ -1351,17 +1328,19 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div> <!-- End left layout -->'."\n";
|
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div> <!-- End left layout -->'."\n";
|
||||||
else print '</td>';
|
else print '</td>';
|
||||||
|
|
||||||
print "\n".'<!-- End of left column, begin right area -->'."\n\n";
|
print "\n";
|
||||||
// print '</div>'."\n";
|
print '<!-- End of left area -->'."\n";
|
||||||
// print '<div class="vmenuplusfiche">'."\n";
|
print "\n";
|
||||||
|
print '<!-- Begin right area -->'."\n";
|
||||||
|
|
||||||
if (empty($leftmenuwithoutmainarea)) main_area();
|
|
||||||
|
if (empty($leftmenuwithoutmainarea)) main_area($title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begin main area
|
* Begin main area
|
||||||
*/
|
*/
|
||||||
function main_area()
|
function main_area($title='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@ -1371,12 +1350,26 @@ function main_area()
|
|||||||
print '<table width="100%" class="notopnoleftnoright" summary="centermenutable" id="undertopmenu"><tr>';
|
print '<table width="100%" class="notopnoleftnoright" summary="centermenutable" id="undertopmenu"><tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td valign="top"><!-- Begin right area --> '."\n";
|
print '<td valign="top">'."\n";
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n";
|
print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n";
|
||||||
|
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
|
||||||
|
{
|
||||||
|
print '<div data-role="page"> <!-- begin div data-role="page" -->';
|
||||||
|
|
||||||
|
print '<div data-role="header" data-nobackbtn="false" data-theme="b">';
|
||||||
|
print '<div id="dol-homeheader">'."\n";
|
||||||
|
$appli='Dolibarr';
|
||||||
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||||
|
print $appli;
|
||||||
|
print '</div>'."\n";
|
||||||
|
print '</div>'."\n";
|
||||||
|
print "\n";
|
||||||
|
|
||||||
|
print '<div data-role="content"> <!-- begin div data-role="content" -->'."\n";
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
|
if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1420,12 +1413,12 @@ function getHelpParamFor($helppagename,$langs)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show a search area
|
* Show a search area
|
||||||
* \param urlaction Url post
|
* @param urlaction Url post
|
||||||
* \param urlobject Url of the link under the search box
|
* @param urlobject Url of the link under the search box
|
||||||
* \param title Title search area
|
* @param title Title search area
|
||||||
* \param htmlmodesearch 'search'
|
* @param htmlmodesearch 'search'
|
||||||
* \param htmlinputname Field Name input form
|
* @param htmlinputname Field Name input form
|
||||||
*/
|
*/
|
||||||
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$htmlinputname)
|
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$htmlinputname)
|
||||||
{
|
{
|
||||||
@ -1448,6 +1441,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch='search',$
|
|||||||
/**
|
/**
|
||||||
* Return list of login method of third party module.
|
* Return list of login method of third party module.
|
||||||
* @return array
|
* @return array
|
||||||
|
* TODO Move this into security.lib.php
|
||||||
*/
|
*/
|
||||||
function getLoginMethod()
|
function getLoginMethod()
|
||||||
{
|
{
|
||||||
@ -1500,9 +1494,9 @@ function getLoginMethod()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show HTML footer DIV + BODY + HTML
|
* Show HTML footer
|
||||||
* \remarks Close 2 div
|
* Close div /DIV data-role=page + /DIV class=fiche + /DIV /DIV main layout + /BODY + /HTML
|
||||||
* \param foot A text to add in HTML generated page
|
* @param foot A text to add in HTML generated page
|
||||||
*/
|
*/
|
||||||
if (! function_exists("llxFooter"))
|
if (! function_exists("llxFooter"))
|
||||||
{
|
{
|
||||||
@ -1529,12 +1523,19 @@ if (! function_exists("llxFooter"))
|
|||||||
define("MAIN_CORE_ERROR",0);
|
define("MAIN_CORE_ERROR",0);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "\n\n".'</div> <!-- end div class="fiche" -->'."\n";
|
print "\n\n";
|
||||||
|
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
|
||||||
|
{
|
||||||
|
print '</div> <!-- end div data-role="content" -->'."\n";
|
||||||
|
print '</div> <!-- end div data-role="page" -->'."\n";
|
||||||
|
}
|
||||||
|
print '</div> <!-- end div class="fiche" -->'."\n";
|
||||||
|
|
||||||
|
|
||||||
// print "\n".'</div> <!-- end div class="vmenuplusfiche" -->'."\n";
|
|
||||||
print "\n".'</td></tr></table> <!-- end right area -->'."\n";
|
print "\n".'</td></tr></table> <!-- end right area -->'."\n";
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div></div> <!-- end main layout -->'."\n";
|
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print '</div></div> <!-- end main layout -->'."\n";
|
||||||
|
|
||||||
|
|
||||||
if (! empty($_SERVER['DOL_TUNING']))
|
if (! empty($_SERVER['DOL_TUNING']))
|
||||||
{
|
{
|
||||||
$micro_end_time=dol_microtime_float(true);
|
$micro_end_time=dol_microtime_float(true);
|
||||||
@ -1562,6 +1563,7 @@ if (! function_exists("llxFooter"))
|
|||||||
if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); }
|
if (defined('XDEBUGCOVERAGE')) { var_dump(xdebug_get_code_coverage()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If there is some logs in buffer to show
|
// If there is some logs in buffer to show
|
||||||
if (sizeof($conf->logbuffer))
|
if (sizeof($conf->logbuffer))
|
||||||
{
|
{
|
||||||
@ -1581,6 +1583,7 @@ if (! function_exists("llxFooter"))
|
|||||||
|
|
||||||
if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n";
|
if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n";
|
||||||
|
|
||||||
|
|
||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
print "</html>\n";
|
print "</html>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,16 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<div data-role="page">
|
||||||
|
|
||||||
|
<!-- <div data-role="header" data-theme="b">
|
||||||
|
<h1>Introduction</h1>
|
||||||
|
<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<div data-role="content">
|
||||||
|
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -14,5 +24,9 @@
|
|||||||
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -5,6 +5,16 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<div data-role="page">
|
||||||
|
|
||||||
|
<!-- <div data-role="header" data-theme="b">
|
||||||
|
<h1>Introduction</h1>
|
||||||
|
<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<div data-role="content">
|
||||||
|
|
||||||
<h2>Error</h2>
|
<h2>Error</h2>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -14,5 +24,9 @@
|
|||||||
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
<?php print isset($_SERVER["HTTP_REFERER"])?'You come from '.$_SERVER["HTTP_REFERER"].'.':''; ?>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -43,9 +43,12 @@ else header('Cache-Control: no-cache');
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
#dol-homeheader { height: 40px; font-size: 16px; }
|
||||||
|
.ui-header { height: 40px; font-size: 16px; }
|
||||||
|
|
||||||
/*.ui-mobile #dol-home { background: #e5e5e5 url(<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/menu/pinstripes.png'; ?>) top center repeat-x; }*/
|
/*.ui-mobile #dol-home { background: #e5e5e5 url(<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/menu/pinstripes.png'; ?>) top center repeat-x; }*/
|
||||||
.ui-mobile #dol-home { background: #e5e5e5 }
|
.ui-mobile #dol-home { background: #e5e5e5 }
|
||||||
.ui-mobile #dol-homeheader { padding: 5px 5px 0; text-align: center }
|
.ui-mobile #dol-homeheader { padding: 10px 5px 0; text-align: center }
|
||||||
.ui-mobile #dol-homeheader h1 { margin: 0 0 10px; }
|
.ui-mobile #dol-homeheader h1 { margin: 0 0 10px; }
|
||||||
.ui-mobile #dol-homeheader p { margin: 0; }
|
.ui-mobile #dol-homeheader p { margin: 0; }
|
||||||
|
|
||||||
|
|||||||
@ -17,21 +17,15 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
header('Cache-Control: Public, must-revalidate');
|
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<!-- BEGIN HEADER SMARTPHONE TEMPLATE -->
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title><?php echo $this->title; ?></title>
|
<title><?php echo $title; ?></title>
|
||||||
<meta name="robots" content="noindex,nofollow" />
|
<meta name="robots" content="noindex,nofollow" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<link rel="apple-touch-icon" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$this->theme.'/thumbs/homescreen.png'; ?>" />
|
<link rel="apple-touch-icon" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$conf->theme.'/img/homescreen.png'; ?>" />
|
||||||
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/includes/jquery/mobile/jquery.mobile-latest.min.css'; ?>" />
|
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/includes/jquery/mobile/jquery.mobile-latest.min.css'; ?>" />
|
||||||
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/default.css.php'; ?>" />
|
<link rel="stylesheet" href="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/default/default.css.php'; ?>" />
|
||||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min.js'; ?>"></script>
|
<script type="text/javascript" src="<?php echo DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min.js'; ?>"></script>
|
||||||
|
|||||||
@ -17,17 +17,20 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
$smartphone->smartheader();
|
include('header.tpl.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- START LOGIN SMARTPHONE TEMPLATE -->
|
<!-- START LOGIN SMARTPHONE TEMPLATE -->
|
||||||
|
|
||||||
<div data-role="page" id="dol-home" data-theme="b">
|
<div data-role="page" id="dol-home" data-theme="b">
|
||||||
|
|
||||||
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
||||||
<div id="dol-homeheader">
|
<div id="dol-homeheader">
|
||||||
<img src="<?php echo $dol_url_root.'/theme/phones/smartphone/theme/'.$smartphone->theme.'/img/dolibarr.png'; ?>">
|
<?php
|
||||||
</div>
|
$appli='Dolibarr';
|
||||||
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||||
|
print $appli;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
@ -65,19 +68,20 @@ $smartphone->smartheader();
|
|||||||
<div data-role="footer" data-id="foo1" data-theme="b">
|
<div data-role="footer" data-id="foo1" data-theme="b">
|
||||||
<div data-role="navbar">
|
<div data-role="navbar">
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<?php if ($forgetpasslink) { ?>
|
<?php if ($forgetpasslink) { ?>
|
||||||
<li><a href="<?php echo 'user/passwordforgotten.php'; ?>" data-icon="gear"><?php echo $langs->trans('PasswordForgotten'); ?></a></li>
|
<a href="<?php echo $dol_url_root.'/user/passwordforgotten.php'; ?>" data-icon="gear"><?php echo $langs->trans('PasswordForgotten'); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
</li>
|
||||||
<?php if ($helpcenterlink) { ?>
|
<li>
|
||||||
<li><a href="<?php echo 'support/index.php'; ?>" data-icon="info"><?php echo $langs->trans('NeedHelpCenter'); ?></a></li>
|
<?php if ($helpcenterlink && 1 == 2) { ?>
|
||||||
<?php } ?>
|
<a href="<?php echo $dol_url_root.'/support/index.php'; ?>" data-icon="info"><?php echo $langs->trans('NeedHelpCenter'); ?></a>
|
||||||
</ul>
|
<?php } ?>
|
||||||
</div><!-- /navbar -->
|
</li>
|
||||||
</div><!-- /footer -->
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div><!-- /page -->
|
</div><!-- /page -->
|
||||||
|
|
||||||
<?php if ($dol_loginmesg) { ?>
|
<?php if ($dol_loginmesg) { ?>
|
||||||
@ -85,7 +89,8 @@ $smartphone->smartheader();
|
|||||||
alert('<?php echo $dol_loginmesg; ?>');
|
alert('<?php echo $dol_loginmesg; ?>');
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- END LOGIN SMARTPHONE TEMPLATE -->
|
<!-- END LOGIN SMARTPHONE TEMPLATE -->
|
||||||
|
|
||||||
<?php $smartphone->smartfooter(); ?>
|
<?php
|
||||||
|
include('footer.tpl.php');
|
||||||
|
?>
|
||||||
@ -17,20 +17,28 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
$this->smartheader();
|
require('header.tpl.php');
|
||||||
?>
|
?>
|
||||||
|
<div data-role="page" data-theme="b" id="dol-home">
|
||||||
<!-- START MENU SMARTPHONE TEMPLATE -->
|
|
||||||
|
|
||||||
<div data-role="page" id="dol-home">
|
|
||||||
|
|
||||||
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
<div data-role="header" data-nobackbtn="true" data-theme="b">
|
||||||
<div id="dol-homeheader">
|
<div id="dol-homeheader">
|
||||||
<img src="<?php echo DOL_URL_ROOT.'/theme/phones/smartphone/theme/'.$this->theme.'/img/dolibarr.png'; ?>">
|
<?php
|
||||||
|
$appli='Dolibarr';
|
||||||
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||||
|
print $appli;
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
<!--
|
||||||
|
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
|
||||||
|
<li data-role="list-divider">Overview</li>
|
||||||
|
<li><a href="http://jquerymobile.com/test/docs/about/intro.html">Intro to jQuery Mobile</a></li>
|
||||||
|
<li><a href="http://localhost/dolibarrnew/public/error-401.php">Features</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
|
||||||
<?php $menusmart->showmenu(); ?>
|
<?php $menusmart->showmenu(); ?>
|
||||||
|
|
||||||
@ -49,4 +57,7 @@ $this->smartheader();
|
|||||||
|
|
||||||
<!-- END MENU SMARTPHONE TEMPLATE -->
|
<!-- END MENU SMARTPHONE TEMPLATE -->
|
||||||
|
|
||||||
<?php $this->smartfooter(); ?>
|
<?php
|
||||||
|
require('footer.tpl.php');
|
||||||
|
// $this->smartfooter();
|
||||||
|
?>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
$smartphone->smartheader();
|
include('header.tpl.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN SMARTPHONE TEMPLATE -->
|
<!-- BEGIN SMARTPHONE TEMPLATE -->
|
||||||
@ -25,7 +25,9 @@ $smartphone->smartheader();
|
|||||||
<div data-role="page" id="dol-home" data-theme="b">
|
<div data-role="page" id="dol-home" data-theme="b">
|
||||||
|
|
||||||
<div data-role="header" data-theme="b" data-position="inline">
|
<div data-role="header" data-theme="b" data-position="inline">
|
||||||
<h1><?php echo $langs->trans('Identification'); ?></h1>
|
<div id="dol-homeheader">
|
||||||
|
<?php echo $langs->trans('Identification'); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
@ -74,4 +76,6 @@ $smartphone->smartheader();
|
|||||||
|
|
||||||
<!-- END SMARTPHONE TEMPLATE -->
|
<!-- END SMARTPHONE TEMPLATE -->
|
||||||
|
|
||||||
<?php $smartphone->smartfooter(); ?>
|
<?php
|
||||||
|
include('footer.tpl.php');
|
||||||
|
?>
|
||||||
@ -151,10 +151,10 @@ $title='Dolibarr '.DOL_VERSION;
|
|||||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
|
||||||
|
|
||||||
// Select templates
|
// Select templates
|
||||||
if (class_exists('Smartphone'))
|
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
|
||||||
{
|
{
|
||||||
// Template directory
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/smartphone.class.php');
|
||||||
$smartphone->getTemplateDir();
|
$smartphone = new Smartphone($db,$conf->browser->phone); // This class is only to know template dir according to phone type
|
||||||
$smartphone->title = $title;
|
$smartphone->title = $title;
|
||||||
$template_dir = $smartphone->template_dir;
|
$template_dir = $smartphone->template_dir;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user