diff options
author | Robin <robin@Amaya.(none)> | 2010-03-16 20:25:05 +0100 |
---|---|---|
committer | Robin <robin@Amaya.(none)> | 2010-03-16 20:25:05 +0100 |
commit | 97270d5c63d47bcf65a4604f9b744f7e4718f1d6 (patch) | |
tree | 3c4a54a125d7df226aa8006d7131d299d09d0d3e /inc/templates | |
parent | 2aef090ac5d779f6e1162ee7eb4e0ae29ec1c12d (diff) | |
download | nextcloud-server-97270d5c63d47bcf65a4604f9b744f7e4718f1d6.tar.gz nextcloud-server-97270d5c63d47bcf65a4604f9b744f7e4718f1d6.zip |
moved the config functions to /inc/lib_config.php
Diffstat (limited to 'inc/templates')
-rwxr-xr-x | inc/templates/configform.php | 18 | ||||
-rwxr-xr-x | inc/templates/header.php | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/inc/templates/configform.php b/inc/templates/configform.php index 95043f9cfc8..f981eae1c25 100755 --- a/inc/templates/configform.php +++ b/inc/templates/configform.php @@ -1,3 +1,16 @@ +<?php +global $createDB; +global $fillDB; +if(!isset($createDB)) $createDB=true; +if(!isset($fillDB)) $fillDB=true; +?> +<script type="text/javascript"> +function showDBAdmin(){ +var show=document.getElementById('dbCreate').checked; +document.getElementById('dbAdminUser').style.display=(show)?'table-row':'none'; +document.getElementById('dbAdminPwd').style.display=(show)?'table-row':'none'; +} +</script> <form method="post" enctype="multipart/form-data"> <table cellpadding="5" cellspacing="5" border="0" class="loginform"> <tr><td>admin login:</td><td><input type="text" name="adminlogin" size="30" class="formstyle" value="<?php echo($CONFIG_ADMINLOGIN);?>"></input></td></tr> @@ -11,5 +24,10 @@ <tr><td>database user:</td><td><input type="text" name="dbuser" size="30" class="formstyle" value='<?php echo($CONFIG_DBUSER);?>'></input></td></tr> <tr><td>database password:</td><td><input type="password" name="dbpassword" size="30" class="formstyle" value='<?php echo($CONFIG_DBPASSWORD);?>'></input></td></tr> <tr><td>retype database password:</td><td><input type="password" name="dbpassword2" size="30" class="formstyle" value='<?php echo($CONFIG_DBPASSWORD);?>'></input></td></tr> +<tr><td>create database and user:</td><td><input id='dbCreate' type="checkbox" name="createdatabase" size="30" class="formstyle" value='1' <?php if($createDB) echo 'checked'; ?> onchange='showDBAdmin()'></input></td></tr> +<tr id='dbAdminUser'><td>database administrative user:</td><td><input type="text" name="dbadminuser" size="30" class="formstyle" value='root'></input></td></tr> +<tr id='dbAdminPwd'><td>database administrative password:</td><td><input type="password" name="dbadminpwd" size="30" class="formstyle" value=''></input></td></tr> +<tr><td>automaticly fill initial database:</td><td><input type="checkbox" name="filldb" size="30" class="formstyle" value='1' <?php if($fillDB) echo 'checked'; ?>></input></td></tr> <tr><td></td><td><input type="submit" name="set_config" alt="save" value="save" class="formstyle" /></td></tr> </table></form> +<script type="text/javascript">showDBAdmin()</script>
\ No newline at end of file diff --git a/inc/templates/header.php b/inc/templates/header.php index cd9e2ead8b3..b5b7538f8af 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -11,12 +11,12 @@ echo('<h1><a id="owncloud-logo" href="'.$WEBROOT.'/"><span>ownCloud</span></a></ // check if already configured. otherwise start configuration wizard - $error=OC_UTIL::writeconfiglisener(); + $error=OC_CONFIG::writeconfiglisener(); if(empty($CONFIG_ADMINLOGIN)) { echo('<div class="center">'); echo('<p class="errortext">'.$error.'</p>'); echo('<p class="highlighttext">First Run Wizard</p>'); - OC_UTIL::showconfigform(); + OC_CONFIG::showconfigform(); echo('</div>'); OC_UTIL::showfooter(); exit(); |