|
Fuck, I just realized that there is one more piece that I di not put up there.
The clicksig piece is the piece that handles when the sig is clicked on and redirects it to the right url for the image they are on.
The clicksig piece:
<?php
$id2use='';
$url2use='';
$ip2use=$_SERVER['REMOTE_ADDR'];
if(!isset($_SERVER['HTTP_REFERER']))
{
$refer2use='';
}
else
{
$refer2use=mysql_real_escape_string($_SERVER['HTTP_REFERER']);
}
require_once('sig_config.php');
$dblist=hookitup();
$maindb=$dblist['maindb'];
$maindbname=$dblist['main_dbname'];
$sql_str="select * from " . $maindbname . ".sig_track where ";
$sql_str .="ip='" . $ip2use . "' ";
$sql_str .="and refer='" . $refer2use . "' ";
$result=mysql_query($sql_str,$maindb);
if($result)
{
if(mysql_num_rows($result)>0)
{
$work=mysql_fetch_array($result);
$id2use=$work['currid'];
}
else
{
$sql_str="select currid from " . $maindbname . ".currentid";
$result = mysql_query($sql_str,$db);
if($result)
{
$idrow=mysql_fetch_array($result);
$id2use=$idrow['currid'];
}
}
}
if(!empty($id2use))
{
$url2use="http://your_base_wp_singlepost_url_here/p=" . $id2use;
}
else
{
$url2use="http://your_default_url_here";
}
Header("Location: " . $url2use);
?>
__________________
All cookies cleared!
|