Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
password generator
#1
First of all I want to tel that I`m not good at English so here may be some mistakes.. Smile

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

Version: 0.29.13

in file <code>/var/www/vhosts/ehcp/config/dbutil.php</code>
about line #3466 find <code>case 'password':</code>
replace that with:
<code>
case 'password':
$res.="\n<td>
<script>
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));
}
</script>

<form name=\"pgenerate\">
<input id='$alanadi' type='$alantipi' name=$alanadi value='$varsayilan'>
<input type=\"button\" value=\"Generate Password\" onClick=\"populateform$alanadi$alantipi()\">
<input id='$alanadi$alantipi'><br />
</form>
";
$res.="</td>\n";
break;
</code>

if You want to add special symbols add them in linde
<code>
var keylist='abcdefghijklmnopqrstuvwxyz123456789'
</code>
password length is set with number <strong>8</strong>. edit line

And this is it Smile
it works form me Smile
<code>for (i=0;i<8;i++)</code>

Restored from old drupal forum, for user uid:3412 username:lamzaks
You may reset your password to access your new account here.
Reply
#2
find:
<code>$('#$alanadi').val(generatepass(enterlength));
$('#$alanadi$alantipi').val(generatepass(enterlength));
</code>
replace with
<code>
var getpass = generatepass(enterlength);
$('#$alanadi').val(getpass);
$('#$alanadi$alantipi').val(getpass);
</code>


Restored from old drupal forum, for user uid:3412 username:lamzaks
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping