Merge remote-tracking branch 'upstream/6.0' into 6.0

This commit is contained in:
Juanjo Menent 2017-12-26 10:52:46 +01:00
commit b650ba21c4
70 changed files with 642 additions and 154 deletions

View File

@ -15,6 +15,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC; $prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT; $format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME; $nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT --> <!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT -->

View File

@ -14,9 +14,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$contact = $GLOBALS['objcanvas']->control->object; $contact = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -14,10 +14,18 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$contact = $GLOBALS['objcanvas']->control->object; $contact = $GLOBALS['objcanvas']->control->object;
?> ?>
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT --> <!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->

View File

@ -36,7 +36,7 @@ $langs->load("users");
if (!$user->rights->adherent->lire) if (!$user->rights->adherent->lire)
accessforbidden(); accessforbidden();
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; $rowid=GETPOST("rowid",'int');
@ -44,10 +44,10 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
* View * View
*/ */
llxHeader();
$form = new Form($db); $form = new Form($db);
llxHeader();
$object = new Subscription($db); $object = new Subscription($db);
$result = $object->fetch($rowid); $result = $object->fetch($rowid);

View File

@ -15,8 +15,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -19,6 +19,14 @@
* *
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
$langs->load("main"); $langs->load("main");
$langs->load("bills"); $langs->load("bills");
$langs->load("cashdesk"); $langs->load("cashdesk");

View File

@ -17,6 +17,14 @@
* *
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';

View File

@ -19,6 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';

View File

@ -16,6 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$langs->load("main"); $langs->load("main");

View File

@ -16,6 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
$langs->load("main"); $langs->load("main");
$langs->load("bills"); $langs->load("bills");
$langs->load("banks"); $langs->load("banks");

View File

@ -17,6 +17,14 @@
* *
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
$langs->load("main"); $langs->load("main");
$langs->load("bills"); $langs->load("bills");

View File

@ -30,7 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$langs->load("orders"); $langs->load("orders");
$langs->load("companies"); $langs->load("companies");
$_socid = $_GET["id"]; $id = GETPOST('id','int');
$_socid = GETPOST("id",'int');
// Security check // Security check
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
@ -45,10 +46,10 @@ if ($user->societe_id > 0)
if ($_POST["action"] == 'setpricelevel') if ($_POST["action"] == 'setpricelevel')
{ {
$soc = New Societe($db); $soc = New Societe($db);
$soc->fetch($_GET["id"]); $soc->fetch($id);
$soc->set_price_level($_POST["price_level"],$user); $soc->set_price_level($_POST["price_level"],$user);
header("Location: multiprix.php?id=".$_GET["id"]); header("Location: multiprix.php?id=".$id);
exit; exit;
} }

View File

@ -22,6 +22,14 @@
* \ingroup propal * \ingroup propal
* \brief Template to show objects linked to proposals * \brief Template to show objects linked to proposals
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -15,8 +15,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -15,8 +15,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -15,8 +15,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT --> <!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT -->

View File

@ -13,9 +13,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$contact = $GLOBALS['objcanvas']->control->object; $contact = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -13,9 +13,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$contact = $GLOBALS['objcanvas']->control->object; $contact = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -14,6 +14,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -91,11 +91,15 @@ if ($action == 'builddoc' && $permissioncreate)
} }
else else
{ {
if (empty($donotredirect)) // This is se when include is done by bulk action "Bill Orders" if (empty($donotredirect)) // This is set when include is done by bulk action "Bill Orders"
{ {
setEventMessages($langs->trans("FileGenerated"), null); setEventMessages($langs->trans("FileGenerated"), null);
header('Location: '.$_SERVER['REQUEST_URI'].'#builddoc'); $urltoredirect = $_SERVER['REQUEST_URI'];
$urltoredirect = preg_replace('/#builddoc$/', '', $urltoredirect);
$urltoredirect = preg_replace('/action=builddoc&?/', '', $urltoredirect); // To avoid infinite loop
header('Location: '.$urltoredirect.'#builddoc');
exit; exit;
} }
} }

View File

@ -26,6 +26,13 @@
* $elementtype * $elementtype
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php --> <!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php -->

View File

@ -25,6 +25,13 @@
* $elementtype * $elementtype
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php --> <!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->

View File

@ -22,6 +22,14 @@
* $extrafield * $extrafield
* $elementtype * $elementtype
*/ */
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php --> <!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- START TEMPLATE FILE UPLOAD MAIN --> <!-- START TEMPLATE FILE UPLOAD MAIN -->

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- START TEMPLATE FILE UPLOAD --> <!-- START TEMPLATE FILE UPLOAD -->

View File

@ -19,6 +19,14 @@
* You can use this if you want to be abale to drag and drop rows of a table. * You can use this if you want to be abale to drag and drop rows of a table.
* You must add id="tablelines" on table level tag and have ($nboflines or count($object->lines) or count($taskarray) > 0) * You must add id="tablelines" on table level tag and have ($nboflines or count($object->lines) or count($taskarray) > 0)
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE AJAXROW.TPL.PHP - Script to enable drag and drop on tables --> <!-- BEGIN PHP TEMPLATE AJAXROW.TPL.PHP - Script to enable drag and drop on tables -->

View File

@ -16,6 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($blocname))
{
print "Error, template page can't be called as URL";
exit;
}
$hide = true; // Hide by default $hide = true; // Hide by default
if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocbydefault']) ? true : false); if (isset($parameters['showblocbydefault'])) $hide=(empty($parameters['showblocbydefault']) ? true : false);
if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false); if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false);

View File

@ -21,6 +21,14 @@
* $withproject (if we are on task contact) * $withproject (if we are on task contact)
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';

View File

@ -24,6 +24,14 @@
// $modulepart = for download // $modulepart = for download
// $param = param to add to download links // $param = param to add to download links
// Protection to avoid direct call of template
if (empty($langs) || ! is_object($langs))
{
print "Error, template page can't be called as URL";
exit;
}
$langs->load("link"); $langs->load("link");
if (empty($relativepathwithnofile)) $relativepathwithnofile=''; if (empty($relativepathwithnofile)) $relativepathwithnofile='';
if (empty($permtoedit)) $permtoedit=-1; if (empty($permtoedit)) $permtoedit=-1;

View File

@ -24,6 +24,14 @@
* $parameters * $parameters
* $cols * $cols
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE extrafields_view.tpl.php --> <!-- BEGIN PHP TEMPLATE extrafields_view.tpl.php -->
<?php <?php

View File

@ -19,6 +19,14 @@
// Need global variable $title to be defined by caller (like dol_loginfunction) // Need global variable $title to be defined by caller (like dol_loginfunction)
// Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...); // Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...);
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
header('Cache-Control: Public, must-revalidate'); header('Cache-Control: Public, must-revalidate');
header("Content-type: text/html; charset=".$conf->file->character_set_client); header("Content-type: text/html; charset=".$conf->file->character_set_client);
@ -54,7 +62,7 @@ print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disable
<?php if (empty($conf->dol_use_jmobile)) { ?> <?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
// Set focus on correct field /* Set focus on correct field */
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element <?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
}); });
</script> </script>

View File

@ -17,6 +17,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
// $cssclass must be defined by caller. For example cssclass='fieldtitle" // $cssclass must be defined by caller. For example cssclass='fieldtitle"
$module = $object->element; $module = $object->element;
$note_public = 'note_public'; $note_public = 'note_public';

View File

@ -30,6 +30,13 @@
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
$usemargins=0; $usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande')))

View File

@ -30,6 +30,13 @@
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
$usemargins=0; $usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1; if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;

View File

@ -37,6 +37,14 @@
* $type, $text, $description, $line * $type, $text, $description, $line
*/ */
// Protection to avoid direct call of template
if (empty($object) || ! is_object($object))
{
print "Error, template page can't be called as URL";
exit;
}
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
$usemargins=0; $usemargins=0;

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE originproductline.tpl.php --> <!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->

View File

@ -16,6 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
header('Cache-Control: Public, must-revalidate'); header('Cache-Control: Public, must-revalidate');
header("Content-type: text/html; charset=".$conf->file->character_set_client); header("Content-type: text/html; charset=".$conf->file->character_set_client);
@ -40,7 +48,7 @@ print top_htmlhead('',$langs->trans('SendNewPassword'));
<?php if (empty($conf->dol_use_jmobile)) { ?> <?php if (empty($conf->dol_use_jmobile)) { ?>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
// Set focus on correct field /* Set focus on correct field */
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element <?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
}); });
</script> </script>

View File

@ -1,6 +1,14 @@
<!-- BEGIN TEMPLATE resource_add.tpl.php --> <!-- BEGIN TEMPLATE resource_add.tpl.php -->
<?php <?php
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'); require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
$form = new Form($db); $form = new Form($db);

View File

@ -1,6 +1,12 @@
<!-- BEGIN TEMPLATE resource_view.tpl.php --> <!-- BEGIN TEMPLATE resource_view.tpl.php -->
<?php <?php
//var_dump($linked_resources); // Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$form= new Form($db); $form= new Form($db);

View File

@ -16,6 +16,14 @@
* *
* Output javascript for interactions code of ecm module * Output javascript for interactions code of ecm module
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE ecm/tpl/enablefiletreeajax.tpl.php --> <!-- BEGIN PHP TEMPLATE ecm/tpl/enablefiletreeajax.tpl.php -->

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -15,8 +15,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -17,6 +17,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -33,7 +33,7 @@ $langs->load("orders");
$langs->load("companies"); $langs->load("companies");
// Security check // Security check
$socid = isset($_GET["socid"])?$_GET["socid"]:''; $socid = GETPOST("socid", 'int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe',$socid,''); $result = restrictedArea($user, 'societe',$socid,'');

View File

@ -81,7 +81,8 @@ function test_sql_and_script_inject($val, $type)
// For SQL Injection (only GET and POST are used to be included into bad escaped SQL requests) // For SQL Injection (only GET and POST are used to be included into bad escaped SQL requests)
if ($type != 2) if ($type != 2)
{ {
$inj += preg_match('/delete\s+from/i', $val); $inj += preg_match('/updatexml\(/i', $val);
$inj += preg_match('/delete\s+from/i', $val);
$inj += preg_match('/create\s+table/i', $val); $inj += preg_match('/create\s+table/i', $val);
$inj += preg_match('/update.+set.+=/i', $val); $inj += preg_match('/update.+set.+=/i', $val);
$inj += preg_match('/insert\s+into/i', $val); $inj += preg_match('/insert\s+into/i', $val);

View File

@ -23,5 +23,13 @@
* Put detailed description here. * Put detailed description here.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
/** Your code here. */ /** Your code here. */
echo "Hello world!"; echo "Hello world!";

View File

@ -15,6 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));

View File

@ -15,6 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));

View File

@ -15,6 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
?> ?>

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -13,9 +13,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));

View File

@ -15,6 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));

View File

@ -15,6 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object=$GLOBALS['object']; $object=$GLOBALS['object'];
?> ?>

View File

@ -13,8 +13,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->

View File

@ -1,3 +1,13 @@
<?php
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?>
<script type="text/javascript"> <script type="text/javascript">
function save_qty(k) { function save_qty(k) {

View File

@ -17,6 +17,14 @@
* $object must be defined * $object must be defined
* $backtopage * $backtopage
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP --> <!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP -->

View File

@ -17,6 +17,14 @@
* $object must be defined * $object must be defined
* $backtopage * $backtopage
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP --> <!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP -->

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP COMPANY --> <!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP COMPANY -->

View File

@ -14,9 +14,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$contact = $GLOBALS['objcanvas']->control->object; $contact = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -13,9 +13,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$soc = $GLOBALS['objcanvas']->control->object; $soc = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP INDIVIDUAL --> <!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP INDIVIDUAL -->

View File

@ -14,8 +14,15 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP INDIVIDUAL --> <!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP INDIVIDUAL -->

View File

@ -13,9 +13,16 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
$object = $GLOBALS['objcanvas']->control->object; $object = $GLOBALS['objcanvas']->control->object;
?> ?>

View File

@ -1,5 +1,12 @@
<?php <?php
// Sale representative // Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
// Sale representative
print '<tr><td>'; print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('SalesRepresentatives'); print $langs->trans('SalesRepresentatives');

View File

@ -17,6 +17,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Protection to avoid direct call of template
if (empty($conf) || ! is_object($conf))
{
print "Error, template page can't be called as URL";
exit;
}
?> ?>
<!-- BEGIN PHP TEMPLATE LINKEDOBJECTBOCK--> <!-- BEGIN PHP TEMPLATE LINKEDOBJECTBOCK-->