<?php
include 'config/config.php';
include 'common/functions.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
   <link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta property="og:image" content="images/coins-large.png"/>
	<link href="css/custom.css" rel="stylesheet">
	<link href="css/modern.css" rel="stylesheet">
    <script type="text/javascript" src="js/assets/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="js/assets/jquery.mousewheel.min.js"></script>
    <script type="text/javascript" src="js/assets/moment_langs.js"></script>
    <script type="text/javascript" src="js/assets/moment.js"></script>
    <script type="text/javascript" src="js/google-code-prettify/prettify.js"></script>
    <script type="text/javascript" src="js/modern/dropdown.js"></script>
    <script type="text/javascript" src="js/modern/input-control.js"></script>
    <script type="text/javascript" src="js/modern/calendar.js"></script>
<center><a href="http://www.webstatisticshub.com"><img src="http://www.webstatisticshub.com/topbanner.png" align="middle">
</a></center>
<BODY BACKGROUND="http://www.webstatisticshub.com/1.png" bgproperties="fixed">

<?php
$error = "";
$url="";
if(isset($_GET['url']) && ($_GET['url']!=""))
{
$url=mysql_real_escape_string($_GET['url']);
if(substr($url,0,4) != "http")
$url = "http://" . $url;
if(!valid_url($url) || strpos($url, " ") || is_alive($url))
{
$error = "Invalid URL";
$url="";
$title = "Invalid URL";
}
else if(bad_domain($url))
{
$title = "Restricted Domain";
$url="";
}
else
{
$url=mysql_real_escape_string(getdomain($url));
$title = "Estimated Worth of " . $url;
}
}
?>

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
	<script>
		$('#foo').ready(function () {
    $('#loadingMessage').css('display', 'none');
});
$('#foo').load(function () {
    $('#loadingMessage').css('display', 'none');
});
	</script>
	<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div id="loadingMessage" align="center"><img src="images/loading.gif"/><br />Please Wait...</div>
<title>Estimated Worth of <?php echo($url) ?></title>
<?php
if($url!="")
update_stats($url);
?>
<meta name="description" content="<?php echo(get_domain_description($url)) ?>" />
</head>
<body class="metrouicss" onload="prettyPrint()">
<div class="container" style="width:942px;margin: auto">
<div class="page">
<div class="nav-bar" style="background:<?php echo(retColor()); ?>">
    <div class="nav-bar-inner">
        <span class="pull-menu"></span>
        <a href="<?php echo(rootpath()) ?>"><span class="element brand">
            <img class="place-left" src="images/logo32.png" style="height: 20px"/>
            <?php echo(get_title()) ?>
        </span></a>
		<div class="divider"></div>
		<ul class="menu">
            <li><a href="<?php echo(rootpath()) ?>">Home</a></li>
              <li><a href="top.php">Top Websites</a></li>
			<li><a href="recent.php">Recent Websites</a></li>
			<li><a href="contact.php">Contact</a></li>
        </ul>
    </div>
</div>
<div class="main_div">
				<div class="left_div">
				<?php
				if($url!="")
				{
$match = "select * from stats where url='$url'"; 
$qry = mysql_query($match);
$row = mysql_fetch_array($qry);
$date_updated = $row['date_updated'];
$google_results = $row['googleindex'];
$dmoz_list = $row['dmoz'];
$pagerank = $row['pagerank'];
$alexarank = $row['alexarank'];
$pagespeed = $row['pagespeed'];
$backlinks = $row['backlinks'];
$bounce_rate = $row['bouncerate'];
$googleplus = $row['googleplus'];
$fblikes = $row['facebooklikes'];
$fbshares = $row['facebookshares'];
$fbcomments = $row['facebookcomments'];
$tweets = $row['tweets'];
$linkedin = $row['linkedin'];
$pins = $row['pinterest'];
$stumble = $row['stumbleupon'];
$delicious = $row['delicious'];
$vkontakte = $row['vkontakte'];
$worth = $row['worth'];
}
else
{
if($title == "Restricted Domain")
$url = "Restricted Domain";
else
$url = "Invalid Domain";
$date_updated = "Never";
$google_results = 0;
$dmoz_list = 0;
$pagerank = 0;
$alexarank = 0;
$pagespeed = 0;
$backlinks = 0;
$bounce_rate = 100;
$googleplus = 0;
$fblikes = 0;
$fbshares = 0;
$fbcomments = 0;
$tweets = 0;
$linkedin = 0;
$pins = 0;
$stumble = 0;
$delicious = 0;
$vkontakte = 0;
$worth = 0;
}
?>
				<div class="worth_div">
<div class="div_info">
<div class="web_url">
<?php 
$url_show = trim_string($url);
echo("<a href=http://www." . $url . "><h2>" .  $url_show . "<h2></a>"); 
?>
</div>
<div class="web_value">
<?php
if(strlen($worth)<10)
{ ?>
Has Estimated Worth of <h1>$<?php echo(number_format($worth)); ?>&nbsp;<img 

src="images/coins.png"/></h1>
<?php 
}
else
{
?>
Has Estimated Worth of <h1>$<?php echo(number_format($worth)); ?><img src="images/coins.png"/></h1>
<?php } ?>
</div>
<div style="width:50%;padding-left:5px;float:left">
<small>Last Updated : 
<?php 
if($url!="Invalid Url")
echo(date('d M Y', strtotime($date_updated)));
else
echo($date_updated);
 ?>
</div>
<div style="width:50%;text-align:right;padding-right:5px;float:left">
<?php
if($url!="Invalid Url") 
{
?>
<a href="update.php?w=<?php echo(sencrypt($url)); ?>">Update Now</a>
<?php
}
else
{
echo("Update Now");
}
?>
</div>
</div>
<div class="thumbnail">
<?php
if($error=="")
{
echo ("<img src='http://free.pagepeeker.com/v2/thumbs.php?size=m&url=" . $url . "'/>");
}
?>
</div>
				</div>
<div class="social_sharing">
<div style="float:left"class="fb-like" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>
<div style="padding-left:25px;float:left">
<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div style="float:left">
<!-- Place this tag in your head or just before your close body tag. -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-size="medium"></div>
</div>
<div style="float:left">
<script src="//platform.linkedin.com/in.js" type="text/javascript">
 lang: en_US
</script>
<script type="IN/Share" data-counter="right"></script>
</div>
<div style="float:left;padding-left:25px;padding-top:2px">
<!-- Place this tag where you want the su badge to render -->
<su:badge layout="1"></su:badge>

<!-- Place this snippet wherever appropriate -->
<script type="text/javascript">
  (function() {
    var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
    li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
  })();
</script>
</div>
<div style="float:left;padding-left:25px">
<a href="http://www.tumblr.com/share" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:61px; height:20px; background:url('http://platform.tumblr.com/v1/share_2.png') top left no-repeat transparent;">Share on Tumblr</a>
</div>
<div style="float:left;padding-left:25px">
<a href="//pinterest.com/pin/create/button/?url=<?php echo(curPageURL()) ?>&media=http://free.pagepeeker.com/v2/thumbs.php?size=x&url=<?php echo($url) ?>&description=<?php echo($title) ?>" data-pin-do="buttonPin" data-pin-config="none"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>
</div>
</div>
<div class="index_stats">
<div class="index_stats_header" style="background:<?php echo(retColor()); ?>">
<h2>Website Stats</h2>
</div>
<table class="striped">
<tbody>
                        <tr><td><img src="images/google.png"/>&nbsp;Google Indexed Pages</td><td class="right"><?php echo($google_results); ?></td></tr>
						<tr><td><img src="images/dmoz.png"/>&nbsp;dmoz Directory Listed</td><td class="right"><?php echo($dmoz_list); ?></td></tr>
						<tr><td><img src="images/pagerank.png"/>&nbsp;Google Page Rank</td><td class="right"><?php echo($pagerank); ?>/10</td></tr>
						<tr><td><img src="images/alexa.gif"/>&nbsp;Alexa Rank</td><td class="right"><?php echo($alexarank); ?></td></tr>
						<tr><td><img src="images/speed.png"/>&nbsp;Page Speed Score</td><td class="right"><?php echo($pagespeed); ?>/100</td></tr>
						<tr><td><img src="images/links.png"/>&nbsp;Backlinks</td><td class="right"><?php echo($backlinks); ?></td></tr>
						<tr><td><img src="images/bounce.png"/>&nbsp;Bounce Rate</td><td class="right"><?php echo($bounce_rate); ?>%</td></tr>
					</tbody>
    </table>
</div>
	<div class="banner_ad" align="center">
				<?php echo(show_banner_ad()) ?>
				</div>
<div class="social_stats">
<div class="social_stats_header" style="background:<?php echo(retColor()); ?>">
<h2>Social Media Stats</h2>
</div>
<table class="striped">
<tbody>
                        <tr><td><img src="images/googleplus.png"/>&nbsp;Google +1s</td><td class="right"><?php echo($googleplus); ?></td></tr>
                        <tr><td><img src="images/facebooklike.gif"/>&nbsp;Facebook Likes</td><td class="right"><?php echo($fblikes); ?></td></tr>
						<tr><td><img src="images/facebookshare.png"/>&nbsp;Facebook Shares</td><td class="right"><?php echo($fbshares); ?></td></tr>
						<tr><td><img src="images/facebookcomment.png"/>&nbsp;Facebook Comments</td><td class="right"><?php echo($fbcomments); ?></td></tr>
						<tr><td><img src="images/tweet.png"/>&nbsp;Tweets</td><td class="right"><?php echo($tweets) ?></td></tr>
						<tr><td><img src="images/linkedin.png"/>&nbsp;LinkedIn Shares</td><td class="right"><?php echo($linkedin); ?></td></tr>
						<tr><td><img src="images/pinterest.png"/>&nbsp;Pinterest Pins</td><td class="right"><?php echo($pins); ?></td></tr>
						<tr><td><img src="images/stumbleupon.png"/>&nbsp;StumbleUpon</td><td class="right"><?php echo($stumble); ?></td></tr>
						<tr><td><img src="images/delicious.png"/>&nbsp;Delicious</td><td class="right"><?php echo($delicious); ?></td></tr>
						<tr><td><img src="images/vkontakte.png"/>&nbsp;VKontakte</td><td class="right"><?php echo($vkontakte); ?></td></tr>
                    </tbody>
    </table>
</div>
				</div>
				<div class="social_stats_header" style="background:<?php echo(retColor()); ?>">
<h2>Show Your Visitors Your Website Value</h2>
</div>
				<div style="padding-left: 25px;padding-top: 30px;width: 640px;float: left;">
				<div align="center" style="float:left;width:50%">
				        <textarea style="margin: 0px; width: 200px; height: 60px;font-size: 11px;"><?php echo('<script type="text/javascript" src="' . rootpath() . '/badge.php?url=' . $url . '"></script>') ?></textarea>
				</div>
				<div align="center" style="float:left;width:50%;padding-bottom:30px;">
				<?php echo('<script type="text/javascript" src="' . rootpath() . '/badge.php?url=' . $url . '"></script>'); ?>
				</div>
				<p align="center">Add above code to your website where you want this widget to appear.</p>
				</div>
						<div class="search_div">
				<div class="grid">
				<div class="row">
				<div class="span8">
<form action="show.php" method="GET">
<ul>
<h2>Know Your Website Worth</h2>
<div class="input-control text span6">
<input type="text" name="url" placeholder="http://www.example.com" />
</div>
<div id="login_buttons">
<input type="submit" class="bg-color-green" value="Tell Me !">
</div>
</ul>
</form>
</div>
</div>
</div>
				</div>
				</div>
				<div class="sidebar_div">
	<div class="social_buttons">
	<div class="fb_button">
			<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2F<?php echo(get_facebook()) ?>&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
			</div>
			<div class="twitter_button">
			<a href="https://twitter.com/<?php echo(get_twitter()) ?>" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div class="gplus_button">
<div class="g-follow" data-annotation="bubble" data-height="20" data-href="https://plus.google.com/<?php echo(get_google()) ?>" data-rel="publisher"></div>
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
</div>
		</div>
				<div class="top_ad">
	<?php echo(show_medrec_ad()) ?>
	</div>
<div class="top_ad2">
<?php echo(show_medrec2_ad()) ?>
</div>
		<div class="recent_check_show">
		<div class="index_stats_header" style="background:<?php echo(retColor()); ?>">
				<a href="recent.php"><h3>Recently Checked Websites</h3></a>
				</div>
				<table>
<tbody>
<?php
$match_recent = "select url from stats where worth>0 order by id desc limit 22"; 
$qry = mysql_query($match_recent);
while($row = mysql_fetch_array($qry))
{
$url_show = trim_string($row['url']);
echo("<tr><td><a href='" . $row['url'] . ".html'>http://www." . $url_show . "</a></td></tr>");
}
?>
<tr><td><a href="recent.php">More &raquo; &raquo;</a></td></tr>
                </tbody>
    </table>
	</div>
				</div>
				</div>
				</div>
				</div>
<?php include 'common/footer.php'; ?>