Пример #1
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['servers']['Connect to the server'];
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     if (isset($_SESSION['formSent']) && !empty($_SESSION['formSent'])) {
         $formsent = $_SESSION['formSent'];
     }
     if (!isset($formsent['address'])) {
         $formsent['address'] = '';
     }
     if (!isset($formsent['apiKey'])) {
         $formsent['apiKey'] = '';
     }
     $this->data['formSent'] = $formsent;
     $_SESSION['formSent'] = array();
 }
Пример #2
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $serversList = new JsonDB(__serversdb);
     $sid = (int) $_GET['sid'];
     $fid = (int) $_GET['fid'];
     $serverTitle = $this->_LANG['store']['undefined'];
     $taskTitle = $this->_LANG['store']['undefined'];
     if (isset($serversList->data[$sid])) {
         $serverTitle = $serversList->data[$sid]['name'];
     }
     if (isset($serversList->data[$sid]['tasks'][$fid])) {
         $taskTitle = $serversList->data[$sid]['tasks'][$fid]['title'];
     }
     $header->data['title'] = $this->_LANG['store']['Store'] . " / " . $this->_LANG['store']['Remote'] . " / {$serverTitle} / {$taskTitle}";
     $this->data['serverTitle'] = $serverTitle;
     $this->data['taskTitle'] = $taskTitle;
     $this->data['files'] = $this->getlFolderFiles($serversList, $sid, $fid);
     $this->data['taskId'] = $fid;
     $this->data['serverId'] = $sid;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
Пример #3
0
 public function prepare()
 {
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $header->data['title'] = 'HotBackup installation';
     $this->data['title'] = 'HotBackup installation';
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $workUrl = 'http://' . $_SERVER['SERVER_NAME'] . str_replace('install/index.php', '', $_SERVER['SCRIPT_NAME']);
     $workFolder = str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']);
     $error = '';
     if (isset($_SESSION['error'])) {
         $error = $_SESSION['error'];
     }
     $formSent = array();
     if (isset($_SESSION['formSent'])) {
         $formSent = $_SESSION['formSent'];
     } else {
         $formSent['login'] = '******';
         $formSent['password'] = '';
         $formSent['confirmation'] = '';
         $formSent['email'] = '';
         $formSent['folder'] = $workFolder;
         $formSent['workUrl'] = $workUrl;
     }
     unset($_SESSION['error']);
     $this->data['formSent'] = $formSent;
     $this->data['error'] = $error;
 }
Пример #4
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $tasksList = new JsonDB(__taskdb);
     $id = (int) $_GET['id'];
     if (isset($tasksList->data[$id])) {
         $this->data['taskTitle'] = $tasksList->data[$id]['title'];
         $header->data['title'] = $this->_LANG['store']['Store'] . ' / ' . $this->_LANG['store']['Local'] . ' / ' . $tasksList->data[$id]['title'];
     } else {
         $this->data['taskTitle'] = $this->_LANG['store']['undefined'];
         $header->data['title'] = $this->_LANG['store']['Store'] . ' / ' . $this->_LANG['store']['Local'] . ' / ' . $this->_LANG['store']['undefined'];
     }
     $this->data['files'] = $this->getlFolderFiles();
     $this->data['taskId'] = $id;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
Пример #5
0
 public function prepare()
 {
     header('HTTP/1.0 404 Not Found');
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $header->data['title'] = 'Page not found';
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
 }
Пример #6
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['tasks']['Edit MYSQL backup task'];
     $this->data['widgets'] = new Widgets($this->db, __corePath . 'widgets/', $this->config);
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     $serversList = new JsonDB(__serversdb);
     $id = (int) $_GET['id'];
     $sid = (int) $_GET['sid'];
     $formsent = $serversList->data[$sid]['tasks'][$id];
     if (isset($_SESSION['formSent']) && !empty($_SESSION['formSent'])) {
         $formsent = $_SESSION['formSent'];
     }
     $_SESSION['formSent'] = array();
     if (!isset($formsent['title'])) {
         $formsent['title'] = '';
     }
     if (!isset($formsent['type'])) {
         $formsent['type'] = '';
     }
     if (!isset($formsent['status'])) {
         $formsent['status'] = '';
     }
     if (!isset($formsent['deep'])) {
         $formsent['deep'] = '';
     }
     if (!isset($formsent['mysql-backup-filename'])) {
         $formsent['mysql-backup-filename'] = '';
     }
     if (!isset($formsent['mysql-backup-address'])) {
         $formsent['mysql-backup-address'] = '';
     }
     if (!isset($formsent['mysql-backup-name'])) {
         $formsent['mysql-backup-name'] = '';
     }
     if (!isset($formsent['mysql-backup-user'])) {
         $formsent['mysql-backup-user'] = '';
     }
     if (!isset($formsent['mysql-backup-password'])) {
         $formsent['mysql-backup-password'] = '';
     }
     $this->data['task'] = $formsent;
     $this->data['serverName'] = $serversList->data[$sid]['name'];
     $this->data['id'] = $id;
     $this->data['sid'] = $sid;
     $_SESSION['formSent'] = array();
 }
Пример #7
0
 public function prepare()
 {
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $header->data['title'] = 'Successful installation';
     $basePath = str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']);
     $dashboardUrdl = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('install/?r=success', '', $_SERVER['REQUEST_URI']);
     $this->data['title'] = 'Successful installation';
     $this->data['serversServiceCron'] = $basePath . 'serversService.php';
     $this->data['tasksServiceCron'] = $basePath . 'tasksService.php';
     $this->data['dashboardUrdl'] = $dashboardUrdl;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
 }
Пример #8
0
 public function prepare()
 {
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $header->data['title'] = 'Error';
     $error = 'Uknown error';
     if (isset($_SESSION['error'])) {
         $error = $_SESSION['error'];
     }
     $this->data['title'] = 'Error';
     $this->data['error'] = $error;
     $this->data['installPath'] = str_replace('index.php', '', $_SERVER['PHP_SELF']);
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
 }
Пример #9
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['store']['Store'];
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
 /**
  * VCSDBDriverAirTicket クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverAirTicket $airTicket オブジェクト 
  */
 public function assignParams($airTicket)
 {
     parent::assignParams($airTicket);
     if ($this->dept_aprt_cd) {
         $airTicket->setParam('dept_aprt_cd', $this->dept_aprt_cd);
     }
     if ($this->region_cd) {
         $airTicket->setParam('region_cd', $this->region_cd);
     }
     if ($this->ctry_cd) {
         $airTicket->setParam('ctry_cd', $this->ctry_cd);
     }
     // Set for one way only, both way is default
     if ($this->trip_type && $this->trip_type == 2) {
         $airTicket->setParam('ticket_type_cd', '4');
     }
     if ($this->open_ticket) {
         $airTicket->setParam('ticket_kodawari', 'openjaw');
     }
     if ($this->online_book) {
         $airTicket->setParam('ticket_kodawari', 'online_book');
     }
     if ($this->mile) {
         $airTicket->setParam('ticket_kodawari', 'mile');
     }
     if ($this->direct_flight) {
         $airTicket->setParam('ticket_kodawari', 'direct');
     }
 }
Пример #11
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['tasks']['New MYSQL backup'];
     $this->data['widgets'] = new Widgets($this->db, __corePath . 'widgets/', $this->config);
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
 /**
  * VCSDBDriverTour クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverTour $tour オブジェクト 
  */
 public function assignParams($tour)
 {
     parent::assignParams($tour);
     if ($this->dept_city_cd) {
         $tour->setParam('dept_city_cd', $this->dept_city_cd);
     }
     if ($this->region_cd) {
         $tour->setParam('region_cd', $this->region_cd);
     }
     if ($this->ctry_cd) {
         $tour->setParam('ctry_cd', $this->ctry_cd);
     }
     if ($this->dept_time_cd) {
         $tour->setParam('dept_time_cd', $this->dept_time_cd);
     }
     if ($this->term_max) {
         $tour->setParam('term_max', $this->term_max);
     }
     if ($this->online_book) {
         $tour->setParam('ticket_kodawari', 'online_book');
     }
     if ($this->mile) {
         $tour->setParam('ticket_kodawari', 'mile');
     }
     if ($this->transp_serv) {
         $tour->setParam('tour_kodawari', 'transp_serv');
     }
     if ($this->child_disc) {
         $tour->setParam('tour_kodawari', 'child_disc');
     }
 }
Пример #13
0
 public function prepare()
 {
     $user = new User(1, __userdb);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $usersList = new JsonDB(__userdb);
     $header->data['title'] = 'Users list';
     $this->data['usersList'] = $usersList->data;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
Пример #14
0
 public function prepare()
 {
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $header->data['title'] = 'HotBackup prepare for install';
     $this->data['title'] = 'HotBackup prepare for install';
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     if (isset($_SESSION['notifications'])) {
         $this->data['visible'] = true;
         $this->data['notifications'] = $_SESSION['notifications'];
     } else {
         $this->data['visible'] = false;
     }
     unset($_SESSION['notifications']);
     $workUrl = 'http://' . $_SERVER['SERVER_NAME'] . str_replace('install/index.php', '', $_SERVER['SCRIPT_NAME']);
     $this->data['workUrl'] = $workUrl;
 }
 /**
  * VCSDBDriverHotel クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverHotel $hotel オブジェクト 
  */
 public function assignParams($hotel)
 {
     parent::assignParams($hotel);
     /*
      * ホテルの形式
      */
     if ($this->hotel_type) {
         $hotel->setParam('hotel_type', $this->hotel_type);
     }
 }
Пример #16
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['tasks']['New MYSQL backup'];
     $this->data['widgets'] = new Widgets($this->db, __corePath . 'widgets/', $this->config);
     $serversList = new JsonDB(__serversdb);
     $sid = (int) $_GET['sid'];
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     $this->data['serverName'] = $serversList->data[$sid]['name'];
     $this->data['sid'] = $sid;
 }
Пример #17
0
 public function prepare()
 {
     $user = new User(1, __userdb);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $usersList = new JsonDB(__userdb);
     $id = (int) $_GET['id'];
     $header->data['title'] = $this->_LANG['users']['Edit user, id:'] . ' ' . $id;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     $user = $usersList->data[$id];
     $user['password1'] = '';
     $user['password2'] = '';
     $this->data['id'] = $id;
     if (isset($_SESSION['formSent']) && !empty($_SESSION['formSent'])) {
         $formsent = $_SESSION['formSent'];
         if (isset($formsent['login'])) {
             $user['login'] = $formsent['login'];
         }
         if (isset($formsent['email'])) {
             $user['email'] = $formsent['email'];
         }
         if (isset($formsent['accessGroup'])) {
             $user['accessGroup'] = $formsent['accessGroup'];
         }
         if (isset($formsent['alerts'])) {
             $user['alerts'] = $formsent['alerts'];
         }
         if (isset($formsent['login'])) {
             $user['login'] = $formsent['login'];
         }
         $_SESSION['formSent'] = array();
     }
     $this->data['user'] = $user;
 }
Пример #18
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = 'New task';
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     if (isset($_SESSION['formSent']) && !empty($_SESSION['formSent'])) {
         $formsent = $_SESSION['formSent'];
     }
     #if( !isset($formsent['login'] )) $formsent['login'] = '';
     $this->data['formSent'] = $formsent;
     $_SESSION['formSent'] = array();
 }
Пример #19
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['servers']['Connectin information'];
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
     if (isset($_SESSION['formSent']) && !empty($_SESSION['formSent'])) {
         $formsent = $_SESSION['formSent'];
     } else {
         $serversDB = new JsonDB(__serversdb);
         $id = (int) $_GET['id'];
         $formsent = $serversDB->data[$id];
     }
     if (!isset($formsent['address'])) {
         $formsent['address'] = '';
     }
     if (!isset($formsent['apiKey'])) {
         $formsent['apiKey'] = '';
     }
     if (!isset($formsent['archSync'])) {
         $formsent['archSync'] = '';
     }
     if (!isset($formsent['archDepth'])) {
         $formsent['archDepth'] = '';
     }
     if (!isset($formsent['deleteSync'])) {
         $formsent['deleteSync'] = '';
     }
     $this->data['formSent'] = $formsent;
     $_SESSION['formSent'] = array();
 }
Пример #20
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $serversDB = new JsonDB(__serversdb);
     $serverId = (int) $_GET['id'];
     $server = $serversDB->data[$serverId];
     $query = new ApiQuery($server['address'], $server['apiKey']);
     $tasksList = $query->getTasksList(true);
     $header->data['title'] = $server['name'];
     $this->data['server'] = $server;
     $this->data['tasksList'] = $tasksList;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
Пример #21
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $settings = new JsonDB(__settingsdb);
     $settings->data = $this->checkSettings($settings->data);
     $header->data['title'] = $this->_LANG['settings']['Main settings'];
     $langs = glob(__corePath . "lang/*.php");
     foreach ($langs as $key => $val) {
         $langs[$key] = str_replace('.php', '', str_replace(__corePath . 'lang/', '', $val));
     }
     $this->data['langs'] = $langs;
     $this->data['settings'] = $settings->data;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
Пример #22
0
 public function prepare()
 {
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $header->data['title'] = $this->_LANG['auth']['Authorize'];
     $this->data['header'] = $header->show();
 }
 /**
  * VCSDBDriverHotel クラスのインスタンスに、フォームに設定されていた
  * パラメータを指定します。
  * 
  * @param VCSDBDriverHotel $hotel オブジェクト 
  */
 public function assignNearParams($hotel)
 {
     parent::assignParams($hotel);
     /*
      * 不要パラメータ初期化
      */
     $hotel->setParam('serv_id', '');
     $hotel->setParam('larea_cd', '');
     /*
      * ホテルの形式
      */
     if ($this->hotel_type) {
         $hotel->setParam('hotel_type', $this->hotel_type);
     }
     /*
      * パラメータセット
      */
     $hotel->setParam('sort_by', 'distance');
     $hotel->setParam('results_per_page', $this->near_results_per_page + 1);
     // +1は出力時に中心ホテルの情報を後で除外するため
     $hotel->setParam('lat', $_SESSION['LAT_DETAIL']);
     $hotel->setParam('lng', $_SESSION['LNG_DETAIL']);
     $hotel->setParam('ladius', '100000');
 }
Пример #24
0
 public function prepare()
 {
     $user = new User(1);
     if (!$user->isAuthorized()) {
         $this->redirect('?r=auth');
     }
     $header = new PageHeader($this->curpage, $this->db, $this->config);
     $footer = new PageFooter($this->curpage, $this->db, $this->config);
     $topMenu = new TopMenu($this->curpage, $this->db, $this->config);
     $topMenu->prepare();
     $header->data['title'] = $this->_LANG['misc']['home_title'];
     $tasksList = new JsonDB(__taskdb);
     $serversList = new JsonDB(__serversdb);
     $backUpsUsage = array();
     $usedByAllBackups = 0;
     // for local backups
     foreach ($tasksList->data as $task) {
         $size = round(dirSize(__archiveDIR . 'local/' . $task['id']));
         $usedByAllBackups += $size;
         $backUpsUsage[] = array('value' => $size, 'label' => $this->_LANG['store']['Local'] . ' / ' . $task['title']);
     }
     //for remote backups
     foreach ($serversList->data as $server) {
         if (isset($server['tasks'])) {
             foreach ($server['tasks'] as $task) {
                 $size = round(dirSize(__archiveDIR . 'servers/' . $server['id'] . '/' . $task['id']));
                 $usedByAllBackups += $size;
                 $backUpsUsage[] = array('value' => $size, 'label' => $server['name'] . ' / ' . $task['title']);
             }
         }
     }
     function iCmp($a, $b)
     {
         if ($a['value'] > $b['value']) {
             return 0;
         } else {
             return 1;
         }
     }
     usort($backUpsUsage, "iCmp");
     $usedByBackupsTmp = dirSize(__archiveDIR . 'local/');
     $usedByBackups = round($usedByBackupsTmp / (1024 * 1024));
     $hddTotalSize = round(disk_total_space(__workfolder) / (1024 * 1024));
     $hddFreeSpace = round(disk_free_space(__workfolder) / (1024 * 1024));
     $hddUsedSpace = $hddTotalSize - $hddFreeSpace - $usedByBackups;
     $hddUsage = array();
     $hddUsage['title'] = $this->_LANG['misc']['HDD usage'];
     $hddUsage['data'] = array();
     $hddUsage['data'][] = array('value' => $usedByBackups, 'color' => '#008d32', 'highlight' => '#2ac360', 'label' => $this->_LANG['misc']['Used by BackUps (Mb)']);
     $hddUsage['data'][] = array('value' => $hddUsedSpace, 'color' => '#008aa3', 'highlight' => '#20abc4', 'label' => $this->_LANG['misc']['Hdd used by other (Mb)']);
     $hddUsage['data'][] = array('value' => $hddFreeSpace, 'color' => '#a65200', 'highlight' => '#cd741c', 'label' => $this->_LANG['misc']['Hdd free space (Mb)']);
     $widgets = new Widgets($this->db, __corePath . 'widgets/', $this->config);
     $maxUsage = 0;
     if (isset($backUpsUsage[0])) {
         $maxUsage = $backUpsUsage[0]['value'];
     }
     $this->data['hddUsage'] = $widgets->show('PieGraph', $hddUsage);
     $this->data['backUpsUsage'] = $backUpsUsage;
     $this->data['maxUsage'] = $maxUsage;
     $this->data['header'] = $header->show();
     $this->data['footer'] = $footer->show();
     $this->data['topMenu'] = $topMenu->show();
 }
 */
require_once 'VCPDBDriver/VCPDBDriver.php';
require_once 'PageHeader.php';
require_once 'PageBody.php';
/*
 * このサンプルでは内部エンコーディングはUTF-8です。
 */
mb_internal_encoding("UTF-8");
/*
 * VCPDBDriverクラスのインスタンスを生成します。
 */
$api = new VCPDBDriver(VCPDBDRIVER_API_URL);
/*
 * ページヘッダ部分(検索フォーム)を生成します。
 */
$pageHeader = new PageHeader('Views/PdbSearchForm.html');
/*
 * 商品APIへのパラメータは、フォームで指定するので、フォームのあるページヘッダで設定します。
 */
$pageHeader->assignParams($api);
/*
 * リストパネルの生成、エラーコードが渡された場合は、空のリストが返るのでそのままそれをshow()しても差し支えありません。
 */
$pageBody = new PageBody('Views/Pagination.html', 'Views/FormattedItem.html', 10, $api);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
	<head> 
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 
		<meta id='keywords' name='keywords' content='overview' /> 
		<title>ValueCommerce - HTML Framework - PDB-F02</title> 
 /**
  * ページに表示ヘッダを出力します。
  */
 protected function compose()
 {
     $itemHtml = parent::compose();
     global $_GET;
     /*
      * ソート種別
      */
     $options = "";
     foreach (self::$SORT_BY as $code => $name) {
         $options .= '<option value="' . $code . '" ';
         if ($this->sort_by && $code == $this->sort_by) {
             $options .= 'selected';
         }
         $options .= '>' . $name . '</option>';
     }
     $itemHtml = str_replace('${SORT_BY}', $options, $itemHtml);
     /*
      * ソート順
      */
     $options = "";
     foreach (self::$SORT_ORDER as $code => $name) {
         $options .= '<option value="' . $code . '" ';
         if ($this->sort_order && $code == $this->sort_order || !$this->sort_order && $code == '') {
             $options .= 'selected';
         }
         $options .= '>' . $name . '</option>';
     }
     $itemHtml = str_replace('${SORT_ORDER}', $options, $itemHtml);
     // カテゴリ
     $categories = "<option value=''></option>";
     $api = new VCPDBDriver(VCPDBDRIVER_CATEGORY_API_URL);
     $api->setParam("category_level", "1");
     $api->setFlag("childless");
     $response = $api->executeQuery();
     if (gettype($response) == "object") {
         $itemElements = $response->xpath('/rss/channel/item');
         foreach ($itemElements as $item) {
             $titleStr = null;
             $descStr = null;
             $title = $item->xpath('title');
             if (count($title) > 0) {
                 $titleStr = $title[0];
             }
             $desc = $item->xpath('description');
             if (count($desc) > 0) {
                 $descStr = $desc[0];
             }
             if ($titleStr == null || $descStr == null) {
                 continue;
             }
             $categories .= '<option value="' . $titleStr . '" ';
             if ($this->category && $titleStr == $this->category) {
                 $categories .= 'selected';
             }
             $categories .= '>' . $descStr . '</option>';
         }
     }
     $itemHtml = str_replace('${CATEGORIES}', $categories, $itemHtml);
     return $itemHtml;
 }