/**
 * Convert a ISO 3166-2 identifiers to their full name,
 * wrapped in an abbreviation tag.
 *
 * @param string $region Either the postal abbreviation or full name.
 *
 * @return string HTML-wrapped administrative division
 */
function boilerplate_administrative_division($region)
{
    $divisions = [_x('AB', 'ISO 3166-2 identifier') => _x('Alberta', 'Canadian province'), _x('BC', 'ISO 3166-2 identifier') => _x('British Columbia', 'Canadian province'), _x('MB', 'ISO 3166-2 identifier') => _x('Manitoba', 'Canadian province'), _x('NB', 'ISO 3166-2 identifier') => _x('New Brunswick', 'Canadian province'), _x('NL', 'ISO 3166-2 identifier') => _x('Newfoundland and Labrador', 'Canadian province'), _x('NT', 'ISO 3166-2 identifier') => _x('Northwest Territories', 'Canadian territory'), _x('NS', 'ISO 3166-2 identifier') => _x('Nova Scotia', 'Canadian province'), _x('NU', 'ISO 3166-2 identifier') => _x('Nunavut', 'Canadian territory'), _x('ON', 'ISO 3166-2 identifier') => _x('Ontario', 'Canadian province'), _x('PE', 'ISO 3166-2 identifier') => _x('Prince Edward Island', 'Canadian province'), _x('QC', 'ISO 3166-2 identifier') => _x('Quebec', 'Canadian province'), _x('SK', 'ISO 3166-2 identifier') => _x('Saskatchewan', 'Canadian province'), _x('YT', 'ISO 3166-2 identifier') => _x('Yukon', 'Canadian territory')];
    $code = '';
    $output = '';
    if (isset($divisions[strtoupper($region)])) {
        $code = strtoupper($region);
        $region = $divisions[$region];
    } else {
        $code = array_search($region, $divisions);
    }
    if ($code) {
        return abbr($code, $region);
    } else {
        return $region;
    }
}
/**
 * Notice of non-availability
 *
 * @return string
 */
function not_available()
{
    return abbr(__('N/A', 'boilerplate'), __('Not Available', 'boilerplate'));
}
Example #3
0
<!DOCTYPE html>
<html>
	<head>
		<title>BC - Collections</title>
		<?php 
include "common.php";
head(".");
$abbr = abbr();
$collections = collections();
?>
	</head>

	<body>
		<?php 
$query = "SELECT DISTINCT physician FROM {$CURRENT_REV}";
$result = mysqli_query($mysqli_connection, $query);
$row = mysqli_fetch_array($result, MYSQLI_NUM);
?>

		<div id="uw-container">
			<div id="uw-container-inner">
				<?php 
echo banner(".");
?>
				<div class="container uw-body">
					<div class="row">
						<div class="col-md-12 uw-content">
							<h1 class="nomargin">Collections</h1>
							
							<?php 
$i = 0;
Example #4
0
function banner($dir)
{
    $department = file($dir . "/categories.txt", FILE_IGNORE_NEW_LINES);
    $non_department = file($dir . "/nondepartment.txt", FILE_IGNORE_NEW_LINES);
    ?>

 <header class="uw-thinstrip">
 	<div>
        <nav class="uw-thin-strip-nav align-right">
            <ul class="uw-thin-links">
                <li>
                    <a href="<?php 
    echo $dir . "/";
    ?>
" title=
                    "Bodemer Collection">Bodemer Collection</a>
                </li>

                <li>
                    <a href="<?php 
    echo $dir . "/about";
    ?>
" title=
                    "About Us">About Us</a>
                </li>
            </ul>
        </nav>

    <div class="container">
    	<img class="bodemer_logo" src="<?php 
    echo $dir . "/images/banner_purple_croped.png";
    ?>
" alt="logo" />
    </div>
</header>

<nav id="dawgdrops">
    <div class="dawgdrops-inner container">
        <ul class="dawgdrops-nav" id="menu-brand-menu">
            <li class="dawgdrops-item">
                <a href="<?php 
    echo $dir . "/";
    ?>
" title="Home">Home</a>
            </li>

            <li class="dawgdrops-item">
                <a class="dropdown-toggle" href="<?php 
    echo $dir . "/categories.php?c=dept";
    ?>
" title="Visual">Departments</a>
                <ul class="dawgdrops-menu">
                	<div>
                        <?php 
    if ($department) {
        foreach ($department as $category) {
            ?>
								<li>
	                                <a href="<?php 
            echo $dir . "/category.php?c=" . $category;
            ?>
"
	                                title="<?php 
            echo $category;
            ?>
"><?php 
            echo $category;
            ?>
</a>
	                            </li>
							<?php 
        }
    }
    ?>
					</div>
				
                </ul>
            </li>

            <?php 
    if ($non_department) {
        ?>
                <li class="dawgdrops-item">
                    <a class="dropdown-toggle" href="<?php 
        echo $dir . "/categories.php?c=non";
        ?>
" title="Visual">Non-Departmental</a>
                    <ul class="dawgdrops-menu">
                    	<div>
                            <?php 
        foreach ($non_department as $category) {
            ?>
									<li>
		                                <a href="<?php 
            echo $dir . "/category.php?c=" . $category;
            ?>
" title="<?php 
            echo $category;
            ?>
"><?php 
            echo $category;
            ?>
</a>
		                            </li>
								<?php 
        }
        ?>
						</div>
                    </ul>
                </li>
            <?php 
    }
    ?>

            <li class="dawgdrops-item">
                <a class="dropdown-toggle" href="<?php 
    echo $dir . "/collections.php";
    ?>
"
                title="Collections">Collections</a>
                <ul class="dawgdrops-menu">
                	<div>
                        <?php 
    $abbr = abbr();
    $collections = collections();
    for ($i = 0; $i < count($abbr); $i++) {
        ?>
								<li>
	                                <a href="<?php 
        echo $dir . "/collection.php?c=" . $abbr[$i];
        ?>
"
	                                title="<?php 
        echo $collections[$i];
        ?>
"><?php 
        echo $collections[$i];
        ?>
</a>
	                            </li>
							<?php 
    }
    ?>
					</div>
                </ul>

            </li>

            <li class="dawgdrops-item">
                <a href="<?php 
    echo $dir . "/gallery.php";
    ?>
" title="Gallery">Gallery</a>
            </li>
        </ul>
    </div>
</nav>

<nav aria-label="relative" class="frontpage bighero" id="mobile-relative" role="navigation">
	<div id="spacer"></div>
	<button class="uw-mobile-menu-toggle">Menu</button>
	<ul class="uw-mobile-menu first-level" style="display: none;">
		<div class="menu-dropdowns-container">
			<ul class="" id="menu-dropdowns-1">
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/index.php";
    ?>
">Home</a>
				</li>
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/categories.php?c=dept";
    ?>
">Departments</a>
				</li>
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/categories.php?c=non";
    ?>
">Non-Departmental</a>
				</li>
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/collections.php";
    ?>
">Collections</a>
				</li>
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/gallery.php";
    ?>
">Gallery</a>
				</li>
				<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
					<a href="<?php 
    echo $dir . "/about";
    ?>
">About Us</a>
				</li>
			</ul>
		</div>
	</ul>
</nav>

<?php 
}
Example #5
0
</div></th><th><div class=col_gd><?php 
echo columnHeader("m/f", "g");
?>
</div></th>

<?
if (!$ncomps)
	echo "<th><div class=col_ot>&nbsp;</div></th></tr></table><SPAN id=container><table id=T_TD class=TD cellspacing=0><tr>";
else
{
	$closedevents = strict_query("SELECT id FROM $eventstable WHERE r2_open=TRUE");
	$closed = array();
	while ($row=cased_mysql_fetch_array($closedevents)) $closed[(int)$row["id"]] = true;
	//
	while ($rcat=cased_mysql_fetch_array($categories))
		echo "<th><div title=\"".$rcat["name"]."\" style='width:".$catwidth."px;'>".abbr($rcat["abbr"])."</div></th>";
	echo "<th><div class=col_ot>&nbsp;</div></th></tr></table><DIV><SPAN id=container><table id=T_TD class=TD cellspacing=0>";
	//
	$compHasTimesR1 = strict_query("SELECT DISTINCT CONCAT(cat_id,'_',comp_id) AS id FROM $timestable WHERE round=1");
	$compHTR1 = array();
	while ($row=cased_mysql_fetch_array($compHasTimesR1))
		$compHTR1[$row["id"]] = true;
	unset($compHasTimesR1);
	//
	$count = 0;
	while ($row=cased_mysql_fetch_array($result))
	{
		echo "<tr class=comprow_".(($count++) % 2?"odd":"even")."><td><div class=col_cl>" .$row["id"]. "</div></td><td><div class=col_wi>" .$row["WCAid"]. "</div></td><td><div class=col_nm><a href='editcomp.php?id=".$row["id"]."' target='w_details' title='click to edit details' onclick='openWDetails();'>" .htmlspecialchars($row["name"],ENT_QUOTES). "</a></div></td><td><div class=col_bd>" .$row["birthday"]. "</div></td><td><div class=col_ct>" .$row["country"]. "</div></td><td><div class=col_gd align=center>" .$row["gender"]. "</div></td>";
		$candelete = true;
		if ($ncats)
		{