PDA

View Full Version : call image in sideblock


mikem164
05-26-2011, 11:21 PM
Hi, Here's the code I'm running in my Sideblock in PHP:

ob_start();
global $db,$vbulletin;
$event_calendarid="1";
$no_events_message="<div style='width: 100%; text-align: center; font-weight: bold'>There are no events.</div>";
$today_date = mktime(0, 0, 0, date(date("m")), date(date("d")), date(date("y")));
$and=" and dateline_from > '".$today_date."'";
$getevents=$db->query_read("SELECT eventid, title, dateline_from from " . TABLE_PREFIX . "event WHERE calendarid='".$event_calendarid."' $and order by dateline_from ASC LIMIT 2");
$count=1;
if(!$db->num_rows($getevents))
{
echo $no_events_message;
}
else
{
echo "<script type='text/javascript'>\n";
WHILE ($events=$db->fetch_array($getevents))
{
$event_title=$events['title'];
$event_date = vbdate('U',$events['dateline_from'], false,true,false,true)-vbdate('U');
if($count==1)
{
echo "var CountDownTimer=new CountDown('CountDownToChange',1,'".$event_title."<br />','".$event_date."','ywdhms',1)\n";
}
else
{
echo "CountDownTimer.AddNewEvent('".$event_title."<br />','".$event_date."','ywdhms',".$count.")\n";
}
$count++;
}
}
echo "CountDownTimer.DisplayTime(FormatResults)\n";
echo "</script>\n";
$db->free_result($getevents);
unset($events);
$output=ob_get_contents();
ob_end_clean();

I am trying to get an image to appear in it somehow, I have tried a few ways but I can not get it to work, any ideas?

I tried this:
<img src="images/rnp.jpg">

and a few others to no avail in sideblock and in the title as well, I can't get it to appear what can I do?

thanks for any input.

--------------- Added 1306465003 at 1306465003 ---------------

I would also like to add it's checked as PHP in block options and I assume that's why I can't add it.... I googled how to switch to HTML internally but will await a response here for the right thing to do! thanks guys.