@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | $aPath = explode('/', $this->sPath); |
| 88 | 88 | if (!empty($map[$this->sPath])) { |
| 89 | - $class = '\\HaaseIT\\HCSF\\Controller\\' . $map[$this->sPath]; |
|
| 89 | + $class = '\\HaaseIT\\HCSF\\Controller\\'.$map[$this->sPath]; |
|
| 90 | 90 | } else { |
| 91 | 91 | if ($aPath[1] == HelperConfig::$core['directory_images']) { |
| 92 | 92 | $class = Controller\Glide::class; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } else { // if it is found, go on |
| 133 | 133 | // Support for shorturls |
| 134 | 134 | if ($this->P->cb_pagetype === 'shorturl') { |
| 135 | - header('Location: ' . $this->P->cb_pageconfig, true, 302); |
|
| 135 | + header('Location: '.$this->P->cb_pageconfig, true, 302); |
|
| 136 | 136 | exit(); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -149,14 +149,14 @@ discard block |
||
| 149 | 149 | $this->P->iStatus = 404; |
| 150 | 150 | |
| 151 | 151 | $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T('misc_page_not_found'); |
| 152 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); |
|
| 152 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); |
|
| 153 | 153 | } elseif (!is_object($this->P) && $this->P == 500) { |
| 154 | 154 | $this->P = new CorePage($this->serviceManager); |
| 155 | 155 | $this->P->cb_pagetype = 'error'; |
| 156 | 156 | $this->P->iStatus = 500; |
| 157 | 157 | |
| 158 | 158 | $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T('misc_server_error'); |
| 159 | - header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error'); |
|
| 159 | + header($_SERVER['SERVER_PROTOCOL'].' 500 Internal Server Error'); |
|
| 160 | 160 | } elseif (is_object($this->P) && $this->P->oPayload == NULL) {// elseif the page has been found but contains no payload... |
| 161 | 161 | if ( |
| 162 | 162 | !( |
@@ -166,10 +166,10 @@ discard block |
||
| 166 | 166 | ) |
| 167 | 167 | ) { // no payload is fine if page is one of these |
| 168 | 168 | $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T('misc_content_not_found'); |
| 169 | - header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); |
|
| 169 | + header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); |
|
| 170 | 170 | } |
| 171 | 171 | } elseif ($this->P->oPayload->cl_lang != NULL && $this->P->oPayload->cl_lang != HelperConfig::$lang) { // if the page is available but not in the current language, display info |
| 172 | - $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T('misc_page_not_available_lang') . '<br><br>' . $this->P->oPayload->cl_html; |
|
| 172 | + $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T('misc_page_not_available_lang').'<br><br>'.$this->P->oPayload->cl_html; |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | return $this->P; |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | // to allow dots in the filename, we have to iterate through all parts of the filename |
| 192 | 192 | $aRoutingoverride['itemno'] = ''; |
| 193 | 193 | for ($i = 0; $i < count($aTMP['exploded_request_file']) - 1; $i++) { |
| 194 | - $aRoutingoverride['itemno'] .= $aTMP['exploded_request_file'][$i] . '.'; |
|
| 194 | + $aRoutingoverride['itemno'] .= $aTMP['exploded_request_file'][$i].'.'; |
|
| 195 | 195 | } |
| 196 | 196 | // remove the trailing dot |
| 197 | 197 | $aRoutingoverride['itemno'] = \HaaseIT\Toolbox\Tools::cutStringend($aRoutingoverride['itemno'], 1); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | // rebuild the path string without the trailing '/item/itemno.html' |
| 202 | 202 | $this->sPath = ''; |
| 203 | 203 | for ($i = 0; $i < $aTMP['parts_in_path'] - 2; $i++) { |
| 204 | - $this->sPath .= $aPath[$i] . '/'; |
|
| 204 | + $this->sPath .= $aPath[$i].'/'; |
|
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $this->setupHardcodedTextcats(); |
| 39 | 39 | |
| 40 | - $this->serviceManager->setFactory('db', function () { |
|
| 40 | + $this->serviceManager->setFactory('db', function() { |
|
| 41 | 41 | return null; |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $this->setupTwig(); |
| 51 | 51 | |
| 52 | 52 | if (HelperConfig::$core['enable_module_shop']) { |
| 53 | - $this->serviceManager->setFactory('oItem', function (ServiceManager $serviceManager) { |
|
| 53 | + $this->serviceManager->setFactory('oItem', function(ServiceManager $serviceManager) { |
|
| 54 | 54 | return new \HaaseIT\HCSF\Shop\Items($serviceManager); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | // PSR-7 Stuff |
| 65 | 65 | // Init request object |
| 66 | - $this->serviceManager->setFactory('request', function () { |
|
| 66 | + $this->serviceManager->setFactory('request', function() { |
|
| 67 | 67 | $request = \Zend\Diactoros\ServerRequestFactory::fromGlobals(); |
| 68 | 68 | |
| 69 | 69 | // cleanup request |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | // session.use_trans_sid wenn nötig aktivieren |
| 84 | 84 | ini_set('session.use_only_cookies', 0); |
| 85 | 85 | session_name('sid'); |
| 86 | - if(ini_get('session.use_trans_sid') == 1) { |
|
| 86 | + if (ini_get('session.use_trans_sid') == 1) { |
|
| 87 | 87 | ini_set('session.use_trans_sid', 0); |
| 88 | 88 | } |
| 89 | 89 | // Session wenn nötig starten |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | protected function setupDB() |
| 129 | 129 | { |
| 130 | - $this->serviceManager->setFactory('dbal', function () { |
|
| 130 | + $this->serviceManager->setFactory('dbal', function() { |
|
| 131 | 131 | $config = new \Doctrine\DBAL\Configuration(); |
| 132 | 132 | |
| 133 | 133 | $connectionParams = [ |
@@ -148,14 +148,14 @@ discard block |
||
| 148 | 148 | return \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
| 149 | 149 | }); |
| 150 | 150 | |
| 151 | - $this->serviceManager->setFactory('db', function (ServiceManager $serviceManager) { |
|
| 151 | + $this->serviceManager->setFactory('db', function(ServiceManager $serviceManager) { |
|
| 152 | 152 | return $serviceManager->get('dbal')->getWrappedConnection(); |
| 153 | 153 | }); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | protected function setupTextcats() |
| 157 | 157 | { |
| 158 | - $this->serviceManager->setFactory('textcats', function (ServiceManager $serviceManager) { |
|
| 158 | + $this->serviceManager->setFactory('textcats', function(ServiceManager $serviceManager) { |
|
| 159 | 159 | $langavailable = HelperConfig::$core['lang_available']; |
| 160 | 160 | $textcats = new \HaaseIT\Toolbox\Textcat( |
| 161 | 161 | HelperConfig::$lang, |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | protected function setupTwig() |
| 174 | 174 | { |
| 175 | - $this->serviceManager->setFactory('twig', function (ServiceManager $serviceManager) { |
|
| 175 | + $this->serviceManager->setFactory('twig', function(ServiceManager $serviceManager) { |
|
| 176 | 176 | $loader = new \Twig_Loader_Filesystem([PATH_BASEDIR.'customviews', HCSF_BASEDIR.'src/views/']); |
| 177 | 177 | |
| 178 | 178 | $twig_options = [ |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | unset($sTMP); |
| 95 | 95 | |
| 96 | 96 | if (isset($_REQUEST[$sValue]) && in_array($_REQUEST[$sValue], $aOptions)) { |
| 97 | - $sCartKey .= '|' . $sValue . ':' . $_REQUEST[$sValue]; |
|
| 97 | + $sCartKey .= '|'.$sValue.':'.$_REQUEST[$sValue]; |
|
| 98 | 98 | } else { |
| 99 | 99 | $this->replyToCartUpdate('requiredfieldmissing'); |
| 100 | 100 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | echo $this->serviceManager->get('twig')->render('shop/update-cart.twig', $aAR); |
| 165 | 165 | } else { |
| 166 | - $aMSG['msg'] = $sReply; |
|
| 166 | + $aMSG['msg'] = $sReply; |
|
| 167 | 167 | if (count($aMore)) { |
| 168 | 168 | $aMSG = array_merge($aMSG, $aMore); |
| 169 | 169 | } |
@@ -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 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $postdata = ''; |
| 76 | 76 | |
| 77 | 77 | foreach ($_POST as $i => $v) { |
| 78 | - $postdata .= $i . '=' . urlencode($v) . '&'; |
|
| 78 | + $postdata .= $i.'='.urlencode($v).'&'; |
|
| 79 | 79 | } |
| 80 | 80 | $postdata .= 'cmd=_notify-validate'; |
| 81 | 81 | $web = parse_url(HelperConfig::$shop['paypal']['url']); |
@@ -87,15 +87,15 @@ discard block |
||
| 87 | 87 | $web['port'] = 80; |
| 88 | 88 | $ssl = ''; |
| 89 | 89 | } |
| 90 | - $fp = @fsockopen($ssl . $web['host'], $web['port'], $errnum, $errstr, 30); |
|
| 90 | + $fp = @fsockopen($ssl.$web['host'], $web['port'], $errnum, $errstr, 30); |
|
| 91 | 91 | |
| 92 | 92 | if ($fp) { |
| 93 | - fwrite($fp, 'POST ' . $web['path'] . " HTTP/1.1\r\n"); |
|
| 94 | - fwrite($fp, 'Host: ' . $web['host'] . "\r\n"); |
|
| 93 | + fwrite($fp, 'POST '.$web['path']." HTTP/1.1\r\n"); |
|
| 94 | + fwrite($fp, 'Host: '.$web['host']."\r\n"); |
|
| 95 | 95 | fwrite($fp, "Content-type: application/x-www-form-urlencoded\r\n"); |
| 96 | - fwrite($fp, 'Content-length: ' . strlen($postdata) . "\r\n"); |
|
| 96 | + fwrite($fp, 'Content-length: '.strlen($postdata)."\r\n"); |
|
| 97 | 97 | fwrite($fp, "Connection: close\r\n\r\n"); |
| 98 | - fwrite($fp, $postdata . "\r\n\r\n"); |
|
| 98 | + fwrite($fp, $postdata."\r\n\r\n"); |
|
| 99 | 99 | |
| 100 | 100 | $info = []; |
| 101 | 101 | while (!feof($fp)) { |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | $info = implode(',', $info); |
| 106 | 106 | if (!(strpos($info, 'VERIFIED') === false)) { |
| 107 | 107 | |
| 108 | - $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\n"; |
|
| 108 | + $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\n"; |
|
| 109 | 109 | $sLogData .= "W00T!\n\n"; |
| 110 | - $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true) . "\n\n"; |
|
| 110 | + $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true)."\n\n"; |
|
| 111 | 111 | |
| 112 | 112 | // Check if the transaction id has been used before |
| 113 | 113 | $queryBuilder = $this->dbal->createQueryBuilder(); |
@@ -138,27 +138,27 @@ discard block |
||
| 138 | 138 | ; |
| 139 | 139 | $queryBuilder->execute(); |
| 140 | 140 | |
| 141 | - $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: ' . $_REQUEST['txn_id'] . " --\n\n"; |
|
| 141 | + $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: '.$_REQUEST['txn_id']." --\n\n"; |
|
| 142 | 142 | } else { |
| 143 | 143 | $sLogData .= "-- In my country we have problem; Problem is evaluation. Throw the data down the log!\n"; |
| 144 | - $sLogData .= 'mc_gross: ' . $_REQUEST['mc_gross'] . ' - number_format($fGesamtbrutto, 2, \'.\', \'\'): ' . number_format($fGesamtbrutto, |
|
| 145 | - 2, '.', '') . "\n"; |
|
| 146 | - $sLogData .= 'custom: ' . $_REQUEST['custom'] . ' - $aOrder[\'o_id\']: ' . $aOrder['o_id'] . "\n"; |
|
| 147 | - $sLogData .= 'payment_status: ' . $_REQUEST['payment_status'] . "\n"; |
|
| 148 | - $sLogData .= 'mc_currency: ' . $_REQUEST['mc_currency'] . ' - HelperConfig::$shop["paypal"]["currency_id"]: ' . HelperConfig::$shop['paypal']['currency_id'] . "\n"; |
|
| 149 | - $sLogData .= 'business: ' . $_REQUEST['receiver_email'] . ' - HelperConfig::$shop["paypal"]["business"]: ' . HelperConfig::$shop['paypal']['business'] . "\n\n"; |
|
| 144 | + $sLogData .= 'mc_gross: '.$_REQUEST['mc_gross'].' - number_format($fGesamtbrutto, 2, \'.\', \'\'): '.number_format($fGesamtbrutto, |
|
| 145 | + 2, '.', '')."\n"; |
|
| 146 | + $sLogData .= 'custom: '.$_REQUEST['custom'].' - $aOrder[\'o_id\']: '.$aOrder['o_id']."\n"; |
|
| 147 | + $sLogData .= 'payment_status: '.$_REQUEST['payment_status']."\n"; |
|
| 148 | + $sLogData .= 'mc_currency: '.$_REQUEST['mc_currency'].' - HelperConfig::$shop["paypal"]["currency_id"]: '.HelperConfig::$shop['paypal']['currency_id']."\n"; |
|
| 149 | + $sLogData .= 'business: '.$_REQUEST['receiver_email'].' - HelperConfig::$shop["paypal"]["business"]: '.HelperConfig::$shop['paypal']['business']."\n\n"; |
|
| 150 | 150 | } |
| 151 | 151 | } else { |
| 152 | 152 | // INVALID LOGGING ERROR |
| 153 | - $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL\n\n"; |
|
| 154 | - $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: ' . $_REQUEST['txn_id'] . " !!!\n\n"; |
|
| 153 | + $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL\n\n"; |
|
| 154 | + $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: '.$_REQUEST['txn_id']." !!!\n\n"; |
|
| 155 | 155 | $sLogData .= "!!! INVALID !!!\n\n"; |
| 156 | 156 | } |
| 157 | 157 | } else { |
| 158 | - $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: " . $_REQUEST['txn_id'] . "\n" . $info . "\n\n"; |
|
| 158 | + $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: ".$_REQUEST['txn_id']."\n".$info."\n\n"; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - file_put_contents(PATH_LOGS . FILE_PAYPALLOG, $sLogData, FILE_APPEND); |
|
| 161 | + file_put_contents(PATH_LOGS.FILE_PAYPALLOG, $sLogData, FILE_APPEND); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
@@ -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 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | if (HelperConfig::$shop['email_orderconfirmation_embed_itemimages_method'] === 'glide') { |
| 144 | 144 | $sPathToImage = '/'.HelperConfig::$core['directory_images'].'/'.HelperConfig::$shop['directory_images_items'].'/'; |
| 145 | - $sImageroot = PATH_BASEDIR . HelperConfig::$core['directory_glide_master']; |
|
| 145 | + $sImageroot = PATH_BASEDIR.HelperConfig::$core['directory_glide_master']; |
|
| 146 | 146 | |
| 147 | 147 | if ( |
| 148 | 148 | is_file($sImageroot.substr($sPathToImage.$aV['img'], strlen(HelperConfig::$core['directory_images']) + 1)) |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | 'cache' => PATH_GLIDECACHE, |
| 154 | 154 | 'max_image_size' => HelperConfig::$core['glide_max_imagesize'], |
| 155 | 155 | ]); |
| 156 | - $glideserver->setBaseUrl('/' . HelperConfig::$core['directory_images'] . '/'); |
|
| 156 | + $glideserver->setBaseUrl('/'.HelperConfig::$core['directory_images'].'/'); |
|
| 157 | 157 | $base64Img = $glideserver->getImageAsBase64($sPathToImage.$aV['img'], HelperConfig::$shop['email_orderconfirmation_embed_itemimages_glideparams']); |
| 158 | 158 | $TMP = explode(',', $base64Img); |
| 159 | 159 | $binImg = base64_decode($TMP[1]); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | .HelperConfig::$shop['directory_images_items_email'].'/'; |
| 167 | 167 | if ($aImgInfo = getimagesize($sPathToImage.$aV['img'])) { |
| 168 | 168 | $binImg = file_get_contents($sPathToImage.$aV['img']); |
| 169 | - $base64Img = 'data:' . $aImgInfo['mime'] . ';base64,'; |
|
| 169 | + $base64Img = 'data:'.$aImgInfo['mime'].';base64,'; |
|
| 170 | 170 | $base64Img .= base64_encode($binImg); |
| 171 | 171 | } |
| 172 | 172 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | $sql = DBTools::buildPSInsertQuery($aDataOrder, 'orders'); |
| 243 | 243 | $hResult = $db->prepare($sql); |
| 244 | 244 | foreach ($aDataOrder as $sKey => $sValue) { |
| 245 | - $hResult->bindValue(':' . $sKey, $sValue); |
|
| 245 | + $hResult->bindValue(':'.$sKey, $sValue); |
|
| 246 | 246 | } |
| 247 | 247 | $hResult->execute(); |
| 248 | 248 | $iInsertID = $db->lastInsertId(); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $sql = DBTools::buildPSInsertQuery($aV, 'orders_items'); |
| 278 | 278 | $hResult = $db->prepare($sql); |
| 279 | 279 | foreach ($aV as $sKey => $sValue) { |
| 280 | - $hResult->bindValue(':' . $sKey, $sValue); |
|
| 280 | + $hResult->bindValue(':'.$sKey, $sValue); |
|
| 281 | 281 | } |
| 282 | 282 | $hResult->execute(); |
| 283 | 283 | } |
@@ -315,15 +315,15 @@ discard block |
||
| 315 | 315 | && array_search('paypal', HelperConfig::$shop['paymentmethods']) !== false |
| 316 | 316 | && HelperConfig::$shop['paypal_interactive'] |
| 317 | 317 | ) { |
| 318 | - header('Location: /_misc/paypal.html?id=' . $iInsertID); |
|
| 318 | + header('Location: /_misc/paypal.html?id='.$iInsertID); |
|
| 319 | 319 | } elseif ( |
| 320 | 320 | isset($this->post['paymentmethod']) |
| 321 | 321 | && $this->post['paymentmethod'] === 'sofortueberweisung' |
| 322 | 322 | && array_search('sofortueberweisung', HelperConfig::$shop['paymentmethods']) !== false |
| 323 | 323 | ) { |
| 324 | - header('Location: /_misc/sofortueberweisung.html?id=' . $iInsertID); |
|
| 324 | + header('Location: /_misc/sofortueberweisung.html?id='.$iInsertID); |
|
| 325 | 325 | } else { |
| 326 | - header('Location: /_misc/checkedout.html?id=' . $iInsertID); |
|
| 326 | + header('Location: /_misc/checkedout.html?id='.$iInsertID); |
|
| 327 | 327 | } |
| 328 | 328 | die(); |
| 329 | 329 | } |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | private function sendCheckoutMails($iInsertID, $sMailbody_us, $sMailbody_they, $aImagesToSend) |
| 338 | 338 | { |
| 339 | 339 | if ( |
| 340 | - isset(HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_' .HelperConfig::$lang]) |
|
| 340 | + isset(HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_'.HelperConfig::$lang]) |
|
| 341 | 341 | && file_exists( |
| 342 | 342 | PATH_DOCROOT.HelperConfig::$core['directory_emailattachments'] |
| 343 | 343 | .'/'.HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_' |
@@ -346,21 +346,21 @@ discard block |
||
| 346 | 346 | ) { |
| 347 | 347 | $aFilesToSend[] = |
| 348 | 348 | PATH_DOCROOT.HelperConfig::$core['directory_emailattachments'].'/' |
| 349 | - .HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_' .HelperConfig::$lang]; |
|
| 349 | + .HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_'.HelperConfig::$lang]; |
|
| 350 | 350 | } else { |
| 351 | 351 | $aFilesToSend = []; |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | Helper::mailWrapper( |
| 355 | 355 | $this->post['email'], |
| 356 | - $this->textcats->T('shoppingcart_mail_subject') . ' ' . $iInsertID, |
|
| 356 | + $this->textcats->T('shoppingcart_mail_subject').' '.$iInsertID, |
|
| 357 | 357 | $sMailbody_they, |
| 358 | 358 | $aImagesToSend, |
| 359 | 359 | $aFilesToSend |
| 360 | 360 | ); |
| 361 | 361 | Helper::mailWrapper( |
| 362 | 362 | HelperConfig::$core['email_sender'], |
| 363 | - 'Bestellung im Webshop Nr: ' . $iInsertID, |
|
| 363 | + 'Bestellung im Webshop Nr: '.$iInsertID, |
|
| 364 | 364 | $sMailbody_us, |
| 365 | 365 | $aImagesToSend |
| 366 | 366 | ); |
@@ -371,9 +371,9 @@ discard block |
||
| 371 | 371 | */ |
| 372 | 372 | private function writeCheckoutToFile($sMailbody_us) |
| 373 | 373 | { |
| 374 | - $fp = fopen(PATH_LOGS . 'shoplog_' . date('Y-m-d') . '.html', 'a'); |
|
| 374 | + $fp = fopen(PATH_LOGS.'shoplog_'.date('Y-m-d').'.html', 'a'); |
|
| 375 | 375 | // Write $somecontent to our opened file. |
| 376 | - fwrite($fp, $sMailbody_us . "\n\n-------------------------------------------------------------------------\n\n"); |
|
| 376 | + fwrite($fp, $sMailbody_us."\n\n-------------------------------------------------------------------------\n\n"); |
|
| 377 | 377 | fclose($fp); |
| 378 | 378 | } |
| 379 | 379 | |
@@ -415,9 +415,9 @@ discard block |
||
| 415 | 415 | 'country' => isset($this->post['country']) && trim($this->post['country']) != '' ? |
| 416 | 416 | ( |
| 417 | 417 | isset( |
| 418 | - HelperConfig::$countries['countries_' .HelperConfig::$lang][$this->post['country']] |
|
| 418 | + HelperConfig::$countries['countries_'.HelperConfig::$lang][$this->post['country']] |
|
| 419 | 419 | ) |
| 420 | - ? HelperConfig::$countries['countries_' .HelperConfig::$lang][$this->post['country']] |
|
| 420 | + ? HelperConfig::$countries['countries_'.HelperConfig::$lang][$this->post['country']] |
|
| 421 | 421 | : $this->post['country']) |
| 422 | 422 | : '', |
| 423 | 423 | 'remarks' => $this->getPostValue('remarks'), |
@@ -425,8 +425,8 @@ discard block |
||
| 425 | 425 | 'cancellationdisclaimer' => $this->getPostValue('cancellationdisclaimer'), |
| 426 | 426 | 'paymentmethod' => $this->getPostValue('paymentmethod'), |
| 427 | 427 | 'shippingcost' => !isset($_SESSION['shippingcost']) || $_SESSION['shippingcost'] == 0 ? false : $_SESSION['shippingcost'], |
| 428 | - 'paypallink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'paypal' ? $_SERVER['SERVER_NAME'].'/_misc/paypal.html?id='.$iId : '', |
|
| 429 | - 'sofortueberweisunglink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'sofortueberweisung' ? $_SERVER['SERVER_NAME'].'/_misc/sofortueberweisung.html?id='.$iId : '', |
|
| 428 | + 'paypallink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'paypal' ? $_SERVER['SERVER_NAME'].'/_misc/paypal.html?id='.$iId : '', |
|
| 429 | + 'sofortueberweisunglink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'sofortueberweisung' ? $_SERVER['SERVER_NAME'].'/_misc/sofortueberweisung.html?id='.$iId : '', |
|
| 430 | 430 | 'SESSION' => !$bCust ? Tools::debug($_SESSION, '$_SESSION', true, true) : '', |
| 431 | 431 | 'POST' => !$bCust ? Tools::debug($this->post, '$this->post', true, true) : '', |
| 432 | 432 | 'orderid' => $iId, |
@@ -454,15 +454,15 @@ discard block |
||
| 454 | 454 | ($this->get['msg'] === 'updated' && isset($this->get['cartkey'], $this->get['amount'])) |
| 455 | 455 | || ($this->get['msg'] === 'removed' && isset($this->get['cartkey'])) |
| 456 | 456 | ) { |
| 457 | - $return .= $this->textcats->T('shoppingcart_msg_' . $this->get['msg'] . '_1') . ' '; |
|
| 457 | + $return .= $this->textcats->T('shoppingcart_msg_'.$this->get['msg'].'_1').' '; |
|
| 458 | 458 | if (isset(HelperConfig::$shop['custom_order_fields']) && mb_strpos($this->get['cartkey'], '|') !== false) { |
| 459 | 459 | $mCartkeys = explode('|', $this->get['cartkey']); |
| 460 | 460 | foreach ($mCartkeys as $sKey => $sValue) { |
| 461 | 461 | if ($sKey == 0) { |
| 462 | - $return .= $sValue . ', '; |
|
| 462 | + $return .= $sValue.', '; |
|
| 463 | 463 | } else { |
| 464 | 464 | $TMP = explode(':', $sValue); |
| 465 | - $return .= $this->textcats->T('shoppingcart_item_' . $TMP[0]) . ' ' . $TMP[1] . ', '; |
|
| 465 | + $return .= $this->textcats->T('shoppingcart_item_'.$TMP[0]).' '.$TMP[1].', '; |
|
| 466 | 466 | unset($TMP); |
| 467 | 467 | } |
| 468 | 468 | } |
@@ -470,9 +470,9 @@ discard block |
||
| 470 | 470 | } else { |
| 471 | 471 | $return .= $this->get['cartkey']; |
| 472 | 472 | } |
| 473 | - $return.= ' ' . $this->textcats->T('shoppingcart_msg_' . $this->get['msg'] . '_2'); |
|
| 473 | + $return .= ' '.$this->textcats->T('shoppingcart_msg_'.$this->get['msg'].'_2'); |
|
| 474 | 474 | if ($this->get['msg'] == 'updated') { |
| 475 | - $return .= ' ' . $this->get['amount']; |
|
| 475 | + $return .= ' '.$this->get['amount']; |
|
| 476 | 476 | } |
| 477 | 477 | $return .= '<br><br>'; |
| 478 | 478 | } |
@@ -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['id']) && $_GET['action'] === 'show') { |
| 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 | |
@@ -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 | } |