i don't know why you put serverload.php into the bundle, without properly packaging it for nuke, but anywho, here the fixed code to make it work *properly*
Code:
<?PHP
require_once("mainfile.php");
function serverload() {
global $db, $prefix;
// Use:x
// INCLUDE the file in your script (or cut and paste in)
// assign to a variable $serverload = serverload();
// This will ONLY track page counts from pages that call the
// serverload() function. If you want a page counted, but do
// not need the results, simply call the function without
// assigning a variable.
//
// Requirements:
// MySQL database set up with a table (user selectable) in a
// database (user selectable). Table has one field, time, which
// is defined as INT(14) type.
// Define variables
$tablename = "nuke_serverload"; // Table in database above that information is stored in
$duration = "300"; // How many seconds load will represent.
// Delete old page counts
$sql = "DELETE FROM $tablename WHERE time < " . (time()-$duration) ;
$result = $db->sql_query($sql);
// Insert the current page count
$result = $db->sql_query($sql);
// Get page count (number of rows in the table)
$sql = "SELECT time FROM $tablename";
$result = $db->sql_query($sql);
return $db->sql_numrows ($result);
} // END FUNCTION serverload
?>
i wouldn't have noticed, since i use nuke 6.8, but i recommended a buddy of mine use the bundle, since i assumed it would be in excellent shape, and then i saw the errors at the bottom of his page
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum