| 1: | <?php
|
| 2: | include_once(SphpBase::sphp_settings()->comp_uikit_path . "/bundle/menu/BootstrapMenu.php");
|
| 3: | class MenuUi extends BootstrapMenu{
|
| 4: | public function onstart() {
|
| 5: |
|
| 6: | $this->sphp_api->addMenu("Home", "","fa fa-home","root");
|
| 7: | $this->sphp_api->addMenuLink("Home", SphpBase::sphp_settings()->base_path,"fa fa-home","Home");
|
| 8: | $this->sphp_api->addMenuLink("Contact Us", getEventURL('page','contacts','index2'),"fa fa-fw fa-clock-o","Home");
|
| 9: | if(SphpBase::page()->getAuthenticateType() == "GUEST"){
|
| 10: | $this->sphp_api->addMenuLink("Login", getGateURL("signin"),"","Home");
|
| 11: | include_once(PROJ_PATH . "/plugin/cmenu.php");
|
| 12: | include_once($this->frontfiledir . "/menu.php");
|
| 13: | }else{
|
| 14: |
|
| 15: |
|
| 16: | $this->sphp_api->addMenu("User",'',"fa fa-home","root",false,"ADMIN,MEMBER");
|
| 17: | $this->sphp_api->addMenuLink("Users",getGateURL('mebProfile'),"fa fa-users","User",false,"mebProfile-view");
|
| 18: | $this->sphp_api->addMenuLink("Profile Permission",getGateURL('mebProfilePermission'),"fa fa-users","User",false,"mebProfilePermission-view");
|
| 19: |
|
| 20: |
|
| 21: | $this->sphp_api->addMenu("Tools",'',"","root",false,"ADMIN");
|
| 22: | $this->sphp_api->addMenuLink("Plugin Install",getGateURL('installer'),"fa fa-users","Tools");
|
| 23: | $this->sphp_api->addMenuLink("DB Install",getEventURL('install','install','mebhome'),"fa fa-users","Tools");
|
| 24: |
|
| 25: | $this->sphp_api->addMenuLink("Dashboard",getGateURL('mebhome'),"fa fa-home","Home");
|
| 26: | $this->sphp_api->addMenuLink("Logout", getEventURL("logout","","signin"),"","Home");
|
| 27: | include_once(PROJ_PATH . "/plugin/cmenu.php");
|
| 28: | include_once(PROJ_PATH . "/plugin/cmebmenu.php");
|
| 29: | include_once(PROJ_PATH . "/plugin/cadmmenu.php");
|
| 30: | include_once($this->frontfiledir . "/admmenu.php");
|
| 31: | }
|
| 32: | }
|
| 33: |
|
| 34: | public function getHeaderSubMenu() {
|
| 35: | return '<div class="dropdown text-end">
|
| 36: | <a href="#" class="d-block link-body-emphasis text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
| 37: | <img src="'. SphpBase::sphp_settings()->comp_uikit_res_path . "/masters/default/imgs/android-icon-192x192.png" .'" alt="mdo" width="32" height="32" class="rounded-circle">
|
| 38: | </a>
|
| 39: | <ul class="dropdown-menu text-small">
|
| 40: | <li><a class="dropdown-item" href="#">getHeaderSubMenu from menu file</a></li>
|
| 41: | <li><a class="dropdown-item" href="#">for override this</a></li>
|
| 42: | <li><a class="dropdown-item" href="#">Profile</a></li>
|
| 43: | <li><hr class="dropdown-divider"></li>
|
| 44: | <li><a class="dropdown-item" href="#">Sign out</a></li>
|
| 45: | </ul>
|
| 46: | </div>';
|
| 47: | }
|
| 48: | }
|
| 49: | |