Chmod Calculator is used to set permissions for files or folders. This calculator is under latest beta version and it provides a Multi platform compatible script. This script allows setting permission for superuser also.
Features
a) Beta version of multi platform compatible chmod calculator.
b) Used to set permission for user files and folders.
c) Just copy the code and use it.
Preview
Code
Javascript Code
<!-- Script by hscripts.com -->
<!-- Copyright of HIOXINDIA -->
<!-- More scripts @www.hscripts.com -->
<script type="text/javascript">
function calculator(usert, number)
{
if (usert == "special" && number == "4") var getval = eval("document.chmodcalc.special4");
if (usert == "special" && number == "2") var getval = eval("document.chmodcalc.special2");
if (usert == "special" && number == "1") var getval = eval("document.chmodcalc.special1");
if (usert == "user" && number == "4") var getval = eval("document.chmodcalc.user4");
if (usert == "user" && number == "2") var getval = eval("document.chmodcalc.user2");
if (usert == "user" && number == "1") var getval = eval("document.chmodcalc.user1");
if (usert == "group" && number == "4") var getval = eval("document.chmodcalc.group4");
if (usert == "group" && number == "2") var getval = eval("document.chmodcalc.group2");
if (usert == "group" && number == "1") var getval = eval("document.chmodcalc.group1");
if (usert == "other" && number == "4") var getval = eval("document.chmodcalc.other4");
if (usert == "other" && number == "2") var getval = eval("document.chmodcalc.other2");
if (usert == "other" && number == "1") var getval = eval("document.chmodcalc.other1");
if (usert == "special")
{
if(getval.checked)
{
document.chmodcalc.hspecial.value += ("+number");
var a= (document.chmodcalc.hspecial.value);
var b= eval(a);
document.chmodcalc.hspecial.value=b;
document.chmodcalc.tspecial.value=b;
} else {
if (document.chmodcalc.hspecial.value == "")
{ document.chmodcalc.tspecial.value=""; }
else {
var a=(document.chmodcalc.hspecial.value);
b=a-(number);
c=eval(b);
document.chmodcalc.hspecial.value=c;
document.chmodcalc.tspecial.value=c;}
}
}
if(usert == "user")
{
if(getval.checked)
{
document.chmodcalc.huser.value += ("+number");
var a= (document.chmodcalc.huser.value);
var b= eval(a);
document.chmodcalc.huser.value=b;
document.chmodcalc.tuser.value=b;
} else {
if (document.chmodcalc.huser.value == "")
{ document.chmodcalc.tuser.value=""; }
else {
var a=(document.chmodcalc.huser.value);
b=a-(number);
c=eval(b);
document.chmodcalc.huser.value=c;
document.chmodcalc.tuser.value=c; }
}
}
if (usert == "group")
{
if(getval.checked)
{
document.chmodcalc.hgroup.value += ("+number");
var a= (document.chmodcalc.hgroup.value);
var b= eval(a);
document.chmodcalc.hgroup.value=b;
document.chmodcalc.tgroup.value=b;
} else {
if (document.chmodcalc.hgroup.value == "")
{ document.chmodcalc.tgroup.value=""; }
else {
var a=(document.chmodcalc.hgroup.value);
b=a-(number);
c=eval(b);
document.chmodcalc.hgroup.value=c;
document.chmodcalc.tgroup.value=c; }
}
}
if (usert == "other")
{
if(getval.checked)
{
document.chmodcalc.hother.value += ("+number");
var a= (document.chmodcalc.hother.value);
var b= eval(a);
document.chmodcalc.hother.value=b;
document.chmodcalc.tother.value=b;
} else {
if (document.chmodcalc.hother.value == "")
{ document.chmodcalc.tother.value=""; }
else {
var a=(document.chmodcalc.hother.value);
b=a-(number);
c=eval(b);
document.chmodcalc.hother.value=c;
document.chmodcalc.tother.value=c; }
}
}
if(eval('document.chmodcalc.tspecial.value')==0) document.chmodcalc.tspecial.value='';
if(eval('document.chmodcalc.tuser.value')==0) document.chmodcalc.tuser.value='';
if(eval('document.chmodcalc.tgroup.value')==0) document.chmodcalc.tgroup.value='';
if(eval('document.chmodcalc.tother.value')==0) document.chmodcalc.tother.value='';
}
function ctck()
{
var sds = document.getElementById("dum");
if(sds == null){
alert("You are using a free package.\n You are not allowed to remove the tag.\n");
}
var sdss = document.getElementById("dumdiv");
if(sdss == null){
alert("You are using a free package.\n You are not allowed to remove the tag.\n");
}
}
document.onload="ctck()";
</script>
<!-- Script by hscripts.com -->
For customization of this script or any script development, contact us at support@hscripts.com
Usage
a) Copy and paste the javascript code into your HTML page .
b) This multi platform compatible 4-digit calculator is used to set the permisson for root user and superuser.
c) This script calculates access permission for the given file or folder.
License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.