OSDN Git Service

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@881 1ca29b6e-896d...
[nucleus-jp/nucleus-plugins.git] / NP_UpdatePingServer / updatepingserver / admin / UpdatePingServer_Management.php
1 <?php
2
3 class UpdatePingServer_Management extends PlugManagement
4 {
5         var $tpmanager;
6         var $poupurl;
7         
8         function init() {
9                 global $CONF;
10
11                 // include language file
12                 $langfile = $this->plugin->getDirectory() . 'language/'.$CONF['Language'].'.php';
13                 if (!file_exists($langfile)) {
14                         $langfile = $this->plugin->getDirectory() . 'language/english.php';
15                 }
16                 include_once($langfile);
17
18                 // assign plugin data to view object
19                 $helpurl = $this->plugin->getAdminURL() .'index.php?action=pluginhelp';
20                 $plug_data = array(
21                         'name' => $this->plugin->getName(),
22                         'id' => $this->plugin->getID(),
23                         'url' => $this->plugin->getAdminURL(),
24                         'helpurl' => $helpurl
25                         );
26                 $this->view->assign('plugin', $plug_data);
27                 $this->view->assign('message', '');
28                 
29                 // popup help URL
30                 $popup_helpfile = $this->plugin->getDirectory() .'i18nhelp/'.$CONF['Language']. '.popuphelp.html';
31                 if (file_exists($popup_helpfile)) {
32                         $this->popupurl = $this->plugin->getAdminURL() .'i18nhelp/'.$CONF['Language']. '.popuphelp.html';
33                 } else {
34                         $this->popupurl = $this->plugin->getAdminURL() . 'popuphelp.html';
35                 }
36         }
37         
38         function &getTpManager() {
39                 if (!$this->tpmanager) {
40                         $this->tpmanager =& new PlugTemplate(sql_table('plug_blogmenu_template'), 'tid', 'tname', 'tdesc');
41                 }
42                 return $this->tpmanager;
43         }
44         
45         function createPopup($anchor) {
46                 return $this->createPopupHelpLink($this->popupurl, $anchor);
47         }
48         
49         function getHelpPath() {
50                 global $CONF;
51                 
52                 $helpfile = $this->plugin->getDirectory() .'i18nhelp/'.$CONF['Language']. '.help.html';
53                 if (!file_exists($helpfile)) {
54                         $helpfile = $this->plugin->getDirectory() . 'help.html';
55                 }
56                 return $helpfile;
57         }
58         
59 }
60
61 ?>