You are not enjoying the benefits offered by registering. To register click here...
  
Forums | Prefs | Your Messages | Members | Recent | Search
Quick Search


Advanced Search
| Calendar | Doc | Dev' Blog! |
Chat (Alpha Version)

Guest, do not forget to login ( Register )
 Top > Forums > This Software > Support, FAQ, How-to's
 [How-To] Make Subpages

Skin Selection:
 (1 pages) 1  
harmor


Story Teller
Group: Developers
Posts: 127
Reputation: 3


Posted on Jul 12, 2006, 6:30 pm by harmor
[How-To] Make Subpages
I'll explain everything later. Right now I'll just post the code so you can examine it.

php Code:
  1. require_once "tidbit.php";
  2. switch($_REQUEST['go'])
  3. {
  4. case 'edit': $c = new Testimonial_Edit(); break;
  5. default: $c = new Testimonial_Home();
  6. }
  7. class Testimonial_Home
  8. {
  9. var $crumbs, $location;
  10.  
  11. function Testimonial_Home()
  12. {
  13. global $TEMPLATE, $USER, $DB, $CONFIG;
  14.  
  15. $this->crumbs = array("Testimonials"=>"?do=testimonials");
  16. $USER->setLocation($this->getLocation());
  17.  
  18. $this->pagename = "testimonials.tpl";
  19. return;
  20. }
  21.  
  22. function getLocation()
  23. {
  24. return $this->location;
  25. }
  26.  
  27. function getPageName()
  28. {
  29. return "testimonials.tpl";
  30. }
  31.  
  32. function getCrumbs()
  33. {
  34. return $this->crumbs;
  35. }
  36. }
  37. class Testimonial_Edit
  38. {
  39. var $crumbs, $location;
  40.  
  41. function Testimonial_Edit()
  42. {
  43. global $TEMPLATE, $USER, $DB, $CONFIG;
  44.  
  45. $this->crumbs = array("Edit Testimonial"=>"?do=testimonials&go=edit");
  46. $USER->setLocation($this->getLocation());
  47.  
  48. $this->pagename = "edit_testimonial.tpl";
  49. return;
  50. }
  51.  
  52. function getLocation()
  53. {
  54. return $this->location;
  55. }
  56.  
  57. function getPageName()
  58. {
  59. return "edit_testimonial.tpl";
  60. }
  61.  
  62. function getCrumbs()
  63. {
  64. return $this->crumbs;
  65. }
  66. }
  67.  


Last edit by harmor on Dec 31, 1969, 7:00 pm
Xen Web Hosting Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more -------------------------------------------------------------------------------------------------------
Chris
Let's hang on to Harmor, it's not everyday that you find people who walk the walk, not just talk the talk.
 
Top

 (1 pages) 1 - Flat Mode | Threaded Mode  
Quick Jump:

         
Page generated in 0.04 seconds (Queries: 0.00) - Cpu: 0.18
Total DB [adodb:mysql] queries: 14
Total Strings Translated: 13
Powered by NextBBS SE v0.4.5 - Copyright © 2007 CFR & The NextBBS Team
Chatbox powered by smiletag