password generator

AttachmentSize
Image icon cs4fun.lv new edited panel..120.48 KB

First of all I want to tel that I`m not good at English so here may be some mistakes.. :)

so I added password generator. How? here will be some notes:

Version: 0.29.13

in file /var/www/vhosts/ehcp/config/dbutil.php
about line #3466 find case 'password':
replace that with:

case 'password':
$res.="\n

var keylist='abcdefghijklmnopqrstuvwxyz123456789'
var temp=''
function generatepass(){
temp=''
for (i=0;i<8;i++)
temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
return temp
}
function populateform$alanadi$alantipi(enterlength){
$('#$alanadi').val(generatepass(enterlength));
$('#$alanadi$alantipi').val(generatepass(enterlength));
}

";
$res.="\n";
break;

if You want to add special symbols add them in linde

var keylist='abcdefghijklmnopqrstuvwxyz123456789'

password length is set with number 8. edit line

And this is it :)
it works form me :)
for (i=0;i<8;i++)

Forums: 

find:
$('#$alanadi').val(generatepass(enterlength));
$('#$alanadi$alantipi').val(generatepass(enterlength));

replace with

var getpass = generatepass(enterlength);
$('#$alanadi').val(getpass);
$('#$alanadi$alantipi').val(getpass);