Skip to content

Commit

Permalink
Merge pull request renlok#1 from renlok/master
Browse files Browse the repository at this point in the history
Update repo
  • Loading branch information
LOD121 authored Dec 3, 2017
2 parents 67de255 e837708 commit 0ec735f
Show file tree
Hide file tree
Showing 690 changed files with 1,259 additions and 52,571 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@ Options All -Indexes
<Files ~ "\.(log|tpl)$">
order allow,deny
deny from all
</files>
</Files>

# BLOCK BLANK USER AGENTS
RewriteCond %{HTTP_USER_AGENT} ^-?$
Expand Down
4 changes: 3 additions & 1 deletion active_auctions.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down Expand Up @@ -31,6 31,7 @@
$query = "SELECT count(id) AS auctions FROM " . $DBPrefix . "auctions
WHERE user = :user_id
AND closed = 0
AND suspended = 0
AND starts <= CURRENT_TIMESTAMP";
$params = array();
$params[] = array(':user_id', $user_id, 'int');
Expand All @@ -53,6 54,7 @@
$query = "SELECT * FROM " . $DBPrefix . "auctions
WHERE user = :user_id
AND closed = 0
AND suspended = 0
AND starts <= CURRENT_TIMESTAMP
ORDER BY ends ASC LIMIT :offset, :perpage";
$params = array();
Expand Down
2 changes: 1 addition & 1 deletion admin/aboutus.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/accounts.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/activatenewsletter.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/addnew.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/adminusers.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/analytics.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/auctions.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/banips.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/banners.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/boards.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/boardsettings.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/buyerprivacy.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/buyitnow.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions admin/categories.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand All @@ -20,7 20,7 @@

$catscontrol = new MPTTcategories();

function search_cats($parent_id, $level)
function search_cats()
{
global $catscontrol;

Expand All @@ -42,7 42,7 @@ function rebuild_cat_file()

$output = "<?php\n";
$output .= "$" . "category_names = " . var_export($cats, true) . ";\n\n";
$output .= "$" . "category_plain = " . var_export(search_cats(0, 0), true) . ";\n";
$output .= "$" . "category_plain = " . var_export(search_cats(), true) . ";\n";

$handle = fopen(MAIN_PATH . 'language/' . $system->SETTINGS['defaultlanguage'] . '/categories.inc.php', 'w');
fputs($handle, $output);
Expand Down
6 changes: 3 additions & 3 deletions admin/categoriestrans.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand All @@ -21,7 21,7 @@
$lang = (isset($_GET['lang'])) ? $_GET['lang'] : $system->SETTINGS['defaultlanguage'];
$catscontrol = new MPTTcategories();

function search_cats($parent_id, $level)
function search_cats()
{
global $catscontrol;
$catstr = '';
Expand Down Expand Up @@ -58,7 58,7 @@ function rebuild_cat_file($cats)

$output .= "$" . "category_plain = array(\n0 => ''";

$output .= search_cats(0, 0);
$output .= search_cats();

$output .= ");";

Expand Down
2 changes: 1 addition & 1 deletion admin/catsorting.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
31 changes: 21 additions & 10 deletions admin/checkversion.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand All @@ -18,19 18,30 @@
include INCLUDE_PATH . 'functions_admin.php';
include 'loggedin.inc.php';

if (!($realversion = load_file_from_url('http://www.webidsupport.com/version.txt'))) {
$template->assign_block_vars('alerts', array('TYPE' => 'error', 'MESSAGE' => $MSG['error_file_access_disabled']));
$realversion = $MSG['unknown'];
$realversion = '0.0';
switch ($system->SETTINGS['version_check']) {
case 'unstable':
$url = 'http://raw.githubusercontent.com/renlok/WeBid/dev/install/thisversion.txt';
break;
default:
$url = 'http://raw.githubusercontent.com/renlok/WeBid/master/install/thisversion.txt';
break;
}

if (version_compare($system->SETTINGS['version'], $realversion, "<")) {
$myversion = '<span style="color:#ff0000;">' . $system->SETTINGS['version'] . '</span>';
$text = $MSG['outdated_version'];
if (!($realversion = load_file_from_url($url))) {
$text = $MSG['error_file_access_disabled'];
$realversion = $MSG['unknown'];
$myversion = $system->SETTINGS['version'];
} else {
$myversion = '<span style="color:#00ae00;">' . $system->SETTINGS['version'] . '</span>';
$text = $MSG['current_version'];
if (version_compare($system->SETTINGS['version'], $realversion, "<")) {
$myversion = '<span style="color:#ff0000;">' . $system->SETTINGS['version'] . '</span>';
$text = $MSG['outdated_version'];
} else {
$myversion = '<span style="color:#00ae00;">' . $system->SETTINGS['version'] . '</span>';
$text = $MSG['current_version'];
}
}


$template->assign_vars(array(
'SITEURL' => $system->SETTINGS['siteurl'],
'TEXT' => $text,
Expand Down
2 changes: 1 addition & 1 deletion admin/clear_image_cache.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/clearcache.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/contactseller.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/cookiespolicy.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/counters.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/countries.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/currency.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/defaultcountry.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/deleteauction.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/deletebanner.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/deletemessage.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/deletenews.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
13 changes: 7 additions & 6 deletions admin/deleteuser.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down Expand Up @@ -104,17 104,18 @@
$bid_data = $db->fetchall();
foreach ($bid_data as $row) {
$params = array();
$extra = '';
// check if user is highest bidder
if ($row['current_bid'] == $row['bid']) {
$query = "SELECT bid FROM " . $DBPrefix . "bids WHERE auction = :auc_id ORDER BY bid DESC LIMIT 1, 1";
$query = "SELECT id, bid FROM " . $DBPrefix . "bids WHERE auction = :auc_id ORDER BY bid DESC LIMIT 1, 1";
$params[] = array(':auc_id', $row['id'], 'int');
$db->query($query, $params);
$next_bid = $db->result('bid');
$next_bid = $db->result();
// set new highest bid
$params = array();
$extra = ", current_bid = :next_bid, current_bid_id = :current_bid_id";
$params[] = array(':next_bid', $next_bid, 'float');
$params[] = array(':current_bid_id', $row['id'], 'int');
$extra = ", current_bid = :current_bid, current_bid_id = :current_bid_id";
$params[] = array(':current_bid', $next_bid['bid'], 'float');
$params[] = array(':current_bid_id', $next_bid['bid_id'], 'int');
}
$query = "UPDATE " . $DBPrefix . "auctions SET num_bids = num_bids - 1" . $extra . " WHERE id = :auc_id";
$params[] = array(':auc_id', $row['id'], 'int');
Expand Down
2 changes: 1 addition & 1 deletion admin/deleteuserfeed.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/displaysettings.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion admin/durations.php
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?php
/***************************************************************************
* copyright : (C) 2008 - 2016 WeBid
* copyright : (C) 2008 - 2017 WeBid
* site : http://www.webidsupport.com/
***************************************************************************/

Expand Down
Loading

0 comments on commit 0ec735f

Please sign in to comment.