$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("-",$cGET[$affiliate_var] ? $_GET[$affiliate_var] :$_GET[$affiliate_var2]),time()+9999999, $path, $host); } if ($_GET[$affiliate_var]!="" || $_GET[$affiliate_var2]!=""){ header("Location: index.php"); } if($_COOKIE['PHPSESSID']){ setcookie('PHPSESSID',$_COOKIE['PHPSESSID'],0,'/',".$host"); }else { header("Location: index.php"); exit; } $t->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); }