Unable to connect to the database server at this time.
" ); exit(); } // Select the database if (!@mysql_select_db("affil7_areactor", $dbcnx)) { echo( "Unable to locate the database at this time.
" ); exit(); } /// ACCOUNT LEVEL PROPERTIES //////////////////////////////////////////////////////////// $sA = "SELECT * FROM `affiliates` WHERE Active='yes' AND `AUsername`='" . $Username . "'"; $sSQL = $sA; $result = mysql_query($sSQL); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } while ( $row = mysql_fetch_array($result)) { $AUsername= $row["AUsername"]; $Sessions = $row["Sessions"]; $LastSession= $row["LastSession"]; $Email = $row["Email"]; $Name = $row["Name"]; $HomePage = $row["HomePage"]; $AffiliateID= $row["AffiliateID"]; $StartDate = $row["StartDate"]; $Message = $row["Message"]; $Permission = $row["Permission"]; $Modules = $row["Modules"]; $Theme = $row["Theme"]; } // end while $Theme = strtolower($Theme); if($Theme == "") $Theme = "default"; $value = "$Theme"; setcookie("Theme","$value",time()+86400,"/"); $Name = ucwords($Name); $aModules = explode("|", $Modules); $cntModules = count($aModules); $qtyModules = 0; // these are the table names from the Affiliate's Module string // e.g. dotstartup|dotcasinos for($j=0; $j<$cntModules; $j++) { $TableN = $aModules[$j]; if($TableN != ""){ $sA = "SELECT * FROM `modules` WHERE `TableName`='" . $TableN . "' AND `Owner`='" . $Manager . "' AND `Enabled`='yes' AND `Scope`='Public' ORDER BY `StartDate` DESC"; $sSQL = $sA; $result = mysql_query($sSQL); if (!$result) { echo("Error performing query: " . mysql_error() . "
"); exit(); } while ( $row = mysql_fetch_array($result)) { $MName = $row["Name"]; $MTableName = $row["TableName"]; $MEnabled = $row["Enabled"]; $MStartDate = $row["StartDate"]; $MDescription = $row["Description"]; $MScope = $row["Scope"]; if($MTableName != "") { // add to modules array $m_tablename[$j] = $MTableName; $m_name[$j] = $MName; $m_description[$j] = $MDescription; $m_enabled[$j] = $MEnabled; $m_startdate[$j] = $MStartDate; $m_scope[$j] = $MScope; // no cookie set, so set something to get the page loaded if ($Module == "" OR $Module =='0'){ // no cookie set. Reload with the first module in the Modules string //header("Location: http://affiliatereactor.com/cp/reload.php?$MTableName"); //exit; $value = "m=$MTableName&n=$MName"; setcookie("ARModule","$value",time()+86400,"/"); $cookie2 = $HTTP_COOKIE_VARS[ARModule]; list($m,$n)= split ("&", $cookie2, 2); list($tag1,$Module)= split ("=", $m, 2); list($tag2,$ModuleName)= split ("=", $n, 2); } if($MTableName == $Module){ $cm = $j; // current module is $cm } } // end if not blank table name }// end while } // end if not blank Module item } // end for loop $qtyModules = $cntModules; //if($Module == "" OR $Module == "0") { // header("Location: http://affiliatereactor.com/cp/index.php"); // } // MODULE SPECIFIC PROPERTIES /////////////////////////////////////////////////////// $sA = "SELECT * FROM `" . $Module ."` WHERE Active='yes' AND `AUsername`='" . $Username . "'"; $sSQL = $sA; $result = mysql_query($sSQL); if (!$result) { echo("Error performing query: " . mysql_error() . " $Module is the module. Try Logging out and back in again.
"); exit(); } while ( $row = mysql_fetch_array($result)) { $ID= $row["ID"]; $Domain= $row["Domain"]; $Active= $row["Active"]; $MLPage = $row["MLinkPage"]; $Keywords = $row["Keywords"]; $Views = $row["Views"]; $ViewsRaw = $row["ViewsRaw"]; $SelCopy = $row["SelCopy"]; $SelMetaDesc = $row["SelMetaDesc"]; $SelMetaKeys = $row["SelMetaKeys"]; $SelTemplate = $row["SelTemplate"]; $SelTitle = $row["SelTitle"]; } // end while // MANAGER SPECIFIC PROPERTIES /////////////////////////////////////////////////////// $sA = "SELECT * FROM `managers` WHERE `Username`='" . $Manager . "'"; $sSQL = $sA; $result = mysql_query($sSQL); if (!$result) { echo("Error performing query: " . mysql_error() . " $Manager is the manager. Try Logging out and back in again.
"); exit(); } while ( $row = mysql_fetch_array($result)) { $BrandImage = $row["BrandImage"]; $HomePage = $row["HomePage"]; $AffiliatePage = $row["AffiliatePage"]; } $tKeys = explode("|", $Keywords); $cntKeys = count($tKeys); $nl = chr(13); // $Message = trim($Message); if($Message == "" OR $Message == "") { $Message = "The is no message to display."; } else { $Message = str_replace($nl, "
", "$Message"); } // displaying of selections // 2147483647 means custom selection or user edited if($SelCopy == "2147483647") { $SelCopy = "Custom Copy"; } else { $SelCopy++; } if($SelTemplate == "2147483647") { $SelTemplate = "Custom Template"; } else { $SelTemplate++; } if($SelTitle == "2147483647") { $SelTitle = "Custom Title"; } $PreviewURL = "http://" . $AUsername . "." . $Domain . "/your_keywords_here-" . $Module .".htm"; $MLPreview = "http://" . $AUsername . "." . $Domain . "/links/" . $AUsername . "-1-" . $Module .".htm"; $gs_doc = "articles/getting_started_"; $gs_doc .= Strtolower($Permission); $gs_doc .= ".htm"; ?>
.css" REL="stylesheet">
Active Module Selection: |
|
| ||||||||||||||||||||||
| Reactor Information: | Account Information: | ||||||||||||||
|
|
|
if($BrandImage != "") {
$image = "";
$image .= " |