# Top_List (c)2000, Blake McDonald (webmaster@dark-library.com)
#
# Top_List ver. 1.0
#
# config.php3
// the name of the top site list
$top_list_name = "The Teens Top 100";
// your email address
$admin_email = "webmaster@teenstop100.com";
// want to get an email when there is a new member?
// enter "yes" or "no"
$get_new_member_email = "yes";
$path = "/nfs/teenstop100.com/public_html";
// full system paths to each of the following, these should all be Chmod 666
$site_log_file = "{$path}/admin/site_log.txt";
$reset_log_file = "{$path}/admin/reset.txt";
$vote_timeout_file = "{$path}/admin/vote_timeout.txt";
$counter_file = "{$path}/admin/count.txt";
$updates_file = "{$path}/admin/updates.txt";
// the header and footer file that you want at the top of all the pages
$HEADER = "header.inc";
$FOOTER = "footer.inc";
// this is a top what list? 100, 50 and 25 is recommended
$max_list_size = 100;
// amount of banners to show at the top of the list.
$max_banners_to_show = 10;
// after every how many sites would you like to insert a banner break? See readme for more info
$break_time = 25;
// Put a break after the top sites with banners ends? enter "yes" or "no"
$break_after_banners = "yes";
// do you want to use different breaks or all the same? see readme for more info
// enter "different" or "same"
$break_type = "different";
##### timed stuff
// home many days before the list is reset to 0 votes and 0 hits
$days_to_reset = 7;
// how many hours until someone can vote for the same site again. 12 or 24 is recommended
$vote_timeout_hours = 12;
// anti-cheat gateway messages
$anti_cheat_message = "You have already voted within the last $vote_timeout_hours hours! Your vote hasn't been logged.
";
$vote_log_message = "Thanks! Your vote has been counted!
";
##### Anti-Cheat details
// If you want there to be a gateway when they vote for a site so they have to click
// a button to continue. This makes hidden frame and pop-up cheating impossible because
// if won't count the vote unless it comes from your site.
// enter 1 if you want to use this, or else enter 0
$super_gateway = 0;
##### Link banner config
$max_banner_width = 470;
$max_banner_height = 70;
// if you would like the above banner dementions to be already entered in the form
// so people won't have to type it in if they use this size of banner enter "yes"
// if not enter "no"
$auto_enter_bandem = "yes";
// put FULL URL to vote image here
$vote_image_url = "http://www.teenstop100.com/teensbanner.jpg";
// put fill url to top list folder, no trailing slash
$url_to_folder = "http://www.teenstop100.com";
##### How everything looks. Colors, sizes, etc.
// table borders
$table_border_size = 1;
$table_border_color = "#afae8b";
// other table config
$table_cellpadding = 5;
$table_cellspacing = 3;
$table_master_width = 628;
// the table top titles background color and text font tag.
// this is the part that says hits, the rank, and votes etc.
$title_bg_color = "#0000B9";
// put in the text codes that will be before and after the title text
$title_font_tag_before = "";
$title_font_tag_after = "";
// Body table config, everything below the top title that has the listing of all the sites
$body_main_bg_color = "#000000";
$body_rank_bg_color = "#0000B9";
$body_rank_font_before = "";
$body_rank_font_after = "";
// set master font tag for all the text in the body
$master_font_before = "";
$master_font_after = "";
##### What you want it to say on top
$RANK = "#";
$SITE = "SITES";
$VOTES = "IN";
$HITS = "OUT";
##### STOP! #####
function reset_list($site_log_file,$total,$file){
$fp = fopen($site_log_file, "r");
flock($fp,1);
$reset_list = fread($fp, filesize($site_log_file));
fclose($fp);
for($i=0; $total > $i; $i++){
$split = explode("||", $file[$i]);
$before = "$split[0]||$split[1]||$split[2]||";
$after = "0||0||$split[2]||";
$reset_list = str_replace("$before","$after", $reset_list);
}
$fp = fopen($site_log_file, "w");
flock($fp,2);
$fw = fwrite($fp, $reset_list);
fclose($fp);
}
#####
function reset_update_time($reset_log_file,$days_to_reset){
$days_code = 86400 * $days_to_reset;
$reset_date = time()+$days_code;
$fp = fopen($reset_log_file, "w");
flock($fp,2);
$fw = fwrite($fp, $reset_date);
fclose($fp);
}
#####
?>