Hand Coded Registration Website with Administrative Backend
This website was the first project I hand coded when I was hired as a developer for Washington University School of Law. The website was a registration website for an academic conference. I was assigned the task of writing an administrative back end for the stakeholder to manage registrations and the design was led by the head of the department. Email addresses have been removed from screenshots.
<?php
// ========================================================================
// establish page necessary vars
// ========================================================================
$pageMain = "data"; // serves as a top level page locator
$pageSub = ""; // serves as a sub level page locator, should the site use them
$pageRoot = ""; // used in the event of a complex site structure which houses loadable pages in sub-dirs.
$passedDataType = $_GET['type'];
// print $passedDataType;
// Prepare Data
$cleArray[] = array ("Australia", "CLE_Australia_Dataset_(1993-2001).$passedDataType", "(1993-2001)", "CLE_Australia_Codebook_(1993-2001).pdf");
$cleArray[] = array ("Bermuda", "CLE_Bermuda_Dataset_(1989-1998).$passedDataType", "(1989-1998)", "CLE_Bermuda_Codebook_(1989-1998).pdf");
$cleArray[] = array ("Bolivia", "CLE_Bolivia_Dataset_(1985-2002).$passedDataType", "(1985-2002)", "CLE_Bolivia_Codebook_(1985-2002).pdf");
$cleArray[] = array ("Bosnia-Herzegovina", "CLE_BiH_Dataset_(1996-2006).$passedDataType", "(1996-2006)", "CLE_BiH_Codebook_(1996-2006).pdf");
$cleArray[] = array ("Botswana", "CLE_Botswana_Dataset_(1999).$passedDataType", "(1999)", "CLE_Botswana_Codebook_(1999).pdf");
$cleArray[] = array ("Canada", "CLE_Canada_Dataset_(1945-2000).$passedDataType", "(1945-2000)", "CLE_Canada_Codebook_(1945-2000).pdf");
$cleArray[] = array ("Colombia", "CLE_Colombia_Dataset_(1958-1998).$passedDataType", "(1958-1998)", "CLE_Colombia_Codebook_(1958-1998).pdf");
$cleArray[] = array ("Costa Rica", "CLE_CostaRica_Dataset_(1953-2002).$passedDataType", "(1953-2002)", "CLE_CostaRica_Codebook_(1953-2002).pdf");
$cleArray[] = array ("Croatia", "CLE_Croatia_Dataset_(2000-2003).$passedDataType", "(2000-2003)", "CLE_Croatia_Codebook_(2000-2003).pdf");
$cleArray[] = array ("Cyprus", "CLE_Cyprus_Dataset_(1981-1996).$passedDataType", "(1981-1996)", "CLE_Cyprus_Codebook_(1981-1996).pdf");
$cleArray[] = array ("Finland", "CLE_Finland_Dataset_(1999-2003).$passedDataType", "(1999-2003)", "CLE_Finland_Codebook_(1999-2003).pdf");
$cleArray[] = array ("Germany (state-level)", "CLE_Germany_Dataset_(1949-2002).$passedDataType", "(1949-2002)", "CLE_Germany_Codebook_(1949-2002).pdf");
$cleArray[] = array ("Greece", "CLE_Greece_Dataset_(1946-2000).$passedDataType", "(1946-2000)", "CLE_Greece_Codebook_(1946-2000).pdf");
$cleArray[] = array ("Iceland", "CLE_Iceland_Dataset_(1959-1999).$passedDataType", "(1959-1999)", "CLE_Iceland_Codebook_(1959-1999).pdf");
$cleArray[] = array ("Indonesia", "CLE_Indonesia_Dataset_(1999).$passedDataType", "(1999)", "CLE_Indonesia_Codebook_(1999).pdf");
$cleArray[] = array ("Ireland", "CLE_Ireland_Dataset_(1948-1997).$passedDataType", "(1948-1997)", "CLE_Ireland_Codebook_(1951-2000).pdf");
$cleArray[] = array ("Israel", "CLE_Israel_Dataset_(1949-2003).$passedDataType", "(1949-2003)", "CLE_Israel_Codebook_(1949-2003).pdf");
$cleArray[] = array ("Italy", "CLE_Italy_Dataset_(1949-2003).$passedDataType", "(1949-2003)", "CLE_Italy_Codebook_(1949-2003).pdf");
$cleArray[] = array ("Lithuania", "CLE_Lithuania_Dataset_(1992-2004).$passedDataType", "(1996-2004)", "CLE_Lithuania_Codebook_(1992-2004).pdf");
$cleArray[] = array ("Luxembourg", "CLE_Luxembourg_Dataset_(1945-1999).$passedDataType", "(1945-1999)", "CLE_Luxembourg_Codebook_(1945-1999).pdf");
$cleArray[] = array ("Norway", "CLE_Norway_Dataset_(1977-2001).$passedDataType", "(1977-2001)", "CLE_Norway_Codebook_(1977-2001).pdf");
$cleArray[] = array ("Romania", "CLE_Romania_Dataset_(1992-2004).$passedDataType", "(1992-2004)", "CLE_Romania_Codebook_(1992-2004).pdf");
$cleArray[] = array ("Slovenia", "CLE_Slovenia_Dataset_(1996-2000).$passedDataType", "(1996-2000)", "CLE_Slovenia_Codebook_(1996-2000).pdf");
$cleArray[] = array ("Sweden", "CLE_Sweden_dataset_(1944-2002).$passedDataType", "(1944-2002)", "CLE_Sweden_Codebook_(1944-2002).pdf");
$cleArray[] = array ("Turkey", "CLE_Turkey_Dataset_(1961-2002).$passedDataType", "(1961-2002)", "CLE_Turkey_Codebook_(1961-2002).pdf");
//========================================================================
// instantiate framework and site's common html header
// ========================================================================
require_once($pageRoot . "fwCore/_frameworkHeader.php");
require_once($pageRoot . "fwCore/_htmlHeader.php");
require_once($pageRoot . "includes/siteFunctions/cleFunctions.php");
// ========================================================================
// proc page
// ========================================================================
// if we have experienced a failure before this point, don't bother prepping page-specific content, which should be placed inside the below IF condition
// the content window below (which also makes this check) will display the default failure message "includes/incPukeNow.php" when problems have been detected
if (empty($pukeNow)) {
}
// ========================================================================
// buildPage
// ========================================================================
if (empty($pukeNow)) {
?>
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
<?php
// ========================================================================
// establish page necessary vars
// ========================================================================
$pageMain = "data"; // serves as a top level page locator
$pageSub = ""; // serves as a sub level page locator, should the site use them
$pageRoot = ""; // used in the event of a complex site structure which houses loadable pages in sub-dirs.
$passedDataType = $_GET['type'];
// print $passedDataType;| // Prepare Data
// Prepare Data
$cleArray[] = array ("Australia", "CLE_Australia_Dataset_(1993-2001).$passedDataType", "(1993-2001)", "CLE_Australia_Codebook_(1993-2001).pdf");
$cleArray[] = array ("Bermuda", "CLE_Bermuda_Dataset_(1989-1998).$passedDataType", "(1989-1998)", "CLE_Bermuda_Codebook_(1989-1998).pdf");
$cleArray[] = array ("Bolivia", "CLE_Bolivia_Dataset_(1985-2002).$passedDataType", "(1985-2002)", "CLE_Bolivia_Codebook_(1985-2002).pdf");
$cleArray[] = array ("Bosnia-Herzegovina", "CLE_BiH_Dataset_(1996-2006).$passedDataType", "(1996-2006)", "CLE_BiH_Codebook_(1996-2006).pdf");
$cleArray[] = array ("Botswana", "CLE_Botswana_Dataset_(1999).$passedDataType", "(1999)", "CLE_Botswana_Codebook_(1999).pdf");
$cleArray[] = array ("Canada", "CLE_Canada_Dataset_(1945-2000).$passedDataType", "(1945-2000)", "CLE_Canada_Codebook_(1945-2000).pdf");
$cleArray[] = array ("Colombia", "CLE_Colombia_Dataset_(1958-1998).$passedDataType", "(1958-1998)", "CLE_Colombia_Codebook_(1958-1998).pdf");
$cleArray[] = array ("Costa Rica", "CLE_CostaRica_Dataset_(1953-2002).$passedDataType", "(1953-2002)", "CLE_CostaRica_Codebook_(1953-2002).pdf");
$cleArray[] = array ("Croatia", "CLE_Croatia_Dataset_(2000-2003).$passedDataType", "(2000-2003)", "CLE_Croatia_Codebook_(2000-2003).pdf");
$cleArray[] = array ("Cyprus", "CLE_Cyprus_Dataset_(1981-1996).$passedDataType", "(1981-1996)", "CLE_Cyprus_Codebook_(1981-1996).pdf");
$cleArray[] = array ("Finland", "CLE_Finland_Dataset_(1999-2003).$passedDataType", "(1999-2003)", "CLE_Finland_Codebook_(1999-2003).pdf");
$cleArray[] = array ("Germany (state-level)", "CLE_Germany_Dataset_(1949-2002).$passedDataType", "(1949-2002)", "CLE_Germany_Codebook_(1949-2002).pdf");
$cleArray[] = array ("Greece", "CLE_Greece_Dataset_(1946-2000).$passedDataType", "(1946-2000)", "CLE_Greece_Codebook_(1946-2000).pdf");
$cleArray[] = array ("Iceland", "CLE_Iceland_Dataset_(1959-1999).$passedDataType", "(1959-1999)", "CLE_Iceland_Codebook_(1959-1999).pdf");
$cleArray[] = array ("Indonesia", "CLE_Indonesia_Dataset_(1999).$passedDataType", "(1999)", "CLE_Indonesia_Codebook_(1999).pdf");
$cleArray[] = array ("Ireland", "CLE_Ireland_Dataset_(1948-1997).$passedDataType", "(1948-1997)", "CLE_Ireland_Codebook_(1951-2000).pdf");
$cleArray[] = array ("Israel", "CLE_Israel_Dataset_(1949-2003).$passedDataType", "(1949-2003)", "CLE_Israel_Codebook_(1949-2003).pdf");
$cleArray[] = array ("Italy", "CLE_Italy_Dataset_(1949-2003).$passedDataType", "(1949-2003)", "CLE_Italy_Codebook_(1949-2003).pdf");
$cleArray[] = array ("Lithuania", "CLE_Lithuania_Dataset_(1992-2004).$passedDataType", "(1996-2004)", "CLE_Lithuania_Codebook_(1992-2004).pdf");
$cleArray[] = array ("Luxembourg", "CLE_Luxembourg_Dataset_(1945-1999).$passedDataType", "(1945-1999)", "CLE_Luxembourg_Codebook_(1945-1999).pdf");
$cleArray[] = array ("Norway", "CLE_Norway_Dataset_(1977-2001).$passedDataType", "(1977-2001)", "CLE_Norway_Codebook_(1977-2001).pdf");
$cleArray[] = array ("Romania", "CLE_Romania_Dataset_(1992-2004).$passedDataType", "(1992-2004)", "CLE_Romania_Codebook_(1992-2004).pdf");
$cleArray[] = array ("Slovenia", "CLE_Slovenia_Dataset_(1996-2000).$passedDataType", "(1996-2000)", "CLE_Slovenia_Codebook_(1996-2000).pdf");
$cleArray[] = array ("Sweden", "CLE_Sweden_dataset_(1944-2002).$passedDataType", "(1944-2002)", "CLE_Sweden_Codebook_(1944-2002).pdf");
$cleArray[] = array ("Turkey", "CLE_Turkey_Dataset_(1961-2002).$passedDataType", "(1961-2002)", "CLE_Turkey_Codebook_(1961-2002).pdf");
// ========================================================================
// instantiate framework and site's common html header
// ========================================================================
require_once($pageRoot . "fwCore/_frameworkHeader.php");
require_once($pageRoot . "fwCore/_htmlHeader.php");
require_once($pageRoot . "includes/siteFunctions/cleFunctions.php");
// ========================================================================
// proc page
// ========================================================================
// if we have experienced a failure before this point, don't bother prepping page-specific content, which should be placed inside the below IF condition
// the content window below (which also makes this check) will display the default failure message "includes/incPukeNow.php" when problems have been detected
if (empty($pukeNow)) {
}
// ========================================================================
// buildPage
// ========================================================================
if (empty($pukeNow)) {
?>
<script type="text/javascript">
<!--
function MM_jumpMenu (targ,selObj,restore) { //v3.0
eval (targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<div align="center">
<?php
setBorder();
mainHeading();
?>
<br /><br />
<?php require_once($pageRoot . "includes/incNav.php");
?>
<form method="get" name="form" id="form" action="">
<div id="dataFormat">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td width="57%">For data downloads you must first select a format.</td>
<td width="43%" align="right">
<div style="margin-top:0px;">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="ElectoralData.php?type=none" <?php if ( ($passedDataType == "none") or (!isset($passedDataType)) ) { print "selected='selected'";} ?> >Please select a data type</option>
<option value="ElectoralData.php?type=dta" <?php if ($passedDataType == "dta") { print "selected='selected'";} ?> >dta</option>
<option value="ElectoralData.php?type=spss" <?php if ($passedDataType == "spss") { print "selected='selected'";} ?> >spss</option>
<option value="ElectoralData.php?type=csv" <?php if ($passedDataType == "csv") { print "selected='selected'";} ?> >csv</option>
<option value="ElectoralData.php?type=sql" <?php if ($passedDataType == "sql") { print "selected='selected'";} ?> >sql</option>
<option value="ElectoralData.php?type=xlsx" <?php if ($passedDataType == "xlsx") { print "selected='selected'";} ?> >xlsx</option>
</select>
</div>
</td>
</tr>
</table>
</div>
</form>
<?php
setTable();
?>
<br /><br />
<div style="font-size:115%;"><strong>Release Date: July 1</strong></div>
<br />
<div style="padding-top:5px;">
<?php getAdobe();
?>
</div>
<?php
} else {
include ($pageRoot . "includes/incPukeNow.php");
}
// if(empty($pukeNow)) {
// exit from content window and close site vehicle
include ($pageRoot . "siteFooter.php");
?>
eval (targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<div align="center">
<?php
setBorder();
mainHeading();
?>
<br /><br />
<?php require_once($pageRoot . "includes/incNav.php");
?>
<form method="get" name="form" id="form" action="">
<div id="dataFormat">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td width="57%">For data downloads you must first select a format.</td>
<td width="43%" align="right">
<div style="margin-top:0px;">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="ElectoralData.php?type=none" <?php if ( ($passedDataType == "none") or (!isset($passedDataType)) ) { print "selected='selected'";} ?> >Please select a data type</option>
<option value="ElectoralData.php?type=dta" <?php if ($passedDataType == "dta") { print "selected='selected'";} ?> >dta</option>
<option value="ElectoralData.php?type=spss" <?php if ($passedDataType == "spss") { print "selected='selected'";} ?> >spss</option>
<option value="ElectoralData.php?type=csv" <?php if ($passedDataType == "csv") { print "selected='selected'";} ?> >csv</option>
<option value="ElectoralData.php?type=sql" <?php if ($passedDataType == "sql") { print "selected='selected'";} ?> >sql</option>
<option value="ElectoralData.php?type=xlsx" <?php if ($passedDataType == "xlsx") { print "selected='selected'";} ?> >xlsx</option>
</select>
</div>
</td>
</tr>
</table>
</div>
</form>
<?php
setTable();
?>
<br /><br />
<div style="font-size:115%;"><strong>Release Date: July 1</strong></div>
<br />
<div style="padding-top:5px;">
<?php getAdobe();
?>
</div>
<?php
} else {
include ($pageRoot . "includes/incPukeNow.php");
} // if (empty($pukeNow)) {
// exit from content window and close site vehicle
include ($pageRoot . "siteFooter.php");
?>
Export to Excel Hand Written Code Example
// DEFINE SQL QUERY:
$sql = "SELECT caseStatus.id, coaId, coaDocket, districtId, districtDocket, caseStatus.dateDC, coaPageOne, coaPageTwo, coaPageThree, coaPageFour, dcCourtPage1, dcCourtPage2, codingStatus, coaPdfUploadComplete, dcPdfUploadComplete, siteUsers.user, DCinfo.qOneInitials, DCinfo.qTwoDocketUploaded, DCinfo.qTwoUploadReason, DCinfo.qThreePlaintiffName, DCinfo.qThreeDefendantName, DCinfo.qFourJudgeOneFirst, DCinfo.qFourJudgeOneLast, DCinfo.qFourJudgeOneSA, DCinfo.qFourJudgeTwoFirst, DCinfo.qFourJudgeTwoLast, DCinfo.qFourJudgeTwoSA, DCinfo.qFourJudgeUnclarity, DCinfo.qFiveOutcome, DCinfo.qFiveVolDisOther, DCinfo.qFiveInVolDisOther, DCinfo.qFiveOutcomeOther, DCinfo.qFiveDocketLang, DCinfo.qSixCodingNotes, DCinfo.qSevenConfidence, COAinfo.qOneInitialsCoa, COAinfo.qTwoDocketUploadedCoa, COAinfo.qTwoUploadReasonCoa, COAinfo.qThreeBanc, COAinfo.qFourHeardBySC, COAinfo.qFiveAppeal, COAinfo.qSixCitation, COAinfo.qSevenJudgeOneFirst, COAinfo.qSevenJudgeOneLast, COAinfo.qSevenJudgeOneSA, COAinfo.qSevenJudgeTwoFirst, COAinfo.qSevenJudgeTwoLast, COAinfo.qSevenJudgeTwoSA, COAinfo.qSevenJudgeThreeFirst, COAinfo.qSevenJudgeThreeLast, COAinfo.qSevenJudgeThreeSA, COAinfo.qSevenMoreJudges, COAinfo.qEightMainOptions, COAinfo.qEightLastNameText, COAinfo.qEightOther, COAinfo.qEightOpOneAthrLast, COAinfo.qEightOpOneType, COAinfo.qEightOpTwoAthrLast, COAinfo.qEightOpTwoType, COAinfo.qEightOpThreeAthrLast, COAinfo.qEightOpThreeType, COAinfo.qNineCaseDisposition, COAinfo.qNineOther, COAinfo.qTenOutcome, COAinfo.qTenVolDisOther, COAinfo.qTenInVolDisOther, COAinfo.qTenOther, COAinfo.qElevenWhoAppealing, COAinfo.qTwelveDirectionsOne, COAinfo.qTwelveDirectionsTwo, COAinfo.qTwelveDirectionsThree, COAinfo.qTwelveDirectionsFour, COAinfo.qTwelveAdditional, COAinfo.qThirteenNotable, COAinfo.qFourteenConfidence, COAinfo.qFifteenUnusual, caseStatus.active
FROM caseStatus
LEFT JOIN indexTable on caseStatus.id = indexTable.id
LEFT JOIN siteUsers on caseStatus.id = siteUsers.id
LEFT JOIN COAinfo on caseStatus.id = COAinfo.id
LEFT JOIN DCinfo on caseStatus.id = DCinfo.id
WHERE caseStatus.active = 1
ORDER BY id ASC";
// Print out title to top of Excel file with Timestamp for when file was generated:
// Set $Use_Titel = 1 to generate title, 0 not to use title
$Use_Title = 1;
// Define date for title:
$now_date = date('m-d-Y H:i');
// Define title for .xls file:
$title = "Federal Remands Project Report on $now_date";
// MySQL connection
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password)
or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_error());
// Select database
$Db = @mysql_select_db($DB_DBName, $Connect)
or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_error());
// Execute query
$result = @mysql_query($sql,$Connect)
or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_error());
// If this parameter is included ($w=1), file returned will be in word format ('.doc')
// If parameter is not included, file returned will be in excel format ('.xls')
if (isset($w) && ($w==1))
{
$file_type = "msword";
$file_ending = "doc";
} else {
$file_type = "vnd.ms-excel";
$file_ending = "xls";
}
// Header info for browser: determines file type ('.doc' or '.xls')
header("Content-Type: application/$file_type");
header("Content-Disposition: attachment; filename=Federal_Remands_Project_FULL_DUMP.$file_ending");
header("Pragma: no-cache");
header("Expires: 0");
/* Start of Formatting for Word or Excel */
if (isset($w) && ($w==1))
//check for $w again
{
/* FORMATTING FOR WORD DOCUMENTS ('.doc') */
// Create title with timestamp:
if ($Use_Title == 1)
{
echo("$title\n\n");
}
// Define separator (defines columns in excel & tabs in word)
$sep = "\n";
// New line character
while($row = mysql_fetch_row($result))
{
// set_time_limit(60);
$schema_insert = "";
for($j=0; $j<mysql_num_fields($result);$j++)
{
// Define field names
$field_name = mysql_field_name($result,$j);
// Will show name of fields
$schema_insert .= "$field_name:\t";
if (!isset($row[$j])) {
$schema_insert .= "NULL".$sep;
}
elseif ($row[$j] != "") {
$schema_insert .= "$row[$j]".$sep;
}
else {
$schema_insert .= "".$sep;
}
}
$schema_insert = str_replace($sep."$", "", $schema_insert);
$schema_insert .= "\t";
print(trim($schema_insert));
// End of each mysql row
// Line to separate data from each MySQL table row
print "\n----------------------------------------------------\n";
}
} else {
/* FORMATTING FOR EXCEL DOCUMENTS ('.xls') */
// create title with timestamp:
if ($Use_Title == 1)
{
echo("$title\n");
}
// Place a blank row between the Title and the content
// print("\n");
// Define separator (defines columns in excel & tabs in word)
$sep = "\t";
// tabbed character
// Start of printing column names as names of MySQL fields
print "ID \t";
print "COA Region \t";
print "COA Docket \t";
print "DC Region \t";
print "DC Docket \t";
print "Last Updated Date \t";
print "COA Page 1 \t";
print "COA Page 2 \t";
print "COA Page 3 \t";
print "COA Page 4 \t";
print "DC Page 1 \t";
print "DC Page 2 \t";
print "Coding Status \t";
print "COA PDFs \t";
print "DC PDFs \t";
print "Last Updated By \t";
// begin DC PAGE
print "DC Q1. Your Initials \t";
print "DC Q2. Docket Uploaded? \t";
print "DC Q2. Reason Not Uploaded \t";
print "DC Q3. Plaintiff Name \t";
print "DC Q3. Defendant Name \t";
print "DC Q4. Judge 1 First \t";
print "DC Q4. Judge 1 Last \t";
print "DC Q4. Judge 1 Special Aff \t";
print "DC Q4. Judge 2 First \t";
print "DC Q4. Judge 2 Last \t";
print "DC Q4. Judge 2 Special Aff \t";
print "DC Q4. Judge Notes \t";
print "DC Q5. Post-Appeal Outcome \t";
print "DC Q5. opt. PAO Vol Diss Other \t";
print "DC Q5. opt. PAO Invol Diss Other \t";
print "DC Q5. opt. PAO Other \t";
print "DC Q5b.Docket Language \t";
print "DC Q6. Coding Notes \t";
print "DC Q7. Confidence in Coding \t";
// begin COA PAGE
print "COA Q1. Your Initials \t";
print "COA Q2. Docket Uploaded? \t";
print "COA Q2. Reason Not Uploaded \t";
print "COA Q3. Heard en banc? \t";
print "COA Q4. Heard by SC or granted cert? \t";
print "COA Q5. Inerlocutory appeal? \t";
print "COA Q6. Citation to Opinion \t";
print "COA Q7. Judge 1 First \t";
print "COA Q7. Judge 1 Last \t";
print "COA Q7. Judge 1 Special Aff \t";
print "COA Q7. Judge 2 First \t";
print "COA Q7. Judge 2 Last \t";
print "COA Q7. Judge 2 Special Aff \t";
print "COA Q7. Judge 3 First \t";
print "COA Q7. Judge 3 Last \t";
print "COA Q7. Judge 3 Special Aff \t";
print "COA Q7. Judge Notes \t";
print "COA Q8a. Authors/Types \t";
print "COA Q8a. opt. Author Last Name \t";
print "COA Q8a. opt. Other \t";
print "COA Q8b. 1, Author Last \t";
print "COA Q8b. 1, Opinion Type \t";
print "COA Q8b. 2, Author Last \t";
print "COA Q8b. 2, Opinion Type \t";
print "COA Q8b. 3, Author Last \t";
print "COA Q8b. 3, Opinion Type \t";
print "COA Q9. Case Disposition \t";
print "COA Q9. opt. Other \t";
print "COA Q10. Outcome \t";
print "COA Q10. opt. PAO Vol Diss Other \t";
print "COA Q10. opt. PAO Invol Diss Other \t";
print "COA Q10. opt. PAO Other \t";
print "COA Q11. Who is Appealing? \t";
print "COA Q12. Directions One \t";
print "COA Q12. Directions Two \t";
print "COA Q12. Directions Three \t";
print "COA Q12. Directions Four \t";
print "COA Q12. Additional Directions \t";
print "COA Q13. Notes about COA Opinion \t";
print "COA Q14. Confidence in Coding \t";
print "COA Q15. Additional Notes \t";
print "\n";
// print "\n";
// End of printing column names
// Start while loop to get data
while($row = mysql_fetch_row($result))
{
// set_time_limit(60);
// HaRa
$schema_insert = "";
for($j=0; $j<mysql_num_fields($result);$j++)
{
if (!isset($row[$j])) {
$schema_insert .= "NULL".$sep;
elseif ($row[$j] != "") {
$schema_insert .= "$row[$j]".$sep;
else
$schema_insert .= "".$sep;
}
$schema_insert = str_replace($sep."$", "", $schema_insert);
// This corrects output in excel when table fields contain \n or \r
// These two characters are now replaced with a space
$schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert);
$schema_insert .= "\t";
print (trim($schema_insert));
print "\n";
}
}
Hand Written Code Sample
$sqlStart = "SELECT PolmethDocuments .id, PolmethDocuments.docTitle, PolmethDocuments.uploadDate, PolmethDocuments.abstract, PolmethDocuments. Year, PolmethDocuments.docType, PolmethDocuments.ConfPosterCategory, PolmethDocuments.uploadedFileName, PolmethDocuments.docExtension, varDocType.docType, varSyllabiGrad.syllabiGrad, varSyllabiListing.syllabiListing, relDocumentsAuthor.authorID, Authors.firstname, Authors.lastname, varUniversity.university, KeywordsGroups.keyword, relDocumentsAuthor.rank";
$sqlStart .= " FROM PolmethDocuments ";
$sqlStart .= "
LEFT JOIN varDocType on PolmethDocuments.docType = varDocType.id
LEFT JOIN varConfPosterCat on PolmethDocuments.ConfPosterCategory = varConfPosterCat.id
LEFT JOIN varSyllabiGrad on PolmethDocuments.syllabiGrad= varSyllabiGrad.id
LEFT JOIN varSyllabiListing on PolmethDocuments.syllabiListing= varSyllabiListing.id
LEFT JOIN relDocumentsAuthor on PolmethDocuments.id= relDocumentsAuthor.docID
LEFT JOIN Authors on relDocumentsAuthor.authorID = Authors.id
LEFT JOIN varUniversity on relDocumentsAuthor.instID = varUniversity.id
LEFT JOIN Keywords Groups on PolmethDocuments.id= KeywordsGroups.id";
$sqlWhere .= " Where originalDocID=0 ";
$sqlWhere .= " AND relDocumentsAuthor.rank=1 ";
if (($isAdvTextTitle <>"") or ($isAdvTextAbstract <>"") or ($isAdvTextKeyword <>"") or ($isAdvTextAuthor <>"") or ($isAdvTextInstitution <>"")) {
$sqlWhere .= " AND ";
$sqlWhere .= " ( ";
}
if ($$isAdvTextTitle <>"") {
$sqlWhere .= " PolmethDocuments.docTitle LIKE '%$isAdvTextTitle%' ";
}
if ($isAdvTextAbstract <>"") {
if ($isAdvTextTitle <>"") {
$sqlWhere .= "OR ";
}
$sqlWhere .= " PolmethDocuments.abstract LIKE '%$isAdvTextAbstract%' ";
}
if ($isAdvTextKeyword <>"") {
if (($isAdvTextTitle <>"") or ($isAdvTextAbstract <>"")) {
$sqlWhere .= "OR ";
}
$sqlWhere .= " KeywordsGroups.keyword LIKE '%$isAdvTextKeyword%' ";
}
if ($isAdvTextAuthor <>"") {
if (($isAdvTextTitle <>"") or ($isAdvTextAbstract <>"") or ($isAdvTextKeyword <>"")) {
$sqlWhere .= "OR ";
}
$sqlWhere .= " Authors.lastname LIKE '%$isAdvTextAuthor%' ";
}
if ($isAdvTextInstitution <>"") {
if (($isAdvTextTitle <>"") or ($isAdvTextAbstract <>"") or ($isAdvTextKeyword <>"") or ($isAdvTextAuthor <>"")) {
$sqlWhere .= "OR ";
}
$sqlWhere .= " varUniversity.university LIKE '%$isAdvTextInstitution%' ";
}
if (($isAdvTextTitle <>"") or ($isAdvTextAbstract <>"") or ($isAdvTextKeyword <>"") or ($isAdvTextAuthor <>"") or ($isAdvTextInstitution <>"")) {
$sqlWhere .= " ) ";
}
$sqlWhere .= " AND ";
$sqlWhere .= " ( ";
if (($isAdvChkBoxPaper <>"") or ($isAdvChkBoxPoster <>"") or ($isAdvChkBoxSyllabi <>"")) {
if ($isAdvChkBoxPaper <>"") {
$sqlWhere .= " varDocType.docType='Working Paper'";
}
if (($isAdvChkBoxPoster <>"") and ($isAdvChkBoxPaper <>"")) {
$sqlWhere .= " OR ";
}
if ($isAdvChkBoxPoster <>"") {
$sqlWhere .= " varDocType.docType='Conference Poster' ";
}
if ($isAdvChkBoxSyllabi <>"") {
if (($isAdvChkBoxPoster <>"") or ($isAdvChkBoxPaper <>"")) {
$sqlWhere .= " OR ";
}
$sqlWhere .= " varDocType.docType='Syllabi' ";
}
} else {
if (($isAdvChkGraduate <>"") or ($isAdvChkUnderGraduate <>"") or ($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"") or ($isAdvChkAdvScope <>"") or ($isAdvChkAdvQualit <>"") or ($isAdvChkFaculty <>"") or ($isAdvChkGradStudents <>"")) {
if (($isAdvChkGraduate <>"") or ($isAdvChkUnderGraduate <>"") or ($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"") or ($isAdvChkAdvScope <>"") or ($isAdvChkAdvQualit <>"")) {
// if no conf poster paper checkboxes are checked and there are some syllabi options checked
$sqlWhere .= " varDocType.docType='Syllabi' ";
}
if (($isAdvChkGraduate <>"") or ($isAdvChkUnderGraduate <>"") or ($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"") or ($isAdvChkAdvScope <>"") or ($isAdvChkAdvQualit <>"")) {$a = "test"; }
if (($isAdvChkFaculty <>"") or ($isAdvChkGradStudents <>"")) { $b = "test"; }
if ($a == $b) {
$sqlWhere .= " AND ";
}
if (($isAdvChkFaculty <>"") or ($isAdvChkGradStudents <>"")) {
// if no conf poster paper checkboxes are checked and there are some faculty options checked
$sqlWhere .= " varDocType.docType='Conference Poster' ";
}
} else {
// if no checkboxes are checked then do a full search
$sqlWhere .= " varDocType.docType='Working Paper' OR varDocType.docType='Conference Poster' OR varDocType.docType='Syllabi' ";
}
}
$sqlWhere .= " ) ";
if (($isAdvChkFaculty <>"") or ($isAdvChkGradStudents <>"")) {
$sqlWhere .= " AND ";
$sqlWhere .= " ( ";
}
if ($isAdvChkFaculty <>"") {
$sqlWhere .= " PolmethDocuments.ConfPosterCategory='Faculty' ";
}
if (($isAdvChkFaculty <>"") and ($isAdvChkGradStudents <>"")) {
$sqlWhere .= " OR ";
}
if ($isAdvChkGradStudents <>"") {
$sqlWhere .= " PolmethDocuments.ConfPosterCategory='Grad Students' ";
}
if (($isAdvChkFaculty <>"") or ($isAdvChkGradStudents <>"")) {
$sqlWhere .= " ) ";
}
if (($isAdvChkGraduate <>"") or ($isAdvChkUnderGraduate <>"")) {
$sqlWhere .= " AND ";
$sqlWhere .= " ( ";
}
if ($isAdvChkGraduate <>"") {
$sqlWhere .= " varSyllabiGrad.syllabiGrad='Graduate' ";
}
if (($isAdvChkGraduate <>"") and ($isAdvChkUnderGraduate <>"")) {
$sqlWhere .= " OR ";
}
if ($isAdvChkUnderGraduate <>"") {
$sqlWhere .= " varSyllabiGrad.syllabiGrad='Undergraduate' ";
}
if (($isAdvChkGraduate <>"") or ($isAdvChkUnderGraduate <>"")) {
$sqlWhere .= " ) ";
}
if (($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"") or ($isAdvChkAdvScope <>"") or ($isAdvChkAdvQualit <>"")) {
$sqlWhere .= " AND ";
$sqlWhere .= " ( ";
if ($isAdvChkAdvIntStat <>"") {
$sqlWhere .= " varSyllabiListing.syllabiListing='Introductory Statistical Methods' ";
}
if ($isAdvChkAdvAdvStat <>"") {
if ($isAdvChkAdvIntStat <>"") {
$sqlWhere .= " OR ";
}
$sqlWhere .= " varSyllabiListing.syllabiListing='Advanced Statistical Methods' ";
}
if ($isAdvChkAdvScope <>"") {
if (($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"")) {
$sqlWhere .= " OR ";
}
$sqlWhere .= " varSyllabiListing.syllabiListing='Scope and Methods' ";
}
if ($isAdvChkAdvQualit <>"") {
if (($isAdvChkAdvIntStat <>"") or ($isAdvChkAdvAdvStat <>"") or ($isAdvChkAdvScope <>"")) {
$sqlWhere .= " OR ";
}
$sqlWhere .= " varSyllabiListing.syllabiListing='Qualitative Methods' ";
}
$sqlWhere .= " ) ";
}
$sqlEnd .= " ORDER BY $isDocOrderAdv" ;$sql = $sqlStart . " " . $sqlWhere . " " . $sqlEnd;
}
Admin Area Search Code Example
<?php
// Check User Session is set
session_start();
if (!isset($_SESSION['sessionone'])){ header("Location: unabletoconnect.php"); }
// if (($_SESSION['sessionone']) !== "sessionname"){ header("Location: unabletoconnect.php"); }
// ========================================================================
// establish page necessary vars
// ========================================================================
$pageMain = "admin"; // serves as a top level page locator
$sectionName = "AdminHome"; // serves as a sub level page locator, should the site use them
$pageRoot = ""; // used in the event of a complex site structure which houses loadable pages in sub-dirs.
$pageTitle = "Prison Litigation Conference: Administration";
$page = "search";
$searchState = $_REQUEST['Search'];
// ========================================================================
// instantiate framework and site's common html header
// ========================================================================
require_once($pageRoot . "fwCore/_frameworkHeader.php");
require_once($pageRoot . "fwCore/_htmlHeader.php");
// ========================================================================
// proc page
// ========================================================================
// if we have experienced a failure before this point, don't bother prepping page-specific content, which should be placed inside the below IF condition
// the content window below (which also makes this check) will display the default failure message "includes/incPukeNow.php" when problems have been detected
if (empty($pukeNow)) {
}
// ========================================================================
// buildPage
// ========================================================================
// begin construction of site vehicle
include ($pageRoot . "includes/siteHeader.php");
// blend into site content
// if no errors have been detected, display site content, else, revert to default failure page
if (empty($pukeNow)) { ?>
<div style="font-size:175%;"><strong>Administrator:</strong><br />
<a href="logout.php" class="style1">Logout</a></div>
<?php
include "includes/incAdminHeader.php";
?>
<table width="750" border="0" align="left" cellpadding="0" cellspacing="0" id="tableresults" bgcolor="#FFFFCC">
<tr>
<td width="150"><a href="adminMealResults.php">Session/Meal Report</a></td>
</tr>
</table>
<br /><br />
Excel Reports<br />
<table width="750" border="0" align="left" cellpadding="0" cellspacing="0" id="tableresults" bgcolor="#FFFFCC">
<tr>
<td width="150"><a href="excelAttendeeReport.php">Attendee Report</a></td>
<td width="150"><a href="excelFullDump.php">Full Dump</a></td>
<td width="150"><a href="data/excelSurveyReport.php">Expert Report</a></td>
<td width="300"> </td>
</tr>
</table>
<br /><br />
<?php
include "includes/incSearchForm.php";
//////////////////// UNIQUE PAGE CONTENT /////////////////////
// if records present
if ($searchState <> "") {
$rowColour = "#B9CAB1";
$count=0;
if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_object($result)) {
include "includes/incGreenAdminTableHeader.php";
if ($rowColour == "BEDBBB") {$rowColour = "#B9CAB1";} else {$rowColour = "BEDBBB";}
} // END while($row = mysql_fetch_object($result))
} // if (mysql_num_rows($result) > 0)
/////////////////////// SEARCH //////////////////////////////////
$inName = $_REQUEST['Name'];
$inUniqueID = $_REQUEST['UniqueID'];
$inEmail = $_REQUEST['Email'];
// Perform database query and break into variables
$sqlString = "SELECT id, email, firstName, lastName, paid, status";
$sqlString .= "FROM registration";
$sqlString .= " WHERE";
if ($inName <>") { $sqlString .=" lastName LIKE '%$inName%' AND"; }
if ($inUniqueID <>'") { $sqlString .=" id LIKE '%$inUniqueID%' AND"; }
if ($inEmail <>") { $sqlString .=" Email LIKE '%$inEmail%' AND"; }
$sqlString .= " itemSet = 1";
$sqlString .= " ORDER BY lastName DESC";
// Debugging - print $sqlString;
$result = mysql_query($sqlString);
$count = 0;
$dbName[] = $row[0];
$dbID[] = $row[1];
$dbPaymt[] = $row[2];
$dbEmail[] = $row[3];
$dbStatus[] = $row[4];
$rowColour = "#B9CAB1";
$count=0;
?> <br />
<div class="resultsalign" id="results">
<table width="750" border="0" align="left" cellpadding="0" cellspacing="0" id="tableresults">
<tr bgcolor="#FFFFCC">
<td width="125"><strong>Reference #</strong></td>
<td width="175"><strong>Name</strong></td>
<td width="200"><strong>Email</strong></td>
<td width="150"><strong>Status</strong></td>
<td width="100"><strong> </strong></td>
</tr>
<?php
while ($row = mysql_fetch_array($result)) {
?>
<tr style="background: #<?php print $rowColour; ?>; height:30px;">
<td width="125" valign="middle"><?php print $row[0]; ?></td>
<td width="175" valign="middle"><?php print $row[2] . " " . $row[3]; ?></td>
<td width="200" valign="middle"><?php print $row[1]; ?></td>
<td width="150" valign="middle"><?php print $row[5]; ?></td>
<td width="100" valign="middle"><a href="adminDetails.php?id=<?php echo $row[0]; ?>&pSN=AHC">Details</a></td>
</tr>
<?php
if ($rowColour == "BEDBBB") {$rowColour = "#B9CAB1";} else {$rowColour = "BEDBBB";}
} // END while ($row = mysql_fetch_array($result))
?> </table></div><?php
} // END if ($searchState <> "")
////////////////////END SEARCH //////////////////////////////////
?>
</td>
</tr>
<?php
} else {
include ($pageRoot . "includes/incPukeNow.php");
}
// if (empty($pukeNow))
// exit from content window and close site vehicle
include ($pageRoot . "siteFooter.php");
?>
Basic HTML to be maintained after release by stakeholder
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content=""/>
<meta name="keywords" content="" />
<meta name="author" content="" />
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
<title>West County Christian School</title>
<link rel="stylesheet" href="menu/menu.css" type="text/css" />
<script src="menu/menu.js" type="text/javascript"></script>
<style type="text/css">
body {
background-image: url();
background-repeat: no-repeat;
}
</style>
<link href="wccs/wccs02.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="wccs/wccsscripts.js"></script>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="top">
<div id="logo">
<div id="wccs_1" class="wccs02">
<div id="wccsow_1" class="wccsowrapper">
<div id="wccsw_1" class="wccswrapper">
<div id="wccsdv_1" class="wccsdv"><a class="wccslink" id="wccslk_1" title=""><img class="wccsimage" src="banner/44.png" alt="WCC School" name="wccsim_1" width="920" height="229" id="wccsim_1" /></a></div>
<div id="wccsdsw_1" class="wccsdesc_wrapper">
<div class="wccsdesc_close"><a id="wccsdsclose_1" href="javascript:;" title="Hide Description"><em>Hide</em></a></div>
<div id="wccsds_1" class="wccsdesc"> </div>
</div>
<div id="wccsdsopw_1" class="wccsdesc_open_wrapper">
<div id="wccsdsop_1" class="wccsdesc_open"><a id="wccsdsopen_1" href="javascript:;" title="Show Description"><em>Show</em></a></div>
</div>
</div>
</div>
<ul id="wccslist_1" class="wccslist">
<li><a href="banner/44.png">WCC School</a>
<div class="wccs_desc">WCC School description of image 1</div>
</li>
<li><a href="banner/33.png">WCC School</a>
<div class="wccs_desc">WCC School description of the second image</div>
</li>
<li><a href="banner/66.png">WCC School</a>
<div class="wccs_desc">School photo art class description of image goes here</div>
</li>
<li><a href="banner/77.png">WCC School</a>
<div class="wccs_desc">WCC School description of computer class image. This can have more text. </div>
</li>
<li><a href="banner/55.png">WCC School</a>
<div class="wccs_desc">WCC School description the last school play and details of the next one</div>
</li>
<li><a href="banner/22.png">WCC School</a>
<div class="wccs_desc">WCC School description of some of the sporting activities at the school</div>
</li>
<li><a href="banner/11.png">WCC School</a>
<div class="wccs_desc">WCC School description of image. This is a great place to showcase the school</div>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="wccsc1">
<div class="wccsc2">
<ul>
<li><a class="wccssub" href="#">Home</a>
<ul>
<li class="sfirst"><a href="index.html" target="_self">Welcome</a></li>
<li><a href="quick-facts.html" target="_self">Quick Facts</a></li>
<li><a href="testimonies.html" target="_self">Student Testimonies</a></li>
<li class="slast"><a href="afterwccs.html" target="_self">Life After WCCS</a></li>
</ul>
</li>
<li><a class="wccssub" href="#">About WCCS</a>
<ul>
<li class="sfirst"><a href="standards.html" target="_self">Academic Standards</a></li>
<li><a href="curriculum.html" target="_self">Curriculum</a></li>
<li><a href="mission.html" target="_self">Our Mission</a></li>
<li class="slast"><a href="faith.html" target="_self">Statement of Faith</a></li>
</ul>
</li>
<li><a class="wccssub" href="#">Enrollment</a>
<ul>
<li class="sfirst"><a href="apply.html" target="_self">Application Process</a></li>
<li><a href="tuition.html" target="_self">Tuition & Financing</a></li>
<li class="slast"><a href="enrollment-forms.html" target="_self">Forms</a></li>
</ul>
</li>
<li><a href="contact.html" target="_self">Contact Us</a></li>
<li><a class="wccssub" href="#">Visit WCCS</a>
<ul>
<li class="sfirst"><a href="map.html" target="_self">Map & Driving Directions</a></li>
<li><a href="visit.html" target="_self">Schedule a Visit</a></li>
<li class="slast"><a href="st-louis.html" target="_self">St. Louis Links</a></li>
</ul>
</li>
<li><a class="wccssub" href="#">Calendar</a>
<ul>
<li class="sfirst"><a href="calendar-1.html" target="_self">Calendar</a></li>
<li class="slast"><a href="calendar-2.html" target="_self">Calendar</a></li>
</ul>
</li>
<li><a class="wccssub" href="#">Administration</a>
<ul>
<li class="sfirst"><a href="board.html" target="_self">Board of Directors</a></li>
<li class="slast"><a href="staff.html" target="_self">Faculty & Staff</a></li>
</ul>
</li>
<li><a class="wccssub" href="#">Parents</a>
<ul>
<li class="sfirst"><a href="volunteering.html" target="_self">Volunteer Opportunities</a></li>
<li><a href="lunch.html" target="_self">Lunch Information</a></li>
<li><a href="fundraising.html" target="_self">Fundraising Opportunities</a></li>
<li class="slast"><a href="dress-code.html" target="_self">Dress Code</a></li>
</ul>
</li>
<li><a href="fundraising.html" target="_self">Fundraising</a></li>
</ul>
</div>
</div>
<br />
</div>
</div>
<div class="main" id="main-two-columns-left">
<div class="right" id="main-content">
<div class="section">
<div class="section-title">About WCCS - Statement of Faith</div>
<div class="section-content">
<div class="post">
<div class="post-title">
<h2 style="margin-bottom:22px;">We Believe:</h2>
</div>
<ul class="newsitems">
<li class="newsitems">The Bible to be the inspired, infallible, authoritative Word of God. </li>
<li class="newsitems">There is one God, eternally existent in three persons: the Father, the Son, and the Holy Spirit. </li>
<li class="newsitems">In the deity of our Lord Jesus Christ, in His virgin birth, sinless life, miracles, and vicarious and atoning death through His shed blood, in His resurrection and ascension to the right hand of the Father, and in His personal return to power and glory. </li>
<li class="newsitems">For the salvation of lost and sinful men; regeneration by the Holy Spirit is absolutely necessary. </li>
<li class="newsitems">In the present ministry of the Holy Spirit by whose indwelling the Christian is enabled to live a godly life. </li>
<li class="newsitems">In the resurrection of both the saved and the lost: that they are saved unto the resurrection of life, and that they are lost unto the resurrection of damnation. </li>
<li class="newsitems">Heaven and Hell are definite places. </li>
<li class="newsitems">In the spiritual unity of all believers in our Lord Jesus Christ. </li>
</ul>
</div>
<div class="separator"></div>
</div>
</div>
<div class="clear"> </div>
</div>
<div class="left sidebar" id="sidebar">
<div class="section">
<div class="title">Upcoming Events</div>
<div class="content">
<ul class="list">
<li>
<div class="left"><a href="#">First Day of School </a></div>
<div class="right">Aug 16</div>
<div class="clearer"> </div>
</li>
<li>
<div class="left"><a href="#">BUNKO Fundraiser!</a></div>
<div class="right">Oct 2</div>
<div class="clearer"> </div>
</li>
<li>
<div class="left"><a href="#">Fall Association Meeting<br />All Families are required to attend</a></div>
<div class="right">Oct 12</div>
<div class="clearer"> </div>
</li>
<li>
<div class="left"><a href="#">More Events</a></div>
</li>
</ul>
</div>
</div>
<div class="section">
<div class="section-title">Information</div>
<div class="section-content">
<ul class="list">
<li><span class="quiet">Mission & Ethos</span></li>
<li><span class="quiet">Visiting the School</span></li>
<li><span class="quiet">Contact Us</span></li>
<li><span class="quiet">Maps & Directions</span></li>
</ul>
</div>
</div>
<div class="section">
<div class="section-title">Faculty & Staff </div>
<div class="section-content">
<ul class="list">
<li><a href="#">Janet Gregory, Principal</a> <span class="quiet">- Director</span></li>
<li><a href="#">Kathy Salazar</a> <span class="quiet">- K</span></li>
<li><a href="#">Christina Platts</a> <span class="quiet">- G1</span></li>
<li><a href="#">Lori Gallman</a> <span class="quiet">- G2</span></li>
<li><a href="#">Amy Swedholm</a> <span class="quiet">- G3</span></li>
<li><a href="#">Fran Smith</a> <span class="quiet">- G4</span></li>
<li><a href="#">Monica Vedvig</a> <span class="quiet">- G5</span></li>
<li><a href="#">Susan Nelson</a> <span class="quiet">- G6</span></li>
<li><a href="#">Jessica Williams</a> <span class="quiet">- G7</span></li>
<li><a href="#">Jean Cunningham</a> <span class="quiet">- IT/Computers</span></li>
</ul>
</div>
</div>
</div>
</div>
<div class="clearer"> </div>
<div id="footer">
<div class="left" id="footer-left">
<p><img src="images/lunchsm.jpg" width="39" height="40" alt="Logo" />© WCC School. All rights Reserved</p>
<div class="clearer"> </div>
</div>
<div class="right" id="footer">
<p class="large"><a href="#"><img src="images/twitter.png" width="28" height="28" alt="Twitter" /> Follow the School</a> <span class="text-separator">|</span> <img src="images/blogger.png" width="28" height="28" alt="WCC School Blog" /><a href="#"> School Blog</a> <span class="text-separator">|</span> <a href="#"><img src="images/youtube.png" width="28" height="28" alt="WCC School on YouTube" /> WCCS on YouTube</a> </p>
</div>
<div class="clearer"> </div>
</div>
<div id="privacy">
<p class="quiet">Privacy Policy | Terms & Conditions | Alumni | Site Map | Back to Top</p>
<div class="clearer"> </div>
</div>
</div>
</body>
</html>
A small sample of hand coded SASS
@import '../../node_modules/font-awesome/scss/variables';
@import '../../node_modules/font-awesome/scss/icons';
@import '../../.tmp/sass/icons';
.custom-glyph {
display: inline-block;
font-family: 'tc-web' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
text-rendering: auto;
// Better Font Rendering
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.glyph-2x {
font-size: 2em;
@include break(0, 767px) {font-size: 1.0em};
@include break(768px, 1199px) {font-size: 1.5em};
@include break(1200px) {font-size: 2em};
}
%Usual-Base {
font-weight: normal;
}
%Usual-BoldItalic {
@extend %Usual-Base;
font-family: Usual-BoldItalic, Arial;
}
%Usual-Bold {
@extend %Usual-Base; font-family: Usual-Bold, Arial;
}
%Usual-Light {
@extend %Usual-Base;
font-family: Usual-Light, Arial;
}
body {
margin: 0;
padding: 0;
}
html {
background-color: $background;
font-size: 62.5%;
font-family: Usual-Light, Arial;
}
.wrap {
background-color: $white;
width: calc(100% - 8px);
max-width: 1366px;
margin: 0 auto 2rem auto;
min-width: 270px;
}
.youtube-frame-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
width: 100%;
float: left;
@include break(0, 1199px) {
.youtube-frame-container {
float: none;
margin-right: auto;
}
}
}
#page-title {
h1 {
@extend %Usual-Regular;
font-size: 40px;
@include break(668px, 950px) {margin-left: 7px};
}
}
%body-copy {
@extend %Usual-Light;
font-size: $p;
line-height: 1.3;
@include break(0, 667px) {font-size: $p-tab-phone;};
@include break(668px, 950px) {font-size: $p-tab;};
}
.text-indent {
@extend %body-copy-container;
margin: 0 2%;
h4 {
@extend %Usual-Bold;
font-size: 24px;
@include break(0, 667px) {font-size: 14px;}
color: $tc-red;
}
}
// to use a clearfix add the following to the necessary class - @extend %clearfix;
%clearfix {
&: after {
content: "";
display: table;
clear: both;
}
}
%p-large {
font-size: 30px;
margin-top: 6px;
@extend %Usual-Light;
@include break(668px, 950px) {font-size: 24px;}
@include break(0, 667px) {font-size: 14px;}
}
.p-large {@extend %p-large;}
.p-regular {
font-size: $p !important;
line-height: 1.3;
@include break(668px, 950px) {font-size: $p-tab !important;}
@include break(0, 667px) {font-size: $p-tab-phone !important;}
}
div.first-p-regular p:first-of-type {
font-size: $p !important;
line-height: 1.3;
@include break(668px, 950px) {font-size: $p-tab !important;}
@include break(0, 667px) {font-size: $p-tab-phone !important;}
}
// Main Content Layout
.divider20 {margin-top: 20px;}
.divider30 {margin-top: 30px;}
.no-margin-top {margin-top: 0;}
.g-recaptcha {
@include break(0px, 767px) {
transform: scale(0.77);
-webkit-transform: scale(0.77);
transform-origin: 0 0;
-webkit-transform-origin: 0 0;
}
}
blockquote {
font-size: $p;
line-height: 24px;
@extend %Usual-Regular;
@include break(0, 767px) {
font-size: $blog-article-text-s;
line-height: 16px;
margin-bottom: 4px;
}
}
// Email Modal
.modal-box {
display: none;
position: absolute;
z-index: 1000;
width: 66%;
background: white;
border-bottom: 1px solid #aaa;
border-radius: 4px;
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 0, 0, 0.1);
background-clip: padding-box;
}
.modal-box header,
.modal-box .modal-header {
padding: 1.25em 1.5em;
border-bottom: 1px solid #ddd;
}
.modal-overlay {
opacity: 0;
filter: alpha(opacity=0);
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 900;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3) !important;
}
//.timeline-Widget {background-color: aquamarine;}
#twitter-widget-0 {height: 255px !important;}
.maroonh2 {
p {
a {font-weight: 300}
}
h2 {
a {
font-weight: normal;
}
font-family: Usual-Bold;
font-size: $blog-landing-article-text;
color: $tc-red!important;
@include break(0, 767px) {
font-size: 16px;
margin-top: 12px;
}
@include break(768px, 1199px) {
font-size: $blog-landing-article-text-s;
}
margin-bottom: 0;
}
}
LAU Code Example
local STATS_LIBRARY = require(script:GetCustomProperty("StatsLibrary"))
local RESOURCE = script:GetCustomProperty("Resource")
local LEADERBOARD_REFERENCE = script:GetCustomProperty("LeaderboardReference")
function OnStatChanged(player, statId, value)
if statId == RESOURCE then
Leaderboards.SubmitPlayerScore(LEADERBOARD_REFERENCE, player, value)
end
end
function OnPlayerJoined(player)
player.diedEvent:Connect(OnPlayerDied)
Task.Wait()
Leaderboards.SubmitPlayerScore(LEADERBOARD_REFERENCE, player, STATS_LIBRARY.GetStat(player, RESOURCE))
end
Game.playerJoinedEvent:Connect(OnPlayerJoined)
Events.Connect("StatChangedEvent", OnStatChanged)
function OnPlayerJoined(player)
player.resourceChangedEvent:Connect(OnResourceChanged)
local data = Storage.GetPlayerData(player)
-- In case it's the first time for this player we use default values 0 and 1
local xp = data["xp"] or 0
local level = data["level"] or 0
local quizscores = data["quizscores"] or 0
-- Each player joins they gain 1 XP.
xp = xp + 1
level = level + 1
player:SetResource("xp", xp)
player:SetResource("level", level)
player:SetResource("quizscores", quizscores)
print("Player " .. player.name .. " has scored " .. quizscores)
end
function OnResourceChanged(player, resName, resValue)
if (resName == "level") then
local data = Storage.GetPlayerData(player)
data[resName] = resValue
local resultCode,errorMessage = Storage.SetPlayerData(player, data)
end
if (resName == "xp") then
local data = Storage.GetPlayerData(player)
data[resName] = resValue
local resultCode,errorMessage = Storage.SetPlayerData(player, data)
end
if (resName =="quizscores",) then
local data = Storage.GetPlayerData(player)
data[resName] = resValue
local resultCode,errorMessage = Storage.SetPlayerData(player, data)
end
end
function OnPlayerDied(player, dmg)
local data = Storage.GetPlayerData(dmg.sourcePlayer)
local quizscores = data["quizscores",]
print(quizscores)
if Object.IsValid(dmg.sourcePlayer) then
dmg.sourcePlayer:AddResource("quizscores",, 1)
else
print(player.name .. " what happened?")
end
player.resourceChangedEvent:Connect(OnResourceChanged)
end
Game.playerJoinedEvent:Connect(OnPlayerJoined)