mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Permanent cookie for version
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1340 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -11,10 +11,21 @@ function toggle(id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Set permanent cookie
|
||||
* @param string
|
||||
* @param number
|
||||
* @param string optional
|
||||
*/
|
||||
function cookie(assign, days, params) {
|
||||
var date = new Date();
|
||||
date.setDate(date.getDate() + days);
|
||||
document.cookie = assign + '; expires=' + date + (params || '');
|
||||
}
|
||||
|
||||
/** Verify current Adminer version
|
||||
*/
|
||||
function verifyVersion() {
|
||||
document.cookie = 'adminer_version=0';
|
||||
cookie('adminer_version=0', 1);
|
||||
var script = document.createElement('script');
|
||||
script.src = 'https://adminer.svn.sourceforge.net/svnroot/adminer/trunk/version.js';
|
||||
document.body.appendChild(script);
|
||||
|
Reference in New Issue
Block a user