<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?
$quizid1 = "";
if(isset($_GET['q'])){ $quizid1 = $_GET['q']; }
$result1 = "";
if(isset($_GET['r'])){ $result1 = $_GET['r']; }
if ($quizid1 == "")
{
	$ogtitle = $title;
	$rdesc = base64_decode($globaldata['title']);
}
elseif ($result1 > 0)
{
	$quizinfo = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM `quiz` WHERE `id` = '".$quizid1."'"));
	$part2 = base64_decode($quizinfo["title"]);
	$igot = base64_decode($quizinfo["igot"]);
	$resinfo = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM `result` WHERE `quizid` = '".$quizid1."' AND `score` = '".$result1."'"));
	$part1 = base64_decode($resinfo["title"]);
	$rdesc = base64_decode($resinfo["desc"]);
	$img = $resinfo["img"];
	$ogtitle = "".$igot." ".$part1." - ".$part2."";
}else{
	$quizinfo = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM `quiz` WHERE `id` = '".$quizid1."'"));
	$part2 = base64_decode($quizinfo["title"]);
	$rdesc = base64_decode($quizinfo["desc"]);
	$resinfo = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM `result` WHERE `quizid` = '".$quizid1."' AND `score` = '1'"));
	$img = $resinfo["img"];
	$ogtitle = $part2;
}
$getlogo = @mysqli_fetch_array(mysqli_query($con, "select * from admin where `user`='background' limit 0,1"));
$logo = $getlogo['session'];
?>
<meta name="description" content="اختبارات شخصية  - اختبارات طريفة على الانترنت" />
<meta name="keywords" content="افضل اختبارات مباشرة" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="<?=$ogtitle?>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http:<?=$domain?>?q=<?=$quizid1?>&r=<?=$result1?>" />
<meta property="og:description" content="<?=$rdesc?>" />
<meta property="og:image" content="http:<?=$domain?>img/<?=$img?>" />
<meta property="fb:admins" content="<?=$adminid?>" />

<!-- Bootstrap -->
<link href="http:<?=$domain?>css/bootstrap.min.css" rel="stylesheet">
<link href="http:<?=$domain?>css/bootstrap-social.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="http:<?=$domain?>css/jumbotron-narrow.css" rel="stylesheet">
<link href="http:<?=$domain?>css/style.css" rel="stylesheet">
<style>
body {
padding-top: 40px;
background: url("<?=$domain?>img/<?=$logo?>") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
  padding-top: 0px;
  padding-bottom: 20px;
}
</style>
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
</head>