-
Posts
2,124 -
Joined
-
Last visited
-
Days Won
144
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
You're missing a =
-
It is undefined - you're missing a =
-
Command Run ON != timestamp tickers
-
watch out from this man (1992ashman1992, Danny_T)
Magictallguy replied to ags_cs4's topic in General
-
Blumentals Rapid PHP editor 2010
Magictallguy replied to mdshare's topic in Programming Tools, Software and much more
JetBrains PhpStorm ❤️ -
Standard HTML for ya here - wrap it in an img tag. Replace print $equip[$ir['equip_primary']]['itmpic']. " with echo "<img src='".$equip[$ir['equip_primary']]['itmpic']."' alt=''>
-
All a computer can do is count (add and subtract). All we've done is give it new ways to count - ultimately boiling down back to a bunch of integers. I.e., we created translation packs to trick a compressed lightning rock into thinking
-
Max dimensions and lightbox!
-
Offending line: isset() returns a boolean. This will always succeed. if ( isset($data['yesorno']) // check var existence && $data['yesorno'] === 'yes' // check it *exactly* equals yes ) // Same as above, but as one line if (isset($data['yesorno']) && $data['yesorno'] === 'yes')
- 1 reply
-
- 1
-
-
Because they are? Nice work on the template though, a little bit o' nostalgia juice!
-
Lines 97 and 106 of ipn_donator.php, and line 39 of the addition to itemuse.php make calls to mysql_error(). In PHP7, mysql_*() functions don't exist. In this instance, those calls can be safely removed
-
Yes, it can! It would take a little work to be at strict PHP7.4 standards, but it's definitely possible
-
Please copy and paste your code - a screenshot of it can make it harder to debug. On line 101, you have a variable `$garage` which does not appear to have been defined within that function or passed in via function parameters or global scoping. The code implies that it's supposed to send an error message if `$garage['GA_exhaust']` doesn't match the DB result, however, the code actually reads as setting an array key within the `$garage` var but doesn't use it. On line 112, you have another seemingly undefined variable `$value`. I've split the logics combining non-existent row with user doesn't own. What happens after trying this? (Note: Written in English. Hungarian is not a strong point of mine) public function method_exhaust() { // Get vehicle and adjoining garage data $stmt = $this->db->prepare('SELECT * FROM garage INNER JOIN cars ON CA_id = GA_car WHERE GA_id = :car '); $stmt->bindParam(':car', $this->methodData->car); $stmt->execute(); $car = $stmt->fetchObject(); if(empty($car)) { // row not found $this->alerts[] = $this->page->buildElement('error', ['text' => 'Car doesn\'t exist']); } elseif ($car->GA_uid != $this->user->id) { // row doesn't belong to user $this->alerts[] = $this->page->buildElement('error', ['text' => 'Car isn\'t yours']); } elseif ($garage['GA_exhaust'] != $this->garage->info->GA_exhaust) { // selected car part doesn't match garage entry $this->alerts[] = $this->page->buildElement('error', ['text' => 'Mismatched parts']); } elseif ($value > $this->user->info->US_money) { // Not enough money $this->alerts[] = $this->page->buildElement('error', ['text', 'Not enough money. $'.number_format($value).' required']); } else { // Make purchase // Update garage $garage = $this->db->prepare('UPDATE garage SET GA_exhaust = GA_exhaust + 100 WHERE GA_id = :id'); $garage->bindParam(':id', $car->GA_id); $garage->execute(); // Take cost $money = $this->db->prepare('UPDATE userStats SET US_money = US_money - 1000000 WHERE US_id = :id'); $money->bindParam(':id', $this->user->id); $money->execute(); // Hook it $actionHook = new hook('userAction'); $actionHook->run([ 'user' => $this->user->id, 'module' => 'tuning.exhaust', 'id' => $car->CA_id, 'success' => true, 'reward' => $value, ]); } }
-
Quite unlikely to be an attack then. I'll give the class another look
-
That's the "replace BBC with HTML" part. As-is, that part is fine. Something is adding the eval flag to the parse. Suggestion: Check the content you're attempting to convert - you may have someone attempting to do something they shouldn't
-
"Column count doesn't match value count" - you're attempting to insert 10 values into a table that doesn't have 10 columns. Alter the query to insert the correct amount of values (in the correct order), or add named values*. * INSERT INTO table_name (col_1, col_2, col_3) VALUES ('some', 'values', 'here')
-
I once turned a Sony Xperia XA2 into a portable fileserver, but not a webserver. That being said, I haven't owned any kind of mobile device for about a year now and code from my desktop only
-
Heh, we ended up doing something quite similar. Nicely done! 🙂
-
Not quite what he was asking. He's after the brain bit behind it (the bit on your site)
-
Are you wanting to work with someone, or are they working for you?
-
The original image is an SVG. PHP doesn't have any native image handling libraries and GD (usually compiled with PHP by default these days) can't support the SVG format. If you've got Imagick installed, then you're good to go. If not, then I recommend a 3rd party service such as CloudConvert, they have an API exposed (in a format you're more accustomed to, Sim) that allows you to convert on-demand from within your own site.
-
This is also not a bug. In most casinos that support the 5-card trick, the dealer can't benefit from it. I have little-to-no experience with GL, so I can't direct you to the exact line. I theorise that it may simply be the order of processing - if the dealer's hand is checked before the player's hand, for example
-
Your Marketplace listing has been restored 🙂
-
Example implementation: 2020-08-27_09-25-22.mp4