Posted By


krillzip on 01/11/11

Tagged


Statistics


Viewed 722 times
Favorited by 1 user(s)

Related snippets


defaultadmin.php


/ Published in: PHP
Save to your folder(s)

Skeleton for the main panel in a CMSMS module. defaultadmin.php


Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. if (!isset($gCms))
  4.  
  5. if (false == empty($params['active_tab'])) {
  6. $tab = $params['active_tab'];
  7. } else {
  8. $tab = '';
  9. }
  10.  
  11. echo $this->StartTabHeaders();
  12.  
  13. echo $this->SetTabHeader('tab1', $this->Lang('tab_1'), ('tab1' == $tab) ? true : false);
  14. echo $this->SetTabHeader('tab2', $this->Lang('tab_2'), ('tab2' == $tab) ? true : false);
  15. echo $this->SetTabHeader('tab3', $this->Lang('tab_3'), ('tab3' == $tab) ? true : false);
  16. echo $this->SetTabHeader('tab4', $this->Lang('tab_4'), ('tab4' == $tab) ? true : false);
  17.  
  18. echo $this->EndTabHeaders();
  19.  
  20. echo $this->StartTabContent();
  21.  
  22. echo $this->StartTab('tab1', $params);
  23. include(dirname(__FILE__) . '/function.admin_tab1.php');
  24. echo $this->EndTab();
  25.  
  26. echo $this->StartTab('tab2', $params);
  27. include(dirname(__FILE__) . '/function.admin_tab2.php');
  28. echo $this->EndTab();
  29.  
  30. echo $this->StartTab('tab3', $params);
  31. include(dirname(__FILE__) . '/function.admin_tab3.php');
  32. echo $this->EndTab();
  33.  
  34. echo $this->StartTab('tab4', $params);
  35. include(dirname(__FILE__) . '/function.admin_tab4.php');
  36. echo $this->EndTab();
  37.  
  38. echo $this->EndTabContent();
  39. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.