@@ -105,7 +105,9 @@ |
||
105 | 105 | ]; |
106 | 106 | $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id'); |
107 | 107 | $hResult = $this->db->prepare($sql); |
108 | - foreach ($aData as $sKey => $sValue) $hResult->bindValue(':'.$sKey, $sValue); |
|
108 | + foreach ($aData as $sKey => $sValue) { |
|
109 | + $hResult->bindValue(':'.$sKey, $sValue); |
|
110 | + } |
|
109 | 111 | $hResult->execute(); |
110 | 112 | |
111 | 113 | $sTargetAddress = $aResult['cust_email']; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR); |
83 | 83 | $hResult->execute(); |
84 | 84 | $iRows = $hResult->rowCount(); |
85 | - if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>'; |
|
85 | + if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse").'<br>'; |
|
86 | 86 | $sErr = CHelper::validateCustomerForm(HelperConfig::$lang, $sErr, true); |
87 | 87 | |
88 | 88 | if ($sErr == '') { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id'); |
111 | 111 | $hResult = $this->db->prepare($sql); |
112 | 112 | foreach ($aData as $sKey => $sValue) { |
113 | - $hResult->bindValue(':' . $sKey, $sValue); |
|
113 | + $hResult->bindValue(':'.$sKey, $sValue); |
|
114 | 114 | } |
115 | 115 | $hResult->execute(); |
116 | 116 | $aPData["infochangessaved"] = true; |
@@ -82,7 +82,9 @@ |
||
82 | 82 | $hResult->bindValue(':email', $sEmail, \PDO::PARAM_STR); |
83 | 83 | $hResult->execute(); |
84 | 84 | $iRows = $hResult->rowCount(); |
85 | - if ($iRows == 1) $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>'; |
|
85 | + if ($iRows == 1) { |
|
86 | + $sErr .= $this->textcats->T("userprofile_emailalreadyinuse") . '<br>'; |
|
87 | + } |
|
86 | 88 | $sErr = CHelper::validateCustomerForm(HelperConfig::$lang, $sErr, true); |
87 | 89 | |
88 | 90 | if ($sErr == '') { |
@@ -108,8 +108,12 @@ discard block |
||
108 | 108 | if ( |
109 | 109 | strlen($_POST["pwd"]) < HelperConfig::$customer["minimum_length_password"] |
110 | 110 | || strlen($_POST["pwd"]) > HelperConfig::$customer["maximum_length_password"] |
111 | - ) $aErr[] = 'pwlength'; |
|
112 | - if ($_POST["pwd"] != $_POST["pwdc"]) $aErr[] = 'pwmatch'; |
|
111 | + ) { |
|
112 | + $aErr[] = 'pwlength'; |
|
113 | + } |
|
114 | + if ($_POST["pwd"] != $_POST["pwdc"]) { |
|
115 | + $aErr[] = 'pwmatch'; |
|
116 | + } |
|
113 | 117 | if (count($aErr) == 0) { |
114 | 118 | $sEnc = password_hash($_POST["pwd"], PASSWORD_DEFAULT); |
115 | 119 | $aData = [ |
@@ -119,7 +123,9 @@ discard block |
||
119 | 123 | ]; |
120 | 124 | $sql = \HaaseIT\Toolbox\DBTools::buildPSUpdateQuery($aData, 'customer', 'cust_id'); |
121 | 125 | $hResult = $this->db->prepare($sql); |
122 | - foreach ($aData as $sKey => $sValue) $hResult->bindValue(':'.$sKey, $sValue); |
|
126 | + foreach ($aData as $sKey => $sValue) { |
|
127 | + $hResult->bindValue(':'.$sKey, $sValue); |
|
128 | + } |
|
123 | 129 | $hResult->execute(); |
124 | 130 | } |
125 | 131 | } else { |
@@ -69,17 +69,17 @@ |
||
69 | 69 | |
70 | 70 | $sPaypalURL = HelperConfig::$shop["paypal"]["url"] |
71 | 71 | .'?cmd=_xclick&rm=2&custom=' |
72 | - .$iId . '&business='.HelperConfig::$shop["paypal"]["business"]; |
|
73 | - $sPaypalURL .= '¬ify_url=http://' . $_SERVER["SERVER_NAME"] . '/_misc/paypal_notify.html&item_name=' . $this->textcats->T("misc_paypaypal_paypaltitle") . ' ' . $iId; |
|
74 | - $sPaypalURL .= '¤cy_code=' . HelperConfig::$shop["paypal"]["currency_id"] |
|
75 | - .'&amount=' . str_replace(',', '.', number_format($fGesamtbrutto, 2, '.', '')); |
|
72 | + .$iId.'&business='.HelperConfig::$shop["paypal"]["business"]; |
|
73 | + $sPaypalURL .= '¬ify_url=http://'.$_SERVER["SERVER_NAME"].'/_misc/paypal_notify.html&item_name='.$this->textcats->T("misc_paypaypal_paypaltitle").' '.$iId; |
|
74 | + $sPaypalURL .= '¤cy_code='.HelperConfig::$shop["paypal"]["currency_id"] |
|
75 | + .'&amount='.str_replace(',', '.', number_format($fGesamtbrutto, 2, '.', '')); |
|
76 | 76 | if (HelperConfig::$shop["interactive_paymentmethods_redirect_immediately"]) { |
77 | - header('Location: ' . $sPaypalURL); |
|
77 | + header('Location: '.$sPaypalURL); |
|
78 | 78 | die(); |
79 | 79 | } |
80 | 80 | |
81 | - $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_greeting") . '<br><br>'; |
|
82 | - $this->P->oPayload->cl_html .= '<a href="' . $sPaypalURL . '">' . $this->textcats->T("misc_paypaypal") . '</a>'; |
|
81 | + $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_greeting").'<br><br>'; |
|
82 | + $this->P->oPayload->cl_html .= '<a href="'.$sPaypalURL.'">'.$this->textcats->T("misc_paypaypal").'</a>'; |
|
83 | 83 | } else { |
84 | 84 | $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_paymentnotavailable"); |
85 | 85 | } |
@@ -42,24 +42,24 @@ |
||
42 | 42 | |
43 | 43 | header("Content-Type: text/html; charset=UTF-8"); |
44 | 44 | $return = '<div>'; |
45 | - $return .= '<div id="shippingcostbrutto_new">' . number_format($_SESSION["cartpricesums"]["fVersandkostenbrutto"], |
|
45 | + $return .= '<div id="shippingcostbrutto_new">'.number_format($_SESSION["cartpricesums"]["fVersandkostenbrutto"], |
|
46 | 46 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
47 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
48 | - $return .= '<div id="vatfull_new">' . number_format(round($_SESSION["cartpricesums"]["fSteuervoll"], 2), |
|
47 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
48 | + $return .= '<div id="vatfull_new">'.number_format(round($_SESSION["cartpricesums"]["fSteuervoll"], 2), |
|
49 | 49 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
50 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
51 | - $return .= '<div id="totalbrutto_new">' . number_format(round($_SESSION["cartpricesums"]["fGesamtbrutto"], 2), |
|
50 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
51 | + $return .= '<div id="totalbrutto_new">'.number_format(round($_SESSION["cartpricesums"]["fGesamtbrutto"], 2), |
|
52 | 52 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
53 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
54 | - $return .= '<div id="shippingcostnetto_new">' . number_format($_SESSION["cartpricesums"]["fVersandkostennetto"], |
|
53 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
54 | + $return .= '<div id="shippingcostnetto_new">'.number_format($_SESSION["cartpricesums"]["fVersandkostennetto"], |
|
55 | 55 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
56 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
57 | - $return .= '<div id="vatreduced_new">' . number_format(round($_SESSION["cartpricesums"]["fSteuererm"], 2), |
|
56 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
57 | + $return .= '<div id="vatreduced_new">'.number_format(round($_SESSION["cartpricesums"]["fSteuererm"], 2), |
|
58 | 58 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
59 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
60 | - $return .= '<div id="totalnetto_new">' . number_format(round($_SESSION["cartpricesums"]["fGesamtnetto"], 2), |
|
59 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
60 | + $return .= '<div id="totalnetto_new">'.number_format(round($_SESSION["cartpricesums"]["fGesamtnetto"], 2), |
|
61 | 61 | HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'], |
62 | - HelperConfig::$core['numberformat_thousands_seperator']) . '</div>'; |
|
62 | + HelperConfig::$core['numberformat_thousands_seperator']).'</div>'; |
|
63 | 63 | $return .= '</div>'; |
64 | 64 | die($return); |
65 | 65 | } |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | if (!CHelper::getUserData()) { |
57 | 57 | $this->P->oPayload->cl_html = $this->textcats->T("denied_notloggedin"); |
58 | 58 | } else { |
59 | - require_once PATH_BASEDIR . 'src/shop/functions.shoppingcart.php'; |
|
59 | + require_once PATH_BASEDIR.'src/shop/functions.shoppingcart.php'; |
|
60 | 60 | |
61 | 61 | $this->P->cb_customcontenttemplate = 'shop/myorders'; |
62 | 62 | |
63 | 63 | if (isset($_GET["action"]) && $_GET["action"] == 'show' && isset($_GET["id"])) { |
64 | 64 | $iId = \filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT); |
65 | 65 | |
66 | - $sql = "SELECT * FROM " . 'orders WHERE o_id = :id AND o_custno = \'' . $_SESSION['user']['cust_no'] . '\' AND o_ordercompleted != \'d\''; |
|
66 | + $sql = "SELECT * FROM ".'orders WHERE o_id = :id AND o_custno = \''.$_SESSION['user']['cust_no'].'\' AND o_ordercompleted != \'d\''; |
|
67 | 67 | $hResult = $this->db->prepare($sql); |
68 | 68 | $hResult->bindValue(':id', $iId); |
69 | 69 | $hResult->execute(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $aOrder["o_ordertimestamp"] |
77 | 77 | ); |
78 | 78 | $this->P->cb_customdata['orderdata']['orderremarks'] = $aOrder["o_remarks"]; |
79 | - $this->P->cb_customdata['orderdata']['paymentmethod'] = $this->textcats->T("order_paymentmethod_" . $aOrder["o_paymentmethod"]); |
|
79 | + $this->P->cb_customdata['orderdata']['paymentmethod'] = $this->textcats->T("order_paymentmethod_".$aOrder["o_paymentmethod"]); |
|
80 | 80 | $this->P->cb_customdata['orderdata']['paymentcompleted'] = (($aOrder["o_paymentcompleted"] == 'y') ? $this->textcats->T("myorders_paymentstatus_completed") : $this->textcats->T("myorders_paymentstatus_open")); |
81 | 81 | $this->P->cb_customdata['orderdata']['orderstatus'] = SHelper::showOrderStatusText($this->textcats, $aOrder["o_ordercompleted"]); |
82 | 82 | $this->P->cb_customdata['orderdata']['shippingservice'] = $aOrder["o_shipping_service"]; |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | } |
119 | 119 | } else { |
120 | 120 | $COList = [ |
121 | - ['title' => $this->textcats->T("order_head_orderdate"), 'key' => 'o_ordertime', 'width' => 110, 'linked' => false,], |
|
122 | - ['title' => $this->textcats->T("order_head_paymenthethod"), 'key' => 'o_paymentmethod', 'width' => 125, 'linked' => false,], |
|
123 | - ['title' => $this->textcats->T("order_head_paid"), 'key' => 'o_paymentcompleted', 'width' => 60, 'linked' => false,], |
|
124 | - ['title' => $this->textcats->T("order_head_status"), 'key' => 'o_order_status', 'width' => 80, 'linked' => false,], |
|
125 | - ['title' => $this->textcats->T("order_head_shipping_service"), 'key' => 'o_shipping_service', 'width' => 90, 'linked' => false,], |
|
126 | - ['title' => $this->textcats->T("order_head_shipping_trackingno"), 'key' => 'o_shipping_trackingno', 'width' => 130, 'linked' => false,], |
|
121 | + ['title' => $this->textcats->T("order_head_orderdate"), 'key' => 'o_ordertime', 'width' => 110, 'linked' => false, ], |
|
122 | + ['title' => $this->textcats->T("order_head_paymenthethod"), 'key' => 'o_paymentmethod', 'width' => 125, 'linked' => false, ], |
|
123 | + ['title' => $this->textcats->T("order_head_paid"), 'key' => 'o_paymentcompleted', 'width' => 60, 'linked' => false, ], |
|
124 | + ['title' => $this->textcats->T("order_head_status"), 'key' => 'o_order_status', 'width' => 80, 'linked' => false, ], |
|
125 | + ['title' => $this->textcats->T("order_head_shipping_service"), 'key' => 'o_shipping_service', 'width' => 90, 'linked' => false, ], |
|
126 | + ['title' => $this->textcats->T("order_head_shipping_trackingno"), 'key' => 'o_shipping_trackingno', 'width' => 130, 'linked' => false, ], |
|
127 | 127 | [ |
128 | 128 | 'title' => $this->textcats->T("order_show"), |
129 | 129 | 'key' => 'o_id', |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'linked' => true, |
132 | 132 | 'ltarget' => '/_misc/myorders.html', |
133 | 133 | 'lkeyname' => 'id', |
134 | - 'lgetvars' => ['action' => 'show',], |
|
134 | + 'lgetvars' => ['action' => 'show', ], |
|
135 | 135 | ], |
136 | 136 | ]; |
137 | 137 |
@@ -158,14 +158,23 @@ discard block |
||
158 | 158 | while ($aRow = $hResult->fetch()) { |
159 | 159 | $sStatus = SHelper::showOrderStatusText($this->textcats, $aRow["o_ordercompleted"]); |
160 | 160 | |
161 | - if ($aRow["o_paymentmethod"] == 'prepay') $sPaymentmethod = $this->textcats->T("order_paymentmethod_prepay"); |
|
162 | - elseif ($aRow["o_paymentmethod"] == 'paypal') $sPaymentmethod = $this->textcats->T("order_paymentmethod_paypal"); |
|
163 | - elseif ($aRow["o_paymentmethod"] == 'debit') $sPaymentmethod = $this->textcats->T("order_paymentmethod_debit"); |
|
164 | - elseif ($aRow["o_paymentmethod"] == 'invoice') $sPaymentmethod = $this->textcats->T("order_paymentmethod_invoice"); |
|
165 | - else $sPaymentmethod = ucwords($aRow["o_paymentmethod"]); |
|
161 | + if ($aRow["o_paymentmethod"] == 'prepay') { |
|
162 | + $sPaymentmethod = $this->textcats->T("order_paymentmethod_prepay"); |
|
163 | + } elseif ($aRow["o_paymentmethod"] == 'paypal') { |
|
164 | + $sPaymentmethod = $this->textcats->T("order_paymentmethod_paypal"); |
|
165 | + } elseif ($aRow["o_paymentmethod"] == 'debit') { |
|
166 | + $sPaymentmethod = $this->textcats->T("order_paymentmethod_debit"); |
|
167 | + } elseif ($aRow["o_paymentmethod"] == 'invoice') { |
|
168 | + $sPaymentmethod = $this->textcats->T("order_paymentmethod_invoice"); |
|
169 | + } else { |
|
170 | + $sPaymentmethod = ucwords($aRow["o_paymentmethod"]); |
|
171 | + } |
|
166 | 172 | |
167 | - if ($aRow["o_paymentcompleted"] == 'y') $sPaymentstatus = ucwords($this->textcats->T("misc_yes")); |
|
168 | - else $sPaymentstatus = ucwords($this->textcats->T("misc_no")); |
|
173 | + if ($aRow["o_paymentcompleted"] == 'y') { |
|
174 | + $sPaymentstatus = ucwords($this->textcats->T("misc_yes")); |
|
175 | + } else { |
|
176 | + $sPaymentstatus = ucwords($this->textcats->T("misc_no")); |
|
177 | + } |
|
169 | 178 | |
170 | 179 | $aData[] = [ |
171 | 180 | 'o_id' => $aRow["o_id"], |
@@ -181,7 +190,9 @@ discard block |
||
181 | 190 | ]; |
182 | 191 | } |
183 | 192 | $return .= \HaaseIT\Toolbox\Tools::makeListtable($COList, $aData, $this->serviceManager->get('twig')); |
184 | - } else $return .= $this->textcats->T("myorders_no_orders_to_display"); |
|
193 | + } else { |
|
194 | + $return .= $this->textcats->T("myorders_no_orders_to_display"); |
|
195 | + } |
|
185 | 196 | |
186 | 197 | return $return; |
187 | 198 | } |
@@ -72,14 +72,14 @@ |
||
72 | 72 | .'&project_id='.HelperConfig::$shop["sofortueberweisung"]["project_id"].'&amount=' |
73 | 73 | .number_format($fGesamtbrutto, 2, '.', '') |
74 | 74 | .'&currency_id='.HelperConfig::$shop["sofortueberweisung"]["currency_id"].'&reason_1=' |
75 | - .urlencode($this->textcats->T("misc_paysofortueberweisung_ueberweisungsbetreff") . ' ').$iId; |
|
75 | + .urlencode($this->textcats->T("misc_paysofortueberweisung_ueberweisungsbetreff").' ').$iId; |
|
76 | 76 | if (HelperConfig::$shop["interactive_paymentmethods_redirect_immediately"]) { |
77 | - header('Location: ' . $sPURL); |
|
77 | + header('Location: '.$sPURL); |
|
78 | 78 | die(); |
79 | 79 | } |
80 | 80 | |
81 | - $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_greeting") . '<br><br>'; |
|
82 | - $this->P->oPayload->cl_html .= '<a href="' . $sPURL . '">' . $this->textcats->T("misc_paysofortueberweisung") . '</a>'; |
|
81 | + $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_greeting").'<br><br>'; |
|
82 | + $this->P->oPayload->cl_html .= '<a href="'.$sPURL.'">'.$this->textcats->T("misc_paysofortueberweisung").'</a>'; |
|
83 | 83 | } else { |
84 | 84 | $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_paymentnotavailable"); |
85 | 85 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | 'cache' => PATH_GLIDECACHE, |
49 | 49 | 'max_image_size' => HelperConfig::$core['glide_max_imagesize'], |
50 | 50 | ]); |
51 | - $glideserver->setBaseUrl('/' . HelperConfig::$core['directory_images'] . '/'); |
|
51 | + $glideserver->setBaseUrl('/'.HelperConfig::$core['directory_images'].'/'); |
|
52 | 52 | // Generate a URL |
53 | 53 | |
54 | 54 | try { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } elseif (count(HelperConfig::$secrets['admin_users'])) { |
81 | 81 | |
82 | 82 | if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { // fix for php cgi mode |
83 | - list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6))); |
|
83 | + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6))); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { |
@@ -96,12 +96,12 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!$validated) { |
99 | - header('WWW-Authenticate: Basic realm="' . HelperConfig::$secrets['admin_authrealm'] . '"'); |
|
99 | + header('WWW-Authenticate: Basic realm="'.HelperConfig::$secrets['admin_authrealm'].'"'); |
|
100 | 100 | header('HTTP/1.0 401 Unauthorized'); |
101 | 101 | die("Not authorized"); |
102 | 102 | } |
103 | 103 | } else { |
104 | - header('WWW-Authenticate: Basic realm="' . HelperConfig::$secrets['admin_authrealm'] . '"'); |
|
104 | + header('WWW-Authenticate: Basic realm="'.HelperConfig::$secrets['admin_authrealm'].'"'); |
|
105 | 105 | header('HTTP/1.0 401 Unauthorized'); |
106 | 106 | die('Not authorized'); |
107 | 107 | } |