Process / program name
Add a Citation or Update a Citation / cit_upd.php3
Description
This program displays a 'populated' form for editing. The 'populated' fields of the form may be blank (for Add a Citation) or contain existing data (for Update a Citation). Blank forms or forms to edit are treated the same way, as an edit. The user must edit this form, then press the "Changes for Citation #id_number" to submit the form. The data in the edited fields is passed to the next program.
Files called / (used) by the program
| Name | What it does | Files called |
|---|---|---|
| top.php3 | Adds header to the page. | |
| bottom.html | Adds footer to the page. | |
| xentire.php3 | First delete anything in the db associated with the citaton number to be added / updated, then insert into the db the incoming data. | |
mySQL Statement(s)
Javascript
function authleft() {
i = document.forms[0].all_ath.selectedIndex;
if (i >= 0) {
document.forms[0].athrs.value=document.forms[0].athrs.value+document.forms[0].all_ath.options[i].text+"\n";
document.forms[0].all_ath.options[i].selected = false;
}
}
function checkpub() {
j = document.forms[0].trun.length
k = -1
for (i = 0; i < j; i++)
if (document.forms[0].trun.options[i].selected)
k = i
pbl = 'xxxxxxxx'
if (k >= 0)
pbl = document.forms[0].trun.options[k].text
pbx = 'xxxxxxxx'
for (i = 0; i < document.forms[0].plnx.length; i++)
if (pbl == document.forms[0].plnx.options[i].text)
pbx = document.forms[0].plnx.options[i].value
j = document.forms[0].arpu.length
for (i = 0; i < j ; i++)
if (pbx == document.forms[0].arpu.options[i].text)
document.forms[0].arpu.options[i].selected = true
}
function dscleft() {
i = document.forms[0].all_dsc.selectedIndex;
j = document.forms[0].elements['dsc[]'].length;
if (i >= 0) {
txt = document.forms[0].all_dsc.options[i].text;
var option0 = new Option(txt);
document.forms[0].elements['dsc[]'].options[j] = option0;
document.forms[0].elements['dsc[]'].options[j].selected = true;
}
}
function dscright() {
i = document.forms[0].elements['dsc[]'].selectedIndex;
if (i >= 0) {
document.forms[0].elements['dsc[]'].options[i] = null;
}
}
function prcdsc() {
for (i = 0; i < document.forms[0].elements['dsc[]'].length; i++) {
document.forms[0].elements['dsc[]'].options[i].selected = true;
}
document.forms[0].submit();
}
if (document.forms[0].elements['dsc[]'].options[0].text.substr(0,2) == "xx") {
document.forms[0].elements['dsc[]'].options[0] = null;
}