Go to : Install File (Click Here) !'); $fs = @mysql_fetch_array($qs); $aftl = $fs['aod_for_top_links']; $nftl = $fs['num_for_top_links']; $afnl = $fs['aod_for_normal_links']; $nfnl = $fs['num_for_normal_links']; $theme_dir = $fs['theme']; $fh = fopen($theme_dir.'/index.html', 'r') or die('error'); while($code__ = fread($fh, filesize($theme_dir.'/index.html'))){ $code .= $code__; } fclose($fh); /* ################################################## Output Linkbox # ################################################## */ function top_links($content) { global $fs, $aftl, $nftl; $q = mysql_query("SELECT * FROM `links` WHERE location='Top' AND type='Accept' ORDER BY id $aftl LIMIT 0,$nftl"); while ($f = mysql_fetch_array($q)){ $output .= str_replace(array('{url}', '{desc}', '{id}', '{title}', '{date}', '{clicks}'), array('redirect.php?id='.$f['id'].'&url='.$f['link_address'], $f['link_desc'], $f['id'], $f['link_name'], $date, $f['count']), $content); } return ' '.$output.''; } function normal_links($content) { global $fs, $afnl, $nfnl; $q = mysql_query("SELECT * FROM `links` WHERE location='Normal' AND type='Accept' ORDER BY id $afnl LIMIT 0,$nfnl"); while ($f = mysql_fetch_array($q)){ $output .= str_replace(array('{url}', '{desc}', '{id}', '{title}', '{date}', '{clicks}'), array('redirect.php?id='.$f['id'].'&url='.$f['link_address'], $f['link_desc'], $f['id'], $f['link_name'], $date, $f['count']), $content); } return ' '.$output.''; } // ###################################### $host = $_SERVER['HTTP_HOST']; $url = $_SERVER['REQUEST_URI']; $uhome = 'http://'.$host.$url; $usendlink = 'pages.php?item=sendlink'; $ugetcode = 'pages.php?item=getcode'; $usearch = 'pages.php?item=search'; $uarchive = 'pages.php?item=archive'; $code = str_replace(array('{pagetitle}', '{url.home}', '{url.sendlink}', '{url.getcode}', '{url.search}', '{url.archive}'), array($fs['title'], $uhome, $usendlink, $ugetcode, $usearch, $uarchive), $code); $code = preg_replace("#(.*?)#ies", "top_links(stripslashes('\\1'))", $code); $code = preg_replace("#(.*?)#ies", "normal_links(stripslashes('\\1'))", $code); echo $code; ?>