Ok I have
everything working and today's long day was
not in vain!
I'm working on making a forum-tidy example.
For now here is an example of the old code (and I'll post the new version soon!)...
Code: Select all
class settings {
// class stuff defined here
}
if ($_GET['audio'] == "0") {$trueaudio = 0;}// if (!headers_sent()) {setcookie('audio','0',time()+2592000,'/');}}
else if ($_GET['audio'] == "1") {$trueaudio = 1;}// if (!headers_sent()) {setcookie('audio','1',time()+2592000,'/');}}
else if ($_GET['audio'] == "2") {$trueaudio = 2;}// if (!headers_sent()) {setcookie('audio','2',time()+2592000,'/');}}
else if (isset($_GET['audio'])) {$error = audio; $trueaudio = 0;}
else if ($_COOKIE['audio'] == "0") {$trueaudio = 0;}
else if ($_COOKIE['audio'] == "1") {$trueaudio = 1;}
else if ($_COOKIE['audio'] == "2") {$trueaudio = 2;}
else {$trueaudio = 0;}
if ($_GET['connection'] == "1") {$trueconnection = 1;}// if (!headers_sent()) {setcookie('connection','1',time()+2592000,'/');}}
else if ($_GET['connection'] == "2") {$trueconnection = 2;}// if (!headers_sent()) {setcookie('connection','2',time()+2592000,'/');}}
else if ($_GET['connection'] == "r") {$trueconnection = r;}// if (!headers_sent()) {setcookie('connection','r',time()-2592000,'/');}}
else if (isset($_GET['connection'])) {$error = connection; $trueconnection = 0;}
else if ($_COOKIE['connection'] == "1") {$trueconnection = 1;}// if (!headers_sent()) {setcookie('connection','1',time()+2592000,'/');}}
else if ($_COOKIE['connection'] == "2") {$trueconnection = 2;}// if (!headers_sent()) {setcookie('connection','2',time()+2592000,'/');}}
else {$trueconnection = 0;}
$settings = new settings();
$settings->set('audio',$audio);
$settings->set('connection',$connection);
...and keep in mind that those two large chunks of procedural programming...there are other large chunks for
EVERY preference that can be currently set on my website.
So any way I'll have the new version of my class file for you in a bit.
