Commit c6c4d7a7 authored by David Findlay's avatar David Findlay

Updates to Meet Program and relay entry

parent 1aa64893
<?php
/**
* This file is part of the array_column library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright Copyright (c) Ben Ramsey (http://benramsey.com)
* @license http://opensource.org/licenses/MIT MIT
*/
if (!function_exists('array_column')) {
/**
* Returns the values from a single column of the input array, identified by
* the $columnKey.
*
* Optionally, you may provide an $indexKey to index the values in the returned
* array by the values from the $indexKey column in the input array.
*
* @param array $input A multi-dimensional array (record set) from which to pull
* a column of values.
* @param mixed $columnKey The column of values to return. This value may be the
* integer key of the column you wish to retrieve, or it
* may be the string key name for an associative array.
* @param mixed $indexKey (Optional.) The column to use as the index/keys for
* the returned array. This value may be the integer key
* of the column, or it may be the string key name.
* @return array
*/
function array_column($input = null, $columnKey = null, $indexKey = null)
{
// Using func_get_args() in order to check for proper number of
// parameters and trigger errors exactly as the built-in array_column()
// does in PHP 5.5.
$argc = func_num_args();
$params = func_get_args();
if ($argc < 2) {
trigger_error("array_column() expects at least 2 parameters, {$argc} given", E_USER_WARNING);
return null;
}
if (!is_array($params[0])) {
trigger_error(
'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',
E_USER_WARNING
);
return null;
}
if (!is_int($params[1])
&& !is_float($params[1])
&& !is_string($params[1])
&& $params[1] !== null
&& !(is_object($params[1]) && method_exists($params[1], '__toString'))
) {
trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);
return false;
}
if (isset($params[2])
&& !is_int($params[2])
&& !is_float($params[2])
&& !is_string($params[2])
&& !(is_object($params[2]) && method_exists($params[2], '__toString'))
) {
trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);
return false;
}
$paramsInput = $params[0];
$paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;
$paramsIndexKey = null;
if (isset($params[2])) {
if (is_float($params[2]) || is_int($params[2])) {
$paramsIndexKey = (int) $params[2];
} else {
$paramsIndexKey = (string) $params[2];
}
}
$resultArray = array();
foreach ($paramsInput as $row) {
$key = $value = null;
$keySet = $valueSet = false;
if ($paramsIndexKey !== null && array_key_exists($paramsIndexKey, $row)) {
$keySet = true;
$key = (string) $row[$paramsIndexKey];
}
if ($paramsColumnKey === null) {
$valueSet = true;
$value = $row;
} elseif (is_array($row) && array_key_exists($paramsColumnKey, $row)) {
$valueSet = true;
$value = $row[$paramsColumnKey];
}
if ($valueSet) {
if ($keySet) {
$resultArray[$key] = $value;
} else {
$resultArray[] = $value;
}
}
}
return $resultArray;
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -8,6 +8,7 @@ if (session_id() == '') {
// Database include
require_once ("DB.php");
require_once ("config.php");
require_once ("array_column_impl.php");
//require_once ("../includes/Zebra_Form/Zebra_Form.php");
global $db;
......@@ -583,5 +584,4 @@ function titleCase($string) {
}
?>
\ No newline at end of file
......@@ -27,6 +27,9 @@ function sidebarMenu() {
echo "<li>\n";
echo "<a href=\"ppmg.php\">Pan Pacific Masters Games</a>";
echo "</li>\n";
echo "<li>\n";
echo "<a href=\"relayentry.php\">Relay Entry</a>";
echo "</li>\n";
echo "</ul>\n";
echo "</li>\n";
......@@ -63,7 +66,10 @@ function sidebarMenu() {
echo "<li>\n";
echo "<a href=\"memberlist.php\">Member List</a>\n";
echo "</li>\n";
echo "<li>\n";
echo "<li>\n";
echo "<a href=\"memberbulk.php\">Bulk Member Check</a>\n";
echo "</li>\n";
echo "<li>\n";
echo "<a href=\"importmembers.php\">Import IMG Members</a>\n";
echo "</li>\n";
echo "<li>\n";
......
<?php
require_once("includes/setup.php");
require_once("includes/sidebar.php");
checkLogin();
addlog("Access", "Accessed memberbulk.php");
if ($_isset($_POST['checknames'])) {
$memberArray = preg_split ('/$\R?^/m', $_POST['bulkmembernames']);
foreach ($memberArray as $m) {
}
}
htmlHeaders("Check Bulk Members");
sidebarMenu();
echo "<div id=\"main\">\n";
?>
<h2>Check Bulk Members</h2>
<form method="post">
<p>
<label>Paste Member Names:</label>
<textarea name="bulkmembernames" rows="10" cols="80">
</textarea>
</p>
<p>
<label> </label><input type="submit" name="checknames" value="Check Names" />
</p>
</form>
<?php
echo "</div>\n"; // main div
htmlFooters();
?>
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>eProgram</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="img/favicon.png">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.2.0/ui-bootstrap-tpls.js" integrity="sha256-5D8w0DqoYc/JafkO45w/mSk8TJOomU39RddXeFrAxGA=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.2.0/ui-bootstrap.js" integrity="sha256-cqEoL086rAnY+xKCnK0bMnvBIlYMX55kgcjDEu9pnLo=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/app.css">
<script src=js/main.js"></script>
</head>
<body ng-controller="menuCtrl">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="btn btn-navbar navbar-toggle pull-left" ng-click="menuClosed = !menuClosed">
<span class="sr-only">Menu</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="navbar-brand" href="#">eProgram2</a>
</div>
</div>
</nav>
<div id="wrapper">
<div id="sidebar-wrapper" class="col-xs-10 col-sm-3 col-md-3 col-lg-3" ng-hide="menuClosed"
role="navigation">
<form>
<select class="form-control" id="meetController">
<option value="">Select a meetController</option>
</select>
<ul class="nav nav-pills nav-stacked">
<li><a href="#/view1">Newsflashes</a></li>
<li><a href="#/view2">Marshalling</a></li>
</ul>
<select class="form-control" id="event">
<option value="">Select an event</option>
</select>
<select class="form-control" id="heat">
<option value="">Select a heat</option>
</select>
<select class="form-control" id="agegroup">
<option value="">Select an age group</option>
</select>
</form>
</div>
<div id="page-content-wrapper" class="col-xs-12 col-sm-9">
<div ng-view></div>
<div>Angular seed app: v<span app-version></span></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php
require_once("includes/setup.php");
require_once("includes/sidebar.php");
require_once("includes/classes/Meet.php");
require_once("includes/classes/MeetEvent.php");
checkLogin();
addlog("Access", "Accessed relayentry.php");
htmlHeaders("Relay Entries");
sidebarMenu();
echo "<div id=\"main\">\n";
echo "<h1>Relay Entries</h1>\n";
echo "</div>\n"; // Main Div
htmlFooters();
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment