21 changed files with 239 additions and 69 deletions
-
14admin/appinfo/app.php
-
39admin/apps.php
-
101admin/js/users.js
-
2files/appinfo/app.php
-
6help/appinfo/app.php
-
33help/index.php
-
8help/templates/index.php
-
BINimg/layout/back.png
-
BINimg/layout/help.png
-
BINimg/layout/logout.png
-
BINimg/layout/settings.png
-
15lib/app.php
-
18lib/template.php
-
2log/appinfo/app.php
-
2log/index.php
-
1plugins/blacklist.txt
-
BINsettings/img/information.png
-
21settings/index.php
-
18settings/templates/index.php
-
16templates/layout.admin.php
-
12templates/layout.user.php
@ -1,14 +1,10 @@ |
|||||
<?php |
<?php |
||||
|
|
||||
OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" )); |
OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" )); |
||||
if( OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )) |
|
||||
{ |
|
||||
OC_APP::addNavigationEntry( array( "id" => "admin_index", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "index.php" ), "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ), "name" => "Administration" )); |
|
||||
} |
|
||||
OC_APP::addAdminPage( array( "id" => "core_basic", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "basic.php" ), "name" => "Basic Settings" )); |
|
||||
OC_APP::addAdminPage( array( "id" => "core_system", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings" )); |
|
||||
OC_APP::addAdminPage( array( "id" => "core_users", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users" )); |
|
||||
OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps" )); |
|
||||
OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 5, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins" )); |
|
||||
|
|
||||
|
OC_APP::addAdminPage( array( "id" => "core_system", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); |
||||
|
OC_APP::addAdminPage( array( "id" => "core_users", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); |
||||
|
OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); |
||||
|
OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 5, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); |
||||
|
|
||||
?>
|
?>
|
||||
@ -0,0 +1,39 @@ |
|||||
|
<?php |
||||
|
|
||||
|
/** |
||||
|
* ownCloud |
||||
|
* |
||||
|
* @author Frank Karlitschek |
||||
|
* @copyright 2010 Frank Karlitschek karlitschek@kde.org |
||||
|
* |
||||
|
* This library is free software; you can redistribute it and/or |
||||
|
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
* License as published by the Free Software Foundation; either |
||||
|
* version 3 of the License, or any later version. |
||||
|
* |
||||
|
* This library is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
||||
|
* |
||||
|
* You should have received a copy of the GNU Affero General Public |
||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
||||
|
* |
||||
|
*/ |
||||
|
|
||||
|
require_once('../lib/base.php'); |
||||
|
require( 'template.php' ); |
||||
|
if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ |
||||
|
header( "Location: ".OC_HELPER::linkTo( "index.php" )); |
||||
|
exit(); |
||||
|
} |
||||
|
|
||||
|
// We have some javascript foo!
|
||||
|
OC_UTIL::addScript( "admin", "apps" ); |
||||
|
|
||||
|
|
||||
|
$tmpl = new OC_TEMPLATE( "admin", "apps", "admin" ); |
||||
|
$tmpl->printPage(); |
||||
|
|
||||
|
?>
|
||||
|
|
||||
@ -0,0 +1,101 @@ |
|||||
|
$(document).ready(function(){ |
||||
|
// Dialog for adding users
|
||||
|
$( "#adduser-form" ).dialog({ |
||||
|
autoOpen: false, |
||||
|
height: 300, |
||||
|
width: 350, |
||||
|
modal: true, |
||||
|
buttons: { |
||||
|
"Create an account": function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
}, |
||||
|
Cancel: function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
} |
||||
|
}, |
||||
|
close: function() { |
||||
|
allFields.val( "" ).removeClass( "ui-state-error" ); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$( "#adduser-button" ) |
||||
|
.click(function() { |
||||
|
$( "#adduser-form" ).dialog( "open" ); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
// Dialog for adding users
|
||||
|
$( "#edituser-form" ).dialog({ |
||||
|
autoOpen: false, |
||||
|
height: 300, |
||||
|
width: 350, |
||||
|
modal: true, |
||||
|
buttons: { |
||||
|
"Edit password": function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
}, |
||||
|
Cancel: function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
} |
||||
|
}, |
||||
|
close: function() { |
||||
|
allFields.val( "" ).removeClass( "ui-state-error" ); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$( ".edituser-button" ) |
||||
|
.click(function() { |
||||
|
$( "#edituser-form" ).dialog( "open" ); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
// Dialog for adding users
|
||||
|
$( "#removeuser-form" ).dialog({ |
||||
|
autoOpen: false, |
||||
|
height: 300, |
||||
|
width: 350, |
||||
|
modal: true, |
||||
|
buttons: { |
||||
|
"Remove user": function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
}, |
||||
|
Cancel: function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
} |
||||
|
}, |
||||
|
close: function() { |
||||
|
allFields.val( "" ).removeClass( "ui-state-error" ); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$( ".removeuser-button" ) |
||||
|
.click(function() { |
||||
|
$( "#removeuser-form" ).dialog( "open" ); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
// Dialog for adding users
|
||||
|
$( "#removegroup-form" ).dialog({ |
||||
|
autoOpen: false, |
||||
|
height: 300, |
||||
|
width: 350, |
||||
|
modal: true, |
||||
|
buttons: { |
||||
|
"Remove group": function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
}, |
||||
|
Cancel: function() { |
||||
|
$( this ).dialog( "close" ); |
||||
|
} |
||||
|
}, |
||||
|
close: function() { |
||||
|
allFields.val( "" ).removeClass( "ui-state-error" ); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
$( ".removegroup-button" ) |
||||
|
.click(function() { |
||||
|
$( "#removegroup-form" ).dialog( "open" ); |
||||
|
return false; |
||||
|
}); |
||||
|
} ); |
||||
@ -0,0 +1,6 @@ |
|||||
|
<?php |
||||
|
|
||||
|
OC_APP::register( array( "id" => "help", "name" => "Help" )); |
||||
|
OC_APP::addPersonalMenuEntry( array( "order" => 2, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help" )); |
||||
|
|
||||
|
?>
|
||||
@ -0,0 +1,33 @@ |
|||||
|
<?php |
||||
|
|
||||
|
require_once('../lib/base.php'); |
||||
|
require( 'template.php' ); |
||||
|
if( !OC_USER::isLoggedIn()){ |
||||
|
header( "Location: ".OC_HELPER::linkTo( "index.php" )); |
||||
|
exit(); |
||||
|
} |
||||
|
|
||||
|
$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"
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$tmpl = new OC_TEMPLATE( "help", "index", "user" ); |
||||
|
$tmpl->assign( "settings", $settings ); |
||||
|
$tmpl->printPage(); |
||||
|
|
||||
|
?>
|
||||
@ -0,0 +1,8 @@ |
|||||
|
<?php |
||||
|
/* |
||||
|
* Template for settings page |
||||
|
*/ |
||||
|
?>
|
||||
|
<h1>Help</h1> |
||||
|
|
||||
|
Help. |
||||
|
After Width: 16 | Height: 16 | Size: 670 B |
|
After Width: 16 | Height: 16 | Size: 670 B |
|
After Width: 16 | Height: 16 | Size: 670 B |
|
After Width: 16 | Height: 16 | Size: 670 B |
@ -1,6 +1,6 @@ |
|||||
<?php |
<?php |
||||
|
|
||||
OC_APP::register( array( "order" => 1, "id" => "log", "name" => "Log" )); |
OC_APP::register( array( "order" => 1, "id" => "log", "name" => "Log" )); |
||||
OC_APP::addPersonalMenuEntry( array( "order" => 2, "href" => OC_HELPER::linkTo( "log", "index.php" ), "name" => "Log" )); |
|
||||
|
OC_APP::addSettingsPage( array( "order" => 2, "href" => OC_HELPER::linkTo( "log", "index.php" ), "name" => "Log", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); |
||||
|
|
||||
?>
|
?>
|
||||
|
After Width: 16 | Height: 16 | Size: 803 B |
Write
Preview
Loading…
Cancel
Save
Reference in new issue