Browse Collection

delete ('archive', array ('id' => $_POST['delRec']))) { $strErr = 'Unable to delete record.'; } // end if unset ($_POST); } // end if if (!empty ($_POST['idnum']) && empty ($_POST['strGo'])) { if (is_user_logged_in() == TRUE && !empty ($_POST['number'])) { $arrUpdate = $_POST; unset ($arrUpdate['idnum'], $arrUpdate['searchField'], $arrUpdate['searchText'], $arrUpdate['strGo'], $arrUpdate['newRec'], $arrUpdate['delRec']); foreach ($arrUpdate as $key => $val) { $arrUpdate[$key] = stripslashes ($val); } // end foreach // print_r ($arrUpdate); if ($_POST['idnum'] == 'newRecord') { if (!$intUpdate = $wpdb->insert ('archive', $arrUpdate)) { $strErr = 'Cannot insert new record.'; } // end if unset ($_POST); } else { if (!$intUpdate = $wpdb->update ('archive', $arrUpdate, array ('id' => $_POST['idnum']))) { $strErr = 'Unable to update record.'; } // end if } // end if } // end if if (!$arrArchive = $wpdb->get_results ("SELECT * FROM archive WHERE id = " . $_POST['idnum'])) { $strErr = 'Unable to retrieve this record.'; } // end if } elseif (!empty ($_POST['searchField'])) { if (!$arrArchive = $wpdb->get_results ("SELECT * FROM archive WHERE " . $_POST['searchField'] . " LIKE '%" . $_POST['searchText'] . "%' ORDER BY id")) { $strErr = 'Search returned no response.'; } // end if } elseif (!empty ($_POST['newRec'])) { // get first record just to have something to work with if (!$arrArchive = $wpdb->get_results ("SELECT * FROM archive ORDER BY id LIMIT 1")) { $strErr = 'Unable to find database.'; } // end if } // end if if (empty ($arrArchive)) { if (!$arrArchive = $wpdb->get_results ("SELECT * FROM archive ORDER BY id")) { $strErr = 'Cannot retrieve any records.'; } // end if } // end if $arrNoDisplay = array ('id', 'aids', 'location'); if (!empty ($arrArchive)) { $arrCols = $wpdb->get_col_info (); if (!empty ($_POST['newRec'])) { // empty out bogus 'new' record foreach ($arrArchive[0] as $key => $val) { $arrArchive[0]->$key = ''; } // end foreach } // end if } // end if // if (!empty ($_POST['searchText']) && empty ($_POST['idnum'])) { if (!empty ($_POST['searchText']) && !empty ($_POST['strGo']) && (count ($arrArchive) > 1 || is_user_logged_in() != TRUE)) { for ($i = 0; $i < count ($arrArchive); $i++) { foreach ($arrArchive[$i] as $key => $val) { $arrArchive[$i]->$key = preg_replace ("/" . $_POST['searchText'] . "/i", "$0", $val); } // end foreach } // end for } // end if $arrTextarea = array ('note', 'description', 'subjects'); /** echo "\n"; **/ ?>

Search for:  containing '" />

$strCol; ?>
number; ?> title; ?> $_POST['searchField']; ?>