ROYALTYIPN_LISTENER.PHP
$ITEM_NAME = Request.Form("item_name");
$CURRENT_BALANCE = Request.Form("amount");
$SQLROYALTY =" SELECT * FROM ROYALTYCREDITOR ";
$FROYALTYCREDITOR = mysql_query( $SQLROYALTY, $CON );
while ( $ROWS = mysql_fetch_object( $FROYALTYCREDITOR )) {
$ROYALTY_CODE = $ROWS->ROYALTY_CODE;
$ROYALTYCREDITOR = $ROWS->ROYALTYCREDITOR;
$POSITION = strpos($ITEM_NAME, $ROYALTYCREDITOR);
if ( $POSITION == 0 ) {
}
else {
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
}
}
if ( $ROYALTYCREDITOR == "DISTRIBUTOR" ) {
$SQLDISTRIBUTOR=" SELECT * FROM DISTRIBUTOR ";
}
if ( $ROYALTYCREDITOR == "PRODUCER" ) {
$SQLPRODUCER =" SELECT * FROM PRODUCER "
$SQLPRODUCER.=” WHERE strpos($item_name, PRODUCERNAM) !=”
$SQLPRODUCER.= $ZERO;
$FPRODUCER = myql_query ( $SQLPRODUCER , $CON );
$anymatch= mysql_num_rows($FPRODUCER);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FPRODUCER )) {
$ACCOUNT_NUMBER = $CREDITOR->PRODUCERCOD;
}
}
if ( $ROYALTYCREDITOR == "WRITER" ) {
$ZERO = 0;
$SQLWRITER =" SELECT * FROM WRITER "
$SQLWRITER.=” WHERE strpos($item_name, WRITERNAM) !=”
$SQLWRITER.= $ZERO;
$FWRITER = mysql_query ( $SQLWRITER , $CON );
$anymatch= mysql_num_rows($FWRITER);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FWRITER )) {
$ACCOUNT_NUMBER = $CREDITOR->WRITERCOD;
}
}
if ( $ROYALTYCREDITOR == "ARTIST" ) {
$SQLARTIST=" SELECT * FROM ARTIST ";
$SQLARTIST.=” WHERE strpos($item_name, ARTNAM) !=”
$SQLARTIST.= $ZERO;
$FARTIST = myql_query ( $SQLARTIST , $CON );
$anymatch= mysql_num_rows($FARTIST);
if ( $anymatch == 0 ) {
}
else {
$CREDITOR = mysql_fetch_object ( $FARTIST )) {
$ACCOUNT_NUMBER = $CREDITOR->ARTCOD;
}
}
$SQLCATEGORY = " SELECT * FROM ALBUMSINGLE ";
$FALBUMSINGLE= mysql_query ( $SQLCATEGORY, $CON );
while ( $CATEGORY = mysql_fetch_object($FALBUMSINGLE)) {
$CODE = $CATEGORY->CODE;
$DESCRIPTION = $CATEGORY->DESCRIPTION;
$POSITION = strpos($ITEM_NAME, $DESCRIPTION)
if ( $POSITION == 0 ) {
}
else {
HHCODE =HCODE
HHDESCRIPTION =HDESCRIPTION
}
}
if ( $DESCRIPTION == "ALBUM" ) {
$SQLALBUM =" SELECT * FROM ALBUM ";
$SQLALBUM.=” WHERE strpos($item_name, ALBUMNAM) !=”
$SQLALBUM.= $ZERO;
$FALBUM = myql_query ( $SQLALBUM , $CON );
$anymatch= mysql_num_rows($FALBUM);
if ( $anymatch == 0 ) {
}
else {
$RECORD = mysql_fetch_object ( $FALBUM );
$ALBUMCOD = $RECORD->ALBUMCOD;
}
}
if ( $DESCRIPTION == "SINGLE" ) {
$SQLSONG =" SELECT * FROM SONGFIL ";
$SQLSONG .=” WHERE strpos($item_name, SONGTITLE) !=”
$SQLSONG .= $ZERO;
$FSONGFIL = myql_query ( $SQLSONG , $CON );
$anymatch= mysql_num_rows($FALBUM);
if ( $anymatch == 0 ) {
}
else {
$RECORD = mysql_fetch_object ( $FSONGFIL );
$SONGCOD = $RECORD->SONGCOD;
}
}
$SQLNUMBER =" SELECT * FROM NUMBERS ";
$FNUMBERS = mysql_query( $SQLNUMBER, $CON );
$NUMBER = mysql_fetch_object( $FNUMBERS );
$TRNSNO = $NUMBER->TRNSNO;
$TRNSNO = $TRNSNO + 1;
$NUMBSQL =" UPDATE NUMBERS SET ";
$NUMBSQL .=" TRNSNO=" . $TRNSNO;
$NUMBSQL .=" WHERE CMPID=" & $CMPID;
$TRNSTYPE = "R";
$SQLSLEDGE=" INSERT INTO ROYALTYLEDGER VALUES " ;
$SQLSLEDGE= "(" ;
$SQLSLEDGE= $TRNSNO . "," ;
$SQLSLEDGE= $TRNSDAT . "," ;
$SQLSLEDGE= $ACCOUNT_NUMBER . "," ;
$SQLSLEDGE= $TRNSTYPE . "," ;
$SQLSLEDGE= $CODE . "," ;
$SQLSLEDGE= $ALBUMCOD . "," ;
$SQLSLEDGE= $CURRENT_BALANCE . ")" ;
No comments:
Post a Comment