Location: PHPKode > projects > phpBlogger > sharer.php
<?php
@session_start();
require_once ('classes/securesession.class.php');
/* * ********************************************************************
*  Copyright notice PHP Blogger 1.2.
*
*  (c) 2011 Predrag Rukavina - admin[at]phpblogger[dot]org
*  All rights reserved
*
*  This script is part of the PHP Blogger project. 
*  The PHP Blogger project is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version 2
*  of the License, or (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
*  MA  02110-1301, USA.
*
*  This copyright notice MUST appear in all copies of the script!
* ********************************************************************** */
##############################
# sharer.php   version 1.1.5.#
##############################
include ('sharecon.php');
require_once ('languages/lang_'.$language.'.php');
require_once ('salt.php');
?>
<head>
<link rel="stylesheet" type="text/css" href="themes/<?php echo $themes; ?>/styles/share.css" />
<link href="templates/classic/styles/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<title><?php echo $sitetitle ?></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>
<script language="JavaScript">
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else 
countfield.value = maxlimit - field.value.length;
}
</script>
<script type="text/javascript">
$(document).ready(function(){
		$("a.sendName").click(function(){
		var areass = $("#areass").val(); 
		$.post("sharerset.php", {areass: areass},
		 function(data){
            $("#loadName").html(data).show('drop', { direction: 'left' }, 300)
      });
    });
});
</script>
</head>
<?php
if($editortrue == 2) {
echo $lang['SHARERNO'];
die();
}
$gettitle = $_GET['title'];
if($gettitle == false) {
	echo "<center><font style=\"font-family:georgia, arial\">Title is required</font>";
	die();
}
$urld = $_GET['urld'];
$geturl = "http://".$urld;
if($geturl == false) {
	echo "<br /><center><font style=\"font-family:georgia, arial\">Url is required</font>";
	die();
}
if(!preg_match("/^(https?:\/\/+[\w\-]+\.[\w\-]+)/i",$geturl)) {
	echo "You must supply a valid URL.";
	exit();
}
$meta = @get_meta_tags($geturl);
if($meta == false) {
	$meta = $gettitle." - ".$geturl;
} else {
	$meta = @$meta['description']." - ".$geturl;
}
$ss = new SecSession();
$ss->check_browser = true;
$ss->check_ip_blocks = 2;
$ss->secure_word = $salt;
$ss->regenerate_id = true;
if (!$ss->Check() || !isset($_SESSION['loggedin']) || !$_SESSION['loggedin']) {
include ('shareform.php');
	die();
}
?>
<body>
<div id="menu">
<li><img id="logo" src="themes/<?php echo $themes ?>/styles/images/logo.png" width="197px" height="35px" border="0" /></li>
</div>
<div id="main">
<div id="loadName">
<form>
<div id="effect">
<div id="title">Description</div>
<textarea name="areass" id="areass" onKeyDown="textCounter(this.form.areass,this.form.enter,250);" onKeyUp="textCounter(this.form.areass,this.form.enter,250);"><?php echo
$meta ?></textarea>
</div>
<div id="above">
<div id="hatitle"><input style="border:0px;width:28px;color:#555" readonly type="text" name="enter" size="3" maxlength="3" value="250" disable="disabled" />characters left</font></div>
<a style="align:center;text-decoration:none" href="javascript:submit();" id="start" class="sendName">What`s happening?</a>
</div>
</form>
</div>
</div>
</body>
Return current item: phpBlogger