PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Old March 17th, 2010, 07:10 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
php5 - Rotating images with php and javascript

I had thought i got this bot of code fixed but not it doesn't seem so.

Basically i load a list of images from a database and then they are suppose to be rotated by the javascript. the rotation isn't working but it is displaying one image.

PHP Code:
<script src="Includes/getimages.php?Loc=0"></script>
<script type="text/javascript">
var curimg=0
function rotateimages(){
document.getElementById("slideshow").setAttribute("src", "pics/"+galleryarray[curimg])
curimg=(curimg<galleryarray.length-1)? curimg+1 : 0
}
window.onload=function(){
setInterval("rotateimages()", 2500)
}
</script>
<?
$querystringb
='SELECT * FROM AdBanners WHERE Status = 1 and Location = 0 LIMIT 1';
$runb querya($querystringb);
$uploadsB "Dynamics/Banner/";
foreach(
$runb as $AdsArray){
//echo '<a href="" target="_blank">'.DynamicPicReturn($uploadsB.$AdsArray['File'], 150).'</a>';
$absoluteBASE "/home/public_html/V3/";
$imgpthA $absoluteBASE.$AdsArray['File'];
list(
$width$height$type$attr) = @getimagesize($imgpthA);
echo 
'<center><a href="" target="_blank"><img id="slideshow" src="'.$uploadsB.$AdsArray['File'].'" width=150/></a></center>';
};
?> 


and here is get images.php

PHP Code:
<?
//thanks to Javascriptkit.com for inspiration
Header("content-type: application/x-javascript");

function 
returnimages($Loc $_GET['Loc']) {
    
$dbc=mysql_connect($cms["dbhostmysql"],$cms["dbusermysql"],$cms["dbpassmysql"]) or die ("Could not connect") OR DIE (mysql_error());
    
mysql_select_db ($cms["dbnamemysql"]) OR DIE (mysql_error());
$uploadsB "Dynamics/Banner/";
$curimage=0;
$querystringb='SELECT * FROM AdBanners WHERE Status = 1 and Location = '.$Loc;
$runb querya($querystringb);
foreach(
$runb as $AdsArray){
//Output it as a JavaScript array element
echo 'galleryarray['.$curimage.']="'.$AdsArray['File'] .'";';
$curimage++;
};
return(
$AdsArray);
}
//end function

echo 'var galleryarray=new Array();'//Define array in JavaScript
returnimages() //Output the array elements containing the image file names
?>


any idea's what's gone glitchy?
__________________
29 years of creative writing
13 years of HTML
10 years of Photoshop
6 years of PHP/MySQL
And I never knew Photoshop could do HTML until 2004!
You learn something new every day.

Reply With Quote
Old March 17th, 2010, 09:40 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
Did you check to make sure your PHP is returning the expected result? Maybe it's only giving the javascript one image to work with... or the javascript is having the issue.

Let me know.
__________________
Sir, a desire of knowledge is the natural feeling of mankind; and every human being, whose mind is not debauched, will be willing to give all that he has to get knowledge.

Reply With Quote
Old March 18th, 2010, 12:57 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
Did you check to make sure your PHP is returning the expected result? Maybe it's only giving the javascript one image to work with... or the javascript is having the issue.

Let me know.


it seems to work.

I created a standalone test page

PHP Code:
<?
include('Includes/globals.php');
include(
'Includes/vars.php');
include(
'Includes/functions.php');
    
$uploads "/V3/Dynamics/Content/";
    
$uploads2 "Dynamics/Content/";
$pageself 'index.php';
$IID '';

//thanks to Javascriptkit.com for inspiration

$Loc $_GET['Loc'];
    
$dbc=mysql_connect($cms["dbhostmysql"],$cms["dbusermysql"],$cms["dbpassmysql"]) or die ("Could not connect") OR DIE (mysql_error());
    
mysql_select_db ($cms["dbnamemysql"]) OR DIE (mysql_error());
$uploadsB "Dynamics/Banner/";
$curimage=0;
$querystringb='SELECT * FROM AdBanners WHERE Status = 1 and Location = '.$Loc;
$runb querya($querystringb);
foreach(
$runb as $AdsArray){
//Output it as a JavaScript array element
echo 'galleryarray['.$curimage.']="'.$AdsArray['File'] .'";';
$curimage++;
};

echo 
"<PRE>";
print_r($AdsArray);
echo 
"</PRE>";
?>


and set a loc=0 get variable and it spat back these results

galleryarray[0]="BANNER_27.jpg";galleryarray[1]="BANNER_28.jpg";galleryarray[2]="BANNER_29.jpg";
Array
(
[AdsID] => 29
[File] => BANNER_29.jpg
[Location] => 0
[Name] => TrumpHotel
[Status] => 1
)

Reply With Quote
Old March 18th, 2010, 01:21 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
Must be the javascript then, the easiest way to fix it would be to switch to a plugin for jQuery. Here are some cool ones:
http://jquery.malsup.com/cycle/

Reply With Quote
Old March 18th, 2010, 02:52 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
Must be the javascript then, the easiest way to fix it would be to switch to a plugin for jQuery. Here are some cool ones:
http://jquery.malsup.com/cycle/


that looks like it could work

but it's not

PHP Code:
 ?>
<style type="text/css">
.slideshow { height: 232px; width: 232px; margin: auto }
.slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }
</style>
<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

<!-- include Cycle plugin -->
<script type="text/javascript" src="http://celeblifemag.com/V3/jquery.cycle/src/jquery.cycle.all.js"></script>

<!--  initialize the slideshow when the DOM is ready -->
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
});
</script>
<?
echo '</head>'


changed the header to that and the scrip for the image

PHP Code:
<div class="slideshow">
<?
$uploadsB "Dynamics/Banner/";
$querystringb='SELECT * FROM AdBanners WHERE Status = 1 and Location = 0';
$runb querya($querystringb);
foreach(
$runb as $AdsArray){
echo 
'<img src="'.$uploadsB.$AdsArray['File'].'" width="150" />';
};
?>
    </div> 


it loads the first image as before but then breaks so its cuts the bottom half of the image off and does not fade/cycle

Reply With Quote
Old March 18th, 2010, 03:19 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
Can you post you entire HTML source (after PHP parsing)?

Reply With Quote
Old March 18th, 2010, 03:37 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
Can you post you entire HTML source (after PHP parsing)?


PHP Code:
<?
//error_reporting(E_ALL);
session_start();
include(
'Includes/globals.php');
include(
'Includes/vars.php');
include(
'Includes/functions.php');
    
$dbc=mysql_connect($cms["dbhostmysql"],$cms["dbusermysql"],$cms["dbpassmysql"]) or die ("Could not connect") OR DIE (mysql_error());
    
mysql_select_db ($cms["dbnamemysql"]) OR DIE (mysql_error());
    
$uploads "http://www.xxxx.com/V3/Dynamics/Content/";
    
$uploads2 "Dynamics/Content/";
$pageself 'index.php';
$IID '';
if (isset(
$_GET['IID'])){$IID=mysql_real_escape_string($_GET['IID']);
}else{
$querystring3='SELECT * FROM Issues WHERE Status = 2';
$run3 querya($querystring3);
$uploadsISS "Dynamics/Issue/";
foreach(
$run3 as $IssueArray001){
$IID $IssueArray001['IssueID'];
};
//get masthead
};
//header - html
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
echo 
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >';
echo 
'<head>';
echo 
'<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
echo 
'<meta name="robots" content="noindex, nofollow" />';
echo 
$cms["keywords"];
echo 
$cms["description"];
echo 
'<meta name="generator" content="xxxxxx Magazine" />';
echo 
$cms["title"];
include (
'Includes/headerstyles.php');
echo 
'<link href="calendar.css" rel="stylesheet" type="text/css" />';
echo 
'<script language="javascript" src="calendar.js"></script>';
?>
<style type="text/css">
.slideshow { height: 232px; width: 232px; margin: auto }
.slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }
</style>
<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

<!-- include Cycle plugin -->
<script type="text/javascript" src="http://xxxxx.com/V3/jquery.cycle/src/jquery.cycle.all.js"></script>

<!--  initialize the slideshow when the DOM is ready -->
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
});
</script>
<?
echo '</head>';
?>
    <body id="ff-helvetica" class="f-default bc-red iehandle">
        <div id="page-bg">

        <!-- Begin Wrapper -->
        <div class="wrapper">
                        <div class="shadow-left">
                <div class="shadow-right">
                    <div class="main-page">
                        <div class="main-page2">
                            <div class="main-page3">
                                <div class="main-page4">
                                    <!-- Begin Header -->

                                    <div id="header">
<?
$querystring3
='SELECT * FROM Issues WHERE IssueID = '.$IID;
$run3 querya($querystring3);
$uploadsISS "Dynamics/Issue/";
foreach(
$run3 as $IssueArray){
echo 
'<a href="/V3" class="nounder">'.DynamicPicReturn($uploadsISS.$IssueArray['Masthead'], 725).'</a>';
};
//get masthead
?>
<!--hader image-->
                                        <!--text size-->
                                        <div class="fontbutton-text">Text Size</div>
                                        <div id="accessibility">
                                            <div id="buttons">
                                                <a href="/V3/?fontstyle=f-larger" title="Increase size" class="large"><span class="button">&nbsp;</span></a>
                                                <a href="/V3/?fontstyle=f-smaller" title="Decrease size" class="small"><span class="button">&nbsp;</span></a>
                                            </div>

                                        </div>
<!--search-->
<div id="searchmod"><div class="moduletable">
<h3>xxxxxx Search</h3>
<form action="searchresults.php" method="post"><div class="search"><br />
<input name="searchword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" type="text" size="10" /><BR>
<?
if ($UID 0){
    
$dbc=mysql_connect($cms["dbhostmysql"],$cms["dbusermysql"],$cms["dbpassmysql"]) or die ("Could not connect");
    
mysql_select_db ($cms["dbnamemysql"]);
    
$querystring1='SELECT * FROM Users WHERE UID="'.mysql_real_escape_string($UID).'"';
$run querya($querystring1);
foreach(
$run as $UserArray){
echo 
'Welcome '.$UserArray['Name'].'!';
};
//special note if logged in
};//user check
?>
</div>
<input type="hidden" name="task"   value="search" />
<input type="hidden" name="option" value="com_search" />
</form>    
</div></div>
</div>
<!-- End Header -->
<!-- Begin Horizontal Menu -->
<?
echo '<div id="horiz-menu" class="splitmenu"><ul class="menutop">';
echo 
'<table border=0 cellpadding=0 cellspacing=0 width=100%><TR><TD align=left>';
echo 
'<li id="current" class="';
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
if (
$selfurl == "http://www.xxxxxx.com/V3/".$pageself AND !isset($_GET['MID'])){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxx.com/V3/'.$pageself.'"><span>Home</span></a></li>';
$querystring2='SELECT * FROM Menu WHERE Status = 1 ORDER BY OrderS ASC';
$run querya($querystring2);
foreach(
$run as $MainArray){
$querystring2a='SELECT CatagoryID FROM Category WHERE Status = 1 AND MenuID = '.$MainArray['MenuID'].'';
$run2a querya($querystring2a);
$arraycount1 mysql_num_rows(mysql_query($querystring2a));
SWITCH (
$arraycount1){ 
CASE 
0:
break;
CASE 
1:
$catcodearr mysql_fetch_assoc(mysql_query($querystring2a));
echo 
'<li class="';
$dynamicurl "http://www.xxxxxx.com/V3/".$pageself."?IID=".$IID."&MID=".$MainArray['MenuID'];
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID']);
if (
$selfurl == $dynamicurl){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/'.$pageself.'?IID='.$IID.'&MID='.$MainArray['MenuID'].'&CID='.$catcodearr['CatagoryID'].'" class="topdaddy"><span>'.$MainArray['Name'].'</span></a></li>';
break;
default:
echo 
'<li class="';
$dynamicurl "http://www.xxxxxx.com/V3/".$pageself."?IID=".$IID."&MID=".$MainArray['MenuID'];
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID']);
if (
$selfurl == $dynamicurl){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/'.$pageself.'?IID='.$IID.'&MID='.$MainArray['MenuID'].'" class="topdaddy"><span>'.$MainArray['Name'].'</span></a></li>';
break;
};
//no catoriries check
};//main menu
echo '<li id="current" class="';
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
if ((
$selfurl == "http://www.xxxxxx.com/V3/ContestList.php") OR ($selfurl == "http://www.xxxxxx.com/V3/CReg.php") OR ($selfurl == "http://www.xxxxxx.com/V3/CConfirm.php"))
{echo 
'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/ContestList.php"><span>Free Stuff</span></a></li>';
echo 
'<li id="current" class="';
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
if (
$selfurl == "http://www.xxxxxx.com/V3/blogs2.php"){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/blogs2.php"><span>Blogs</span></a></li>';
echo 
'</TD><TD align=right>';
if (
$UID 0){
echo 
'<li class="';
if (
"http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}== "http://www.xxxxxx.com/V3/memberpage.php"){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/memberpage.php" class="topdaddy"><span>ACCOUNT</span></a></li>';
echo 
'<li class="';
if (
"http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}== "http://www.xxxxxx.com/V3/logout.php"){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/logout.php" class="topdaddy"><span>LOGOUT</span></a></li>';
}else{
echo 
'<li class="';
if (
"http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}== "http://www.xxxxxx.com/V3/Register.php"){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/Register.php" class="topdaddy"><span>LOGIN</span></a></li>';
};
echo 
'</TD></TR></table>';
echo 
'</ul></div>';

//<!-- Begin sub/catagory Menu -->
if (isset($_GET['MID'])){
$querystring3='SELECT * FROM Category WHERE Status = 1 AND MenuID = '.mysql_real_escape_string($_GET['MID']).'';
$run2 querya($querystring3);
$arraycount mysql_num_rows(mysql_query($querystring3));
if (
$arraycount 0){
echo 
'<div id="sub-menu"><ul class="menutop">';
foreach(
$run2 as $MainArray2){
$querystring2a='SELECT ContentID FROM Content WHERE Status = 1 AND CatagoryID = '.$MainArray2['CatagoryID'].' AND IssueID = '.$IID;
$run2a querya($querystring2a);
$arraycount1 mysql_num_rows(mysql_query($querystring2a));
SWITCH (
$arraycount1){ 
CASE 
0:
break;
CASE 
1:
$artcodearr mysql_fetch_assoc(mysql_query($querystring2a));
echo 
'<li class="';
$dynamicurl "http://www.xxxxxx.com/V3/".$pageself."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".$MainArray2['CatagoryID'];
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".mysql_real_escape_string($_GET['CID']);
if (
$selfurl == $dynamicurl){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/'.$pageself.'?IID='.$IID.'&MID='.mysql_real_escape_string($_GET['MID']).'&CID='.$MainArray2['CatagoryID'].'&AID='.$artcodearr['ContentID'].'" class="topdaddy"><span>'.$MainArray2['Name'].'</span></a></li>';
break;
default:
echo 
'<li class="';
$dynamicurl "http://www.xxxxxx.com/V3/".$pageself."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".$MainArray2['CatagoryID'];
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".mysql_real_escape_string($_GET['CID']);
if (
$selfurl == $dynamicurl){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/'.$pageself.'?IID='.$IID.'&MID='.mysql_real_escape_string($_GET['MID']).'&CID='.$MainArray2['CatagoryID'].'" class="topdaddy"><span>'.$MainArray2['Name'].'</span></a></li>';
break;
};
//no artilces check
};//for each for the menu items
echo '</ul></div>';
};
//dont show the bar if their is no sub menu
};//dont show the bar if their is no MID set

//<!-- Begin article Menu -->
if (isset($_GET['CID'])){
$querystring3='SELECT * FROM Issues WHERE IssueID = '.$IID;
$run3 querya($querystring3);
foreach(
$run3 as $IssueArray){
$querystring4='SELECT * FROM Content WHERE Status = 1 AND CatagoryID = '.mysql_real_escape_string($_GET['CID']).' AND IssueID = '.$IID;
$run4 querya($querystring4);
$arraycount mysql_num_rows(mysql_query($querystring4));
if (
$arraycount 0){
echo 
'<div id="sub-menu"><ul class="menutop">';
foreach(
$run4 as $MainArray3){
echo 
'<li class="';
$dynamicurl "http://www.xxxxxx.com/V3/".$pageself."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".$MainArray3['CatagoryID']."&AID=".$MainArray3['ContentID'];
$selfurl "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?IID=".$IID."&MID=".mysql_real_escape_string($_GET['MID'])."&CID=".mysql_real_escape_string($_GET['CID'])."&AID=".mysql_real_escape_string($_GET['AID']);
if (
$selfurl == $dynamicurl){echo 'red active item';}else{echo 'parent grey item';};
echo 
'"><a href="http://www.xxxxxx.com/V3/'.$pageself.'?IID='.$IID.'&MID='.mysql_real_escape_string($_GET['MID']).'&CID='.$MainArray3['CatagoryID'].'&AID='.$MainArray3['ContentID'].'" class="topdaddy"><span>'.$MainArray3['Title'].'</span></a></li>';
};
//for each for the menu items
echo '</ul></div>';
};
//dont show the bar if their is nothing set
};//get the current issue
};//dont show the bar if their is no CID set
?>
                    <!-- End Horizontal Menu -->
                                    <!-- Begin Showcase Area -->
                                                                            <div class="showcase-div"></div>
                                                                        <!-- End Showcase Area -->
                                    <!-- Begin Main Content Area -->
                                    <div id="main-section">
                                        <div class="padding">

                                            <div class="main-content block">
                                                <!-- Begin Left Column -->
                                                <!-- End Left Column -->
<?
if ($noside != "yes"){
?>
<!-- Begin Right Column -->
<div id="right-column">
<div class="padding">
<div id="rightmodules" class="spacer">
</div>
<div class="module">
<div>
<div>
<div>
<!-- poll -->
<form action="submitpoll.php" method="post" name="form2">
<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" class="poll"><thead><tr>
<?
$querystring3
='SELECT * FROM Issues WHERE IssueID = '.$IID;
$run3 querya($querystring3);
foreach(
$run3 as $IssueArray){
$querystring2='SELECT * FROM PollQ WHERE IssueID = '.$IssueArray['IssueID'].' AND Status = 1';
$run querya($querystring2);
if (
count($run) > 0){
foreach(
$run as $QuestionArray){
echo 
'<td style="font-weight: bold;">'.$QuestionArray['Question'].'</td>';
echo 
'</tr></thead>';
echo 
'<tr>';
echo 
'<td align="center">';
echo 
'<table class="pollstableborder" cellspacing="0" cellpadding="0" border="0">';
$querystring2='SELECT * FROM PollA WHERE PollQID = '.$QuestionArray['PollQID'].' AND Status = 1';
$run querya($querystring2);
foreach(
$run as $AnswerArray){
echo 
'<tr>';
echo 
'<td class="sectiontableentry2" valign="top"><input type="radio" name="voteid" id="voteid'.$QuestionArray['PollQID'].'" value="'.$AnswerArray['PollAID'].'" alt="'.$AnswerArray['PollAID'].'" /></td>';
echo 
'<td class="sectiontableentry2" valign="top"><label for="voteid'.$QuestionArray['PollQID'].'">'.$AnswerArray['Answer'].'</label></td>';
echo 
'</tr>';
};
//ahswer loop
echo '</table>';
echo 
'</td>';
echo 
'</tr><tr>';
};
//question arracy for each
echo '<td><div align="center">';
echo 
'<input type="submit" name="task_button" class="button" value="Vote" />&nbsp;';
//echo '<input type="button" name="option" class="button" value="Results" onclick="document.location.href=\'/V3/polresults.php?ID='.$QuestionArray['PollQID'].'\'" />';
echo '</div></td>';
echo 
'</tr></table>';
echo 
'<input type="hidden" name="questionid" value="'.$QuestionArray['PollQID'].'" />';
echo 
'<input type="hidden" name="option" value="com_poll" />';
echo 
'<input type="hidden" name="task" value="vote" />';
echo 
'<input type="hidden" name="id" value="3" />';
echo 
'<input type="hidden" name="b90ef9db3690905d54bf9e646d105c8f" value="1" />';
echo 
'</form>';
}else{
echo 
'</tr></table>';
echo 
'</form>';
};
//if check
};//issue array for each
?>
<!--poll end-->
    </div>
    </div>
    </div>
    </div>
    <!-- side banner -->
    <div id="rightmodules2" class="spacer w99">
    <div class="block">
    <div class="module">
    <div>
    <div>
    <div>
    <div class="bannergroup">
<div class="banneritem">
    <div class="slideshow">
<?
$uploadsB 
"Dynamics/Banner/";
$querystringb='SELECT * FROM AdBanners WHERE Status = 1 and Location = 0';
$runb querya($querystringb);
foreach(
$runb as $AdsArray){
echo 
DynamicPicReturn($uploadsB.$AdsArray['File'], 150);

//echo '<img src="'.$uploadsB.$AdsArray['File'].'" width="150" />';
};
?>
    </div>
<div class="clr"></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>

                                                    </div>
                                                 </div>
                                    <!-- End Right Column -->
<?
};//no side if check
if ($keywordlist == "yes"){include('keywordside.php');};
?>


                                                <!-- Begin Center Column -->
                                                <div id="center-column">
                                                    <div class="padding">
                                                    <!--<div id="bodycopy" style="overflow: auto; height: 800px; width: 735px;">-->

Reply With Quote
Old March 19th, 2010, 09:18 AM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
While you are viewing your website in your browser, right click on the website and click 'View Source' copy all of the HTML source in there and post it here.

Reply With Quote
Old March 19th, 2010, 10:39 AM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
While you are viewing your website in your browser, right click on the website and click 'View Source' copy all of the HTML source in there and post it here.


PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" ><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta name="robots" content="noindex, nofollow" /><meta name="keywords" content="xxxxxx Magazine"><meta name="description" content="xxxxxx Magazine"><meta name="generator" content="xxxxxx Magazine" /><title>xxxxxx Magazine</title><!--style sheets--> 
  <
link href="/site/index.php?format=feed&type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" /> 
  <
link href="/site/index.php?format=feed&type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" /> 
  <
link rel="stylesheet" href="/site/plugins/system/jceutilities/css/jceutilities-217.css" type="text/css" /> 
  <
link rel="stylesheet" href="/site/plugins/system/jceutilities/themes/standard/css/style.css" type="text/css" /> 
  <
link rel="stylesheet" href="http://www.xxxxxx.com/site/modules/mod_gk_news_image_1/css/style.php?text_block_background=1&text_block_bgcolor=000000&text_block_width=250&text_block_opacity=0.65&text_block_margin=0&module_width=700&module_height=400&thumbnail_bar=1&thumbnail_width=50&thumbnail_height=25&thumbnail_margin=4&thumbnail_border=0&thumbnail_bar_position=1&image_x=0&image_y=0&slides_count=5&tick_x=20&tick_y=20&modid=newsimage1&thumbnail_border_color_inactive=000000&base_bgcolor=000000" type="text/css" /> 
 
<!--
Java Scripts--> 
  <
script type="text/javascript" src="/site/plugins/system/jceutilities/js/mediaobject.js"></script> 
  <script type="text/javascript" src="/site/plugins/system/jceutilities/js/jquery-126.js"></script> 
  <script type="text/javascript" src="/site/plugins/system/jceutilities/js/jceutilities-217.js"></script> 
  <script type="text/javascript" src="/site/media/system/js/mootools.js"></script> 
  <script type="text/javascript" src="/site/media/system/js/caption.js"></script> 
  <script type="text/javascript" src="http://www.xxxxxx.com/site/modules/mod_gk_news_image_1/js/engine_compress.js"></script> 
  <script type="text/javascript" src="http://www.xxxxxx.com/site/modules/mod_gk_news_image_1/js/importer.php?mid=newsimage1&animation_slide_speed=1000&animation_interval=5000&autoanimation=1&animation_slide_type=0&animation_text_type=0&base_bgcolor=000000&text_block_opacity=0.65&thumbnail_width=50&thumbnail_margin=4&thumbnail_border=0&thumbnail_border_color=FFFFFF&thumbnail_border_color_inactive=000000&interface_x=0&interface_y=20&clickable_slides=1"></script> 
  <script type="text/javascript"> 
    MediaObject.init({'flash':"9,0,124,0",'windowmedia':"5,1,52,701",'quicktime':"6,0,2,0",'realmedia':"7,0,0,0",'shockwave':"8,5,1,0"});jQuery(document).ready(function(){jceutilities(  {'popup':{'legacy':0,'resize':1,'icons':1,'overlay  ':1,'overlayopacity':0.8,'overlaycolor':"#000000",'fadespeed':500,'scalespeed':500,'width':640,'hei  ght':480,'hideobjects':1,'scrollpopup':1,'theme':"standard",'themecustom':"",'themepath':"plugins/system/jceutilities/themes"},'tootlip':{'classname':"tooltip",'opacity':1,'speed':150,'position':"br",'offsets':"{'x': 16, 'y': 16}"},'imgpath':"plugins/system/jceutilities/img",'pngfix':1,'wmode':0});});
  </script> 
 
<!--favicon/style sheets--> 
<link rel="shortcut icon" href="/site/images/favicon.ico" /> 
<link href="/site/templates/rt_terrantribune_j15/css/template_css.css" rel="stylesheet" type="text/css" /> 
<link href="/site/templates/rt_terrantribune_j15/css/red.css" rel="stylesheet" type="text/css" /> 
<link href="/site/templates/rt_terrantribune_j15/css/rokmininews.css" rel="stylesheet" type="text/css" /> 
<link href="/site/templates/system/css/system.css" rel="stylesheet" type="text/css" /> 
<link href="/site/templates/system/css/general.css" rel="stylesheet" type="text/css" /> 
<link href="/site/templates/rt_terrantribune_j15/css/typography.css" rel="stylesheet" type="text/css" /> 
<style type="text/css"> 
    div.wrapper { margin: 0 auto; width: 1000px;padding:0;}
    #left-column { width:0px;padding:0;}
    #right-column { width:215px;padding:0;}
    #center-column { margin-left:0px;margin-right:215px;padding:0;}
</style>    
 
<!--Scripts--> 
<script type="text/javascript" src="/site/templates/rt_terrantribune_j15/js/rokutils.js"></script> 
<link href="calendar.css" rel="stylesheet" type="text/css" /><script language="javascript" src="calendar.js"></script><style type="text/css"> 
.slideshow { height: 232px; width: 232px; margin: auto }
.slideshow img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }
</style> 
<!-- include jQuery library --> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> 
 
<!-- include Cycle plugin --> 
<script type="text/javascript" src="http://xxxxxx.com/V3/jquery.cycle/src/jquery.cycle.all.js"></script> 
 
<!--  initialize the slideshow when the DOM is ready --> 
<script type="text/javascript"> 
$(document).ready(function() {
    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
});
</script> 
</head>    <body id="ff-helvetica" class="f-default bc-red iehandle"> 
        <div id="page-bg"> 
 
        <!-- Begin Wrapper --> 
        <div class="wrapper"> 
                        <div class="shadow-left"> 
                <div class="shadow-right"> 
                    <div class="main-page"> 
                        <div class="main-page2"> 
                            <div class="main-page3"> 
                                <div class="main-page4"> 
                                    <!-- Begin Header --> 
 
                                    <div id="header"> 
<a href="/V3" class="nounder"><img src="http://www.xxxxxx.com/V3/Dynamics/Issue/MASTHEAD_26.jpg" border="0" width=725 height=148.883928571></a><!--hader image--> 
                                        <!--text size--> 
                                        <div class="fontbutton-text">Text Size</div> 
                                        <div id="accessibility"> 
                                            <div id="buttons"> 
                                                <a href="/V3/?fontstyle=f-larger" title="Increase size" class="large"><span class="button">&nbsp;</span></a> 
                                                <a href="/V3/?fontstyle=f-smaller" title="Decrease size" class="small"><span class="button">&nbsp;</span></a> 
                                            </div> 
 
                                        </div> 
<!--search--> 
<div id="searchmod"><div class="moduletable"> 
<h3>xxxxxx Search</h3> 
<form action="searchresults.php" method="post"><div class="search"><br /> 
<input name="searchword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" type="text" size="10" /><BR> 
</div> 
<input type="hidden" name="task"   value="search" /> 
<input type="hidden" name="option" value="com_search" /> 
</form>    
</div></div> 
</div> 
<!-- End Header --> 
<!-- Begin Horizontal Menu --> 
<div id="horiz-menu" class="splitmenu"><ul class="menutop"><table border=0 cellpadding=0 cellspacing=0 width=100%><TR><TD align=left><li id="current" class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php"><span>Home</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=1&CID=64" class="topdaddy"><span>In This Issue</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=3" class="topdaddy"><span>Society</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=5" class="topdaddy"><span>Living</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=7" class="topdaddy"><span>Flavor & Savor</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=8" class="topdaddy"><span>A Better World</span></a></li><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/index.php?IID=26&MID=9" class="topdaddy"><span>Forums</span></a></li><li id="current" class="parent grey item"><a href="http://www.xxxxxx.com/V3/ContestList.php"><span>Free Stuff</span></a></li><li id="current" class="parent grey item"><a href="http://www.xxxxxx.com/V3/blogs2.php"><span>Blogs</span></a></li></TD><TD align=right><li class="parent grey item"><a href="http://www.xxxxxx.com/V3/Register.php" class="topdaddy"><span>LOGIN</span></a></li></TD></TR></table></ul></div>                    <!-- End Horizontal Menu --> 
                                    <!-- Begin Showcase Area --> 
                                                                            <div class="showcase-div"></div> 
                                                                        <!-- End Showcase Area --> 
                                    <!-- Begin Main Content Area --> 
                                    <div id="main-section"> 
                                        <div class="padding"> 
 
                                            <div class="main-content block"> 
                                                <!-- Begin Left Column --> 
                                                <!-- End Left Column --> 
<!-- Begin Right Column --> 
<div id="right-column"> 
<div class="padding"> 
<div id="rightmodules" class="spacer"> 
</div> 
<div class="module"> 
<div> 
<div> 
<div> 
<!-- poll --> 
<form action="submitpoll.php" method="post" name="form2"> 
<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" class="poll"><thead><tr> 
<td style="font-weight: bold;">Which engaged celeb couple will have the most fabulous wedding?</td></tr></thead><tr><td align="center"><table class="pollstableborder" cellspacing="0" cellpadding="0" border="0"><tr><td class="sectiontableentry2" valign="top"><input type="radio" name="voteid" id="voteid12" value="57" alt="57" /></td><td class="sectiontableentry2" valign="top"><label for="voteid12">Nicole Richie & Joel Madden</label></td></tr><tr><td class="sectiontableentry2" valign="top"><input type="radio" name="voteid" id="voteid12" value="58" alt="58" /></td><td class="sectiontableentry2" valign="top"><label for="voteid12">Simon Cowell & Mezhgan Hussainy</label></td></tr><tr><td class="sectiontableentry2" valign="top"><input type="radio" name="voteid" id="voteid12" value="59" alt="59" /></td><td class="sectiontableentry2" valign="top"><label for="voteid12">Hilary Duff & Mike Comrie</label></td></tr></table></td></tr><tr><td><div align="center"><input type="submit" name="task_button" class="button" value="Vote" />&nbsp;</div></td></tr></table><input type="hidden" name="questionid" value="12" /><input type="hidden" name="option" value="com_poll" /><input type="hidden" name="task" value="vote" /><input type="hidden" name="id" value="3" /><input type="hidden" name="b90ef9db3690905d54bf9e646d105c8f" value="1" /></form><!--poll end--> 
    </div> 
    </div> 
    </div> 
    </div> 
    <!-- side banner --> 
    <div id="rightmodules2" class="spacer w99"> 
    <div class="block"> 
    <div class="module"> 
    <div> 
    <div> 
    <div> 
    <div class="bannergroup"> 
<div class="banneritem"> 
    <div class="slideshow"> 
<img src="http://www.xxxxxx.com/V3/Dynamics/Banner/BANNER_27.jpg" border="0" width=150 height=385.714285714><img src="http://www.xxxxxx.com/V3/Dynamics/Banner/BANNER_28.jpg" border="0" width=150 height=385.714285714><img src="http://www.xxxxxx.com/V3/Dynamics/Banner/BANNER_29.jpg" border="0" width=150 height=385.714285714>    </div> 
<div class="clr"></div> 
    </div> 
    </div> 
    </div> 
    </div> 
    </div> 
    </div> 
    </div> 
    </div> 
 
                                                    </div> 
                                                 </div> 
                                    <!-- End Right Column --> 
 
 
                                                <!-- Begin Center Column --> 
                                                <div id="center-column"> 
                                                    <div class="padding"> 
                                                    <!--<div id="bodycopy" style="overflow: auto; height: 800px; width: 735px;">--> 

Reply With Quote
Old March 19th, 2010, 01:09 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
Okay, you have some deprecated stuff there. Try removing the height, width and border attributes from the images, and close each img tag by adding a space and a / before you close it with >

eg:
<img src='test.jpg' />

Reply With Quote
Old March 19th, 2010, 01:19 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
Okay, you have some deprecated stuff there. Try removing the height, width and border attributes from the images, and close each img tag by adding a space and a / before you close it with >

eg:
<img src='test.jpg' />


can't really do that, in most cases my images are via a resize function so i can force them to be a specific height or width with Getimagesize used the calculate the other attribute

echo '<a href="/V3" class="nounder">'.DynamicPicReturn($uploadsISS.$IssueArray['Masthead'], 725).'</a>';

for example that's the masthead call

maybe i need to update my functions?

PHP Code:
function DynamicPic($imgnameA$maxwidth 'N/A'$absoluteBASE "/home/xxxxxx/public_html/xxxxxxazine/V3/"$BASE "http://www.xxxxxx.com/V3/"){
$imgpthA $absoluteBASE.$imgnameA;
$displayimgpthA $BASE.$imgnameA;

if (
trim($imgnameA)==''){echo '<img src="'.$BASE.'images/spacer.gif">';}else{
list(
$width$height$type$attr) = @getimagesize($imgpthA);
if (
$maxwidth != 'N/A'){
    
$newwidthdiv $width $maxwidth;
    
$height $height $newwidthdiv;
    
$width $maxwidth;}
    if (
$type 4){ 
echo 
'<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>';
} else {
echo 
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='.$width.' height='.$height.'>';
echo 
'<param name="movie" value="'.$displayimgpthA.'">';
echo 
'<param name="quality" value="high">';
echo 
'<param name="wmode" value="transparent">';
echo 
'<embed src="'.$displayimgpthA.'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='.$width.' height='.$height.'></embed></object>';
}
// end of if else for images/swf switch
};};//function

function DynamicPicReturn($imgnameA$maxwidth 'N/A'$absoluteBASE "/home/xxxxxx/public_html/xxxxxxazine/V3/"$BASE "http://www.xxxxxx.com/V3/"){
$imgpthA $absoluteBASE.$imgnameA;
$displayimgpthA $BASE.$imgnameA;

if (
trim($imgnameA)==''){$display '<img src="'.$BASE.'images/spacer.gif">';}else{
list(
$width$height$type$attr) = @getimagesize($imgpthA);
if (
$maxwidth != 'N/A'){
    
$newwidthdiv $width $maxwidth;
    @
$height $height $newwidthdiv;
    
$width $maxwidth;}
    if (
$type 4){ 
$display '<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>';
} else {
$display '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='.$width.' height='.$height.'>';
$display .= '<param name="movie" value="'.$displayimgpthA.'">';
$display .= '<param name="quality" value="high">';
$display .= '<param name="wmode" value="transparent">';
$display .= '<embed src="'.$displayimgpthA.'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='.$width.' height='.$height.'></embed></object>';
}
// end of if else for images/swf switch
};
return 
$display;
};
//function

function DynamicPicReturnH($imgnameA$maxheight 'N/A'$absoluteBASE "/home/xxxxxx/public_html/xxxxxxazine/V3/"$BASE "http://www.xxxxxx.com/V3/"){
$imgpthA $absoluteBASE.$imgnameA;
$displayimgpthA $BASE.$imgnameA;

if (
trim($imgnameA)==''){$display '<img src="'.$BASE.'images/spacer.gif">';}else{
list(
$width$height$type$attr) = @getimagesize($imgpthA);
if (
$maxheight != 'N/A'){
    
$newheightdiv $height $maxheight;
    @
$width $width $newheightdiv;
    
$height $maxheight;}
    if (
$type 4){ 
$display '<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>';
} else {
$display '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='.$width.' height='.$height.'>';
$display .= '<param name="movie" value="'.$displayimgpthA.'">';
$display .= '<param name="quality" value="high">';
$display .= '<param name="wmode" value="transparent">';
$display .= '<embed src="'.$displayimgpthA.'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='.$width.' height='.$height.'></embed></object>';
}
// end of if else for images/swf switch
};
return 
$display;
};
//function

function DynamicPicReturnWTxt($imgnameA$imgnameTXT$maxwidth 'N/A'$absoluteBASE "/home/xxxxxx/public_html/xxxxxxazine/V3/"$BASE "http://www.xxxxxx.com/V3/"){
$imgpthA $absoluteBASE.$imgnameA;
$displayimgpthA $BASE.$imgnameA;

if (
trim($imgnameA)==''){$display $imgnameTXT;}else{
list(
$width$height$type$attr) = @getimagesize($imgpthA);
if (
$maxwidth != 'N/A'){
    
$newwidthdiv $width $maxwidth;
    
$height $height $newwidthdiv;
    
$width $maxwidth;}
    if (
$type 4){ 
$display '<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>';
} else {
$display '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width='.$width.' height='.$height.'>';
$display .= '<param name="movie" value="'.$displayimgpthA.'">';
$display .= '<param name="quality" value="high">';
$display .= '<param name="wmode" value="transparent">';
$display .= '<embed src="'.$displayimgpthA.'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width='.$width.' height='.$height.'></embed></object>';
}
// end of if else for images/swf switch
};
return 
$display;
};
//function 

Reply With Quote
Old March 19th, 2010, 08:13 PM
jamestrowbridge jamestrowbridge is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Jul 2008
Location: Cleveland, Ohio, USA
Posts: 605 jamestrowbridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 Days 22 h 32 m 27 sec
Reputation Power: 7
Before doing anything drastic, why not try to just do this..
convert:
PHP Code:
echo '<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>'

to:
PHP Code:
echo '<img src="'.$displayimgpthA.'" />'

Reply With Quote
Old March 19th, 2010, 10:38 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by jamestrowbridge
Before doing anything drastic, why not try to just do this..
convert:
PHP Code:
echo '<img src="'.$displayimgpthA.'" border="0" width='.$width.' height='.$height.'>'

to:
PHP Code:
echo '<img src="'.$displayimgpthA.'" />'


because i know the source images will not be all the right sizes, so they will end up all over the place

Reply With Quote
Old March 20th, 2010, 10:40 AM
MatthewJ MatthewJ is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: May 2007
Location: Davenport, Iowa
Posts: 1,021 MatthewJ User rank is Lance Corporal (50 - 100 Reputation Level)MatthewJ User rank is Lance Corporal (50 - 100 Reputation Level)MatthewJ User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 6 Days 12 h 13 m 18 sec
Reputation Power: 9
I'm confused... are you saying you're forcing the image size by constraining them in the img tags? If you have a resize function, isn't it resizing them to the proper dimensions anyway?
Comments on this post
jamestrowbridge agrees: I also am confused.

Reply With Quote
Old March 20th, 2010, 11:05 AM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,367 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 5 m 10 sec
Reputation Power: 9
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by MatthewJ
I'm confused... are you saying you're forcing the image size by constraining them in the img tags? If you have a resize function, isn't it resizing them to the proper dimensions anyway?


that function is how i resize them, i set a hard code width then calculate a new hight and set those as the tags

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > php5 - Rotating images with php and javascript


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap