#!/usr/bin/perl # # Authentic Theme (https://github.com/authentic-theme/authentic-theme) # Copyright Ilia Rostovtsev <ilia@virtualmin.com> # Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE) # use strict; our (%in, $current_theme, $config_directory, $get_user_level, $remote_user, %theme_text); do($ENV{'THEME_ROOT'} . "/authentic-lib.pl"); do($ENV{'THEME_ROOT'} . "/settings-lib.pl"); my @files = get_settings_editor_files(); webmin_user_is_admin() || error($theme_text{'theme_error_access_not_root_user'}); if ($in{'file'}) { array_contains(\@files, $in{'file'}) || error($theme_text{'theme_error_access_dir_not_allowed'}); } my $file = html_escape($in{'file'}); $file = $files[0] if (!$file); ui_print_header(undef, $theme_text{'settings_right_theme_extensions_title'}, undef, undef, undef, 1); print '' . theme_text('settings_right_extensions_title') . ' <p></p>'; print "<form action=\"settings-editor_read.cgi\" method=\"get\" class=\"margined-bottom-3\">\n"; print '<div class="pull-right" style="margin-top: 15px; margin-right: 24px;"><span class="badge label-default">' . ( $file =~ /.css/ ? $theme_text{'theme_fileformat_css'} : $file =~ /.json/ ? $theme_text{'theme_fileformat_json'} : $file =~ /.js/ ? $theme_text{'theme_fileformat_js'} : $file =~ /.pl/ ? $theme_text{'theme_fileformat_perl'} : $theme_text{'theme_fileformat_plain_text'} ) . '</span></div>'; print "<input type=submit value='$theme_text{'settings_right_file_edit'}'>\n"; print "<select name=\"file\">\n"; foreach my $f (@files) { printf "<option %s>%s</option>\n", $f eq $file ? 'selected' : '', $f; } print "</select></form>\n"; my $data = read_file_contents($file); print ui_form_start("settings-editor_write.cgi", "form-data"); print ui_hidden("file", $file), "\n"; print ui_textarea("data", ($file =~ '.json' ? ($data =~ /\{(?:\{.*\}|[^{])*\}/sg) : $data ), 20, 80, undef, undef, "style='width: 100%' " . ( $file =~ '.pl' ? 'placeholder="' . $theme_text{'theme_fileformat_perl_placeholder'} . '"' : '' ) . ""); print ui_form_end([["save", $theme_text{'theme_xhred_global_save'}]]); ui_print_footer("tconfig.cgi", $theme_text{'right_return_theme_options'});
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
extensions | Folder | 0755 |
|
|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
modules | Folder | 0755 |
|
|
unauthenticated | Folder | 0755 |
|
|
401.cgi | File | 342 B | 0755 |
|
403.cgi | File | 342 B | 0755 |
|
404.cgi | File | 342 B | 0755 |
|
CHANGELOG.md | File | 77.62 KB | 0644 |
|
FUNDING.yml | File | 102 B | 0644 |
|
LICENSE | File | 1.04 KB | 0644 |
|
THEME.pgp | File | 3.04 KB | 0644 |
|
authentic-funcs.pl | File | 28.56 KB | 0644 |
|
authentic-init.pl | File | 64.46 KB | 0644 |
|
authentic-lib.pl | File | 99.71 KB | 0644 |
|
authentic.pl | File | 52.32 KB | 0644 |
|
config | File | 139 B | 0644 |
|
config.cgi | File | 6.52 KB | 0755 |
|
config_save.cgi | File | 2.14 KB | 0755 |
|
index.cgi | File | 309 B | 0755 |
|
File | 0 B | 0 |
|
|
File | 0 B | 0 |
|
|
manifest-webmin.json | File | 986 B | 0644 |
|
manifest.template | File | 920 B | 0644 |
|
mconfig.cgi | File | 6.57 KB | 0755 |
|
mconfig_save.cgi | File | 1.68 KB | 0755 |
|
navigation-lib.pl | File | 54.64 KB | 0644 |
|
pam_login.cgi | File | 6.71 KB | 0755 |
|
password_form.cgi | File | 4.07 KB | 0755 |
|
postinstall-usermin.pl | File | 264 B | 0755 |
|
postinstall.pl | File | 645 B | 0755 |
|
service-worker.js | File | 141 B | 0644 |
|
session_login.cgi | File | 8.55 KB | 0755 |
|
settings-backgrounds.cgi | File | 3.61 KB | 0755 |
|
settings-backgrounds_save.cgi | File | 1.16 KB | 0755 |
|
settings-editor_favorites_read.cgi | File | 897 B | 0755 |
|
settings-editor_favorites_write.cgi | File | 574 B | 0755 |
|
settings-editor_read.cgi | File | 2.4 KB | 0755 |
|
settings-editor_write.cgi | File | 973 B | 0755 |
|
settings-favorites_save.cgi | File | 632 B | 0755 |
|
settings-lib.pl | File | 651 B | 0644 |
|
settings-logos.cgi | File | 4.61 KB | 0755 |
|
settings-logos_save.cgi | File | 1.75 KB | 0755 |
|
stats.cgi | File | 8.38 KB | 0755 |
|
sysinfo.cgi | File | 6.4 KB | 0755 |
|
tconfig-lib.pl | File | 33.41 KB | 0644 |
|
tconfig.cgi | File | 6.1 KB | 0755 |
|
theme-update.sh | File | 8.08 KB | 0755 |
|
theme.info | File | 337 B | 0644 |
|
theme.info.no | File | 24 B | 0644 |
|
uconfig.cgi | File | 6.27 KB | 0755 |
|
uconfig_save.cgi | File | 1.99 KB | 0755 |
|
uninstall-usermin.pl | File | 170 B | 0755 |
|
uninstall.pl | File | 346 B | 0755 |
|
xhr-lib.pl | File | 10.22 KB | 0644 |
|
xhr.cgi | File | 355 B | 0755 |
|