
Anyone know how to fix this? Sounds like a system bug to me.
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
padding: 0px;
margin: 0px;
color: #FFFFFF;
}
a {
color: #6666CC;
text-decoration: none;
}
a:hover {
color: #6666FF;
}
table {
font-size: 12px;
width: 100%;
}
table td {
}
h1 {}
h2 {}
h3 {}
h4 {}
h5 {}
ul { margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
li { margin-left: 2px; list-style: square inside;}
input.formButton {
}
.item {
color: #FFFFFF;
font-weight: normal;
}
.item a {
color: #6666CC;
text-decoration: none;
}
.item a:hover {
color: #6666FF;
}
.itemHead {
padding: 2px;
color: #FFFFFF;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.itemHead a {
color: #6666CC;
text-decoration: none;
}
.itemHead a:hover {
color: #6666FF;
}
.itemInfo {
text-align: right;
padding: 3px;
color: #CCCCCC;
font-weight: normal;
font-size: 95%;
border-bottom: 1px dotted #666666;
}
.itemTitle a {
font-variant: small-caps;
background-color: transparent;
font-size: 120%;
color: #FFFFFF;
}
.itemPoster {font-size: 90%; font-style:italic; color: #CCCCCC;}
.itemPostDate {font-size: 90%; font-style:italic; color: #CCCCCC;}
.itemStats {font-size: 90%; font-style:italic; color: #CCCCCC;}
.itemBody {
font-size: 90%;
text-align: justify;
color: #FFFFFF;
}
.itemText {
margin-top: 5px;
margin-bottom: 5px;
line-height: 1.5em;
color: #ffffff;
font-weight: normal;
margin-right: 5px;
margin-left: 5px;
}
.itemText:first-letter {font-size: 133%; font-weight: bold;}
.itemFoot {
text-align: right;
padding: 2px 3px 3px;
border-top-width: 1px;
border-top-style: dotted;
border-top-color: #666666;
font-size: 95%;
}
.itemAdminLink {font-size: 90%;}
.itemPermaLink {font-size: 90%;}
th {
background-image: url(wtr.jpg);
padding-top: 2px;
padding-right: 5px;
padding-bottom: 2px;
padding-left: 5px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
letter-spacing: .6pt;
}
td#headerbanner {}
td#headerbar {}
td#centercolumn {font-size: 12px;}
td#centercolumn th {
vertical-align: middle;
background-image: url(sideback2.png);
border: 1px solid #CCCCCC;
font-size: 12px;
font-weight: normal;
}
td#centerCcolumn {padding: 0px 3px 1px 3px;}
td#centerCcolumn legend.blockTitle {
padding: 1px;
color: #639ACE;
font-weight: bold;
margin-top: 0px;
margin-right: 0px;
margin-left: 0px;
background-color: #000099;
}
td#centerCcolumn div.blockContent {
padding: 1px;
margin-right: 0px;
margin-left: 0px;
margin-bottom: 2px;
line-height: 120%;
}
td#centerLcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerLcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
td#centerLcolumn div.blockContent {border-left: 1px solid #F8F7F1; border-right: 1px solid #F8F7F1; border-bottom: 1px solid #dddddd; padding: 3px; margin-left: 3px; margin-right: 2px; margin-bottom: 2px; line-height: 120%;}
td#centerRcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerRcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
td#centerRcolumn div.blockContent {border-left: 1px solid #F8F7F1; border-right: 1px solid #F8F7F1; border-bottom: 1px solid #dddddd; padding: 3px; margin-left: 2px; margin-right: 3px; margin-bottom: 2px; line-height: 120%;}
div#content {
text-align: left;
width: 100%;
}
tr#footerbar {}
td#mainmenu a {
color: #C49730;
text-decoration: none;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 1px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
td#mainmenu a:hover {
color: #FFFFFF;
border: 1px solid #666666;
background-color: #787FB5;
padding-top: 2px;
padding-bottom: 2px;
font-weight: bold;
}
td#mainmenu a.menuTop {
padding-left: 10px;
}
td#mainmenu a.menuMain {
padding-left: 10px;
}
td#mainmenu a.menuSub {
padding-left: 15px;
}
td#usermenu a {
color: #FFFFFF;
text-decoration: none;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 11px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
td#usermenu a:hover {
color: #FFFFFF;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 10px;
background-color: #787FB5;
border: 1px solid #666666;
font-weight: bold;
}
td#usermenu a.menuTop {
}
td#usermenu a.highlight {
padding-top: 2px;
padding-bottom: 2px;
padding-left: 10px;
}
.outer {
background-color: #333333;
vertical-align: top;
text-align: left;
}
.head {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
padding: 2px 5px;
background-color: #828282;
letter-spacing: .6pt;
color: #FFFFFF;
}
.even {
padding: 3px;
background-image: url(newsmid2.gif);
vertical-align: top;
text-align: left;
color: #FFFFFF;
}
.odd {
padding: 3px;
background-image: url(newsmid.gif);
vertical-align: top;
text-align: left;
color: #FFFFFF;
}
.foot {
padding: 3px;
font-size: 80%;
background-image: url(wtr.jpg);
}
tr.even td {
background-color: #585858;
vertical-align: top;
text-align: left;
background-image: url(newsmid2.gif);
}
tr.odd td {
vertical-align: top;
text-align: left;
background-image: url(newsmid.gif);
}
div.errorMsg { background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
div.confirmMsg { background-color: #DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
div.resultMsg { background-color : #F8F7F1; color: #333333; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}
div.xoopsCode { background: #FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px;}
div.xoopsQuote { background: #FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px;}
.comTitle {
margin-bottom: 2px;
color: #FFFFFF;
}
.comText {padding: 2px;}
.comUserStat {font-size: 10px; color: #000099; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
.comUserStatCaption {font-weight: normal;}
.comUserStatus {margin-left: 2px; margin-top: 10px; color: #000099; font-weight:bold; font-size: 10px;}
.comUserRank {margin: 2px;}
.comUserRankText {font-size: 10px;font-weight:bold;}
.comUserRankImg {border: 0;}
.comUserName {
color: #FFFFFF;
}
.comUserImg {margin: 2px;}
.comDate {font-weight: normal; font-style: italic; font-size: smaller}
.comDateCaption {font-weight: bold; font-style: normal;}
.mainbody {
padding: 10px;
color: #FFFFFF;
}
.mainbody a {
padding: 10px;
color: #6666CC;
}
.mainbody a:hover {
padding: 10px;
color: #6666FF;
}
.btable {
}
.btableouter {
width: 770px;
}
.sidetable {
width: 100%;
margin: 0px;
border-right-width: 1px;
border-right-style: solid;
border-right-color: #333333;
}
.sidemid {
width: 100%;
padding: 5px;
}
.sidebot {
width: 100%;
padding: 0px;
}
.sidetop {
padding: 2px 0px 2px 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #333333;
background-image: url(wtr.jpg);
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #000000;
border-right-width: 1px;
border-left-color: #333333;
letter-spacing: 0.8pt;
}
.newstable {
padding: 0px;
border: 1px solid #333333;
margin: 0px;
background-image: url(newsmid.gif);
color: #FFFFFF;
}
.newstop {
padding: 2px 3px 2px 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
font-weight: bold;
border-bottom: 1px solid #666666;
background-image: url(wtr.jpg);
letter-spacing: .6pt;
}
.newsmid {
padding: 3px 10px;
text-align: justify;
color: #FFFFFF;
}
.newsmid a {
padding: 3px 10px;
text-align: justify;
color: #FFFFFF;
}
.newslrtable {
padding: 0px;
}
.newstd {
}
.newstablemain {
border: 1px solid #333333;
}
.sidepanel {
height: 93px;
}
.srchinput {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #333333;
border: 1px solid #666666;
padding: 1px;
color: #FFFFFF;
}
.tdfooter {
font-size: 10px;
}
.footertext {
font-size: 10px;
color: #FFFFFF;
}
.topnav {
font-size: 90%;
}
title {
}
.notifications {
margin: 0px;
padding: 0px;
width: 98%;
}
.comments {
padding: 0px;
width: 98%;
background-color: #666666;
}
input {
font-size: 11pt;
}
.srchbutton {
border: 0px none;
}
.sidetd {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #666666;
}
xml version="1.0" encoding="iso-8859-1"?>
" lang="<{$xoops_langcode}>">
" />
" />
" />
" />
" />
" />
" />
<{$xoops_sitename}> - <{$xoops_pagetitle}>
/favicon.ico" rel="SHORTCUT ICON" />
/xoops.css" />
" />
<{$xoops_module_header}>
left_bg.jpg">
logo.jpg" alt="Crucial" width="203" height="157" />
<{foreach item=block from=$xoops_lblocks}> <{include
file="sev_ventti/theme_blockleft.html"}> <{/foreach}>
<{foreach item=block from=$xoops_rblocks}> <{include
file="sev_ventti/theme_blockright.html"}> <{/foreach}>
<{$xoops_banner}>
bg.jpg">
<{$xoops_contents}>
<{if $xoops_showcblock == 1}> <{foreach item=block from=$xoops_ccblocks}>
<{$block.title}>
<{$block.content}>
<{/foreach}>
<{foreach item=block
from=$xoops_clblocks}>
<{$block.title}>
<{$block.content}>
<{/foreach}>
<{foreach item=block
from=$xoops_crblocks}>
<{$block.title}>
<{$block.content}>
<{/foreach}>
<{/if}>
wtr.jpg">
wtr.jpg" bgcolor="#000000" class="tdfooter">[TOP]
shadow.jpg">
shadow.jpg" width="11" height="35" />
footer.jpg">
<{$xoops_footer}>
shadow.jpg">
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// //
// ------------------------------------------------------------------------ //
// 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; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
// Original Author: Mithrandir //
/**
* ImageBlock class
*
* @package modules
* @subpackage Homepage
*/
class ImageBlock extends HomepageBlock {
function ImageBlock() {
$this->HomepageBlock();
$this->assignVar('template', 'hp_blocktype_image.html');
$this->assignVar('blocktypename', 'Image');
//One day cache time
$this->assignVar('bcachetime', 86400);
}
/**
* Builds a form for the block
*
*/
function buildForm() {
$myts =& MyTextSanitizer::getInstance();
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
echo $this->showImages();
if (isset($_GET['imageid'])) {
$image = $this->getImage($_GET['imageid']);
}
else {
$image = array('image' => '');
}
$form = new XoopsThemeForm('', 'imageform', 'manage.php');
$image_input = new XoopsFormText(_HP_MA_IMAGE, 'image', 60, 255, $myts->htmlSpecialChars($image['image']));
$image_input->setExtra(" />
hand"' onclick='javascript:openWithSelfMain("".XOOPS_URL."/imagemanager.php?nocode=1&target=image","imgmanager",400,430);' src='".XOOPS_URL."/images/image.gif' alt='image' title='image'");
$form->addElement($image_input, true);
if (isset($image['fieldid'])) {
$form->addElement(new XoopsFormHidden('imageid', $image['fieldid']));
}
$form->addElement(new XoopsFormHidden('op', 'editblock'));
$form->addElement(new XoopsFormHidden('blockid', $this->getVar('blockid')));
$form->addElement(new XoopsFormButton('', 'submit', _HP_MA_SUBMIT, 'submit'));
$form->display();
if (isset($image['fieldid'])) {
$img = @imagecreatefromjpeg($image['image']);
if ($img) {
$img_height = imagesy($img) + 10;
ImageDestroy($img);
}
echo '
';
}
}
/**
* Builds a homepageblock
*
* @return array
*/
function buildBlock() {
$block['image'] = $this->getRandomImage();
$img = @imagecreatefromjpeg($block['image']['image']);
if ($img) {
$block['img_height'] = imagesy($img) + 10;
ImageDestroy($img);
}
return $block;
}
/**
* Performs actions following buildForm submissal
*
*/
function updateBlock() {
$myts = MyTextSanitizer::getInstance();
if (isset($_POST['imageid']) && $_POST['imageid'] > 0) {
$sql = "UPDATE ".$this->table."
SET value='".$myts->addSlashes($_POST['image'])."',
weight=0,
updated=".time()."
WHERE blockid=".$this->getVar('blockid')." AND fieldid=".intval($_POST['imageid']);
}
else {
$sql = "INSERT INTO ".$this->table." (blockid, weight, value, updated) VALUES
(".$this->getVar('blockid').", 0, '".$myts->addSlashes($_POST['image'])."', ".time().")";
}
return $this->db->query($sql);
}
/** Deletes a single item
*
* @return bool
*/
function deleteItem() {
$id = intval($_REQUEST['id']);
$sql = "DELETE FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." AND fieldid=".$id;
if ($this->db->queryF($sql)) {
return true;
}
return false;
}
/**
/* Show items already present in the block
*
* @return string
*/
function showImages() {
$images = $this->getImages();
$ret = "";
$ret .= ""._HP_MA_IMAGE." "._HP_MA_EDIT." "._HP_MA_DELETE." ";
foreach ($images as $imageid => $row) {
$page = isset($page) && $page == "odd" ? "even" : "odd";
$ret .= ".$page."'>";
$ret .= "".$row['image']." ";
$ret .= ".$this->getVar('blockid')."&imageid=".$imageid."'>"._HP_MA_EDIT." ";
$ret .= ".$this->getVar('blockid')."&id=".$imageid."'>"._HP_MA_DELETE." ";
$ret .= " ";
}
$ret .= "
";
return $ret;
}
/**
* retrieve item from database
*
* @param int $id imageid
*
* @return array
*/
function getImage($id) {
$id = intval($id);
$sql = "SELECT * FROM ".$this->table." WHERE fieldid=".$id;
$result = $this->db->query($sql);
$row = $this->db->fetchArray($result);
$row['image'] = $row['value'];
return $row;
}
/**
* Retrieves all items in a block
*
* @return array
*/
function getImages() {
$ret = array();
$myts =& MyTextSanitizer::getInstance();
$sql = "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." ORDER BY updated DESC";
$result = $this->db->query($sql);
while ($row = $this->db->fetchArray($result)) {
$ret[$row['fieldid']] = array('imageid' => $row['fieldid'],
'image' => $myts->htmlSpecialChars($row['value']),
'weight' => $row['weight']);
}
return $ret;
}
/**
* retrieve random item from database
*
* @return array
*/
function getRandomImage() {
$myts =& MyTextSanitizer::getInstance();
$sel_time = time() - (86400 * 2);
$sql = "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." AND updated > ".$sel_time;
$result = $this->db->query($sql);
$images = array();
while ($row = $this->db->fetchArray($result)) {
$images[] = $row;
}
$num_images = count($images);
if ($num_images == 0) {
$sql = "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." LIMIT 0,1";
$result = $this->db->query($sql);
$images[] = $this->db->fetchArray($result);
}
$random_number = rand(0, $num_images-1);
$row = $images[$random_number];
//$row['image'] = $myts->displayTarea($row['value']);
$row['image'] = $row['value'];
$sql = "UPDATE ".$this->table." SET updated=".time()." WHERE fieldid=".$row['fieldid'];
$this->db->queryF($sql);
return $row;
}
}
?>
if ( $xoopsUser ) {
$userdata['realname'] = $foundusers[$j]->getVar("name") ? ".$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("name")."" : "";
} else {
$userdata['realname'] = $foundusers[$j]->getVar("name") ? $foundusers[$j]->getVar("name") : " ";
}