Exemplo n.º 1
0
				<tr>
					<th class="tcl" scope="col">
						<?php 
    echo $_GET['search_type'] == 'categories' ? CATEGORIES_LABEL : LINKS_LABEL;
    ?>
					</th>
				</tr>
			</thead>
			<tbody class="hasicon">
				<?php 
    ($hook = get_hook('search_results_tbody_header')) ? eval($hook) : null;
    ?>
				<?php 
    while ($row = $db->fetch_assoc($sql_string_limit)) {
        if ($_GET['search_type'] == 'categories') {
            $row['url'] = openld_link('index_cat', se_index_cat($row));
        }
        ?>
				<tr>
					<td class="tcl">
						<?php 
        ($hook = get_hook('search_result_rows_header')) ? eval($hook) : null;
        ?>
						<a href="<?php 
        echo $row['url'];
        ?>
"<?php 
        echo $settings['open_links_in_new_windows'] == 'Y' && $_GET['search_type'] == 'links' ? ' target="_blank"' : '';
        ?>
><?php 
        echo openld_htmlspecialchars($row['title']);
Exemplo n.º 2
0
echo '<?xml version="1.0" encoding="utf-8"?>';
?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[<?php 
echo $settings['title'] . $extra_title;
?>
]]></title>
		<description><![CDATA[<?php 
echo $_GET['rss'] != 0 ? $fetch_category_row[1] : $settings['description'];
?>
]]></description>
		<link><?php 
echo $_GET['rss'] != 0 ? openld_link('index_cat', se_index_cat($_GET['rss'])) : $settings['domain'];
?>
</link>
		<generator>OpenLD</generator>
		<atom:link href="<?php 
echo $settings['domain'] . '/index.php?rss=' . $_GET['rss'];
?>
" rel="self" type="application/rss+xml" />
<?php 
while ($links = $db->fetch_assoc($link_result)) {
    ?>
		<item>
			<title><![CDATA[<?php 
    echo $links['title'];
    ?>
]]></title>
Exemplo n.º 3
0
        ?>
 <?php 
        echo $links['date_submitted'];
        ?>
								<?php 
        ($hook = get_hook('link_row_footer')) ? eval($hook) : null;
        ?>
							</td>
						</tr>
					<?php 
    }
    ?>
					<?php 
    ($hook = get_hook('links_after_while')) ? eval($hook) : null;
    ?>
				</tbody>
			</table>
			<?php 
    echo link_pagination($link_result, $req_page, 'index_cat_page', se_index_cat(array('id' => $req_id, 'title' => $req_cat)));
    ?>
		<?php 
} else {
    echo NO_LINKS_HERE;
}
?>
		<?php 
($hook = get_hook('links_after_first_if')) ? eval($hook) : null;
?>
	</div>
</div>
Exemplo n.º 4
0
function display_navbar($id, $url = null)
{
    global $db;
    $path_string = "";
    while ($id != 0) {
        $query = array('SELECT' => 'title, father_id, id, description', 'FROM' => 'categories', 'WHERE' => 'id=' . intval($id) . OPENLD_IF_ACTIVE_CATS);
        ($hook = get_hook('navigation_sql')) ? eval($hook) : null;
        $result = $db->query_build($query) or error(__FILE__, __LINE__);
        if ($db->num_rows($result) == 0) {
            $path_string = ' - no result' . $path_string;
            $id = 0;
        } else {
            $therow = $db->fetch_row($result);
            //to complement fetch_row's lack of functionality
            $therow['title'] = $therow[0];
            $therow['father_id'] = $therow[1];
            $therow['id'] = $therow[2];
            $therow['description'] = $therow[3];
            if ($url == null) {
                $link_url = openld_link('index_cat', se_index_cat($therow));
            } else {
                $link_url = $url . '?id=' . $therow['id'];
            }
            $path_string = ' - <a href="' . $link_url . '">' . $therow['title'] . '</a>' . $path_string;
            $id = $therow['father_id'];
            // pick the father_id from the db
        }
        ($hook = get_hook('categories_path_navigation_cell')) ? eval($hook) : null;
    }
    return $path_string;
}