Skip to content

Commit d15b9cc

Browse files
committed
updated the encryption class. still working on it.
1 parent 905b8a6 commit d15b9cc

File tree

4 files changed

+396
-241
lines changed

4 files changed

+396
-241
lines changed

upload/admin/config.php

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
// HTTP
3+
define('HTTP_SERVER', 'http://localhost/opencart/upload/admin/');
4+
define('HTTP_CATALOG', 'http://localhost/opencart/upload/');
5+
define('HTTP_IMAGE', 'http://localhost/opencart/upload/image/');
6+
7+
// HTTPS
8+
define('HTTPS_SERVER', 'http://localhost/opencart/upload/admin/');
9+
define('HTTPS_CATALOG', 'http://localhost/opencart/upload/');
10+
define('HTTPS_IMAGE', 'http://localhost/opencart/upload/image/');
11+
12+
// DIR
13+
define('DIR_APPLICATION', 'C:\wamp\www\opencart\upload/admin/');
14+
define('DIR_SYSTEM', 'C:\wamp\www\opencart\upload/system/');
15+
define('DIR_DATABASE', 'C:\wamp\www\opencart\upload/system/database/');
16+
define('DIR_LANGUAGE', 'C:\wamp\www\opencart\upload/admin/language/');
17+
define('DIR_TEMPLATE', 'C:\wamp\www\opencart\upload/admin/view/template/');
18+
define('DIR_CONFIG', 'C:\wamp\www\opencart\upload/system/config/');
19+
define('DIR_IMAGE', 'C:\wamp\www\opencart\upload/image/');
20+
define('DIR_CACHE', 'C:\wamp\www\opencart\upload/system/cache/');
21+
define('DIR_DOWNLOAD', 'C:\wamp\www\opencart\upload/download/');
22+
define('DIR_LOGS', 'C:\wamp\www\opencart\upload/system/logs/');
23+
define('DIR_CATALOG', 'C:\wamp\www\opencart\upload/catalog/');
24+
25+
// DB
26+
define('DB_DRIVER', 'mysql');
27+
define('DB_HOSTNAME', 'localhost');
28+
define('DB_USERNAME', 'root');
29+
define('DB_PASSWORD', '');
30+
define('DB_DATABASE', 'opencart');
31+
define('DB_PREFIX', 'oc_');
32+
?>

upload/config.php

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
// HTTP
3+
define('HTTP_SERVER', 'http://localhost/opencart/upload/');
4+
define('HTTP_IMAGE', 'http://localhost/opencart/upload/image/');
5+
define('HTTP_ADMIN', 'http://localhost/opencart/upload/admin/');
6+
7+
// HTTPS
8+
define('HTTPS_SERVER', 'http://localhost/opencart/upload/');
9+
define('HTTPS_IMAGE', 'http://localhost/opencart/upload/image/');
10+
11+
// DIR
12+
define('DIR_APPLICATION', 'C:\wamp\www\opencart\upload/catalog/');
13+
define('DIR_SYSTEM', 'C:\wamp\www\opencart\upload/system/');
14+
define('DIR_DATABASE', 'C:\wamp\www\opencart\upload/system/database/');
15+
define('DIR_LANGUAGE', 'C:\wamp\www\opencart\upload/catalog/language/');
16+
define('DIR_TEMPLATE', 'C:\wamp\www\opencart\upload/catalog/view/theme/');
17+
define('DIR_CONFIG', 'C:\wamp\www\opencart\upload/system/config/');
18+
define('DIR_IMAGE', 'C:\wamp\www\opencart\upload/image/');
19+
define('DIR_CACHE', 'C:\wamp\www\opencart\upload/system/cache/');
20+
define('DIR_DOWNLOAD', 'C:\wamp\www\opencart\upload/download/');
21+
define('DIR_LOGS', 'C:\wamp\www\opencart\upload/system/logs/');
22+
23+
// DB
24+
define('DB_DRIVER', 'mysql');
25+
define('DB_HOSTNAME', 'localhost');
26+
define('DB_USERNAME', 'root');
27+
define('DB_PASSWORD', '');
28+
define('DB_DATABASE', 'opencart');
29+
define('DB_PREFIX', 'oc_');
30+
?>

upload/system/helper/json.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ function json_encode($data) {
4949
$c4 = ord($string[++$i]);
5050

5151
if (($c1 & 8 ) === 0) {
52-
$u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1;
52+
$u = (($c1 & 15) << 2) + (($c2 >> 4) & 3) - 1;
5353

54-
$w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3);
55-
$w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128);
54+
$w1 = (54 << 10) + ($u << 6) + (($c2 & 15) << 2) + (($c3 >> 4) & 3);
55+
$w2 = (55 << 10) + (($c3 & 15) << 6) + ($c4 - 128);
5656
$json .= sprintf("\\u%04x\\u%04x", $w1, $w2);
5757
}
5858
}

0 commit comments

Comments
 (0)