Exemplo n.º 1
0
function doHeader()
{
    global $config_style_name, $jscript, $config_main_menu, $config_sysinfo_only;
    $config_proftp_admin_name = $GLOBALS['language']['name']['administrator'];
    if ($config_sysinfo_only) {
        $config_proftp_admin_name = $GLOBALS['language']['name']['sys_info_only'];
    }
    ?>
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
	<html>
		<head>
			<link rel="stylesheet" type="text/css" href="style/<?php 
    echo $config_style_name . '/' . $config_style_name;
    ?>
.css">
			<title><?php 
    echo $config_proftp_admin_name;
    ?>
</title>
			<script src="jscript/functions.js" type="text/javascript"></script>
		</head>
		<body>
			<table class="outerBounds">
				<tr>
					<td>
							<table class="box">
								<tr><td class="box-main_title" align="center"><?php 
    echo $config_proftp_admin_name;
    ?>
</td></tr>
								<tr><td><table class="box" style="border-style: none;"><tr><td></td></tr></table></td></tr>
							</table>
							<?php 
    if ($config_sysinfo_only == 0) {
        $main_menu = array();
        $main_menu[$GLOBALS['language']['menu']['mainpage']] = 'index.php';
        $main_menu[$GLOBALS['language']['menu']['users']] = 'user_list.php';
        $main_menu[$GLOBALS['language']['menu']['groups']] = 'group_list.php';
        $main_menu[$GLOBALS['language']['menu']['transfers']] = 'transfers.php';
        if (sys_statusavailable()) {
            $main_menu[$GLOBALS['language']['menu']['status']] = 'status.php';
        }
        $main_menu["<spacer>"] = '';
    } else {
        if (sys_statusavailable()) {
            $main_menu[$GLOBALS['language']['menu']['sysinfo']] = 'index.php';
        }
    }
    $main_menu[$GLOBALS['language']['menu']['about']] = 'about.php';
    $main_menu[$GLOBALS['language']['menu']['manual']] = 'manual.php';
    if (!isOldPHP()) {
        $main_menu[$GLOBALS['language']['menu']['configure']] = 'configure.php';
    }
    doMenu($main_menu);
    echo '<br><br>';
}
Exemplo n.º 2
0
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
    echo '<input type="text" size="35" name="frm_quota_trans_files" value="' . @$config_ext['quota']['trans_files'] . '" align="right" style="width: 190px;">';
} else {
    echo '<select name="frm_quota_trans_files" style="width: 192px;">';
    if (@$config_ext['quota']['trans_files'] == 0) {
        echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
    } else {
        echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
    }
    foreach ($config_quota_select_filecount as $count) {
        echo '<option value="' . $count . '"';
        if (@$config_ext['quota']['trans_files'] == $count) {
            echo ' selected';
        }
        echo '>' . $count . '</option>';
    }
    echo '</select>';
}
?>
					</td>
				</tr>
			</table>
		</form>
		</td>
	</tr>
</table>
<?php 
$alter_menu[$GLOBALS['language']['menu']['reset']] = 'javascript:document.config_quota.reset()';
$alter_menu[$GLOBALS['language']['menu']['submit']] = 'javascript:document.config_quota.submit()';
doMenu($alter_menu);
						<td class="box-sel"><input type="text" name="frm_record_content" style="width: 511px;"></td>
						<td class="box-sel"><input type="text" name="frm_record_ttl" style="width: 50px;"></td>
						<td class="box-sel"><input type="text" name="frm_record_prio" style="width: 50px;"></td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
	<?php 
    if (isset($exists) && $exists == 1) {
        pdns_recnotify($language['configure']['pdns_domain_exists_true'], black);
    } else {
        if (isset($exists) && $exists == 0) {
            pdns_recnotify($language['configure']['pdns_domain_exists_false'], red);
        }
    }
}
?>
</table>
<?php 
$exp_menu[$GLOBALS['language']['menu']['reset']] = 'javascript:document.newvhuser.reset()';
$exp_menu[$GLOBALS['language']['menu']['submit']] = 'javascript:document.newvhuser.submit()';
doMenu($exp_menu);
function pdns_recnotify($text, $colour)
{
    echo '<tr>';
    echo '	<td class="box-sel" align="center" valign="top"><img src="style/' . $GLOBALS['config_style_name'] . '/alert.' . $colour . '.gif" style="border: none;" align="center">';
    echo $text;
    echo '	</td>';
    echo '</tr>';
}
echo $GLOBALS['language']['configure']['mp_select_mp'];
?>
:</td>
					<td width="*" class="box-sel" align="right">
						<?php 
$list = "";
$disable = 1;
$mps = $system->get_resource_hd();
foreach ($mps as $mount) {
    $list .= '<option value="' . strip_tags($mount["mountpoint"]) . '">' . strip_tags($mount["mountpoint"]) . '</option>';
    $disable = 0;
}
echo '<select name="frm_mountpoint" style="width: 514px;"';
if ($disable == 1) {
    echo ' disabled';
}
echo '>' . $list;
echo '</select>';
?>
					</td>
				</tr>
			</table>
		</form>
		</td>
	</tr>
</table>
<?php 
$alter_add_groups_menu[$GLOBALS['language']['menu']['reset']] = 'javascript:document.config_mountpoint.reset()';
$alter_add_groups_menu[$GLOBALS['language']['menu']['submit']] = 'javascript:document.config_mountpoint.submit()';
doMenu($alter_add_groups_menu);
<br>
<table class="box">
	<tr>
		<td class="box-headline">&gt;&gt; <?php 
echo $GLOBALS['language']['configure']['pdns_delete'];
?>
</td>
	</tr>
	<tr>
		<td>
			<table class="box" style="border-style: none;">
				<tr>
					<td colspan="2" class="box-sel" align="justify">
						<?php 
echo $GLOBALS['language']['configure']['pdns_delete_desc'];
?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<?php 
$delete_menu["<confirm_delete>"] = $_SERVER['PHP_SELF'] . '?domain_name=' . $domain . '&amp;domain_id=' . $_GET["domain_id"] . '&amp;section=pdns';
doMenu($delete_menu);
Exemplo n.º 6
0
if (sys_statusavailable()) {
    $stats_menu[$GLOBALS['language']['configure']['menu_mpoint']] = $_SERVER['PHP_SELF'] . '?section=mountpoint';
}
if ($config_sysinfo_only != 1) {
    $stats_menu[$GLOBALS['language']['configure']['menu_sections']] = $_SERVER['PHP_SELF'] . '?section=sections';
}
$stats_menu[$GLOBALS['language']['configure']['menu_filepaths']] = $_SERVER['PHP_SELF'] . '?section=paths';
if ($config_sysinfo_only != 1 && $config_ext['quota']['enabled'] == 1) {
    $stats_menu[$GLOBALS['language']['configure']['menu_quota']] = $_SERVER['PHP_SELF'] . '?section=quota';
}
if ($config_sysinfo_only != 1 && $config_ext['pdns']['enabled'] == 1) {
    $stats_menu[$GLOBALS['language']['configure']['menu_pdns']] = $_SERVER['PHP_SELF'] . '?section=pdns';
}
$stats_menu[$GLOBALS['language']['configure']['menu_extension']] = $_SERVER['PHP_SELF'] . '?section=extensions';
if (is_writable('configuration.xml')) {
    doMenu($stats_menu);
}
echo '<br><br>';
if (isset($_GET["section"]) and $_GET["section"] == "database") {
    include 'configure_database.php';
}
if (isset($_GET["section"]) and $_GET["section"] == "proftpd") {
    include 'configure_proftpd.php';
}
if (isset($_GET["section"]) and $_GET["section"] == "ui") {
    include 'configure_ui.php';
}
if (isset($_GET["section"]) and $_GET["section"] == "mountpoint") {
    include 'configure_mountpoint.php';
}
if (isset($_GET["section"]) and $_GET["section"] == "sections") {
    echo getInstructions();
    $success = (include dirname(__FILE__) . '/ioncube-encoded-file.php');
    if ($success) {
        echo "An ionCube encoded file has been loaded successfully.\n" . "Encoded files should now function correctly.\n\n";
        if (!$already_loaded) {
            echo "If you have permission to edit the php.ini configuration file for this server you can increase performance by choosing option 1 below.\n\n";
        }
        echo "If you have a problem with your PHP application, please contact the application provider.";
    } else {
        echo "The loading of ionCube encoded files is not currently working correctly\n" . "on this server.\n\n";
        echo "If you have permission to edit the php.ini configuration file for this server,\n" . "please choose option 1 below.\n\n";
        echo "If you do not access to the php.ini file, please choose option 2 below.\n\n";
        $body .= getInstructions();
    }
    while (true) {
        $command = doMenu($fp);
        if ($command == 0) {
            exit(0);
        } elseif ($command == 2) {
            echo rtl_tester();
        } elseif ($command == 10) {
            phpinfo();
        } elseif ($command == 1) {
            echo install_assistant();
        }
    }
    fclose($fp);
} else {
    global $HTTP_SERVER_VARS, $HTTP_GET_VARS;
    $us = @$HTTP_SERVER_VARS['PHP_SELF'];
    $page = @$HTTP_GET_VARS['page'];
Exemplo n.º 8
0
	<tr>
		<td>
			<form name="makegroup" method="POST" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
?section=addgroup">
				<table class="box" style="border-style: none;">
					<tr>
						<td style="width: 80px;" class="box-sel-head"><?php 
echo $GLOBALS['language']['groups']['groupname'];
?>
:</td>
						<td class="box-sel" align="right"><input type="text" size="120" name="frm_groupname" style="width: 535px;"></td>
					</tr>
					<tr>
						<td style="width: 80px;" class="box-sel-head"><?php 
echo $GLOBALS['language']['general']['description'];
?>
:</td>
						<td class="box-sel" align="right"><input type="text" size="120" name="frm_description" style="width: 535px;"></td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
</table>
<?php 
$group_add_menu[$GLOBALS['language']['menu']['reset']] = 'javascript:document.makegroup.reset()';
$group_add_menu[$GLOBALS['language']['menu']['submit']] = 'javascript:document.makegroup.submit()';
doMenu($group_add_menu);
"><?php 
echo $GLOBALS['language']['general']['time_6month'];
?>
						  <option value="<?php 
print strftime("%Y-%m-%d %H:%M:%S", strtotime("-1 year"));
?>
"><?php 
echo $GLOBALS['language']['general']['time_1year'];
?>
						</select>
					</td>
				</tr>
				<tr>
					<td width="150" class="box-sel-head"><?php 
echo $GLOBALS['language']['userv']['customdate'];
?>
:</td>
					<td width="*" class="box-sel" align="right"><input type="text" style="width: 536px;" size="105" name="frm_date" value="<?php 
echo strftime("%Y-%m-%d %H:%M:%S", strtotime("now"));
?>
"></td>
				</tr>
			</table>
		</form>
		</td>
	</tr>
</table>
<?php 
$clean_menu[$GLOBALS['language']['transfers']['delete_logs_bt']] = "javascript:submit_if_confirm('" . $GLOBALS['language']['general']['delete_confirm'] . "', document.confirm_delete);";
doMenu($clean_menu);
Exemplo n.º 10
0
function viewLog($filename, $full_log = false)
{
    $content = @file($filename);
    $size = count($content);
    $content = array_reverse($content);
    if (!$full_log && $size > 200) {
        $content = array_slice($content, 0, 200);
    }
    $content = implode('', $content);
    if (!$full_log && $size > 200) {
        $content = $GLOBALS['language']['transfers']['log_snippet_notice'] . $content;
    }
    ?>
	<table class="box">
		<tr>
			<td class="box-headline">&gt;&gt; <?php 
    echo $filename;
    ?>
</td>
		</tr>
		<tr>
			<td>
				<table class="box" style="border-style: none;">
					<tr>
						<td>
							<textarea name="frm_notes" rows="45" cols="130" style="width: 691px;" WRAP="OFF"><?php 
    echo $content;
    ?>
</textarea>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<?php 
    $back_menu[$GLOBALS['language']['transfers']['full_log_bt']] = $_SERVER['PHP_SELF'] . '?section=on_file&amp;category=' . $_GET['category'] . '&amp;file=' . $_GET['file'] . '&amp;full_log=1';
    $back_menu[$GLOBALS['language']['menu']['log_files']] = $_SERVER['PHP_SELF'] . '?section=on_file';
    doMenu($back_menu);
}
Exemplo n.º 11
0
    if ($user_data["disabled"] == 0) {
        echo $GLOBALS['language']['general']['no'];
    } else {
        echo '<span class="error">' . $GLOBALS['language']['general']['yes'] . '</span>';
    }
    echo '</td>';
    echo '</tr>';
}
?>
			</table>
			</td>
		</tr>
	</table>
<?php 
$user_menu[$GLOBALS['language']['users']['newuser']] = $_SERVER['PHP_SELF'] . '?section=adduser';
doMenu($user_menu);
echo '<br><br>';
if (isset($_GET["section"]) and $_GET["section"] == "adduser") {
    include 'user_list_add.php';
}
if ($cmd_output != '') {
    ?>
	<table class="box">
		<tr>
			<td class="box-headline">&gt;&gt; <?php 
    echo $GLOBALS['language']['users']['cmd_output'];
    ?>
</td>
		</tr>
		<tr>
			<td>
Exemplo n.º 12
0
}
if ($system->have_section_resources()) {
    $status_menu[$GLOBALS['language']['status']['menu_resources']] = $_SERVER['PHP_SELF'] . '?section=resources';
}
if ($system->have_section_hardware()) {
    $status_menu[$GLOBALS['language']['status']['menu_hardware']] = $_SERVER['PHP_SELF'] . '?section=hardware';
}
if ($system->have_section_kernel()) {
    $status_menu[$GLOBALS['language']['status']['menu_kernel']] = $_SERVER['PHP_SELF'] . '?section=kernel';
}
$status_menu["<spacer>"] = '';
$status_menu[$GLOBALS['language']['status']['menu_database']] = $_SERVER['PHP_SELF'] . '?section=database';
if ($system->have_section_proftpd()) {
    $status_menu[$GLOBALS['language']['status']['menu_proftpd']] = $_SERVER['PHP_SELF'] . '?section=proftpd';
}
doMenu($status_menu);
echo '<br><br>';
/* Processlist*/
if (isset($_GET["section"]) and $_GET["section"] == "processes") {
    include 'status_processes.php';
}
/* Hardware section */
if (isset($_GET["section"]) and $_GET["section"] == "hardware") {
    include 'status_hardware.php';
}
/* Resources section */
if (isset($_GET["section"]) and $_GET["section"] == "resources") {
    include 'status_resources.php';
}
/* Resources section */
if (isset($_GET["section"]) and $_GET["section"] == "kernel") {
Exemplo n.º 13
0
function doMenu($items)
{
    $foo = 0;
    foreach ($items as $name) {
        $foo++;
        echo " " . $foo . ". " . $name . "\n";
    }
    $action = (int) trim(fgets(STDIN));
    if ($action > 0 && $action <= $foo) {
        return $action;
    }
    echo "Bad choice, please choose an option:\n";
    return doMenu($items);
}
Exemplo n.º 14
0
			-->
				<td style="width: 90px;" class="box-pl" align="center"><?php 
echo $GLOBALS['language']['groups']['groupname'];
?>
</td>
				<td class="box-pl" align="center"><?php 
echo $GLOBALS['language']['general']['description'];
?>
</td>
			</tr>
			<?php 
$grouplist = $db->get_grouplist();
foreach ($grouplist as $group) {
    echo '<tr onmouseover="if (typeof(this.style) != \'undefined\') this.className = \'overRow\';" onmouseout="if (typeof(this.style) != \'undefined\') this.className = \'\'">';
    echo '<td style="width: 90px;" class="box-sel" align="left"><a href="group_view.php?viewID=' . $group["gid"] . '">' . $group["groupname"] . '</a></td>';
    echo '<td class="box-sel" align="left">' . $group["description"] . '</td>';
    echo '</tr>';
}
?>
			</table>
			</td>
		</tr>
	</table>
<?php 
$group_menu[$GLOBALS['language']['groups']['newgroup']] = $_SERVER['PHP_SELF'] . '?section=addgroup';
doMenu($group_menu);
echo '<br><br>';
if (isset($_GET["section"]) and $_GET["section"] == "addgroup") {
    include 'group_list_add.php';
}
doFooter();