本文整理汇总了PHP中DmQuery类的典型用法代码示例。如果您正苦于以下问题:PHP DmQuery类的具体用法?PHP DmQuery怎么用?PHP DmQuery使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DmQuery类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form_biblio_material_types
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;
}
示例2: dmSelect
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);
}
示例3: H
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"];
示例4: DmQuery
<?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);
?>
示例5: Localize
$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);
}
示例6: sprintf
}
$_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));
示例7: Localize
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
示例8: Localize
/* 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
示例9: Dm
$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>
示例10: DmQuery
?>
<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;
}
示例11: Localize
<?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">
示例12: header
$_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");
示例13: header
}
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);
示例14: Localize
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");
?>
示例15: Localize
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"]);
?>