本文整理汇总了PHP中Repository::get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::get_list方法的具体用法?PHP Repository::get_list怎么用?PHP Repository::get_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Repository
的用法示例。
在下文中一共展示了Repository::get_list方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_write_close
* MA 02110-1301 USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck("configuration-menu", "Osvdb");
session_write_close();
$search = GET('q');
ossim_valid($search, OSS_TEXT, 'illegal:' . _("Search"));
if (ossim_error()) {
die(ossim_error());
}
// connect to database
$db = new ossim_db();
$conn = $db->connect();
// search documents
list($document_list, $documents_num_rows) = Repository::get_list($conn, 0, -1, $search);
$db->close();
$data = array();
foreach ($document_list as $document) {
$_doc = array();
$_doc['documentId'] = $document->get_id();
$_doc['documenTitle'] = $document->get_title();
$data['documents'][] = $_doc;
}
echo json_encode($data);
示例2: preg_replace
<td valign='top'><?php
echo Incident::get_priority_in_html($priority);
?>
</td>
<td valign="top">
<?php
$has_found_keys = 0;
$max_rows = 10;
// Must have the same value in ../repository/index.php
$keywords = $incident->get_keywords_from_type($conn);
if ($keywords != "") {
$keywords = preg_replace("/\\s*,\\s*/", " OR ", $keywords);
list($aux_list, $has_found_keys) = Repository::get_list($conn, 0, 5, $keywords);
}
list($linked_list, $has_linked) = Repository::get_list_bylink($conn, 0, 999, $incident->get_id());
$keywords_search = $keywords != "" ? $keywords : $incident->get_title();
if ($has_found_keys > 0) {
$has_found = "<a href='../repository/?searchstr=" . urlencode($keywords) . "' style='text-decoration:underline'><strong>{$has_found_keys}</strong></a>";
} else {
if ($has_linked) {
$has_found = "<a href='../repository/?search_bylink=" . $incident->get_id() . "' style='text-decoration:underline'><strong>{$has_linked}</strong></a>";
}
}
$has_found = empty($has_found) ? 0 : $has_found;
?>
<table width="100%">
<tr><th height="18"><?php
echo _("Documents");
示例3: ossim_valid
//ossim_valid($name_link, OSS_ALPHA, OSS_PUNC, OSS_SPACE, '\(\)', 'illegal:' . _("name_link"));
ossim_valid($type_link, OSS_ALPHA, 'illegal:' . _("type_link"));
//ossim_valid($id_document, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("id_document"));
ossim_valid($linkdoc, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Linkdoc"));
ossim_valid(GET('insert'), OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Insert"));
ossim_valid(GET('newlinkname'), OSS_ALPHA, OSS_PUNC, '#', OSS_NULLABLE, 'illegal:' . _("Newlinkname"));
ossim_valid(GET('key_delete'), OSS_ALPHA, OSS_PUNC, OSS_NULLABLE, 'illegal:' . _("Key_delete"));
ossim_valid(GET('id_delete'), OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Id_delete"));
if (ossim_error()) {
die(ossim_error());
}
// DB connect
require_once "ossim_db.inc";
$db = new ossim_db();
$conn = $db->connect();
list($document_list, $documents_num_rows) = Repository::get_list($conn);
if ($id != "") {
$name_link = $conn->GetOne("SELECT title from incident as total WHERE id={$id}");
}
// New link on relationships
if ($linkdoc != "" && GET('insert') == "1") {
$aux = explode("####", GET('newlinkname'));
Repository::insert_relationships($conn, $linkdoc, $name_link, $type_link, $id_link);
}
// Delete link on relationships
if (GET('key_delete') != "" && GET('id_delete') != "") {
Repository::delete_relationships($conn, GET('id_delete'), GET('key_delete'));
}
$rel_list = Repository::get_relationships_by_link($conn, $id_link);
?>
<html>
示例4: ossim_valid
if ($order == "" && !$torder) {
$order = "date";
$torder = 1;
}
ossim_valid($id_document, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Id_document"));
ossim_valid($pag, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Pag"));
ossim_valid($order, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Order"));
ossim_valid($torder, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Torder"));
ossim_valid($search_str, OSS_TEXT, OSS_NULLABLE, 'illegal:' . _("Searchstr"));
if (ossim_error()) {
die(ossim_error());
}
if ($search_bylink != "") {
list($repository_list, $total) = Repository::get_list_bylink($conn, $from, $maxrows, $search_bylink);
} else {
list($repository_list, $total) = Repository::get_list($conn, $from, $maxrows, $search_str, $order, $torder);
}
$total_pages = floor(($total - 1) / $maxrows) + 1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title> <?php
echo gettext("OSSIM Framework");
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="Pragma" content="no-cache"/>
<link rel="stylesheet" type="text/css" href="../style/style.css"/>
<link rel="stylesheet" type="text/css" href="../style/greybox.css"/>
<script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>