product.php
4.88 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<script type="text/javascript" src="assets/components/library/jquery/jquery.min.js"></script>
<?php
/*$userid = base64_decode(base64_decode($_GET['userid']));
$cust_name = base64_decode(base64_decode($_GET['cust_name']));
$cust_id = base64_decode(base64_decode($_GET['cust_id']));
$mobile_number = base64_decode(base64_decode($_GET['mobile_number']));
$emailid = base64_decode(base64_decode($_GET['emailid']));
$product = base64_decode(base64_decode($_GET['product']));
$ip= base64_decode(base64_decode($_GET['ip']));
$username=base64_decode(base64_decode(base64_decode($_GET['username']));
$recordid =base64_decode(base64_decode($_GET['recordid']));
$sessionid = base64_decode(base64_decode($_GET['sessionid']);
$campaign = base64_decode(base64_decode($_GET['campaign']));*/
$userid = base64_decode($_GET['userid']);
$cust_name = base64_decode($_GET['cust_name']);
$custid = base64_decode($_GET['cust_id']);
$mobile_number = base64_decode($_GET['mobile_number']);
$emailid = base64_decode($_GET['emailid']);
$ip= base64_decode($_GET['ip']);
$username=base64_decode($_GET['username']);
$recordid =base64_decode($_GET['recordid']);
$sessionid = base64_decode($_GET['sessionid']);
$campaign = base64_decode($_GET['campaign']);
$userid = base64_decode($userid);
$cust_name = base64_decode($cust_name);
//$cust_id = base64_decode($cust_id);
//$mobile_number = base64_decode($mobile_number);
$emailid = base64_decode($emailid);
//$product = base64_decode($_GET['product']);
//$ip= base64_decode($ip);
//$username=base64_decode($username);
//$recordid =base64_decode($recordid);
$sessionid = base64_decode($sessionid);
$campaign = base64_decode($campaign);
//echo $ip;
$link_central = mysqli_connect("10.3.177.14", "root", "yb9738z", "kstych_flexydial");
$location="";
$type="";
$serverid="";
$locationlist = $link_central->query("select location,id,type from server_details where server_ip='$ip'");
while($locationuser=$locationlist->fetch_object()){
$location=$locationuser->location;
$type=$locationuser->type;
$serverid=$locationuser->id;
}
mysqli_close($link_central);
$link = mysqli_connect("10.3.177.14", "root", "yb9738z", "kstych_flexydial");
$productlist = $link->query("select products from leadform_products");
?>
<body>
<center><h4>Product List</h4></center><br>
<?php
while($product=$productlist->fetch_object())
{
$xmldata="<faml><CUSTID>".$custid."</CUSTID><TRANSACTIONDATE>".date("dmYHis",strtotime("now")+330*60)."</TRANSACTIONDATE><MOBILE>".$mobile_number."</MOBILE><PRODUCT>".$product->products."</PRODUCT><BRANCHCODE>".$location."</BRANCHCODE><LGCODE>".$username."</LGCODE><CHANNEL>".$type."</CHANNEL><LEADSOURCESYSTEMID>".$serverid.$recordid."</LEADSOURCESYSTEMID><LSS_OCCSYSTEMID>".$serverid.$recordid."</LSS_OCCSYSTEMID><JOURNEYTYPE>1</JOURNEYTYPE><SOURCESYSTEM>COP</SOURCESYSTEM><AUTHENTICATIONFLAG>NOT 20AUTHENTICATED</AUTHENTICATIONFLAG><AUTHENTICATIONTYPE>CTI 20INTEGRATION</AUTHENTICATIONTYPE><ALTERNATECONTACTNO>NA</ALTERNATECONTACTNO><FILLER1>NA</FILLER1><FILLER2>NA</FILLER2><FILLER3>NA</FILLER3><FILLER4>NA</FILLER4><FILLER5>NA</FILLER5><RESPONSE></RESPONSE></faml>";
/*$xmldata="<faml><CUSTID>1234567890</CUSTID><TRANSACTIONDATE>20072018120350</TRANSACTIONDATE><MOBILE>9960605943</MOBILE><PRODUCT>AUTO</PRODUCT><BRANCHCODE>Mumbai</BRANCHCODE><LGCODE>B654321</LGCODE><CHANNEL>COP</CHANNEL><LEADSOURCESYSTEMID></LEADSOURCESYSTEMID><LSS_OCCSYSTEMID></LSS_OCCSYSTEMID><JOURNEYTYPE>1</JOURNEYTYPE><SOURCESYSTEM></SOURCESYSTEM><AUTHENTICATIONFLAG>NOT 20AUTHENTICATED</AUTHENTICATIONFLAG><AUTHENTICATIONTYPE>CTI 20INTEGRATION</AUTHENTICATIONTYPE><ALTERNATECONTACTNO>NA</ALTERNATECONTACTNO><FILLER1>NA</FILLER1><FILLER2>NA</FILLER2><FILLER3>NA</FILLER3><FILLER4>NA</FILLER4><FILLER5>NA</FILLER5><RESPONSE></RESPONSE></faml>";*/
$xmldatanew=myUrlEncode($xmldata);
//$xmldatanew=urlencode($xmldata);
//echo $xmldatanew."<br><br>";
?>
<hr><b><a href="http://agdeocc.hbctxdom.com/hdfcdap/daprequester?xml=<?php echo $xmldatanew;?>" target="_blank">
<?php echo $product->products;?></a></b> <br>
</body>
<?php
}
function myUrlEncode($string) {
$entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
$replacements = array('!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");
return str_replace($entities, $replacements, rawurlencode($string));
}
mysqli_close($link);
?>
</html>