Jump to content

requinix

Administrators
  • Posts

    15,289
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. Unless I missed it, I didn't hear about any data that's different between the various users. Which means it's easier to go with a flattened approach: one single table holds all the users, and you can store the user type in a field. In code you can have multiple user classes with different methods for the different functionalities (and without any additional data). All three inherit from the base class and otherwise aren't related to each other. I don't see how traits or even interfaces fit into this.
  2. You try to echo the articles on a different page and... what? What happens? And given that you're doing this on a different page, is the code for category.php or loopnew.php even relevant?
  3. Insert what number into where? What exactly is it you need to do? What's wrong with the HTML/PHP you have now?
  4. Can you create cartons from individual pieces? If so then the system only needs to recognize that a "carton" is 15 pieces. Sure you'll display it different for the user, but ultimately it doesn't really matter because the person is getting 15. If not then you need two inventory items, cartons and pieces, a mechanism that can "break down" a carton into the individual pieces, and a system that will understand that it can do the breakdown (based on arithmetic) and deduct from either/both inventory counts as necessary.
  5. ajaxleadsreport is an action (not a controller) which means it gets invoked by the controller (which is the class) when it handles the route. If the indexreport view needs to render the ajaxleadsreport view then the listsreport action (method) should pass the necessary information into the indexreport view which will eventually pass the necessary information into the ajaxleadsreport view. So the ajaxleadsreport action (method) is not going to be used. Action renders view which renders another view.
  6. Have you tried simply calling the ajaxleadsreport method?
  7. "Best" is extremely subjective. What ideas have you come up with so far?
  8. If it has the undesired behavior with inline-block and the desired behavior without inline-block then it sounds like you've found the source of your problem. By editing the CSS? If it's there now then that probably means something needs to use it. If so then you need to do something special for your span, but without knowing more about... well, everything, it would be really hard to give any sort of specific advice. Perhaps you shouldn't be using a span at all?
  9. The path. They provided concrete paths instead of using the SSH_AUTH_SOCK variable, suggesting either the variable was wrong or there are multiple socks and only one works.
  10. It's been only two hours, and it's Thursday night in the US. Be patient. It sounds like you know what you need the tax_query to be, but it also sounds like you don't quite know how $event_cat_name is formed. What is the exact value of $event_cat_name? As in if you print_r it.
  11. How should I know? It's your website, not mine. You have to perform some forensic work to find out exactly what happened and when, then track that down to the flaw in your application/webserver/whatever, then address the flaw. Here, I think the most likely problem is an unvalidated upload of PHP code. So look for files that don't belong on the server.
  12. You on a Mac? Is the $SSH_AUTH_SOCK path correct? I can find a number of comments talking about how mounting $SSH_AUTH_SOCK doesn't work.
  13. Some problem lead to the malevolent software being added to your site. You have to find and fix that.
  14. Are you sure that display() has executed by the time you try to call count()? What's the rest of the code involving the $comment object?
  15. Sure looks like it, yeah. See how many times it repeats the "PHP"? Check the php.ini you edited.
  16. No, "dio.so[P​HP]" is not in there. "dio.so" is, but that's not the file PHP is trying to load...
  17. It's a subtle distinction but don't let yourself fall into the trap of thinking traits constitute composition. Because they don't. Traits are only code reuse. So the question is whether "language-assisted copy-and-paste" is the solution to the problem. And sometimes it is. But I don't think this is one of those times. The way I see it, it isn't so much about a hierarchy but about a relationship: a "tenant" user is associated with a tenant, a "vendor" user is associated with a vendor (which is associated with a tenant), and a "super" user is associated with zero(?)-or-more tenants. What's your UML for the users? In other words, what kinds of properties do the different types of users have, and thus how are they different from each other?
  18. Why aren't you using <select>s?
  19. Don't do date math on Unix timestamps. MySQL is perfectly capable of doing date arithmetic using DATETIMEs with INTERVALs, and in PHP you should always load the date into a DateTime object and use its add/sub/modify methods. See above. Details would be nice. Especially where (SQL or PHP?) and when (manipulating data or displaying values to the user?) you want to do the math.
  20. What's going on here is that you think "20211021141214" is a number. It is not. It is a string made up of the characters 0-9. That string is not a useful timestamp. Either store your date as a regular DATETIME/TIMESTAMP like "2021-10-21 14:12:14" (easier to work with in SQL) or store it as a Unix timestamp like 1634825534 (easier to work with in PHP).
  21. It's needed in both. Your code worked for the exact same reason that it did not work before. If you have a <div> then the style.display is nothing because there is no actual value set, even though the effective value is "block". Why I think what is a stupid question?
  22. You're really making it sound like you don't actually understand the difference between = and ==. style.display will return the actual value set with CSS. It will not return the effective value if the value isn't set.
  23. Have you tried troubleshooting this on your own?
  24. Like how $inactive_status is never assigned a value. Or how it would be set to true if any of the agents are status=N. And I don't understand why you have all this stuff dealing with $statuses and $display_names. That's the general idea, though what you have there won't work (see what I said above). You can throw class names onto whatever elements you want to represent whatever information you want, then add CSS rules to target things you care about. Consider this: $month = 10; $year = 2021; $daysinmonth = date("t", mktime(0, 0, 0, $month, 1, $year)); for ($day = 1; $day <= $daysinmonth; $day++) { $date = mktime(0, 0, 0, $month, $day, $year); list($monthname, $dayname, $weekday, $fulldate) = explode("/", date("F/l/N/F jS", $date)); $isweekday = $weekday <= 5; ?> <span class="month-<?=$monthname?> day-<?=$dayname?> <?=$isweekday ? 'is-weekday' : 'is-weekend'?>"> <?=$fulldate?> is a <?=$dayname?> </span> <?php } ?> outputs <span class="month-October day-Friday is-weekday">October 1st is a Friday</span> <span class="month-October day-Saturday is-weekend">October 2nd is a Saturday</span> <span class="month-October day-Sunday is-weekend">October 3rd is a Sunday</span> <span class="month-October day-Monday is-weekday">October 4th is a Monday</span> ... and then you can do things like .day-Monday::after { content: "😢"; } .day-Friday::after { content: "šŸŽ‰"; } .is-weekend { background-color: #ccc; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.