Command Settings


get_all; my $error=0; if (defined($gets->{"update.x"})) { my $i=0; my $max=$gets->{maxid}; $EQDB->query("delete from commands"); for(my $i=0;$i<$max;++$i) { my ($command,$access) = ($gets->{"command$i"},$gets->{"access$i"}); next if (!$command); $q=sprintf("replace into commands (command,access) values('%s',%s)",$EQDB->escape_string($command),$EQDB->escape_string($access)); $EQDB->query($q); if ($EQDB->get_errno) { $error=1; printf("Error adding command %s: %s
\n",$command,$EQDB->error); } } if ($error==0) { printf("

Command settings updated, will take affect on zone restart.


\n"); } } ?>
query($q); if ($res) { print "\n"; printf "\t\t\n"; printf "\t\t\n"; printf "\t\n"; while(my $row=$res->fetch_row_hash) { printf "\t\t\n",$row->{command},$i,$i,$row->{command}; printf "\t\t\n",$row->{access},$i,$i; print "\t\n"; ++$i; } } printf("\n"); printf("
CommandAccess
#%s \"delete\"
\n",$i); printf("\n",$i-1); ?>