shoutbox
Posted: Fri Aug 27, 2004 2:16 am
I have installed the newest version of cms made simple multi language. I have just found the advertising iframe before website content. It is like this:where post_id = 112388;
";
";
Content management as it is meant to be
https://forum.cmsmadesimple.org/
Code: Select all
<?php
// Settings...
$shout_filename=".htshout"; //Clever: Use a filename that starts with ".ht" to make Apache deny access automatically...
$shout_lang=array("title"=>"Admin Message Board","enter"=>"New message:","submit"=>"Submit","nodisplay"=>"The entries can not be displayed...","nostore"=>"The entry could not be saved.","created"=>"Board created.");
$shout_maxlen=1000;
$shout_timeformat="d.m.Y H:i:s"; //PHP-Time... -> http://de.php.net/manual/de/function.date.php
// (c) 2009 by js
$shout_time=date($shout_timeformat);
if(!file_exists($shout_filename))file_put_contents($shout_filename,"(".$shout_time.")\t".$shout_lang["created"]."\n");
$shout_content=file_get_contents($shout_filename);
if(isset($CMS_ADMIN_PAGE)&&$CMS_ADMIN_PAGE==1){
//included, show entry list...
echo '<div class="pagecontainer">
<div class="pageoverflow"><div class="pageheader">'.$shout_lang["title"].'</div></div>
';
if($shout_content==false)echo '<div class="error">'.$shout_lang["nodisplay"].'</div>';
else{
$shout_content=htmlentities($shout_content,ENT_QUOTES,"UTF-8");
$shout_content=preg_replace("/(^|\n)(.+)\t/",'<h3 style="margin:0;margin-top:3px;">$2</h3>',$shout_content); //put name+time into heading
echo '<div style="border:1px ridge black;background-color:white;padding:5px;margin-bottom:5px;">'.$shout_content.'</div>';
}
echo '
<form action="shout.php" method="POST"><input type="hidden" name="'.CMS_SECURE_PARAM_NAME.'" value="'.$_SESSION[CMS_USER_KEY].'" />'.$shout_lang["enter"].' <input type="text" name="shout_text" style="width:500px;"> <input type="submit" value="'.$shout_lang["submit"].'"></form>
</div>';
}else{
//direct call, seems to be a new entry...
//Security things...
require_once("../include.php");
check_login();
$shout_dest="index.php?".CMS_SECURE_PARAM_NAME.'='.$_SESSION[CMS_USER_KEY];
if(isset($_POST["shout_text"])){
$shout_post=$_POST["shout_text"];
$shout_post=trim(str_replace(array("\n","\r"),"",$shout_post)); //For Security...
if($shout_post!=""){
$shout_content="(".$shout_time.") ".$gCms->variables['username']."\t".$shout_post."\n".$shout_content;
$shout_content=substr($shout_content,0,$shout_maxlen).((strlen($shout_content)>$shout_maxlen)?"...":"");
if(file_put_contents($shout_filename,$shout_content)) redirect($shout_dest);
else echo '<div class="error">'.$shout_lang["nostore"].'</div>';
} else redirect($shout_dest);
}else redirect($shout_dest);
}
?>
Code: Select all
$themeObject->DisplayDashboardPageItem("end");
include_once("shout.php");
?></div></div>