set_file("content", "homepage.html"); if (get_setting("index_signup")) { if (get_setting("free_signup") == 1) { $t->set_file("signupform", "signup.html"); // if ($_GET['double_email'] == 1) $t->set_var("error", '
The email address you filled in is already in our database.
'); // else $t->set_var("error", ""); $t->set_file("signuplist", "signup.row.html"); $t->set_file("signuplist_b", "signup.row.html"); $t->set_file("confirmpass", "confirm.pass.html"); include("signup.kit.php"); } else { $t->set_file('signupform', "signup.paid.html"); //FFileRead("templates/signup.paid.html", $content); //replace_buttons($content, $member_id, $t); } $t->parse("signup_form", "signupform", true); } //START CYCLER CODE if (get_setting('activate_cycler')) { if ($_COOKIE['cycle'] == '') { $query = "select * from cycle WHERE file='index.php' group by cycle"; $q->query($query); $i = 0; while ($q->next_record()) { $winner = get_setting("make_winner"); if (preg_match('/('.$q->f("cycle").')\:(\d+)/', $winner, $match)) { $q2->query("select id,cycle,text from cycle WHERE id='".$match[2]."'"); $q2->next_record(); $t->set_var("cycle_".$q2->f("cycle"), $q2->f("text")); } else { $query = "select * from cycle where file='index.php' AND cycle='".$q->f("cycle")."' AND display=0 order by id limit 1"; // echo $query; $q2->query($query); $q2->next_record(); if ($q2->nf()) { $q2->query("UPDATE cycle SET display=1 WHERE id='".$q2->f("id")."'"); } else { $q2->query("UPDATE cycle SET display=0 WHERE cycle='".$q->f("cycle")."'"); $query = "select * from cycle where file='index.php' AND cycle='".$q->f("cycle")."' AND display=0 order by id limit 1"; //echo $query; $q2->query($query); $q2->next_record(); } if ($i == 0) { $cookiecycle = $q2->f("cycle").":".$q2->f("id"); $i = 1; } else $cookiecycle .= ",".$q2->f("cycle").":".$q2->f("id"); $t->set_var("cycle_".$q2->f("cycle"), $q2->f("text")); } } $ar_host = parse_url(get_setting("site_full_url")); $host = $ar_host["host"]; $path = $ar_host["path"]; $host = str_replace("www", "", $host); if ($q->nf() != 0) $q2->query("INSERT INTO cycle_stats SET value='".$cookiecycle."', page='index'"); setcookie("cycle", base64_encode(mysql_insert_id()."-".$cookiecycle), time()+7200, $path, $host); // echo $cookiecycle; } else { $text = base64_decode($_COOKIE['cycle']); $cycle = explode(":", $text); $query = "select text,file from cycle where id='$cycle[1]'"; $q->query($query); $q->next_record(); //echo $text; if ($q->f('file') != 'index.php') { $query = "select * from cycle WHERE file='index.php' group by cycle"; $q->query($query); $i = 0; while ($q->next_record()) { $winner = get_setting("make_winner"); if (preg_match('/('.$q->f("cycle").')\:(\d+)/', $winner, $match)) { $q2->query("select id,cycle,text from cycle WHERE id='".$match[2]."'"); $q2->next_record(); $t->set_var("cycle_".$q2->f("cycle"), $q2->f("text")); } else { $query = "select * from cycle where file='index.php' AND cycle='".$q->f("cycle")."' AND display=0 order by id limit 1"; $q2->query($query); //echo $q2->nf(); $q2->next_record(); if ($q2->nf()) { $q2->query("UPDATE cycle SET display=1 WHERE id='".$q2->f("id")."'"); } else { $q2->query("UPDATE cycle SET display=0 WHERE cycle='".$q->f("cycle")."'"); $query = "select * from cycle where file='index.php' AND cycle='".$q->f("cycle")."' AND display=0 order by id limit 1"; //echo $query; $q2->query($query); $q2->next_record(); $q3->query("UPDATE cycle SET display=1 WHERE id='".$q2->f("id")."'"); } if ($i == 0) { $cookiecycle = $q2->f("cycle").":".$q2->f("id"); $i = 1; } else $cookiecycle .= ",".$q2->f("cycle").":".$q2->f("id"); //echo $q2->f("cycle"); $t->set_var("cycle_".$q2->f("cycle"), $q2->f("text")); } } $ar_host = parse_url(get_setting("site_full_url")); $host = $ar_host["host"]; $path = $ar_host["path"]; $host = str_replace("www", "", $host); // echo $cookiecycle; if ($q->nf() != 0) $q2->query("INSERT INTO cycle_stats SET value='".$cookiecycle."', page='index'"); setcookie("cycle", base64_encode(mysql_insert_id()."-".$cookiecycle), time()+7200, $path, $host); } else { $query = "select id,cycle,text from cycle WHERE file='index.php' group by cycle"; $q3->query($query); while ($q3->next_record()) { $winner = get_setting("make_winner"); if (preg_match('/('.$q3->f("cycle").')\:(\d+)/', $winner, $match)) { $q2->query("select id,cycle,text from cycle WHERE id='".$match[2]."'"); $q2->next_record(); $t->set_var("cycle_".$q2->f("cycle"), $q2->f("text")); } } $cycle_name = explode("-", $cycle[0]);//echo $text; $t->set_var("cycle_".$cycle_name[1], $q->f("text"));//echo $cycle[1].count($cycle);//echo "cycle_".$cycle_name[1];echo $q->f("text"); for ($j = 2 ; $j <= count($cycle)-1 ; $j++) { $query = "select text,file,cycle from cycle where id='$cycle[$j]'"; $q3->query($query);//echo "/".$query ; $q3->next_record(); $t->set_var("cycle_".$q3->f("cycle"), $q3->f("text"));//echo "cycle_".$q3->f("cycle"), $q3->f("text"); } } //echo base64_decode($_COOKIE['cycle']); } } //END CYCLER CODE include("inc.bottom.php"); ?>