blob: 647dbe68e9d6e55cab8e566f4a890ca4b2056df7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Check directory used in PgpoolAdmin
*
* PHP versions 4 and 5
*
* LICENSE: Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
* copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of the
* author not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. The author makes no representations about the
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* @author Ryuma Ando <[email protected]>
* @copyright 2003-2015 PgPool Global Development Group
* @version CVS: $Id$
*/
require_once('../version.php');
require_once('../bootstrap.php');
session_start();
require_once('setLang.php');
$error = FALSE;
$action = '';
if (isset($_POST['action'])) {
$action = $_POST['action'];
}
// Check templates_c
$templates_c = dirname(dirname(__FILE__) . '/') . '/templates_c';
if (!is_writable($templates_c)) {
$templates_c = $templates_c . ' write denied';
$error = TRUE;
} else {
unset($templates_c);
}
// Chech pgmgt.conf
$conf = dirname(dirname(__FILE__) . '/') . '/conf/pgmgt.conf.php';
if (!is_writable($conf)) {
$conf = $conf . ' write denied';
$error = TRUE;
} else {
unset($conf);
}
if (!$error && $action == 'next') {
header("Location: checkParameter.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $message['strDirectoryCheck'] ?></title>
<link href="../screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1><img src="../images/logo.gif" alt="pgpoolAdmin" /></h1>
</div>
<div id="content">
<h2>Welcome to pgpool-II Administration Tool</h2>
<h3><?php echo $message['strDirectoryCheck'] ?></h3>
<form action="checkDirectory.php" method="post" name="CheckPath" id="CheckPath">
<?php
if($error) {
echo '<input type="hidden" name="action" value="check">';
} else {
echo '<input type="hidden" name="action" value="next">';
}
?>
<table>
<tbody>
<tr>
<th><label><?php echo $message['strTempDir'] ?></label></th>
<td>
<?php
if(isset($templates_c))
echo "<img src='images/ng.gif' alt='ng' /> " . $templates_c;
else
echo "<img src='images/ok.gif' alt='ok' />";
?>
</td>
</tr>
<tr>
<th><label><?php echo $message['strPgmgtFile'] ?></label></th>
<td>
<?php
if(isset($conf))
echo "<img src='images/ng.gif' alt='ng' /> " . $conf;
else
echo "<img src='images/ok.gif' alt='ok' />";
?>
</td>
</tr>
</tbody>
</table>
<p>
<?php
if ($error) {
echo '<input type="submit" value="' . $message['strCheck'] . '" />';
} else {
echo '<input type="submit" value="' . $message['strNext'] . '" />';
}
?>
</p>
</form>
</div>
<div id="footer">
<address>Version <?php echo $version;?><br />
Copyright © 2006 - <?php echo date('Y'); ?> <a href="<?php echo PGPOOL_OFFICIAL_SITE; ?>">pgpool Global Development Group</a>. All rights reserved.</address>
</div>
</body>
</html>
|