function print_bd($p, $g) { // This func prints birth and death events for spouses and children, // appended with inline source citations if primary sources exists for // those events. // NOTE that the $g var is used to reference both // tag_groups.tag_group_id where birth = 1 and death = 3, // and sources.part_type where baptism = 1 and burial = 3. // If you have selected other part_type keys for your primary birth and // death sources, this func won't print source references to BD events. // In that case you may want to use the outcommented section of // pop_child() below which will cite sources to parent/child relations. if ($row = fetch_row_assoc("\n SELECT\n event_key,\n tag_key,\n event_date,\n get_place_name(place_key) place_name\n FROM\n person_event_groups\n WHERE\n person = {$p}\n AND\n group_key = {$g}\n ")) { $src = fetch_val("\n SELECT\n get_source_text(source_id)\n FROM\n event_citations e, sources s\n WHERE\n e.event_fk = " . $row['event_key'] . "\n AND\n e.source_fk = s.source_id\n AND\n s.part_type = {$g}\n ORDER BY\n s.source_date ASC\n LIMIT 1\n "); echo para(get_tag_name($row['tag_key']) . conc(fuzzydate($row['event_date'])) . conc($row['place_name']) . conc($src ? span_type(paren($src), "inline_source") : ''), "bmd"); } }
<li id="page-info"> <div class="info"> <a href="<?php bb_tag_rss_link(); ?> "><img src="<?php echo bb_get_active_theme_uri(); ?> image/feed.png" width="16" height="16" alt="Feed"/></a> </div> <h2><?php _e('Page Information', 'guangzhou'); ?> </h2> <p><?php printf(__('This page shows <strong>%1s</strong> with the tag <strong>%2s</strong>.', 'guangzhou'), sprintf(__ngettext('%d topic', '%d topics', count($topics)), count($topics)), get_tag_name()); ?> </p> <p><?php printf(__('Subscribe through your <a href="%s">feed reader</a>.', 'guangzhou'), bb_get_tag_rss_link()); ?> </p> </li> <li> <?php do_action('gz_place_sidebar'); ?> </li> <?php if (bb_current_user_can('manage_tags')) { ?>
function get_user_selected($list, $user_selected) { $item_names = array(); $targets = explode(',', $user_selected); foreach ($targets as $value) { $tag_name = get_tag_name($value); if ($tag_name) { $names = tag2names($list, $tag_name); foreach ($names as $name) { if (!in_array($name, $item_names)) { $item_names[] = $name; } } } else { if (!in_array($value, $item_names)) { $item_names[] = $value; } } } $result = array(); foreach ($item_names as $name) { foreach ($list as $key => $item) { if ($item['name'] == $name) { $result[] = $item; } } } return $result; }
end_left_pane(); start_right_pane(); // -------------- Host details --------------- echo "<fieldset><legend>Host Details [ <a href='hosts_setup.php?id={$id}&hostgroup={$groupname}'>edit details</a> ] [ <a href='host-view.php?id={$id}&action=delete&hostgroup={$groupname}'>delete {$name}</a> ]</legend>"; echo "<table class=detail>"; echo "<tr><th>OS Type</th><th>OS Version</th><th>Vendor</th><th>Model</th><th>Serial No</th></tr>"; echo "\t<tr><td><img src='{$icon}' border='0'> {$ostype}</td><td>{$osvers}</td><td>{$po}</td><td>{$model}</td><td>{$serialno}</td></tr>\n"; echo "</table>\n"; echo "</fieldset>"; echo "<fieldset><legend>Tags [ <a href='tags_hosts.php?id={$id}&hostgroup={$groupname}'>edit tags</a> ]</legend>"; $query_tags = "SELECT * FROM `hosts-tags` where `id-hosts` = '{$id}' "; $result_tags = mysql_query($query_tags) or die(mysql_error() . "<br>Couldn't execute query: {$query_tags}"); $tag_list = ""; while ($tagrow = mysql_fetch_array($result_tags)) { $tag_id = $tagrow['id-tags']; $tag_name = get_tag_name($tag_id); $tag_list .= $tag_name . ", "; } echo "{$tag_list}"; echo "</br>\n"; echo "</fieldset>"; // -------------- Deployment Identity --------------- echo "<fieldset><legend>Deployment Information</legend>"; $query_identity = "SELECT * FROM `hosts-identities` where `id_host` like '{$id}' "; $result_identity = mysql_query($query_identity) or die(mysql_error() . "<br>Couldn't execute query: {$query_identity}"); $nridentity = mysql_num_rows($result_identity); if (empty($nridentity)) { echo "<img src=\"images/error.gif\"> No identity account for deployment associated with this host. <a href=\"identities_hosts.php?hostgroup={$hostgroup}&id={$id}\">Please add one now</a> "; } else { $row_identity = mysql_fetch_array($result_identity); // Afecting values
$hostname = get_host_name($id); start_main_frame("<a href=\"show_all_hosts.php\"> SKM </a> > <a href=\"host-view.php?hostgroup={$hostgroup}&id={$id}\">{$hostname}</a> > Assign tags"); start_left_pane(); display_menu(); end_left_pane(); start_right_pane(); // -------------- Host details --------------- echo "<fieldset><legend>Currently assigned tags</legend>"; // We list current assigned tags $result_tags = mysql_query("SELECT * FROM `hosts-tags` where `id-hosts` like '{$id}' ") or die(mysql_error() . "<br>Couldn't execute query: {$query}"); $nr = mysql_num_rows($result_tags); if (!empty($nr)) { echo "<table class=detail>"; echo "<tr><th>Tag name</th><th>actions</th></tr>"; while ($row_tag = mysql_fetch_array($result_tags)) { echo "<tr><td>" . get_tag_name($row_tag['id-tags']) . "</td><td><a href=\"tags_hosts_remove.php?id=" . $id . "&hostgroup=" . $hostgroup . "&tag_id=" . $row_tag['id-tags'] . "\"> [delete]</a></TD></TR>"; } echo "</table>"; } echo "</fieldset>"; echo "<fieldset><legend>Assign new tags</legend>"; echo '<form name="assignTags" action="tags_hosts.php" method="post">'; //Display the selection box for the groups $result = mysql_query("SELECT * FROM `tags` ORDER BY `name` ") or die(mysql_error() . "<br>Couldn't execute query: {$query}"); $nr = mysql_num_rows($result); if (empty($nr)) { echo "<input name=\"id_tags\" type=\"hidden\" value=\"X\">"; } else { echo '<select class="list" name="id_tags">'; echo '<option selected value="X">Please select an existing tag</option>'; while ($row = mysql_fetch_array($result)) {
require "./settings/settings.php"; require "./functions.php"; require_once "./langs/{$language}.php"; $title = "{$_Event_types}"; require "./header.php"; echo "<div class=\"normal\">\n"; echo "<h2>{$title}</h2>\n"; echo "<p>( <a href=\"./forms/tag_edit.php?tag=0\">{$_insert}</a> )</p>\n"; echo "<table>\n"; $tag_group_name = 'tag_group_name_' . $language; $handle = pg_query("\n SELECT\n tag_id,\n tag_type_fk,\n {$tag_group_name},\n tag_name,\n gedcom_tag,\n tag_label,\n tag_count(tag_id) AS tc\n FROM\n tags, tag_groups\n WHERE\n tag_group_fk = tag_group_id\n ORDER BY\n tc DESC\n "); while ($row = pg_fetch_assoc($handle)) { echo "<tr>"; if ($row['tc'] == 0) { // if tag is unused, display link for deletion echo "<td><strong><a href=\"./forms/tag_delete.php?tag=" . $row['tag_id'] . "\">{$_delete}</a></strong></td>"; } else { echo "<td><a href=\"./tag_view.php?tag=" . $row['tag_id'] . "\">{$_report}</a></td>"; } echo "<td align=\"right\">" . $row['tc'] . "</td>"; // echo "<td>".$row['tag_group_label']."</td>"; echo "<td><code>" . $row['gedcom_tag'] . "</code></td>"; echo "<td><a href=\"./forms/tag_edit.php?tag=" . $row['tag_id'] . "\" title=\"{$_edit}\">" . $row['tag_name'] . "</a></td>"; echo "<td>" . $row['tag_type_fk'] . "</td>"; echo "<td>" . get_tag_name($row['tag_id']) . "</td>"; echo "<td>" . $row[$tag_group_name] . "</td>"; echo "</tr>\n"; } echo "</table>\n"; echo "</div>\n"; include "./footer.php";
function breadcrumbs() { $page = ''; if (bb_get_location() == 'login-page') { $page = __('Log in', 'guangzhou'); } elseif (is_forum()) { $page = get_forum_name(); } elseif (is_bb_tags() && get_tag_name() != '') { $page = '<a href="' . bb_get_tag_page_link() . '">' . __('Tags') . '</a> » ' . get_tag_name(); } elseif (is_topic()) { if (get_forum_name()) { $page = '<a href="' . get_forum_link() . '">' . get_forum_name() . '</a>'; } } if ($page) { $page = '| ' . $page; } return '<a href="' . bb_get_option('uri') . '">' . bb_get_option('name') . '</a> ' . $page; }
echo "<h3>Personer nevnt i kilden:</h3>\n"; list_mentioned($self, 1); } else { echo para(to_url('./forms/linkage_add.php', array('node' => $self), 'Legg til lenke')); } } // ***************************************************************************** // section I: print list of events cited by this source // ***************************************************************************** if ($props['number_of_events']) { echo "<h3>{$_Events}:</h3>\n<ol>"; $handle = pg_query("\n SELECT\n e.event_id,\n e.tag_fk,\n e.event_date,\n get_place_name(e.place_fk) AS event_place,\n link_expand(e.event_note) AS event_note,\n get_event_type(e.event_id) AS event_type\n FROM\n events e,\n event_citations s\n WHERE\n e.event_id = s.event_fk\n AND\n s.source_fk = {$self}\n ORDER BY\n get_event_type(e.event_id),\n e.sort_date,\n e.event_id\n "); while ($row = pg_fetch_assoc($handle)) { $event = $row['event_id']; echo '<li>'; echo square_brace($event) . conc(italic(get_tag_name($row['tag_fk']))) . conc(fuzzydate($row['event_date'])) . conc($row['event_place']); if ($row['event_type'] < 3) { // event has one or two participants, print names inline echo conc(list_participants($event), ': '); } echo conc($row['event_note'], ': '); echo ' ' . paren(to_url('./forms/source_event_edit.php', array('event' => $event, 'source' => $self), $_edit) . ' / ' . to_url('./forms/citation_delete.php', array('person' => 0, 'event' => $event, 'source' => $self), $_delete)); if ($row['event_type'] == 3) { // event has any number of participants, print names as ordered list $subhandle = pg_query("\n SELECT\n person_fk,\n is_principal,\n sort_order\n FROM\n participants\n WHERE\n event_fk={$event}\n ORDER BY\n sort_order\n "); echo '<ul>'; while ($subrow = pg_fetch_assoc($subhandle)) { $participant = $subrow['person_fk']; $bp = $subrow['is_principal'] == 't' ? ' H ' : ' B '; echo '<li> '; // print link to edit sort order