Documentation for NLS Bibliography Maintenance Functions on bogrex

NLS Bibliography - Maintenance Documentation


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

NameWhat it doesFiles called
top.php3Adds header to the page. 
bottom.htmlAdds footer to the page. 
xentire.php3First 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)

  • mysql_query("select AUTHOR from AUTHORS where ID_NUMBER=$idnum order by AUTHOR_NUMBER",$db)
  • mysql_query("select * from ARTICLES where ID_NUMBER=$idnum",$db)
  • mysql_query("select distinct JOURNAL from PUBLISHER_LINK order by JOURNAL",$db)
  • mysql_query("select distinct SOURCE_TYPE from ARTICLES order by SOURCE_TYPE",$db)
  • mysql_query("select PUBLISHER,PUBLISHER_NUMBER from PUBLISHERS order by PUBLISHER",$db)
  • mysql_query("select PUBLISHER,PUBLISHER_NUMBER from PUBLISHERS order by PUBLISHER",$db)
  • mysql_query("select PUBLISHER,JOURNAL from PUBLISHERS,PUBLISHER_LINK where (PUBLISHERS.PUBLISHER_NUMBER=PUBLISHER_LINK.PUBLISHER_NUMBER) order by PUBLISHER",$db)
  • mysql_query("select distinct COHORT from COHORTS order by COHORT",$db)
  • mysql_query("select distinct COHORT from COHORTS where ID_NUMBER=$idnum order by COHORT",$db)
  • mysql_query("select DESC_TEXT from DESCRIPTOR_LIST,DESCRIPTORS where (ID_NUMBER=$idnum) and (DESCRIPTOR_LIST.DESC_NUMBER=DESCRIPTORS.DESC_NUMBER)",$db)
  • mysql_query("select distinct DESC_TEXT from DESCRIPTOR_LIST order by DESC_TEXT",$db)
  • mysql_query("select ABSTRACT from ABSTRACTS where ID_NUMBER=$idnum order by ABSTRACT_NUMBER",$db)

    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;
    }
    

    require('top.html');
    require('bottom.html');
    FORM ACTION="xentire.php3"


    manuals/system/bib-maint/maintenance/d-cit_upd.php3