示例#1
0
        end_process($p);
    }
    print "<h1>" . T_("Process") . " {$p}</h1>";
    if (is_process_killed($p)) {
        print "<h3>" . T_("Kill signal sent: Please wait...") . "</h3>";
        print "<p><a href='?force_kill'>" . T_("Mark the proces as killed (i.e. when the server is rebooted)") . "</a></p>";
    } else {
        print "<p><a href='?kill=kill'>" . T_("Kill the running process") . "</a> (" . T_("may take up to a few minutes to take effect") . ")</p>";
    }
    $d = process_get_data($p);
    if ($d !== false) {
        xhtml_table($d, array('process_log_id', 'datetime', 'data'), array(T_("Log id"), T_("Date"), T_("Log entry")));
    }
} else {
    global $db;
    $sql = "SELECT process_id\n\t\tFROM process\n\t\tWHERE stop IS NULL\n\t\tAND type = 2";
    $rs = $db->GetAll($sql);
    if (!empty($rs)) {
        foreach ($rs as $r) {
            print "<p><a href='?p={$r['process_id']}'>" . T_("Process") . " {$r['process_id']} " . T_("running...") . "</a></p>";
        }
    } else {
        print "<h2>" . T_("No process running") . "</h2>";
    }
    print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
    $d = process_get_last_data(2);
    if ($d !== false) {
        xhtml_table($d, array('process_log_id', 'datetime', 'data'), array(T_("Log id"), T_("Date"), T_("Log entry")));
    }
}
xhtml_foot();
示例#2
0
    ?>
	
	<h1><?php 
    echo T_("Directory");
    ?>
</h1>
	<form enctype="multipart/form-data" action="?" method="post">
	<p><?php 
    echo T_("Enter directory local to the server (eg /mnt/iss/tmp/images)");
    ?>
: <input name="dir" type="text" value="<?php 
    echo realpath("../doc/filled");
    ?>
"/></p>
	<p><input name='process' id='process' type="submit" value="<?php 
    echo T_("Process directory: browser window must remain open");
    ?>
" /></p>
	<p><input name='watch' id='watch' type="submit" value="<?php 
    echo T_("Watch this directory in the background (recommended)");
    ?>
" /></p>
	</form>
	<?php 
    print "<h2>" . T_("Outcome of last process run (if any)") . "</h2>";
    $d = process_get_last_data(1);
    if ($d !== false) {
        xhtml_table($d, array('process_log_id', 'datetime', 'data'), array(T_("Log id"), T_("Date"), T_("Log entry")));
    }
}
xhtml_foot();