diff --git a/html/css/styles.css b/html/css/styles.css index 57c700047..9737051ed 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -304,12 +304,6 @@ input,select { img { border: 0; } -A { text-decoration: none; } -A:link { color: #1111aa; } -A:visited { color: #1111aa; } -A:hover { color: #990099; } -A:active { color: #000000; } - A.sectionhead { text-decoration: none; color: #555; } A.sectionhead:link { text-decoration: none; color: #555; } A.sectionhead:visited { text-decoration: none; color: #555; } @@ -703,11 +697,6 @@ form { margin: 0px; padding: 0px; } hr { border: 0px; height: 1px; background-color: #ccc; color: #ccc; } p { margin: 0px; padding: 0px; } -a { text-decoration:none; color: #11a; } -a:visited { text-decoration:none; color: #11a; } -a:hover { text-decoration:underline; color: #11a; } -a:active { color: #11a; } - .vspace { margin-top: 4px; margin-bottom: 4px; } p.vspace { padding-top: 3px; padding-bottom: 3px; } .content-mat { padding: 0px; margin: auto; display:block; } diff --git a/html/forms/token-item-disable.inc.php b/html/forms/token-item-disable.inc.php new file mode 100644 index 000000000..e336d911e --- /dev/null +++ b/html/forms/token-item-disable.inc.php @@ -0,0 +1,45 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if(!is_numeric($_POST['token_id'])) +{ + echo('error with data'); + exit; +} +else +{ + if($_POST['state'] == 'true') + { + $state = 1; + } + elseif($_POST['state'] == 'false') + { + $state = 0; + } + else + { + $state = 0; + } + $update = dbUpdate(array('disabled' => $state), 'api_tokens', '`id` = ?', array($_POST['token_id'])); + if(!empty($update) || $update == '0') + { + echo('success'); + exit; + } + else + { + echo('error'); + exit; + } +} diff --git a/html/pages/api-access.inc.php b/html/pages/api-access.inc.php index b51941346..5f1ed58be 100644 --- a/html/pages/api-access.inc.php +++ b/html/pages/api-access.inc.php @@ -14,30 +14,91 @@ if ($_SESSION['userlevel'] == '10') { +?> + + - - User - Token Hash - Description - +
+
+ + + + + + + + '); foreach (dbFetchRows("SELECT `AT`.*,`U`.`username` FROM `api_tokens` AS AT JOIN users AS U ON AT.user_id=U.user_id ORDER BY AT.user_id") as $api) { + if($api['disabled'] == '1') + { + $api_disabled = 'checked'; + } + else + { + $api_disabled = ''; + } echo(' - - - - - + + + + + + + '); } echo(' -
UserToken HashDescriptionDisabledRemove
'.$api['username'].''.$api['token_hash'].''.$api['description'].'
'.$api['username'].''.$api['token_hash'].''.$api['description'].'Delete
+ +
+
'); +?> + +