version 1.90, 2022/07/07 03:37:02
|
version 1.95, 2025/06/28 13:55:43
|
Line 642 function addIpRule(iptype) {
|
Line 642 function addIpRule(iptype) {
|
var frame = window.frames["choices"]; |
var frame = window.frames["choices"]; |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
var count = innerDiv.childNodes.length |
|
var ipDiv = frame.document.createElement('div'); |
var ipDiv = frame.document.createElement('div'); |
ipDiv.innerHTML = '<input type="text" size="10" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+ |
ipDiv.innerHTML = '<input type="text" size="12" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+"\n"+ |
'<a href="#" onclick="parent.removeIpRule(\''+iptype+'\',\''+count+'\')">Remove</a>'; |
'<a href="#" onclick="parent.removeIpRule(this,\''+iptype+'\');return false;">Remove</a>'; |
frame.document.getElementById('LC_string_ipacc_inner_'+iptype).appendChild(ipDiv); |
innerDiv.appendChild(ipDiv); |
} |
} |
return false; |
return; |
} |
} |
|
|
function removeIpRule(iptype,num) { |
function removeIpRule(caller,iptype) { |
var frame = window.frames["choices"]; |
var frame = window.frames["choices"]; |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
for (var i=0; i<innerDiv.childNodes.length; i++) { |
var divToRemove = caller.closest('div'); |
if (i==num) { |
if (divToRemove) { |
innerDiv.removeChild(innerDiv.childNodes[i]); |
innerDiv.removeChild(divToRemove); |
ipstringeval(); |
ipstringeval(); |
break; |
|
} |
|
} |
} |
} |
} |
|
return; |
} |
} |
|
|
function radiostringeval(newval) { |
function radiostringeval(newval) { |
Line 1138 function draw() {
|
Line 1136 function draw() {
|
if (svalue=='no') { choicewrite(' checked="checked"'); } |
if (svalue=='no') { choicewrite(' checked="checked"'); } |
choicewrite(' /> No</label><br />'); |
choicewrite(' /> No</label><br />'); |
} |
} |
|
if (pscat=='tex') { |
|
tablestart('TeX file display'); |
|
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
|
choicewrite('<label><input name="stringval" value="tth"'+ |
|
' type="radio" '+callradiostringeval('tth')); |
|
if (svalue=='tth') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> tth (TeX to HTML)</label><br />'); |
|
choicewrite('<label><input name="stringval" value="mathjax"'+ |
|
' type="radio" '+callradiostringeval('mathjax')); |
|
if (svalue=='mathjax') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> MathJax</label><br />'); |
|
} |
if (pscat=='ip') { |
if (pscat=='ip') { |
var currallow = new Array; |
var currallow = new Array; |
var currdeny = new Array; |
var currdeny = new Array; |
Line 1170 function draw() {
|
Line 1180 function draw() {
|
} |
} |
var curripaccess = [currallow,currdeny]; |
var curripaccess = [currallow,currdeny]; |
tablestart('IP Number/Name'); |
tablestart('IP Number/Name'); |
choicewrite('<tr><th>Allow from</th><th>Deny from</th></tr><tr>'); |
choicewrite('<tr><th>Allow from</th><th>Deny from</th></tr><tr>'+"\n"); |
var acctypes = ['allow','deny']; |
var acctypes = ['allow','deny']; |
for (var i=0; i<acctypes.length; i++) { |
for (var i=0; i<acctypes.length; i++) { |
choicewrite('<td valign="top">'+ |
choicewrite(['<td valign="top">', |
'<div class="LC_string_ipacc_wrap" id="LC_string_ipacc_'+acctypes[i]+'">'+ |
'<div>', |
'<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">'); |
'<div id="LC_string_ipacc_inner_'+acctypes[i]+'">'].join("\n")); |
for (var j=0; j<curripaccess[i].length; j++) { |
for (var j=0; j<curripaccess[i].length; j++) { |
choicewrite('<div><input type="text" size="10" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />'); |
choicewrite(['<div><input type="text" size="12" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />', |
choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>'); |
'<a href="#" onclick="parent.removeIpRule(this,\''+acctypes[i]+'\');return false;">Remove</a>', |
choicewrite('</div>'); |
'</div>'].join("\n")); |
} |
} |
choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>'); |
choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');return false;">Add item</button>'+"\n"); |
} |
} |
choicewrite('</div></td></tr></table>'); |
choicewrite('</div></td></tr></table>'+"\n"); |
} |
} |
if (pscat=='fileext') { |
if (pscat=='fileext') { |
tablestart('Allowed File Extensions'); |
tablestart('Allowed File Extensions'); |
Line 1835 function init() {
|
Line 1845 function init() {
|
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'fileext') { sopt('fileext','File Extension'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'useslots') { sopt('useslots','Slots control access'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
else if (pscat == 'deeplink') { sopt('deeplink','Deep-linked items'); } |
|
else if (pscat == 'tex') { sopt('texdisplay','TeX File Display'); } |
else { pscat = 'any'; } |
else { pscat = 'any'; } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
if (pscat != 'deeplink') { sopt('any','String Value'); } |
} |
} |