php - OS Ticket not load properly -
my company launched new website os ticket. os ticket attached old wordpress website before make switch. currently, os ticket not load os ticket content , navigation. want migrate os ticket database new website, these errors:
- php error – /support/main.inc.php on line 78
- php error – /support/include/class.nav.php on line 321
if not load, means path not found. don’t know it. appreciated.
[06-sep-2016 09:09:27 america/denver] php warning: include(): failed opening '/support/../wp-blog-header.php' inclusion (include_path='./:/support/include/:/support/include/pear/') in /support/main.inc.php on line 78
<?php /********************************************************************* class.nav.php navigation helper classes. pointless helps keep navigation clean , free errors. peter rotich <peter@osticket.com> copyright (c) 2006-2013 osticket http://www.osticket.com released under gnu general public license without warranty. see license.txt details. vim: expandtab sw=4 ts=4 sts=4: **********************************************************************/ require_once(include_dir.'class.app.php'); class staffnav { var $activetab; var $activemenu; var $panel; var $staff; function staffnav($staff, $panel='staff'){ $this->staff=$staff; $this->panel=strtolower($panel); } function __get($what) { // lazily initialize tabbing system switch($what) { case 'tabs': $this->tabs=$this->gettabs(); break; case 'submenus': $this->submenus=$this->getsubmenus(); break; default: throw new exception($what . ': no such attribute'); } return $this->{$what}; } function getpanel(){ return $this->panel; } function isadminpanel(){ return (!strcasecmp($this->getpanel(),'admin')); } function isstaffpanel() { return (!$this->isadminpanel()); } function getregisteredapps() { return application::getstaffapps(); } function settabactive($tab, $menu=''){ if($this->tabs[$tab]){ $this->tabs[$tab]['active']=true; if($this->activetab && $this->activetab!=$tab && $this->tabs[$this->activetab]) $this->tabs[$this->activetab]['active']=false; $this->activetab=$tab; if($menu) $this->setactivesubmenu($menu, $tab); return true; } return false; } function setactivetab($tab, $menu=''){ return $this->settabactive($tab, $menu); } function getactivetab(){ return $this->activetab; } function setactivesubmenu($mid, $tab='') { if(is_numeric($mid)) $this->activemenu = $mid; elseif($mid && $tab && ($subnav=$this->getsubnav($tab))) { foreach($subnav $k => $menu) { if(strcasecmp($mid, $menu['href'])) continue; $this->activemenu = $k+1; break; } } } function getactivemenu() { return $this->activemenu; } function addsubmenu($item,$active=false){ // triger lazy loading if submenus haven't been initialized isset($this->submenus[$this->getpanel().'.'.$this->activetab]); $this->submenus[$this->getpanel().'.'.$this->activetab][]=$item; if($active) $this->activemenu=sizeof($this->submenus[$this->getpanel().'.'.$this->activetab]); } function gettabs(){ if(!$this->tabs) { $this->tabs=array(); $this->tabs['dashboard'] = array('desc'=>__('dashboard'),'href'=>'dashboard.php','title'=>__('agent dashboard'), "class"=>"no-pjax"); $this->tabs['users'] = array('desc' => __('users'), 'href' => 'users.php', 'title' => __('user directory')); $this->tabs['tickets'] = array('desc'=>__('tickets'),'href'=>'tickets.php','title'=>__('ticket queue')); $this->tabs['kbase'] = array('desc'=>__('knowledgebase'),'href'=>'kb.php','title'=>__('knowledgebase')); if (count($this->getregisteredapps())) $this->tabs['apps']=array('desc'=>__('applications'),'href'=>'apps.php','title'=>__('applications')); } return $this->tabs; } function getsubmenus(){ //private. global $cfg; $staff = $this->staff; $submenus=array(); foreach($this->gettabs() $k=>$tab){ $subnav=array(); switch(strtolower($k)){ case 'tickets': $subnav[]=array('desc'=>__('tickets'),'href'=>'tickets.php','iconclass'=>'ticket', 'droponly'=>true); if($staff) { if(($assigned=$staff->getnumassignedtickets())) $subnav[]=array('desc'=>__('my tickets')." ($assigned)", 'href'=>'tickets.php?status=assigned', 'iconclass'=>'assignedtickets', 'droponly'=>true); if($staff->cancreatetickets()) $subnav[]=array('desc'=>__('new ticket'), 'title' => __('open new ticket'), 'href'=>'tickets.php?a=open', 'iconclass'=>'newticket', 'id' => 'new-ticket', 'droponly'=>true); } break; case 'dashboard': $subnav[]=array('desc'=>__('dashboard'),'href'=>'dashboard.php','iconclass'=>'logs'); $subnav[]=array('desc'=>__('agent directory'),'href'=>'directory.php','iconclass'=>'teams'); $subnav[]=array('desc'=>__('my profile'),'href'=>'profile.php','iconclass'=>'users'); break; case 'users': $subnav[] = array('desc' => __('user directory'), 'href' => 'users.php', 'iconclass' => 'teams'); $subnav[] = array('desc' => __('organizations'), 'href' => 'orgs.php', 'iconclass' => 'departments'); break; case 'kbase': $subnav[]=array('desc'=>__('faqs'),'href'=>'kb.php', 'urls'=>array('faq.php'), 'iconclass'=>'kb'); if($staff) { if($staff->canmanagefaq()) $subnav[]=array('desc'=>__('categories'),'href'=>'categories.php','iconclass'=>'faq-categories'); if ($cfg->iscannedresponseenabled() && $staff->canmanagecannedresponses()) $subnav[]=array('desc'=>__('canned responses'),'href'=>'canned.php','iconclass'=>'canned'); } break; case 'apps': foreach ($this->getregisteredapps() $app) $subnav[] = $app; break; } if($subnav) $submenus[$this->getpanel().'.'.strtolower($k)]=$subnav; } return $submenus; } function getsubmenu($tab=null){ $tab=$tab?$tab:$this->activetab; return $this->submenus[$this->getpanel().'.'.$tab]; } function getsubnav($tab=null){ return $this->getsubmenu($tab); } } class adminnav extends staffnav{ function adminnav($staff){ parent::staffnav($staff, 'admin'); } function getregisteredapps() { return application::getadminapps(); } function gettabs(){ if(!$this->tabs){ $tabs=array(); $tabs['dashboard']=array('desc'=>__('dashboard'),'href'=>'logs.php','title'=>__('admin dashboard')); $tabs['settings']=array('desc'=>__('settings'),'href'=>'settings.php','title'=>__('system settings')); $tabs['manage']=array('desc'=>__('manage'),'href'=>'helptopics.php','title'=>__('manage options')); $tabs['emails']=array('desc'=>__('emails'),'href'=>'emails.php','title'=>__('email settings')); $tabs['staff']=array('desc'=>__('agents'),'href'=>'staff.php','title'=>__('manage agents')); if (count($this->getregisteredapps())) $tabs['apps']=array('desc'=>__('applications'),'href'=>'apps.php','title'=>__('applications')); $this->tabs=$tabs; } return $this->tabs; } function getsubmenus(){ $submenus=array(); foreach($this->gettabs() $k=>$tab){ $subnav=array(); switch(strtolower($k)){ case 'dashboard': $subnav[]=array('desc'=>__('system logs'),'href'=>'logs.php','iconclass'=>'logs'); $subnav[]=array('desc'=>__('information'),'href'=>'system.php','iconclass'=>'preferences'); break; case 'settings': $subnav[]=array('desc'=>__('company'),'href'=>'settings.php?t=pages','iconclass'=>'pages'); $subnav[]=array('desc'=>__('system'),'href'=>'settings.php?t=system','iconclass'=>'preferences'); $subnav[]=array('desc'=>__('tickets'),'href'=>'settings.php?t=tickets','iconclass'=>'ticket-settings'); $subnav[]=array('desc'=>__('emails'),'href'=>'settings.php?t=emails','iconclass'=>'email-settings'); $subnav[]=array('desc'=>__('access'),'href'=>'settings.php?t=access','iconclass'=>'users'); $subnav[]=array('desc'=>__('knowledgebase'),'href'=>'settings.php?t=kb','iconclass'=>'kb-settings'); $subnav[]=array('desc'=>__('autoresponder'),'href'=>'settings.php?t=autoresp','iconclass'=>'email-autoresponders'); $subnav[]=array('desc'=>__('alerts , notices'),'href'=>'settings.php?t=alerts','iconclass'=>'alert-settings'); break; case 'manage': $subnav[]=array('desc'=>__('help topics'),'href'=>'helptopics.php','iconclass'=>'helptopics'); $subnav[]=array('desc'=>__('ticket filters'),'href'=>'filters.php', 'title'=>__('ticket filters'),'iconclass'=>'ticketfilters'); $subnav[]=array('desc'=>__('sla plans'),'href'=>'slas.php','iconclass'=>'sla'); $subnav[]=array('desc'=>__('api keys'),'href'=>'apikeys.php','iconclass'=>'api'); $subnav[]=array('desc'=>__('pages'), 'href'=>'pages.php','title'=>'pages','iconclass'=>'pages'); $subnav[]=array('desc'=>__('forms'),'href'=>'forms.php','iconclass'=>'forms'); $subnav[]=array('desc'=>__('lists'),'href'=>'lists.php','iconclass'=>'lists'); $subnav[]=array('desc'=>__('plugins'),'href'=>'plugins.php','iconclass'=>'api'); break; case 'emails': $subnav[]=array('desc'=>__('emails'),'href'=>'emails.php', 'title'=>__('email addresses'), 'iconclass'=>'emailsettings'); $subnav[]=array('desc'=>__('banlist'),'href'=>'banlist.php', 'title'=>__('banned emails'),'iconclass'=>'emaildiagnostic'); $subnav[]=array('desc'=>__('templates'),'href'=>'templates.php','title'=>__('email templates'),'iconclass'=>'emailtemplates'); $subnav[]=array('desc'=>__('diagnostic'),'href'=>'emailtest.php', 'title'=>__('email diagnostic'), 'iconclass'=>'emaildiagnostic'); break; case 'staff': $subnav[]=array('desc'=>__('agents'),'href'=>'staff.php','iconclass'=>'users'); $subnav[]=array('desc'=>__('teams'),'href'=>'teams.php','iconclass'=>'teams'); $subnav[]=array('desc'=>__('groups'),'href'=>'groups.php','iconclass'=>'groups'); $subnav[]=array('desc'=>__('departments'),'href'=>'departments.php','iconclass'=>'departments'); break; case 'apps': foreach ($this->getregisteredapps() $app) $subnav[] = $app; break; } if($subnav) $submenus[$this->getpanel().'.'.strtolower($k)]=$subnav; } return $submenus; } } class usernav { var $navs=array(); var $activenav; var $user; function usernav($user=null, $active=''){ $this->user=$user; $this->navs=$this->getnavs(); if($active) $this->setactivenav($active); } function getregisteredapps() { return application::getclientapps(); } function setactivenav($nav){ if($nav && $this->navs[$nav]){ $this->navs[$nav]['active']=true; if($this->activenav && $this->activenav!=$nav && $this->navs[$this->activenav]) $this->navs[$this->activenav]['active']=false; $this->activenav=$nav; return true; } return false; } function getnavlinks(){ global $cfg; //paths based on root dir. if(!$this->navs){ $navs = array(); $user = $this->user; $navs['home']=array('desc'=>__('support center home'),'href'=>'index.php','title'=>''); if($cfg && $cfg->isknowledgebaseenabled()) $navs['kb']=array('desc'=>__('knowledgebase'),'href'=>'kb/index.php','title'=>''); // show "open new ticket" link unless both client // registration disabled , client login required new // tickets. in such case, creating ticket not // possible web clients. if ($cfg->getclientregistrationmode() != 'disabled' || !$cfg->isclientloginrequired()) $navs['new']=array('desc'=>__('open new ticket'),'href'=>'open.php','title'=>''); if($user && $user->isvalid()) { if(!$user->isguest()) { $navs['tickets']=array('desc'=>sprintf(__('tickets (%d)'),$user->getnumtickets()), 'href'=>'tickets.php', 'title'=>__('show tickets')); } else { $navs['tickets']=array('desc'=>__('view ticket thread'), 'href'=>sprintf('tickets.php?id=%d',$user->getticketid()), 'title'=>__('view ticket status')); } } else { $navs['status']=array('desc'=>__('check ticket status'),'href'=>'view.php','title'=>''); } $this->navs=$navs; } return $this->navs; } function getnavs(){ return $this->getnavlinks(); } } ?>
Comments
Post a Comment