function form_biblio_material_types($loc) { $form = ""; // Played with printselect function if (isset($postVars['materialCd'])) { $materialCd = $postVars['materialCd']; } else { $materialCd = ''; } $fieldname = "materialCd"; $domainTable = "material_type_dm"; $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->get($domainTable); $dmQ->close(); $form .= "<select id=\"materialCd\" name=\"materialCd\""; // Needed OnChange event here. $form .= " onChange=\"matCdReload()\">\n"; $form .= "<option value=\"\" selected>" . $loc->getText("any") . "</option>"; foreach ($dms as $dm) { $form .= "<option value=\"" . H($dm->getCode()) . "\""; $form .= ">" . H($dm->getDescription()) . "</option>"; } $form .= "</select>"; return $form; }
function dmSelect($table, $name, $value = "", $all = FALSE, $attrs = NULL) { $dmQ = new DmQuery(); $dmQ->connect(); # Don't use getAssoc() so that we can set the default below $dms = $dmQ->get($table); $dmQ->close(); $default = ""; $options = array(); if ($all) { $options['all'] = 'All'; } foreach ($dms as $dm) { $options[$dm->getCode()] = $dm->getDescription(); if ($dm->getDefaultFlg() == 'Y') { $default = $dm->getCode(); } } if ($value == "") { $value = $default; } return inputField('select', $name, $value, $attrs, $options); }
echo "<b>" . H($i) . "</b> "; } else { echo "<a href=\"javascript:changePage(" . H(addslashes($i)) . ",'" . H(addslashes($sort)) . "')\">" . H($i) . "</a> "; } } elseif ($i == $maxPg) { echo "... "; } } if ($currPage < $pageCount) { echo "<a href=\"javascript:changePage(" . ($currPage + 1) . ",'" . $sort . "')\">" . $loc->getText("biblioSearchNext") . "»</a> "; } } #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $collectionDm = $dmQ->getAssoc("collection_dm"); $materialTypeDm = $dmQ->getAssoc("material_type_dm"); $materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file"); $biblioStatusDm = $dmQ->getAssoc("biblio_status_dm"); $dmQ->close(); #**************************************************************************** #* Retrieving post vars and scrubbing the data #**************************************************************************** if (isset($_POST["page"])) { $currentPageNmbr = $_POST["page"]; } else { $currentPageNmbr = 1; } $searchType = $_POST["searchType"];
<?php /* This file is part of a copyrighted work; it is distributed with NO WARRANTY. * See the file COPYRIGHT.html for more details. */ ?> <table class="primary"> <tr> <th>Field</th> <th>Value</th> </tr> <tr> <td align="right" class="primary">Material Type</td> <?php $dmQ = new DmQuery(); $dmQ->connect(); $dm = $dmQ->get1("material_type_dm", $materialCd); $material_type = $dm->getDescription(); $dmQ->close(); ?> <td align="Left" class="primary"> <?php echo H($material_type); ?> </td></tr> <tr> <td align="right" class="primary">Tag</td> <td align="Left" class="primary"> <?php printInputText("tag", 3, 3, $postVars, $pageErrors); ?>
$loc = new Localize(OBIB_LOCALE, $tab); #**************************************************************************** #* Checking for get vars. Go back to form if none found. #**************************************************************************** if (count($_GET) == 0) { header("Location: ../circ/index.php"); exit; } #**************************************************************************** #* Retrieving get var #**************************************************************************** $mbrid = $_GET["mbrid"]; #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $mbrClassifyDm = $dmQ->getAssoc("mbr_classify_dm"); $biblioStatusDm = $dmQ->getAssoc("biblio_status_dm"); $materialTypeDm = $dmQ->getAssoc("material_type_dm"); $materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file"); $dmQ->close(); #**************************************************************************** #* Search database for member history #**************************************************************************** $histQ = new BiblioStatusHistQuery(); $histQ->connect(); if ($histQ->errorOccurred()) { $histQ->close(); displayErrorPage($histQ); }
} $_POST["barcodeNmbr"] = sprintf("%0" . $nzeros . "s", $bibid) . $CopyNmbr; } #**************************************************************************** #* Validate data #**************************************************************************** $bibid = $_POST["bibid"]; $copy = new BiblioCopy(); $copy->setBibid($bibid); $copy->setCopyDesc($_POST["copyDesc"]); $_POST["copyDesc"] = $copy->getCopyDesc(); $copy->setBarcodeNmbr($_POST["barcodeNmbr"]); $_POST["barcodeNmbr"] = $copy->getBarcodeNmbr(); $copy->setLocationid($_POST["location"]); $_POST["location"] = $copy->getCopyDesc(); $dmQ = new DmQuery(); $dmQ->connect(); $customFields = $dmQ->getAssoc('biblio_copy_fields_dm'); $dmQ->close(); foreach ($customFields as $name => $title) { if (isset($_REQUEST['custom_' . $name])) { $copy->setCustom($name, $_REQUEST['custom_' . $name]); } } $validBarco = $_POST["validBarco"]; $validData = $copy->validateData($validBarco); if (!$validData) { $pageErrors["barcodeNmbr"] = $copy->getBarcodeNmbrError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../catalog/biblio_copy_new_form.php?bibid=" . U($bibid));
require_once "../functions/errorFuncs.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); #**************************************************************************** #* Checking for query string. Go back to list if none found. #**************************************************************************** if (!isset($_REQUEST["code"])) { header("Location: ../admin/member_fields_list.php"); exit; } $code = $_REQUEST["code"]; $description = $_REQUEST["desc"]; #************************************************************************** #* Delete row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->delete("member_fields_dm", $code); $dmQ->close(); $memberQ = new MemberQuery(); $memberQ->connect(); $memberQ->deleteCustomField($code); $dmQ->close(); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Member field, %desc%, has been deleted.", array('desc' => $description)); ?> <br><br> <a href="../admin/member_fields_list.php"><?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 "../shared/common.php"; $tab = "admin"; $nav = "collections"; require_once "../classes/Dm.php"; require_once "../classes/DmQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../functions/formatFuncs.php"; require_once "../shared/logincheck.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->getWithStats("collection_dm"); $dmQ->close(); ?> <a href="../admin/collections_new_form.php?reset=Y"><?php echo $loc->getText("adminCollections_listAddNewCollection"); ?> </a><br> <h1><?php echo $loc->getText("adminCollections_listCollections"); ?> </h1> <table class="primary"> <tr> <th colspan="2" valign="top"><?php
$dm = new Dm(); $dm->setCode($_POST["code"]); $_POST["code"] = $dm->getCode(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/member_fields_edit_form.php"); exit; } #************************************************************************** #* Update domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->update("member_fields_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Member field, %desc%, has been updated.", array('desc' => $dm->getDescription())); ?> <br><br>
?> <tr> <td nowrap="true" class="primary" valign="top"> <?php echo $loc->getText("biblioCopyEditFormStatus"); ?> : </td> <td valign="top" class="primary"> <?php #************************************************************************** #* only show status codes for valid transitions #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->get("biblio_status_dm"); $dmQ->close(); echo "<select name=\"statusCd\""; if (in_array($postVars["statusCd"], $disallowed)) { echo " disabled"; } echo ">\n"; foreach ($dms as $dm) { $cd = $dm->getCode(); # We don't normally show transitions to disallowed states, but # we do want to show the correct status, if it's one of those. if (in_array($cd, $disallowed) && $cd != $postVars["statusCd"]) { continue; }
<?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 "../shared/common.php"; $tab = "admin"; $nav = "member_fields"; require_once "../classes/Dm.php"; require_once "../classes/DmQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../shared/logincheck.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->get("member_fields_dm"); $dmQ->close(); ?> <a href="../admin/member_fields_new_form.php?reset=Y"><?php echo $loc->getText("Add new custom field"); ?> </a><br> <h1> <?php echo $loc->getText("Custom Member FIelds"); ?> </h1> <table class="primary"> <tr> <th colspan="2" valign="top">
$_POST["code"] = $dm->getCode(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); $dm->setImageFile($_POST["imageFile"]); $_POST["imageFile"] = $dm->getImageFile(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/materials_edit_form.php"); exit; } #************************************************************************** #* Update domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->update("material_type_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("admin_materials_delMaterialType"); echo H($dm->getDescription()); echo $loc->getText("admin_materials_editEnd");
} if ($currPage < $pageCount) { echo "<a href=\"javascript:changePage(" . ($currPage + 1) . ")\">" . $loc->getText("mbrsearchnext") . "»</a> "; } } #**************************************************************************** #* Checking for post vars. Go back to form if none found. #**************************************************************************** if (count($_POST) == 0) { header("Location: ../circ/index.php"); exit; } #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $mbrClassifyDm = $dmQ->getAssoc("mbr_classify_dm"); $dmQ->close(); #**************************************************************************** #* Retrieving post vars and scrubbing the data #**************************************************************************** if (isset($_POST["page"])) { $currentPageNmbr = $_POST["page"]; } else { $currentPageNmbr = 1; } $searchType = $_POST["searchType"]; $searchText = trim($_POST["searchText"]); # remove redundant whitespace $searchText = eregi_replace("[[:space:]]+", " ", $searchText);
require_once "../classes/DmQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); #**************************************************************************** #* Get Status Message #**************************************************************************** if (isset($_GET["msg"])) { $msg = "<font class=\"error\">" . H($_GET["msg"]) . "</font><br><br>"; } else { $msg = ""; } #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $biblioStatusDm = $dmQ->getAssoc("biblio_status_dm"); $dmQ->close(); #**************************************************************************** #* Retrieving get var #**************************************************************************** $bibid = $_GET["bibid"]; #**************************************************************************** #* Show page #**************************************************************************** require_once "../shared/header.php"; ?> <h1><?php echo $loc->getText("biblioHoldListHead"); ?>
require_once "../shared/logincheck.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; #**************************************************************************** #* Checking for query string flag to read data from database. #**************************************************************************** if (isset($_GET["code"])) { unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); $code = $_GET["code"]; $postVars["code"] = $code; include_once "../classes/Dm.php"; include_once "../classes/DmQuery.php"; include_once "../functions/errorFuncs.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dm = $dmQ->get1("collection_dm", $code); $postVars["description"] = $dm->getDescription(); $postVars["daysDueBack"] = $dm->getDaysDueBack(); $postVars["dailyLateFee"] = $dm->getDailyLateFee(); $dmQ->close(); } else { require "../shared/get_form_vars.php"; } ?> <form name="editcollectionform" method="POST" action="../admin/collections_edit.php"> <input type="hidden" name="code" value="<?php echo H($postVars["code"]); ?>
$_POST["code"] = $dm->getCode(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); $dm->setMaxFines($_POST["max_fines"]); $_POST["max_fines"] = $dm->getMaxFines(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/mbr_classify_edit_form.php"); exit; } #************************************************************************** #* Update domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->update("mbr_classify_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Classification type, %desc%, has been updated.", array('desc' => $dm->getDescription())); ?> <br><br>
if (!isset($_POST['description']) or !$_POST['description']) { $pageErrors['description'] = 'This is a required field.'; } if (!empty($pageErrors)) { $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/copy_fields_new_form.php"); exit; } #************************************************************************** #* Insert new domain table row #************************************************************************** $dm = new Dm(); $dm->setCode($_POST["code"]); $dm->setDescription($_POST["description"]); $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->insert("biblio_copy_fields_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Copy field, %desc%, has been added.", array('desc' => $dm->getDescription())); ?> <br><br>
header("Location: ../circ/index.php"); exit; } #**************************************************************************** #* Retrieving get var #**************************************************************************** $mbrid = $_GET["mbrid"]; if (isset($_GET["msg"])) { $msg = "<font class=\"error\">" . H($_GET["msg"]) . "</font><br><br>"; } else { $msg = ""; } #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $mbrClassifyDm = $dmQ->getAssoc("transaction_type_dm"); $dmQ->close(); #**************************************************************************** #* Show transaction input form #**************************************************************************** require_once "../shared/header.php"; ?> <?php echo $msg; ?> <form name="accttransform" method="POST" action="../circ/mbr_transaction.php"> <table class="primary">
if (!isset($_POST['description']) or !$_POST['description']) { $pageErrors['description'] = 'This is a required field.'; } if (!empty($pageErrors)) { $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/member_fields_new_form.php"); exit; } #************************************************************************** #* Insert new domain table row #************************************************************************** $dm = new Dm(); $dm->setCode($_POST["code"]); $dm->setDescription($_POST["description"]); $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->insert("member_fields_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Member field, %desc%, has been added.", array('desc' => $dm->getDescription())); ?> <br><br>
<?php echo H($mbr->getFoto()); ?> </td> </tr> </table> </td> <td class="noborder" valign="top"> <?php #**************************************************************************** #* Show checkout stats #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->getCheckoutStats($mbr->getMbrid()); $dmQ->close(); echo $loc->getText("mbrViewHead2"); ?> <table class="primary"> <tr> <th align="left" rowspan="2"> <?php echo $loc->getText("mbrViewStatColHdr1"); ?> </th> <th align="left" rowspan="2"> <?php echo $loc->getText("mbrViewStatColHdr2");
function dmSelect($table, $name, $value = "", $all = FALSE, $attrs = NULL, $required = TRUE) { $dmQ = new DmQuery(); $dmQ->connect(); # Don't use getAssoc() so that we can set the default below $dms = $dmQ->get($table); $dmQ->close(); $default = ""; $options = array(); if ($all) { $options['all'] = 'All'; } if (!$required) { // Add "Any" for the first option. $loc = new Localize(OBIB_LOCALE, "shared"); $options[''] = $loc->getText("any"); } foreach ($dms as $dm) { $options[$dm->getCode()] = $dm->getDescription(); if ($dm->getDefaultFlg() == 'Y') { $default = $dm->getCode(); } } if ($value == "") { $value = $default; } if (!$required) { // Selected on "Any" option. $value = ""; } return inputField('select', $name, $value, $attrs, $options); }
require_once "../classes/UsmarcTagDmQuery.php"; require_once "../classes/UsmarcSubfieldDm.php"; require_once "../classes/UsmarcSubfieldDmQuery.php"; require_once "../functions/marcFuncs.php"; require_once "../classes/BiblioFieldQuery.php"; require_once "../classes/BiblioQuery.php"; // $loc = new Localize(OBIB_LOCALE,"shared"); if (isset($_GET["msg"])) { $msg = "<font class=\"error\">" . H($_GET["msg"]) . "</font><br><br>"; } else { $msg = ""; } #**************************************************************************** #* Loading a few domain tables into associative arrays marc #**************************************************************************** $LdmQ = new DmQuery(); $LdmQ->connect(); $collectionDm = $LdmQ->getAssoc("collection_dm"); $LmaterialTypeDm = $LdmQ->getAssoc("material_type_dm"); $LbiblioStatusDm = $LdmQ->getAssoc("biblio_status_dm"); $LdmQ->close(); $LmarcTagDmQ = new UsmarcTagDmQuery(); $LmarcTagDmQ->connect(); if ($LmarcTagDmQ->errorOccurred()) { $LmarcTagDmQ->close(); displayErrorPage($LmarcTagDmQ); } $LmarcTagDmQ->execSelect(); if ($LmarcTagDmQ->errorOccurred()) { $LmarcTagDmQ->close(); displayErrorPage($marcTagDmQ);
require_once "../functions/errorFuncs.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); #**************************************************************************** #* Checking for query string. Go back to collection list if none found. #**************************************************************************** if (!isset($_GET["code"])) { header("Location: ../admin/collections_list.php"); exit; } $code = $_GET["code"]; $description = $_GET["desc"]; #************************************************************************** #* Delete row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->delete("collection_dm", $code); $dmQ->close(); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("adminCollections_delStart"); echo H($description); echo $loc->getText("adminCollections_delEnd"); ?> <br><br> <a href="../admin/collections_list.php"><?php echo $loc->getText("adminCollections_delReturn"); ?>
require_once "../functions/errorFuncs.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); #**************************************************************************** #* Checking for query string. Go back to collection list if none found. #**************************************************************************** if (!isset($_GET["code"])) { header("Location: ../admin/mbr_classify_list.php"); exit; } $code = $_GET["code"]; $description = $_GET["desc"]; #************************************************************************** #* Delete row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->delete("mbr_classify_dm", $code); $dmQ->close(); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Classification type, %desc%, has been deleted.", array('desc' => $description)); ?> <br><br> <a href="../admin/mbr_classify_list.php"><?php echo $loc->getText("return to member classification list"); ?> </a>
<?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 "../shared/common.php"; $tab = "admin"; $nav = "materials"; require_once "../classes/Dm.php"; require_once "../classes/DmQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../shared/logincheck.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->getWithStats("material_type_dm"); $dmQ->close(); ?> <a href="../admin/materials_new_form.php?reset=Y"><?php echo $loc->getText("admin_materials_listAddmaterialtypes"); ?> </a><br> <h1> <?php echo $loc->getText("admin_materials_listMaterialtypes"); ?> </h1> <table class="primary"> <tr> <th colspan="3" valign="top">
$loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; #**************************************************************************** #* Checking for query string flag to read data from database. #**************************************************************************** if (isset($_GET["code"])) { unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); $code = $_GET["code"]; $postVars["code"] = $code; require_once "../classes/BiblioCopy.php"; require_once "../classes/BiblioCopyQuery.php"; include_once "../classes/Dm.php"; include_once "../classes/DmQuery.php"; include_once "../functions/errorFuncs.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dm = $dmQ->get1("biblio_status_dm", $code); $dmQ->close(); } $postVars["description"] = $dm->getDescription(); ?> <form name="editmatstateform" method="POST" action="../admin/matstate_edit.php"> <input type="hidden" name="code" value="<?php echo H($postVars["code"]); ?> "> <table class="primary"> <tr> <th colspan="2" nowrap="yes" align="left"> <?php
<?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'; require_once '../classes/SchoolQuery.php'; 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
/* This file is part of a copyrighted work; it is distributed with NO WARRANTY. * See the file COPYRIGHT.html for more details. */ require_once "../shared/common.php"; $tab = "admin"; $nav = "classifications"; require_once "../classes/Dm.php"; require_once "../classes/DmQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../functions/formatFuncs.php"; require_once "../shared/logincheck.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); require_once "../shared/header.php"; $dmQ = new DmQuery(); $dmQ->connect(); $dms = $dmQ->getWithStats("mbr_classify_dm"); $dmQ->close(); ?> <a href="../admin/mbr_classify_new_form.php?reset=Y"><?php echo $loc->getText("Add new member classificaiton"); ?> </a><br> <h1><?php echo $loc->getText("Member Classifications List"); ?> </h1> <table class="primary"> <tr> <th colspan="2" valign="top"><?php
$dm = new Dm(); $dm->setDescription($_POST["description"]); $_POST["description"] = $dm->getDescription(); $dm->setMaxFines($_POST["max_fines"]); $_POST["max_fines"] = $dm->getMaxFines(); if (!$dm->validateData()) { $pageErrors["description"] = $dm->getDescriptionError(); $_SESSION["postVars"] = $_POST; $_SESSION["pageErrors"] = $pageErrors; header("Location: ../admin/mbr_classify_new_form.php"); exit; } #************************************************************************** #* Insert new domain table row #************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $dmQ->insert("mbr_classify_dm", $dm); $dmQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("Classification type, %desc%, has been added.", array('desc' => $dm->getDescription())); ?> <br><br>
//Añadida por Bruj0 para limpiar cadenas con caracteres extraños require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, "shared"); #**************************************************************************** #* Retrieving get var #**************************************************************************** $bibid = $_GET["bibid"]; if (isset($_GET["msg"])) { $msg = "<font class=\"error\">" . H($_GET["msg"]) . "</font><br><br>"; } else { $msg = ""; } #**************************************************************************** #* Loading a few domain tables into associative arrays #**************************************************************************** $dmQ = new DmQuery(); $dmQ->connect(); $collectionDm = $dmQ->getAssoc("collection_dm"); $materialTypeDm = $dmQ->getAssoc("material_type_dm"); $biblioStatusDm = $dmQ->getAssoc("biblio_status_dm"); $customFields = $dmQ->getAssoc('biblio_copy_fields_dm'); // JALG from ALX 11-07-2015 $dmQ->close(); $marcTagDmQ = new UsmarcTagDmQuery(); $marcTagDmQ->connect(); if ($marcTagDmQ->errorOccurred()) { $marcTagDmQ->close(); displayErrorPage($marcTagDmQ); } $marcTagDmQ->execSelect(); if ($marcTagDmQ->errorOccurred()) {