<?php

require "settings.php";
$OUTPUT = show_listing();
require "template.php";
function show_listing()
{
    db_connect();
    $get_burs = "SELECT * FROM bursaries ORDER BY bursary_name";
    $run_burs = db_exec($get_burs) or errDie("Unable to get bursaries information.");
    if (pg_numrows($run_burs) < 1) {
        return "No bursaries found.";
    } else {
        $listing = "";
        while ($barr = pg_fetch_array($run_burs)) {
            $listing .= "\n\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t<td>{$barr['bursary_name']}</td>\n\t\t\t\t\t\t<td>" . nl2br($barr['bursary_details']) . "</td>\n\t\t\t\t\t\t<td><a href='bursary_type_rem.php?id={$barr['id']}'>Remove</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t";
        }
    }
    $display = "\n\t\t\t<h2>Bursaries View</h2>\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Bursary Name</th>\n\t\t\t\t\t<th>Bursary Details</th>\n\t\t\t\t\t<th>Options</th>\n\t\t\t\t</tr>\n\t\t\t\t{$listing}\n\t\t\t</table><br>" . mkQuickLinks(ql("bursary_type_add.php", "Add Bursary"), ql("bursary_type_view.php", "View Bursaries"));
    return $display;
}
Exemplo n.º 2
0
    $category = $_POST['item-type'];
    $color = $_POST['item-color'];
    $descr = $_POST['further-description'];
    $date = $_POST['date'];
    $email = $_POST['email'];
    $status = $_POST['status'];
}
?>

<!-- Main page content: -->
<div id="mainForm">
<?php 
// Upon GET, display the listing of the item with specified id
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    if (isset($_GET['id'])) {
        show_listing($dbc, $id);
    }
}
?>
<br><br>

<input action="action" type="button" value="Back" onclick="history.go(-1);" />

<input type="button" onclick="location.href='index.php';" value="Home" />

<?php 
// Create the "Claim Item" button to send an email
if (isset($_GET['id'])) {
    buildEmailButton($dbc, $id);
}
?>
Exemplo n.º 3
0
<?php

// meta tags for head section
$config['site']['meta_title'] = $config['site']['title'] . " - Home Page";
// output content
// $page_title = "front page: ".$config['site']['title'];
if (isset($article)) {
    echo show_article($article, $config);
} elseif (isset($articles)) {
    echo show_page_header('Home Page', $config['site']['title']);
    echo show_listing($articles);
    // show navigation
    if ($config['front']['page_style'] == 'latest_month') {
        echo show_month_nav($months_list);
    } else {
        $total = !empty($articles[0]['total_found']) ? $articles[0]['total_found'] : '0';
        if ($total > $config['layout']['per_page']) {
            echo show_front_nav($articles[0]['total_pages']);
        }
    }
} elseif ($config['front']['page_style'] == 'custom') {
    echo 'custom front page';
}
Exemplo n.º 4
0
	</div>
<?php 
}
// if you don't want the search box on main directory, just uncomment the code below and comment the following code...
/*
if ( (count($this->listing) && @$this->listing[0]->id!='') || $this->categoriesbegenningby!='' ) {
	show_listing( $this->listing, $url, $this->params, $this->searchbox, $this->searchboxbutton, $this->lists, $this->pagination, $this->options, $lang, $this->menuid, $this->categoriesbegenningby );
	getACCopyrightNotice();
} else {
	$noresult = ( @$this->currentdirectorylevel!='directory' ) ? "<br />" . JTEXT::_('AC_NO_RESULT') : "";	
	echo $noresult;
	getACCopyrightNotice();
}
*/
// --------------------------------------------------------------------------------------------------
show_listing($this->listing, $url, $this->params, $this->searchbox, $this->searchboxbutton, $this->lists, $this->pagination, $this->options, $lang, $this->menuid, $this->categoriesbegenningby);
if (count($this->listing) == 0) {
    $noresult = @$this->currentdirectorylevel != 'directory' || @$this->currentdirectorylevel == 'directory' && $options['search'] != '' ? "<br />" . JTEXT::_('AC_NO_RESULT') : "";
    echo $noresult;
}
getACCopyrightNotice();
// --------------------------------------------------------------------------------------------------
if ($this->contentdescriptiondirectory && $this->params->get('positiondescription') == '2' && @$this->currentdirectorylevel == 'directory') {
    ?>
	<div id="descriptiondirectory">
		<p>
		<?php 
    echo JHTML::_('content.prepare', $this->contentdescriptiondirectory);
    ?>
		</p>
	</div>
Exemplo n.º 5
0
					<li class="filter_heading">Filter by tag:</li> ';
            foreach ($tag_filters as $tf) {
                echo '
					<li><a href="' . $link_base . $author_param . '/tag/' . $tf['url'] . '/">' . $tf['title'] . '</a></li>';
            }
            echo '</ul>';
        }
    }
    // remove parameters
    echo '
		<ul class="filter_list remove_filter_list">
			<li class="filter_heading">Remove:</li> ';
    if (isset($_GET['author_url'])) {
        echo '
			<li>Author <a href="' . $link_base . $tag_param . '">' . $author_name . '</a></li>';
    }
    if (isset($_GET['category_url'])) {
        echo '
			<li>Category <a href="' . WW_WEB_ROOT . $author_param . $tag_param . '">' . $category_details['title'] . '</a></li>';
    }
    if (isset($_GET['tag_url'])) {
        echo '
			<li>Tag <a href="' . $link_base . $author_param . '">' . $tag_title . '</a></li>';
    }
    echo '</ul>';
}
// output listing
echo show_listing($articles, $page_title, $config['connections']['disqus_shortname']);
if ($total > $config['layout']['per_page']) {
    echo show_listing_nav($articles[0]['total_pages'], $config['layout']['per_page']);
}