added js confirm message for links

This commit is contained in:
Loïc Chapeaux
2001-08-31 22:54:38 +00:00
parent b17756d9c8
commit 1370e7c725
5 changed files with 86 additions and 13 deletions

View File

@@ -510,6 +510,24 @@ if (!defined('__LIB_INC__')){
} // end of the 'sql_addslashes()' function
/**
* Format db/table/filed name so they can be passed to a javascript
* function.
* This function is used to displays a javascript confirmation box for
* "DROP/DELETE/ALTER" queries.
*
* @param string the string to format
*
* @return string the formated string
*/
function js_format($a_string = '')
{
$a_string = str_replace('"', '"', $a_string);
$a_string = addslashes($a_string);
return backquote($a_string);
} // end of the 'sql_addslashes()' function
/**
* Defines the <CR><LF> value depending on the user OS that may be grabbed
* from the 'HTTP_USER_AGENT' variable.