82. File Comparison Report

Produced on Mon May 12 13:04:44 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

82.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\aff finance.php Wed Oct 17 08:48:18 2007 UTC
2 Dolphin-v.6.1.0\aff finance.php Sat Apr 26 08:19:14 2008 UTC

82.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 1044
Changed 0 0
Inserted 0 0
Removed 1 4

82.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

82.4 Active regular expressions

No regular expressions were active.

82.5 Comparison detail

1   <?   1   <?
2     2  
3   /********* ********** ********** ********** ********** ********** ********** ******   3   /********* ********** ********** ********** ********** ********** ********** ******
4   *                              D olphin Sma rt Communi ty Builder   4   *                              D olphin Sma rt Communi ty Builder
5   *                                 --------- --------   5   *                                 --------- --------
6   *     begi n                 : M on Mar 23  2006   6   *     begi n                 : M on Mar 23  2006
7   *     copy right             : ( C) 2006 Bo onEx Group   7   *     copy right             : ( C) 2006 Bo onEx Group
8   *     webs ite               : h ttp://www. boonex.com /   8   *     webs ite               : h ttp://www. boonex.com /
9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder   9   * This fil e is part  of Dolphin  - Smart C ommunity B uilder
10   *   10   *
11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License.    11   * Dolphin  is free so ftware. Th is work is  licensed  under a Cr eative Com mons Attri bution 3.0  License. 
12   * http://c reativecom mons.org/l icenses/by /3.0/   12   * http://c reativecom mons.org/l icenses/by /3.0/
13   *   13   *
14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;   14   * Dolphin  is distrib uted in th e hope tha t it will  be useful,  but WITHO UT ANY WAR RANTY;
15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.   15   * without  even the i mplied war ranty of   MERCHANTAB ILITY or F ITNESS FOR  A PARTICU LAR PURPOS E.
16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details.    16   * See the  Creative C ommons Att ribution 3 .0 License  for more  details. 
17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin   17   * You shou ld have re ceived a c opy of the  Creative  Commons At tribution  3.0 Licens e along wi th Dolphin
18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m   18   * see lice nse.txt fi le; if not , write to  marketing @boonex.co m
19   ********** ********** ********** ********** ********** ********** ********** *****/   19   ********** ********** ********** ********** ********** ********** ********** *****/
20     20  
21   require_on ce( '../in c/header.i nc.php' );   21   require_on ce( '../in c/header.i nc.php' );
22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );   22   require_on ce( BX_DIR ECTORY_PAT H_INC . 'd esign.inc. php' );
23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );   23   require_on ce( BX_DIR ECTORY_PAT H_INC . 'p rofiles.in c.php' );
24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );   24   require_on ce( BX_DIR ECTORY_PAT H_INC . 'a dmin_desig n.inc.php'  );
25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'c heckout.in c.php' );   25   require_on ce( BX_DIR ECTORY_PAT H_INC . 'c heckout.in c.php' );
26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );   26   require_on ce( BX_DIR ECTORY_PAT H_INC . 'u tils.inc.p hp' );
27     27  
28   $sHead = ' ';   28   $sHead = ' ';
29   if (getPar am("enable _aff") !=  'on')   29   if (getPar am("enable _aff") !=  'on')
30   {   30   {
31       $sHead  = "(<span  style=\"c olor:red;\ ">"._t("_a ffiliate_s ystem_was_ disabled") ."</span>) ";   31       $sHead  = "(<span  style=\"c olor:red;\ ">"._t("_a ffiliate_s ystem_was_ disabled") ."</span>) ";
32   }   32   }
33     33  
34   if ( !($lo gged['aff' ] = member _auth( 2,  false)) )   34   if ( !($lo gged['aff' ] = member _auth( 2,  false)) )
35       $logge d['admin']  = member_ auth( 1 );   35       $logge d['admin']  = member_ auth( 1 );
36     36  
37   $AFF = $_C OOKIE['aff ID'] > 0 ?  $_COOKIE[ 'affID'] :  ( $_GET[' affID'] >  0 ? $_GET[ 'affID'] :  $_POST['a ffID'] );   37   $AFF = $_C OOKIE['aff ID'] > 0 ?  $_COOKIE[ 'affID'] :  ( $_GET[' affID'] >  0 ? $_GET[ 'affID'] :  $_POST['a ffID'] );
38     38  
39   if ( !strs tr($AFF, " @") )   39   if ( !strs tr($AFF, " @") )
40   {   40   {
41       $affID  = (int)$A FF;   41       $affID  = (int)$A FF;
42       $aff_a rr = db_ar r("SELECT  `Percent`  FROM `aff`  WHERE `ID ` = $affID ");   42       $aff_a rr = db_ar r("SELECT  `Percent`  FROM `aff`  WHERE `ID ` = $affID ");
43   }   43   }
44   else   44   else
45   {   45   {
46       $AFF =  process_d b_input($A FF);   46       $AFF =  process_d b_input($A FF);
47       $aff_a rr = db_ar r("SELECT  `ID`, `Per cent` FROM  `aff` WHE RE `email`  = '$AFF'" );   47       $aff_a rr = db_ar r("SELECT  `ID`, `Per cent` FROM  `aff` WHE RE `email`  = '$AFF'" );
48       $affID  = (int)$a ff_arr['ID '];   48       $affID  = (int)$a ff_arr['ID '];
49   }   49   }
50     50  
51   $percent =  (float)$a ff_arr['Pe rcent'] /  100.0;   51   $percent =  (float)$a ff_arr['Pe rcent'] /  100.0;
52   $tr = arra y();   52   $tr = arra y();
53   $tr_query  = "";   53   $tr_query  = "";
54   $order_num _disabled  = 'disable d="disable d"';   54   $order_num _disabled  = 'disable d="disable d"';
55   $last_disa bled = 'di sabled="di sabled"';   55   $last_disa bled = 'di sabled="di sabled"';
56   $date_disa bled = 'di sabled="di sabled"';   56   $date_disa bled = 'di sabled="di sabled"';
57   $between_d isabled =  'disabled= "disabled" ';   57   $between_d isabled =  'disabled= "disabled" ';
58     58  
59   switch ( $ _POST['cal culation_t ype'] )   59   switch ( $ _POST['cal culation_t ype'] )
60   {   60   {
61       case ' total':   61       case ' total':
62           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND `Status ` = 'appro ved' ORDER  BY `Date`  DESC";   62           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND `Status ` = 'appro ved' ORDER  BY `Date`  DESC";
63           br eak;   63           br eak;
64     64  
65       case ' order_num' :   65       case ' order_num' :
66           $o rder_id =  process_db _input( $_ POST['tr_o rder_num']  );   66           $o rder_id =  process_db _input( $_ POST['tr_o rder_num']  );
67           $t r['order_n um'] = pro cess_pass_ data( $_PO ST['tr_ord er_num'] ) ;   67           $t r['order_n um'] = pro cess_pass_ data( $_PO ST['tr_ord er_num'] ) ;
68           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND `gtwTra nsactionID ` = '$orde r_id' AND  `Status` =  'approved ' ORDER BY  `Date` DE SC";   68           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND `gtwTra nsactionID ` = '$orde r_id' AND  `Status` =  'approved ' ORDER BY  `Date` DE SC";
69           $o rder_num_d isabled =  "";   69           $o rder_num_d isabled =  "";
70           br eak;   70           br eak;
71     71  
72       case ' last':   72       case ' last':
73           $l ast_days =  (int)$_PO ST['tr_las t_days'];   73           $l ast_days =  (int)$_PO ST['tr_las t_days'];
74           $t r['last_da ys'] = pro cess_pass_ data( $_PO ST['tr_las t_days'] ) ;   74           $t r['last_da ys'] = pro cess_pass_ data( $_PO ST['tr_las t_days'] ) ;
75           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND ( TO_DA YS( NOW()  ) - TO_DAY S( `Date`  ) <= $last _days ) AN D `Status`  = 'approv ed' ORDER  BY `Date`  DESC";   75           $t r_query =  "SELECT `I D`, `IDMem ber`, `IDP rovider`,  `gtwTransa ctionID`,  DATE_FORMA T(`Date`,   '$date_fo rmat' ) AS  'Date', ` Amount`, ` Currency`,  `Status`,  `Data`, ` Descriptio n`, `Note`  FROM `Tra nsactions`  INNER JOI N `aff_mem bers` ON ( `idProfile ` = `IDMem ber`) WHER E `idAff`  = $affID A ND ( TO_DA YS( NOW()  ) - TO_DAY S( `Date`  ) <= $last _days ) AN D `Status`  = 'approv ed' ORDER  BY `Date`  DESC";
76           $l ast_disabl ed = "";   76           $l ast_disabl ed = "";
77           br eak;   77           br eak;
78     78  
79       case ' date':   79       case ' date':
80           $e xact_date  = strtotim e( $_POST[ 'tr_exact_ date'] );   80           $e xact_date  = strtotim e( $_POST[ 'tr_exact_ date'] );
81           $t r['exact_d ate'] = pr ocess_pass _data( $_P OST['tr_ex act_date']  );   81           $t r['exact_d ate'] = pr ocess_pass _data( $_P OST['tr_ex act_date']  );
82           if  ( $exact_ date != -1  )   82           if  ( $exact_ date != -1  )
83           {   83           {
84                $tr_quer y = "SELEC T `ID`, `I DMember`,  `IDProvide r`, `gtwTr ansactionI D`, DATE_F ORMAT(`Dat e`,  '$dat e_format'  ) AS 'Date ', `Amount `, `Curren cy`, `Stat us`, `Data `, `Descri ption`, `N ote` FROM  `Transacti ons` INNER  JOIN `aff _members`  ON (`idPro file` = `I DMember`)  WHERE `idA ff` = $aff ID AND TO_ DAYS( FROM _UNIXTIME( $exact_dat e) ) = TO_ DAYS( `Dat e` ) AND ` Status` =  'approved'  ORDER BY  `Date` DES C";   84                $tr_quer y = "SELEC T `ID`, `I DMember`,  `IDProvide r`, `gtwTr ansactionI D`, DATE_F ORMAT(`Dat e`,  '$dat e_format'  ) AS 'Date ', `Amount `, `Curren cy`, `Stat us`, `Data `, `Descri ption`, `N ote` FROM  `Transacti ons` INNER  JOIN `aff _members`  ON (`idPro file` = `I DMember`)  WHERE `idA ff` = $aff ID AND TO_ DAYS( FROM _UNIXTIME( $exact_dat e) ) = TO_ DAYS( `Dat e` ) AND ` Status` =  'approved'  ORDER BY  `Date` DES C";
85           }   85           }
86           el se   86           el se
87           {   87           {
88                $tr_quer y = "";   88                $tr_quer y = "";
89                $tr['err or_text']  = "Please  specify co rrect date s";   89                $tr['err or_text']  = "Please  specify co rrect date s";
90           }   90           }
91           $d ate_disabl ed = "";   91           $d ate_disabl ed = "";
92           br eak;   92           br eak;
93     93  
94       case ' between':   94       case ' between':
95           //  First dat e parse   95           //  First dat e parse
96           if  ( $_POST[ 'tr_betwee n_date1']  == 'start'  )   96           if  ( $_POST[ 'tr_betwee n_date1']  == 'start'  )
97                $between _date1 = 0 ;   97                $between _date1 = 0 ;
98           el seif ( $_P OST['tr_be tween_date 1'] == 'no w' )   98           el seif ( $_P OST['tr_be tween_date 1'] == 'no w' )
99                $between _date1 = t ime();   99                $between _date1 = t ime();
100           el se   100           el se
101                $between _date1 = s trtotime(  $_POST['tr _between_d ate1'] );   101                $between _date1 = s trtotime(  $_POST['tr _between_d ate1'] );
102           //  Second da te parse   102           //  Second da te parse
103           if  ( $_POST[ 'tr_betwee n_date2']  == 'start'  )   103           if  ( $_POST[ 'tr_betwee n_date2']  == 'start'  )
104                $between _date2 = 0 ;   104                $between _date2 = 0 ;
105           el seif ( $_P OST['tr_be tween_date 2'] == 'no w' )   105           el seif ( $_P OST['tr_be tween_date 2'] == 'no w' )
106                $between _date2 = t ime();   106                $between _date2 = t ime();
107           el se   107           el se
108                $between _date2 = s trtotime(  $_POST['tr _between_d ate2'] );   108                $between _date2 = s trtotime(  $_POST['tr _between_d ate2'] );
109     109  
110           $t r['between _date1'] =  process_p ass_data(  $_POST['tr _between_d ate1'] );   110           $t r['between _date1'] =  process_p ass_data(  $_POST['tr _between_d ate1'] );
111           $t r['between _date2'] =  process_p ass_data(  $_POST['tr _between_d ate2'] );   111           $t r['between _date2'] =  process_p ass_data(  $_POST['tr _between_d ate2'] );
112           if  ( $betwee n_date1 !=  -1 && $be tween_date 2 != -1 )   112           if  ( $betwee n_date1 !=  -1 && $be tween_date 2 != -1 )
113           {   113           {
114                $tr_quer y = "SELEC T `ID`, `I DMember`,  `IDProvide r`, `gtwTr ansactionI D`, DATE_F ORMAT(`Dat e`,  '$dat e_format'  ) AS 'Date ', `Amount `, `Curren cy`, `Stat us`, `Data `, `Descri ption`, `N ote` FROM  `Transacti ons` INNER  JOIN `aff _members`  ON (`idPro file` = `I DMember`)  WHERE `idA ff` = $aff ID AND ( T O_DAYS( FR OM_UNIXTIM E($between _date1) )  <= TO_DAYS ( `Date` )  AND TO_DA YS( FROM_U NIXTIME($b etween_dat e2) ) >= T O_DAYS( `D ate` ) ) A ND `Status ` = 'appro ved' ORDER  BY `Date`  DESC";   114                $tr_quer y = "SELEC T `ID`, `I DMember`,  `IDProvide r`, `gtwTr ansactionI D`, DATE_F ORMAT(`Dat e`,  '$dat e_format'  ) AS 'Date ', `Amount `, `Curren cy`, `Stat us`, `Data `, `Descri ption`, `N ote` FROM  `Transacti ons` INNER  JOIN `aff _members`  ON (`idPro file` = `I DMember`)  WHERE `idA ff` = $aff ID AND ( T O_DAYS( FR OM_UNIXTIM E($between _date1) )  <= TO_DAYS ( `Date` )  AND TO_DA YS( FROM_U NIXTIME($b etween_dat e2) ) >= T O_DAYS( `D ate` ) ) A ND `Status ` = 'appro ved' ORDER  BY `Date`  DESC";
115           }   115           }
116           el se   116           el se
117           {   117           {
118                $tr_quer y = "";   118                $tr_quer y = "";
119                $tr['err or_text']  = "Please  specify co rrect date s";   119                $tr['err or_text']  = "Please  specify co rrect date s";
120           }   120           }
121           $b etween_dis abled = "" ;   121           $b etween_dis abled = "" ;
122           br eak;   122           br eak;
123   }   123   }
124     124  
125   // Calcula tions   125   // Calcula tions
126   if ( strle n($tr_quer y) )   126   if ( strle n($tr_quer y) )
127   {   127   {
128       $fin =  getFinanc eAffStat(  $affID, $t r );   128       $fin =  getFinanc eAffStat(  $affID, $t r );
129   }   129   }
130     130  
131   // Transac tions   131   // Transac tions
132   if ( strle n($tr_quer y) )   132   if ( strle n($tr_quer y) )
133   {   133   {
134       $tr_re s = db_res ( $tr_quer y );   134       $tr_re s = db_res ( $tr_quer y );
135       $tr_nu m = mysql_ num_rows(  $tr_res );   135       $tr_nu m = mysql_ num_rows(  $tr_res );
136   }   136   }
137   else   137   else
138   {   138   {
139       $tr_nu m = 0;   139       $tr_nu m = 0;
140   }   140   }
141     141  
142   $_page['he ader'] = " Finance";   142   $_page['he ader'] = " Finance";
143   $_page['he ader_text' ] = "Calcu lations an d transact ions";   143   $_page['he ader_text' ] = "Calcu lations an d transact ions";
144     144  
145   send_heade rs_page_ch anged();   145   send_heade rs_page_ch anged();
146     146  
147   ob_start() ;   147   ob_start() ;
148   ?>   148   ?>
149     149  
150   <div id="h elpDivId"  style="wid th: 200px;  height: a uto; backg round-colo r: #F5F5F5 ; color: # 000000; bo rder: 1px  solid silv er; positi on: absolu te; left:  0px; top:  0px; z-ind ex: 1000;  display: n one;">   150   <div id="h elpDivId"  style="wid th: 200px;  height: a uto; backg round-colo r: #F5F5F5 ; color: # 000000; bo rder: 1px  solid silv er; positi on: absolu te; left:  0px; top:  0px; z-ind ex: 1000;  display: n one;">
151       <div i d="helpTyp eId" style ="position : relative ; margin:  2px; paddi ng: 1px; w hite-space : nowrap;" >CONTENT</ div>   151       <div i d="helpTyp eId" style ="position : relative ; margin:  2px; paddi ng: 1px; w hite-space : nowrap;" >CONTENT</ div>
152       <div i d="helpDes cId" style ="position : relative ; margin:  2px; paddi ng: 1px;"> CONTENT</d iv>   152       <div i d="helpDes cId" style ="position : relative ; margin:  2px; paddi ng: 1px;"> CONTENT</d iv>
153       <div i d="helpNot eId" style ="position : relative ; margin:  2px; paddi ng: 1px; t ext-align:  justify;" >CONTENT</ div>   153       <div i d="helpNot eId" style ="position : relative ; margin:  2px; paddi ng: 1px; t ext-align:  justify;" >CONTENT</ div>
154   </div>   154   </div>
155     155  
156   <?   156   <?
157   $helpDivCo de = ob_ge t_contents ();   157   $helpDivCo de = ob_ge t_contents ();
158   ob_end_cle an();   158   ob_end_cle an();
159   /*   159   /*
160   if ( $logg ed['admin' ] )   160   if ( $logg ed['admin' ] )
161       TopCod eAdmin( $h elpDivCode  );   161       TopCod eAdmin( $h elpDivCode  );
162   else   162   else
163       TopCod eAff( $hel pDivCode ) ;   163       TopCod eAff( $hel pDivCode ) ;
164   */   164   */
165   TopCodeAdm in( $helpD ivCode );   165   TopCodeAdm in( $helpD ivCode );
166   ContentBlo ckHead("Fi nance ".$s Head);   166   ContentBlo ckHead("Fi nance ".$s Head);
167     167  
168   if ( strle n($tr['err or_text'])  )   168   if ( strle n($tr['err or_text'])  )
169       echo " <br><cente r><div cla ss=\"err\" >{$tr['err or_text']} </div></ce nter><br>" ;   169       echo " <br><cente r><div cla ss=\"err\" >{$tr['err or_text']} </div></ce nter><br>" ;
170     170  
171   ?>   171   ?>
172   <br>   172   <br>
173   <center>   173   <center>
174     174  
175   <script ty pe="text/j avascript" >   175   <script ty pe="text/j avascript" >
176   <!--   176   <!--
177       functi on updateC ontrols()   177       functi on updateC ontrols()
178       {   178       {
179           do cument.for ms['calcul ations_for m'].elemen ts['tr_ord er_num'].d isabled =  !(document .getElemen tById('id_ order').ch ecked);   179           do cument.for ms['calcul ations_for m'].elemen ts['tr_ord er_num'].d isabled =  !(document .getElemen tById('id_ order').ch ecked);
180           do cument.for ms['calcul ations_for m'].elemen ts['tr_las t_days'].d isabled =  !(document .getElemen tById('id_ last').che cked);   180           do cument.for ms['calcul ations_for m'].elemen ts['tr_las t_days'].d isabled =  !(document .getElemen tById('id_ last').che cked);
181           do cument.for ms['calcul ations_for m'].elemen ts['tr_exa ct_date']. disabled =  !(documen t.getEleme ntById('id _date').ch ecked);   181           do cument.for ms['calcul ations_for m'].elemen ts['tr_exa ct_date']. disabled =  !(documen t.getEleme ntById('id _date').ch ecked);
182           do cument.get ElementByI d('exact_c hoose').di sabled = ! (document. getElement ById('id_d ate').chec ked);   182           do cument.get ElementByI d('exact_c hoose').di sabled = ! (document. getElement ById('id_d ate').chec ked);
183           do cument.get ElementByI d('exact_c lear').dis abled = !( document.g etElementB yId('id_da te').check ed);   183           do cument.get ElementByI d('exact_c lear').dis abled = !( document.g etElementB yId('id_da te').check ed);
184           do cument.for ms['calcul ations_for m'].elemen ts['tr_bet ween_date1 '].disable d = !(docu ment.getEl ementById( 'id_betwee n').checke d);   184           do cument.for ms['calcul ations_for m'].elemen ts['tr_bet ween_date1 '].disable d = !(docu ment.getEl ementById( 'id_betwee n').checke d);
185           do cument.get ElementByI d('between 1_choose') .disabled  = !(docume nt.getElem entById('i d_between' ).checked) ;   185           do cument.get ElementByI d('between 1_choose') .disabled  = !(docume nt.getElem entById('i d_between' ).checked) ;
186           do cument.get ElementByI d('between 1_clear'). disabled =  !(documen t.getEleme ntById('id _between') .checked);   186           do cument.get ElementByI d('between 1_clear'). disabled =  !(documen t.getEleme ntById('id _between') .checked);
187           do cument.for ms['calcul ations_for m'].elemen ts['tr_bet ween_date2 '].disable d = !(docu ment.getEl ementById( 'id_betwee n').checke d);   187           do cument.for ms['calcul ations_for m'].elemen ts['tr_bet ween_date2 '].disable d = !(docu ment.getEl ementById( 'id_betwee n').checke d);
188           do cument.get ElementByI d('between 2_choose') .disabled  = !(docume nt.getElem entById('i d_between' ).checked) ;   188           do cument.get ElementByI d('between 2_choose') .disabled  = !(docume nt.getElem entById('i d_between' ).checked) ;
189           do cument.get ElementByI d('between 2_clear'). disabled =  !(documen t.getEleme ntById('id _between') .checked);   189           do cument.get ElementByI d('between 2_clear'). disabled =  !(documen t.getEleme ntById('id _between') .checked);
190       }   190       }
191   -->   191   -->
192   </script>   192   </script>
193     193  
194   <form id=" calculatio ns_form" a ction="<?  echo $_SER VER['PHP_S ELF'] ?>"  method="po st">   194   <form id=" calculatio ns_form" a ction="<?  echo $_SER VER['PHP_S ELF'] ?>"  method="po st">
195   <input typ e="hidden"  name="aff ID" value= "<?= $affI D ?>">   195   <input typ e="hidden"  name="aff ID" value= "<?= $affI D ?>">
196   <table cla ss="text"  cellspacin g=0 cellpa dding=4 wi dth=500 st yle="borde r: 1px sil ver solid; ">   196   <table cla ss="text"  cellspacin g=0 cellpa dding=4 wi dth=500 st yle="borde r: 1px sil ver solid; ">
197       <tr cl ass=panel>   197       <tr cl ass=panel>
198           <t d colspan= 2 nowrap>& nbsp;<b>Sh ow transac tions and  calculate  sums</b>&n bsp;</td>   198           <t d colspan= 2 nowrap>& nbsp;<b>Sh ow transac tions and  calculate  sums</b>&n bsp;</td>
199       </tr>   199       </tr>
200       <tr cl ass=table>   200       <tr cl ass=table>
201           <t d align="c enter">   201           <t d align="c enter">
202                <table c ellpadding ="5" cells pacing="0"  border="0 " width="4 00">   202                <table c ellpadding ="5" cells pacing="0"  border="0 " width="4 00">
203                    <tr>   203                    <tr>
204                         <td align= "left">   204                         <td align= "left">
205                             <input  type="rad io" name=" calculatio n_type" va lue="total " id="id_t otal" onCl ick="javas cript: upd ateControl s();" <?=  $_POST['ca lculation_ type'] ==  'total' ?  'checked=" checked"'  : '' ?>>   205                             <input  type="rad io" name=" calculatio n_type" va lue="total " id="id_t otal" onCl ick="javas cript: upd ateControl s();" <?=  $_POST['ca lculation_ type'] ==  'total' ?  'checked=" checked"'  : '' ?>>
206                         </td>   206                         </td>
207                         <td align= "left" col span="2" n owrap><lab el for="id _total">To tal amount </label></ td>   207                         <td align= "left" col span="2" n owrap><lab el for="id _total">To tal amount </label></ td>
208                    </tr >   208                    </tr >
209                    <tr>   209                    <tr>
210                         <td align= "left">   210                         <td align= "left">
211                             <input  type="rad io" name=" calculatio n_type" va lue="order _num" id=" id_order"  onClick="j avascript:  updateCon trols();"  <?= $_POST ['calculat ion_type']  == 'order _num' ? 'c hecked="ch ecked"' :  '' ?>>   211                             <input  type="rad io" name=" calculatio n_type" va lue="order _num" id=" id_order"  onClick="j avascript:  updateCon trols();"  <?= $_POST ['calculat ion_type']  == 'order _num' ? 'c hecked="ch ecked"' :  '' ?>>
212                         </td>   212                         </td>
213                         <td align= "left" now rap>   213                         <td align= "left" now rap>
214                             <label  for="id_o rder">For  order numb er</label>   214                             <label  for="id_o rder">For  order numb er</label>
215                         </td>   215                         </td>
216                         <td align= "left" now rap>   216                         <td align= "left" now rap>
217                             <input  name="tr_ order_num"  type=text  class=no  size=16 va lue="<?= h tmlspecial chars($tr[ 'order_num ']) ?>" <? = $order_n um_disable d ?>>   217                             <input  name="tr_ order_num"  type=text  class=no  size=16 va lue="<?= h tmlspecial chars($tr[ 'order_num ']) ?>" <? = $order_n um_disable d ?>>
218                         </td>   218                         </td>
219                    </tr >   219                    </tr >
220                    <tr>   220                    <tr>
221                         <td align= "left">   221                         <td align= "left">
222                             <input  type="rad io" name=" calculatio n_type" va lue="last"  id="id_la st" onClic k="javascr ipt: updat eControls( );" <?= $_ POST['calc ulation_ty pe'] == 'l ast' ? 'ch ecked="che cked"' : ' ' ?>>   222                             <input  type="rad io" name=" calculatio n_type" va lue="last"  id="id_la st" onClic k="javascr ipt: updat eControls( );" <?= $_ POST['calc ulation_ty pe'] == 'l ast' ? 'ch ecked="che cked"' : ' ' ?>>
223                         </td>   223                         </td>
224                         <td align= "left" now rap>   224                         <td align= "left" now rap>
225                             <label  for="id_l ast">Durin g last</la bel>   225                             <label  for="id_l ast">Durin g last</la bel>
226                         </td>   226                         </td>
227                         <td align= "left" now rap>   227                         <td align= "left" now rap>
228                             <input  name="tr_ last_days"  type=text  class=no  size=6 val ue="<?= ht mlspecialc hars($tr[' last_days' ]) ?>" <?=  $last_dis abled ?>>   228                             <input  name="tr_ last_days"  type=text  class=no  size=6 val ue="<?= ht mlspecialc hars($tr[' last_days' ]) ?>" <?=  $last_dis abled ?>>
229                             &nbsp; days (type  <b>0</b>  for today' s transact ions)   229                             &nbsp; days (type  <b>0</b>  for today' s transact ions)
230                         </td>   230                         </td>
231                    </tr >   231                    </tr >
232                    <tr>   232                    <tr>
233                         <td align= "left">   233                         <td align= "left">
234                             <input  type="rad io" id="id _date" nam e="calcula tion_type"  value="da te" id="id _date" onC lick="java script: up dateContro ls();" <?=  $_POST['c alculation _type'] ==  'date' ?  'checked=" checked"'  : '' ?>>   234                             <input  type="rad io" id="id _date" nam e="calcula tion_type"  value="da te" id="id _date" onC lick="java script: up dateContro ls();" <?=  $_POST['c alculation _type'] ==  'date' ?  'checked=" checked"'  : '' ?>>
235                         </td>   235                         </td>
236                         <td align= "left" now rap>   236                         <td align= "left" now rap>
237                             <label  for="id_d ate">On th e date:</l abel>   237                             <label  for="id_d ate">On th e date:</l abel>
238                         </td>   238                         </td>
239                         <td align= "left" now rap>   239                         <td align= "left" now rap>
240                             <input  style="wi dth: 130px " id="tr_e xact_date"  name="tr_ exact_date " type=tex t class=no  value="<? = htmlspec ialchars($ tr['exact_ date']) ?> " <?= $dat e_disabled  ?>>   240                             <input  style="wi dth: 130px " id="tr_e xact_date"  name="tr_ exact_date " type=tex t class=no  value="<? = htmlspec ialchars($ tr['exact_ date']) ?> " <?= $dat e_disabled  ?>>
241                             &nbsp; <input sty le="width:  70px" typ e="button"  id="exact _choose" v alue="Choo se" <?= $d ate_disabl ed ?>/>   241                             &nbsp; <input sty le="width:  70px" typ e="button"  id="exact _choose" v alue="Choo se" <?= $d ate_disabl ed ?>/>
242                             &nbsp; <input sty le="width:  70px" typ e="button"  id="exact _clear" on Click="doc ument.getE lementById ('tr_exact _date').va lue = '';  " value="C lear" <?=  $date_disa bled ?>/>   242                             &nbsp; <input sty le="width:  70px" typ e="button"  id="exact _clear" on Click="doc ument.getE lementById ('tr_exact _date').va lue = '';  " value="C lear" <?=  $date_disa bled ?>/>
243                         </td>   243                         </td>
244                    </tr >   244                    </tr >
245                    <tr>   245                    <tr>
246                         <td align= "left">   246                         <td align= "left">
247                             <input  type="rad io" name=" calculatio n_type" va lue="betwe en" id="id _between"  onClick="j avascript:  updateCon trols();"  <?= $_POST ['calculat ion_type']  == 'betwe en' ? 'che cked="chec ked"' : ''  ?>>   247                             <input  type="rad io" name=" calculatio n_type" va lue="betwe en" id="id _between"  onClick="j avascript:  updateCon trols();"  <?= $_POST ['calculat ion_type']  == 'betwe en' ? 'che cked="chec ked"' : ''  ?>>
248                         </td>   248                         </td>
249                         <td align= "left" now rap>   249                         <td align= "left" now rap>
250                             <label  for="id_b etween">Be tween date s</label>   250                             <label  for="id_b etween">Be tween date s</label>
251                         </td>   251                         </td>
252                         <td align= "left" now rap>   252                         <td align= "left" now rap>
253                             <input  style="wi dth: 130px " id="tr_b etween_dat e1" name=" tr_between _date1" ty pe=text cl ass=no siz e=10 value ="<?= html specialcha rs($tr['be tween_date 1']) ?>" < ?= $betwee n_disabled  ?>>   253                             <input  style="wi dth: 130px " id="tr_b etween_dat e1" name=" tr_between _date1" ty pe=text cl ass=no siz e=10 value ="<?= html specialcha rs($tr['be tween_date 1']) ?>" < ?= $betwee n_disabled  ?>>
254                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en1_choose " value="C hoose" <?=  $between_ disabled ? >/>   254                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en1_choose " value="C hoose" <?=  $between_ disabled ? >/>
255                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en1_clear"  onClick=" document.g etElementB yId('tr_be tween_date 1').value  = ''; " va lue="Clear " <?= $bet ween_disab led ?>/>   255                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en1_clear"  onClick=" document.g etElementB yId('tr_be tween_date 1').value  = ''; " va lue="Clear " <?= $bet ween_disab led ?>/>
256                         </td>   256                         </td>
257                    </tr >   257                    </tr >
258                    <tr>   258                    <tr>
259                         <td>&nbsp; </td>   259                         <td>&nbsp; </td>
260                         <td align= "right" no wrap>   260                         <td align= "right" no wrap>
261                             and   261                             and
262                         </td>   262                         </td>
263                         <td align= "left" now rap>   263                         <td align= "left" now rap>
264                             <input  style="wi dth: 130px " id="tr_b etween_dat e2" name=" tr_between _date2" ty pe=text cl ass=no siz e=10 value ="<?= html specialcha rs($tr['be tween_date 2']) ?>" < ?= $betwee n_disabled  ?>>   264                             <input  style="wi dth: 130px " id="tr_b etween_dat e2" name=" tr_between _date2" ty pe=text cl ass=no siz e=10 value ="<?= html specialcha rs($tr['be tween_date 2']) ?>" < ?= $betwee n_disabled  ?>>
265                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en2_choose " value="C hoose" <?=  $between_ disabled ? >/>   265                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en2_choose " value="C hoose" <?=  $between_ disabled ? >/>
266                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en2_clear"  onClick=" document.g etElementB yId('tr_be tween_date 2').value  = ''; " va lue="Clear " <?= $bet ween_disab led ?>/>   266                             &nbsp; <input sty le="width:  70px" typ e="button"  id="betwe en2_clear"  onClick=" document.g etElementB yId('tr_be tween_date 2').value  = ''; " va lue="Clear " <?= $bet ween_disab led ?>/>
267                         </td>   267                         </td>
268                    </tr >   268                    </tr >
269                    <tr>   269                    <tr>
270                         <td align= "left">&nb sp;</td>   270                         <td align= "left">&nb sp;</td>
271                         <td align= "left" col span="2">   271                         <td align= "left" col span="2">
272                             <div a lign=justi fy>The ear lier date  must be se t first, t he later o ne - secon d. Also yo u can use  words "<b> start</b>"  and "<b>n ow</b>" to  indicate  the beginn ing of you r work and  the prese nt date. D o not use  queries li ke "betwee n start an d now" bec ause it ca n display  a huge amo unt of tra nsactions. </div>   272                             <div a lign=justi fy>The ear lier date  must be se t first, t he later o ne - secon d. Also yo u can use  words "<b> start</b>"  and "<b>n ow</b>" to  indicate  the beginn ing of you r work and  the prese nt date. D o not use  queries li ke "betwee n start an d now" bec ause it ca n display  a huge amo unt of tra nsactions. </div>
273                         </td>   273                         </td>
274                    </tr >   274                    </tr >
275                </table>   275                </table>
276           </ td>   276           </ td>
277       </tr>   277       </tr>
278   </table>   278   </table>
279   <br />   279   <br />
280   <center>   280   <center>
281       <input  class=no  type=submi t value="S ubmit">   281       <input  class=no  type=submi t value="S ubmit">
282   </center>   282   </center>
283   </form>   283   </form>
284     284  
285   <!-- Loadi ng Calenda r JavaScri pt files - ->   285   <!-- Loadi ng Calenda r JavaScri pt files - ->
286       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/utils .js"></scr ipt>   286       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/utils .js"></scr ipt>
287       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar.js"></ script>   287       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar.js"></ script>
288       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar-setup. js"></scri pt>   288       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _src/calen dar-setup. js"></scri pt>
289     289  
290   <!-- Loadi ng languag e definiti on file -- >   290   <!-- Loadi ng languag e definiti on file -- >
291       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _lang/cale ndar-en.js "></script >   291       <scrip t type="te xt/javascr ipt" src=" <?= $site[ 'plugins']  ?>calenda r/calendar _lang/cale ndar-en.js "></script >
292     292  
293   <script ty pe="text/j avascript" >   293   <script ty pe="text/j avascript" >
294   //<![CDATA [   294   //<![CDATA [
295         Zapa tec.Calend ar.setup({   295         Zapa tec.Calend ar.setup({
296           fi rstDay           : 1,   296           fi rstDay           : 1,
297           we ekNumbers        : tr ue,   297           we ekNumbers        : tr ue,
298           sh owOthers         : tr ue,   298           sh owOthers         : tr ue,
299           sh owsTime          : fa lse,   299           sh owsTime          : fa lse,
300           ti meFormat         : "2 4",   300           ti meFormat         : "2 4",
301           st ep               : 2,   301           st ep               : 2,
302           ra nge              : [1 900.01, 29 99.12],   302           ra nge              : [1 900.01, 29 99.12],
303           el ectric           : fa lse,   303           el ectric           : fa lse,
304           si ngleClick        : tr ue,   304           si ngleClick        : tr ue,
305           in putField         : "t r_exact_da te",   305           in putField         : "t r_exact_da te",
306           bu tton             : "e xact_choos e",   306           bu tton             : "e xact_choos e",
307           if Format           : "% Y-%m-%d",   307           if Format           : "% Y-%m-%d",
308           da Format           : "% Y/%m/%d",   308           da Format           : "% Y/%m/%d",
309           al ign              : "B r"   309           al ign              : "B r"
310         });   310         });
311         Zapa tec.Calend ar.setup({   311         Zapa tec.Calend ar.setup({
312           fi rstDay           : 1,   312           fi rstDay           : 1,
313           we ekNumbers        : tr ue,   313           we ekNumbers        : tr ue,
314           sh owOthers         : tr ue,   314           sh owOthers         : tr ue,
315           sh owsTime          : tr ue,   315           sh owsTime          : tr ue,
316           ti meFormat         : "2 4",   316           ti meFormat         : "2 4",
317           st ep               : 2,   317           st ep               : 2,
318           ra nge              : [1 900.01, 29 99.12],   318           ra nge              : [1 900.01, 29 99.12],
319           el ectric           : fa lse,   319           el ectric           : fa lse,
320           si ngleClick        : tr ue,   320           si ngleClick        : tr ue,
321           in putField         : "t r_between_ date1",   321           in putField         : "t r_between_ date1",
322           bu tton             : "b etween1_ch oose",   322           bu tton             : "b etween1_ch oose",
323           if Format           : "% Y-%m-%d %H :%M:%S",   323           if Format           : "% Y-%m-%d %H :%M:%S",
324           da Format           : "% Y/%m/%d",   324           da Format           : "% Y/%m/%d",
325           al ign              : "B r"   325           al ign              : "B r"
326         });   326         });
327         Zapa tec.Calend ar.setup({   327         Zapa tec.Calend ar.setup({
328           fi rstDay           : 1,   328           fi rstDay           : 1,
329           we ekNumbers        : tr ue,   329           we ekNumbers        : tr ue,
330           sh owOthers         : tr ue,   330           sh owOthers         : tr ue,
331           sh owsTime          : tr ue,   331           sh owsTime          : tr ue,
332           ti meFormat         : "2 4",   332           ti meFormat         : "2 4",
333           st ep               : 2,   333           st ep               : 2,
334           ra nge              : [1 900.01, 29 99.12],   334           ra nge              : [1 900.01, 29 99.12],
335           el ectric           : fa lse,   335           el ectric           : fa lse,
336           si ngleClick        : tr ue,   336           si ngleClick        : tr ue,
337           in putField         : "t r_between_ date2",   337           in putField         : "t r_between_ date2",
338           bu tton             : "b etween2_ch oose",   338           bu tton             : "b etween2_ch oose",
339           if Format           : "% Y-%m-%d %H :%M:%S",   339           if Format           : "% Y-%m-%d %H :%M:%S",
340           da Format           : "% Y/%m/%d",   340           da Format           : "% Y/%m/%d",
341           al ign              : "B r"   341           al ign              : "B r"
342         });   342         });
343   //]]>   343   //]]>
344   </script>   344   </script>
345     345  
346   </center>   346   </center>
347     347  
348                </div>   348                </div>
349           </ div>   349           </ div>
350           <d iv class=" block_foot "></div>   350           <d iv class=" block_foot "></div>
351   <?   351   <?
352     352  
353   if ( strle n($tr_quer y) )   353   if ( strle n($tr_quer y) )
354   {   354   {
355   ?>   355   ?>
356           <d iv class=" block_red_ head">Plea se Pay Att ention</di v>   356           <d iv class=" block_red_ head">Plea se Pay Att ention</di v>
357           <d iv class=" block_red_ outer">   357           <d iv class=" block_red_ outer">
358                <div cla ss="block_ inner">   358                <div cla ss="block_ inner">
359                    <b>N OTE:</b> O nly transa ctions wit h site's c urrent cur rency will  be shown  here.   359                    <b>N OTE:</b> O nly transa ctions wit h site's c urrent cur rency will  be shown  here.
360                </div>   360                </div>
361           </ div>   361           </ div>
362           <d iv class=" block_red_ foot"></di v>   362           <d iv class=" block_red_ foot"></di v>
363     363  
364           <d iv class=" block_head ">Transact ions and C alculation s</div>   364           <d iv class=" block_head ">Transact ions and C alculation s</div>
365           <d iv class=" block_oute r">   365           <d iv class=" block_oute r">
366                <div cla ss="block_ inner">   366                <div cla ss="block_ inner">
367     367  
368       <scrip t type="te xt/javascr ipt">   368       <scrip t type="te xt/javascr ipt">
369       <!--   369       <!--
370           fu nction sho wHelpDiv(  helpEvent,  typeData,  descData,  noteData  )   370           fu nction sho wHelpDiv(  helpEvent,  typeData,  descData,  noteData  )
371           {   371           {
372                if ( !he lpEvent )   372                if ( !he lpEvent )
373                    help Event = wi ndow.event ;   373                    help Event = wi ndow.event ;
374                helpDiv  = document .getElemen tById('hel pDivId');   374                helpDiv  = document .getElemen tById('hel pDivId');
375     375  
376                var pos_ X = 0, pos _Y = 0;   376                var pos_ X = 0, pos _Y = 0;
377                if ( hel pEvent )   377                if ( hel pEvent )
378                {   378                {
379                    if (  typeof(he lpEvent.pa geX) == 'n umber' )   379                    if (  typeof(he lpEvent.pa geX) == 'n umber' )
380                    {   380                    {
381                         pos_X = he lpEvent.pa geX; pos_Y  = helpEve nt.pageY;   381                         pos_X = he lpEvent.pa geX; pos_Y  = helpEve nt.pageY;
382                    }   382                    }
383                    else  if ( type of(helpEve nt.clientX ) == 'numb er' )   383                    else  if ( type of(helpEve nt.clientX ) == 'numb er' )
384                    {   384                    {
385                         pos_X = he lpEvent.cl ientX; pos _Y = helpE vent.clien tY;   385                         pos_X = he lpEvent.cl ientX; pos _Y = helpE vent.clien tY;
386                         if ( docum ent.body & & ( docume nt.body.sc rollTop ||  document. body.scrol lLeft ) &&  !( window .opera ||  window.deb ug || navi gator.vend or == 'KDE ' ) )   386                         if ( docum ent.body & & ( docume nt.body.sc rollTop ||  document. body.scrol lLeft ) &&  !( window .opera ||  window.deb ug || navi gator.vend or == 'KDE ' ) )
387                         {   387                         {
388                             pos_X  += documen t.body.scr ollLeft; p os_Y += do cument.bod y.scrollTo p;   388                             pos_X  += documen t.body.scr ollLeft; p os_Y += do cument.bod y.scrollTo p;
389                         }   389                         }
390                         else if (  document.d ocumentEle ment && (  document.d ocumentEle ment.scrol lTop || do cument.doc umentEleme nt.scrollL eft ) && ! ( window.o pera || wi ndow.debug  || naviga tor.vendor  == 'KDE'  ) )   390                         else if (  document.d ocumentEle ment && (  document.d ocumentEle ment.scrol lTop || do cument.doc umentEleme nt.scrollL eft ) && ! ( window.o pera || wi ndow.debug  || naviga tor.vendor  == 'KDE'  ) )
391                         {   391                         {
392                             pos_X  += documen t.document Element.sc rollLeft;  pos_Y += d ocument.do cumentElem ent.scroll Top;   392                             pos_X  += documen t.document Element.sc rollLeft;  pos_Y += d ocument.do cumentElem ent.scroll Top;
393                         }   393                         }
394                    }   394                    }
395                }   395                }
396     396  
397                var scro ll_X = 0,  scroll_Y =  0;   397                var scro ll_X = 0,  scroll_Y =  0;
398                if ( doc ument.body  && ( docu ment.body. scrollTop  || documen t.body.scr ollLeft )  && !( wind ow.debug | | navigato r.vendor = = 'KDE' )  )   398                if ( doc ument.body  && ( docu ment.body. scrollTop  || documen t.body.scr ollLeft )  && !( wind ow.debug | | navigato r.vendor = = 'KDE' )  )
399                {   399                {
400                    scro ll_X = doc ument.body .scrollLef t; scroll_ Y = docume nt.body.sc rollTop;   400                    scro ll_X = doc ument.body .scrollLef t; scroll_ Y = docume nt.body.sc rollTop;
401                }   401                }
402                else if  ( document .documentE lement &&  ( document .documentE lement.scr ollTop ||  document.d ocumentEle ment.scrol lLeft ) &&  !( window .debug ||  navigator. vendor ==  'KDE' ) )   402                else if  ( document .documentE lement &&  ( document .documentE lement.scr ollTop ||  document.d ocumentEle ment.scrol lLeft ) &&  !( window .debug ||  navigator. vendor ==  'KDE' ) )
403                {   403                {
404                    scro ll_X = doc ument.docu mentElemen t.scrollLe ft; scroll _Y = docum ent.docume ntElement. scrollTop;   404                    scro ll_X = doc ument.docu mentElemen t.scrollLe ft; scroll _Y = docum ent.docume ntElement. scrollTop;
405                }   405                }
406     406  
407                var win_ size_X = 0 , win_size _Y = 0;   407                var win_ size_X = 0 , win_size _Y = 0;
408                if (wind ow.innerWi dth && win dow.innerH eight)   408                if (wind ow.innerWi dth && win dow.innerH eight)
409                {   409                {
410                    win_ size_X = w indow.inne rWidth; wi n_size_Y =  window.in nerHeight;   410                    win_ size_X = w indow.inne rWidth; wi n_size_Y =  window.in nerHeight;
411                }   411                }
412                else if  (document. documentEl ement && d ocument.do cumentElem ent.client Width && d ocument.do cumentElem ent.client Height)   412                else if  (document. documentEl ement && d ocument.do cumentElem ent.client Width && d ocument.do cumentElem ent.client Height)
413                {   413                {
414                    win_ size_X = d ocument.do cumentElem ent.client Width; win _size_Y =  document.d ocumentEle ment.clien tHeight;   414                    win_ size_X = d ocument.do cumentElem ent.client Width; win _size_Y =  document.d ocumentEle ment.clien tHeight;
415                }   415                }
416                else if  (document. body && do cument.bod y.clientWi dth && doc ument.body .clientHei ght)   416                else if  (document. body && do cument.bod y.clientWi dth && doc ument.body .clientHei ght)
417                {   417                {
418                    win_ size_X = d ocument.bo dy.clientW idth; win_ size_Y = d ocument.bo dy.clientH eight;   418                    win_ size_X = d ocument.bo dy.clientW idth; win_ size_Y = d ocument.bo dy.clientH eight;
419                }   419                }
420     420  
421                pos_X +=  15; pos_Y  += 15;   421                pos_X +=  15; pos_Y  += 15;
422     422  
423                if (help Div.offset Width && h elpDiv.off setHeight)   423                if (help Div.offset Width && h elpDiv.off setHeight)
424                {   424                {
425                    if ( pos_X - sc roll_X + h elpDiv.off setWidth +  5 > win_s ize_X)   425                    if ( pos_X - sc roll_X + h elpDiv.off setWidth +  5 > win_s ize_X)
426                         pos_X -= ( helpDiv.of fsetWidth  + 25);   426                         pos_X -= ( helpDiv.of fsetWidth  + 25);
427                    if ( pos_Y - sc roll_Y + h elpDiv.off setHeight  + 5 > win_ size_Y)   427                    if ( pos_Y - sc roll_Y + h elpDiv.off setHeight  + 5 > win_ size_Y)
428                         pos_Y -= ( helpDiv.of fsetHeight  + 20);   428                         pos_Y -= ( helpDiv.of fsetHeight  + 20);
429                }   429                }
430     430  
431                helpDiv. style.left  = pos_X +  'px'; hel pDiv.style .top = pos _Y + 'px';   431                helpDiv. style.left  = pos_X +  'px'; hel pDiv.style .top = pos _Y + 'px';
432     432  
433                document .getElemen tById('hel pTypeId'). innerHTML  = typeData ;   433                document .getElemen tById('hel pTypeId'). innerHTML  = typeData ;
434                document .getElemen tById('hel pDescId'). innerHTML  = descData ;   434                document .getElemen tById('hel pDescId'). innerHTML  = descData ;
435                document .getElemen tById('hel pNoteId'). innerHTML  = noteData ;   435                document .getElemen tById('hel pNoteId'). innerHTML  = noteData ;
436                helpDiv. style.disp lay = 'blo ck';   436                helpDiv. style.disp lay = 'blo ck';
437           }   437           }
438     438  
439           fu nction hid eHelpDiv()   439           fu nction hid eHelpDiv()
440           {   440           {
441                document .getElemen tById('hel pDivId').s tyle.displ ay = 'none ';   441                document .getElemen tById('hel pDivId').s tyle.displ ay = 'none ';
442           }   442           }
443       -->   443       -->
444       </scri pt>   444       </scri pt>
445     445  
446       <cente r>   446       <cente r>
447       <table  class=sma ll cellspa cing=1 cel lpadding=2 >   447       <table  class=sma ll cellspa cing=1 cel lpadding=2 >
448           <t r class=pa nel>   448           <t r class=pa nel>
449                <td cols pan=2 alig n="center" >&nbsp;<b> Calculatio ns for the  query</b> </td>   449                <td cols pan=2 alig n="center" >&nbsp;<b> Calculatio ns for the  query</b> </td>
450           </ tr>   450           </ tr>
451           <t r class=ta ble>   451           <t r class=ta ble>
452                <td alig n="left">& nbsp;Membe rship subs criptions& nbsp;</td>   452                <td alig n="left">& nbsp;Membe rship subs criptions& nbsp;</td>
453                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' membership _amount'];  ?></b>&nb sp;</td>   453                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' membership _amount'];  ?></b>&nb sp;</td>
454           </ tr>   454           </ tr>
455           <t r class=ta ble>   455           <t r class=ta ble>
456                <td alig n="left">& nbsp;Credi ts&nbsp;</ td>    
457                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' credits_am ount']; ?> </b>&nbsp; </td>    
458           </ tr>    
459           <t r class=ta ble>    
460                <td alig n="left">& nbsp;Conta ct sales&n bsp;</td>   456                <td alig n="left">& nbsp;Conta ct sales&n bsp;</td>
461                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' sales_amou nt']; ?></ b>&nbsp;</ td>   457                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' sales_amou nt']; ?></ b>&nbsp;</ td>
462           </ tr>   458           </ tr>
463           <t r class=ta ble>   459           <t r class=ta ble>
464                <td alig n="left">& nbsp;Event s tickets& nbsp;</td>   460                <td alig n="left">& nbsp;Event s tickets& nbsp;</td>
465                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' sdating_am ount']; ?> </b>&nbsp; </td>   461                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' sdating_am ount']; ?> </b>&nbsp; </td>
466           </ tr>   462           </ tr>
467           <t r class=ta ble>   463           <t r class=ta ble>
468                <td alig n="left">& nbsp;Total &nbsp;</td >   464                <td alig n="left">& nbsp;Total &nbsp;</td >
469                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' total']; ? ></b>&nbsp ;</td>   465                <td alig n=right no wrap>&nbsp ;<b><?= $d oll.$fin[' total']; ? ></b>&nbsp ;</td>
470           </ tr>   466           </ tr>
471       </tabl e>   467       </tabl e>
472       <br>   468       <br>
473     469  
474       <table  class=sma ll cellspa cing=2 cel lpadding=4  width=520 >   470       <table  class=sma ll cellspa cing=2 cel lpadding=4  width=520 >
475           <t r>   471           <t r>
476                <td clas s=panel co lspan=6 al ign="cente r"><b>Tran sactions</ b></td>   472                <td clas s=panel co lspan=6 al ign="cente r"><b>Tran sactions</ b></td>
477           </ tr>   473           </ tr>
478       <?   474       <?
479           if  ( $tr_num  == 0 )   475           if  ( $tr_num  == 0 )
480           {   476           {
481                echo "   477                echo "
482           <t r>   478           <t r>
483                <td alig n=center>N o transact ions avail able</td>   479                <td alig n=center>N o transact ions avail able</td>
484           </ tr>   480           </ tr>
485                ";   481                ";
486           }   482           }
487           el se   483           el se
488           {   484           {
489                $payment Providers  = getPayme ntProvider s( false ) ;   485                $payment Providers  = getPayme ntProvider s( false ) ;
490       ?>   486       ?>
491           <t r class=pa nel>   487           <t r class=pa nel>
492                <td alig n="left" n owrap>Orde r number</ td>   488                <td alig n="left" n owrap>Orde r number</ td>
493                <td alig n="left" n owrap>Date </td>   489                <td alig n="left" n owrap>Date </td>
494                <td alig n="left" n owrap>Memb er</td>   490                <td alig n="left" n owrap>Memb er</td>
495                <td alig n="left" n owrap>Prov ider</td>   491                <td alig n="left" n owrap>Prov ider</td>
496                <td alig n="center"  nowrap>In fo</td>   492                <td alig n="center"  nowrap>In fo</td>
497                <td alig n="right"  nowrap>Sum  paid, <?=  $currency _code ?></ td>   493                <td alig n="right"  nowrap>Sum  paid, <?=  $currency _code ?></ td>
498           </ tr>   494           </ tr>
499       <?   495       <?
500                while( $ tr_arr = m ysql_fetch _array( $t r_res ) )   496                while( $ tr_arr = m ysql_fetch _array( $t r_res ) )
501                {   497                {
502                    $tra nDataArray  = transSt ringToData ( $tr_arr[ 'Data'] );   498                    $tra nDataArray  = transSt ringToData ( $tr_arr[ 'Data'] );
503                    $tra nTypeStrin g = '<b>Ty pe:</b> '  . $tranDat aArray['ac tion'];   499                    $tra nTypeStrin g = '<b>Ty pe:</b> '  . $tranDat aArray['ac tion'];
504                    $tra nDataStrin g = '<b>De scription: </b> ' . r eturnDescB yAction( $ tranDataAr ray['actio n'], $tran DataArray[ 'data'], f alse );   500                    $tra nDataStrin g = '<b>De scription: </b> ' . r eturnDescB yAction( $ tranDataAr ray['actio n'], $tran DataArray[ 'data'], f alse );
505                    $tra nNoteStrin g = strlen ($tr_arr[' Note']) ?  '<b>Note:< /b> ' . $t r_arr['Not e'] : '';   501                    $tra nNoteStrin g = strlen ($tr_arr[' Note']) ?  '<b>Note:< /b> ' . $t r_arr['Not e'] : '';
506       ?>   502       ?>
507           <t r class=ta ble>   503           <t r class=ta ble>
508                <td><?=  $tr_arr['g twTransact ionID'] ?> </td>   504                <td><?=  $tr_arr['g twTransact ionID'] ?> </td>
509                <td alig n="left" n owrap><?=  $tr_arr['D ate'] ?></ td>   505                <td alig n="left" n owrap><?=  $tr_arr['D ate'] ?></ td>
510                <td alig n="left" n owrap><?=  "<a href=\ "{$site['u rl']}profi le.php?ID= {$tr_arr[' IDMember'] }\">{$tr_a rr['IDMemb er']}</a>"  ?></td>   506                <td alig n="left" n owrap><?=  "<a href=\ "{$site['u rl']}profi le.php?ID= {$tr_arr[' IDMember'] }\">{$tr_a rr['IDMemb er']}</a>"  ?></td>
511                <td alig n="left" n owrap><?=  $paymentPr oviders[$t r_arr['IDP rovider']] ['Caption' ] ?></td>   507                <td alig n="left" n owrap><?=  $paymentPr oviders[$t r_arr['IDP rovider']] ['Caption' ] ?></td>
512                <td alig n="center"  nowrap><a  href="jav ascript:vo id(0);" on mouseover= "javascrip t: showHel pDiv(event , '<?= $tr anTypeStri ng ?>', '< ?= $tranDa taString ? >', '<?= $ tranNoteSt ring ?>'); " onmouseo ut="javasc ript: hide HelpDiv(); ">Info</a> </td>   508                <td alig n="center"  nowrap><a  href="jav ascript:vo id(0);" on mouseover= "javascrip t: showHel pDiv(event , '<?= $tr anTypeStri ng ?>', '< ?= $tranDa taString ? >', '<?= $ tranNoteSt ring ?>'); " onmouseo ut="javasc ript: hide HelpDiv(); ">Info</a> </td>
513                <td alig n="right"  nowrap><?=  sprintf(  "%.2f", $p ercent * ( float)$tr_ arr['Amoun t'] ) ?></ td>   509                <td alig n="right"  nowrap><?=  sprintf(  "%.2f", $p ercent * ( float)$tr_ arr['Amoun t'] ) ?></ td>
514           </ tr>   510           </ tr>
515       <?   511       <?
516                }   512                }
517           }   513           }
518       ?>   514       ?>
519       </tabl e>   515       </tabl e>
520       </cent er>   516       </cent er>
521       <?   517       <?
522       Conten tBlockFoot ();   518       Conten tBlockFoot ();
523   }   519   }
524     520  
525   BottomCode ();   521   BottomCode ();
526   ?>   522   ?>