mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge branch 'refactoring' of git://anongit.kde.org/owncloud into refactoring
This commit is contained in:
commit
cb2d8db9ce
22 changed files with 361 additions and 94 deletions
|
|
@ -343,7 +343,7 @@ class MDB2_Driver_pgsql extends MDB2_Driver_Common
|
|||
* @access public
|
||||
* @since 2.1.1
|
||||
*/
|
||||
static function setTransactionIsolation($isolation)
|
||||
static function setTransactionIsolation($isolation, $options = array())
|
||||
{
|
||||
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
|
||||
switch ($isolation) {
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ class MDB2_Driver_sqlite extends MDB2_Driver_Common
|
|||
* @access public
|
||||
* @since 2.1.1
|
||||
*/
|
||||
static function setTransactionIsolation($isolation)
|
||||
static function setTransactionIsolation($isolation,$options=array())
|
||||
{
|
||||
$this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true));
|
||||
switch ($isolation) {
|
||||
|
|
|
|||
|
|
@ -40,3 +40,25 @@ table td.name a
|
|||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.description
|
||||
{
|
||||
padding: 6px;
|
||||
text-decoration: none;
|
||||
color: #666666;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
|
||||
.install a {
|
||||
padding:0.2em 0.5em;
|
||||
border:1px solid #ddd;
|
||||
-moz-border-radius:15px;
|
||||
-webkit-border-radius:15px;
|
||||
border-radius:15px;
|
||||
text-decoration: none;
|
||||
font-size:1.5em; color:#666666;
|
||||
background-color:#F0F0F0;
|
||||
}
|
||||
.install a:hover {
|
||||
background-color:#DDDDDD;
|
||||
}
|
||||
|
|
|
|||
27
admin/templates/app.php
Normal file
27
admin/templates/app.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for Apps
|
||||
*/
|
||||
$app=$_['app'];
|
||||
?>
|
||||
<h1><?php echo $app["name"]; ?></h1>
|
||||
<?php echo('<span class="type">'.$app['typename'].'</span>'); ?><br />
|
||||
<span class="date"><?php echo OC_UTIL::formatdate($app["changed"]); ?></span><br />
|
||||
|
||||
|
||||
<table cellspacing="6" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="1" valign="top">
|
||||
<?php if($app["preview1"]<>"") { echo('<img class="preview" border="0" src="'.$app["preview1"].'" /><br />'); } ?>
|
||||
<?php if($app["preview2"]<>"") { echo('<img class="preview" border="0" src="'.$app["preview2"].'" /><br />'); } ?>
|
||||
<?php if($app["preview3"]<>"") { echo('<img class="preview" border="0" src="'.$app["preview3"].'" /><br />'); } ?>
|
||||
</td>
|
||||
<td class="description" valign="top">
|
||||
<?php echo $app["description"]; ?>
|
||||
<br />
|
||||
<?php echo('<a class="description" href="'.$app["detailpage"].'">read more</a><br />'); ?>
|
||||
</td>
|
||||
<td width="1" valign="top" class="install"><a href="">INSTALL</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
@ -13,8 +13,9 @@ form p { padding:0.5em 4em 0.5em 0.5em; text-align:left; }
|
|||
form p.form_footer { margin:1em 0 0 0; text-align:right; }
|
||||
form label { cursor:pointer; }
|
||||
form input { padding:0.2em; border:1px solid #ddd; font-size:1.2em; }
|
||||
/*form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; }*/
|
||||
form input[type="submit"]:hover { border:1px solid #999; background-color:#ccc; }
|
||||
form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; }
|
||||
form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; }
|
||||
form input[type="submit"]:active { outline:0; }
|
||||
fieldset { padding:1em; background-color:#f7f7f7; border:1px solid #ddd; }
|
||||
legend { padding:0 0.5em; font-size:1.2em; }
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ div.controls { width:91%; margin:1em 1em 1em 2em; padding:0.5em 0; background-co
|
|||
|
||||
/* LOG IN SCREEN ------------------------------------------------------------ */
|
||||
body.login { background-image:none; background-color:#ddd; }
|
||||
body.login p.info { width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#eee; background-image:url('../img/help_about.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
|
||||
body.login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
|
||||
#login { margin:0 auto 0 auto; padding:2em 0 0 0; background-image:url('../img/header_background2.png'); background-position:left 0; background-repeat:repeat-x; background-color:#eee; text-align:center; }
|
||||
#login form { margin:2.5em auto 0 auto; padding:0 0 1.5em 0; text-align:center; border-bottom:1px solid #fff; }
|
||||
#login h1 { margin:0; padding:2.5em 0 0 0; border:0; text-align:center; text-transform:lowercase; font-size:1.5em; }
|
||||
|
|
@ -30,22 +31,23 @@ body.login p.info { width:640px; margin:4em auto; padding:1em 1em 1em 4em; backg
|
|||
#login fieldset p { margin:1em 0 0 0; padding:0; text-align:center; }
|
||||
#login label { font-size:1.2em; color:#fff; }
|
||||
#login input { width:8em; margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:2em; color:#666; }
|
||||
#login input:hover, #login input:focus { outline:0; }
|
||||
#login input[type=submit] { width:5em; border:1px solid #ddd; background-color:#fff; font-size:2em; }
|
||||
#login input[type=submit]:hover, #login input[type=submit]:focus { background-color:#ccc; outline:0; }
|
||||
|
||||
/* USER MENU ---------------------------------------------------------------- */
|
||||
#user { float:right; margin:1em 5em 1em 0; background-image:url('../img/drop-arrow.png'); background-repeat:no-repeat; background-position:right center; color:#fff; }
|
||||
#user.userLinkOn { background-color:#39577c; }
|
||||
#user_menu_link { display:block; padding:0.5em 2em 0.5em 1em; font-weight:bold; }
|
||||
#user_menu_link, #user_menu a { text-decoration:none; color:#fff; }
|
||||
#user_menu { position:absolute; z-index:500; right:6.5em; top:45px; list-style-type:none; background-color:#39577c; }
|
||||
#user_menu a { display:block; padding:0.5em 5em 0.5em 1em; background-color:transparent; }
|
||||
#user_menu a:hover { background-color:#1d2d42; }
|
||||
/* USER MENU ---------------------------------------------------------------- */
|
||||
#metanav { float:right; position:relative; top:1.5em; list-style:none; margin:0; padding:0; }
|
||||
#metanav li { display:inline; }
|
||||
#metanav li a { padding:1em; }
|
||||
#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; outline:0; box-shadow:#444 0 1px 0; -moz-box-shadow:#444 0 1px 0; -webkit-box-shadow:#444 0 1px 0; }
|
||||
#metanav li a img { vertical-align:middle; }
|
||||
|
||||
/* PLUGINS MENU ------------------------------------------------------------- */
|
||||
#plugins { float:left; width:200px; padding:0; }
|
||||
#plugins ul { list-style-type:none; border-top:1px solid #ccc; }
|
||||
#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
|
||||
#plugins a:hover, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; }
|
||||
#plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; }
|
||||
#plugins a:active { outline:0; }
|
||||
#plugins .files { background-image:url('../img/files.png'); }
|
||||
#plugins .sharing { background-image:url('../img/sharing.png'); }
|
||||
#plugins .galleries { background-image:url('../img/galleries.png'); }
|
||||
|
|
@ -63,7 +65,8 @@ table td.date { width:11em; }
|
|||
table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; }
|
||||
table td.filename a { display:block; background-image:url('../img/file.png'); text-decoration:none; }
|
||||
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; }
|
||||
table td.filename a:hover { text-decoration:underline; }
|
||||
table td.filename a:hover, table td.filename a:focus { text-decoration:underline; outline:0; }
|
||||
table td.filename a:active { outline:0; }
|
||||
table em { font-weight:bold; }
|
||||
table td.filename a.folder-up { background-image:url('../img/back.png'); font-style:italic; }
|
||||
table td.filename a.folder { background-image:url('../img/folder.png'); }
|
||||
|
|
@ -90,7 +93,8 @@ p.nav a img { height:16px; vertical-align:text-top; }
|
|||
/* ACTIONS BAR */
|
||||
p.actions { padding:0; }
|
||||
p.actions a { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; background-image:url('../img/action.png'); border-right:1px solid #eee; text-decoration:none; color:#333; }
|
||||
p.actions a:hover { background-color:#eee; color:#000; }
|
||||
p.actions a:hover, p.actions a:focus { background-color:#eee; color:#000; outline:0; }
|
||||
p.actions a:active { outline:0; }
|
||||
p.actions a.new-dir { background-image:url('../img/folder-new.png'); }
|
||||
p.actions a.download { background-image:url('../img/download.png'); }
|
||||
p.actions a.delete { background-image:url('../img/delete.png'); }
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for files admin page
|
||||
*/
|
||||
?>
|
||||
<h1>Admin</h1>
|
||||
|
||||
<form>
|
||||
<input type="checkbox" /> Allow public folders<br>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for files
|
||||
*/
|
||||
?>
|
||||
<h1>Files</h1>
|
||||
|
||||
<div class="controls">
|
||||
<p class="actions">
|
||||
<a href="" title="" class="upload" id="file_upload_button">Upload</a><a
|
||||
|
|
|
|||
|
|
@ -8,27 +8,12 @@ if( !OC_USER::isLoggedIn()){
|
|||
}
|
||||
|
||||
OC_APP::setActiveNavigationEntry( "help" );
|
||||
$settings = array();
|
||||
|
||||
// Do the work ...
|
||||
if( $_POST["submit"] )
|
||||
{
|
||||
if( $_POST["newpassword"] != $_POST["newpasswordconfirm"] ){
|
||||
// Say "Passwords not equal"
|
||||
}
|
||||
else{
|
||||
if( OC_USER::checkPassword( $_SESSION["username"], $_POST["password"] )){
|
||||
// Set password
|
||||
OC_USER::setPassord( $_SESSION["username"], $_POST["newpassword"] );
|
||||
}
|
||||
else{
|
||||
// Say "old password bad"
|
||||
}
|
||||
}
|
||||
}
|
||||
$kbe=OC_OCSCLIENT::getKnownledgebaseEntries();
|
||||
|
||||
|
||||
$tmpl = new OC_TEMPLATE( "help", "index", "user" );
|
||||
$tmpl->assign( "settings", $settings );
|
||||
$tmpl->assign( "kbe", $kbe );
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -5,4 +5,13 @@
|
|||
?>
|
||||
<h1>Help</h1>
|
||||
|
||||
Help.
|
||||
<table cellspacing="0">
|
||||
<tbody>
|
||||
<?php foreach($_["kbe"] as $kb): ?>
|
||||
<tr>
|
||||
<td width="1"><?php if($kb["preview"] <> "") { echo('<a href="'.OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id'].'"><img class="preview" border="0" src="'.$kb["preview"].'" /></a>'); } ?> </a></td>
|
||||
<td class="name"><a href="<?php echo(OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id']); ?>" title=""><?php echo $kb["name"]; ?></a><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
BIN
img/task-attention.png
Normal file
BIN
img/task-attention.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -29,6 +29,13 @@ require_once( 'template.php' );
|
|||
$errors=OC_UTIL::checkServer();
|
||||
if(count($errors)>0){
|
||||
OC_TEMPLATE::printGuestPage( "", "error", array( "errors" => $errors ));
|
||||
}elseif(isset($_POST['install']) and $_POST['install']=='true'){
|
||||
require_once 'installer.php';
|
||||
}elseif (!OC_CONFIG::getValue('installed',false)) {
|
||||
$hasSQLite=is_callable('sqlite_open');
|
||||
$hasMySQL=is_callable('mysql_connect');
|
||||
$datadir=OC_CONFIG::getValue('datadir',$SERVERROOT.'/data');
|
||||
OC_TEMPLATE::printGuestPage( "", "installation",array('hasSQLite'=>$hasSQLite,'hasMySQL'=>$hasMySQL,'datadir'=>$datadir));
|
||||
}elseif( OC_USER::isLoggedIn()){
|
||||
if( isset($_GET["logout"]) and ($_GET["logout"]) ){
|
||||
OC_USER::logout();
|
||||
|
|
|
|||
18
js/js.js
18
js/js.js
|
|
@ -9,4 +9,22 @@ $(document).ready(function() {
|
|||
$('#user_menu').slideToggle(250);
|
||||
return false;
|
||||
});
|
||||
|
||||
//hide the advanced config
|
||||
$('#advanced_options').hide();
|
||||
$('#use_mysql').hide();
|
||||
|
||||
// Sets advanced_options link behaviour :
|
||||
$('#advanced_options_link').click(function() {
|
||||
$('#advanced').toggleClass('userLinkOn');
|
||||
$('#advanced_options').slideToggle(250);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#mysql').click(function() {
|
||||
$('#use_mysql').slideDown(250);
|
||||
});
|
||||
$('#sqlite').click(function() {
|
||||
$('#use_mysql').slideUp(250);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -142,4 +142,13 @@ class OC_GROUP {
|
|||
public static function getGroups() {
|
||||
return self::$_backend->getGroups();
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new group
|
||||
*
|
||||
* @param string $name Name of the group
|
||||
*/
|
||||
public static function createGroup($name) {
|
||||
return self::$_backend->createGroup($name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
123
lib/installer.php
Normal file
123
lib/installer.php
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<?php
|
||||
|
||||
if(isset($_POST['install']) and $_POST['install']=='true'){
|
||||
$errors=OC_INSTALLER::install($_POST);
|
||||
if(count($errors)>0){
|
||||
OC_TEMPLATE::printGuestPage( "", "error", array( "errors" => $errors ));
|
||||
}else{
|
||||
header( "Location: $WEBROOT");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
class OC_INSTALLER{
|
||||
public static function install($options){
|
||||
$error=array();
|
||||
$dbtype=$options['dbtype'];
|
||||
if(empty($options['login'])){
|
||||
$error[]=array('error'=>'username not set');
|
||||
};
|
||||
if(empty($options['pass'])){
|
||||
$error[]=array('error'=>'password not set');
|
||||
};
|
||||
if(empty($options['directory'])){
|
||||
$error[]=array('error'=>'data directory not set');
|
||||
};
|
||||
if($dbtype=='mysql'){//mysql needs more config options
|
||||
if(empty($options['dbuser'])){
|
||||
$error[]=array('error'=>'database user directory not set');
|
||||
};
|
||||
if(empty($options['dbpass'])){
|
||||
$error[]=array('error'=>'database password directory not set');
|
||||
};
|
||||
if(empty($options['dbname'])){
|
||||
$error[]=array('error'=>'database name directory not set');
|
||||
};
|
||||
if(empty($options['dbhost'])){
|
||||
$error[]=array('error'=>'database host directory not set');
|
||||
};
|
||||
if(!isset($options['dbtableprefix'])){
|
||||
$error[]=array('error'=>'database table prefix directory not set');
|
||||
};
|
||||
}
|
||||
if(count($error)==0){ //no errors, good
|
||||
$username=$options['login'];
|
||||
$password=$options['pass'];
|
||||
$datadir=$options['directory'];
|
||||
|
||||
//write the config file
|
||||
OC_CONFIG::setValue('datadirectory',$datadir);
|
||||
OC_CONFIG::setValue('dbtype',$dbtype);
|
||||
if($dbtype=='mysql'){
|
||||
$dbuser=$options['dbuser'];
|
||||
$dbpass=$options['dbpass'];
|
||||
$dbname=$options['dbname'];
|
||||
$dbhost=$options['dbhost'];
|
||||
$dbtableprefix=$options['dbtableprefix'];
|
||||
OC_CONFIG::setValue('dbname',$dbname);
|
||||
OC_CONFIG::setValue('dbhost',$dbhost);
|
||||
OC_CONFIG::setValue('dbtableprefix',$dbtableprefix);
|
||||
|
||||
//check if the database user has admin right
|
||||
$connection=mysql_connect($dbhost, $dbuser, $dbpass);
|
||||
if(!$connection) {
|
||||
$error[]=array('error'=>'mysql username and/or password not valid','you need to enter either an existing account, or the administrative account if you wish to create a new user for ownCloud');
|
||||
}else{
|
||||
$query="SELECT user FROM mysql.user WHERE user='$dbuser'";//this should be enough to check for admin rights in mysql
|
||||
if(mysql_query($query,$connection)){
|
||||
//use the admin login data for the new database user
|
||||
self::createDBUser($username,$password);
|
||||
OC_CONFIG::setValue('dbuser',$username);
|
||||
OC_CONFIG::setValue('dbpass',$password);
|
||||
}else{
|
||||
OC_CONFIG::setValue('dbuser',$dbuser);
|
||||
OC_CONFIG::setValue('dbpass',$dbpass);
|
||||
|
||||
//create the database
|
||||
self::createDatabase($dbname,$dbuser);
|
||||
}
|
||||
}
|
||||
mysql_close($connection);
|
||||
}
|
||||
OC_USER::createUser($username,$password);
|
||||
OC_GROUP::createGroup('admin');
|
||||
OC_GROUP::addToGroup($username,'admin');
|
||||
OC_CONFIG::setValue('installed',true);
|
||||
}
|
||||
return $error;
|
||||
}
|
||||
|
||||
public static function createDatabase($name,$adminUser,$adminPwd){//TODO refactoring this
|
||||
$CONFIG_DBHOST=$options['host'];
|
||||
$CONFIG_DBNAME=$options['name'];
|
||||
$CONFIG_DBUSER=$options['user'];
|
||||
$CONFIG_DBPWD=$options['pass'];
|
||||
$CONFIG_DBTYPE=$options['type'];
|
||||
//we cant user OC_BD functions here because we need to connect as the administrative user.
|
||||
$query="CREATE DATABASE IF NOT EXISTS `$name`";
|
||||
$result = mysql_query($query,$connection);
|
||||
if (!$result) {
|
||||
$entry='DB Error: "'.mysql_error($connection).'"<br />';
|
||||
$entry.='Offending command was: '.$query.'<br />';
|
||||
echo($entry);
|
||||
}
|
||||
$query="GRANT ALL PRIVILEGES ON `$name` . * TO '$user'";
|
||||
$result = mysql_query($query,$connection);
|
||||
if (!$result) {
|
||||
$entry='DB Error: "'.mysql_error($connection).'"<br />';
|
||||
$entry.='Offending command was: '.$query.'<br />';
|
||||
echo($entry);
|
||||
}
|
||||
}
|
||||
|
||||
private static function createDBUser($name,$password){
|
||||
//we need to create 2 accounts, one for global use and one for local user. if we don't speccify the local one,
|
||||
// the anonymous user would take precedence when there is one.
|
||||
$query="CREATE USER 'name'@'localhost' IDENTIFIED BY '$password'";
|
||||
$result = mysql_query($query,$connection);
|
||||
$query="CREATE USER '$name'@'%' IDENTIFIED BY '$password'";
|
||||
$result = mysql_query($query,$connection);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -114,6 +114,29 @@ class OC_OCSCLIENT{
|
|||
return $app;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get all the knowledgebase entries from the OCS server
|
||||
* @returns array with q and a data
|
||||
*
|
||||
* This function returns a list of all the knowledgebase entries from the OCS server
|
||||
*/
|
||||
public static function getKnownledgebaseEntries(){
|
||||
$url='http://api.opendesktop.org/v1/knowledgebase/data?page=0&pagesize=10';
|
||||
|
||||
$kbe=array();
|
||||
$xml=file_get_contents($url);
|
||||
$data=simplexml_load_string($xml);
|
||||
|
||||
$tmp=$data->data->content;
|
||||
for($i = 0; $i < count($tmp); $i++) {
|
||||
$kb=array();
|
||||
$kb['id']=$tmp[$i]->id;
|
||||
$kb['name']=$tmp[$i]->name;
|
||||
$kb['description']=$tmp[$i]->description;
|
||||
$kbe[]=$kb;
|
||||
}
|
||||
return $kb;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
0
plugins/publiclink/plugin.xml
Executable file → Normal file
0
plugins/publiclink/plugin.xml
Executable file → Normal file
|
|
@ -1,8 +1,28 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for settings page
|
||||
*/
|
||||
?>
|
||||
<h1>Settings</h1>
|
||||
<form id="quota">
|
||||
<fieldset>
|
||||
<legend>Account information</legend>
|
||||
<div id="quota_indicator"><div style="width:72%;"> </div></div>
|
||||
<p>You're currently using 72% (7.2GB) of your 10GB space.</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Welcome to the settings! Bla bla bla
|
||||
<form id="user_settings">
|
||||
<fieldset>
|
||||
<legend>User settings</legend>
|
||||
<p>
|
||||
<label for="email">Email :</label>
|
||||
<input type="text" id="email" name="email" value="user@example.net" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="pass1">New password :</label>
|
||||
<input type="password" id="pass1" name="pass1" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="pass2">Confirm new password :</label>
|
||||
<input type="password" id="pass2" name="pass2" />
|
||||
</p>
|
||||
<p class="form_footer">
|
||||
<input type="submit" value="Save" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<?php foreach($_["errors"] as $error):?>
|
||||
<li class='error'>
|
||||
<?php echo $error['error'] ?><br/>
|
||||
<p class='hint'><?php echo $error['hint'] ?></p>
|
||||
<p class='hint'><?php if(isset($error['hint']))echo $error['hint'] ?></p>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
|
|
|||
52
templates/installation.php
Normal file
52
templates/installation.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for installation page
|
||||
*/
|
||||
?>
|
||||
<div id="login">
|
||||
<img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
|
||||
<form action="" method="post">
|
||||
<input type='hidden' name='install' value='true'/>
|
||||
<fieldset>
|
||||
<p><input type="text" name="login" value="username" /></p>
|
||||
<p><input type="password" name="pass" value="password" /></p>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<?php if(!$_['hasSQLite']): ?>
|
||||
<legend><abbr title="to use SQLite instead, install it on your server">MySQL</abbr> Database</legend>
|
||||
<p><input type="text" name="dbuser" value="admin / username" /></p>
|
||||
<p><input type="password" name="dbpass" value="password" /></p>
|
||||
<p><input type="text" name="dbname" value="database name" /></p>
|
||||
<?php endif;?>
|
||||
</fieldset>
|
||||
<fieldset id="advanced">
|
||||
<legend><a id="advanced_options_link" href="">Advanced ▾</a></legend>
|
||||
<div id="advanced_options">
|
||||
<p><label class="left">Data directory</label></p><p><input type="text" name="directory" value="<?php echo($_['datadir']);?>" /></p>
|
||||
<?php if($_['hasMySQL'] and $_['hasSQLite']): ?>
|
||||
<p><label class="left">Database</label></p>
|
||||
<p><input type="radio" name="dbtype" value='sqlite' id="sqlite" checked="checked" /><label for="sqlite">SQLite</label>
|
||||
<input type="radio" name="dbtype" value='mysql' id="mysql"><label for="mysql">MySQL</label></p>
|
||||
<div id="use_mysql">
|
||||
<p><input type="text" name="dbuser" value="admin / username" /></p>
|
||||
<p><input type="password" name="dbpass" value="password" /></p>
|
||||
<p><input type="text" name="dbname" value="database name" /></p>
|
||||
<?php endif;?>
|
||||
<?php if($_['hasMySQL'] and !$_['hasSQLite']): ?>
|
||||
<input type='hidden' name='dbtype' value='mysql'/>
|
||||
<?php endif;?>
|
||||
<?php if(!$_['hasMySQL'] and $_['hasSQLite']): ?>
|
||||
<input type='hidden' name='dbtype' value='sqlite'/>
|
||||
<?php endif;?>
|
||||
<?php if($_['hasMySQL']): ?>
|
||||
<p><label class="left">Host</label></p><p><input type="text" name="dbhost" value="localhost" /></p>
|
||||
<p><label class="left">Table prefix</label></p><p><input type="text" name="dbtableprefix" value="oc_" /></p>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<p class="submit"><input type="submit" value="Create" /></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for admin pages
|
||||
*/
|
||||
?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ownCloud</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
|
@ -21,12 +16,12 @@
|
|||
<div id="header">
|
||||
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
|
||||
|
||||
<div id="user">
|
||||
<a href="<?php echo link_to('', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a>
|
||||
<a href="<?php echo link_to('settings', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a>
|
||||
<a href="<?php echo link_to('help', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/help.png'); ?>"></a>
|
||||
<a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title=""><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a>
|
||||
</div>
|
||||
<ul id="metanav">
|
||||
<li><a href="<?php echo link_to('', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a></li>
|
||||
<li><a href="<?php echo link_to('settings', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a></li>
|
||||
<li><a href="<?php echo link_to('help', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/help.png'); ?>"></a></li>
|
||||
<li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title=""><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for guest pages
|
||||
*/
|
||||
?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ownCloud</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
|
@ -19,9 +14,6 @@
|
|||
|
||||
<body class="login">
|
||||
<?php echo $_['content']; ?>
|
||||
<p class="info">
|
||||
ownCloud is an open personal cloud which runs on your personal server.<br />
|
||||
To learn more, please visit <a href="http://www.owncloud.org/">owncloud.org</a>.
|
||||
</p>
|
||||
<p class="info"><a href="http://owncloud.org/">ownCloud</a> is a personal cloud which runs on your own server.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
/*
|
||||
* Template for user pages
|
||||
*/
|
||||
?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ownCloud</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
|
@ -21,14 +16,14 @@
|
|||
<div id="header">
|
||||
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
|
||||
|
||||
<div id="user">
|
||||
<ul id="metanav">
|
||||
<?php if( OC_APP::getActiveNavigationEntry() == "help" ): ?>
|
||||
<a href="<?php echo link_to('', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a>
|
||||
<li><a href="<?php echo link_to('', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a></li>
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo link_to('settings', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a>
|
||||
<a href="<?php echo link_to('help', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/help.png'); ?>"></a>
|
||||
<a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title=""><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a>
|
||||
</div>
|
||||
<li><a href="<?php echo link_to('settings', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a></li>
|
||||
<li><a href="<?php echo link_to('help', 'index.php'); ?>" title=""><img src="<?php echo image_path('', 'layout/help.png'); ?>"></a></li>
|
||||
<li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title=""><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
|||
Loading…
Reference in a new issue