2
0
forked from Wavyzz/dolibarr

Replace javascript by jQuery

This commit is contained in:
Laurent Destailleur
2010-08-29 18:29:19 +00:00
parent 1479a40e6d
commit 727fc871c6
3 changed files with 14 additions and 3 deletions

View File

@@ -565,7 +565,7 @@ class Form
} }
else else
{ {
print '<select class="flat" name="'.$htmlname.'">'; print '<select id="select'.$htmlname.'" class="flat" name="'.$htmlname.'">';
if ($showempty) print '<option value="-1">&nbsp;</option>'; if ($showempty) print '<option value="-1">&nbsp;</option>';
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $i = 0;

View File

@@ -37,6 +37,16 @@ if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php"); if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
/**
* \brief Return value of a param into get or post variable
* \param paramname Name of parameter to found
* \return string Value found
*/
function GETPOST($paramname)
{
return isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:'');
}
/** /**
* \brief Create a clone of instance of object (new instance with same properties) * \brief Create a clone of instance of object (new instance with same properties)
* This function works for both PHP4 and PHP5 * This function works for both PHP4 and PHP5

View File

@@ -57,7 +57,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP6
{ {
$_GET = array_map('stripslashes_deep', $_GET); $_GET = array_map('stripslashes_deep', $_GET);
$_POST = array_map('stripslashes_deep', $_POST); $_POST = array_map('stripslashes_deep', $_POST);
$_REQUEST = array_map('stripslashes_deep', $_REQUEST); // $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
} }
@set_magic_quotes_runtime(0); @set_magic_quotes_runtime(0);
@@ -231,7 +231,8 @@ if (! empty($conf->global->MAIN_SECURITY_CSRF)) // Check validity of token, only
} }
// Disable modules (this must be after session_start and after conf has been loaded) // Disable modules (this must be after session_start and after conf has been loaded)
if (! empty($_REQUEST["disablemodules"])) $_SESSION["disablemodules"]=$_REQUEST["disablemodules"]; if (! empty($_GET["disablemodules"])) $_SESSION["disablemodules"]=$_GET["disablemodules"];
if (! empty($_POST["disablemodules"])) $_SESSION["disablemodules"]=$_POST["disablemodules"];
if (! empty($_SESSION["disablemodules"])) if (! empty($_SESSION["disablemodules"]))
{ {
$disabled_modules=explode(',',$_SESSION["disablemodules"]); $disabled_modules=explode(',',$_SESSION["disablemodules"]);