db_process_query("select",$anbTbl,"*","none","athUserName = '$athUserName'","none"); $sRsltSet_anb = $db_CMS->dbRsltSet; //Decide whether a participant exists given the login name "$participantLogin" if($db_CMS->dbNumRow == 0){ //Participant does not exist // php code ends here.............................................. ?>
No such participant exists!!!
db_fetch_array($sRsltSet_anb); //Loading personal details... $anbID = $sCurRow_anb["anbID"]; $anbTitle = $sCurRow_anb["anbTitle"]; $anbFName = $sCurRow_anb["anbFName"]; $anbLName = $sCurRow_anb["anbLName"]; $anbAddr = $sCurRow_anb["anbAddr"]; $anbPCode = $sCurRow_anb["anbPCode"]; $anbCntry = $sCurRow_anb["anbCntry"]; $anbEmail = $sCurRow_anb["anbEmail"]; $anbPhone = $sCurRow_anb["anbPhone"]; $anbFax = $sCurRow_anb["anbFax"]; //Select the participant's registration to get the conference name and registration category $db_CMS->db_process_query("select",$rgsTbl,"*","none","anbID = '$anbID'","none"); $sRsltSet_rgs = $db_CMS->dbRsltSet; $sCurRow_rgs = $db_CMS->db_fetch_array($sRsltSet_rgs); $cnfID = $sCurRow_rgs["cnfID"]; $ctgID = $sCurRow_rgs["ctgID"]; //Get the conference name $cnfName = $cnfID; //Get the registration category $db_CMS->db_process_query("select",$ctgTbl,"*","none","ctgID = '$ctgID'","none"); $sRsltSet_ctg = $db_CMS->dbRsltSet; $sCurRow_ctg = $db_CMS->db_fetch_array($sRsltSet_ctg); $ctgName = $sCurRow_ctg["ctgName"]; // php code ends here.............................................. ?> db_process_query("select",$pymTbl,"*","none","pymID = '$pymID'","none"); $sRsltSet_pym = $db_CMS->dbRsltSet; $sCurRow_pym = $db_CMS->db_fetch_array($sRsltSet_pym); //Loading payment details.... $pymCardType = $sCurRow_pym["pymCardType"]; $pymMethod = $sCurRow_pym["pymMethod"]; $pymCardHolderName = $sCurRow_pym["pymCardHolderName"]; $pymCardNumber = $sCurRow_pym["pymCardNumber"]; $pymCardExpiryDate = $sCurRow_pym["pymCardExpiryDate"]; $pymNote = $sCurRow_pym["pymNote"]; $pymCardStatus = $sCurRow_pym["pymCardStatus"]; //Determine card type switch ($pymCardType) { case "visa" : $pymCardTypee = "Visa"; break; case "mastercard" : $pymCardTypee = "Master Card"; break; case "americanexpress" : $pymCardTypee = "American Express"; break; } //Determine payment method switch ($pymMethod) { case "crd" : $pymMethode = "credit card"; break; case "cbd" : $pymMethode = "cheque/bank draft by mail"; break; case "inv" : $pymMethode = "invoice"; break; case "cmt" : $pymMethode = "committee member"; break; default : $pymMethode = "none"; } // php code ends here.............................................. ?>
I*N*V*O*I*C*E
Second International Conference on
UNCONVENTIONAL MODELS OF COMPUTATION
13-16 December 2000, Brussels, Belgium
Participant Details
Title:
First Name:
Last Name:
Address:
Country:
PostCode:
E-mail:
Telephone:
Fax:
Conference attended:
Registration:
Payment Details
Payment Type:*
Type of card:
Name on card:
Card number:
Expiry date:
Special Payment Notes:

db_process_query("select",$rgsTbl,"*","none","anbID = '$anbID'","none"); $sRsltSet_rgs = $db_CMS->dbRsltSet; $sCurRow_rgs = $db_CMS->db_fetch_array($sRsltSet_rgs); //Get the Participant's regisration ID $rgsID = $sCurRow_rgs["rgsID"]; //Using the participant's registration ID "$participantRegID" to retrieve a list of existing transactions $db_CMS->db_process_query("select",$odlTbl,"*","none","rgsID = '$rgsID'","none"); $sRsltSet_odl = $db_CMS->dbRsltSet; $totalNumberOfInvLines = $db_CMS->dbNumRow; //This loads the invoiceline numbers, $invLinesToDisplay[] collects them for those lines that the //user wishes to display for($i=0;$i<$totalNumberOfInvLines;$i++) { if ($HTTP_POST_VARS["show".$i] != "") { $invLinesToDisplay[] = $HTTP_POST_VARS["show".$i]; } } //This string is going to gobble up a list of transaction ID's $invLinesToShowString = ""; //Populating the string above using the $invLinesToDisplay array populated above for($i = 0; $idb_process_query("delete",$odlTbl,"","","odlID = '".$invLinesToDelete[$i]."'",""); } // php code ends here.............................................. ?> dbNumRow > 0) { // initialize a counter.. $rowCount = 0; // Set up the column headings $colValue = array("ItemID","Date","Name","Description","Dr/Cr","Status","Qty","Cost(\$US)","AmountDR(\$US)","AmountCR(\$US)","Show/Hide/Delete"); //Show a selective view of the invoice if the user has asked to shrink the invoice. if (($invLinesToShowString != "") && ($HTTP_POST_VARS["statementAction"]=="shrink")){ while ($sCurRow_odl = $db_CMS->db_fetch_array($sRsltSet_odl)) { $odlID = $sCurRow_odl["odlID"]; for($j = 0; $j Del"; $rowCount++; break; } }//for }//while } //Show everything on the invoice else{ while ($sCurRow_odl = $db_CMS->db_fetch_array($sRsltSet_odl)) { $odlID = $sCurRow_odl["odlID"]; for ($i = 0; $i<9; $i++) { $rowValue[$rowCount][$colValue[$i]] = " "; } // ok store the respective values... $rowValue[$rowCount][$colValue[0]] = $sCurRow_odl["odlID"]; $rowValue[$rowCount][$colValue[1]] = $sCurRow_odl["odlStartDate"]; $rowValue[$rowCount][$colValue[2]] = $sCurRow_odl["odlName"]; $rowValue[$rowCount][$colValue[3]] = $sCurRow_odl["odlDescription"]; $rowValue[$rowCount][$colValue[4]] = $sCurRow_odl["odlEntryType"]; $rowValue[$rowCount][$colValue[5]] = $sCurRow_odl["odlStatus"]; $rowValue[$rowCount][$colValue[6]] = $sCurRow_odl["odlOrderedAmount"]; $rowValue[$rowCount][$colValue[7]] = $sCurRow_odl["odlPrice"]; //Getting the amount for this particular transaction & formatting the amount $currentAmount = (float)(($sCurRow_odl["odlOrderedAmount"]*$sCurRow_odl["odlPrice"])); $testAmount = number_format($currentAmount,2,".",","); //If it happens to be a debit transaction if($sCurRow_odl["odlEntryType"]=="Dr"){ $rowValue[$rowCount][$colValue[8]] = $testAmount; $rowValue[$rowCount][$colValue[9]] = " "; $totalDR += $currentAmount; } //else it must be a credit transaction else{ $rowValue[$rowCount][$colValue[8]] = " "; $rowValue[$rowCount][$colValue[9]] = $testAmount; $totalCR += $currentAmount; } //Getting the names for the "Show" & "Delete" check boxes for selective display of transactions and multiple invoiceline deletion $showItemName = "show".$rowCount; $del = "delete".$rowCount; //Setting their names now.. $rowValue[$rowCount][$colValue[10]] = "Show Del"; $rowCount++; }//while }//else (($invLinesToShowString != "") && ($HTTP_POST_VARS["statementAction"]=="")) }//if ($db_CMS->dbNumRow > 0) //Finished with $array now $array = null; //Calculating end balance.... $endBalanceDate = date("Y-m-d",time()); //Deciding whether it is a debit or credit balance if($totalCR>$totalDR){ $endBalance = $totalCR - $totalDR; $endBalanceStatus = "Credit Balance"; } else if($totalDR>$totalCR){ $endBalance = $totalDR - $totalCR; $endBalanceStatus = "Debit Balance"; } else{ $endBalanceStatus = "Account cleared"; } //Storing the balance line into the 2 dimensional array $rowValue[][] $rowValue[$rowCount][$colValue[0]] = " "; $rowValue[$rowCount][$colValue[1]] = $endBalanceDate; $rowValue[$rowCount][$colValue[2]] = $endBalanceStatus; $rowValue[$rowCount][$colValue[3]] = " "; $rowValue[$rowCount][$colValue[4]] = " "; $rowValue[$rowCount][$colValue[5]] = " "; $rowValue[$rowCount][$colValue[6]] = " "; $rowValue[$rowCount][$colValue[7]] = " "; //Formating and storing the end balance $testAmount = number_format($endBalance,2,".",","); if($totalDR>$totalCR){ $rowValue[$rowCount][$colValue[8]] = " " .$testAmount; $rowValue[$rowCount][$colValue[9]] = " "; } else{ $rowValue[$rowCount][$colValue[8]] = " "; $rowValue[$rowCount][$colValue[9]] = " " .$testAmount; } $rowValue[$rowCount][$colValue[10]] = " "; //This is the beginning of the section holding the following: // The "Condense","Expand","Delete" function buttons echo "
"; // get the number of columns. $colCount = count($colValue); echo ""; echo ""; // implanting the coloumn names... for ($count=0;$count<$colCount;$count++) { echo ""; } echo ""; // Moving down the table and filling in the transaction details. $rowCount = count($rowValue); // get the number of columns. for ($countX=0;$countX<$rowCount;$countX++) { if($countX==($rowCount-1)){ echo ""; } else{ echo ""; } for ($countY=0;$countY<$colCount;$countY++) { if ($countY == 7 || $countY == 8 || $countY == 9){ echo ""; } echo ""; } echo "
"; echo "$colValue[$count]"; echo "
"; } else{ echo ""; } echo "".$rowValue[$countX][$colValue[$countY]].""; echo "
"; echo ""; echo ""; echo "
"; echo ""; //This section of the interfaces allows the user to: //Shrink the statement //Expand the statement //Print the statement //Delete selected lines of transactions echo ""; echo ""; echo "
"; echo "With the statement I want to: "; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; //ends FORM "SUBMITFORMSHOWHIDEDEL" //This calls the method that contructs the "Add traction" panel on the page. addTransaction($rgsID); } //This method contructs the "Add traction" panel on the page. function addTransaction($rgsID){ //Form result retriever global $HTTP_POST_VARS; //User login global $athUserName; //DataRequestor object global $db_CMS; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; ?> "; echo ""; echo ""; echo ""; echo "
"; echo "

Add/Modify a transaction

"; echo "
"; echo "

Hint: \"Leave the \"Date\" field blank to use today's date\"

"; echo "
"; echo "

Hint: \"Only use the \"ModifyItem(ID)\" field to modify an existing order line item\"

"; echo "
"; echo ""; echo "ModifyItem(ID):
"; echo ""; echo "
"; echo "
"; echo ""; echo "Date(Optional):
"; echo ""; echo "
"; echo "
"; echo ""; echo "TransactionType:
"; //Pull down menu showing various pre-defined registration echo ""; echo "
"; echo "
"; echo ""; echo "Description:
"; echo ""; echo "
"; echo "
"; echo ""; echo "Cost:
"; echo ""; echo "
"; echo "
"; echo ""; echo "Qty:
"; echo ""; echo "
"; echo "
"; echo ""; echo "Status:
"; echo ""; echo "
"; echo "
"; echo "Debit/Credit:
"; echo ""; echo "
"; echo "
With the above item I want to:
"; ?>
"; //ends form "SUBMITADDITION" } ?>