本文整理汇总了PHP中DmQuery::getAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP DmQuery::getAssoc方法的具体用法?PHP DmQuery::getAssoc怎么用?PHP DmQuery::getAssoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DmQuery
的用法示例。
在下文中一共展示了DmQuery::getAssoc方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: H
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"];
$sortBy = $_POST["sortBy"];
if ($sortBy == "default") {
示例2: header
#* 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);
}
if (!$histQ->queryByMbrid($mbrid)) {
$histQ->close();
示例3: DmQuery
<?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
示例4: Localize
$loc = new Localize(OBIB_LOCALE, $tab);
#****************************************************************************
#* 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("mbr_classify_dm");
$materialTypeDm = $dmQ->getAssoc("material_type_dm");
$materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file");
$dmQ->close();
#****************************************************************************
#* Search database for member
#****************************************************************************
$mbrQ = new MemberQuery();
$mbrQ->connect();
$mbr = $mbrQ->get($mbrid);
$mbrQ->close();
#**************************************************************************
#* Show member checkouts
#**************************************************************************
?>
<html>
示例5: BiblioCopy
}
#****************************************************************************
#* 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));
exit;
}
示例6: H
}
#****************************************************************************
#* 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("mbr_classify_dm");
$mbrMaxFines = $dmQ->getAssoc("mbr_classify_dm", "max_fines");
$biblioStatusDm = $dmQ->getAssoc("biblio_status_dm");
$materialTypeDm = $dmQ->getAssoc("material_type_dm");
$materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file");
$memberFieldsDm = $dmQ->getAssoc("member_fields_dm");
$dmQ->close();
#****************************************************************************
#* Search database for member
#****************************************************************************
$mbrQ = new MemberQuery();
$mbrQ->connect();
$mbr = $mbrQ->get($mbrid);
$mbrQ->close();
#****************************************************************************
#* Check for outstanding balance due
示例7: H
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);
}
$LmarcTags = $LmarcTagDmQ->fetchRows();
示例8: header
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);
if ($searchType == "barcodeNmbr") {
$sType = OBIB_SEARCH_BARCODE;
示例9: H
}
#****************************************************************************
#* 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">
<tr>
<th colspan="2" valign="top" nowrap="yes" align="left">
示例10: Localize
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");
?>
</h1>
<?php
示例11: Localize
$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()) {
$marcTagDmQ->close();
displayErrorPage($marcTagDmQ);
示例12: DmQuery
$_POST["cel"] = $mbr->getCel();
$mbr->setEmail($_POST["email"]);
$_POST["email"] = $mbr->getEmail();
$mbr->setFoto($_POST["foto"]);
$_POST["foto"] = $mbr->getFoto();
$mbr->setPassUser($_POST["passUser"]);
$_POST["passUser"] = $mbr->getPassUser();
$mbr->setBornDt($_POST["bornDt"]);
$_POST["bornDt"] = $mbr->getBornDt();
$mbr->setOther($_POST["other"]);
$_POST["other"] = $mbr->getOther();
$mbr->setClassification($_POST["classification"]);
$mbr->setStatus($_POST["status"]);
$dmQ = new DmQuery();
$dmQ->connect();
$customFields = $dmQ->getAssoc('member_fields_dm');
$dmQ->close();
foreach ($customFields as $name => $title) {
if (isset($_REQUEST['custom_' . $name])) {
$mbr->setCustom($name, $_REQUEST['custom_' . $name]);
}
}
$validData = $mbr->validateDataUser();
if (!$validData) {
$pageErrors["barcodeNmbr"] = $mbr->getBarcodeNmbrError();
$pageErrors["lastName"] = $mbr->getLastNameError();
$pageErrors["firstName"] = $mbr->getFirstNameError();
$pageErrors["status"] = $mbr->getStatusError();
$_SESSION["postVars"] = $_POST;
$_SESSION["pageErrors"] = $pageErrors;
header("Location: ../user/user_edit_form.php");
示例13: BiblioQuery
$biblio = new BiblioQuery();
$biblio->delete($bib_id);
$count++;
}
}
echo '<div id="message"><font class="error">';
if ($count == 1) {
echo $count . ' ' . $locsh->getText("sharedRecordIsDeleted");
} elseif ($count > 1) {
echo $count . ' ' . $locsh->getText("sharedRecordsAreDeleted");
}
echo '</font></div>';
}
$dmQ = new DmQuery();
$dmQ->connect();
$collectionDm = $dmQ->getAssoc("collection_dm");
$materialTypeDm = $dmQ->getAssoc("material_type_dm");
$dmQ->close();
/*
print_r($dmQ);
*/
$biblioQ = new BiblioSearchQuery();
$biblioQ->setItemsPerPage(500);
$biblioQ->connect();
if ($biblioQ->errorOccurred()) {
$biblioQ->close();
displayErrorPage($biblioQ);
}
$sType = 'title';
$words = '';
$currentPageNmbr = isset($_POST["page"]) ? $_POST["page"] : 1;
示例14: run_batch
function run_batch($lines, $date)
{
$rowcount = 0;
$b = array();
while (count($lines)) {
$columns = str_getcsv(array_shift($lines), ",", "\"");
/* Column 0 is for the serial number */
if ($columns[0] == 'S No') {
continue;
}
$rowcount++;
if (strlen(trim($columns[0])) == 0) {
//add title to an array
$b[$rowcount] = "Record " . $rowcount . " Barcode/Serial No not entered.";
continue;
}
/*column 1 is for the title*/
if (strlen(trim($columns[1])) == 0) {
$b[$rowcount] = "Record " . $rowcount . " Title not entered.";
continue;
} else {
$columns[1] = str_replace("'", "\\'", $columns[1]);
}
/*column 2 is for the author*/
$columns[2] = str_replace("'", "\\'", $columns[2]);
$import = new ImportQuery();
$dmQ = new DmQuery();
$collectionDesc = $dmQ->getAssoc("collection_dm", "description");
$materials = $dmQ->getAssoc("material_type_dm", "description");
$statuses = $dmQ->getAssoc("biblio_status_dm", "description");
/*column 3 is for the circulation status(in- active,ina- inactive,lst-damaged)*/
$status_found = false;
foreach ($statuses as $code => $status) {
if (strcmp($columns[3], $status) == 0) {
$columns[3] = $code;
$status_found = true;
}
}
if (strlen(trim($columns[3])) == 0 || status_found == false) {
$columns[3] = "in";
}
/*column 4 is for Category , column 5 is for Type*/
foreach ($collectionDesc as $code => $collection) {
if (strcmp($columns[4] . " " . $columns[5], $collection) == 0) {
$columns[4] = $code;
}
}
if (strlen(trim($columns[4])) == 0) {
$columns[4] = '1';
}
/*column 6 is for Medium(book,video/dvd,magazine)*/
foreach ($materials as $code => $collection) {
if (strcmp($columns[6], $collection) == 0) {
$columns[6] = $code;
}
}
if (strlen(trim($columns[6])) == 0) {
$columns[6] = '2';
}
/*column 7 is for comments*/
if (strlen(trim($columns[7])) == 0) {
$columns[7] = ' ';
}
/*column 8 is for location id*/
if (strlen(trim($columns[8]) == 0) || !is_numeric($columns[8])) {
$columns[8] = null;
}
$bibid = $import->alreadyInDB($columns[1]);
if ($bibid == 0) {
$lastinsertid = $import->insertBiblio($columns);
if ($lastinsertid == 0) {
//add title to an array
$b[$rowcount] = "Record " . $rowcount . " Unknown error.";
continue;
}
$import->insertBiblioCopy($columns, $lastinsertid);
} else {
$import->insertBiblioCopy($columns, $bibid);
}
}
return $b;
}