Skip to content

Commit

Permalink
Merge pull request #66 from carlynlee/rooms_sponsors
Browse files Browse the repository at this point in the history
Rooms sponsors
  • Loading branch information
sarcasticadmin authored Mar 10, 2024
2 parents dc7447f + 6c320ca commit d68087b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 41 deletions.
43 changes: 19 additions & 24 deletions server/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,21 @@
} else {
if (!empty($_GET["room"])) {
switch ($_GET["room"]) {
case 'ballroom-de':
case 'ballroom-a':
case 'ballroom-b':
case 'ballroom-c':
case 'ballroom-de':
case 'ballroom-f':
case 'ballroom-g':
case 'ballroom-h':
case 'ballroom-gh':
case 'ballroom-i':
case 'ballroom-j':
case 'room-101':
case 'room-103':
case 'room-104':
case 'room-105':
case 'room-106':
case 'room-107':
case 'room-209':
case 'room-211':
case 'room-212':
case 'room-209':
case 'room-205':
case 'room-215':
$year = $month = $day = $hour = $minute = '';
if (!empty($_GET["year"])) {
$year = $_GET['year'];
Expand Down Expand Up @@ -488,22 +483,22 @@ function avnoc() {
function room($room, $year = '', $month = '', $day = '', $hour = '', $minute = '') {

$room_lookup_table = array(
"ballroom-a" => "BallroomA",
"ballroom-b" => "BallroomB",
"ballroom-c" => "BallroomC",
"ballroom-de" => "BallroomDE",
"ballroom-f" => "BallroomF",
"ballroom-g" => "BallroomG",
"ballroom-h" => "BallroomH",
"room-101" => "Room101",
"room-103" => "Room103",
"room-104" => "Room104",
"room-105" => "Room105",
"room-106" => "Room106",
"room-107" => "Room107",
"room-209" => "Room209",
"room-211" => "Room211",
"room-212" => "Room212",
"ballroom-a" => "BallroomA",
"ballroom-b" => "BallroomB",
"ballroom-c" => "BallroomC",
"ballroom-de" => "BallroomDE",
"ballroom-f" => "BallroomF",
"ballroom-g" => "BallroomG",
"ballroom-h" => "BallroomH",
"room-101" => "Room101",
"room-103" => "Room103",
"room-104" => "Room104",
"room-105" => "Room105",
"room-106" => "Room106",
"room-107" => "Room107",
"room-209" => "Room209",
"room-211" => "Room211",
"room-212" => "Room212",
);

?>
Expand Down
50 changes: 33 additions & 17 deletions server/room.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
#$starttime = mktime(0, 0, 0, 3, 5, 2020) / 60;
#$starttime = mktime(0, 0, 0, 3, 9, 2023) / 60;


# after "spring forward"
#$starttime = mktime(23, 0, 0, 7, 27, 2022) / 60;
$starttime = mktime(23, 0, 0, 3, 8, 2023) / 60;
#$starttime = mktime(23, 0, 0, 3, 8, 2023) / 60;
$starttime = mktime(0, 0, 0, 3, 14, 2024) / 60;


$sponsors_for_room = array();
$sponsor_class = "Room";
Expand Down Expand Up @@ -186,7 +189,7 @@
"netknights",
"perforce",
"redhat",
"site24x7",
"site247",
"suse",
);

Expand Down Expand Up @@ -361,20 +364,31 @@
$times = array();

$shorten_topics = array(
"BoFs" => "BoFs",
"CloudNative" => "CloudNative",
"Developer" => "Developer",
"DevOpsDayLA" => "DevOps Day LA",
"General" => "General",
"MySQL" => "MySQL",
"Observability" => "Observability",
"OpenData" => "Open Data",
"OpenGovernment" => "Open Government",
"OpenMedical" => "Open Medical",
"PosgreSQL" => "PostgreSQL",
"Security" => "Security",
"Sponsored" => "Sponsored",
"SystemsandInfrastructure" => "Systems and Infrastructure",
"CareerDay" => "Career Day",
"CloudNative" => "Cloud Native",
"DataonKubernetes" => "Data on Kubernetes",
"Developer" => "Developer",
"DevOpsDayLA" => "DevOpsDay LA",
"Embedded" => "Embedded",
"FOSSHOME" => "FOSS@HOME",
"General" => "General",
"KernelandLowLevelSystems" => "Kernel and Low Level Systems",
"Keynote" => "Keynote",
"KubernetesCommunityDay" => "Kubernetes Community Day",
"MySQL" => "MySQL",
"NextGeneration" => "Next Generation",
"NixCon" => "NixCon",
"Observability" => "Observability",
"OpenGovernment" => "Open Government",
"OpenSourceAIandAppliedScience" => "Open Source AI and Applied Science",
"PostgreSQL" => "PostgreSQL",
"ReproducibleandImmutableSoftware" => "Reproducible and Immutable Software",
"Security" => "Security",
"Sponsored" => "Sponsored",
"SystemsandInfrastructure" => "Systems and Infrastructure",
"Ubucon" => "Ubucon",
"UpSCALE" => "UpSCALE",
"Workshops" => "Workshops"
);

foreach ($xml->node AS $node) {
Expand All @@ -383,8 +397,10 @@
$node->{'Time'} = preg_replace('/<[^>]*>/', '', $node->{'Time'});
$node->{'Day'} = preg_replace('/<[^>]*>/', '', $node->{'Day'});

// Remove Spaces so we can use it for a CSS class
// Remove special chars in Topic from XML request so we can use it for a CSS class
$node->{'Topic'} = preg_replace('/\s+/', '', $node->{'Topic'});
$node->{'Topic'} = preg_replace('/\&/', 'and', $node->{'Topic'});
$node->{'Topic'} = preg_replace('/\@/', '', $node->{'Topic'});

$pos = strpos((string) $node->{'Time'}, ",");
$lpos = strrpos((string) $node->{'Time'}, ",");
Expand Down

0 comments on commit d68087b

Please sign in to comment.