consolidate php
This commit is contained in:
@@ -501,7 +501,7 @@ for (var ii in sortcams) {
|
||||
// Load settings when the page loads
|
||||
window.onload = function() {
|
||||
loadSettings();
|
||||
$.getJSON('cam.php', function(data) {
|
||||
$.getJSON('main.php?service=cams', function(data) {
|
||||
var wild = Math.random();
|
||||
allcams = data;
|
||||
console.log('Camera data:', data); // Debug: log camera data
|
||||
@@ -535,7 +535,7 @@ for (var ii in sortcams) {
|
||||
}
|
||||
filter();
|
||||
sortcams(); // Apply saved sort
|
||||
$.getJSON('camapi.php?camdb', function(data){
|
||||
$.getJSON('main.php?service=camapi&camdb', function(data){
|
||||
document.getElementById("camcount").textContent = "Total Images: " + data[0].count;
|
||||
});
|
||||
});
|
||||
@@ -544,7 +544,7 @@ for (var ii in sortcams) {
|
||||
function refreshcams() {
|
||||
|
||||
|
||||
$.getJSON('cam.php', function(data){
|
||||
$.getJSON('main.php?service=cams', function(data){
|
||||
var wild = Math.random();
|
||||
//console.log(data);
|
||||
for(var i in data){
|
||||
@@ -565,7 +565,7 @@ $.getJSON('cam.php', function(data){
|
||||
}
|
||||
}}
|
||||
});
|
||||
$.getJSON('camapi.php?camdb', function(data){
|
||||
$.getJSON('main.php?service=camapi&camdb', function(data){
|
||||
document.getElementById("camcount").textContent = "Total Images: " + data[0].count;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user