Tarih: 2007-07-06, 23:03:30 Mesaj konusu: <i f r a m e yardimi
Kod:
<?php
// ==========================================
// PHP-NUKE: Shout Box
// ==========================
//
// Copyright (c) 2003-2005 by Aric Bolf (SuperCat)
// http://www.OurScripts.net
//
// Copyright (c) 2002 by Quiecom
// http://www.Quiecom.com
//
// This program 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
// ===========================================
if (eregi("block-Shout_Box.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $c o o k i e, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang;
function ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid) {
global $admin, $admin_file, $currentlang, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight;
$self = ereg_replace("/", "",$_SERVER['PHP_SELF']);
if ($admin_file == '') { $admin_file = 'admin'; }
if ((is_admin($admin)) AND ("".$admin_file.".php" == $self)) {
$sqlV = "select * from ".$prefix."_config";
$resultV = $db->sql_query($sqlV);
$confV = $db->sql_fetchrow($resultV);
if ($confV['Version_Num'] >= '7.6') {
$preURL = 'index.php?url=';
} else {
$preURL = '';
}
}
if ($currentlang) {
include_once("modules/Shout_Box/lang-block/lang-$currentlang.php");
} else {
include_once("modules/Shout_Box/lang-block/lang-english.php");
}
$PreviousShoutComment = $ShoutComment;
include("config.php");
c o o k i edecode($user);
$username = $c o o k i e[1];
//do IP test then ban if on list
if($conf['ipblock'] == "yes") {
$sql = "select * from ".$prefix."_shoutbox_ipblock";
$ipresult = $db->sql_query($sql);
while ($badips = $db->sql_fetchrow($ipresult)) {
if (eregi("\*", $badips['name'])) { // Allow for Subnet bans like 123.456.*
$badipsArray = explode(".",$badips['name']);
$uipArray = explode(".",$uip);
$i = 0;
foreach($badipsArray as $badipsPart) {
if ($badipsPart == "*") { $BannedShouter = "yes"; break; }
if ($badipsPart != $uipArray[$i] AND $badipsPart != "*") { break; }
$i++;
}
} else {
if($uip == $badips['name']) { $BannedShouter = "yes"; break; }
}
}
}
//do name test then ban if on list (only applies to registered users)
if ($conf['nameblock'] == "yes" AND $BannedShouter != "yes") {
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if ($username == $badname['name']) { $BannedShouter = "yes"; break; }
}
}
if ($BannedShouter != "yes") {
if ($ShoutSubmit == "ShoutPost") {
// start processing shout
if ($shoutuid) { $username = "$shoutuid"; }
//shoutuid tests
$username = trim($username); // remove whitespace off ends of nickname
if($conf['anonymouspost'] == "yes") {
$unum = strlen($username);
if ($unum < 2) { $ShoutError = ""._NICKTOOSHORT.""; }
if (!$username OR $username == ""._NAME."") { $ShoutError = ""._NONICK.""; }
if (eregi(".xxx", $username) AND $conf['blockxxx'] == "yes") { $username = "Anonymous"; }
if (eregi("j a v a s c r i p t:(.*)", $username)) { $username = "Anonymous"; }
$username = htmlspecialchars($username, ENT_QUOTES);
$username = ereg_replace("&amp;", "&",$username);
}
if (!is_user($user) && ($username) && $username != "Anonymous") {
$username = ereg_replace(" ", "_",$username);
}
$ShoutComment = trim($ShoutComment); // remove whitespace off ends of shout
$ShoutComment = preg_replace('/\s+/', ' ', $ShoutComment); // convert double spaces in middle of shout to single space
$num = strlen($ShoutComment);
if ($num < 1) { $ShoutError = ""._SHOUTTOOSHORT.""; }
if ($num > 2500) { $ShoutError = ""._SHOUTTOOLONG.""; }
if (!$ShoutComment) { $ShoutError = ""._NOSHOUT.""; }
if ($ShoutComment == ""._SB_MESSAGE."") { $ShoutError = ""._NOSHOUT.""; }
$ShoutComment = ereg_replace(" [.] ", ".",$ShoutComment);
if (eregi(".xxx", $ShoutComment) AND $conf['blockxxx'] == "yes") {
$ShoutError = ""._XXXBLOCKED."";
$PreviousShoutComment = "";
}
if (eregi("j a v a s c r i p t:(.*)", $ShoutComment)) {
$ShoutError = ""._JSINSHOUT."";
$PreviousShoutComment = "";
}
//Smilies from database
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
if ($ShoutPart == $emoticons['text']) { $ShoutArrayReplace[$i] = $emoticons['image']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
//do name test then error if on list
if($conf['nameblock'] == "yes"){
$sql = "select * from ".$prefix."_shoutbox_nameblock";
$nameresult = $db->sql_query($sql);
while ($badname = $db->sql_fetchrow($nameresult)){
if($username == $badname['name']) {
$ShoutError = ""._BANNEDNICK."";
}
}
}
// check for anonymous users cloning/ghosting registered users' nicknames
c o o k i edecode($user);
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_users where username='$username'";
$nameresult = $db->sql_query($sql);
$row = $db->sql_fetchrow($nameresult);
if ($row) {
$ShoutError = ""._NOCLONINGNICKS."";
}
}
//look for bad words, then censor them.
if($conf['censor'] == "yes") {
// start Anonymous nickname censor check here. If bad, replace bad nick with 'Anonymous'
if (!is_user($user) && ($username) && $username != "Anonymous") {
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
if ($username != 'Anonymous') {
$one = strtolower($censor['text']);
$usernameL = strtolower($username);
if (stristr($usernameL, $one) !== false) {
$username = "Anonymous";
}
}
}
}
// Censor of posting text
$ShoutArrayReplace = explode(" ",$ShoutComment);
$ShoutArrayScan = $ShoutArrayReplace;
$sql = "select * from ".$prefix."_shoutbox_censor";
$cresult = $db->sql_query($sql);
while ($censor = $db->sql_fetchrow($cresult)) {
$i = 0;
foreach($ShoutArrayScan as $ShoutPart) {
$ShoutPart = strtolower($ShoutPart);
$censor['text'] = strtolower($censor['text']);
if ($ShoutPart == $censor['text']) { $ShoutArrayReplace[$i] = $censor['replacement']; }
$i++;
}
}
$ShoutComment = implode(" ",$ShoutArrayReplace);
/*
// Phrase censor - Needs work before implementing
$sql = "select * from ".$prefix."_shoutbox_emoticons";
$eresult = $db->sql_query($sql);
while ($emoticons = $db->sql_fetchrow($eresult)) {
$ShoutComment = str_replace($emoticons['text'],$emoticons['image'],$ShoutComment);
}
*/
}
// duplicate posting checker. stops repeated spam attacks
$sql = "select * from ".$prefix."_shoutbox_shouts order by id DESC LIMIT 5";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row['comment'] == $ShoutComment) {
$ShoutError = ""._DUPLICATESHOUT."";
}
}
// table that holds the scrolling area
if ($showBackground == 'yes') {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: url(modules/Shout_Box/images/background/$themeRow[blockBackgroundImage]);\" height=\"$conf[height]\">\n";
} else {
$top_content .= "<table style=\"cursor: text;\" width=\"100%\" border=\"$SBborder\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"$conf[height]\">\n";
}
// end top content
// table of the actual scrolling content
if ($showBackground == 'yes') {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"5\">";
} else {
$mid_content = "<table style=\"table-layout: fixed; width: 100%;\" border=\"0\" align=\"left\" cellspacing=\"0\" cellpadding=\"2\">";
}
$flag = 1;
$ThemeSel = get_theme();
$sql = "select * from ".$prefix."_shoutbox_themes WHERE themeName='$ThemeSel'";
$resultT = $db->sql_query($sql);
$rowColor = $db->sql_fetchrow($resultT);
if (is_user($user)) {
$username = $c o o k i e[1];
if ($username != '') {
$sqlF = "SELECT user_timezone, user_dateformat from ".$prefix."_users WHERE username='$username'";
$resultF = $db->sql_query($sqlF);
$userSetup = $db->sql_fetchrow($resultF);
}
}
$sql = "select * from ".$prefix."_shoutbox_date";
$resultD = $db->sql_query($sql);
$rowD = $db->sql_fetchrow($resultD);
// Sticky shouts
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=0";
$stickyResult = $db->sql_query($sql);
$stickyRow0 = $db->sql_fetchrow($stickyResult);
$sql = "select * from ".$prefix."_shoutbox_sticky where stickySlot=1";
$stickyResult = $db->sql_query($sql);
$stickyRow1 = $db->sql_fetchrow($stickyResult);
switch($ShoutSubmit) {
default:
ShoutBox($ShoutSubmit, $prefix, $ShoutComment, $db, $user, $c o o k i e, $shoutuid);
break;
}
?>
<script type="text/j a v a s c r i p t">
var SBheight = '<?php echo "$ShoutMarqueeheight"; ?>';
var SBcontent = new String('<?php echo "$mid_content"; ?>');
</script>
<script type="text/j a v a s c r i p t" src="shoutbox.js"></script>
<?php
$content = "$top_content\n";
$content .= "<div align=\"center\"><script type=\"text/j a v a s c r i p t\">document.write(SBtxt);</script></div>\n";
$content .= "$bottom_content\n";
?>
arkadaslar bu kodu i f r a m e icinde with="250" height"400" olarak ayarlayabilecek bi arkadas varmı cok lazım
Tarih: 2007-07-07, 10:23:17 Mesaj konusu: Re: <i f r a m e yardimi
Kod:
<!-- Begin ShoutMix - http://www.shoutmix.com -->
<i f r a m e title="suiqast" src="http://www.shoutmix.com/?suiqast" width="250" height="400" frameborder="0" scrolling="auto">
<a href="http://www.shoutmix.com/?suiqast">View shoutbox</a>
</i f r a m e>
<br /><a href="http://www.shoutmix.com" title="Get your own free shoutbox at ShoutMix!">Free shoutbox @ ShoutMix</a><br />
<!-- End ShoutMix -->
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız