Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0
This commit is contained in:
commit
166b5da560
16
ChangeLog
16
ChangeLog
@ -2,6 +2,22 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 5.0.4 compared to 5.0.3 *****
|
||||||
|
FIX: #6880
|
||||||
|
FIX: #6925
|
||||||
|
FIX: #6926
|
||||||
|
FIX: Can set supplier invoice to billed.
|
||||||
|
FIX: Can't create invoice if PO disapproved
|
||||||
|
FIX: contratligne update
|
||||||
|
FIX: CVE-2017-7886
|
||||||
|
FIX: default param
|
||||||
|
FIX: Line of invoices not inserted when using POS module and VAT NPR.
|
||||||
|
FIX: origin & originid on supplierproposal
|
||||||
|
FIX: Redirect to payment page from member subscription page failed if a unique security key was defined.
|
||||||
|
FIX: REST api to get project when user has permission to read all.
|
||||||
|
FIX: situation_progress param default value must be 100 and not 0
|
||||||
|
FIX: SQL injection on user/index.php parameter search_statut.
|
||||||
|
FIX: Warnings
|
||||||
|
|
||||||
***** ChangeLog for 5.0.3 compared to 5.0.2 *****
|
***** ChangeLog for 5.0.3 compared to 5.0.2 *****
|
||||||
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
|
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
|
||||||
|
|||||||
@ -38,7 +38,7 @@ if (! $user->admin)
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$title=$langs->trans("SystemToolsArea");
|
$title=$langs->trans("SystemToolsArea");
|
||||||
if (GETPOST('leftmenu') == 'admintools') $title=$langs->trans("ModulesSystemTools");
|
if (GETPOST('leftmenu',"aZ09") == 'admintools') $title=$langs->trans("ModulesSystemTools");
|
||||||
|
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ function printBookmarksList($aDb, $aLangs)
|
|||||||
|
|
||||||
$langs->load("bookmarks");
|
$langs->load("bookmarks");
|
||||||
|
|
||||||
$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');
|
$url= $_SERVER["PHP_SELF"].(dol_escape_htmltag($_SERVER["QUERY_STRING"])?'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]):'');
|
||||||
|
|
||||||
$ret = '';
|
$ret = '';
|
||||||
// Menu bookmark
|
// Menu bookmark
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
@ -63,6 +63,12 @@ if (! $sortfield) $sortfield="name";
|
|||||||
|
|
||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
$object->fetch($id,$ref);
|
$object->fetch($id,$ref);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if ($object->id > 0)
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -70,11 +76,6 @@ if ($object->id > 0)
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@ -273,25 +273,25 @@ if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
|||||||
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
}
|
}
|
||||||
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
||||||
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
if ($search_zip) $sql.= natural_search("s.zip", $search_zip);
|
||||||
if ($search_state) $sql.= natural_search("state.nom",$search_state);
|
if ($search_state) $sql.= natural_search("state.nom", $search_state);
|
||||||
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')';
|
||||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')';
|
||||||
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||||
if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer);
|
if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer);
|
||||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||||
if ($search_login) $sql.= " AND u.login LIKE '%".$db->escape(trim($search_login))."%'";
|
if ($search_login) $sql .= natural_search("u.login", $search_login);
|
||||||
if ($search_montant_ht != '') $sql.= natural_search("p.total_ht", $search_montant_ht, 1);
|
if ($search_montant_ht != '') $sql.= natural_search("p.total_ht", $search_montant_ht, 1);
|
||||||
if ($search_montant_vat != '') $sql.= natural_search("p.tva", $search_montant_vat, 1);
|
if ($search_montant_vat != '') $sql.= natural_search("p.tva", $search_montant_vat, 1);
|
||||||
if ($search_montant_ttc != '') $sql.= natural_search("p.total", $search_montant_ttc, 1);
|
if ($search_montant_ttc != '') $sql.= natural_search("p.total", $search_montant_ttc, 1);
|
||||||
if ($sall) {
|
if ($sall) {
|
||||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||||
}
|
}
|
||||||
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
|
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$db->escape($search_product_category);
|
||||||
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
|
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
|
||||||
if ($viewstatut != '' && $viewstatut != '-1')
|
if ($viewstatut != '' && $viewstatut != '-1')
|
||||||
{
|
{
|
||||||
$sql.= ' AND p.fk_statut IN ('.$viewstatut.')';
|
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
||||||
}
|
}
|
||||||
if ($month > 0)
|
if ($month > 0)
|
||||||
{
|
{
|
||||||
@ -300,16 +300,16 @@ if ($month > 0)
|
|||||||
else if ($year > 0 && ! empty($day))
|
else if ($year > 0 && ! empty($day))
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
|
||||||
else
|
else
|
||||||
$sql.= " AND date_format(p.datep, '%m') = '".$month."'";
|
$sql.= " AND date_format(p.datep, '%m') = '".$db->escape($month)."'";
|
||||||
}
|
}
|
||||||
else if ($year > 0)
|
else if ($year > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
$sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||||
}
|
}
|
||||||
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
|
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale);
|
||||||
if ($search_user > 0)
|
if ($search_user > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$search_user;
|
$sql.= " AND c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$db->escape($search_user);
|
||||||
}
|
}
|
||||||
// Add where from extra fields
|
// Add where from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
@ -363,22 +363,22 @@ if ($resql)
|
|||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
$param='&viewstatut='.$viewstatut;
|
$param='&viewstatut='.urlencode($viewstatut);
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
if ($sall) $param.='&sall='.$sall;
|
if ($sall) $param.='&sall='.urlencode($sall);
|
||||||
if ($month) $param.='&month='.$month;
|
if ($month) $param.='&month='.urlencode($month);
|
||||||
if ($year) $param.='&year='.$year;
|
if ($year) $param.='&year='.urlencode($year);
|
||||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
|
||||||
if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer;
|
if ($search_refcustomer) $param.='&search_refcustomer='.urlencode($search_refcustomer);
|
||||||
if ($search_societe) $param.='&search_societe=' .$search_societe;
|
if ($search_societe) $param.='&search_societe='.urlencode($search_societe);
|
||||||
if ($search_user > 0) $param.='&search_user='.$search_user;
|
if ($search_user > 0) $param.='&search_user='.urlencode($search_user);
|
||||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
|
||||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
||||||
if ($search_login) $param.='&search_login='.$search_login;
|
if ($search_login) $param.='&search_login='.urlencode($search_login);
|
||||||
if ($search_town) $param.='&search_town='.$search_town;
|
if ($search_town) $param.='&search_town='.urlencode($search_town);
|
||||||
if ($socid > 0) $param.='&socid='.$socid;
|
if ($socid > 0) $param.='&socid='.urlencode($socid);
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3327,7 +3327,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $object->situation_counter;
|
print $object->situation_counter;
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td align="left" class="nowrap">';
|
||||||
|
|
||||||
$prevsits_total_amount = 0;
|
$prevsits_total_amount = 0;
|
||||||
foreach ($prevsits as $situation) {
|
foreach ($prevsits as $situation) {
|
||||||
@ -3335,9 +3335,10 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$prevsits_total_amount += $object->total_ht;
|
$prevsits_total_amount += $object->total_ht;
|
||||||
|
|
||||||
print price($prevsits_total_amount);
|
print price($prevsits_total_amount, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
// Previous situation(s) deduction(s)
|
// Previous situation(s) deduction(s)
|
||||||
for ($i = 0; $i < $cprevsits; $i++) {
|
for ($i = 0; $i < $cprevsits; $i++) {
|
||||||
@ -3348,10 +3349,10 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $prevsits[$i]->situation_counter;
|
print $prevsits[$i]->situation_counter;
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td align="left" class="nowrap">';
|
||||||
print '- ' . price($prevsits[$i]->total_ht);
|
print '- ' . price($prevsits[$i]->total_ht, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
print '</td></tr>';
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3489,7 +3490,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
if ($object->type == Facture::TYPE_SITUATION && ! empty($conf->global->INVOICE_USE_SITUATION))
|
if ($object->type == Facture::TYPE_SITUATION && ! empty($conf->global->INVOICE_USE_SITUATION))
|
||||||
{
|
{
|
||||||
if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0)
|
if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0)
|
||||||
print '<table class="nobordernopadding paymenttable" width="100%">';
|
print '<table class="noborder situationstable" width="100%">';
|
||||||
|
|
||||||
if (count($object->tab_previous_situation_invoice) > 0) {
|
if (count($object->tab_previous_situation_invoice) > 0) {
|
||||||
// List of previous invoices
|
// List of previous invoices
|
||||||
@ -3523,7 +3524,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print '<td colspan="2" align="right"></td>';
|
print '<td colspan="3" align="right"></td>';
|
||||||
print '<td align="right"><b>' . price($total_prev_ht) . '</b></td>';
|
print '<td align="right"><b>' . price($total_prev_ht) . '</b></td>';
|
||||||
print '<td align="right"><b>' . price($total_prev_ttc) . '</b></td>';
|
print '<td align="right"><b>' . price($total_prev_ttc) . '</b></td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
@ -3563,7 +3564,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print '<td colspan="2" align="right"></td>';
|
print '<td colspan="3" align="right"></td>';
|
||||||
print '<td align="right"><b>' . price($total_next_ht) . '</b></td>';
|
print '<td align="right"><b>' . price($total_next_ht) . '</b></td>';
|
||||||
print '<td align="right"><b>' . price($total_next_ttc) . '</b></td>';
|
print '<td align="right"><b>' . price($total_next_ttc) . '</b></td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
|
|||||||
@ -150,6 +150,15 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave'))
|
|||||||
{
|
{
|
||||||
$filenamefrom=dol_sanitizeFileName(GETPOST('renamefilefrom'));
|
$filenamefrom=dol_sanitizeFileName(GETPOST('renamefilefrom'));
|
||||||
$filenameto=dol_sanitizeFileName(GETPOST('renamefileto'));
|
$filenameto=dol_sanitizeFileName(GETPOST('renamefileto'));
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// Disallow file with some extensions. We rename them.
|
||||||
|
// Because if we put the documents directory into a directory inside web root (very bad), this allows to execute on demand arbitrary code.
|
||||||
|
if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$filenameto) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED))
|
||||||
|
{
|
||||||
|
$filenameto.= '.noexe';
|
||||||
|
}
|
||||||
|
|
||||||
if ($filenamefrom && $filenameto)
|
if ($filenamefrom && $filenameto)
|
||||||
{
|
{
|
||||||
$srcpath = $upload_dir.'/'.$filenamefrom;
|
$srcpath = $upload_dir.'/'.$filenamefrom;
|
||||||
|
|||||||
@ -139,7 +139,7 @@ if (! dol_is_dir($upload_dir))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<!-- ajaxdirpreview type='.$type.' -->'."\n";
|
print '<!-- ajaxdirpreview type='.$type.' -->'."\n";
|
||||||
print '<!-- Page called with mode='.(isset($mode)?$mode:'').' type='.$type.' module='.$module.' url='.$url.' '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Page called with mode='.dol_escape_htmltag(isset($mode)?$mode:'').' type='.dol_escape_htmltag($type).' module='.dol_escape_htmltag($module).' url='.dol_escape_htmltag($url).' '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
$param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
|
$param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $action=GETPOST('action');
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvnext')
|
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvnext')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $userid=GETPOST('userid','int');
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Add a box
|
// Add a box
|
||||||
if ($boxid > 0 && $zone !='' && $userid > 0)
|
if ($boxid > 0 && $zone !='' && $userid > 0)
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $name=GETPOST('name','alpha');
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Registering the location of boxes
|
// Registering the location of boxes
|
||||||
if (! empty($action) && ! empty($name))
|
if (! empty($action) && ! empty($name))
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $showempty = GETPOST('showempty','int');
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
if (! empty($id) && ! empty($action) && ! empty($htmlname))
|
if (! empty($id) && ! empty($action) && ! empty($htmlname))
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $type = GETPOST('type', 'alpha');
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type))
|
if(! empty($id) && ! empty($element) && ! empty($htmlelement) && ! empty($type))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $fk_element = GETPOST('fk_element','alpha');
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($fk_element))
|
if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($fk_element))
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $object = new GenericObject($db);
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Registering new values
|
// Registering new values
|
||||||
if (($action == 'set') && ! empty($id))
|
if (($action == 'set') && ! empty($id))
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $tva_tx = str_replace('*','',GETPOST('tva_tx','alpha'));
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
if (! empty($output) && isset($amount) && isset($tva_tx))
|
if (! empty($output) && isset($amount) && isset($tva_tx))
|
||||||
|
|||||||
@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php';
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Registering the location of boxes
|
// Registering the location of boxes
|
||||||
if ((isset($_POST['roworder']) && ! empty($_POST['roworder'])) && (isset($_POST['table_element_line']) && ! empty($_POST['table_element_line']))
|
if ((isset($_POST['roworder']) && ! empty($_POST['roworder'])) && (isset($_POST['table_element_line']) && ! empty($_POST['table_element_line']))
|
||||||
|
|||||||
@ -54,7 +54,7 @@ savemethodname:
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
//print_r($_POST);
|
//print_r($_POST);
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
|
|||||||
@ -38,7 +38,7 @@ require '../../main.inc.php';
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Registering the location of boxes
|
// Registering the location of boxes
|
||||||
if (isset($_GET['action']) && ! empty($_GET['action']))
|
if (isset($_GET['action']) && ! empty($_GET['action']))
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $productid = (GETPOST('productid','int')?GETPOST('productid','int'):0);
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
if (! empty($id) && ! empty($action) && ! empty($htmlname))
|
if (! empty($id) && ! empty($action) && ! empty($htmlname))
|
||||||
|
|||||||
@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog("GET is ".join(',',$_GET).', MAIN_USE_ZIPTOWN_DICTIONNARY='.(empty($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY)?'':$conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY));
|
dol_syslog("GET is ".join(',',$_GET).', MAIN_USE_ZIPTOWN_DICTIONNARY='.(empty($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY)?'':$conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY));
|
||||||
//var_dump($_GET);
|
//var_dump($_GET);
|
||||||
|
|||||||
@ -489,8 +489,8 @@ class Conf
|
|||||||
// By default, we propagate contacts
|
// By default, we propagate contacts
|
||||||
if (! isset($this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) $this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN='*'; // Can be also '*' or '^(BILLING|SHIPPING|CUSTOMER|.*)$' (regex not yet implemented)
|
if (! isset($this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) $this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN='*'; // Can be also '*' or '^(BILLING|SHIPPING|CUSTOMER|.*)$' (regex not yet implemented)
|
||||||
|
|
||||||
// By default, we use the zip town autofill
|
// By default, we do not use the zip town autofill
|
||||||
if (! isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY=1;
|
if (! isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY=0;
|
||||||
|
|
||||||
// Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal"
|
// Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal"
|
||||||
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
|
||||||
|
|||||||
@ -1062,7 +1062,7 @@ class FormOther
|
|||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
// We force reload to be sure to get all boxes into list
|
// We force reload to be sure to get all boxes into list
|
||||||
window.location.search=\'mainmenu='.GETPOST("mainmenu").'&leftmenu='.GETPOST('leftmenu').'&action=delbox\';
|
window.location.search=\'mainmenu='.GETPOST("mainmenu","aZ09").'&leftmenu='.GETPOST('leftmenu',"aZ09").'&action=delbox\';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1084,7 +1084,7 @@ class FormOther
|
|||||||
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
window.location.search=\'mainmenu='.GETPOST("mainmenu").'&leftmenu='.GETPOST('leftmenu').'&action=addbox&boxid=\'+boxid;
|
window.location.search=\'mainmenu='.GETPOST("mainmenu","aZ09").'&leftmenu='.GETPOST('leftmenu',"aZ09").'&action=addbox&boxid=\'+boxid;
|
||||||
}
|
}
|
||||||
});';
|
});';
|
||||||
if (! count($arrayboxtoactivatelabel)) $selectboxlist.='jQuery("#boxcombo").hide();';
|
if (! count($arrayboxtoactivatelabel)) $selectboxlist.='jQuery("#boxcombo").hide();';
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
|||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("agenda");
|
$langs->load("agenda");
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
|
|||||||
@ -35,7 +35,7 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@ -635,8 +635,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security:
|
// Security:
|
||||||
// Disallow file with some extensions. We renamed them.
|
// Disallow file with some extensions. We rename them.
|
||||||
// Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande.
|
// Because if we put the documents directory into a directory inside web root (very bad), this allows to execute on demand arbitrary code.
|
||||||
if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED))
|
if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
$file_name.= '.noexe';
|
$file_name.= '.noexe';
|
||||||
|
|||||||
@ -611,7 +611,7 @@ function dol_string_unaccent($str)
|
|||||||
*/
|
*/
|
||||||
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
||||||
{
|
{
|
||||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
$forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=");
|
||||||
$forbidden_chars_to_remove=array();
|
$forbidden_chars_to_remove=array();
|
||||||
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
||||||
//$forbidden_chars_to_remove=array("(",")");
|
//$forbidden_chars_to_remove=array("(",")");
|
||||||
@ -2928,8 +2928,8 @@ function dol_print_error($db='',$error='',$errors=null)
|
|||||||
$out.="<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"])?dol_htmlentities($_SERVER["HTTP_REFERER"],ENT_COMPAT,'UTF-8'):'')."<br>\n";
|
$out.="<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"])?dol_htmlentities($_SERVER["HTTP_REFERER"],ENT_COMPAT,'UTF-8'):'')."<br>\n";
|
||||||
$out.="<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu)?$conf->standard_menu:'')."<br>\n";
|
$out.="<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu)?$conf->standard_menu:'')."<br>\n";
|
||||||
$out.="<br>\n";
|
$out.="<br>\n";
|
||||||
$syslog.="url=".$_SERVER["REQUEST_URI"];
|
$syslog.="url=".dol_escape_htmltag($_SERVER["REQUEST_URI"]);
|
||||||
$syslog.=", query_string=".$_SERVER["QUERY_STRING"];
|
$syslog.=", query_string=".dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||||
}
|
}
|
||||||
else // Mode CLI
|
else // Mode CLI
|
||||||
{
|
{
|
||||||
|
|||||||
@ -144,10 +144,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
|
|
||||||
$dol_url_root = DOL_URL_ROOT;
|
$dol_url_root = DOL_URL_ROOT;
|
||||||
|
|
||||||
$php_self = $_SERVER['PHP_SELF'];
|
|
||||||
$php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
|
|
||||||
if (! preg_match('/mainmenu=/',$php_self)) $php_self.=(preg_match('/\?/',$php_self)?'&':'?').'mainmenu=home';
|
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
$appli=constant('DOL_APPLICATION_TITLE');
|
$appli=constant('DOL_APPLICATION_TITLE');
|
||||||
$title=$appli.' '.DOL_VERSION;
|
$title=$appli.' '.DOL_VERSION;
|
||||||
|
|||||||
@ -454,9 +454,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
// Menu niveau > 0
|
// Menu niveau > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'])
|
if ($menu_array[$i]['enabled'])
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@ -468,7 +471,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
}
|
}
|
||||||
else if ($showmenu)
|
else if ($showmenu)
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1561,9 +1561,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Menu niveau > 0
|
// Menu niveau > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'])
|
if ($menu_array[$i]['enabled'])
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@ -1575,7 +1578,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
}
|
}
|
||||||
else if ($showmenu)
|
else if ($showmenu)
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,8 +201,12 @@ class MenuManager
|
|||||||
print '<div class="menu_top"></div>'."\n";
|
print '<div class="menu_top"></div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['level'] > 0) {
|
if ($this->menu->liste[$i]['level'] > 0)
|
||||||
print '<div class="menu_contenu">';
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($this->menu->liste[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$this->menu->liste[$i]['url']));
|
||||||
|
|
||||||
|
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['enabled'])
|
if ($this->menu->liste[$i]['enabled'])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,7 +35,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $(function () {
|
|||||||
// Events
|
// Events
|
||||||
$('#fileupload').fileupload({
|
$('#fileupload').fileupload({
|
||||||
stop: function (e, data) {
|
stop: function (e, data) {
|
||||||
location.href='<?php echo $_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"]; ?>';
|
location.href='<?php echo dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]); ?>';
|
||||||
},
|
},
|
||||||
destroy: function (e, data) {
|
destroy: function (e, data) {
|
||||||
var that = $(this).data('fileupload');
|
var that = $(this).data('fileupload');
|
||||||
|
|||||||
@ -31,6 +31,10 @@ if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
|
|||||||
// If we force to use jmobile, then we reenable javascript
|
// If we force to use jmobile, then we reenable javascript
|
||||||
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
|
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
|
||||||
|
|
||||||
|
$php_self = dol_escape_htmltag($_SERVER['PHP_SELF']);
|
||||||
|
$php_self.= dol_escape_htmltag($_SERVER["QUERY_STRING"])?'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]):'';
|
||||||
|
if (! preg_match('/mainmenu=/',$php_self)) $php_self.=(preg_match('/\?/',$php_self)?'&':'?').'mainmenu=home';
|
||||||
|
|
||||||
// Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
|
// Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
|
||||||
$arrayofjs=array(
|
$arrayofjs=array(
|
||||||
'/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION)),
|
'/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION)),
|
||||||
|
|||||||
@ -725,7 +725,7 @@ function setforpredef() {
|
|||||||
jQuery("#select_type").val(-1);
|
jQuery("#select_type").val(-1);
|
||||||
jQuery("#prod_entry_mode_free").prop('checked',false);
|
jQuery("#prod_entry_mode_free").prop('checked',false);
|
||||||
jQuery("#prod_entry_mode_predef").prop('checked',true);
|
jQuery("#prod_entry_mode_predef").prop('checked',true);
|
||||||
jQuery("#price_ht").hide();
|
jQuery("#price_ht").val('').hide();
|
||||||
jQuery("#multicurrency_price_ht").hide();
|
jQuery("#multicurrency_price_ht").hide();
|
||||||
jQuery("#price_ttc").hide(); // May no exists
|
jQuery("#price_ttc").hide(); // May no exists
|
||||||
jQuery("#tva_tx").hide();
|
jQuery("#tva_tx").hide();
|
||||||
|
|||||||
@ -28,6 +28,9 @@ if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
|
|||||||
// If we force to use jmobile, then we reenable javascript
|
// If we force to use jmobile, then we reenable javascript
|
||||||
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
|
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
|
||||||
|
|
||||||
|
$php_self = dol_escape_htmltag($_SERVER['PHP_SELF']);
|
||||||
|
$php_self.= dol_escape_htmltag($_SERVER["QUERY_STRING"])?'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]):'';
|
||||||
|
|
||||||
print top_htmlhead('',$langs->trans('SendNewPassword'));
|
print top_htmlhead('',$langs->trans('SendNewPassword'));
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
|
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
|
||||||
@ -129,7 +132,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
<div id="login_line2" style="clear: both">
|
<div id="login_line2" style="clear: both">
|
||||||
|
|
||||||
<!-- Button Send password -->
|
<!-- Button Send password -->
|
||||||
<br><input id="password" type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
|
<br><input type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div align="center" style="margin-top: 8px;">
|
<div align="center" style="margin-top: 8px;">
|
||||||
|
|||||||
@ -316,17 +316,17 @@ if ($action == 'create')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" value="'.GETPOST("amount").'" size="10"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" value="'.dol_escape_htmltag(GETPOST("amount")).'" size="10"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>";
|
print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>";
|
||||||
print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
|
print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.GETPOST("societe").'" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.dol_escape_htmltag(GETPOST("societe")).'" size="40"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.GETPOST("lastname").'" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.dol_escape_htmltag(GETPOST("lastname")).'" size="40"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.GETPOST("firstname").'" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST("firstname")).'" size="40"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="3">'.GETPOST("address").'</textarea></td></tr>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="3">'.dol_escape_htmltag(GETPOST("address")).'</textarea></td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
@ -341,7 +341,7 @@ if ($action == 'create')
|
|||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" value="'.GETPOST("email").'" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" value="'.dol_escape_htmltag(GETPOST("email")).'" size="40"></td></tr>';
|
||||||
|
|
||||||
// Public note
|
// Public note
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -384,9 +384,9 @@ if ($action == 'create')
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
|
print '<input type="button" class="button" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" onClick="javascript:history.go(-1)">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
@ -438,7 +438,7 @@ if (! empty($id) && $action == 'edit')
|
|||||||
// Amount
|
// Amount
|
||||||
if ($object->statut == 0)
|
if ($object->statut == 0)
|
||||||
{
|
{
|
||||||
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.$object->amount.'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.dol_escape_htmltag($object->amount).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -453,11 +453,11 @@ if (! empty($id) && $action == 'edit')
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$object->societe.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.dol_escape_htmltag($object->societe).'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.$object->lastname.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.dol_escape_htmltag($object->lastname).'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.$object->firstname.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.dol_escape_htmltag($object->firstname).'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.$object->address.'</textarea></td></tr>';
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag($object->address).'</textarea></td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
@ -472,7 +472,7 @@ if (! empty($id) && $action == 'edit')
|
|||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40" value="'.$object->email.'"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||||
|
|
||||||
@ -592,13 +592,6 @@ if (! empty($id) && $action != 'edit')
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
|
||||||
/*
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2">';
|
|
||||||
print $form->showrefnav($object, 'rowid', $linkback, 1, 'rowid', 'ref', '');
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
*/
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td colspan="2">';
|
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
print dol_print_date($object->date,"day");
|
print dol_print_date($object->date,"day");
|
||||||
@ -615,52 +608,12 @@ if (! empty($id) && $action != 'edit')
|
|||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$object->societe.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$object->societe.'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td colspan="2">'.$object->lastname.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Lastname").'</td><td colspan="2">'.$object->lastname.'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="2">'.$object->firstname.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="2">'.$object->firstname.'</td></tr>';
|
||||||
/*print '<tr><td>'.$langs->trans("Address").'</td><td>'.dol_nl2br($object->address).'</td>';
|
|
||||||
|
|
||||||
// Zip / Town
|
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
|
||||||
print $object->zip.($object->zip && $object->town?' / ':'').$object->town.'</td></tr>';
|
|
||||||
|
|
||||||
// Country
|
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td>';
|
|
||||||
if (! empty($object->country_code))
|
|
||||||
{
|
|
||||||
$img=picto_from_langcode($object->country_code);
|
|
||||||
print ($img?$img.' ':'');
|
|
||||||
print $object->country;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $object->country_olddata;
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// EMail
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email).'</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
||||||
$form->form_modes_reglement(null, $object->modepaymentid,'none');
|
$form->form_modes_reglement(null, $object->modepaymentid,'none');
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
//print "<tr>".'<td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Project
|
|
||||||
/*
|
|
||||||
if (! empty($conf->projet->enabled))
|
|
||||||
{
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans("Project").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
$projettmp=new Project($db);
|
|
||||||
$projettmp->id=$object->fk_projet;
|
|
||||||
$projettmp->ref=$object->project;
|
|
||||||
if(! empty($object->fk_projet)) print $projettmp->getNomUrl(1);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $element = GETPOST('element', 'alpha');
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
// Load original field value
|
// Load original field value
|
||||||
if (isset($action) && ! empty($action))
|
if (isset($action) && ! empty($action))
|
||||||
|
|||||||
@ -46,7 +46,7 @@ require '../../main.inc.php';
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog(join(',',$_GET));
|
dol_syslog(join(',',$_GET));
|
||||||
|
|
||||||
|
|||||||
@ -34,11 +34,11 @@ if (empty($conf->global->EXTERNALSITE_URL))
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
$mainmenu=GETPOST('mainmenu', 'alpha');
|
$mainmenu=GETPOST('mainmenu', "aZ09");
|
||||||
$leftmenu=GETPOST('leftmenu', 'alpha');
|
$leftmenu=GETPOST('leftmenu', "aZ09");
|
||||||
$idmenu=GETPOST('idmenu', 'int');
|
$idmenu=GETPOST('idmenu', 'int');
|
||||||
$theme=GETPOST('theme', 'alpha');
|
$theme=GETPOST('theme', 'alpha');
|
||||||
$codelang=GETPOST('lang', 'alpha');
|
$codelang=GETPOST('lang', 'aZ09');
|
||||||
|
|
||||||
print "
|
print "
|
||||||
<html>
|
<html>
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $langs->load('margins');
|
|||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
if ($idprod > 0)
|
if ($idprod > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2591,19 +2591,29 @@ elseif (! empty($object->id))
|
|||||||
// Create bill
|
// Create bill
|
||||||
if (! empty($conf->facture->enabled))
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // 2 means accepted
|
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
|
||||||
{
|
{
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && !empty($object->linkedObjectsIds['invoice_supplier']))
|
// Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not)
|
||||||
|
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved
|
||||||
|
{
|
||||||
|
if (empty($conf->facture->enabled))
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
|
}
|
||||||
|
else if (!empty($object->linkedObjectsIds['invoice_supplier']))
|
||||||
|
{
|
||||||
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a remote order using WebService only if module is activated
|
// Create a remote order using WebService only if module is activated
|
||||||
|
|||||||
@ -82,7 +82,7 @@ $fieldstosearchall = array(
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_ref="";
|
$search_ref="";
|
||||||
$month_create="";
|
$month_create="";
|
||||||
@ -138,7 +138,7 @@ if($year_start > 0) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($month_start > 0) {
|
if($month_start > 0) {
|
||||||
$filter.= " AND date_format(cp.date_debut, '%m') = '$month_start'";
|
$filter.= " AND date_format(cp.date_debut, '%m') = '".$db->escape($month_start)."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ if($year_end > 0) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($month_end > 0) {
|
if($month_end > 0) {
|
||||||
$filter.= " AND date_format(cp.date_fin, '%m') = '$month_end'";
|
$filter.= " AND date_format(cp.date_fin, '%m') = '".$db->escape($month_end)."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ if($year_create > 0) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($month_create > 0) {
|
if($month_create > 0) {
|
||||||
$filter.= " AND date_format(cp.date_create, '%m') = '$month_create'";
|
$filter.= " AND date_format(cp.date_create, '%m') = '".$db->escape($month_create)."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ print '</td>';
|
|||||||
|
|
||||||
// DATE CREATE
|
// DATE CREATE
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month_create" value="'.$month_create.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month_create" value="'.dol_escape_htmltag($month_create).'">';
|
||||||
$formother->select_year($year_create,'year_create',1, $min_year, 0);
|
$formother->select_year($year_create,'year_create',1, $min_year, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -368,13 +368,13 @@ print '<td class="liste_titre"> </td>';
|
|||||||
|
|
||||||
// DATE DEBUT
|
// DATE DEBUT
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month_start" value="'.$month_start.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month_start" value="'.dol_escape_htmltag($month_start).'">';
|
||||||
$formother->select_year($year_start,'year_start',1, $min_year, $max_year);
|
$formother->select_year($year_start,'year_start',1, $min_year, $max_year);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// DATE FIN
|
// DATE FIN
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month_end" value="'.$month_end.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month_end" value="'.dol_escape_htmltag($month_end).'">';
|
||||||
$formother->select_year($year_end,'year_end',1, $min_year, $max_year);
|
$formother->select_year($year_end,'year_end',1, $min_year, $max_year);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
|
|||||||
@ -62,6 +62,21 @@ ALTER TABLE llx_societe MODIFY COLUMN fk_currency varchar(3) NULL;
|
|||||||
ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||||
ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL;
|
ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT '2001-01-01 00:00:00';
|
||||||
|
|
||||||
|
-- Clean corrupted values for tms
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||||
|
-- VMYSQL4.1 update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||||
|
-- VMYSQL4.1 update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;
|
||||||
|
-- Remove default not null on date_fin
|
||||||
|
-- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_comments tinyint NOT NULL DEFAULT 1;
|
ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_comments tinyint NOT NULL DEFAULT 1;
|
||||||
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible;
|
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible;
|
||||||
|
|||||||
@ -97,8 +97,9 @@ function test_sql_and_script_inject($val, $type)
|
|||||||
$sql_inj += preg_match('/<script/i', $val);
|
$sql_inj += preg_match('/<script/i', $val);
|
||||||
if (! defined('NOSTYLECHECK')) $sql_inj += preg_match('/<style/i', $val);
|
if (! defined('NOSTYLECHECK')) $sql_inj += preg_match('/<style/i', $val);
|
||||||
$sql_inj += preg_match('/base[\s]+href/si', $val);
|
$sql_inj += preg_match('/base[\s]+href/si', $val);
|
||||||
$sql_inj += preg_match('/<.*onmouse/si', $val); // onmousexxx can be set on img or any html tag like <img title='>' onmouseover=alert(1)>
|
$sql_inj += preg_match('/<.*onmouse/si', $val); // onmousexxx can be set on img or any html tag like <img title='...' onmouseover=alert(1)>
|
||||||
$sql_inj += preg_match('/onerror\s*=/i', $val); // onerror can be set on img or any html tag like <img title='>' onerror = alert(1)>
|
$sql_inj += preg_match('/onerror\s*=/i', $val); // onerror can be set on img or any html tag like <img title='...' onerror = alert(1)>
|
||||||
|
// $sql_inj += preg_match('/onfocus\s*=/i', $val); // onfocus can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
|
||||||
if ($type == 1)
|
if ($type == 1)
|
||||||
{
|
{
|
||||||
$sql_inj += preg_match('/javascript:/i', $val);
|
$sql_inj += preg_match('/javascript:/i', $val);
|
||||||
@ -576,7 +577,7 @@ if (! defined('NOLOGIN'))
|
|||||||
$paramsurl=array();
|
$paramsurl=array();
|
||||||
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
||||||
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
||||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha');
|
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09');
|
||||||
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -635,7 +636,7 @@ if (! defined('NOLOGIN'))
|
|||||||
$paramsurl=array();
|
$paramsurl=array();
|
||||||
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
if (GETPOST('textbrowser')) $paramsurl[]='textbrowser='.GETPOST('textbrowser','int');
|
||||||
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
if (GETPOST('nojs')) $paramsurl[]='nojs='.GETPOST('nojs','int');
|
||||||
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang','alpha');
|
if (GETPOST('lang')) $paramsurl[]='lang='.GETPOST('lang', 'aZ09');
|
||||||
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl)?'?'.implode('&',$paramsurl):''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -1477,14 +1478,14 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
// Link to print main content area
|
// Link to print main content area
|
||||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
||||||
{
|
{
|
||||||
$qs=$_SERVER["QUERY_STRING"];
|
$qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||||
|
|
||||||
foreach($_POST as $key=>$value) {
|
foreach($_POST as $key=>$value) {
|
||||||
if($key!=='action' && !is_array($value))$qs.='&'.$key.'='.urlencode($value);
|
if ($key!=='action' && !is_array($value)) $qs.='&'.$key.'='.urlencode($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
|
$qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
|
||||||
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
|
$text ='<a href="'.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
|
||||||
$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"');
|
$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"');
|
||||||
$text.='</a>';
|
$text.='</a>';
|
||||||
$toprightmenu.=@Form::textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'login_block_elem',2);
|
$toprightmenu.=@Form::textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'login_block_elem',2);
|
||||||
|
|||||||
@ -246,7 +246,7 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
|||||||
// Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later)
|
// Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later)
|
||||||
if (! defined('NOREQUIRETRAN'))
|
if (! defined('NOREQUIRETRAN'))
|
||||||
{
|
{
|
||||||
$langcode=(GETPOST('lang')?GETPOST('lang','alpha',1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
$langcode=(GETPOST('lang', 'aZ09')?GETPOST('lang', 'aZ09', 1):(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||||
$langs->setDefaultLang($langcode);
|
$langs->setDefaultLang($langcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ $warehouseStatus = GETPOST('warehousestatus', 'alpha');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
// print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog(join(',', $_GET));
|
dol_syslog(join(',', $_GET));
|
||||||
// print_r($_GET);
|
// print_r($_GET);
|
||||||
|
|||||||
@ -69,7 +69,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
{
|
{
|
||||||
llxHeader("",$langs->trans("ProductStatistics"));
|
llxHeader("",$langs->trans("ProductStatistics"));
|
||||||
|
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type', 'intcomma');
|
||||||
|
|
||||||
$helpurl='';
|
$helpurl='';
|
||||||
if ($type == '0')
|
if ($type == '0')
|
||||||
|
|||||||
@ -62,7 +62,7 @@ $langs->load("paypal");
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"])?dol_escape_htmltag($_SERVER["QUERY_STRING"]):'')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"])?dol_escape_htmltag($_SERVER["SCRIPT_URI"]):''), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if (empty($PAYBOXFULLTAG)) $PAYBOXFULLTAG=GETPOST('fulltag');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
dol_syslog("Callback url when a PayBox payment was done. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"])?dol_escape_htmltag($_SERVER["QUERY_STRING"]):'')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"])?dol_escape_htmltag($_SERVER["SCRIPT_URI"]):''), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
|||||||
@ -70,7 +70,7 @@ if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"])?dol_escape_htmltag($_SERVER["QUERY_STRING"]):'')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"])?dol_escape_htmltag($_SERVER["SCRIPT_URI"]):''), LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
|||||||
@ -100,7 +100,7 @@ if (empty($PAYPALFULLTAG)) $PAYPALFULLTAG=GETPOST('fulltag');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_syslog("Callback url when a PayPal payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
dol_syslog("Callback url when a PayPal payment was done. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"])?dol_escape_htmltag($_SERVER["QUERY_STRING"]):'')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"])?dol_escape_htmltag($_SERVER["SCRIPT_URI"]):''), LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $id=GETPOST('id', 'int');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog(join(',', $_GET));
|
dol_syslog(join(',', $_GET));
|
||||||
//print_r($_GET);
|
//print_r($_GET);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ require '../main.inc.php';
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog(join(',',$_GET));
|
dol_syslog(join(',',$_GET));
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $country=GETPOST('country', 'alpha');
|
|||||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|
||||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||||
|
|
||||||
dol_syslog(join(',',$_POST));
|
dol_syslog(join(',',$_POST));
|
||||||
|
|
||||||
|
|||||||
@ -808,11 +808,6 @@ if (empty($reshook))
|
|||||||
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
|
||||||
$error ++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (empty($conf->db->user)) $conf->db->user='';
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
|
|||||||
@ -53,7 +53,7 @@ else header('Cache-Control: no-cache');
|
|||||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'alpha')); // If language was forced on URL
|
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
if (GETPOST('theme')) $conf->theme=GETPOST('theme', 'alpha'); // If theme was forced on URL
|
if (GETPOST('theme')) $conf->theme=GETPOST('theme', 'alpha'); // If theme was forced on URL
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
|
|||||||
@ -54,7 +54,7 @@ else header('Cache-Control: no-cache');
|
|||||||
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL
|
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL
|
if (GETPOST('theme')) $conf->theme=GETPOST('theme'); // If theme was forced on URL
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
|
|||||||
@ -1140,7 +1140,7 @@ else
|
|||||||
|
|
||||||
// Check if user has rights
|
// Check if user has rights
|
||||||
$object->getrights();
|
$object->getrights();
|
||||||
if(empty($object->nb_rights)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||||
|
|
||||||
// Connexion ldap
|
// Connexion ldap
|
||||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||||
|
|||||||
@ -647,9 +647,11 @@ while ($i < min($num,$limit))
|
|||||||
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
|
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td></td>';
|
print '<td>';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -152,9 +152,6 @@ if ($action == 'buildnewpassword' && $username)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$php_self = $_SERVER['PHP_SELF'];
|
|
||||||
$php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
|
|
||||||
|
|
||||||
$dol_url_root = DOL_URL_ROOT;
|
$dol_url_root = DOL_URL_ROOT;
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user