1) ; if (($errstr = SaveConfig($configFileName, $tmpcfg)) || ($errstr = (@include $configFileName) ? '' : "Can not include $configFileName")) { echo $errstr ; exit ; } } if (isset($hCfg) && !isset($cfgPars)) $cfgPars = $hCfg ; # compatibility with the version 1.00 $cfgPars['InstallDir'] = $installDir ; # Get the urls $cfgPars = $cfgPars + Urls(); $cfgPars['ProgNameHtml'] = 'asRep MySQL Version '. MYVERSION .' Administration' ; # Get the cgi inputs $cgiPars = getInputs(); # Check for the admin name if (!strlen($cfgPars['AdminName']) || !strlen($cfgPars['AdminPassEnc'])) { if (isset($cgiPars['state']) && $cgiPars['state'] == 'adminname') { $errstr = SaveAdminName($configFileName, $cfgPars, $cgiPars) ; $errstr ? DispAdminName($cfgPars, $errstr) : header("Location: $cfgPars[Url]") ; }else { DispAdminName($cfgPars, '') ; } exit ; } # verify the user if(!VerifyUserLogin($cfgPars, $cgiPars)) exit() ; # Test mysql connection $dbh = DBConnect($cfgPars['DbHost'], $cfgPars['DbPort'], $cfgPars['DbUser'], $cfgPars['DbPass'], true) ; if (!$dbh || !DBSelect($dbh, $cfgPars['DbName'], true)) { if (isset($cgiPars['state']) && $cgiPars['state'] == 'dbsettings') { $errstr = SaveDBSettings($configFileName, $cfgPars, $cgiPars) ; strlen($errstr) ? DispDBSettings($cfgPars, $errstr) : header("Location: $cfgPars[Url]") ; }else { DispDBSettings($cfgPars, mysql_error()) ; } exit ; } # Create tables if (empty($cgiPars['VersionUpgrade'])){ list ($tables) = DBQueryInArrays($dbh, "SHOW TABLES"); $tfields = TableFields() ; while (list($k,$v) = each($cfgPars['Tbl'])) { $isin = in_array($v, $tables) ; if (!$isin) { $isin = in_array(strtolower($v), $tables) ; if (!$isin) DBQuery($dbh, "CREATE TABLE $v ($tfields[$k])") ; } } } # Version upgrade if ($cfgPars['Version'] < MYVERSION) { if ($cfgPars['Version'] == '1.25'){ $errstr = version125Upgrade($dbh, $configFileName, $cfgPars, $cgiPars) ; }elseif ($cfgPars['Version'] == '1.30'){ $errstr = version130Upgrade($dbh, $configFileName, $cfgPars, $cgiPars) ; }else{ $errstr = "This version of asRep (v." . MYVERSION . ") is not compatible with your version (v." . $cfgPars['Version'] . ")" . "

Still you can make a fresh installation by deleting the 'settings.php' file from the install directory.". " However this will forget your current tracking data since it will open new database tables." . "

To upgrade your data tables also, you need a previous version of asRep." . " For this, please contact us via" . " this form.". " Do not forget to mention your registration key, your current version number and your script type (PHP or Perl)" ; } if (strlen($errstr)) { echo ($errstr) ; }else{ $url = SelfUrl($cfgPars, $cgiPars) ; header("Location: $url") ; } exit ; } # do tasks $errorstr = '' ; if(!isset($cgiPars['state'])) $cgiPars['state']='' ; if (empty($cgiPars['state']) || $cgiPars['state'] == 'login') DispSetup($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'dbBackup') $errorstr = DbBackup($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'dbRestore') $errorstr = DbRestore($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'dbRepair') $errorstr = DbRepair($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'dbOptimize') $errorstr = DbOptimize($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'timezone') $errorstr = SaveTimeZone($configFileName, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'email') $errorstr = SaveEmail($configFileName, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'ipcc' && $cgiPars['update']) $errorstr = GetIpCc($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'mapip2cc') $errorstr = MapIp2Cc($dbh, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'cnotify') $errorstr = SaveClickNotify($configFileName, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'blockIPrange') $errorstr = SaveBlockedIPs($configFileName, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'regkey') $errorstr = SaveRegKey($configFileName, $cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'dbmaintenance' || $cgiPars['state'] == 'dbBackup' || $cgiPars['state'] == 'dbRestore' || $cgiPars['state'] == 'dbRepair' || $cgiPars['state'] == 'dbOptimize') DispDbMaintenance($dbh, $cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vtimezone' || $cgiPars['state'] == 'timezone') DispTimeZone($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vemail' || $cgiPars['state'] == 'email') DispEmail($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vipcc' || $cgiPars['state'] == 'ipcc' || $cgiPars['state'] == 'mapip2cc') DispIp2Country($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vcnotify' || $cgiPars['state'] == 'cnotify') DispClickNotify($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vtrackcode' || $cgiPars['state'] == 'trackcode') DispTrackCode($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vblocktracking' || $cgiPars['state'] == 'blockIPrange' || $cgiPars['state'] == 'blocksetcookie' || $cgiPars['state'] == 'blockdelcookie') DispBlockTracking($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'vupdate' || $cgiPars['state'] == 'regkey') DispUpdate($cfgPars, $cgiPars, $errorstr) ; if ($cgiPars['state'] == 'update') DispDownloadUpdates($cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'fview') DispFileView($cfgPars, $cgiPars); if ($cgiPars['state'] == 'factivate') DispFileAct($cfgPars, $cgiPars) ; if ($cgiPars['state'] == 'vlogout') Logout($cfgPars); mysql_close($dbh) ; ###################################################### function SelfUrl(&$cfg, &$pars){ $url = $cfg['Url'] ; $sep = '?' ; foreach ($pars as $k => $v){ $url .= $sep . $k . '=' . urlencode($v) ; $sep = '&' ; } return $url ; } #--------- Escape the string for single quotation mark -------------- function Esc ($str){ return addcslashes($str, '\'\\') ; } ###################################################### #--------- Table fields -------------- function TableFields() { return array( 'Logs' => ' vTime INT UNSIGNED NOT NULL' . ', Id TINYINT UNSIGNED NOT NULL' . ', cTime TINYINT UNSIGNED NOT NULL' . ', auInfo1 TINYINT UNSIGNED NOT NULL' . ', auInfo2 TINYINT UNSIGNED NOT NULL' . ', Ip INT UNSIGNED NOT NULL' . ', cCode CHAR(2) BINARY NOT NULL' . ', piId INT UNSIGNED NOT NULL' . ', rpagId INT UNSIGNED NOT NULL' . ', adId INT UNSIGNED NOT NULL' . ', PRIMARY KEY (vTime, Id)' , 'PageInfo' => 'Id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', pagId INT UNSIGNED NOT NULL' . ', domId SMALLINT UNSIGNED NOT NULL' . ', asId0 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0' . ', asId1 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0' . ', asId2 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0' . ', asId3 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0' . # for Ad Link ', wsChId0 SMALLINT UNSIGNED NOT NULL DEFAULT 0' . ', wsChId1 SMALLINT UNSIGNED NOT NULL DEFAULT 0' . ', INDEX (pagId)' , 'Domains' => 'Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', FP SMALLINT UNSIGNED NOT NULL' . ', Value VARCHAR(255) NOT NULL' . ', INDEX (FP)' , 'Pages' => 'Id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', FP SMALLINT UNSIGNED NOT NULL' . ', Value BLOB NOT NULL' . ', INDEX (FP)' , 'Dirs' => ' pagId INT UNSIGNED NOT NULL' . ', offset TINYINT UNSIGNED NOT NULL' . ', leaf CHAR(0)' . ', INDEX (pagId)' , 'AdSense' => 'Id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', FP SMALLINT UNSIGNED NOT NULL' . ', chId SMALLINT UNSIGNED NOT NULL' . ', format CHAR(16) NOT NULL' . ', fb CHAR(1) NOT NULL' . ', color_bg CHAR(6) NOT NULL' . ', color_text CHAR(6) NOT NULL' . ', color_link CHAR(6) NOT NULL' . ', color_url CHAR(6) NOT NULL' . ', color_border CHAR(6) NOT NULL' . ', color_line CHAR(6) NOT NULL' . ', INDEX (FP)' , 'Channels' => 'Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', ws CHAR(0) DEFAULT NULL' . ', channel CHAR(12) NOT NULL' . ', name CHAR(32) NOT NULL' . ', INDEX (channel)', 'rDomains' => 'Id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', FP SMALLINT UNSIGNED NOT NULL' . ', Value VARCHAR(255) NOT NULL' . ', INDEX (FP)' , 'rPages' => 'Id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', rdomId MEDIUMINT UNSIGNED NOT NULL' . ', FP SMALLINT UNSIGNED NOT NULL' . ', Value BLOB NOT NULL' . ', INDEX (FP)' , 'AdUrls' => 'Id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' . ', FP SMALLINT UNSIGNED NOT NULL' . ', Value VARCHAR(255) NOT NULL' . ', INDEX (FP)' , 'IpRangeNames' => 'Code CHAR(2) BINARY NOT NULL PRIMARY KEY' . ', Name VARCHAR(64) NOT NULL' , 'IpRanges' => 'Type TINYINT UNSIGNED NOT NULL' . ', Code CHAR(2) BINARY NOT NULL' . ', IpSeg SMALLINT UNSIGNED NOT NULL' . ', StartIp INT UNSIGNED NOT NULL' . ', EndIp INT UNSIGNED NOT NULL' . ', INDEX (IpSeg)' , ) ; } #--------- version upgrade tasks -------------- function vuRedir(&$cfg, &$pars) { if (empty($pars['VersionUpgrade'])) { $pars['VersionUpgrade'] = 0; if ($filedesc = @fopen(FullPath("vustep.txt", $cfg['InstallDir']), 'rb')) { $pars['VersionUpgrade'] = 0+fread($filedesc,1024) ; fclose($filedesc) ; } $pars['VersionUpgrade']++ ; $url = SelfUrl($cfg, $pars) ; echo "" . "asRep is going to start a database upgrade procedure (from v.".$cfg['Version']." to v.".MYVERSION.").
" . "This may take several minutes.
" . "

Please do NOT interrupt the upgrade process since it may cause loss of data." . "

If this task fails (displays an error), " . "please note the URL in the browser's address bar and contact www.asrep.com for assistance." . "

Click here once to start the database upgrade.
" . "" ; }elseif ($pars['VersionUpgrade'] == 'end') { $fname = FullPath("vustep.txt", $cfg['InstallDir']) ; if (file_exists($fname)) unlink($fname) ; }else{ if ($filedesc = @fopen(FullPath("vustep.txt", $cfg['InstallDir']), 'wb')) { fwrite($filedesc, $pars['VersionUpgrade']) ; fclose($filedesc) ; } $pars['VersionUpgrade']++; $url = SelfUrl($cfg, $pars) ; echo "" . "". "" . "asRep database upgrade is in progress.
" . "Finished task# " . ($pars['VersionUpgrade']-1) . ".
" . "Requesting task# " . $pars['VersionUpgrade'] . ".
" . "

Some tasks may take long time to complete. Please do not interrupt the upgrade process since it may cause loss of data." . "

If this task fails (displays an error), " . "please note the URL in the browser's address bar and contact www.asrep.com for assistance." . "" ; } } #--------- version upgrade tasks -------------- function version125Upgrade($dbh, $fname, $ocfg, &$pars) { eval(getConfigStr($ocfg)) ; $ncfg = $cfgPars ; $tfields = TableFields() ; if (empty($pars['VersionUpgrade'])) { vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 1){ # change name of the db tables. DBQuery($dbh, "REPAIR TABLE" . " {$ocfg['Tbl']['Logs']}" . ", {$ocfg['Tbl']['PageInfo']}" . ", {$ocfg['Tbl']['Domains']}" . ", {$ocfg['Tbl']['Pages']}" . ", {$ocfg['Tbl']['Dirs']}" . ", {$ocfg['Tbl']['rDomains']}" . ", {$ocfg['Tbl']['rPages']}" . ", {$ocfg['Tbl']['AdUrls']}" . ", {$ocfg['Tbl']['AdSense']}" . ", {$ocfg['Tbl']['ChannelDef']}" . ", {$ocfg['Tbl']['IpRangeNames']}" . ", {$ocfg['Tbl']['IpRanges']}" ) ; DBQuery($dbh, "RENAME TABLE" . " {$ocfg['Tbl']['Logs']} TO {$ncfg['Tbl']['Logs']}" . ", {$ocfg['Tbl']['PageInfo']} TO {$ncfg['Tbl']['PageInfo']}" . ", {$ocfg['Tbl']['Domains']} TO {$ncfg['Tbl']['Domains']}" . ", {$ocfg['Tbl']['Pages']} TO {$ncfg['Tbl']['Pages']}" . ", {$ocfg['Tbl']['Dirs']} TO {$ncfg['Tbl']['Dirs']}" . ", {$ocfg['Tbl']['rDomains']} TO {$ncfg['Tbl']['rDomains']}" . ", {$ocfg['Tbl']['rPages']} TO {$ncfg['Tbl']['rPages']}" . ", {$ocfg['Tbl']['AdUrls']} TO {$ncfg['Tbl']['AdUrls']}" . ", {$ocfg['Tbl']['AdSense']} TO {$ncfg['Tbl']['AdSense']}" . ", {$ocfg['Tbl']['ChannelDef']} TO {$ncfg['Tbl']['Channels']}" . ", {$ocfg['Tbl']['IpRangeNames']} TO {$ncfg['Tbl']['IpRangeNames']}" # ", {$ocfg['Tbl']['IpRanges']} TO {$ncfg['Tbl']['IpRanges']}" ) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Logs']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['PageInfo']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Domains']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Pages']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Dirs']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['rDomains']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['rPages']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['AdUrls']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['AdSense']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['ChannelDef']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['IpRangeNames']}", true) ; # DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['IpRanges']}", true) ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 2){ # Change The Channels table DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['Channels']} DROP PRIMARY KEY") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['Channels']} ADD Id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['Channels']} ADD ws CHAR(0) DEFAULT NULL") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['Channels']} ADD INDEX (channel)") ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 3){ # Insert the channels into Channels table from AdSense table $sth = DBQuery($dbh, "SELECT ast.channel" . " FROM {$ncfg['Tbl']['AdSense']} AS ast LEFT JOIN {$ncfg['Tbl']['Channels']} AS cdt ON ast.channel=cdt.channel" . " WHERE ISNULL(cdt.channel)>0" . " GROUP BY ast.channel") ; while($rec_r = mysql_fetch_row($sth)) { DBQuery($dbh, "INSERT INTO {$ncfg['Tbl']['Channels']} (Id,ws,channel,name) VALUES(NULL,NULL,". DBQuote($rec_r[0]).",'')") ; } mysql_free_result($sth); vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 4){ # Insert the Id's of the channels into AdSense table DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['AdSense']} ADD chId SMALLINT UNSIGNED NOT NULL") ; $sth = DBQuery($dbh, "SELECT Id,channel FROM {$ncfg['Tbl']['Channels']}") ; while($rec_r = mysql_fetch_row($sth)) { DBQuery($dbh, "UPDATE {$ncfg['Tbl']['AdSense']} SET chId=".DBQuote($rec_r[0])." WHERE channel=". DBQuote($rec_r[1])) ; } mysql_free_result($sth); DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['AdSense']} DROP INDEX channel") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['AdSense']} DROP channel") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['AdSense']} DROP hl") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['AdSense']} ADD color_line CHAR(6) NOT NULL") ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 5){ # update the FP field $sth = DBQuery($dbh, "SELECT Id,chId,format,fb,color_bg,color_text,color_link,color_url,color_border,color_line". " FROM {$ncfg['Tbl']['AdSense']}") ; while($rec_r = mysql_fetch_row($sth)) { $fp = FingerPrint($rec_r[1].$rec_r[2].$rec_r[3].$rec_r[4].$rec_r[5].$rec_r[6].$rec_r[7].$rec_r[8].$rec_r[9], 2); DBQuery($dbh, "UPDATE {$ncfg['Tbl']['AdSense']} SET FP=$fp WHERE Id=$rec_r[0]") ; } mysql_free_result($sth); vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 6){ # Add websearch channels to PageInfo DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} CHANGE asId0 asId0 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} CHANGE asId1 asId1 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} CHANGE asId2 asId2 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} ADD wsChId0 SMALLINT UNSIGNED NOT NULL DEFAULT 0") ; DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} ADD wsChId1 SMALLINT UNSIGNED NOT NULL DEFAULT 0") ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 7){ # remove '-' from AdUrls table and set adId in Logs table to 0 for non-clicked records DBQuery($dbh, "UPDATE {$ncfg['Tbl']['Logs']} SET adId=0 WHERE cTime=0") ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 8){ # Insert an Ip Segment into IpRange table DBQuery($dbh, "CREATE TABLE {$ncfg['Tbl']['IpRanges']} ({$tfields['IpRanges']})") ; $sth = DBQuery($dbh, "SELECT Type, Code, StartIp, EndIp FROM {$ocfg['Tbl']['IpRanges']}") ; while($rec_r = mysql_fetch_row($sth)) { $sseg = (int)($rec_r[2] / 65536) ; $eseg = (int)($rec_r[3] / 65536) ; while($sseg <= $eseg) { DBQuery($dbh, "INSERT INTO {$ncfg['Tbl']['IpRanges']} (Type,Code,IpSeg,StartIp,EndIp)". " VALUES($rec_r[0],". DBQuote($rec_r[1]).",$sseg, $rec_r[2], $rec_r[3])") ; $sseg ++ ; } } mysql_free_result($sth); DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['IpRanges']}", true) ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 9){ # v.1.30 # add a new field for AdLinks into PageInfo table DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} ADD asId3 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0") ; vuRedir($ocfg, $pars) ; exit(); } $errstr = SaveConfig($fname, $ocfg) ; $pars['VersionUpgrade'] = 'end' ; vuRedir($ocfg, $pars) ; return $errstr ; } #--------- version upgrade tasks -------------- function version130Upgrade($dbh, $fname, $ocfg, &$pars) { eval(getConfigStr($ocfg)) ; $ncfg = $cfgPars ; $tfields = TableFields() ; if (empty($pars['VersionUpgrade'])) { vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 1){ DBQuery($dbh, "REPAIR TABLE" . " {$ocfg['Tbl']['Logs']}" . ", {$ocfg['Tbl']['PageInfo']}" . ", {$ocfg['Tbl']['Domains']}" . ", {$ocfg['Tbl']['Pages']}" . ", {$ocfg['Tbl']['Dirs']}" . ", {$ocfg['Tbl']['rDomains']}" . ", {$ocfg['Tbl']['rPages']}" . ", {$ocfg['Tbl']['AdUrls']}" . ", {$ocfg['Tbl']['AdSense']}" . ", {$ocfg['Tbl']['Channels']}" . ", {$ocfg['Tbl']['IpRangeNames']}" . ", {$ocfg['Tbl']['IpRanges']}" ) ; # change name of the db tables. DBQuery($dbh, "RENAME TABLE" . " {$ocfg['Tbl']['Logs']} TO {$ncfg['Tbl']['Logs']}" . ", {$ocfg['Tbl']['PageInfo']} TO {$ncfg['Tbl']['PageInfo']}" . ", {$ocfg['Tbl']['Domains']} TO {$ncfg['Tbl']['Domains']}" . ", {$ocfg['Tbl']['Pages']} TO {$ncfg['Tbl']['Pages']}" . ", {$ocfg['Tbl']['Dirs']} TO {$ncfg['Tbl']['Dirs']}" . ", {$ocfg['Tbl']['rDomains']} TO {$ncfg['Tbl']['rDomains']}" . ", {$ocfg['Tbl']['rPages']} TO {$ncfg['Tbl']['rPages']}" . ", {$ocfg['Tbl']['AdUrls']} TO {$ncfg['Tbl']['AdUrls']}" . ", {$ocfg['Tbl']['AdSense']} TO {$ncfg['Tbl']['AdSense']}" . ", {$ocfg['Tbl']['Channels']} TO {$ncfg['Tbl']['Channels']}" . ", {$ocfg['Tbl']['IpRangeNames']} TO {$ncfg['Tbl']['IpRangeNames']}" . ", {$ocfg['Tbl']['IpRanges']} TO {$ncfg['Tbl']['IpRanges']}" ) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Logs']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['PageInfo']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Domains']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Pages']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['Dirs']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['rDomains']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['rPages']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['AdUrls']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['AdSense']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['ChannelDef']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['IpRangeNames']}", true) ; DBQuery($dbh, "DROP TABLE {$ocfg['Tbl']['IpRanges']}", true) ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 2){ # add a new field for AdLinks into PageInfo table DBQuery($dbh, "ALTER TABLE {$ncfg['Tbl']['PageInfo']} ADD asId3 MEDIUMINT UNSIGNED NOT NULL DEFAULT 0") ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 3){ # do we need to shrink Channels table? $sth = DBQuery($dbh, "SELECT COUNT(DISTINCT ISNULL(ws)>0, channel) FROM {$ncfg['Tbl']['Channels']}") ; list($dcc) = mysql_fetch_row($sth) ; mysql_free_result($sth); $sth = DBQuery($dbh, "SELECT COUNT(*) FROM {$ncfg['Tbl']['Channels']}") ; list($cc) = mysql_fetch_row($sth) ; mysql_free_result($sth); if ($cc>$dcc) { # Oops! DBQuery($dbh, "CREATE TABLE {$ncfg['Tbl']['Channels']}tmp ({$tfields['Channels']})") ; DBQuery($dbh, "INSERT INTO {$ncfg['Tbl']['Channels']}tmp (Id,ws,channel,name)" . " SELECT NULL,ws,channel,'' FROM {$ncfg['Tbl']['Channels']}". " GROUP BY IFNULL(ws,1),channel") ; DBQuery($dbh, "REPAIR TABLE {$ncfg['Tbl']['Channels']}, {$ncfg['Tbl']['Channels']}tmp" ) ; DBQuery($dbh, "RENAME TABLE {$ncfg['Tbl']['Channels']} TO orichannels" . ", {$ncfg['Tbl']['Channels']}tmp TO {$ncfg['Tbl']['Channels']}" ) ; $sth = DBQuery($dbh, "SELECT cht.Id, ocht.Id, ISNULL(cht.ws)>0" . " FROM {$ncfg['Tbl']['Channels']} AS cht, orichannels AS ocht". " WHERE cht.channel=ocht.channel AND IFNULL(cht.ws,1)=IFNULL(ocht.ws,1)") ; while($rec = mysql_fetch_row($sth)) { if ($rec[2]) { DBQuery($dbh, "UPDATE {$ncfg['Tbl']['AdSense']} SET chId=$rec[0] WHERE chId=$rec[1]") ; }else{ DBQuery($dbh, "UPDATE {$ncfg['Tbl']['PageInfo']} SET wsChId0=$rec[0] WHERE wsChId0=$rec[1]") ; DBQuery($dbh, "UPDATE {$ncfg['Tbl']['PageInfo']} SET wsChId1=$rec[0] WHERE wsChId1=$rec[1]") ; } } mysql_free_result($sth); DBQuery($dbh, "DROP TABLE orichannels", true) ; vuRedir($ocfg, $pars) ; exit(); } } if ($pars['VersionUpgrade'] == 4){ # shrink AdSense table DBQuery($dbh, "CREATE TABLE {$ncfg['Tbl']['AdSense']}tmp ({$tfields['AdSense']})") ; DBQuery($dbh, "INSERT INTO {$ncfg['Tbl']['AdSense']}tmp (Id,FP,chId,format,fb,color_bg,color_text,color_link,color_url,color_border,color_line)" . " SELECT NULL,FP,chId,format,fb,color_bg,color_text,color_link,color_url,color_border,color_line" . " FROM {$ncfg['Tbl']['AdSense']}". " GROUP BY chId,format,fb,color_bg,color_text,color_link,color_url,color_border,color_line") ; $sth = DBQuery($dbh, " SELECT Id, CONCAT(chId,format,fb,color_bg,color_text,color_link,color_url,color_border,color_line)" . " FROM {$ncfg['Tbl']['AdSense']}tmp") ; while($rec = mysql_fetch_row($sth)) { $fp = FingerPrint($rec[1], 2) ; DBQuery($dbh, "UPDATE {$ncfg['Tbl']['AdSense']}tmp SET FP=$fp WHERE Id=$rec[0]") ; } mysql_free_result($sth); DBQuery($dbh, "REPAIR TABLE {$ncfg['Tbl']['AdSense']}, {$ncfg['Tbl']['AdSense']}tmp" ) ; DBQuery($dbh, "RENAME TABLE {$ncfg['Tbl']['AdSense']} TO oriadsense" . ", {$ncfg['Tbl']['AdSense']}tmp TO {$ncfg['Tbl']['AdSense']}" ) ; $sth = DBQuery($dbh, "SELECT ast.Id, oast.Id" . " FROM {$ncfg['Tbl']['AdSense']} AS ast, oriadsense AS oast". " WHERE ast.chId=oast.chId AND ast.format=oast.format AND ast.fb=oast.fb AND ast.color_bg=oast.color_bg" . " AND ast.color_text=oast.color_text AND ast.color_link=oast.color_link AND ast.color_url=oast.color_url" . " AND ast.color_border=oast.color_border AND ast.color_line=oast.color_line" ) ; while($rec = mysql_fetch_row($sth)) { DBQuery($dbh, "UPDATE {$ncfg['Tbl']['PageInfo']} SET asId0=$rec[0] WHERE asId0=$rec[1]") ; DBQuery($dbh, "UPDATE {$ncfg['Tbl']['PageInfo']} SET asId1=$rec[0] WHERE asId1=$rec[1]") ; DBQuery($dbh, "UPDATE {$ncfg['Tbl']['PageInfo']} SET asId2=$rec[0] WHERE asId2=$rec[1]") ; } mysql_free_result($sth); DBQuery($dbh, "DROP TABLE oriadsense", true) ; vuRedir($ocfg, $pars) ; exit(); } if ($pars['VersionUpgrade'] == 5){ # shrink PageInfo table DBQuery($dbh, "CREATE TABLE {$ncfg['Tbl']['PageInfo']}tmp ({$tfields['PageInfo']})") ; DBQuery($dbh, "INSERT INTO {$ncfg['Tbl']['PageInfo']}tmp (Id,pagId,domId,asId0,asId1,asId2,asId3,wsChId0,wsChId1)" . " SELECT NULL,pagId,domId,asId0,asId1,asId2,asId3,wsChId0,wsChId1" . " FROM {$ncfg['Tbl']['PageInfo']}". " GROUP BY pagId,domId,asId0,asId1,asId2,asId3,wsChId0,wsChId1") ; DBQuery($dbh, "REPAIR TABLE {$ncfg['Tbl']['PageInfo']}, {$ncfg['Tbl']['PageInfo']}tmp" ) ; DBQuery($dbh, "RENAME TABLE {$ncfg['Tbl']['PageInfo']} TO oripageinfo" . ", {$ncfg['Tbl']['PageInfo']}tmp TO {$ncfg['Tbl']['PageInfo']}" ) ; $sth = DBQuery($dbh, "SELECT pit.Id, opit.Id" . " FROM {$ncfg['Tbl']['PageInfo']} AS pit, oripageinfo AS opit". " WHERE pit.pagId=opit.pagId AND pit.domId=opit.domId AND pit.asId0=opit.asId0 AND pit.asId1=opit.asId1" . " AND pit.asId2=opit.asId2 AND pit.asId3=opit.asId3 AND pit.wsChId0=opit.wsChId0 AND pit.wsChId1=opit.wsChId1" ) ; while($rec = mysql_fetch_row($sth)) { DBQuery($dbh, "UPDATE {$ncfg['Tbl']['Logs']} SET piId=$rec[0] WHERE piId=$rec[1]") ; } mysql_free_result($sth); DBQuery($dbh, "DROP TABLE oripageinfo", true) ; vuRedir($ocfg, $pars) ; exit(); } $errstr = SaveConfig($fname, $ocfg) ; $pars['VersionUpgrade'] = 'end' ; vuRedir($ocfg, $pars) ; return $errstr ; } #--------- get Configuration Data -------------- function getConfigStr (&$cfg){ ob_start() ; ?> # Please make all changes to configuration variables via admin program. $cfgPars = array( 'Version' => '', 'rKey' => '', 'DbHost' => '', 'DbPort' => '', 'DbUser' => '', 'DbPass' => '', 'DbName' => '', 'AdminName' => '', 'AdminPassEnc' => '', 'UTZone' => , 'UTName' => '', 'EMailTo' => '', 'EMailFrom' => '', 'crImg' => , 'crPop' => , 'crCookie' => , 'crCookieDur' => , 'Tbl' => array( 'Logs' => 'asrep140Logs', 'PageInfo'=> 'asrep140PageInfo', 'Domains' => 'asrep140Domains', 'Pages' => 'asrep140Pages', 'Dirs' => 'asrep140Dirs', 'rDomains' => 'asrep140rDomains', 'rPages' => 'asrep140rPages', 'AdUrls' => 'asrep140AdUrls', 'AdSense' => 'asrep140AdSense', 'Channels' => 'asrep140Channels', 'IpRangeNames' => 'asrep140IpRangeNames', 'IpRanges' => 'asrep140IpRanges', ), 'blockedIps' => array( array(,), ), ) ; " ; if ($filedesc = @fopen($fname, 'wb')) { fwrite($filedesc, $configstr) ; fclose($filedesc) ; if ($filedesc = @fopen($fname, 'rb')) { $readstr = '' ; while(strlen($line = fread($filedesc,1024))) $readstr .= $line ; fclose($filedesc) ; if ($configstr != $readstr) { return "Can not read just created configuration file $fname" ; } }else{ return "Can not open the just created configuration file $fname" ; } }else{ return "Can not create configuration file $fname" ; } return '' ; } #--------- Save Admin name password -------------- function SaveAdminName ($fname, &$cfg, &$pars){ $cfg['AdminName'] = $pars['name'] ; $cfg['AdminPass'] = $pars['pass'] ; $cfg['AdminPassEnc'] = EncryptPassword($pars['pass']) ; return SaveConfig($fname, $cfg) ; } #------------------------------------ function SaveDBSettings ($fname, &$cfg, &$pars){ $cfg['DbHost'] = $pars['host'] ; $cfg['DbPort'] = $pars['port'] ; $cfg['DbUser'] = $pars['user'] ; $cfg['DbPass'] = $pars['pass'] ; $cfg['DbName'] = $pars['name'] ; return SaveConfig($fname, $cfg) ; } #------------------------------------ function SaveTimeZone ($fname, &$cfg, &$pars){ $cfg['UTZone'] = $pars['UTZone'] * 60*60 ; $cfg['UTName'] = $pars['UTName'] ; return SaveConfig($fname, $cfg) ; } #------------------------------------ function SaveEmail ($fname, &$cfg, &$pars){ $cfg['EMailTo'] = $pars['EMailTo'] ; $cfg['EMailFrom'] = $pars['EMailFrom'] ; $errstr = SaveConfig($fname, $cfg) ; if (!$errstr && isset($pars['EMailTest'])) { if (IsValidEMail($pars['EMailTo'])) { $from = empty($cfg['EMailFrom']) ? 'asrep@asrep.com':$cfg['EMailFrom'] ; $msg = 'If you read this message, then the e-mail interface is working properly.' ; @SendEMail($pars['EMailTo'], $from, 'asRep e-mail Interface Test Message', 0, $msg) ? ($errstr = 'Test message has been sent to '.$pars['EMailTo'].'') : ($errstr = 'function mail did not accept the message for delivery') ; }else { $errstr = 'You must enter a valid e-mail address to send the test message' ; } } return $errstr ; } #------------------------------------ function GetIpCc ($dbh, &$cfg, &$pars){ if (!empty($pars['forceAll'])) { $updates = array() ; WriteRirUpdates($updates, $cfg['InstallDir']) ; } $errstr = UpdateIpCc($dbh, $cfg, $pars) ; return $errstr ? $errstr : "Ip-to-Country database updated" ; } #------------------------------------ function SaveClickNotify ($fname, &$cfg, &$pars){ @$cfg['crImg'] = $pars['crImg'] ; @$cfg['crPop'] = $pars['crPop'] ; @$cfg['crCookie'] = $pars['crCookie'] ; @$cfg['crCookieDur'] = 0+$pars['crCookieDur'] ; return SaveConfig($fname, $cfg) ; } #------------------------------------ function SaveBlockedIPs ($fname, &$cfg, &$pars){ $cfg['blockedIps'] = array() ; $i=0 ; while (isset($pars["blockedIpsStart$i"]) && isset($pars["blockedIpsCount$i"])){ if (strlen($pars["blockedIpsStart$i"]) && strpos($pars["blockedIpsStart$i"],'.')!==false && $pars["blockedIpsCount$i"]>0) { $cfg['blockedIps'][] = array(0+IPstr2num($pars["blockedIpsStart$i"]), 0+$pars["blockedIpsCount$i"]) ; } $i++ ; } return SaveConfig($fname, $cfg) ; } #------------------------------------ function SaveRegKey ($fname, &$cfg, &$pars){ $cfg['rKey'] = $pars['rKey'] ; return SaveConfig($fname, $cfg) ; } #------------------------------------ function VerifyUserLogin (&$cfg, &$pars){ if (isset($pars['state']) && $pars['state'] == 'login') { if (EncryptPassword($pars['pass'], $cfg['AdminPassEnc']) == $cfg['AdminPassEnc'] && $pars['name'] == $cfg['AdminName']) {# True login setcookie ('UserNameEnc', EncryptPassword($cfg['AdminName']), 0, $cfg['PathUrl']) ; return 1 ; }else { DispLogin($cfg, $pars['name'], "Invalid name or password. Please try again.") ; } }else { $une = isset($_COOKIE['UserNameEnc']) ? $_COOKIE['UserNameEnc'] : '' ; if (EncryptPassword($cfg['AdminName'], $une) == $une) { # Yes you are still login return 1 ; }else { DispLogin($cfg, '', "Please enter your user name and password.") ; } } return 0 ; } #------------------------------------ function Logout(&$cfg) { setcookie ('UserNameEnc', 0, 0, $cfg['PathUrl']) ; DispLogin($cfg, '', "Please enter your user name and password.") ; } #--------- Display User settings -------------- function DispAdminName (&$cfg, $msg){ ?> asRep Admin: User Name and Pass

User Name and Password

Please assign a name and password for the user.

Name of the User:
Password of the User:

Please enter a name and password that you can remember later. Both admin and report scripts will ask for the name and password.

If you can not remember your admin name or password, you can reset it by editing the file settings.php in the installation directory. You must assign an empty string to AdminName. Then admin program will display this screen again.


You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Login
Login
User Name:
Password:

Login information is stored in a session cookie in your browser. Please enable cookies.

asRep Admin: Database Settings

Database Connectivity Settings

Status: '.$msg : '')?>

Please enter the info about the MySql database to be used.

MySQL Server (Host) Name: Enter the name or IP of the database host server. Leave blank for the default server name, 'localhost'.
MySQL Server Port: Enter the port number of the database server. Leave blank for the default server port, '3306'.
MySQL Database Name: Enter the name of the MySQL database where the tables will reside. You must create this database by using the database administration program provided by your hosting provider such as via your hosting control panel. Consult to your hosting provider if you do not know how to do it.
MySQL Database User Name: Enter the name of the user having access right to the database server.
MySQL Database User Password: Enter the password of the user accessing the database server

If you see this screen repeatedly, this means that the script can not connect to the database. Please enter correct settings.


You can re-start the setup process, by deleting the file settings.php in the installation directory. Database  |  IP to Country  |  Time Zone  |  E-Mail  |  Click Reporting  |  Tracking Code  |  Block Tracking  |  Updates  |  Reports  |  Exit END_OF_MENU; } #--------- Display Setup Screen -------------- function DispSetup (&$cfg, &$pars, $msg){ ?> asRep Admin: Other Settings
Status: '.$msg : '')?>

Select the option from the menu.

















You can re-start the setup process, by deleting the file settings.php in the installation directory. \n" ; } if ($sth2) mysql_free_result($sth2); } mysql_free_result($sth); return $str ; } #--------- Optimize Database Tables -------------- function DbOptimize($dbh, &$cfg, &$pars){ $str = "" ; $sth = DBQuery($dbh, "SHOW TABLE STATUS") ; while($rec = mysql_fetch_assoc($sth)) { $sth2 = DBQuery($dbh, "OPTIMIZE TABLE {$rec['Name']}", true) ; while($sth2 && ($rec = mysql_fetch_row($sth2))) { $str .= implode(' : ', $rec) . "
\n" ; } if ($sth2) mysql_free_result($sth2); } mysql_free_result($sth); return $str ; } #--------- Display DB Maintenance Screen -------------- function DispDbMaintenance($dbh, &$cfg, &$pars, $msg){ ?> asRep Admin: Database Maintenance Settings
Status: '.$msg : '')?>

Database Maintenance

List of tables in the database
TableNumber of RowsAvg. Row SizeData SizeIndex Size

Make a backup of the database in the script directory.
> Create compressed backups to save disk space. (You must have Zlib compression library enabled in your PHP configuration as described here)
This operation takes time! Please click to the button only once.

Restore database from a backup:

This operation takes time! Please click to the button only once.
Any database backup was not found.
Optimize the tables in the database: This feature will execute "OPTIMIZE TABLE xxx" on the tables to gain free space etc.
This operation takes time! Please click to the button only once.

Repair the tables in the database: It will execute "REPAIR TABLE xxx" on the tables to attempt to fix corrupted tables. Use this feature only if you encounter table errors.
This operation takes time! Please click to the button only once.


You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Time Zone Settings
Status: '.$msg : '')?>

Time Zone Settings

Specify the time zone you prefer the reports should use. The specified time zone is only used when displaying (retrieving) time values to (from) the user. The actual times are always stored in the database as universal GMT time.

Date/Time in GMT:
Date/Time in user time zone:
Time Zone in hours: This value is the time difference between your local time and the Greenwich Mean Time (GMT or UTC). The software saves and uses all time values in terms of GMT. This setting will be used to convert the saved time values into your preferred time zone (and vice versa) while displaying time values. Some sample values are:
Sydney-Australia...+10, Tokyo-Japan...+9, Hong Kong...+8, Moskow-Russia...+3, Istanbul-Turkey...+2, Paris-France...+1, London-England...0, Buenos Aires-Argentina...-3, Atlantic Time-Canada...-4, Eastern Time-US...-5, Central Time-US...-6, Mountain Time-US...-7, Pacific Time-US...-8
Time Zone Name: Please enter a descriptive name for the time zone you entered. This value is displayed on some reports and on admin panel.



You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: E-Mail Settings
Status: '.$msg : '')?>

E-Mail Settings

Set the e-mail interface available on your system. The scipt will use these settings to send report e-mails

To e-mail address: Enter the e-mail address that will receive the report or test e-mails sent by the script.
From e-mail address: Enter the e-mail address that will appear on the From field of the emails sent by the script.
This script uses PHP mail function to send e-mails. If it is not configured properly on your system, plase see your PHP documentation or ask to your hosting provider to configure mail properly.



You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: IP to Country Database Download
Status: '.$msg : '')?>

IP to Country Management

Download IP to Country mapping database. This database is used in reports to identify the country of visitors from IP address.

No database download has been done yet

$val) { if ($key != 'country' && $val[0]+0 > 0) { ?>
Downloaded ItemLast updateNumber of Lines
Country List
Region Countries
> Force download of all data


This operation may take time! Please click to the button only once.

Map the IPs to Countries in report database. IP-to-Country mapping is done while saving the records. If you have records saved before downloading the IP-to-Country database, or you simply want to refresh the IP-to-Country associations, you can remap the IPs in the database.

Map only the IPs that are not already assigned a country.
Map all IPs again.


This operation may take time! Please click to the button only once.



You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Click/Search Reporting Settings
Status: '.$msg : '')?>

Click/Search Reporting

Please specify how the clicks and searches will be reported. You can specify multiple methods in order to increase the chance the click/search is reported. Since every click/search is given a unique id, multiple reporting of the same click/search is recorded only once. If you un-check all methods, then there will be no click/search tracking. Impression tracking is not affected from these settings.

> Report clicks/searches via an invisible IMG tag element just before loading the new page.

This method is transparent to the visitor. After a click/search is detected, the image is activated to notify the server about the click/search.

> Report clicks/searches via a hidden pop-under window. The window closes itself automatically.

This method opens a pop-under window to notify the server about the click/search. The pop-under window is closed automatically once the click/search is reported. The window is invisible on some browsers like Internet Explorer. Only an icon in the task bar is displayed.

> Report clicks/searches via cookies. Store the cookies for days.

The click/search information is stored in a cookie on the visitor's browser. Next time the visitor comes to your site, the previous click/search info is reported.





You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Tracking Code
Status: '.$msg : '')?>

AdSense Tracking Code

Copy and paste the following tracking code to your web pages.




You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Tracking Exceptions
Status: '.$msg : '')?>

Block Tracking

Some webmasters request that asRep should not track the impressions, clicks and searches during certain cases. For example, a webmaster visiting his/her site a lot may want that the tracking be blocked for his/her activity on the site, since the extra impressions he/she creates mess up the results in asRep reports by increasing the views and decreasing the CTR.

Block tracking via a cookie

By setting a cookie in your browser, you can block tracking of impressions, clicks and searches from this browser.

A cookie is set in this browser to block tracking. Any activity on your web sites with this browser will not be tracked by asRep.

Erase the cookie to allow tracking from this browser.

No cookie is currently set in this browser to block tracking. All activity with this browser will be tracked by asRep.

Set a cookie to block tracking from this browser.

Block tracking via IP list

By entering a list of IP address ranges, you can block tracking of impressions, clicks and searches from these IPs.

Blocked IP Ranges
Starting IPNumber of IPs
 

Example-1: to ban IP 165.146.254.233, enter 165.146.254.233 into Starting IP and 1 into Number of IPs.
Example-2: to ban all IPs in the range (165.146.254.0, 165.146.254.255) inclusive, enter 165.146.254.0 into Starting IP and 256 into Number of IPs.

To remove an IP range from the list, either delete the Starting IP box or enter 0 (zero) into the corresponding Number of IPs box.



You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Upgrading
Status: '.$msg : '')?>

Registration Key

Obtain your registration key and enter it here

Available Updates

ERROR: Can not verify the integrity of data from asRep update server!

$v) { if (!(isset($su_r[$f]) && ($u_r[$f]['date'] <= $su_r[$f]['date']))) { if (!$anyupdate) { ?>
File NameDescription

When you download the files, they will be saved in the installation directory with a new_ prefix added to the file names.
No file or code will be executed without your control.

No new update is available




You can re-start the setup process, by deleting the file settings.php in the installation directory. $u_r[$f]['desc'], 'date'=>$u_r[$f]['date']) ; $du[$f] = array('desc'=>$u_r[$f]['desc'], 'date'=>$u_r[$f]['date'], 'tf'=>"new_$f") ; } } } WriteUpdates($su_r, $cfg['InstallDir']) ; ?> asRep Admin: Upgrading

Downloaded Updates

No update has been done

has been downloaded as

You must click to the Activate the Downloaded Files button in order to make the new files active. After the activation, the old script files are still available with a .back appended to the file name.
You can inspect the file contents before activating them.

If you like, you can rename the downloaded files by yourself via your shell access client or FTP client.


You can re-start the setup process, by deleting the file settings.php in the installation directory. asRep Admin: Content of <?php echo $pars['file']?>


asRep Admin: file activation

Activated Downloads

The file was renamed as and the old was renamed as .

The file was not found.

Return to the Updates page

asians tgp asians tgp atom bacchus topless bacchus topless most anal smile anal smile sand sluts trained sluts trained free naughty wallpapers naughty wallpapers tell hack webcams msn messenger hack webcams msn messenger shout public blowjob ski public blowjob ski as romance writers phrases romance writers phrases enough mam ultivent nipples mam ultivent nipples three breast of human being breast of human being blood asian virgin sex video asian virgin sex video free april flowers sex april flowers sex strange webcam gilrs live webcam gilrs live would women handjob givers women handjob givers above bow wow and dating bow wow and dating live sucker free sunday sucker free sunday die fetish by anna tgp fetish by anna tgp each drew butterfly and tits drew butterfly and tits mother asian free sex pictures asian free sex pictures would pantyhose housecall milf doctor pantyhose housecall milf doctor sea reptile dysfunction reptile dysfunction shoulder rht feet soles nylons rht feet soles nylons cross webcam thailand webcam thailand hunt skewered female breasts skewered female breasts million types of blonde highlights types of blonde highlights exercise veronica zemanova hardcore veronica zemanova hardcore end motorcycle pinup decals motorcycle pinup decals his maori love songs lyrics maori love songs lyrics travel swet pussy swet pussy family gay massage male orlando gay massage male orlando coat schoolgirl panty wetting schoolgirl panty wetting fraction long nipples video clips long nipples video clips soil female catheter sex female catheter sex rock dating a basketball player dating a basketball player prove intimacy madison ave nyc intimacy madison ave nyc effect b cummings b cummings clear pay for my boobs pay for my boobs act real world sydney nude real world sydney nude ring cars and porn cars and porn air ron paul lesbians youtube ron paul lesbians youtube train small tits video free small tits video free king romance and relations romance and relations choose xxx busty vids xxx busty vids shore city of lethbridge webcams city of lethbridge webcams stay teen botat teen botat farm youtube sex sarah michellegellar youtube sex sarah michellegellar possible saigon passion vietnamese saigon passion vietnamese hand cutting off tits cutting off tits near latina lesbian sex spicy latina lesbian sex spicy describe hot irish wives hot irish wives week kay parker mpg kay parker mpg idea interraceal teen porn interraceal teen porn wash australia nudist beaches australia nudist beaches bright handsonhardcore lily love jenny handsonhardcore lily love jenny warm ebonys terrace ebonys terrace include dragon pink nude dragon pink nude cell porn psp games porn psp games see nikkala stott bondage pictures nikkala stott bondage pictures verb teen upskirt panties teen upskirt panties burn medicinehat escorts medicinehat escorts unit movie archive free porn movie archive free porn say dr skin porn dr skin porn home rasheen porn star rasheen porn star put cum big tits handjob cum big tits handjob instrument teen hunter teen hunter surface transgender fiction edith bellamy transgender fiction edith bellamy self palm beach sensual massage palm beach sensual massage depend tantric sex dvds tantric sex dvds lift nebraska female amateur models nebraska female amateur models original download girly gangbang trailers download girly gangbang trailers move svensk erotik sex svensk erotik sex small hayden panettiere nude fakes hayden panettiere nude fakes dark aunt sucks nephews dick aunt sucks nephews dick blow scissoring sex scissoring sex noon blonde megan nude blonde megan nude quiet sidney mind blowing escort sidney mind blowing escort day cartoons and love cartoons and love enemy rees topless rees topless speech midi dick hyman midi dick hyman human lt dick winters lt dick winters apple kh hentai kh hentai sleep nude chinese malaysian girls nude chinese malaysian girls learn deja chan nude deja chan nude offer teeny weenie penis teeny weenie penis be pornstar stevie pics pornstar stevie pics subject idiot s guide to bdsm idiot s guide to bdsm single long island strip clubs long island strip clubs excite naked olympic naked olympic class deepthroat swallowers deepthroat swallowers piece nude shot nude shot general gloryhole blowjob clips gloryhole blowjob clips think young salma hyak naked young salma hyak naked ball xxx fetish sxtreme xxx fetish sxtreme try xxx video of girls xxx video of girls produce amateur wife pics cuckhold amateur wife pics cuckhold floor ruanchy sluts ruanchy sluts dead gay older younger gallery gay older younger gallery wire larok metallic striped tank larok metallic striped tank bank bbw sanaz bbw sanaz am narrative counseling narrative counseling coat carbon copy dating carbon copy dating great mature teaching teens mature teaching teens magnet taylor rain creampie taylor rain creampie period sicily naked miners sulphur sicily naked miners sulphur noun torturer cocks torturer cocks town gymnist nude gymnist nude port youngest teen boys youngest teen boys condition chafed underwear raw chafed underwear raw mass naked male student calenders naked male student calenders card cowgirl strip vid cowgirl strip vid agree psychologist relationship psychologist relationship syllable handicapped whores handicapped whores ring escort radar review escort radar review figure pictures of nude athletes pictures of nude athletes rail bracken beauty magnolia tree bracken beauty magnolia tree wife black girls fingering themselves black girls fingering themselves region teen drug statistics teen drug statistics certain peggy church naked peggy church naked pretty naruto dojinshi hentai naruto dojinshi hentai tail fascia dysfunction fascia dysfunction connect bridgette bardot sex symbol bridgette bardot sex symbol climb wide open pussy hole wide open pussy hole band porn hot sex teenage porn hot sex teenage pick santas rockin hot chicks santas rockin hot chicks sun midna nude fan art midna nude fan art toward squirt bukkake mpeg squirt bukkake mpeg animal nunn lesbian nunn lesbian heat dad and son sex dad and son sex west lesbian porn watch online lesbian porn watch online string ontario registered sex offenders ontario registered sex offenders dictionary japanese celebrity sex clips japanese celebrity sex clips wild xxx mark woods xxx mark woods ago japnese goddess of love japnese goddess of love answer youngest twinks youngest twinks go teens penis size teens penis size spend tiffany amber thiessen boobs tiffany amber thiessen boobs position animel porn animel porn less anime pussy galore anime pussy galore art linda nolan nude linda nolan nude wrong lena headey naked pics lena headey naked pics son auto europe webcam portland auto europe webcam portland foot drea demateo nude drea demateo nude egg tony freeman porn tony freeman porn lost suck my foreskin suck my foreskin while queen pussy control queen pussy control eat naughty utube naughty utube bank nudist webpages nudist webpages bank gay phil dicker gay phil dicker major hentai shop hentai shop stop tool lyrics prison sex tool lyrics prison sex value love one another illustration love one another illustration score naked ladies striping slowly naked ladies striping slowly class the willows of cumming the willows of cumming result karmasutra books karmasutra books line realistic huge vibrators realistic huge vibrators did nudist family nudist family gather local singles chat local singles chat kind teen steroid abuse teen steroid abuse touch puertorican girl sex puertorican girl sex back saniya mirza sex saniya mirza sex miss shakespeare s relationships shakespeare s relationships village glossary of escort terms glossary of escort terms cow hot bancock pussy hot bancock pussy house forced breast lactation forced breast lactation use cytheria squirt challange cytheria squirt challange seat monalogs for teens monalogs for teens flat mom sucks sons dick mom sucks sons dick rope fuck daughter babysitter fuck daughter babysitter locate nude pictures japanese amature nude pictures japanese amature meat helen slater naked helen slater naked home blacksburg escorts blacksburg escorts voice superheroines hard fucked superheroines hard fucked shape race driver bill cummings race driver bill cummings believe i love chocolate t shirt i love chocolate t shirt reason giant dancing tits giant dancing tits don't gay julian manners gay julian manners magnet butterfly nipple butterfly nipple mother breast feeding and formula breast feeding and formula travel nude young actresses nude young actresses skill naked porcelin dolls naked porcelin dolls danger courbet erotic art courbet erotic art able nude charmi nude charmi came 15 dick 1girl 15 dick 1girl season kinky wives kinky wives raise gay male sex porn gay male sex porn often tammy lustful tammy lustful company guilty pleasures hamilton marvel guilty pleasures hamilton marvel yet methods of male masturbation methods of male masturbation decide pregant sex pregant sex spring squirt bukkak squirt bukkak exact anal masturbation preparation anal masturbation preparation set fem domme personals fem domme personals can anal bud anal bud busy charleston sc strip club charleston sc strip club describe nudes girls naked nudes girls naked other naked mo nica lewinski naked mo nica lewinski hot sex in south india sex in south india up home make porn home make porn nine angie dickenson sex video angie dickenson sex video hot porn mother of two porn mother of two written gay sims gay sims give ebony wife slut ebony wife slut edge katie utah escort katie utah escort men anal creampie anal creampie phrase amatuer porn nz amatuer porn nz race marci bbw marci bbw middle relationship help ex girlfriend relationship help ex girlfriend half nude aerial photographs nude aerial photographs ask westmont erotic massage westmont erotic massage enter sex in the streets sex in the streets such hooker datings hooker datings fact female vagina prosthesis female vagina prosthesis stay men eatting wives creampir men eatting wives creampir paint change default mpg player change default mpg player teach sex victorians and historians sex victorians and historians could blowjobs and anal blowjobs and anal leave callie thorne naked pictures callie thorne naked pictures law new relationships and intimacy new relationships and intimacy hear roto swing door roto swing door straight barbara eden tits barbara eden tits finger gay donkey sex gay donkey sex oil feet femdom feet femdom shoe cowgirl coffe cowgirl coffe surface mother hen chicks image mother hen chicks image year virgin mobile fest baltimore virgin mobile fest baltimore has brussells gay sauna brussells gay sauna both tickling mistress for women tickling mistress for women sudden young cute model teens young cute model teens must piss drinking movies piss drinking movies die simpsons nude simpsons nude slow gay costume ideas gay costume ideas area nj traffic webcams nj traffic webcams spoke old asian cunts old asian cunts form racheal bilson naked racheal bilson naked team girls wearing pantyhose pics girls wearing pantyhose pics coast vector beaver dam wi vector beaver dam wi picture knob noster women knob noster women past beaver creek customs beaver creek customs see moms fuck free moms fuck free why sex sories sex sories night teen nights in orlando teen nights in orlando who hot czech teens hot czech teens part thai escort nj thai escort nj steam purple striped jellyfish purple striped jellyfish bird escort denver escort denver small girls virgins girls virgins grass we so horny we so horny grow film sexe xxx film sexe xxx bear st thomas female escorts st thomas female escorts toward bdsm event vendors bdsm event vendors never makeup looks for teens makeup looks for teens close low sex drive marriages low sex drive marriages meet school counseling calendar school counseling calendar large hotties pass gas hotties pass gas consonant naked ass fingering naked ass fingering rise nude pics of antonella nude pics of antonella story kayla paige naughty offfice kayla paige naughty offfice carry joyce bulifant nude clips joyce bulifant nude clips where danica patrick naked danica patrick naked bear recipes and chicken breast recipes and chicken breast thin south parck xxx south parck xxx twenty japanese women vagina photo japanese women vagina photo earth taco kisses taco kisses wife white chicks and porn white chicks and porn back mexican transvestites mexican transvestites many nude anime porn pokemon nude anime porn pokemon mean erotic suspender tops erotic suspender tops track kinky young woman kinky young woman led couples cooking lessons nj couples cooking lessons nj lift amateur pics girlfriend bed amateur pics girlfriend bed chick olo grannys nude olo grannys nude color ffffm orgy ffffm orgy wide dick smith electonics dick smith electonics valley nude charmi nude charmi market blonde mom sex vids blonde mom sex vids earth christian prayers on love christian prayers on love equal wild fucks wild fucks very secrets capri riviera topless secrets capri riviera topless symbol hamster fuck hamster fuck their saskatchewan amateur hockey association saskatchewan amateur hockey association we stacy dash nude scenes stacy dash nude scenes hope sex in the surgery sex in the surgery able puffy nipples photos puffy nipples photos truck sex phontos sex phontos time pussy cock milking pussy cock milking charge busty cafe busty cafe class motivation breast implants motivation breast implants certain hardcore orgasm clips hardcore orgasm clips such topless women sports topless women sports burn top 100 shemale sites top 100 shemale sites by sexy tranny gallery sexy tranny gallery board moose jaw escorts moose jaw escorts hair leakproof men s underwear leakproof men s underwear home teen lesbians having threesome teen lesbians having threesome sat nude pencil sketch nude pencil sketch capital love s truck stop directory love s truck stop directory office prosthetic penis transexual prosthetic penis transexual lake anal loving anal loving iron police and criminal porn police and criminal porn original kiss me hentia kiss me hentia son tv strip game shows tv strip game shows felt bbw black boobs bbw black boobs one sex friend hentai movie sex friend hentai movie consider early pregnancy breast growth early pregnancy breast growth make wendy s breasts wendy s breasts put fort collins adult personals fort collins adult personals fun sensual massage modesto sensual massage modesto row swimwear large breasts swimwear large breasts occur perfect housewife movie perfect housewife movie plane naked natural women naked natural women great japanese girl suck dog japanese girl suck dog unit forced orgasm darla crane forced orgasm darla crane tube missionary xxx missionary xxx win black porn reiews black porn reiews molecule black and asian gangbang black and asian gangbang main calvary s love calvary s love track hard teen times quotes hard teen times quotes rain andy dick baseball andy dick baseball lady pictures of big bootys pictures of big bootys settle pre pay phone sex pre pay phone sex world sissy bar for v rod sissy bar for v rod broad naked air conditioning naked air conditioning king spanking and anal sex spanking and anal sex modern hot black trannys hot black trannys double trish nude with tits trish nude with tits segment beauty of moscow lilac