db_process_query("select",$rgsTbl,"*","none",$cndValue,"none"); $sRsltSet_rgs = $db_CMS->dbRsltSet ; if ($db_CMS->dbNumRow > 0) { //ok these are people registered.. now find out details about them.. $rowCount = 0; // initialize a counter.. while ($sCurRow_rgs = $db_CMS->db_fetch_array($sRsltSet_rgs)) { $rgsID = $sCurRow_rgs["rgsID"]; $anbID = $sCurRow_rgs["anbID"]; $pymID = $sCurRow_rgs["pymID"]; $cnfID = $sCurRow_rgs["cnfID"]; // get the personal details of that registration $db_CMS->db_process_query("select",$anbTbl,"*","none","anbID = '$anbID'","none"); $sRsltSet_anb = $db_CMS->dbRsltSet; $sCurRow_anb = $db_CMS->db_fetch_array($sRsltSet_anb); // get the payment details of that conference - actually only the payment mode.. $db_CMS->db_process_query("select",$pymTbl,"*","none","pymID = '$pymID'","none"); $sRsltSet_pym = $db_CMS->dbRsltSet; $sCurRow_pym = $db_CMS->db_fetch_array($sRsltSet_pym); switch ($sCurRow_pym["pymMethod"]) { case "cmt" : $pymMethod = "committee"; break; case "crd" : $pymMethod = "credit card"; break; case "cbd" : $pymMethod = "cash/bank draft"; break; case "inv" : $pymMethod = "invoice"; break; } switch ($sCurRow_rgs["ctgID"]) { case "umc2kFul" : $ctgID = "Full"; break; case "umc2kStd" : $ctgID = "Student"; break; } // now lets go through the orderlines of this person and find the amounts.. $totalCost = 0; // initialize total cost to 0. $xtraDinners = 0; $xtraProceedings = 0; $db_CMS->db_process_query("select",$odlTbl,"*","none","rgsID = '$rgsID'","none"); $sRsltSet_odl = $db_CMS->dbRsltSet; while ($sCurRow_odl = $db_CMS->db_fetch_array($sRsltSet_odl)) { if (($sCurRow_odl["odlName"] == "Full Registration") || ($sCurRow_odl["odlName"] == "Student Registration")) { $totalCost = $totalCost + $sCurRow_odl["odlPrice"]; } else { if ($sCurRow_odl["odlName"] == "Dinner") { $totalCost = $totalCost + ($sCurRow_odl["odlPrice"] * $sCurRow_odl["odlOrderedAmount"]); $xtraDinners += 1; } else { if ($sCurRow_odl["odlName"] == "Proceeding") { $totalCost = $totalCost + ($sCurRow_odl["odlPrice"] * $sCurRow_odl["odlOrderedAmount"]); $xtraProceedings += 1; } } } } // list of column names to be displayed.. $colValue = array("Name","Address","Email","RegType", "Extra Dinner", "Extra Proceeding", "Cost", "Payment Method","View"); $rowValue[$rowCount][$colValue[0]] = $sCurRow_anb["anbTitle"]." ".$sCurRow_anb["anbFName"]." ".$sCurRow_anb["anbLName"]; $rowValue[$rowCount][$colValue[1]] = $sCurRow_anb["anbAddr"]; $rowValue[$rowCount][$colValue[2]] = "".$sCurRow_anb["anbEmail"]; $rowValue[$rowCount][$colValue[3]] = $ctgID; $rowValue[$rowCount][$colValue[4]] = $xtraDinners; $rowValue[$rowCount][$colValue[5]] = $xtraProceedings; $rowValue[$rowCount][$colValue[6]] = "$".$totalCost; $rowValue[$rowCount][$colValue[7]] = $pymMethod; $rowValue[$rowCount][$colValue[8]] = ""; $rowCount++; } } else { echo "no people registered"; exit(); } // php codes ends .............................................................................. ?>
Participant Fees Summary
"; // create the column names... for ($count=0;$count<$colCount;$count++) { echo ""; } echo ""; $rowCount = count($rowValue); // get the number of columns. for ($countX=0;$countX<$rowCount;$countX++) { echo ""; for ($countY=0;$countY<$colCount;$countY++) { echo ""; } echo ""; } // php code ends here................................................... ?>
"; echo "$colValue[$count]"; echo "
"; echo "".$rowValue[$countX][$colValue[$countY]].""; echo "