Projekt

Allgemein

Profil

GX-Bug #60215 » activate.php

Wilken Haase, 18.05.2019 22:41

 
1
<?php
2
/* --------------------------------------------------------------
3
   Yoochoose GmbH
4
   http://www.yoochoose.com
5
   Copyright (c) 2011 Yoochoose GmbH
6
   Released under the GNU General Public License (Version 2)
7
   [http://www.gnu.org/licenses/gpl-2.0.html]
8
   --------------------------------------------------------------
9
 */
10
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');
11

    
12
	$fwdYoo = array();
13

    
14
	if (defined('STORE_OWNER'))               $fwdYoo["billing.company"] = STORE_OWNER;
15
	if (defined('STORE_OWNER_EMAIL_ADDRESS')) $fwdYoo["billing.email"]   = STORE_OWNER_EMAIL_ADDRESS;
16
    
17
    if (defined('TRADER_FIRSTNAME')) $fwdYoo["billing.firstName"] = TRADER_FIRSTNAME;
18
    if (defined('TRADER_NAME'))      $fwdYoo["billing.lastName"]  = TRADER_NAME;
19
    
20
    if (defined('TRADER_STREET'))       $fwdYoo["billing.address1"] = TRADER_STREET . " " . defined('TRADER_STREET_NUMBER') ? TRADER_STREET_NUMBER : "";
21
    if (defined('TRADER_TEL'))          $fwdYoo["billing.phone"]       = TRADER_TEL;
22
    if (defined('TRADER_ZIPCODE'))      $fwdYoo["billing.zip"]         = TRADER_ZIPCODE;
23
    if (defined('TRADER_LOCATION'))     $fwdYoo["billing.city"]        = TRADER_LOCATION;
24
    if (defined('PAYPAL_COUNTRY_MODE')) $fwdYoo["billing.countryCode"] = PAYPAL_COUNTRY_MODE;
25

    
26
    if (defined('HTTP_SERVER'))      $fwdYoo["booking.website"]  = HTTP_SERVER;
27
    if (defined('DEFAULT_CURRENCY')) $fwdYoo["booking.currency"] = DEFAULT_CURRENCY;
28
    if (defined('DATE_TIMEZONE'))    $fwdYoo["booking.timeZone"] = DATE_TIMEZONE;
29
    if (defined('DEFAULT_LANGUAGE')) $fwdYoo["booking.lang"]     = DEFAULT_LANGUAGE;
30
    
31
    $fwdYoo["return.url"] = DIR_WS_ADMIN . "yoochoose.php?page=config";
32
    $fwdYoo["return.param.mandator"] = "YOOCHOOSE_ID";
33
    $fwdYoo["return.param.licenseKey"] = "YOOCHOOSE_SECRET";
34
    
35
    if (defined('ENABLE_SSL'))
36
	{
37
		if (ENABLE_SSL == 'true') {
38
			$fwdYoo["return.url"] = HTTPS_SERVER . $fwdYoo["return.url"];
39
		}
40
    } else {
41
    	$fwdYoo["return.url"] = HTTP_SERVER . $fwdYoo["return.url"];
42
    }
43
    
44
define('BOILERPLATE_URL', "http://www.yoochoose.com/gambio-boilerplate"); //"http://www.yoochoose.com/gambio-boilerplate"
45

    
46
try {
47
	$html = load_url_ex(BOILERPLATE_URL);
48
} catch (IOException $e) {
49
	$html = "";
50
	just_log_recommendation(E_WARNING, "Error fetching pricing information.".$e->getMessage());
51
}
52

    
53

    
54
function  fetch_p($html, $id, $default="") {
55
	$pattern = '/<p[^<>]*id=["\']'.preg_quote($id).'["\'][^<>]*>(.*?)<\\/p>/ims';
56
	
57
	$matches = "";
58
	
59
	if (preg_match($pattern, $html, $matches)) {
60
		return $matches[1];
61
	} else {
62
		return "";
63
	}
64
}
65

    
66

    
67
?>
68

    
69
<div style="padding: 20px 40px 40px 40px;" class="yoo-image1-large">
70

    
71
<table style="border-style: none; margin: 0 auto;" cellspacing="0">
72
<tr><td>
73

    
74
<?php require(DIR_FS_ADMIN . "includes/modules/yoochoose/info_$langXX.php"); ?>
75

    
76
</td><td valign="top">
77

    
78
<form class="yoochoose_prefs" name="yoochoose_prefs" method="POST" target="_blank" action="<?php echo $regpage;?>">
79
    <div class="one-button" style="margin: 165px 0 25px 3em;">
80
        <?php 
81
            foreach ($fwdYoo as $key => $value) {
82
                echo "<input type='hidden' name='$key' value='".htmlentities($value)."'>";
83
            }
84
        ?>
85
        <?php echo fetch_p($html, "$langXX-registration-box")?>
86
        <input type="submit" class="button" style="width: 200px;" value="<?php echo sprintf(YOOCHOOSE_REGISTER_BTN)?>" name="btn"/>
87
    </div>
88
</form>
89

    
90

    
91
<form class="yoochoose_prefs" name="yoochoose_prefs" method="POST" action="yoochoose.php?page=config">
92
    <div class="one-button" style="margin: 0 0 25px 3em;">
93
        <?php echo YOOCHOOSE_ACTIVATE_CONTENT?>
94
        <input type='hidden' name='YOOCHOOSE_ACTIVE' value='checked'>
95
        <input type="submit" class="button" style="width: 200px;" value="<?php echo sprintf(YOOCHOOSE_ACTIVATE_BTN)?>" name="btn"/>
96
    </div>
97
</form>
98

    
99
<div style="width: 250px; margin: 0 0 25px 4em; font-size: 0.8em">
100
	<?php echo fetch_p($html, "$langXX-registration-footnote")?>
101
</div>
102

    
103

    
104

    
105
</td></tr>
106
</table>
107

    
108
</div>
(1-1/3)