forked from science-ation/science-ation
Add csv versions of the committee, judge and student nametags. Resolves issue 60.
This commit is contained in:
parent
0e9a889e4f
commit
e87a80e04a
@ -66,9 +66,12 @@ echo "</table>";
|
||||
echo "<a href=\"reports_projects_details.php?type=pdf\">PDF</a> ";
|
||||
echo "<br />";
|
||||
echo i18n("Nametags").": ";
|
||||
echo "<a href=\"reports_nametags_students.php\">Students PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_judges.php\">Judges PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_committee.php\">Committee PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_students.php?type=pdf\">Students PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_students.php?type=csv\">Students CSV</a> ";
|
||||
echo "<a href=\"reports_nametags_judges.php?type=pdf\">Judges PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_judges.php?type=csv\">Judges CSV</a> ";
|
||||
echo "<a href=\"reports_nametags_committee.phptype=pdf\">Committee PDF</a> ";
|
||||
echo "<a href=\"reports_nametags_committee.php?type=csv\">Committee CSV</a> ";
|
||||
|
||||
|
||||
echo "<br />";
|
||||
|
@ -27,19 +27,24 @@
|
||||
require("../lpdf.php");
|
||||
require("../lcsv.php");
|
||||
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Student Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
if($type=="pdf")
|
||||
{
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Committee Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
}
|
||||
else if($type=="csv") {
|
||||
$rep=new lcsv(i18n("Committee Nametags"));
|
||||
}
|
||||
$q=mysql_query("SELECT
|
||||
name,
|
||||
organization
|
||||
@ -93,19 +98,35 @@ on the page we have tagnum layout like this:
|
||||
|
||||
*/
|
||||
|
||||
if($type=="csv")
|
||||
{
|
||||
$table=array();
|
||||
$table['header'] = array(i18n("Name"),i18n("Organization"));
|
||||
}
|
||||
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.25,"$r->name");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.90,"Committee");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->organization);
|
||||
|
||||
if($type=="pdf")
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.25,"$r->name");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.90,"Committee");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->organization);
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$table['data'][]=array($r->name, $r->organization);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($type=="csv")
|
||||
{
|
||||
$rep->addTable($table);
|
||||
}
|
||||
|
||||
$rep->output();
|
||||
|
||||
?>
|
||||
|
@ -26,21 +26,28 @@
|
||||
auth_required('admin');
|
||||
require("../lpdf.php");
|
||||
require("../lcsv.php");
|
||||
|
||||
if($type=="pdf")
|
||||
{
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Judge Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Student Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
|
||||
$q=mysql_query("SELECT
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$rep=new lcsv(i18n("Judge Nametags"));
|
||||
}
|
||||
$q=mysql_query("SELECT
|
||||
judges.firstname,
|
||||
judges.lastname,
|
||||
judges.organization
|
||||
@ -97,19 +104,36 @@ on the page we have tagnum layout like this:
|
||||
|
||||
*/
|
||||
|
||||
if($type=="csv")
|
||||
{
|
||||
$table=array();
|
||||
$table['header'] = array(i18n("First Name"),i18n("Last Name"),i18n("Organization"));
|
||||
}
|
||||
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.25,"$r->firstname $r->lastname");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.90,"Judge");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->organization);
|
||||
if($type=="pdf")
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.25,"$r->firstname $r->lastname");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.90,"Judge");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->organization);
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$table['data'][]=array($r->firstname, $r->lastname, $r->organization);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if($type=="csv")
|
||||
{
|
||||
$rep->addTable($table);
|
||||
}
|
||||
|
||||
$rep->output();
|
||||
|
||||
?>
|
||||
|
@ -26,20 +26,27 @@
|
||||
auth_required('admin');
|
||||
require("../lpdf.php");
|
||||
require("../lcsv.php");
|
||||
|
||||
$type=$_GET['type'];
|
||||
if($type=="pdf")
|
||||
{
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
|
||||
$card_width=4;
|
||||
$card_height=3;
|
||||
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Student Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
$rep=new lpdf( i18n($config['fairname']),
|
||||
"Student Nametags",
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep->setPageStyle("nametags");
|
||||
$rep->newPage(8.5,11);
|
||||
$rep->setNametagDimensions($card_width,$card_height);
|
||||
$rep->setFontSize(11);
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$rep=new lcsv(i18n("Student Nametags"));
|
||||
}
|
||||
$q=mysql_query("SELECT
|
||||
registrations.id AS reg_id,
|
||||
registrations.num AS reg_num,
|
||||
@ -110,22 +117,37 @@ on the page we have tagnum layout like this:
|
||||
5 6
|
||||
|
||||
*/
|
||||
if($type=="csv")
|
||||
{
|
||||
$table=array();
|
||||
$table['header'] = array(i18n("First Name"),i18n("Last Name"),i18n("Project Title"),i18n("Category"),i18n("Division"),i18n("Project Number"));
|
||||
}
|
||||
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.0,"$r->firstname $r->lastname");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.75,"$r->title");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->category." - ".$r->division);
|
||||
$rep->setFontSize(16);
|
||||
$rep->addNametagText(1.75,"# $r->projectnumber");
|
||||
if($type=="pdf")
|
||||
{
|
||||
$rep->newNametag();
|
||||
$rep->setFontSize(18);
|
||||
$rep->addNametagText(0.0,"$r->firstname $r->lastname");
|
||||
$rep->setFontSize(14);
|
||||
$rep->addNametagText(0.75,"$r->title");
|
||||
$rep->setFontSize(12);
|
||||
$rep->addNametagText(1.5,$r->category." - ".$r->division);
|
||||
$rep->setFontSize(16);
|
||||
$rep->addNametagText(1.75,"# $r->projectnumber");
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$table['data'][]=array($r->firstname, $r->lastname, $r->title, $r->category, $r->division, $r->projectnumber);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($type=="csv")
|
||||
{
|
||||
$rep->addTable($table);
|
||||
}
|
||||
|
||||
$rep->output();
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user