mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: Removed warning
Fix: Parameters are lost Fix: Hedaer of demo no complete Fix: Get of country is not complete (bad label)
This commit is contained in:
parent
26f3e920cf
commit
9a4cc839bb
|
|
@ -834,7 +834,7 @@ if ($id > 0)
|
|||
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
if($orders2invoice > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
|
||||
if (! empty($orders2invoice) && $orders2invoice > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/orderstoinvoice.php?socid='.$object->id.'">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NoOrdersToInvoice")).'" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ function societe_prepare_head($object)
|
|||
if ($object->client==1 || $object->client==2 || $object->client==3)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id;
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] = $langs->trans("Prospect");
|
||||
$head[$h][1]='';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] .= $langs->trans("Prospect");
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer");
|
||||
$head[$h][2] = 'customer';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
if (GETPOST('dol_hide_topmenu')) $conf->dol_use_jmobile=1;
|
||||
if (GETPOST('dol_hide_topmenu')) $conf->dol_hide_topmenu=1;
|
||||
if (GETPOST('dol_hide_leftmenu')) $conf->dol_hide_leftmenu=1;
|
||||
if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
|
||||
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
|
||||
|
|
|
|||
|
|
@ -345,13 +345,32 @@ if (! defined('NOLOGIN'))
|
|||
// It is not already authenticated and it requests the login / password
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
|
||||
$dol_dst_observed=GETPOST("dst_observed",3);
|
||||
$dol_dst_first=GETPOST("dst_first",3);
|
||||
$dol_dst_second=GETPOST("dst_second",3);
|
||||
$dol_screenwidth=GETPOST("screenwidth",3);
|
||||
$dol_screenheight=GETPOST("screenheight",3);
|
||||
$dol_hide_topmenu=GETPOST('dol_hide_topmenu',3);
|
||||
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu',3);
|
||||
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen',3);
|
||||
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover',3);
|
||||
$dol_use_jmobile=GETPOST('dol_use_jmobile',3);
|
||||
//dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,','));
|
||||
|
||||
// If in demo mode, we check we go to home page through the public/demo/index.php page
|
||||
if (! empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') // We ask index page
|
||||
{
|
||||
if (! preg_match('/public/',$_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
dol_syslog("Call index page from another url than demo page");
|
||||
header("Location: ".DOL_URL_ROOT.'/public/demo/index.php');
|
||||
$url='';
|
||||
$url.=($url?'&':'').($dol_hide_topmenu?'dol_hide_topmenu='.$dol_hide_topmenu:'');
|
||||
$url.=($url?'&':'').($dol_hide_leftmenu?'dol_hide_leftmenu='.$dol_hide_leftmenu:'');
|
||||
$url.=($url?'&':'').($dol_optimize_smallscreen?'dol_optimize_smallscreen='.$dol_optimize_smallscreen:'');
|
||||
$url.=($url?'&':'').($dol_no_mouse_hover?'dol_no_mouse_hover='.$dol_no_mouse_hover:'');
|
||||
$url.=($url?'&':'').($dol_use_jmobile?'dol_use_jmobile='.$dol_use_jmobile:'');
|
||||
$url=DOL_URL_ROOT.'/public/demo/index.php'.($url?'?'.$url:'');
|
||||
header("Location: ".$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -422,17 +441,6 @@ if (! defined('NOLOGIN'))
|
|||
if ($datenow >= $datefirst && $datenow < $datesecond) $dol_dst=1;
|
||||
}
|
||||
//print $datefirst.'-'.$datesecond.'-'.$datenow; exit;
|
||||
$dol_dst_observed=$_POST["dst_observed"];
|
||||
$dol_dst_first=$_POST["dst_first"];
|
||||
$dol_dst_second=$_POST["dst_second"];
|
||||
$dol_screenwidth=$_POST["screenwidth"];
|
||||
$dol_screenheight=$_POST["screenheight"];
|
||||
$dol_hide_topmenu=$_POST['dol_hide_topmenu'];
|
||||
$dol_hide_leftmenu=$_POST['dol_hide_leftmenu'];
|
||||
$dol_optimize_smallscreen=$_POST['dol_optimize_smallscreen'];
|
||||
$dol_no_mouse_hover=$_POST['dol_no_mouse_hover'];
|
||||
$dol_use_jmobile=$_POST['dol_use_jmobile'];
|
||||
//dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,','));
|
||||
}
|
||||
|
||||
if (! $login)
|
||||
|
|
@ -1788,7 +1796,7 @@ if (! function_exists("llxFooter"))
|
|||
print "\n";
|
||||
if ($foot) print '<!-- '.$foot.' -->'."\n";
|
||||
|
||||
printCommonFooter();
|
||||
printCommonFooter($foot);
|
||||
|
||||
if (empty($conf->dol_hide_leftmenu)) print '</div>'; // End div container
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ $langs->load("main");
|
|||
$langs->load("install");
|
||||
$langs->load("other");
|
||||
|
||||
$conf->dol_hide_topmenu=GETPOST('dol_hide_topmenu');
|
||||
$conf->dol_hide_leftmenu=GETPOST('dol_hide_leftmenu');
|
||||
$conf->dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen');
|
||||
$conf->dol_no_mouse_hover=GETPOST('dol_no_mouse_hover');
|
||||
$conf->dol_use_jmobile=GETPOST('dol_use_jmobile');
|
||||
|
||||
// Security check
|
||||
global $dolibarr_main_demo;
|
||||
if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page',1,1,1);
|
||||
|
|
@ -217,13 +223,19 @@ if (GETPOST("action") == 'gotodemo')
|
|||
$disablestring.=$modulekeyname.',';
|
||||
if ($modulekeyname=='propale') $disablestring.='propal,';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Do redirect to login page
|
||||
if ($disablestring)
|
||||
{
|
||||
$url=DOL_URL_ROOT.'/index.php?'.(GETPOST('urlfrom','alpha')?'urlfrom='.urlencode(GETPOST('urlfrom','alpha')).'&':'').'disablemodules='.$disablestring;
|
||||
$url='';
|
||||
$url.=($url?'&':'').($conf->dol_hide_topmenu?'dol_hide_topmenu='.$conf->dol_hide_topmenu:'');
|
||||
$url.=($url?'&':'').($conf->dol_hide_leftmenu?'dol_hide_leftmenu='.$conf->dol_hide_leftmenu:'');
|
||||
$url.=($url?'&':'').($conf->dol_optimize_smallscreen?'dol_optimize_smallscreen='.$conf->dol_optimize_smallscreen:'');
|
||||
$url.=($url?'&':'').($conf->dol_no_mouse_hover?'dol_no_mouse_hover='.$conf->dol_no_mouse_hover:'');
|
||||
$url.=($url?'&':'').($conf->dol_use_jmobile?'dol_use_jmobile='.$conf->dol_use_jmobile:'');
|
||||
if (GETPOST('urlfrom')) $url.=($url?'&':'').'urlfrom='.urlencode(GETPOST('urlfrom','alpha'));
|
||||
$url=DOL_URL_ROOT.'/index.php?'.($url?$url.'&':'').'disablemodules='.$disablestring;
|
||||
header("Location: ".$url);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -234,34 +246,64 @@ if (GETPOST("action") == 'gotodemo')
|
|||
* View
|
||||
*/
|
||||
|
||||
llxHeaderVierge($langs->trans("DolibarrDemo"));
|
||||
$head='';
|
||||
$head.='<meta name="keywords" content="dolibarr,demo,online,demonstration,example,test,web,erp,crm,demos,online">'."\n";
|
||||
$head.='<meta name="description" content="Dolibarr simple ERP/CRM demo. You can test here several profiles of Dolibarr ERP/CRM demos.">'."\n";
|
||||
$head.='<style type="text/css">'."\n";
|
||||
$head.='.body { font: 12px arial,verdana,helvetica !important; }'."\n";
|
||||
$head.='.CTable {
|
||||
padding: 6px;
|
||||
font: 12px arial,verdana,helvetica;
|
||||
font-weight: normal;
|
||||
color: #444444 !important;
|
||||
|
||||
margin: 8px 0px 8px 2px;
|
||||
|
||||
border-left: 1px solid #DDD;
|
||||
border-right: 1px solid #DDD;
|
||||
border-bottom: 1px solid #EEE;
|
||||
border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
|
||||
-moz-box-shadow: 4px 4px 4px #EEE;
|
||||
-webkit-box-shadow: 4px 4px 4px #EEE;
|
||||
box-shadow: 4px 4px 4px #EEE;
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var openedId='';
|
||||
jQuery(document).ready(function () {
|
||||
jQuery('tr.moduleline').hide();
|
||||
// Enable this to allow personalized setup
|
||||
jQuery('.modulelineshow').attr('href','#');
|
||||
jQuery('.cursorpointer').css('cursor','pointer');
|
||||
jQuery(".modulelineshow").click(function() {
|
||||
var idstring=$(this).attr('id');
|
||||
if (typeof idstring != "undefined")
|
||||
{
|
||||
var currentId = idstring.substring(2);
|
||||
jQuery('tr.moduleline').hide();
|
||||
if (currentId != openedId)
|
||||
{
|
||||
openedId=currentId;
|
||||
jQuery("#tr1"+currentId).show();
|
||||
jQuery("#tr2"+currentId).show();
|
||||
}
|
||||
else openedId = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
<script type="text/javascript">
|
||||
var openedId="";
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("tr.moduleline").hide();
|
||||
// Enable this to allow personalized setup
|
||||
jQuery(".modulelineshow").attr("href","#");
|
||||
jQuery(".cursorpointer").css("cursor","pointer");
|
||||
jQuery(".modulelineshow").click(function() {
|
||||
var idstring=$(this).attr("id");
|
||||
if (typeof idstring != "undefined")
|
||||
{
|
||||
var currentId = idstring.substring(2);
|
||||
jQuery("tr.moduleline").hide();
|
||||
if (currentId != openedId)
|
||||
{
|
||||
openedId=currentId;
|
||||
jQuery("#tr1"+currentId).show();
|
||||
jQuery("#tr2"+currentId).show();
|
||||
}
|
||||
else openedId = "";
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
llxHeaderVierge($langs->trans("DolibarrDemo"), $head);
|
||||
|
||||
|
||||
print "\n";
|
||||
|
|
@ -305,6 +347,11 @@ foreach ($demoprofiles as $profilearray)
|
|||
print '<input type="hidden" name="urlfrom" value="'.dol_escape_htmltag($urlfrom).'">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||
print '<input type="hidden" name="username" value="demo">'."\n";
|
||||
print '<input type="hidden" name="dol_hide_topmenu" value="'.$conf->dol_hide_topmenu.'">'."\n";
|
||||
print '<input type="hidden" name="dol_hide_leftmenu" value="'.$conf->dol_hide_leftmenu.'">'."\n";
|
||||
print '<input type="hidden" name="dol_optimize_smallscreen" value="'.$conf->dol_optimize_smallscreen.'">'."\n";
|
||||
print '<input type="hidden" name="dol_no_mouse_hover" value="'.$conf->dol_no_mouse_hover.'">'."\n";
|
||||
print '<input type="hidden" name="dol_use_jmobile" value="'.$conf->dol_use_jmobile.'">'."\n";
|
||||
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
|
||||
// Title
|
||||
print '<tr>';
|
||||
|
|
@ -409,55 +456,10 @@ function llxHeaderVierge($title, $head = "")
|
|||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
//print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd>';
|
||||
print "\n";
|
||||
print "<html>\n";
|
||||
print "<head>\n";
|
||||
print '<meta name="robots" content="index,nofollow">'."\n";
|
||||
print '<meta name="keywords" content="dolibarr,demo,online,demonstration,example,test,web,erp,crm,demos,online">'."\n";
|
||||
print '<meta name="description" content="Dolibarr simple ERP/CRM demo. You can test here several profiles of Dolibarr ERP/CRM demos.">'."\n";
|
||||
print "<title>".$title."</title>\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php?lang='.$langs->defaultlang.'">'."\n";
|
||||
print '<!-- Includes for JQuery -->'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui-latest.custom.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd_0_5.js"></script>'."\n";
|
||||
if ($head) print $head."\n";
|
||||
print '<style type="text/css">'."\n";
|
||||
print '.body { font: 12px arial,verdana,helvetica !important; }'."\n";
|
||||
print '.CTable {
|
||||
padding: 6px;
|
||||
font: 12px arial,verdana,helvetica;
|
||||
font-weight: normal;
|
||||
color: #444444 !important;
|
||||
/* text-shadow: 1px 2px 3px #AFAFAF; */
|
||||
|
||||
margin: 8px 0px 8px 2px;
|
||||
|
||||
border-left: 1px solid #DDD;
|
||||
border-right: 1px solid #DDD;
|
||||
border-bottom: 1px solid #EEE;
|
||||
border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
|
||||
-moz-box-shadow: 4px 4px 4px #EEE;
|
||||
-webkit-box-shadow: 4px 4px 4px #EEE;
|
||||
box-shadow: 4px 4px 4px #EEE;
|
||||
|
||||
background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||
|
||||
}';
|
||||
// print '.CTableRow1 { background: #f0f0f0; color: #000000; }';
|
||||
// print '.CTableRow0 { background: #fafafa; color: #000000; }';
|
||||
print '</style>';
|
||||
print "</head>\n";
|
||||
top_httphead();
|
||||
|
||||
top_htmlhead($head,$title);
|
||||
|
||||
print '<body style="margin: 20px;">'."\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1096,21 +1096,11 @@ else
|
|||
$object->localtax2_assuj = GETPOST('localtax2assuj_value');
|
||||
|
||||
// We set country_id, and country_code label of the chosen country
|
||||
// TODO move to DAO class
|
||||
if ($object->country_id)
|
||||
if ($object->country_id > 0)
|
||||
{
|
||||
$sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".$object->country_id;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
$object->country_code = $obj->code;
|
||||
$object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
||||
$tmparray=getCountry($object->country_id,'all');
|
||||
$object->country_code = $tmparray['code'];
|
||||
$object->country = $tmparray['label'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user