Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by scootstah

  1. No, then you are repeating a ton of code. wiredesignz' widget plugin might be a good solution here.
  2. ClanCMS uses CodeIgniter, which I am familiar with. Is "squads" a model? I don't believe you can access models in that way from a view. You really shouldn't be anyway though, you should be getting that stuff in the controller and then passing it to the view.
  3. It's a matter of slow AND using a good algorithm. MD5 and SHA1 were never meant to be used for password security. They are used for utilities, like checksums. They are very fast and don't have a lot of entropy. It is relatively easy to brute force or find collisions. So, what you need is something that is meant for storing passwords, and that is bcrypt. If you don't want to use bcrypt, you can also be pretty safe using PBKDF2 with SHA512, and 10k iterations or so.
  4. Any PHP errors? Is error reporting turned on? To make sure, put this at the top of your script: error_reporting(-1); ini_set('display_errors', 1);
  5. So what is the issue here?
  6. The only thing I can see being a problem is running utilities which need to fetch all of the files in the directory, like ls.
  7. You should just be assigning roles and permissions in the database, and then use PHP to figure out which menus they can access based on the aforementioned roles and permissions. Check out this article: http://phpmaster.com/role-based-access-control-in-php/
  8. I just ran a script that copied a file called "this & that.txt" using copy() and there was no problems. Post the rest of your code please.
  9. It shouldn't if it is declared outside the function first. That's true for Javascript, but not PHP. To make it work the way you are saying, you'd have to use g*****. Ahhhhhhh! You said the G word!! Keep in mind that I wasn't necessarily saying that you should use globals, just that you would have to in order to modify out-of-scope variables within a function without using a return. This wouldn't work: $foo = 'bar'; function f() { $foo = 'foobar'; } f(); echo $foo; // 'bar' It would have to be like this: $foo = 'bar'; function f() { global $foo; $foo = 'foobar'; } f(); echo $foo; // 'foobar'; Or, as xyph pointed out, like this: (but I don't know if this is any better than using global) $foo = 'bar'; function f() { $GLOBALS['foo'] = 'foobar'; } f(); echo $foo; // 'foobar';
  10. Because with output buffering, PHP basically "holds on to" any output until the end of script execution (or until the output buffering is otherwise ended). It is common practice to omit the closing PHP tag (?>) to prevent any accidental white-space. The closing tag is not required.
  11. Something like... $i = 1; while($row = mysql_fetch_array($info)) { $myname = $row['name']; $myid = $row['itemid']; $myimage = $row['image']; $mydesc = $ow['description']; $myrarity = $row['rarity']; echo "<div style=\"float:left;\">$myname<br><img src=/images/items/$myimage></div>"; if ($i % 4 == 0) { echo '<br style="clear:both;" />'; } $i++; }
  12. It will probably work, but it's not the best solution.
  13. ciaobellaphotography.us - memory is around ~78,000-83,000K, CPU peaks at about 24% briefly, Javascript memory is ~13,000K ciaobellaphotography.us/index2.php - memory is around ~46,000-58,000K - CPU peaks at 18-20% briefly, Javascript memory is ~8,000K So, it looks like index2.php performs a tiny bit better. As far as unresponsiveness or any visual lag, I don't notice any between the two on my machine.
  14. You could just do if ($is_num !== "")
  15. It shouldn't if it is declared outside the function first. That's true for Javascript, but not PHP. To make it work the way you are saying, you'd have to use global.
  16. This topic has been moved to CSS Help. http://forums.phpfreaks.com/index.php?topic=363084.0
  17. You need to remove float: left; from the li styling.
  18. Huh? Your link doesn't work.
  19. You didn't specify a database user.
  20. Please put code in tags. 1. So, what is the output? 2. Is there an error perhaps? Do you have error reporting on? Are you using Apache?
  21. Where are $errors and $typecheck defined?
  22. Use JSON in the jQuery AJAX methods with "post" as the type. Then the $_POST array will be made up from the JSON keys. var name = $('input[name="name"]').val(), email = $('input[name="email"]').val(), address = $('input[name="address"]').val(); $.ajax({ url: example.com, data: { name: name, email : email, address : address }, type: "post" }); $_POST will look like: $_POST = Array ( 'name' => 'bob', 'email' => 'bob@example.com', 'address' => '123 someplace' )
  23. That wouldn't do anything, since $cmin is already greater than $cmax.
  24. Remove the $. echo cField(0,999999,500);
  25. Really? Do you really think you are going to get help with that kind of douchey attitude? You have been given the correct answer in the first reply. PHP is not obfuscated, it is plain-text. Anyone can remove the credits. Anyone can remove the code that safeguards the credits. It doesn't matter if your client knows PHP or not; it's not too hard to either figure out how to remove something like that or to find someone else who will. So in short: either get paid, or get a contract that makes it illegal to remove the credits. Then run a script on your own server that pings the client's website to make sure the credits are still there.
×
×
  • 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.