This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isNumber(n) { | |
return !isNaN(parseFloat(n)) && isFinite(n); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function capitaliseFirstLetter(string) | |
{ | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validare_cui( $cif ) | |
{ | |
if (!is_numeric($cui)) | |
return false; | |
// Exista CUI -uri mai scurte de 6 cifre pe care sunt valide. (Ex. 5229, 52298) | |
if (strlen($cui) < 4 || strlen($cui) > 10) | |
return false; | |
$cifra_control = substr($cui, -1); | |
$cui = substr($cui, 0, -1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validare_cnp( $cnp ) | |
{ | |
$constanta = "279146358279"; | |
if ( strlen($cnp) != 13 ) | |
{ | |
return FALSE; | |
} | |
$suma = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isLetter(evt) | |
{ | |
evt = (evt) ? evt : event; | |
var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0)); | |
if (charCode > 31 && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122)) | |
{ | |
return false; | |
} | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isNumber(evt) | |
{ | |
evt = (evt) ? evt : window.event; | |
var charCode = (evt.which) ? evt.which : evt.keyCode; | |
if (charCode > 31 && (charCode < 48 || charCode > 57)) { | |
return false; | |
} | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function capitaliseFirstLetter(string) | |
{ | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function valideazacnp(cnp) { | |
var constanta= "279146358279"; | |
if(cnp.length!=13) return false; | |
var suma=0; | |
for(i=0; i<constanta.length; i++) { | |
suma=suma+cnp.charAt(i)*constanta.charAt(i); |