#!/usr/local/bin/perl # index.cgi # Display the current PPTP configuration require './pptp-server-lib.pl'; # Check if it is installed if (!&has_command($config{'pptpd'}) || !($vers = &get_pptpd_version(\$out))) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1); print "
",&text('index_epptpd', "$config{'pptpd'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"
\n"; if ($out) { print &text('index_ver', "$config{'pptpd'} -v"),"\n"; print "
$out\n"; } } else { # Show the title and version &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0, &help_search_link("pptp", "man", "doc"), undef, undef, &text('index_version', $vers)); if (!-r $config{'file'}) { # Check for the config file print "
",&text('index_econfig', "$config{'file'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"
\n"; } elsif (!&has_command("pppd")) { # Check for PPPd print "
",&text('index_epppd', "pppd"),"
\n"; } else { # Show table of options if ($access{'conf'}) { push(@links, "edit_conf.cgi"); push(@images, "images/conf.gif"); push(@titles, $text{'conf_title'}); } if ($access{'options'}) { push(@links, "edit_options.cgi"); push(@images, "images/options.gif"); push(@titles, $text{'options_title'}); } if ($access{'secrets'}) { push(@links, "list_secrets.cgi"); push(@images, "images/secrets.gif"); push(@titles, $text{'secrets_title'}); } if ($access{'conns'}) { push(@links, "list_conns.cgi"); push(@images, "images/conns.gif"); push(@titles, $text{'conns_title'}); } &icons_table(\@links, \@titles, \@images); # Start or stop/apply buttons print &ui_hr(); print "