$scrdate
";
foreach ($fnfcrn as $findme) {
// $findme = $_POST['SCRN'];
$sep = 'Points Brought Forward';
$begintitle = 'FD=';
$pos = strpos($output, $findme);
if ($pos === false) {
} else {
$crn = substr($output, $pos, 6);
$ptspos = $pos + 71;
$pts = trim(substr($output, $ptspos, 6));
$dname = trim(substr($output, $pos + 6, 20));
$begindinfo = strpos($output, $begintitle, $pos);
$eodinfo = strpos($output, $sep, $pos);
$titlelength = ($eodinfo - $begindinfo - 9);
$titles = trim(substr($output, $begindinfo, $titlelength));
$titledate = substr($titles, -8);
if ($pts < 20) {
$currtitle = "First title - Coming soon!";
$nexttitle = "Flyball Dog (FD)";
$ptstogo = 20 - $pts;
}
elseif ($pts < 100) {
$currtitle = "Flyball Dog - FD";
$nexttitle = " Flyball Dog Excellent (FDX)";
$ptstogo = 100 - $pts;
}
elseif ($pts < 500) {
$currtitle = "Flyball Dog Excellent - FDX";
$nexttitle = " Flyball Dog Champion (FDCh)";
$ptstogo = 500 - $pts;
}
elseif ($pts < 1000) {
$currtitle = "Flyball Dog Champion - FDCh";
$nexttitle = " Flyball Dog Champion Silver (FDCh-S)";
$ptstogo = 1000 - $pts;
}
elseif ($pts < 2500) {
$currtitle = "Flyball Dog Champion Silver - FDCh-S";
$nexttitle = " Flyball Dog Champion Gold (FDCh-G)";
$ptstogo = 2500 - $pts;
}
elseif ($pts < 5000) {
$currtitle = "Flyball Dog Champion-Gold - FDCh-G";
$nexttitle = " Flyball Master (FM)";
$ptstogo = 5000 - $pts;
}
elseif ($pts < 10000) {
$currtitle = "Flyball Master - FM";
$nexttitle = "Flyball Master Excellent (FMX)";
$ptstogo = 10000 - $pts;
}
elseif ($pts < 15000) {
$currtitle = "Flyball Master Excellent - FMX";
$nexttitle = "Flyball Master Champion (FMCh)";
$ptstogo = 15000 - $pts;
}
elseif ($pts < 20000) {
$currtitle = "Flyball Master Champion - FMCh";
$nexttitle = "ONYX";
$ptstogo = 20000 - $pts;
}
elseif ($pts < 30000) {
$currtitle = "ONYX";
$nexttitle = "Flyball Grand Champion (FGDCh-30)";
$ptstogo = 30000 - $pts;
}
elseif ($pts < 40000) {
$currtitle = "Flyball Grand Champion - FGDCh-30";
$nexttitle = "Flyball Grand Champion (FGDCh-40)";
$ptstogo = 40000 - $pts;
}
elseif ($pts < 50000) {
$currtitle = "Flyball Grand Champion - FGDCh-40";
$nexttitle = "Flyball Grand Champion (FGDCh-50)";
$ptstogo = 50000 - $pts;
}
elseif ($pts < 60000) {
$currtitle = "Flyball Grand Champion - FGDCh-50";
$nexttitle = "Flyball Grand Champion (FGDCh-60)";
$ptstogo = 60000 - $pts;
}
elseif ($pts < 70000) {
$currtitle = "Flyball Grand Champion - FGDCh-60";
$nexttitle = "Flyball Grand Champion (FGDCh-70)";
$ptstogo = 70000 - $pts;
}
elseif ($pts < 80000) {
$currtitle = "Flyball Grand Champion - FGDCh-70";
$nexttitle = "Flyball Grand Champion (FGDCh-80)";
$ptstogo = 80000 - $pts;
}
elseif ($pts < 90000) {
$currtitle = "Flyball Grand Champion - FGDCh-80";
$nexttitle = "Flyball Grand Champion (FGDCh-90)";
$ptstogo = 90000 - $pts;
}
elseif ($pts < 100000) {
$currtitle = "Flyball Grand Champion - FGDCh-90";
$nexttitle = "Hobbes Award";
$ptstogo = 100000 - $pts;
}
// print "$dname title date ($titledate)";
if ($pts < 20) {
$earndate = "";
}
else {
$earndate = ('earned on ' . date("M j, Y", strtotime($titledate)));
}
$$crn = "$dname has $pts points and earned titles on these dates: $titles
Next title is $nexttitle ($ptstogo more points)
";
print "$$crn = 'Current points: $pts
($currtitle $earndate)
Next title: $nexttitle ($ptstogo more points)';\n";
//echo "${$crn}";
//echo "';
}
}
foreach ($retfnfcrn as $findme) {
// $findme = $_POST['SCRN'];
$sep = 'Points Brought Forward';
$begintitle = 'FD=';
$pos = strpos($output, $findme);
if ($pos === false) {
} else {
$crn = substr($output, $pos, 6);
$ptspos = $pos + 71;
$pts = trim(substr($output, $ptspos, 6));
$dname = trim(substr($output, $pos + 6, 20));
$begindinfo = strpos($output, $begintitle, $pos);
$eodinfo = strpos($output, $sep, $pos);
$titlelength = ($eodinfo - $begindinfo - 9);
$titles = trim(substr($output, $begindinfo, $titlelength));
$titledate = substr($titles, -8);
if ($pts < 20) {
$currtitle = "Coming soon!";
$nexttitle = "Flyball Dog (FD)";
$ptstogo = 20 - $pts;
}
elseif ($pts < 100) {
$currtitle = "Flyball Dog - FD";
$nexttitle = " Flyball Dog Excellent (FDX)";
$ptstogo = 100 - $pts;
}
elseif ($pts < 500) {
$currtitle = "Flyball Dog Excellent - FDX";
$nexttitle = " Flyball Dog Champion (FDCh)";
$ptstogo = 500 - $pts;
}
elseif ($pts < 1000) {
$currtitle = "Flyball Dog Champion - FDCh";
$nexttitle = " Flyball Dog Champion Silver (FDCh-S)";
$ptstogo = 1000 - $pts;
}
elseif ($pts < 2500) {
$currtitle = "Flyball Dog Champion Silver - FDCh-S";
$nexttitle = " Flyball Dog Champion Gold (FDCh-G)";
$ptstogo = 2500 - $pts;
}
elseif ($pts < 5000) {
$currtitle = "Flyball Dog Champion-Gold - FDCh-G";
$nexttitle = " Flyball Master (FM)";
$ptstogo = 5000 - $pts;
}
elseif ($pts < 10000) {
$currtitle = "Flyball Master - FM";
$nexttitle = "Flyball Master Excellent (FMX)";
$ptstogo = 10000 - $pts;
}
elseif ($pts < 15000) {
$currtitle = "Flyball Master Excellent - FMX";
$nexttitle = "Flyball Master Champion (FMCh)";
$ptstogo = 15000 - $pts;
}
elseif ($pts < 20000) {
$currtitle = "Flyball Master Champion - FMCh";
$nexttitle = "ONYX";
$ptstogo = 20000 - $pts;
}
elseif ($pts < 30000) {
$currtitle = "ONYX";
$nexttitle = "Flyball Grand Champion (FGDCh-30)";
$ptstogo = 30000 - $pts;
}
elseif ($pts < 40000) {
$currtitle = "Flyball Grand Champion - FGDCh-30";
$nexttitle = "Flyball Grand Champion (FGDCh-40)";
$ptstogo = 40000 - $pts;
}
elseif ($pts < 50000) {
$currtitle = "Flyball Grand Champion - FGDCh-40";
$nexttitle = "Flyball Grand Champion (FGDCh-50)";
$ptstogo = 50000 - $pts;
}
elseif ($pts < 60000) {
$currtitle = "Flyball Grand Champion - FGDCh-50";
$nexttitle = "Flyball Grand Champion (FGDCh-60)";
$ptstogo = 60000 - $pts;
}
elseif ($pts < 70000) {
$currtitle = "Flyball Grand Champion - FGDCh-60";
$nexttitle = "Flyball Grand Champion (FGDCh-70)";
$ptstogo = 70000 - $pts;
}
elseif ($pts < 80000) {
$currtitle = "Flyball Grand Champion - FGDCh-70";
$nexttitle = "Flyball Grand Champion (FGDCh-80)";
$ptstogo = 80000 - $pts;
}
elseif ($pts < 90000) {
$currtitle = "Flyball Grand Champion - FGDCh-80";
$nexttitle = "Flyball Grand Champion (FGDCh-90)";
$ptstogo = 90000 - $pts;
}
elseif ($pts < 100000) {
$currtitle = "Flyball Grand Champion - FGDCh-90";
$nexttitle = "Hobbes Award";
$ptstogo = 100000 - $pts;
}
$$crn = "$dname has $pts points and earned titles on these dates: $titles
Next title is $nexttitle ($ptstogo more points)
";
print "$$crn = 'Total career points: $pts
($currtitle earned on " . date("M j, Y", strtotime($titledate)) . ")
';\n";
//echo "${$crn}";
//echo "';
}
}
}
// echo "\n";
}
getpoints();
?>