forked from science-ation/science-ation
Add sponsor organization to awards ceremoney script
Add ability to specify an award type to only generate a script for that type Add ability to specify a year to get the awards ceremony script for that year Add links to the new options on the main reports page
This commit is contained in:
parent
358bc4e177
commit
347d46b86d
@ -167,7 +167,14 @@ while($catr=mysql_fetch_object($catq))
|
|||||||
|
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo i18n("Award Ceremony Script").": ";
|
echo i18n("Award Ceremony Script").": ";
|
||||||
echo "<a href=\"reports_acscript.php?type=pdf\">PDF</a> ";
|
echo "<a href=\"reports_acscript.php?type=pdf\">FULL PDF</a> ";
|
||||||
|
echo "<a href=\"reports_acscript.php?type=pdf&awardtype=Divisional\">(Divisional)</a> ";
|
||||||
|
echo "<a href=\"reports_acscript.php?type=pdf&awardtype=Special\">(Special)</a> ";
|
||||||
|
echo "<a href=\"reports_acscript.php?type=pdf&awardtype=Interdisciplinary\">(Interdisciplinary)</a> ";
|
||||||
|
echo "<a href=\"reports_acscript.php?type=pdf&awardtype=Other\">(Other)</a> ";
|
||||||
|
echo "<a href=\"reports_acscript.php?type=pdf&awardtype=Grand\">(Grand)</a> ";
|
||||||
|
echo "<br />";
|
||||||
|
echo i18n("Award Ceremony Script").": ";
|
||||||
echo "<a href=\"reports_acscript.php?type=csv\">CSV</a> ";
|
echo "<a href=\"reports_acscript.php?type=csv\">CSV</a> ";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<a href=\"reports_acpresentation.php?type=csv\">Award Winners CSV</a> ";
|
echo "<a href=\"reports_acpresentation.php?type=csv\">Award Winners CSV</a> ";
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
require("../lpdf.php");
|
require("../lpdf.php");
|
||||||
require("../lcsv.php");
|
require("../lcsv.php");
|
||||||
|
|
||||||
|
if($_GET['year']) $foryear=$_GET['year'];
|
||||||
|
else $foryear=$config['FAIRYEAR'];
|
||||||
|
|
||||||
|
if($_GET['awardtype']) $awardtype=" AND award_types.type='".mysql_escape_string($_GET['awardtype'])."'";
|
||||||
|
else $awardtype="";
|
||||||
|
|
||||||
$type=$_GET['type'];
|
$type=$_GET['type'];
|
||||||
if(!$type) $type="pdf";
|
if(!$type) $type="pdf";
|
||||||
|
|
||||||
@ -27,15 +33,19 @@
|
|||||||
award_awards.name,
|
award_awards.name,
|
||||||
award_awards.presenter,
|
award_awards.presenter,
|
||||||
award_awards.order AS awards_order,
|
award_awards.order AS awards_order,
|
||||||
award_types.type
|
award_types.type,
|
||||||
|
award_sponsors.organization
|
||||||
FROM
|
FROM
|
||||||
award_awards,
|
award_awards,
|
||||||
award_types
|
award_types,
|
||||||
|
award_sponsors
|
||||||
WHERE
|
WHERE
|
||||||
award_awards.year='".$config['FAIRYEAR']."'
|
award_awards.year='$foryear'
|
||||||
AND award_types.year='".$config['FAIRYEAR']."'
|
AND award_types.year='$foryear'
|
||||||
AND award_awards.award_types_id=award_types.id
|
AND award_awards.award_types_id=award_types.id
|
||||||
|
AND award_awards.award_sponsors_id=award_sponsors.id
|
||||||
AND award_awards.excludefromac='0'
|
AND award_awards.excludefromac='0'
|
||||||
|
$awardtype
|
||||||
ORDER BY awards_order");
|
ORDER BY awards_order");
|
||||||
|
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
@ -45,6 +55,8 @@
|
|||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
{
|
{
|
||||||
$rep->heading("$r->name ($r->type)");
|
$rep->heading("$r->name ($r->type)");
|
||||||
|
if($r->type!="Divisional")
|
||||||
|
$rep->addText(i18n("Sponsored by: %1",array($r->organization)));
|
||||||
if($r->presenter)
|
if($r->presenter)
|
||||||
$rep->addText(i18n("Presented by: %1",array($r->presenter)));
|
$rep->addText(i18n("Presented by: %1",array($r->presenter)));
|
||||||
|
|
||||||
@ -64,7 +76,7 @@
|
|||||||
LEFT JOIN projects ON projects.id=winners.projects_id
|
LEFT JOIN projects ON projects.id=winners.projects_id
|
||||||
WHERE
|
WHERE
|
||||||
award_awards_id='$r->id'
|
award_awards_id='$r->id'
|
||||||
AND award_prizes.year='".$config['FAIRYEAR']."'
|
AND award_prizes.year='$foryear'
|
||||||
AND award_prizes.excludefromac='0'
|
AND award_prizes.excludefromac='0'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
`order`");
|
`order`");
|
||||||
|
Loading…
Reference in New Issue
Block a user