Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,130
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Magictallguy

  1. The `updates` table contains the timestamps of each "cron". Use the 5min timestamp to calculate how long is left until the next tick and format that result. For live counters, combine with a little JavaScript
  2. Awesome. How about helping the OP achieve the same effect? 😉
  3. PayPal released breaking changes to their API about 5-6 years after this was originally released. The listener part of this IPN implementation will not work.
  4. A donator package system with perks for donators
  5. Horrible markup aside, you're missing a <script> tag and a " <link href="DailyPlanner.css" rel="stylesheet"/> <table id="game"> <tbody> <tr id="8" onclick="myFunction(this.id)"> <th>08:00</th> <td colspan="4" rowspan="2" class="stage-saturn">Welcome</td> </tr> <tr id="830" onclick="myFunction(this.id)"> <th>08:30</th> </tr> <tr id="9" onclick="myFunction(this.id)"> <th>09:00</th> <td id="9text" colspan="4" class="stage-earth">Speaker One <span>Earth Stage</span></td> </tr> <tr id="930" onclick="myFunction(this.id)">" > <th>09:30</th> <td id="930text" colspan="4" class="stage-earth">Speaker Two <span>Earth Stage</span></td> </tr> <tr id="10" onclick="myFunction(this.id)"> <th>10:00</th> <td colspan="4" class="stage-earth">Speaker Three <span>Earth Stage</span></td> </tr> <tr id="1030" onclick="myFunction(this.id)"> <th>10:30</th> <td colspan="4" class="stage-earth">Speaker Four <span>Earth Stage</span></td> </tr> <tr id="11"> <th>11:00</th> <td rowspan="5" class="stage-mercury">Speaker Five <span>Mercury Stage</span></td> <td rowspan="5" class="stage-venus">Speaker Six <span>Venus Stage</span></td> <td rowspan="5" class="stage-mars">Speaker Seven <span>Mars Stage</span></td> <td rowspan="2" class="stage-saturn">Lunch</td> </tr> <tr id="1130"> <th>11:30</th> </tr> <tr id="12"> <th>12:00</th> <td rowspan="3" class="stage-saturn">Break</td> </tr> <tr id="1230"> <th>12:30</th> </tr> <tr> <tr id="1"> <th>1</th> <td colspan="4" rowspan="2" class="stage-earth">Speaker Eight <span>Earth Stage</span></td> </tr> <tr id="2"> <th>2:00</th> </tr> <tr> <th>2:30</th> <tr> <th>3:00</th> </tr> <tr> <th>3:30</th> </tr> <tr> <th>4</th> </tr> <tr> <th>4:30</th> </tr> <tr> <th>5:00</th> </tr> <tr> <th>5:30</th> </tr> <tr> <th>6:00</th> </tr> <tr> <th>6:30</th> <td colspan="4" class="stage-earth">Speaker Nine <span>Earth Stage</span></td> </tr> <tr> <th>7:00</th> <td colspan="2" rowspan="2" class="stage-earth">Speaker Ten <span>Earth Stage</span></td> <td colspan="2" rowspan="2" class="stage-jupiter">Speaker Eleven <span>Jupiter Stage</span></td> </tr> <tr> <th>7:30</th> </tr> <tr> <th>20:00</th> <td colspan="2" class="stage-mars">Speaker Twelve <span>Mars Stage</span></td> <td class="stage-jupiter">Speaker Thirteen <span>Jupiter Stage</span></td> <td class="stage-jupiter">Speaker Fourteen <span>Jupiter Stage</span></td> </tr> <tr> <th>20:30</th> <td colspan="4" rowspan="2" class="stage-saturn">Drinks</td> </tr> <tr> <th>21:00</th> </tr> </tbody> </table> <script> $(function () { $("#dialog").dialog({ autoOpen: false, show: { effect: "blind", duration: 1000let }, hide: { effect: "explode", duration: 1000 } }); }); </script> <div id="dialog" title="Basic dialog"> <p> This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the &apos; x &apos; icon. </p> </div> <script type="text/javascript"> let x; let allowedActions = [ "Grand Theft Auto", "Hacking", "Robbery", "Mugging", "Forgery", "Randomness*" ]; let planner = [ "8", "830", "9", "930", "10", "1030", "11", "1130", "12", "1230", "1", "130", "2", "230", "3", "330", "4", "430", "5", "530", "6", "630", "7", "730" ]; for (x = 0; x < planner.length; x++) { planner[x] = ""; } function myFunction(ID) { $("#dialog").dialog("open"); alert(ID); // let IDRef = ID + "text"; let x = document.getElementById(ID + "text"); document.body.innerHTML = document.body.innerHTML.replace(x.innerHTML, 'Hello World'); } </script>
  6. *Very* minor thing here; you can shorthand your elem.on('click', function () {}); to elem.click(() => {});
  7. You're missing a =
  8. Pure JavaScript
  9. It is undefined - you're missing a =
  10. Command Run ON != timestamp tickers
  11. 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=''>
  12. 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
  13. Max dimensions and lightbox!
  14. 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')
  15. Because they are? Nice work on the template though, a little bit o' nostalgia juice!
  16. 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
  17. Yes, it can! It would take a little work to be at strict PHP7.4 standards, but it's definitely possible
  18. 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, ]); } }
  19. Quite unlikely to be an attack then. I'll give the class another look
  20. 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
  21. "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')
  22. 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
  23. Heh, we ended up doing something quite similar. Nicely done! 🙂
×
×
  • Create New...