Hi
After lots of trial and error, I finally hacked together some code that turned the board off/on.
Looking at the link you sent me, the code looks a lot cleaner then the one I put together last night.
But all i'm just getting an error:
Parse error: parse error, unexpected T_STRING in myfile.php on line 3
This is the code I'm now trying to use, if you want a laugh the code I hacked together is below that.
PHP Code:
require_once(DIR . '/includes/adminfunctions_misc.php');
$query1 = sprintf("UPDATE datastore SET data=REPLACE(data,'"bbactive";i:1;','"bbactive";i:0;') WHERE title='options'");
$query2 = sprintf("UPDATE setting SET value=0 WHERE varname='bbactive'");
mysql_query($query1);
mysql_query($query2);
?>
My hacked code:
PHP Code:
<?php
// ########################## REQUIRE BACK-END ############################
require_once(DIR . '/includes/adminfunctions_misc.php');
// Formulate Query
// This is the best way to perform a SQL query
// For more examples, see mysql_real_escape_string()
$query = sprintf("SELECT data FROM datastore WHERE title='options'");
// Perform Query
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
/**/ if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
print_r($row);
print "<BR><BR><BR>";
Print $result[data];
$tempDataStore = str_replace('"bbactive";i:1;','"bbactive";i:0;', $row['data']);
Print $tempDataStore;
// echo $row['data'];
}
}
mysql_free_result($result);
$query = sprintf("UPDATE datastore SET data = '$tempDataStore;' WHERE title='options'");
// Perform Query
$result = mysql_query($query);
?>