log in

[insert_php]

function startsWith($haystack, $needle)
{
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}

$pnum = $_GET[‘pnum’];
if ($pnum == “”) {
echo “

ERROR: pnum parameter not specified. Contact webmaster.

“;
}

//$p = $pnum-1;
//echo “Prev
“;

// Read nnn.ctl file which describes content for this talk
$f = null;
if (!($f = @fopen(“control/pres.ctl”, “r”)))
echo “Cannot open file: control/pres.ctl
“;
else {
// First, find the right presentation
while (!feof($f)) {
$lin = trim(fgets($f, 20000)); // Read a line.
//echo “$lin
“;
if ($lin == “num $pnum”) {
//echo “Found it
“;
//echo $lin;
break;
}
}
// Now read the entry for this video
while (!feof($f)) {
$lin = trim(fgets($f, 20000)); // Read a line.
if ($lin == “#”)
break;
//echo “$lin
“;
$pos = strpos($lin, ‘ ‘);
$key = substr($lin, 0, $pos);
$val = substr($lin, $pos+1);
//echo “Found: ($key) and ($val)
“;
$c[$key] = $val;
}
}

/*
foreach($c as $key => $val1)
echo $key . ‘ – ‘ . $val1 . ‘
‘;
*/

//$pnum = $c[“num”];
$pdate = $c[“date”];
$ptitle = $c[“title”];
if (startsWith($ptitle, “* “))
$ptitle = substr($ptitle, 2);
$pspeaker = $c[‘speaker’];
$pcat1 = $c[“cat1”];
$pcat2 = $c[“cat2”];
$video = $c[“video”];
$handout1 = $c[“handout1”];
$handoutname1 = $c[“handoutname1”];
$handout2 = $c[“handout2”];
$handoutname2 = $c[“handoutname2”];
$handout3 = $c[“handout3”];
$handoutname3 = $c[“handoutname3”];
$handout4 = $c[“handout4”];
$handoutname4 = $c[“handoutname4”];
$handout5 = $c[“handout5”];
$handoutname5 = $c[“handoutname5”];
$ppic1 = $c[“pic1”];
$ppic2 = $c[“pic2”];
$pagenda = $c[“agenda”];

if ($ppic1 != “”)
echo ““;
if ($ppic2 != “”)
echo ““;
if ($ppic3 != “”)
echo ““;

echo “

# $pnum: \”$ptitle\”
$pspeaker
$pdate

“;

if ($pcat1 != “”) {
echo “

 Categories: $pcat1″;
if ($pcat2 !=””)
echo “, $pcat2″;
echo ” (see key below)

“;
}

if (($f = @fopen(“abstracts/$pnum.abs”, “r”)) != null) {
echo “

Talk Abstract:
“;
//$f = @fopen(“abstracts/$pnum.abs”, “r”);
//if ($f == null)
//echo “

Cannot open file: abstracts/$pnum.abs

“;
$lin = fgets($f, 8192);
echo $lin;
echo “

“;
@fclose($f);
}

if (($f = @fopen(“bios/$pnum.bio”, “r”)) != null) {
echo “

Speaker Bio:
“;
//$f = @fopen(“bios/$pnum.bio”, “r”);
//if ($f == null)
//echo “

Cannot open file: bios/$pnum.bio

“;
$lin = fgets($f, 8192);
echo $lin;
echo “

“;
@fclose($f);
}

if ($pagenda != “”) {
echo “Meeting Agenda
Click here for meeting agenda for the UVTAGG meeting where this talk or class was presented.
“;
}

echo “
“;

if (is_user_logged_in()) {
if ($video != “”) {

// I tried a pile of methods and have documented the ones that didn’t work for future reference.
// This is the only method that seems to work for wordpress-hosted videos
if ($pnum == “309”)
echo ““;
else
echo ““;

// These next two work but require the video name to be hard coded (can’t use double quotes to expand a variable)
//echo ‘https://youtu.be/8eM6J5MSZRU‘;
//echo ‘

‘;

// This way of embedding works just fine for youtube videos but not for uvtagg videos.
//$video = “https://youtu.be/8eM6J5MSZRU”;
//$video = “https://uvtagg.org/video/415.mp4”;
//echo wp_oembed_get( $video );

//echo “

View Video
Click here. It will open in a new window. When you are done viewing it you may close that window and return here.
“;

echo “

Download Video
If you are on a desktop or laptop computer, you may download the video for later viewing. To do so, right-click here and then click: Download Linked File As (Safari) or Save Link As (Chrome or Firefox).

“;
}
else
echo “No video available for this presentation…

“;

echo “Handouts“;
if ($handout1 == “”) {
echo “
No handouts available for this presentation.”;
}
else {
echo ”

“;
}
}
else {

echo ‘

Viewing of videos and handouts is only available to members who have logged in. If you are a member, please login or sign up below.’;
echo “

Existing Users Log In
   
“;
echo “
New User Registration
Really Simple CAPTCHA is not enabled
*Required field
“;

}

[/insert_php]

[insert_php]

[/insert_php]
Borrowing/Purchasing Videos
Contact committee members via email at video@uvtagg.org to borrow or purchase videos. Borrowed or purchased copies of videos may be picked up or mailed for a nominal shipping and handling charge.