<?php
header('Content-type: text/html; charset=UTF-8');
session_start();
include("cnx.php");
if(is_numeric($_GET['id'])){
$sqlyell = "SELECT * FROM iyell WHERE id = ". mysql_real_escape_string($_GET['id']) .";";
$comment = true;
$req = mysql_query($sqlyell);
if($yell = @mysql_fetch_array($req)){
$text = htmlentities($yell["text"],ENT_QUOTES,"UTF-8");
$link = htmlentities($yell["link"],ENT_QUOTES,"UTF-8");
if(substr($link,0,7) != "mailto:" && substr($link,0,7) != "http://" && substr($link,0,8) != "https://" && substr($link,0,6) != "ftp://" && $link != ""){
$link = "http://" . $link;
}
if(strtolower(substr($link,-3)) == "jpg" || strtolower(substr($link,-3)) == "png" || strtolower(substr($link,-3)) == "gif" || strtolower(substr($link,-3)) == "bmp"){
$img = $link;
}
unset($yell);
}
}
?>
<!DOCTYPE HTML>
<html lang="en-US"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>iYell ! </title>
<meta name="description" content="<?php
if(isset($text)){
echo($text);
}else{
echo("Yell anything !");
} ?>"><?php
if(isset($text)){
echo("\n<meta property=\"og:title\" content=\"iYell nr.". $_GET['id'] ."\">");
echo("\n<meta property=\"og:url\" content=\"". $url . $_GET['id'] ."\">");
echo("\n<meta property=\"og:description\" content=\"".$text."\">");
}
if(isset($img)){
echo("\n<meta property=\"og:image\" content=\"". $img ."\">");
}else{
echo("\n<meta property=\"og:image\" content=\"". $url."logo.png\">");
}?>
<meta property="fb:app_id" content="<?php echo($appid); ?>">
<style type="text/css">
body{
background: #FFF;
text-align: center;
}
*{
font-family: Tahoma, Trebuchet MS, Arial, sans-serif;
color: #111;
}
h1{
font-family: Georgia, Times New Roman, serif;
text-shadow: 0px 0px 4px #000;
text-align: center;
font-size: 80px;
font-weight: normal;
color: #A00;
cursor: pointer;
}
.yell, #yell, form{
width: 600px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #CCC;
background: #100;
padding: 5px;
margin: auto;
color: #DDD;
text-align: left;
}
.yell img, #yell img{
float: right;
}
#yell{
font-size: 16px;
line-height: 150%;
}
.yell, form{
font-size: 12px;
background: #ddd;
color: #000;
}
#author, .author{
font-size: 11px;
font-style:italic;
margin: auto;
width: 600px;
text-align: right;
padding-top: 5px;
}
a{
color: #500;
}
label{
display: block;
color: #000;
margin-bottom: 17px;
}
label span{
display: inline-block;
vertical-align: top;
width: 280px;
color: #000;
}
label input, label textarea{
width: 280px;
background: #fff;
color: #000;
border: 1px solid #ccc;
height: 14px;
}
label textarea{
height: 45px;
}
#pages{
text-align: center;
padding-top: 20px;
}
#send *, #send{
color: #500;
text-align: center;
}
#send a:hover, a:hover{
text-shadow: 0px 0px 2px #000;
}
.fb-comments{
text-align: center;
width: 500px;
margin: auto;
padding-top: 20px;
}
.webcam_content {
display: block;
width: 489px;
z-index:1002;
overflow: auto;
text-align: right;
margin: auto;
}
hr{
width: 600px;
}
.fb-like{
display: inline;
float: left;
}
</style>
<link rel="alternate" type="application/rss+xml" title="iYell.net - last yells" href="<?php echo($url); ?>rss.php">
</head>
<body>
<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>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '<?php echo($appid); ?>',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelURL : '<?php echo($url); ?>channel.php', // channel.html file
oauth : true // enable OAuth 2.0
});
</script>
<script type="text/javascript">
function popFB(id){
href = 'http%3A%2F%2Fiyell.net/'+id;
window.open('http://www.facebook.com/sharer.php?u='+href,"_blank","width=600,height=400, menubar=no, status=no, menubar=no");
}
</script>
<h1 onclick="document.location.href='/';">iYell !</h1>