File: /home/httpd/html/baretube.com/admin/reset_encoder.php
<?php
require "header.php";
if($_GET[reset]) {
dbQuery("UPDATE status SET encoder_running = 0, encoder_done = 0");
header("Location: /admin/index.php");
}
?>
<div class="content-page">
<!-- RIGHT -->
<div class="header-area">
<div class="breadcrumbs">
<a href="reset_encoder.php">Reset Encoder</a>
</div>
</div>
<div class="content-outer">
<h2>Reset<strong>Encoder</strong></h2>
<p>
When the encoder is running, a file is placed in admin/scripts/ to tell the script how many files are left. If this file is present, it locks the encoder from being run again to prevent multiple executions at once. <strong>The ps aux function below may not work on all servers due to varying permissions and setups from host to host, and should not be considered 100% reliable</strong>. Are you absolutely sure you want to reset the encoder? <br /><br />
<?
$var = shell_exec('ps aux | grep encoder');
if(stripos($var,'encoder_cron.php')) {
echo "<span style='color: green; font-weight: bold;'>Command 'ps aux | grep encoder' reports encoder is running!</span><br><br>";
}
else {
echo "<span style='color: red; font-weight: bold;'>Command 'ps aux | grep encoder' reports encoder is NOT running!</span><br><br>";
}
?>
<a href='<? echo $basehttp; ?>/admin/reset_encoder.php?reset=true'>Yes, Reset the encoder!</a>.
</p>
</div>
<!-- RIGHT -->
<!-- STATYSTYKI -->
</div>
<!-- STATYSTYKI -->
</div>
</div>
<? require "footer.php"; ?>