Jump to content

xeross

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xeross's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $step = isset($_GET['step']) ? (int) $_GET['step'] : 1; // Store data in session here if submit data switch($step) { case 1: case 2: ... require("folder/step_". $step . ".php"); break; } ofcourse you could also use a single if statement like: $step = isset($_GET['step']) ? (int) $_GET['step'] : 1; // Store data in session here if submit data if($step > 0 && $step < 5) require("folder/step_". $step . ".php"); Of course it's your choice what you use but 1 of these 2 might be more organized than the else-if example.
  2. No need for disabling unless there's an exploit in your code.
  3. However, what would be the proper place to make the calls to all the controllers, in the dispatcher ?
  4. magic_quotes_gpc = Off This doesn't matter however but mikesta commented on it short_open_tag = On In general not good practice (As xml in files would break it when parsed) And as far as I know he had to find a leak in your site, it shouldn't be caused by your php.ini, it might prevent the exploit from working but it would still be present.
  5. I would use a fall-through switch and save the steps in separate files to maintain some kind of structure.
  6. You mean that you have multiple steps, and each step has a part of the form elements that need to be filled ?
  7. Perhaps output buffering is turned on by default in the php.ini but I don't know if that would make it not work.
  8. Controllers request data from the models, and handle this data accordingly (Possibly saving it for use in the view). Execute multiple controllers for navigation and whatnot and then make the template render everything.
  9. I build this my own, so in some occasions something is worked out the wrong way like in this case the view class. If I got this right I should call controllers to get data and pass it to the view and then finally make that parse it once it got all the data (Navigation, page, etc.), just need to figure out a way to queue the controllers then, hmm.
  10. Hmm, well the way it used to work was that the first $this->_view->display("template_name.tpl"); call would be processed and loaded into a variable and output in the content area of the master template. The way you are saying it would be that the controller or something would set what template it should use and once the controller finishes the template gets parsed with any data the controller stored. Now my view logic is obviously skewed but if I want to call 2 controllers I'd have to make a controller function to somehow load in the controllers and execute their members ?
  11. passthru('/var/php/hash "' . $sanitized_variable . '"'); But you better make it 100% secure because if there's a leak here I'm sure it can be exploited pretty badly.
  12. Well I'm using the .tpl extension but I'm not using smarty, just FYI. Also with use a template do you mean I should use a single master template, and put the logic result into a variable ? Also what if I would ever for some odd reason need to call 2 different controllers for 1 "page" how would I handle that (Has happened before).
  13. You can use a regular expression to extract it.
  14. Bump, I understand this is a big wall of text but it's hard to explain it in fewer words.
×
×
  • 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.