Location: PHPKode > projects > WebMachinek > WMinst-0.62/i3.php
<html><head>
<title>WebMachinek Installation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Author" content="Kolda" />
<meta name="Description" content="no" />
<meta name="Keywords" content="no" />
<link type="text/css" rel="StyleSheet" href="wm.css" />
</head>
<body>
<form method="POST" action="i4.php">
<input type="hidden" name="dbuser" value="<?php echo($dbuser); php?>" />
<input type="hidden" name="dbname" value="<?php echo($dbname); php?>" />
<input type="hidden" name="dbpasswd" value="<?php echo($dbpasswd); php?>" />
<table border="2" align="center">
<tr><td>
<table>
<tr><td colspan="2">
<p><center><h1>WebMachinek Installation: Step 3</h1>
</center></p>
<?php
if ($dbname == ""){
echo("<h2>You have to enter a database name for WM installation</h2><h3><a href='javascript:history.back();'>GO BACK</a> AND ENTER A DATABASE NAME</h3></td></tr></table></td></tr></table>");
exit;
}
$conn = pg_connect("dbname=template1 user=$dbuser password=$dbpasswd port=5432");
$query1 = pg_exec($conn, "SELECT datname FROM pg_database WHERE datname='$dbname'");
$pocet = pg_numrows($query1);
if ($pocet > 0){
echo("<h2>IT IS A SHAME BUT THERE IS ALREADY DATABASE WITH THE NAME '$dbname'</h2><h3><a href='javascript:history.back();'>GO BACK</a> AND ENTER ANOTHER DATABASE NAME</h3></td></tr></table></td></tr></table>");
exit;
}
#pg_exec($conn, "CREATE DATABASE $dbname");
pg_close($conn);
php?></i></p>
<hr />
<p>WebMachinek is accessible through two different URLs/directories.<br />
PUBLIC - where browsable version of the site intended for target users is provided.<br />
ADMINISTRATIVE - where editing and administrative features are offered in addition.</p>
<hr />
<p>Specify PUBLIC and ADMIN URLs and paths accordingly. Only in these directories WebMachinek files will be installed.<br />
<center><font color="red">
NOTE: The PUBLIC directory must not be a subdirectory of the ADMIN directory.<br />
NOTE: A Web server process has to have a write permission to the directories.<br />
NOTE: The paths to directories cannot include a symbolic link
</font></center></p>
</td></tr>
<tr><td align="right">PUBLIC PATH: </td>
<td><input type="text" name="p_path" size="60" value="/home/apache/htdocs/devel/pub" /></td>
</tr>
<tr><td align="right">PUBLIC URL: </td>
<td><input type="text" name="p_url" size="60" value="http://pc195025.stofanet.dk/devel/pub" /></td>
</tr>
<tr><td align="right">ADMIN. PATH: </td>
<td><input type="text" name="a_path" size="60" value="/home/apache/htdocs/devel/loc" /></td>
</tr>
<tr><td align="right">ADMIN. URL: </td>
<td><input type="text" name="a_url" size="60" value="http://pc195025.stofanet.dk/devel/loc" /></td>
</tr>
<tr><td colspan="2">
<hr />
<input value="NEXT" type="submit" />
</td></tr>
</table>
</td></tr>
</table>
</form>
</body></html>
Return current item: WebMachinek