-
Notifications
You must be signed in to change notification settings - Fork 2
/
MakePayment.php
641 lines (571 loc) · 22.2 KB
/
MakePayment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<?php
//Include Common Files @1-5471E0F2
define("RelativePath", ".");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
//End Include Common Files
$page="Making a Payment";
global $REMOTE_ADDR;
global $now;
$ip=$REMOTE_ADDR;
$timeout = $now["timeout"];
$db1 = new clsDBNetConnect;
$db2 = new clsDBNetConnect;
$db3 = new clsDBNetConnect;
$db4 = new clsDBNetConnect;
$db5 = new clsDBNetConnect;
$times = time();
$SQL1 = "DELETE FROM online WHERE datet < $times";
$SQL2 = "SELECT * FROM online WHERE ip='$ip'";
$SQL3 = "UPDATE online SET datet=$times + $timeout, page='$page', user='" . CCGetUserName() . "' WHERE ip='$ip'";
$SQL4 = "INSERT INTO online (ip, datet, user, page) VALUES ('$ip', $times+$timeout,'". CCGetUserName() . "', '$page')";
$SQL5 = "SELECT * FROM online";
$db1->query($SQL1);
$db2->query($SQL2);
if($db2->next_record()){
$db3->query($SQL3);
} else {
$db4->query($SQL4);
}
$db5->query($SQL5);
$usersonline = $db5->num_rows();
unset($db1);
unset($db2);
unset($db3);
unset($db4);
unset($db5);
unset($SQL);
unset($SQL);
unset($SQL);
unset($SQL);
unset($SQL);
//Include Page implementation @2-503267A8
include("./Headeru.php");
//End Include Page implementation
Class clsRecordcharges1 { //charges1 Class @4-386271B0
//Variables @4-90DA4C9A
// Public variables
var $ComponentName;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $FormSubmitted;
var $Visible;
var $Recordset;
var $CCSEvents = "";
var $CCSEventResult;
var $ds;
var $EditMode;
var $ValidatingControls;
var $Controls;
// Class variables
//End Variables
//Class_Initialize Event @4-1A1CDCB5
function clsRecordcharges1()
{
global $FileName;
$this->Visible = true;
$this->Errors = new clsErrors();
$this->ds = new clscharges1DataSource();
$this->UpdateAllowed = false;
$this->DeleteAllowed = false;
if($this->Visible)
{
$this->ComponentName = "charges1";
$this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $this->ComponentName);
$CCSForm = CCGetFromGet("ccsForm", "");
$this->FormSubmitted = ($CCSForm == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->charge = new clsControl(ccsTextBox, "charge", "Amount", ccsFloat, Array(False, 2, ".", "", False, "", "", 1, True, ""), CCGetRequestParam("charge", $Method));
$this->charge->Required = true;
$this->FirstName = new clsControl(ccsTextBox, "FirstName", "First Name", ccsText, "", CCGetRequestParam("FirstName", $Method));
$this->FirstName->Required = true;
$this->LastName = new clsControl(ccsTextBox, "LastName", "Last Name", ccsText, "", CCGetRequestParam("LastName", $Method));
$this->LastName->Required = true;
$this->CCNumber = new clsControl(ccsTextBox, "CCNumber", "Credit Card Number", ccsText, "", CCGetRequestParam("CCNumber", $Method));
$this->CCNumber->Required = true;
$this->ExpDate = new clsControl(ccsTextBox, "ExpDate", "Expiration Date", ccsText, "", CCGetRequestParam("ExpDate", $Method));
$this->ExpDate->Required = true;
$this->CardCode = new clsControl(ccsTextBox, "CardCode", "Card Code (CVV2)", ccsText, "", CCGetRequestParam("CardCode", $Method));
$this->CardCode->Required = true;
$this->Insert = new clsButton("Insert");
$this->Cancel = new clsButton("Cancel");
$this->user_id = new clsControl(ccsHidden, "user_id", "User Id", ccsInteger, "", CCGetRequestParam("user_id", $Method));
$this->date = new clsControl(ccsHidden, "date", "Date", ccsInteger, "", CCGetRequestParam("date", $Method));
$this->cause = new clsControl(ccsHidden, "cause", "Cause", ccsMemo, "", CCGetRequestParam("cause", $Method));
if(!$this->FormSubmitted) {
if(!strlen($this->charge->GetValue()))
$this->charge->SetValue(10.00);
if(!strlen($this->ExpDate->GetValue()))
$this->ExpDate->SetValue("MM/YYYY");
}
}
}
//End Class_Initialize Event
//Initialize Method @4-AF91F9DE
function Initialize()
{
if(!$this->Visible)
return;
$this->ds->Parameters["urlcharge_id"] = CCGetFromGet("charge_id", "");
}
//End Initialize Method
//Validate Method @4-2B045C35
function Validate()
{
$Validation = true;
$Where = "";
if($this->charge->GetValue() < 1) {
$this->charge->Errors->addError("You must deposit atleast 1.00");
print "You must deposit atleast 1.00";
}
$Validation = ($this->charge->Validate() && $Validation);
$Validation = ($this->FirstName->Validate() && $Validation);
$Validation = ($this->LastName->Validate() && $Validation);
//$Validation = ($this->CCNumber->Validate() && $Validation);
//$Validation = ($this->ExpDate->Validate() && $Validation);
//$Validation = ($this->CardCode->Validate() && $Validation);
//$Validation = ($this->user_id->Validate() && $Validation);
//$Validation = ($this->date->Validate() && $Validation);
//$Validation = ($this->cause->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate");
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//Operation Method @4-903571D3
function Operation()
{
global $Redirect;
$this->ds->Prepare();
$this->EditMode = $this->ds->AllParametersSet;
if(!($this->Visible && $this->FormSubmitted))
return;
if($this->FormSubmitted) {
$this->PressedButton = "Insert";
if(strlen(CCGetParam("Insert", ""))) {
$this->PressedButton = "Insert";
} else if(strlen(CCGetParam("Cancel", ""))) {
$this->PressedButton = "Cancel";
}
}
$Redirect = "PaymentConfirmed.php?" . CCGetQueryString("QueryString", Array("Insert","Cancel","ccsForm"));
if($this->PressedButton == "Cancel") {
if(!CCGetEvent($this->Cancel->CCSEvents, "OnClick")) {
$Redirect = "";
}
} else if($this->Validate()) {
if($this->PressedButton == "Insert") {
if(!CCGetEvent($this->Insert->CCSEvents, "OnClick") || !$this->InsertRow()) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//InsertRow Method @4-D3C3764F
function InsertRow()
{
global $finalamount;
global $charges;
global $EP;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeInsert");
$this->ds->charge->SetValue($finalamount);
$this->ds->FirstName->SetValue($this->FirstName->GetValue());
$this->ds->LastName->SetValue($this->LastName->GetValue());
$this->ds->CCNumber->SetValue($this->CCNumber->GetValue());
$this->ds->ExpDate->SetValue($this->ExpDate->GetValue());
$this->ds->CardCode->SetValue($this->CardCode->GetValue());
$this->ds->user_id->SetValue(CCGetUserID());
$this->ds->date->SetValue(time());
$this->ds->cause->SetValue("Credit Card Deposit");
$this->ds->Insert();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterInsert");
$lookdb = new clsDBNetConnect;
$lookdb->connect();
$lookdb->query("SELECT * FROM users WHERE user_login='" . CCGetUserLogin() . "'");
if($lookdb->next_record()) {
$ld = array(
"first" => $lookdb->f("first_name"),
"ID" => $lookdb->f("user_id"),
"last" => $lookdb->f("last_name"),
"email" => $lookdb->f("email"),
"address" => $lookdb->f("address1"),
"address2" => $lookdb->f("address2"),
"state" => $lookdb->f("state_id"),
"zip" => $lookdb->f("zip"),
"city" => $lookdb->f("city"),
"phonedy" => $lookdb->f("phone_day"),
"phoneevn" => $lookdb->f("phone_evn"),
"fax" => $lookdb->f("fax"),
"ip" => $lookdb->f("ip_insert"),
"date_created" => $lookdb->f("date_created"),
);
}
$EP["EMAIL:PAYMENT_SUBJECT"] = "Credit Card Deposit";
$EP["EMAIL:PAYMENT_AMOUNT"] = $charges["currency"] . $finalamount;
$EP["EMAIL:CURRENT_USERNAME"] = CCGetUserLogin();
$EP["EMAIL:CURRENT_USERID"] = $ld["ID"];
$EP["EMAIL:CURRENT_USER_FIRST_NAME"] = $ld["first"];
$EP["EMAIL:CURRENT_USER_LAST_NAME"] = $ld["last"];
$EP["EMAIL:CURRENT_USER_EMAIL"] = $ld["email"];
$EP["EMAIL:CURRENT_USER_ADDRESS"] = $ld["address"];
$EP["EMAIL:CURRENT_USER_ADDRESS2"] = $ld["address2"];
$EP["EMAIL:CURRENT_USER_STATE"] = $ld["state"];
$EP["EMAIL:CURRENT_USER_CITY"] = $ld["city"];
$EP["EMAIL:CURRENT_USER_ZIP"] = $ld["zip"];
$EP["EMAIL:CURRENT_USER_DAY_PHONE"] = $ld["phonedy"];
$EP["EMAIL:CURRENT_USER_EVN_PHONE"] = $ld["phoneevn"];
$EP["EMAIL:CURRENT_USER_FAX"] = $ld["fax"];
$EP["EMAIL:CURRENT_USER_IP"] = getenv("REMOTE_ADDR");
$EP["EMAIL:CURRENT_USER__REGISTERED_IP"] = $ld["ip"];
$EP["EMAIL:CURRENT_USER_DATE_SIGNEDUP"] = date("F j, Y, g:i a", $ld["date_created"]);
mailout("MakePayment", 1, $ld["ID"], 1000000000, time(), $EP);
if($this->ds->Errors->Count() > 0)
{
echo "Error in Record " . $this->ComponentName . " / Insert Operation";
$this->ds->Errors->Clear();
$this->Errors->AddError("Database command error.");
}
return ($this->Errors->Count() == 0);
}
//End InsertRow Method
//Show Method @4-7A814808
function Show()
{
global $Tpl;
global $FileName;
$Error = "";
if(!$this->Visible)
return;
$this->ds->open();
$RecordBlock = "Record " . $this->ComponentName;
$Tpl->block_path = $RecordBlock;
if($this->EditMode)
{
if($this->Errors->Count() == 0)
{
if($this->ds->Errors->Count() > 0)
{
echo "Error in Record charges1";
}
else if($this->ds->next_record())
{
$this->ds->SetValues();
if(!$this->FormSubmitted)
{
$this->charge->SetValue($this->ds->charge->GetValue());
$this->user_id->SetValue($this->ds->user_id->GetValue());
$this->date->SetValue($this->ds->date->GetValue());
$this->cause->SetValue($this->ds->cause->GetValue());
}
}
else
{
$this->EditMode = false;
}
}
}
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
if($this->FormSubmitted) {
$Error .= $this->charge->Errors->ToString();
$Error .= $this->FirstName->Errors->ToString();
$Error .= $this->LastName->Errors->ToString();
$Error .= $this->CCNumber->Errors->ToString();
$Error .= $this->ExpDate->Errors->ToString();
$Error .= $this->CardCode->Errors->ToString();
$Error .= $this->user_id->Errors->ToString();
$Error .= $this->date->Errors->ToString();
$Error .= $this->cause->Errors->ToString();
$Error .= $this->Errors->ToString();
$Error .= $this->ds->Errors->ToString();
$Tpl->SetVar("Error", $Error);
$Tpl->Parse("Error", false);
}
$Tpl->SetVar("Action", $this->HTMLFormAction);
$this->Insert->Visible = !$this->EditMode;
$this->charge->Show();
$this->FirstName->Show();
$this->LastName->Show();
$this->CCNumber->Show();
$this->ExpDate->Show();
$this->CardCode->Show();
$this->Insert->Show();
$this->Cancel->Show();
$this->user_id->Show();
$this->date->Show();
$this->cause->Show();
$Tpl->parse("", false);
$Tpl->block_path = "";
}
//End Show Method
} //End charges1 Class @4-FCB6E20C
class clscharges1DataSource extends clsDBNetConnect { //charges1DataSource Class @4-2C64D7E3
//Variables @4-8452207F
var $CCSEvents = "";
var $CCSEventResult;
var $InsertParameters;
var $wp;
var $AllParametersSet;
// Datasource fields
var $charge;
var $FirstName;
var $LastName;
var $CCNumber;
var $ExpDate;
var $CardCode;
var $user_id;
var $date;
var $cause;
//End Variables
//Class_Initialize Event @4-DBE398D2
function clscharges1DataSource()
{
$this->Initialize();
$this->charge = new clsField("charge", ccsFloat, "");
$this->FirstName = new clsField("FirstName", ccsText, "");
$this->LastName = new clsField("LastName", ccsText, "");
$this->CCNumber = new clsField("CCNumber", ccsText, "");
$this->ExpDate = new clsField("ExpDate", ccsText, "");
$this->CardCode = new clsField("CardCode", ccsText, "");
$this->user_id = new clsField("user_id", ccsInteger, "");
$this->date = new clsField("date", ccsInteger, "");
$this->cause = new clsField("cause", ccsMemo, "");
}
//End Class_Initialize Event
//Prepare Method @4-7FAE8833
function Prepare()
{
$this->wp = new clsSQLParameters();
$this->wp->AddParameter("1", "urlcharge_id", ccsInteger, "", "", $this->Parameters["urlcharge_id"], "");
$this->AllParametersSet = $this->wp->AllParamsSet();
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "charge_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger));
$this->wp->AssembledWhere = $this->wp->Criterion[1];
$this->Where = $this->wp->AssembledWhere;
}
//End Prepare Method
//Open Method @4-09BFC025
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect");
$this->SQL = "SELECT * " .
"FROM charges";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect");
$this->query(CCBuildSQL($this->SQL, $this->Where, $this->Order));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect");
$this->MoveToPage($this->AbsolutePage);
}
//End Open Method
//SetValues Method @4-663199F0
function SetValues()
{
$this->charge->SetDBValue($this->f("charge"));
$this->user_id->SetDBValue($this->f("user_id"));
$this->date->SetDBValue($this->f("date"));
$this->cause->SetDBValue($this->f("cause"));
}
//End SetValues Method
//Insert Method @4-5D0AE922
function Insert()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert");
$SQL = "INSERT INTO charges(" .
"charge, " .
"user_id, " .
"date, " .
"cause" .
") VALUES (" .
$this->ToSQL($this->charge->DBValue, $this->charge->DataType) . ", " .
$this->ToSQL($this->user_id->DBValue, $this->user_id->DataType) . ", " .
$this->ToSQL($this->date->DBValue, $this->date->DataType) . ", " .
$this->ToSQL($this->cause->DBValue, $this->cause->DataType) .
")";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert");
$this->query($SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert");
if($this->Errors->Count() > 0)
$this->Errors->AddError($this->Errors->ToString());
}
//End Insert Method
} //End charges1DataSource Class @4-FCB6E20C
Class clsRecordPayPalPay { //PayPalPay Class @23-31D3D601
//Variables @23-90DA4C9A
// Public variables
var $ComponentName;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $FormSubmitted;
var $Visible;
var $Recordset;
var $CCSEvents = "";
var $CCSEventResult;
var $ds;
var $EditMode;
var $ValidatingControls;
var $Controls;
// Class variables
//End Variables
//Class_Initialize Event @23-8E2F0C04
function clsRecordPayPalPay()
{
global $FileName;
$this->Visible = true;
$this->Errors = new clsErrors();
$this->InsertAllowed = false;
$this->UpdateAllowed = false;
$this->DeleteAllowed = false;
if($this->Visible)
{
$this->ComponentName = "PayPalPay";
$this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $this->ComponentName);
$CCSForm = CCGetFromGet("ccsForm", "");
$this->FormSubmitted = ($CCSForm == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->amount = new clsControl(ccsTextBox, "amount", "amount", ccsText, "", CCGetRequestParam("amount", $Method));
}
}
//End Class_Initialize Event
//Validate Method @23-38E76D9E
function Validate()
{
$Validation = true;
$Where = "";
$Validation = ($this->amount->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate");
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//Operation Method @23-C8787856
function Operation()
{
global $Redirect;
$this->EditMode = false;
if(!($this->Visible && $this->FormSubmitted))
return;
$Redirect = "?" . CCGetQueryString("QueryString", Array("ccsForm"));
}
//End Operation Method
//Show Method @23-6D26F467
function Show()
{
global $Tpl;
global $FileName;
$Error = "";
if(!$this->Visible)
return;
$RecordBlock = "Record " . $this->ComponentName;
$Tpl->block_path = $RecordBlock;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
if($this->FormSubmitted) {
$Error .= $this->amount->Errors->ToString();
$Error .= $this->Errors->ToString();
$Tpl->SetVar("Error", $Error);
$Tpl->Parse("Error", false);
}
$Tpl->SetVar("Action", $this->HTMLFormAction);
$Tpl->SetVar("user_payer", CCGetUserID());
//$this->amount->Show();
$Tpl->parse("", false);
$Tpl->block_path = "";
}
//End Show Method
} //End PayPalPay Class @23-FCB6E20C
//Include Page implementation @3-353B2997
include("./Footer.php");
//End Include Page implementation
//Initialize Page @1-DA9638BF
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = "MakePayment.php";
$Redirect = "";
$TemplateFileName = "templates/MakePayment.html";
$BlockToParse = "main";
$PathToRoot = "./";
//End Initialize Page
//Authenticate User @1-7FED0150
CCSecurityRedirect("1;2", "login.php", $FileName, CCGetQueryString("QueryString", ""));
//End Authenticate User
if($SSL_Required == 1){
//Check SSL @1-E30DD771
CCCheckSSL();
//End Check SSL
}
//Initialize Objects @1-256B4093
// Controls
$Header = new clsHeader();
$Header->BindEvents();
$Header->TemplatePath = "./";
$Header->Initialize();
$charges1 = new clsRecordcharges1();
$PayPalPay = new clsRecordPayPalPay();
$Footer = new clsFooter();
$Footer->BindEvents();
$Footer->TemplatePath = "./";
$Footer->Initialize();
$charges1->Initialize();
// Events
include("./MakePayment_events.php");
BindEvents();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
if($accounting["authorize_on"] == 0){
$charges1->Visible = false;
}
if($accounting["paypal_on"] == 0){
$PayPalPay->Visible = false;
}
//Execute Components @1-FC6178F0
$Header->Operations();
$charges1->Operation();
$PayPalPay->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["ItemNum"]){
$db = new clsDBNetConnect;
$query = "select * from items where ItemNum = '" . mysql_escape_string($_GET["ItemNum"]) . "'";
$db->query($query);
if ($db->next_record()){
$Tpl->SetVar("ItemNum", $_GET["ItemNum"]);
$Tpl->SetVar("amount", $db->f("amt_due"));
$Tpl->SetVar("charge", $db->f("amt_due"));
}
}
//Show Page @1-39CAA23C
$Header->Show("Header");
$charges1->Show();
$PayPalPay->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
?>