diff --git a/admin/registration_list.php b/admin/registration_list.php
index 355d6dbe..14cff239 100644
--- a/admin/registration_list.php
+++ b/admin/registration_list.php
@@ -28,6 +28,16 @@
if($_GET['showstatus']) $wherestatus="AND status='".$_GET['showstatus']."' ";
else $wherestatus="";
+ switch($_GET['sort'])
+ {
+ case 'status': $ORDERBY="registrations.status DESC, projects.title"; break;
+ case 'num': $ORDERBY="registrations.num"; break;
+ case 'title': $ORDERBY="projects.title, registrations.status DESC"; break;
+ case 'cat': $ORDERBY="projects.projectcategories_id, projects.title"; break;
+ case 'div': $ORDERBY="projects.projectdivisions_id, projects.title"; break;
+ default: $ORDERBY="registrations.status DESC, projects.title"; break;
+
+ }
$q=mysql_query("SELECT registrations.id AS reg_id,
registrations.num AS reg_num,
@@ -43,18 +53,18 @@ else $wherestatus="";
AND registrations.year='".$config['FAIRYEAR']."'
$wherestatus
ORDER BY
- registrations.status DESC,
- projects.title
+ $ORDERBY
");
echo mysql_error();
echo "
";
echo "";
- echo "".i18n("Status")." | ";
- echo "".i18n("Reg Num")." | ";
- echo "".i18n("Project Title")." | ";
- echo "".i18n("Age Category")." | ";
- echo "".i18n("Division")." | ";
+ if($_GET['showstatus']) $stat="&showstatus=".$_GET['showstatus'];
+ echo "".i18n("Status")." | ";
+ echo "".i18n("Reg Num")." | ";
+ echo "".i18n("Project Title")." | ";
+ echo "".i18n("Age Category")." | ";
+ echo "".i18n("Division")." | ";
echo "".i18n("School(s)")." | ";
echo "".i18n("Student(s)")." | ";
echo "
";
diff --git a/lpdf.php b/lpdf.php
index af7a8dda..ca18c495 100644
--- a/lpdf.php
+++ b/lpdf.php
@@ -104,8 +104,6 @@ class lpdf
if($table['data'])
{
pdf_setfont($this->pdf,$this->normalfont,10);
-
-
foreach($table['data'] AS $dataline)
{
$xpos=$xpos_of_table;
@@ -123,6 +121,57 @@ class lpdf
pdf_stroke($this->pdf);
$this->yloc-=$height['tabledata'];
+ if($this->yloc<1)
+ {
+ //now draw all the vertical lines
+ $xpos=$xpos_of_table;
+ for($c=0;$c<$table_cols;$c++)
+ {
+ $width=$table['widths'][$c];
+ //draw the line below the table data)
+ pdf_moveto($this->pdf,$this->loc($xpos),$this->loc($top_of_table+$height['tableheader']));
+ pdf_lineto($this->pdf,$this->loc($xpos),$this->loc($this->yloc+$height['tableheader']-.02));
+ pdf_stroke($this->pdf);
+ $xpos+=$width;
+ }
+
+ //and the final line on the right side of the table:
+ pdf_moveto($this->pdf,$this->loc($xpos),$this->loc($top_of_table+$height['tableheader']));
+ pdf_lineto($this->pdf,$this->loc($xpos),$this->loc($this->yloc+$height['tableheader']-.02));
+ pdf_stroke($this->pdf);
+
+ $this->newPage();
+
+ //draw the top line of the table (above the table header)
+ pdf_moveto($this->pdf,$this->loc($xpos_of_table),$this->loc($this->yloc+$height['tableheader']));
+ pdf_lineto($this->pdf,$this->loc($xpos_of_table+$table_width),$this->loc($this->yloc+$height['tableheader']));
+ pdf_stroke($this->pdf);
+
+ //draw the top line of the table (below the table header)
+ pdf_moveto($this->pdf,$this->loc($xpos_of_table),$this->loc($this->yloc));
+ pdf_lineto($this->pdf,$this->loc($xpos_of_table+$table_width),$this->loc($this->yloc));
+ pdf_stroke($this->pdf);
+
+ //do the header first
+ if($table['header'])
+ {
+ pdf_setfont($this->pdf,$this->headerfont,12);
+
+ $xpos=$xpos_of_table;
+
+ for($c=0;$c<$table_cols;$c++)
+ {
+ $head=$table['header'][$c];
+ $width=$table['widths'][$c];
+
+ pdf_show_boxed($this->pdf,$head,$this->loc($xpos),$this->loc($this->yloc),$this->loc($width),$this->loc($height['tableheader']),"center",null);
+ $xpos+=$width;
+ }
+
+ $this->yloc-=$height['tableheader'];
+ }
+ pdf_setfont($this->pdf,$this->normalfont,10);
+ }
}
}
diff --git a/sfiab.css b/sfiab.css
index d215f8c6..6547f94a 100644
--- a/sfiab.css
+++ b/sfiab.css
@@ -153,8 +153,12 @@ a {
font-size: 1.05em;
color: white;
font-weight: bold;
-
+}
+.summarytable th a{
+ font-size: 1.05em;
+ color: white;
+ font-weight: bold;
}
.summarytable td {