0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
affiliates_8mor
/
[
Home
]
File: setcookie.php
<?php ##################################################################################### ## JROX.COM Affiliate Manager - custom.php file ## Version 1.6.2 ## ## Author: Ryan Roxas(ryan@jrox.com) ## Homepage: http://jam.jrox.com ## Bug Reports: http://jam.jrox.com/bugzilla/ ## Release Notes: docs/READ_ME.txt ####################################################################################### ####################################################################################### ## COPYRIGHT NOTICE ## Copyright 2007 JROX Technologies, Inc. All Rights Reserved. ## ## This script may be only used and modified in accordance to the license ## agreement attached (license.txt) except where expressly noted within ## commented areas of the code body. This copyright notice and the ## comments above and below must remain intact at all times. By using this ## code you agree to indemnify JROX Technologies, Inc, its corporate agents ## and affiliates from any liability that might arise from its use. ## ## Selling the code for this program without prior written consent is ## expressly forbidden and in violation of Domestic and International ## copyright laws. ####################################################################################### error_reporting(0); require 'includes/common.php'; require_once 'includes/setlang.php'; require HOME_BASE_DIRECTORY.'/includes/mod/mod_members.php'; if (!empty($_GET['mid'])) { $mid = $_GET['mid']; } else { return; } if (!empty($_GET['pid'])) { $pid = $_GET['pid']; } else { $pid = 1; } $timer_check = mysql_query("SELECT cookie_date_value, cookie_date_type FROM jx_settings") or die(cmysql_error(__LINE__, __FILE__)); $timer_row = mysql_fetch_assoc($timer_check); extract($timer_row); if(!empty($_SERVER['HTTP_REFERER'])) { $ref_site = $_SERVER['HTTP_REFERER']; } else { $ref_site = ROW_UNKNOWN; } //CALCULATE COOKIE TIMER switch ($cookie_date_type) { case "day": $cookie_expires = $cookie_date_value * 60 * 60 * 24; break; case "week": $cookie_expires = $cookie_date_value * 60 * 60 * 24 * 7; break; case "month": $cookie_expires = $cookie_date_value * 60 * 60 * 24 * 30; break; case "year": $cookie_expires = $cookie_date_value * 60 * 60 * 24 * 365; break; } $cookie_domain = COOKIE_DOMAIN; //DON'T FORGET THE . (dot) before the domain $cookie_id = urlencode($mid."###".$pid."###0###0"."###".$ref_site); setcookie("jrox", $cookie_id, time()+$cookie_expires,"/", $cookie_domain); ?>