Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
bb354a8
Revert "Revert "Use the local spinner.gif rather than rely on an exte…
tgely Feb 5, 2012
5ce0327
Issues #378, #360
tgely Feb 5, 2012
50e829e
Issue #405
tgely Feb 5, 2012
56cc213
Issue #370 Modules sort order bugfix
tgely Feb 5, 2012
c173b5d
The $wrap parameter is no longer used in the core xhtml template issu…
tgely Feb 9, 2012
605296f
Start button solution
tgely Feb 18, 2012
e758091
Function Usage
tgely Feb 18, 2012
4e260cf
Edit tep draw button function
tgely Feb 18, 2012
3ee1224
Revert descriptions
tgely Feb 19, 2012
68938d4
Edit tep draw button function
tgely Feb 18, 2012
a5a3a27
Merge branch 'button_project'
tgely Feb 19, 2012
48688b4
Start utf8 known issues
tgely Feb 19, 2012
2175a25
Database collation checking tool
tgely Feb 19, 2012
b98150f
Update core for database charset
tgely Feb 19, 2012
c97e3f4
Search and Reviews in catalog
tgely Feb 19, 2012
417a47b
Search and Reviews for admin
tgely Feb 19, 2012
fe9818d
Charset compatibility emails
tgely Feb 20, 2012
ec1c420
Revert utf8_issues.txt
tgely Feb 20, 2012
127e44b
Readme for charset package
tgely Feb 20, 2012
3eca547
Fix
tgely Feb 24, 2012
d0804ce
Build test process for charset write-read results
tgely Feb 24, 2012
a15a740
Revert database charset controll and enable create database in install
tgely Feb 26, 2012
d13857d
fix doctype
tgely Feb 29, 2012
2be156e
Merge branch 'ut8_issues'
tgely Feb 29, 2012
3e0d160
Traduction des true/false de configuration de l'admin (suggéré à HPDL)
gnidhal Nov 17, 2010
b4ca712
Extend Traduction des true/false de configuration de l'admin (suggĂ©r…
tgely Mar 11, 2012
e6aded7
Translate login hard coded text in header
tgely Mar 11, 2012
e23bd81
Merge branch 'master' of git://github.com/osCommerce/oscommerce2
tgely Mar 14, 2012
1c60e66
Set charset before installing oscommerce database
tgely Mar 15, 2012
e8ea0b7
légere retouche cosmétique de l'affichage du bouton "refresh" par l'a…
Nov 20, 2010
ed50f2c
Correction of légère retouche cosmétique de l'affichage du bouton
tgely Mar 15, 2012
0cb19dc
Merge branch 'ut8_issues'
tgely Sep 1, 2012
12932dd
Merge branch master https://github.com/osCommerce/oscommerce2
tgely Sep 1, 2012
64757fb
Set languages for google modules
tgely Sep 9, 2012
c99f5f8
issue 501
tgely Sep 12, 2012
c61967a
issue #502
tgely Sep 12, 2012
eb55cec
non-object fix in checkout_process.php
tgely Sep 12, 2012
9060b75
Revert issue 501 for edit more issues in one step
tgely Sep 13, 2012
d53b2df
Issues #501
tgely Sep 13, 2012
a1b14b8
issue #513
tgely Sep 23, 2012
061aade
Issue #514
tgely Sep 23, 2012
25b2fa8
Define at least one Hungary big zone when install store
tgely Sep 23, 2012
a43999b
Tabs in Products Edition
tgely Sep 25, 2012
1b91419
Add No Script message as a header_tag module
gburton Sep 6, 2012
435955a
Add text showing how users can enable javascript.
gburton Sep 24, 2012
5190d46
Validate Burt's noscript tag module
tgely Sep 27, 2012
027ddb9
Noscript in admin site
tgely Sep 27, 2012
0ae97e2
issue #520
tgely Sep 28, 2012
1d7c1a0
when not set admin $logger issue #522
tgely Oct 3, 2012
e0563a1
960gs consistent fix issue #521
tgely Oct 3, 2012
db3ef5e
960gs Template Module
tgely Oct 3, 2012
81de88c
960gs extra CSS Developer module
tgely Oct 3, 2012
95f30d0
Save only BASE TABLE issue #525
tgely Oct 6, 2012
ee38c2f
Clear last tr tag in specials.php
tgely Oct 7, 2012
76334eb
Little patch in banner_daily
tgely Oct 9, 2012
86a666c
Fix main install module and list view
tgely Oct 9, 2012
ad8e286
Fix order total modules in install process
tgely Oct 9, 2012
4139dea
Fix payment modules in install process
tgely Oct 9, 2012
eba6113
Fix shipping modules in install process
tgely Oct 9, 2012
3474f83
Let's develop!
tgely Oct 9, 2012
1bd0b0c
When image non exist referal to specials.php
tgely Oct 10, 2012
884000e
Fix order total module
tgely Oct 14, 2012
58eb69c
Fix Moneyorder Module Language file
tgely Oct 14, 2012
bb5a285
Fix when Payment module is no set issue: #529
tgely Oct 14, 2012
e94148d
Utf8 issue for exact search
tgely Oct 14, 2012
2a06cfe
No upload error messages in admin site issue #530
tgely Oct 14, 2012
a5c3704
Revies box not followed template when no reviews
tgely Oct 22, 2012
66c3784
Action recorder fix issue #535
tgely Oct 22, 2012
aa68bbc
special admin forgets page when setting status issue #538
tgely Nov 3, 2012
65ebd86
Cant delete comment in checkout_payment.php. Issue #547
tgely Dec 2, 2012
25c2840
Header Shortcut fix
tgely Dec 2, 2012
595e84f
issue #561 e-notice undefined variable cpath array
Gergely Jan 18, 2013
3a32ddc
issue #565 picture gallery box shadows for more browsers
Gergely Jan 24, 2013
d9fab6b
issue #568 - addition fix in ot_shipping class
Gergely Jan 24, 2013
b831531
issue #567 - non defined fix in who is online
Gergely Jan 24, 2013
db08cc7
issue #243 - undefined rInfo in reviews
Gergely Jan 24, 2013
bba71f7
issue #562 - undefined variable in product attributes
Gergely Jan 24, 2013
8963b8e
issue #566-1 - undefined variable in popup
Gergely Jan 24, 2013
30e015f
issue #197 - decrease server stress in IE with bad image path
Gergely Jan 24, 2013
05387a4
issue #503 - undefined variable in create account
Gergely Jan 24, 2013
3c4a499
Simple Dasboard PHP Error Reader Module
Gergely Jan 24, 2013
8d1c8c6
Fix typo
Gergely Jan 26, 2013
bbe1d28
Dashboard products monitor
Gergely Jan 26, 2013
a5c8a19
Titles position fix for total charts
Gergely Jan 26, 2013
1d99615
SQL session overflowed issue #434
Gergely Jan 26, 2013
11741d4
Htaccess security layer password characters and not isset fix
Gergely Jan 27, 2013
8f2e9bc
Rewrite PHP error log reader to universal Error Log reader
Gergely Jan 27, 2013
0e0ed7c
Merge branch 'error_reader'
Gergely Jan 27, 2013
fd18ca1
Merge branch 'products_monitor'
Gergely Jan 27, 2013
b918b06
Merge branch 'master' of https://github.com/osCommerce/oscommerce2
Gergely Feb 8, 2013
5f92113
Enhance utf8 install process to mysqli_ and PHP 5.4
Gergely Feb 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion catalog/admin/action_recorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText" valign="top"><?php echo $actions_split->display_count($actions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_ENTRIES); ?></td>
<td class="smallText" align="right"><?php echo $actions_split->display_links($actions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], (isset($HTTP_GET_VARS['module']) && in_array($HTTP_GET_VARS['module'], $modules_array) && is_object(${$HTTP_GET_VARS['module']}) ? 'module=' . $HTTP_GET_VARS['module'] : null) . '&' . (isset($HTTP_GET_VARS['search']) && !empty($HTTP_GET_VARS['search']) ? 'search=' . $HTTP_GET_VARS['search'] : null)); ?></td>
<td class="smallText" align="right"><?php echo $actions_split->display_links($actions_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], (isset($HTTP_GET_VARS['module']) && in_array($HTTP_GET_VARS['module'], $modules_array) && is_object(${$HTTP_GET_VARS['module']}) ? 'module=' . $HTTP_GET_VARS['module'] : null) . (isset($HTTP_GET_VARS['search']) && !empty($HTTP_GET_VARS['search']) ? '&search=' . $HTTP_GET_VARS['search'] : null)); ?></td>
</tr>
</table></td>
</tr>
Expand Down
160 changes: 84 additions & 76 deletions catalog/admin/administrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2010 osCommerce
Copyright (c) 2013 osCommerce

Released under the GNU General Public License
*/
Expand Down Expand Up @@ -54,44 +54,48 @@
$username = tep_db_prepare_input($HTTP_POST_VARS['username']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

$check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " where user_name = '" . tep_db_input($username) . "' limit 1");
if (ctype_alnum($password)) {
$check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " where user_name = '" . tep_db_input($username) . "' limit 1");

if (tep_db_num_rows($check_query) < 1) {
tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')");
if (tep_db_num_rows($check_query) < 1) {
tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')");

if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);

if ($ht_username == $username) {
unset($htpasswd_array[$i]);
if ($ht_username == $username) {
unset($htpasswd_array[$i]);
}
}
}

if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
}

$fp = fopen(DIR_FS_ADMIN . '.htpasswd_oscommerce', 'w');
fwrite($fp, implode("\n", $htpasswd_array));
fclose($fp);
if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
}

if (!in_array('AuthUserFile ' . DIR_FS_ADMIN . '.htpasswd_oscommerce', $htaccess_array) && !empty($htpasswd_array)) {
array_splice($htaccess_array, sizeof($htaccess_array), 0, $authuserfile_array);
} elseif (empty($htpasswd_array)) {
for ($i=0, $n=sizeof($htaccess_array); $i<$n; $i++) {
if (in_array($htaccess_array[$i], $authuserfile_array)) {
unset($htaccess_array[$i]);
$fp = fopen(DIR_FS_ADMIN . '.htpasswd_oscommerce', 'w');
fwrite($fp, implode("\n", $htpasswd_array));
fclose($fp);

if (!in_array('AuthUserFile ' . DIR_FS_ADMIN . '.htpasswd_oscommerce', $htaccess_array) && !empty($htpasswd_array)) {
array_splice($htaccess_array, sizeof($htaccess_array), 0, $authuserfile_array);
} elseif (empty($htpasswd_array)) {
for ($i=0, $n=sizeof($htaccess_array); $i<$n; $i++) {
if (in_array($htaccess_array[$i], $authuserfile_array)) {
unset($htaccess_array[$i]);
}
}
}
}

$fp = fopen(DIR_FS_ADMIN . '.htaccess', 'w');
fwrite($fp, implode("\n", $htaccess_array));
fclose($fp);
$fp = fopen(DIR_FS_ADMIN . '.htaccess', 'w');
fwrite($fp, implode("\n", $htaccess_array));
fclose($fp);
}
} else {
$messageStack->add_session(ERROR_ADMINISTRATOR_EXISTS, 'error');
}
} else {
$messageStack->add_session(ERROR_ADMINISTRATOR_EXISTS, 'error');
$messageStack->add_session(ERROR_PASSWORD_CHARACTERS, 'error');
}

tep_redirect(tep_href_link(FILENAME_ADMINISTRATORS));
Expand All @@ -102,75 +106,79 @@
$username = tep_db_prepare_input($HTTP_POST_VARS['username']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

$check_query = tep_db_query("select id, user_name from " . TABLE_ADMINISTRATORS . " where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
$check = tep_db_fetch_array($check_query);
if (ctype_alnum($password)) {
$check_query = tep_db_query("select id, user_name from " . TABLE_ADMINISTRATORS . " where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
$check = tep_db_fetch_array($check_query);

// update username in current session if changed
if ( ($check['id'] == $admin['id']) && ($check['user_name'] != $admin['username']) ) {
$admin['username'] = $username;
}

// update username in htpasswd if changed
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);

if ( ($check['user_name'] == $ht_username) && ($check['user_name'] != $username) ) {
$htpasswd_array[$i] = $username . ':' . $ht_password;
}
// update username in current session if changed
if ( ($check['id'] == $admin['id']) && ($check['user_name'] != $admin['username']) ) {
$admin['username'] = $username;
}
}

tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_name = '" . tep_db_input($username) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");

if (tep_not_null($password)) {
// update password in htpasswd
// update username in htpasswd if changed
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);

if ($ht_username == $username) {
unset($htpasswd_array[$i]);
if ( ($check['user_name'] == $ht_username) && ($check['user_name'] != $username) ) {
$htpasswd_array[$i] = $username . ':' . $ht_password;
}
}
}

tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_name = '" . tep_db_input($username) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");

if (tep_not_null($password)) {
// update password in htpasswd
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);

if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
if ($ht_username == $username) {
unset($htpasswd_array[$i]);
}
}

if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
}
}
}

tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_password = '" . tep_db_input(tep_encrypt_password($password)) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
} elseif (!isset($HTTP_POST_VARS['htaccess']) || ($HTTP_POST_VARS['htaccess'] != 'true')) {
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);
tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_password = '" . tep_db_input(tep_encrypt_password($password)) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
} elseif (!isset($HTTP_POST_VARS['htaccess']) || ($HTTP_POST_VARS['htaccess'] != 'true')) {
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);

if ($ht_username == $username) {
unset($htpasswd_array[$i]);
if ($ht_username == $username) {
unset($htpasswd_array[$i]);
}
}
}
}
}

// write new htpasswd file
if (is_array($htpasswd_array)) {
$fp = fopen(DIR_FS_ADMIN . '.htpasswd_oscommerce', 'w');
fwrite($fp, implode("\n", $htpasswd_array));
fclose($fp);
// write new htpasswd file
if (is_array($htpasswd_array)) {
$fp = fopen(DIR_FS_ADMIN . '.htpasswd_oscommerce', 'w');
fwrite($fp, implode("\n", $htpasswd_array));
fclose($fp);

if (!in_array('AuthUserFile ' . DIR_FS_ADMIN . '.htpasswd_oscommerce', $htaccess_array) && !empty($htpasswd_array)) {
array_splice($htaccess_array, sizeof($htaccess_array), 0, $authuserfile_array);
} elseif (empty($htpasswd_array)) {
for ($i=0, $n=sizeof($htaccess_array); $i<$n; $i++) {
if (in_array($htaccess_array[$i], $authuserfile_array)) {
unset($htaccess_array[$i]);
if (!in_array('AuthUserFile ' . DIR_FS_ADMIN . '.htpasswd_oscommerce', $htaccess_array) && !empty($htpasswd_array)) {
array_splice($htaccess_array, sizeof($htaccess_array), 0, $authuserfile_array);
} elseif (empty($htpasswd_array)) {
for ($i=0, $n=sizeof($htaccess_array); $i<$n; $i++) {
if (in_array($htaccess_array[$i], $authuserfile_array)) {
unset($htaccess_array[$i]);
}
}
}
}

$fp = fopen(DIR_FS_ADMIN . '.htaccess', 'w');
fwrite($fp, implode("\n", $htaccess_array));
fclose($fp);
$fp = fopen(DIR_FS_ADMIN . '.htaccess', 'w');
fwrite($fp, implode("\n", $htaccess_array));
fclose($fp);
}
} else {
$messageStack->add_session(ERROR_PASSWORD_CHARACTERS, 'error');
}

tep_redirect(tep_href_link(FILENAME_ADMINISTRATORS, 'aID=' . (int)$HTTP_GET_VARS['aID']));
Expand Down
9 changes: 7 additions & 2 deletions catalog/admin/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@
'# Backup Date: ' . date(PHP_DATE_TIME_FORMAT) . "\n\n";
fputs($fp, $schema);

$tables_query = tep_db_query('show tables');
$tables_query = tep_db_query('show full tables where Table_type = "BASE TABLE"');
while ($tables = tep_db_fetch_array($tables_query)) {
list(,$table) = each($tables);

foreach ($tables as $tables_in_database) {
if ($tables_in_database != 'BASE TABLE') {
$table = $tables_in_database;
}
}

$schema = 'drop table if exists ' . $table . ';' . "\n" .
'create table ' . $table . ' (' . "\n";
Expand Down
2 changes: 1 addition & 1 deletion catalog/admin/banner_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function popupImageWindow(url) {
</tr>
<tr>
<td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?></td>
<td class="main"><?php echo tep_draw_textarea_field('banners_html_text', 'soft', '60', '5', $bInfo->banners_html_text); ?></td>
<td class="main"><?php echo tep_draw_textarea_field('banners_html_text', '60', '5', $bInfo->banners_html_text); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
Expand Down
Loading