Post by Nuclear on Mar 10, 2006 23:17:43 GMT -8
First off do NOT EDIT this Code. There is no need to edit it. I created this code from scratch and as far as I know of it, it is bugless. You can Modify pretty much anything you like in the Table. Though whatever you do for the WIDTH Just enter a number in for the width do not include the "%" Sign and do not use "px or pt". When entering in info for the cells you can use simple HTML. However, I suggest you do so with EXTERMY CAUTION as improper HTML may cause the code to mess up. You should also know the basics of CSS before using this code.
Now for the Code, as far as to my knowledge it is Cross Browser. Just read the little info things on the top of each section and you will see where to place the code at. If you choose to modify this Code in any way, shape, or form you are held responsible for your actions and I am not responsible for your mistakes.
This is a code that I have been working on for 1 year already. Have fun and enjoy the fact that you do not need to ever have to modify this code.
Now for the Code, as far as to my knowledge it is Cross Browser. Just read the little info things on the top of each section and you will see where to place the code at. If you choose to modify this Code in any way, shape, or form you are held responsible for your actions and I am not responsible for your mistakes.
This is a code that I have been working on for 1 year already. Have fun and enjoy the fact that you do not need to ever have to modify this code.
<script type='text/javascript'>
<!--
/*
MAIN HEADER PORTION
Nuclear's Admin Editable Custom Table
This code must not be reposted anywhere without my permission
*/
var infoa="";
var infob="";
var infoc="";
var infod="";
var infoe="";
var infof="";
var infog="";
var infoh="";
var infoi="";
var infoj="";
var infok="";
var infol="";
var infom="";
document.write('<table width="92%" align="center"><tr><td width="100%" colspan="3" align="center" class="titlebg">'+infoa+'</td></tr><tr>')
document.write('<td class="'+infof+'" width="'+infoe+'%" align="'+infog+'">'+infob+'</td>')
document.write('<td width="'+infoh+'%" class="'+infoi+'" align="'+infoj+'">'+infoc+'</td>')
document.write('<td class="'+infol+'" width="'+infok+'%" align="'+infom+'">'+infod+'</td></tr></table>')
//-->
</script>
<script type='text/javascript'>
<!--
/*
MAIN FOOTER PORTION
Nuclear's Admin Editable Custom Table
This code must not be reposted anywhere without my permission
*/
var d = document.getElementsByTagName('div');
for(x=0;x<d.length;x++){
if(d[x].innerHTML.match(/Headers\sand\sFooters/i)){
d[x].innerHTML+='<br /><br /><b>Custom Table</b><br /><a href="index.cgi?action=headersfooters2&id=-&system=tablesettings">General Settings</a>';
}}
if(location.href.match(/system=tablesettings/i)){
document.title = document.title.replace('Home','Manage Table');
Table = document.getElementsByTagName('Table');
for(t=4;t<Table.length;t++){
Table.item(t).style.display = 'none'
}
AdminTable = '<table align="center" width="1024px" class="bordercolor"><tr>'
AdminTable+= '<td align="center" class="titlebg">Table Settings:</td>'
AdminTable+= '</tr><td align="center" vAlign="top" class="windowbg">'
AdminTable+= '<table width="100%"><tr><td align="center" colspan="8" width="100%">'
AdminTable+= 'Input Title: <input type="text" name="infoa" id="cell1" value="'+infoa+'" /><br /><br /></td></tr><tr>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 1:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infob" id="cell2" value="'+infob+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoe" id="width1" value="'+infoe+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infof" id="class1" value="'+infof+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infog" id="align1" value="'+infog+'" /></td></tr></table></td>'
AdminTable+= '<td width="39px"><table width="39px"><tr><td></td></tr></table></td>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 2:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infoc" id="cell3" value="'+infoc+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoh" id="width2" value="'+infoh+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoi" id="class2" value="'+infoi+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoj" id="align2" value="'+infoj+'" /></td></tr></table></td>'
AdminTable+= '<td width="39px"><table width="39px"><tr><td></td></tr></table></td>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 3:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infod" id="cell4" value="'+infod+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infok" id="width3" value="'+infok+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infol" id="class3" value="'+infol+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infom" id="align3" value="'+infom+'" /></td></tr></table></td>'
AdminTable+= '</tr></table>'
AdminTable+= '</td></table><br />'
AdminTable+= '<center><input type="submit" value="Modify Table Settings" onClick="TableObj()"/></center><br />'
document.write(AdminTable);
function TableObj(){
cona = document.getElementById('cell1');
conb = document.getElementById('cell2');
conc = document.getElementById('cell3');
cond = document.getElementById('cell4');
cone = document.getElementById('width1');
conf = document.getElementById('class1');
cong = document.getElementById('align1');
conh = document.getElementById('width2');
coni = document.getElementById('class2');
conj = document.getElementById('align2');
conk = document.getElementById('width3');
conl = document.getElementById('class3');
conm = document.getElementById('align3');
objInfo = document.forms.item(0).header;
objInfo.value = objInfo.value.replace(new RegExp('infoa="'+infoa+'"',"i"),'infoa="'+cona.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infob="'+infob+'"',"i"),'infob="'+conb.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoc="'+infoc+'"',"i"),'infoc="'+conc.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infod="'+infod+'"',"i"),'infod="'+cond.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoe="'+infoe+'"',"i"),'infoe="'+cone.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infof="'+infof+'"',"i"),'infof="'+conf.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infog="'+infog+'"',"i"),'infog="'+cong.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoh="'+infoh+'"',"i"),'infoh="'+conh.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoi="'+infoi+'"',"i"),'infoi="'+coni.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoj="'+infoj+'"',"i"),'infoj="'+conj.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infok="'+infok+'"',"i"),'infok="'+conk.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infol="'+infol+'"',"i"),'infol="'+conl.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infom="'+infom+'"',"i"),'infom="'+conm.value+'"');
document.forms.item(0).submit(true);
}}
//-->
</script>
<!--
/*
MAIN HEADER PORTION
Nuclear's Admin Editable Custom Table
This code must not be reposted anywhere without my permission
*/
var infoa="";
var infob="";
var infoc="";
var infod="";
var infoe="";
var infof="";
var infog="";
var infoh="";
var infoi="";
var infoj="";
var infok="";
var infol="";
var infom="";
document.write('<table width="92%" align="center"><tr><td width="100%" colspan="3" align="center" class="titlebg">'+infoa+'</td></tr><tr>')
document.write('<td class="'+infof+'" width="'+infoe+'%" align="'+infog+'">'+infob+'</td>')
document.write('<td width="'+infoh+'%" class="'+infoi+'" align="'+infoj+'">'+infoc+'</td>')
document.write('<td class="'+infol+'" width="'+infok+'%" align="'+infom+'">'+infod+'</td></tr></table>')
//-->
</script>
<script type='text/javascript'>
<!--
/*
MAIN FOOTER PORTION
Nuclear's Admin Editable Custom Table
This code must not be reposted anywhere without my permission
*/
var d = document.getElementsByTagName('div');
for(x=0;x<d.length;x++){
if(d[x].innerHTML.match(/Headers\sand\sFooters/i)){
d[x].innerHTML+='<br /><br /><b>Custom Table</b><br /><a href="index.cgi?action=headersfooters2&id=-&system=tablesettings">General Settings</a>';
}}
if(location.href.match(/system=tablesettings/i)){
document.title = document.title.replace('Home','Manage Table');
Table = document.getElementsByTagName('Table');
for(t=4;t<Table.length;t++){
Table.item(t).style.display = 'none'
}
AdminTable = '<table align="center" width="1024px" class="bordercolor"><tr>'
AdminTable+= '<td align="center" class="titlebg">Table Settings:</td>'
AdminTable+= '</tr><td align="center" vAlign="top" class="windowbg">'
AdminTable+= '<table width="100%"><tr><td align="center" colspan="8" width="100%">'
AdminTable+= 'Input Title: <input type="text" name="infoa" id="cell1" value="'+infoa+'" /><br /><br /></td></tr><tr>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 1:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 1\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infob" id="cell2" value="'+infob+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoe" id="width1" value="'+infoe+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infof" id="class1" value="'+infof+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infog" id="align1" value="'+infog+'" /></td></tr></table></td>'
AdminTable+= '<td width="39px"><table width="39px"><tr><td></td></tr></table></td>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 2:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 2\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infoc" id="cell3" value="'+infoc+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoh" id="width2" value="'+infoh+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoi" id="class2" value="'+infoi+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infoj" id="align2" value="'+infoj+'" /></td></tr></table></td>'
AdminTable+= '<td width="39px"><table width="39px"><tr><td></td></tr></table></td>'
AdminTable+= '<td width="175px"><table width="175px"><tr><td valign="middle" height="20px">'
AdminTable+= 'Input Cell 3:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s Width (%):</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s CSS Class:</td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px">Input Cell 3\'s Alignment:</td></tr></table></td>'
AdminTable+= '<td width="140px"><table width="140px"><tr><td valign="middle" height="20px">'
AdminTable+= '<input type="text" name="infod" id="cell4" value="'+infod+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infok" id="width3" value="'+infok+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infol" id="class3" value="'+infol+'" /></td></tr><tr>'
AdminTable+= '<td valign="middle" height="20px"><input type="text" name="infom" id="align3" value="'+infom+'" /></td></tr></table></td>'
AdminTable+= '</tr></table>'
AdminTable+= '</td></table><br />'
AdminTable+= '<center><input type="submit" value="Modify Table Settings" onClick="TableObj()"/></center><br />'
document.write(AdminTable);
function TableObj(){
cona = document.getElementById('cell1');
conb = document.getElementById('cell2');
conc = document.getElementById('cell3');
cond = document.getElementById('cell4');
cone = document.getElementById('width1');
conf = document.getElementById('class1');
cong = document.getElementById('align1');
conh = document.getElementById('width2');
coni = document.getElementById('class2');
conj = document.getElementById('align2');
conk = document.getElementById('width3');
conl = document.getElementById('class3');
conm = document.getElementById('align3');
objInfo = document.forms.item(0).header;
objInfo.value = objInfo.value.replace(new RegExp('infoa="'+infoa+'"',"i"),'infoa="'+cona.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infob="'+infob+'"',"i"),'infob="'+conb.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoc="'+infoc+'"',"i"),'infoc="'+conc.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infod="'+infod+'"',"i"),'infod="'+cond.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoe="'+infoe+'"',"i"),'infoe="'+cone.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infof="'+infof+'"',"i"),'infof="'+conf.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infog="'+infog+'"',"i"),'infog="'+cong.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoh="'+infoh+'"',"i"),'infoh="'+conh.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoi="'+infoi+'"',"i"),'infoi="'+coni.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infoj="'+infoj+'"',"i"),'infoj="'+conj.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infok="'+infok+'"',"i"),'infok="'+conk.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infol="'+infol+'"',"i"),'infol="'+conl.value+'"');
objInfo.value = objInfo.value.replace(new RegExp('infom="'+infom+'"',"i"),'infom="'+conm.value+'"');
document.forms.item(0).submit(true);
}}
//-->
</script>