Exemplo n.º 1
0
 function _print($type, $namel, $options, $list, $prefix)
 {
     global $loc;
     assert('$loc');
     assert('!empty($namel)');
     //    $loc_share = new Localize(OBIB_LOCALE, "shared"); //  //jalg multi 5-7-2015
     $loc_share = new Localize(OBIB_LOCALE, "shared");
     if ($type == 'session_id') {
         return;
     }
     if (isset($options['hidden'])) {
         //jalg multi 5-7-2015
         return;
     }
     if ($type == 'group') {
         echo '<tr><td class="' . $prefix . 'group" colspan="2">';
         Params::printForm($list, $prefix, $namel);
         echo '</td></tr>';
         return;
     }
     if ($type == 'order_by') {
         $title = 'Sort By';
     } elseif (isset($options['title']) && $options['title']) {
         $title = $options['title'];
     } else {
         $title = $namel[count($namel) - 1];
     }
     $name = $prefix . array_shift($namel);
     foreach ($namel as $n) {
         $name .= '[' . $n . ']';
     }
     if (isset($options['default'])) {
         $default = $options['default'];
     } else {
         $default = '';
     }
     echo '<tr class="' . $prefix . 'param">';
     echo '<td><label for="' . H($name) . '">';
     echo $loc->getText($title);
     echo '</label></td><td>';
     switch ($type) {
         case 'string':
             echo inputField('text', $name, $default);
             break;
         case 'date':
             echo inputField('date', $name, $default);
             break;
         case 'select':
             $l = array();
             foreach ($list as $v) {
                 list($n, $o) = $v;
                 if (isset($o['title']) && $o['title']) {
                     $l[$n] = $loc->getText($o['title']);
                 } elseif (strcmp($name, "rpt_material_type") == 0 || strcmp($name, "rpt_collection") == 0) {
                     $l[''] = $loc_share->getText("any");
                     foreach ($o as $i) {
                         $l[$o['code']] = $o['description'];
                     }
                 } else {
                     $l[$n] = $n;
                 }
             }
             echo inputField('select', $name, $default, NULL, $l);
             break;
         case 'order_by':
             $l = array();
             foreach ($list as $v) {
                 list($n, $o) = $v;
                 if (isset($o['title']) and $o['title']) {
                     $l[$n] = $loc->getText($o['title']);
                 } else {
                     $l[$n] = $n;
                 }
                 $l[$n . '!r'] = $l[$n] . ' ' . $loc->getText('reportsReverse');
                 //   $l[$n.'!r'] = $l[$n].' ('.$loc->getText("Reverse").')';// revisar de ALX
             }
             echo inputField('select', $name, $default, NULL, $l);
             break;
         default:
             assert(NULL);
     }
     echo '</td></tr>';
 }
Exemplo n.º 2
0
require_once '../classes/School.php';
$dmQ = new DmQuery();
$dmQ->connect();
$mbrClassifyDm = $dmQ->getAssoc('mbr_classify_dm');
$customFields = $dmQ->getAssoc('member_fields_dm');
$dmQ->close();
$gender = array(OBIB_GENDER_MALE => "Male", OBIB_GENDER_FEMALE => "Female");
$standardlevel = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10);
$standardGrade = array('' => 'none', 'A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D', 'E' => 'E', 'F' => 'F', 'G' => 'G', 'H' => 'H', 'I' => 'I', 'J' => 'J', 'K' => 'K', 'L' => 'L', 'M' => 'M', 'N' => 'N', 'O' => 'O', 'P' => 'P', 'Q' => 'Q', 'R' => 'R', 'S' => 'S', 'T' => 'T', 'U' => 'U', 'V' => 'V', 'W' => 'W', 'X' => 'X', 'Y' => 'Y', 'Z' => 'Z');
$scQ = new SchoolQuery();
$scQ->connect();
$schoolList = $scQ->getSchoolList();
$scQ->close();
$fields = array("mbrFldsClassify" => inputField('select', 'classification', $mbr->getClassification(), NULL, $mbrClassifyDm), "mbrFldsLastName" => inputField('text', "lastName", $mbr->getLastName()), "mbrFldsFirstName" => inputField('text', "firstName", $mbr->getFirstName()), "mbrFldsGender" => inputField('select', "gender", $mbr->getGender(), Null, $gender), "mbrFldsSchool" => inputField('select', "school", $mbr->getSchoolId(), Null, $schoolList), "mbrFldsStandard" => inputField('select', "standard", $mbr->getStandard(), Null, $standardlevel), "mbrFldsStandardGrade" => inputField('select', "grade", $mbr->getGrade(), Null, $standardGrade), "mbrFldsSchoolTeacher" => inputField('text', "schoolTeacher", $mbr->getSchoolTeacher()), "mbrFldsParentName" => inputField('text', "parentname", $mbr->getParentName()), "mbrFldsParentOccupation" => inputField('text', "parentoccupation", $mbr->getParentOccupation()), "mbrFldsMotherTongue" => inputField('text', "mothertongue", $mbr->getMotherTongue()), "mbrFldsEmail" => inputField('text', "email", $mbr->getEmail()), "Mailing Address:" => inputField('textarea', "address", $mbr->getAddress()), "mbrFldsHomePhone" => inputField('text', "homePhone", $mbr->getHomePhone()), "mbrFldsWorkPhone" => inputField('text', "workPhone", $mbr->getWorkPhone()));
foreach ($customFields as $name => $title) {
    $fields[$title . ':'] = inputField('text', 'custom_' . $name, $mbr->getCustom($name));
}
?>

<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo H($headerWording);
?>
 <?php 
echo $loc->getText("mbrFldsHeader");
?>
    </td>
  </tr>
<?php 
Exemplo n.º 3
0
<?php

/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
require_once "../functions/inputFuncs.php";
require_once "../classes/Location.php";
require_once "../classes/LocationQuery.php";
$locQ = new LocationQuery();
$locQ->connect();
$locations = $locQ->getLocations();
$allLocations = $locQ->getAssoc($locations);
$locQ->close();
$fields = array("location" => inputField('select', 'locationid', $location->getLocationid(), NULL, $allLocations));
?>


<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo H($headerWording);
?>
 
    </td>
  </tr>
<?php 
foreach ($fields as $title => $html) {
    ?>
  <tr>
    <td nowrap="true" class="primary" valign="top">
Exemplo n.º 4
0
function printInputText($fieldName, $size, $max, &$postVars, &$pageErrors, $visibility = "visible")
{
    $_SESSION['postVars'] = $postVars;
    $_SESSION['pageErrors'] = $pageErrors;
    $attrs = array('size' => $size, 'maxlength' => $max, 'style' => "visibility: {$visibility}");
    echo inputField('text', $fieldName, '', $attrs);
}
Exemplo n.º 5
0
function printUsmarcInputText($tag, $subfieldCd, $required, &$postVars, &$pageErrors, &$marcTags, &$marcSubflds, $showTagDesc, $cntrlType, $occur = "")
{
    $arrayIndex = sprintf("%03d", $tag) . $subfieldCd;
    $formIndex = $arrayIndex . $occur;
    $size = 40;
    $maxLen = 300;
    $cols = 35;
    $rows = 4;
    if (!isset($postVars)) {
        $value = "";
    } elseif (!isset($postVars['values'][$formIndex])) {
        $value = "";
    } else {
        $value = $postVars['values'][$formIndex];
    }
    if (!isset($postVars['fieldIds'])) {
        $fieldId = "";
    } elseif (!isset($postVars['fieldIds'][$formIndex])) {
        $fieldId = "";
    } else {
        $fieldId = $postVars['fieldIds'][$formIndex];
    }
    if (!isset($pageErrors)) {
        $error = "";
    } elseif (!isset($pageErrors[$formIndex])) {
        $error = "";
    } else {
        $error = $pageErrors[$formIndex];
    }
    echo "<tr><td class=\"primary\" valign=\"top\">\n";
    if ($required) {
        echo "<sup>*</sup> ";
    }
    if ($showTagDesc && isset($marcTags[$tag]) && isset($marcSubflds[$arrayIndex])) {
        echo H($marcTags[$tag]->getDescription());
        echo " (" . H($marcSubflds[$arrayIndex]->getDescription()) . ")";
    } elseif (isset($marcSubflds[$arrayIndex])) {
        echo H($marcSubflds[$arrayIndex]->getDescription());
    }
    if ($occur != "") {
        echo " " . H($occur + 1);
    }
    echo ":\n</td>\n";
    echo "<td valign=\"top\" class=\"primary\">\n";
    if ($cntrlType == OBIB_TEXTAREA_CNTRL) {
        $attrs = array('cols' => H($cols), 'rows' => H($rows));
        echo inputField('textarea', "values[" . H($formIndex) . "]", H($value), $attrs);
    } elseif ($cntrlType == OBIB_TEXT_CNTRL) {
        $attrs = array('size' => H($size), 'maxlength' => H($maxLen));
        echo inputField('text', "values[" . H($formIndex) . "]", H($value), $attrs);
    } elseif ($cntrlType == OBIB_FILE_CNTRL) {
        echo "<input type=\"file\"";
        echo " name=\"values[" . H($formIndex) . "]\" size=\"28\" />";
        if ($value) {
            $title = $postVars["values"]["245a"];
            $filepath = "../pictures/{$value}";
            $thumbpath = make_thumbnail($filepath, array('width' => 200));
            if (file_exists($thumbpath)) {
                echo "<br /><a href=\"{$filepath}\" title=\"{$title}\" target=\"_blank\"><img src=\"{$thumbpath}\" border=\"0\" title=\"{$title}\" alt=\"{$alt}\" /></a>";
            } else {
                echo "<div class=\"error\">File does not exists.</div>";
            }
        }
    }
    if ($error != "") {
        echo "<br><font class=\"error\">";
        echo H($error) . "</font>";
    }
    echo "<input type=\"hidden\" name=\"indexes[]\" value=\"" . H($formIndex) . "\" >\n";
    echo "<input type=\"hidden\" name=\"tags[" . H($formIndex) . "]\" value=\"" . H($tag) . "\" >\n";
    echo "<input type=\"hidden\" name=\"subfieldCds[" . H($formIndex) . "]\" value=\"" . H($subfieldCd) . "\" >\n";
    echo "<input type=\"hidden\" name=\"fieldIds[" . H($formIndex) . "]\" value=\"" . H($fieldId) . "\" >\n";
    echo "<input type=\"hidden\" name=\"requiredFlgs[" . H($formIndex) . "]\" value=\"" . H($required) . "\" >\n";
    echo "</td></tr>\n";
}
Exemplo n.º 6
0
<?php

/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
require_once "../functions/inputFuncs.php";
require_once "../classes/Staff.php";
require_once "../classes/StaffQuery.php";
$staffQ = new StaffQuery();
$staffQ->connect();
$all_staff = $staffQ->getAllStaff();
$staffnames = $staffQ->getAssoc($all_staff);
$staffQ->close();
$fields = array("locFldsAddr1" => inputField('text', "location", $location->getAddressOne()), "locFldsAddr2" => inputField('text', "address", $location->getAddressTwo()), "locstaffid" => inputField('select', 'staffid', $location->getStaffid(), NULL, $staffnames), "locFldsCity" => inputField('text', "city", $location->getCity()), "locFldsPincode" => inputField('text', "pincode", $location->getPincode()), "locFldsState" => inputField('text', "state", $location->getState()), "locFldsDays" => inputField('text', "days", $location->getDays()), "locFldsTime" => inputField('text', "time", $location->getTime()), "locFldsLatitude" => inputField('text', "latitude", $location->getLatitude()), "locFldsLongitude" => inputField('text', "longitude", $location->getLongitude()));
?>


<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo H($headerWording);
?>
 <?php 
echo $loc->getText("locFldsHeader");
?>
    </td>
  </tr>
<?php 
foreach ($fields as $title => $html) {
    ?>
Exemplo n.º 7
0
<?php

/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
require_once "../functions/inputFuncs.php";
require_once '../classes/DmQuery.php';
$fields = array("sclFldsSchoolName" => inputField('text', "schoolName", $scl->getSchoolName()), "sclFldsAddress" => inputField('text', "schoolAddress", $scl->getSchoolAddress()), "sclFldsContactPerson" => inputField('text', "contactPerson", $scl->getcontactPerson()), "sclFldsContactNumber" => inputField('text', "contactNumber", $scl->getContactNumber()), "sclFldsEmail" => inputField('text', "email", $scl->getEmail()));
?>

<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo H($headerWording);
?>
 <?php 
echo $loc->getText("sclFldsHeader");
?>
    </td>
  </tr>
<?php 
foreach ($fields as $title => $html) {
    ?>
  <tr>
    <td nowrap="true" class="primary" valign="top">
      <?php 
    echo $loc->getText($title);
    ?>
    </td>
    <td valign="top" class="primary">
    </td>
    <td valign="top" class="primary">
      <?php 
echo inputField('text', 'checkout_limit', $priv['checkout_limit']);
?>
    </td>
  </tr>
  <tr>
    <td nowrap="true" class="primary">
      <?php 
echo $loc->getText("Renewal Limit:");
?>
    </td>
    <td valign="top" class="primary">
      <?php 
echo inputField('text', 'renewal_limit', $priv['renewal_limit']);
?>
    </td>
  </tr>
  <tr>
    <td align="center" colspan="2" class="primary">
      <input type="submit" value="  <?php 
echo $loc->getText("adminSubmit");
?>
  " class="button">
      <input type="button" onClick="self.location='../admin/checkout_privs_list.php'" value="  <?php 
echo $loc->getText("adminCancel");
?>
  " class="button">
    </td>
  </tr>
function printUsmarcInputText($tag, $subfieldCd, $required, &$postVars, &$pageErrors, &$marcTags, &$marcSubflds, $showTagDesc, $cntrlType, $occur = "")
{
    $arrayIndex = sprintf("%03d", $tag) . $subfieldCd;
    $formIndex = $arrayIndex . $occur;
    $size = 40;
    $maxLen = 300;
    $cols = 35;
    $rows = 4;
    if (!isset($postVars)) {
        $value = "";
    } elseif (!isset($postVars['values'][$formIndex])) {
        $value = "";
    } else {
        $value = $postVars['values'][$formIndex];
    }
    if (!isset($postVars['fieldIds'])) {
        $fieldId = "";
    } elseif (!isset($postVars['fieldIds'][$formIndex])) {
        $fieldId = "";
    } else {
        $fieldId = $postVars['fieldIds'][$formIndex];
    }
    if (!isset($pageErrors)) {
        $error = "";
    } elseif (!isset($pageErrors[$formIndex])) {
        $error = "";
    } else {
        $error = $pageErrors[$formIndex];
    }
    echo "<tr><td class=\"primary\" valign=\"top\">\n";
    if ($required) {
        echo "<sup>*</sup> ";
    }
    if ($showTagDesc && isset($marcTags[$tag]) && isset($marcSubflds[$arrayIndex])) {
        echo H($marcTags[$tag]->getDescription());
        echo " (" . H($marcSubflds[$arrayIndex]->getDescription()) . ")";
    } elseif (isset($marcSubflds[$arrayIndex])) {
        echo H($marcSubflds[$arrayIndex]->getDescription());
    }
    if ($occur != "") {
        echo " " . H($occur + 1);
    }
    echo ":\n</td>\n";
    echo "<td valign=\"top\" class=\"primary\">\n";
    if ($cntrlType == OBIB_TEXTAREA_CNTRL) {
        ## lookup mods F.LaPlante - June 2009
        //echo "<textarea name=\"values[".H($formIndex)."]\"";
        //echo " cols=\"".H($cols)."\" rows=\"".H($rows)."\">\n";
        //echo H($value)."</textarea>";
        $attrs = array('cols' => H($cols), 'rows' => H($rows));
        echo inputField('textarea', "values[" . H($formIndex) . "]", H($value), $attrs);
    } else {
        ## lookup mods F.LaPlante - June 2009
        //echo "<input type=\"text\"";
        //echo " name=\"values[".H($formIndex)."]\"";
        //echo " size=\"".H($size)."\" maxlength=\"".H($maxLen)."\" ";
        //echo "value=\"".H($value)."\" >\n";
        $attrs = array('size' => H($size), 'maxlength' => H($maxLen));
        echo inputField('text', "values[" . H($formIndex) . "]", H($value), $attrs);
    }
    #if ($cntrlType == OBIB_TEXTAREA_CNTRL) {
    #  echo "<textarea name=\"values[".H($formIndex)."]\" cols=\"".H($cols)."\" rows=\"".H($rows)."\">";
    #  echo H($value)."</textarea>";
    #} else {
    #  echo "<input type=\"text\"";
    #  echo " name=\"values[".H($formIndex)."]\" size=\"".H($size)."\" maxlength=\"".H($maxLen)."\" ";
    #  echo "value=\"".H($value)."\" >";
    #}
    if ($error != "") {
        echo "<br><font class=\"error\">";
        echo H($error) . "</font>";
    }
    echo "<input type=\"hidden\" name=\"indexes[]\" value=\"" . H($formIndex) . "\" >\n";
    echo "<input type=\"hidden\" name=\"tags[" . H($formIndex) . "]\" value=\"" . H($tag) . "\" >\n";
    echo "<input type=\"hidden\" name=\"subfieldCds[" . H($formIndex) . "]\" value=\"" . H($subfieldCd) . "\" >\n";
    echo "<input type=\"hidden\" name=\"fieldIds[" . H($formIndex) . "]\" value=\"" . H($fieldId) . "\" >\n";
    echo "<input type=\"hidden\" name=\"requiredFlgs[" . H($formIndex) . "]\" value=\"" . H($required) . "\" >\n";
    echo "</td></tr>\n";
}
Exemplo n.º 10
0
?>
<br>
      <?php 
//printInputText("callNmbr2",20,20,$postVars,$pageErrors);
?>
<br>
      <?php 
//printInputText("callNmbr3",20,20,$postVars,$pageErrors);
?>
    </td>
  </tr>
   -->
  <!-- #C1 - begin-->
  <?php 
$readinglevel = array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9);
$fields = array("biblioFieldsReadlingLevel" => inputField('select', 'readingLevel', null, NULL, $readinglevel));
?>
  
  
  <?php 
foreach ($fields as $title => $html) {
    ?>
  <tr>
    <td nowrap="true" class="primary" valign="top">
      <sup>*</sup> <?php 
    echo $loc->getText($title);
    ?>
    </td>
    <td valign="top" class="primary">
      <?php 
    echo $html;
Exemplo n.º 11
0
 function _print($type, $namel, $options, $list, $prefix)
 {
     global $loc;
     assert('$loc');
     assert('!empty($namel)');
     if ($type == 'session_id') {
         return;
     }
     if (isset($options['hidden'])) {
         return;
     }
     if ($type == 'group') {
         echo '<tr><td class="' . $prefix . 'group" colspan="2">';
         Params::printForm($list, $prefix, $namel);
         echo '</td></tr>';
         return;
     }
     if ($type == 'order_by') {
         $title = 'Sort By';
     } elseif (isset($options['title']) && $options['title']) {
         $title = $options['title'];
     } else {
         $title = $namel[count($namel) - 1];
     }
     $name = $prefix . array_shift($namel);
     foreach ($namel as $n) {
         $name .= '[' . $n . ']';
     }
     if (isset($options['default'])) {
         $default = $options['default'];
     } else {
         $default = '';
     }
     echo '<tr class="' . $prefix . 'param">';
     echo '<td><label for="' . H($name) . '">';
     echo $loc->getText($title);
     echo '</label></td><td>';
     switch ($type) {
         case 'string':
         case 'date':
             echo inputField('text', $name, $default);
             break;
         case 'select':
             $l = array();
             foreach ($list as $v) {
                 list($n, $o) = $v;
                 if (isset($o['title']) && $o['title']) {
                     $l[$n] = $loc->getText($o['title']);
                 } else {
                     $l[$n] = $n;
                 }
             }
             echo inputField('select', $name, $default, NULL, $l);
             break;
         case 'order_by':
             $l = array();
             foreach ($list as $v) {
                 list($n, $o) = $v;
                 if (isset($o['title']) and $o['title']) {
                     $l[$n] = $loc->getText($o['title']);
                 } else {
                     $l[$n] = $n;
                 }
                 $l[$n . '!r'] = $l[$n] . ' (Reverse)';
             }
             echo inputField('select', $name, $default, NULL, $l);
             break;
         default:
             assert(NULL);
     }
     echo '</td></tr>';
 }
Exemplo n.º 12
0
/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
require_once "../functions/inputFuncs.php";
require_once '../classes/DmQuery.php';
require_once '../classes/School.php';
require_once '../classes/SchoolQuery.php';
$sclid = $_GET["sclid"];
$_POST["sclid"] = $sclid;
$sclQ = new SchoolQuery();
$sclQ->connect();
$scl = $sclQ->get($sclid);
$sclQ->close();
$standardLevel = array(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9);
$standardGrade = array('' => 'none', 'A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D', 'E' => 'E', 'F' => 'F', 'G' => 'G', 'H' => 'H', 'I' => 'I', 'J' => 'J', 'K' => 'K', 'L' => 'L', 'M' => 'M', 'N' => 'N', 'O' => 'O', 'P' => 'P', 'Q' => 'Q', 'R' => 'R', 'S' => 'S', 'T' => 'T', 'U' => 'U', 'V' => 'V', 'W' => 'W', 'X' => 'X', 'Y' => 'Y', 'Z' => 'Z');
$fields = array("sclFldsSchoolId" => inputField('text', "schoolId", $sclid, array("readonly" => "readonly")), "sclFldsSchoolName" => inputField('text', "schoolName", $scl->getSchoolName(), array("readonly" => "readonly")), "sclStandard" => inputField('select', 'standardLevel', null, NULL, $standardLevel), "sclGrade" => inputField('select', 'standardGrade', null, NULL, $standardGrade));
?>

<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php 
echo H($headerWording);
?>
 <?php 
echo $loc->getText("sclFldsHeader");
?>
    </td>
  </tr>
<?php 
foreach ($fields as $title => $html) {
Exemplo n.º 13
0
function printUsmarcInputText($tag, $subfieldCd, $required, &$postVars, &$pageErrors, &$marcTags, &$marcSubflds, $showTagDesc, $cntrlType, $occur = "")
{
    require_once "../classes/Localize.php";
    $shareloc = new Localize(OBIB_LOCALE, "shared");
    $arrayIndex = sprintf("%03d", $tag) . $subfieldCd;
    $formIndex = $arrayIndex . $occur;
    $size = 40;
    $maxLen = 300;
    $cols = 35;
    $rows = 4;
    if (!isset($postVars)) {
        $value = "";
    } elseif (!isset($postVars['values'][$formIndex])) {
        $value = "";
    } else {
        $value = $postVars['values'][$formIndex];
    }
    if (!isset($postVars['fieldIds'])) {
        $fieldId = "";
    } elseif (!isset($postVars['fieldIds'][$formIndex])) {
        $fieldId = "";
    } else {
        $fieldId = $postVars['fieldIds'][$formIndex];
    }
    if (!isset($pageErrors)) {
        $error = "";
    } elseif (!isset($pageErrors[$formIndex])) {
        $error = "";
    } else {
        $error = $pageErrors[$formIndex];
    }
    if ($required) {
        echo "<tr><td class=\"primary form-required\" valign=\"top\">\n";
        echo "<sup>*</sup> ";
    } else {
        echo "<tr><td class=\"primary form-optional\" valign=\"top\">\n";
    }
    if ($showTagDesc && isset($marcTags[$tag]) && isset($marcSubflds[$arrayIndex])) {
        $descr = $marcSubflds[$arrayIndex]->getDescription();
        $subfieldSet = explode(' ', $descr, 2);
        echo $tag . $subfieldCd . ' ';
        //muestra los indices de campos MARC
        //    echo $subfieldSet[0] . ' ' . H($marcTags[$tag]->getDescription());// muestra prefijo
        echo ' ; ' . H($marcTags[$tag]->getDescription());
        //    echo ' - ' . $subfieldSet[1];
        //    echo " - " .  H($marcTags[$tag]->getDescription());//test
        echo " - (" . H($marcSubflds[$arrayIndex]->getDescription()) . ")";
        //test
    } elseif (isset($marcSubflds[$arrayIndex])) {
        echo $tag . $subfieldCd . ' ';
        //muestra los indices de campos MARC
        //    echo H($marcSubflds[$arrayIndex]->getDescription());
        echo ' ; ' . H($marcTags[$tag]->getDescription());
        echo " - (" . H($marcSubflds[$arrayIndex]->getDescription()) . ")";
        //test
    }
    if ($occur != "") {
        echo " " . H($occur + 1);
    }
    echo ":\n</td>\n";
    echo "<td valign=\"top\" class=\"primary\">\n";
    switch ($cntrlType) {
        case OBIB_TEXTAREA_CNTRL:
            $attrs = array('cols' => H($cols), 'rows' => H($rows));
            echo inputField('textarea', "values[" . H($formIndex) . "]", $value, $attrs);
            break;
        case OBIB_TEXT_CNTRL:
            $attrs = array('size' => H($size), 'maxlength' => H($maxLen));
            echo inputField('text', "values[" . H($formIndex) . "]", $value, $attrs);
            break;
        case OBIB_FILE_CNTRLF:
            echo "<input type=\"text\"";
            echo " name=\"values[" . H($formIndex) . "]\" size=\"" . H($size) . "\" maxlength=\"" . H($maxLen) . "\" ";
            echo "value=\"" . H($value) . "\" >";
            echo "<sup>(6)</sup>";
            break;
        case OBIB_FILE_CNTRLD:
            echo "<input type=\"text\"";
            echo " name=\"values[" . H($formIndex) . "]\" size=\"" . H($size) . "\" maxlength=\"" . H($maxLen) . "\" ";
            echo " onChange=\"File_DigiReload()\" ";
            echo "value=\"" . H($value) . "\" >";
            echo "<sup>(5)</sup>";
            break;
        case OBIB_FILE_CNTRLA:
            echo "<input type=\"text\"";
            echo " name=\"values[" . H($formIndex) . "]\" size=\"" . H($size) . "\" maxlength=\"" . H($maxLen) . "\" ";
            echo " onChange=\"File_AutReload()\" ";
            echo "value=\"" . H($value) . "\" >";
            echo "<sup>(3)</sup>" . H($value);
            break;
        case OBIB_FILE_CNTRLS:
            echo "<input type=\"text\"";
            echo " name=\"values[" . H($formIndex) . "]\" size=\"" . H($size) . "\" maxlength=\"" . H($maxLen) . "\" ";
            echo " onChange=\"File_CoverReload()\" ";
            echo "value=\"" . H($value) . "\" >";
            echo "<sup>(1)</sup>" . $values[H($formIndex)];
            break;
        case OBIB_FILE_CNTRL:
            echo "<input type=\"file\"";
            echo " name=\"values[" . H($formIndex) . "]\" size=\"28\" />";
            echo "<input type=\"hidden\" name=\"old[" . H($formIndex) . "]\" value=\"{$value}\" />";
            if ($value) {
                $title = $postVars["values"]["245a"];
                $filepath = "../" . COVER_PATH . "/{$value}";
                $thumbpath = make_thumbnail($filepath, array('height' => 120));
                if (file_exists($thumbpath)) {
                    echo "<br /><a href=\"{$filepath}\" title=\"{$title}\" target=\"_blank\"><img src=\"{$thumbpath}\" border=\"0\" title=\"{$title}\" alt=\"{$title}\" /></a>";
                } else {
                    echo "<div class=\"error\">File does not exists.</div>";
                }
                echo " <a href=\"../catalog/biblio_cover_del.php?bibid=" . HURL($_REQUEST['bibid']) . "&redirect=edit\" onclick=\"javascript: return confirm('" . htmlspecialchars($shareloc->getText('Are you sure to remove this picture?'), ENT_QUOTES) . "');\">" . $shareloc->getText('Remove') . "</a>";
            }
            echo "<sup>(1)</sup>";
            break;
        case OBIB_FILE_CNTRLB:
            echo "<input type=\"file\"";
            echo " name=\"autor\"  ";
            echo " onChange=\"File_AutReload()\">\n";
            echo "<sup>(2)</sup>";
            break;
        case OBIB_FILE_CNTRLK:
            echo "<input type=\"file\"";
            echo " name=\"digital\"  ";
            echo " onChange=\"File_DigiReload()\" ";
            echo "<sup>(4)</sup>";
            break;
        default:
            break;
    }
    if ($error != "") {
        echo "<br><font class=\"error\">";
        if ($formIndex == '020a' || $formIndex == '245a') {
            // Enable suggestion link for existing ISBN check.
            echo $error . "</font>";
        } else {
            echo H($error) . "</font>";
        }
    }
    echo "<input type=\"hidden\" name=\"indexes[]\" value=\"" . H($formIndex) . "\" >\n";
    echo "<input type=\"hidden\" name=\"tags[" . H($formIndex) . "]\" value=\"" . H($tag) . "\" >\n";
    echo "<input type=\"hidden\" name=\"subfieldCds[" . H($formIndex) . "]\" value=\"" . H($subfieldCd) . "\" >\n";
    echo "<input type=\"hidden\" name=\"fieldIds[" . H($formIndex) . "]\" value=\"" . H($fieldId) . "\" >\n";
    echo "<input type=\"hidden\" name=\"requiredFlgs[" . H($formIndex) . "]\" value=\"" . H($required) . "\" >\n";
    echo "</td></tr>\n";
}