Commit f59e84ac authored by David Morley's avatar David Morley Committed by GitHub

fixes (#120)

parent a56e2126
......@@ -77,7 +77,7 @@ if ('save' === $_action) {
<label>Email <input type="text" size="20" name="email" value="<?php echo $pod['email']; ?>"></label><br>
<label>Podmin Statement (You can use HTML to include links to your terms and policies and information about your pod you wish to share with users.) <br><textarea cols="100" rows="7" name="podmin_statement"><?php echo $pod['podmin_statement']; ?></textarea></label><br>
<label>Weight <input type="text" size="2" name="weight" value="<?php echo $pod['weight']; ?>"> This lets you weight your pod lower on the list if you have too much traffic coming in, 10 is the norm use lower to move down the list.</label><br>
<label>Notify if pod falls to hidden status? <input type="checkbox" name="podmin_notify" <?php $pod['podmin_notify'] === 't' ?? 'CHECKED' ?> ></label><br>
<label>Notify if pod falls to hidden status? <input type="checkbox" name="podmin_notify" <?php echo $pod['podmin_notify'] ? 'checked' : ''; ?> ></label><br>
<input type="submit" name="action" value="save">
</form>
<br>
......
......@@ -245,6 +245,7 @@ foreach ($pods as $pod) {
} elseif ($score < 0) {
$score = 0;
}
_debug('Score', $score);
$weightedscore = ($uptime + $score - (10 - $weight)) / 2;
_debug('Weighted Score', $weightedscore);
......@@ -298,8 +299,6 @@ foreach ($pods as $pod) {
die('Error in SQL query: ' . $e->getMessage());
}
_debug('Score out of 100', $score);
echo 'Success ' . $domain;
echo $newline;
......
......@@ -139,11 +139,11 @@ $navs = [
</div>
</div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/tablesorter/dist/js/jquery.tablesorter.min.js"></script>
<script src="js/podup.js"></script>
<script src="bower_components/tether/dist/js/tether.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="js/podup.js"></script>
<script src="bower_components/facebox/src/facebox.js"></script>
<script src="bower_components/tablesorter/dist/js/jquery.tablesorter.min.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script src="bower_components/chart.js/dist/Chart.min.js"></script>
<?php $statsview && include_once __DIR__ . '/statsviewjs.php'; ?>
......
$('.tablesorter-bootstrap').tablesorter()
$(document).ready(function(){
$.facebox.settings.closeImage = 'bower_components/facebox/src/closelabel.png'
$.facebox.settings.loadingImage = 'bower_components/facebox/src/loading.gif'
$('a[rel*=facebox]').facebox()
$('.tablesorter-bootstrap').tablesorter()
$('[data-toggle="tooltip"]').tooltip()
$(function () {
$('[data-toggle="popover"]').popover()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment