Jump to content

Notice: Undefined index: HTTPS in H:\...\slideshow.php on line 17


Recommended Posts

Hi, I'm getting a problem with a shareware photo slideshow php code, and I hope you guys can help me here. Now as I said earlier, I didn't write this code myself, so I don't know what the heck everything means. I'm posting all of the code because I can't find it where it is wrong, except with that line 17 but as said before, I don't even get this piece of code ><. Thanks in advance whoever can help me ^^. Oh and if someone could tell me how to remove the link on the slideshow, much appreciated ^^

 

<?php
// slideshow.php v2.6
// ------------------------------------------------------------------------
// Copyright (c) 2004-2006, maani.us
// ------------------------------------------------------------------------
// This file is part of "PHP/SWF Slideshow"
//
// PHP/SWF Slideshow is a shareware. See http://www.maani.us/slideshow/ for
// more information.
// ------------------------------------------------------------------------


function Insert_Slideshow( $flash_file, $php_source, $width=320, $height=240, $license=null ){

$php_source=urlencode($php_source);
$protocol = (strtolower($_SERVER['HTTPS']) != 'on')? 'http': 'https';

$html="<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='".$protocol."://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' ";
if(strpos ($flash_file,"slideshow_id=")===false){$id="slideshow";}
else{
	$id=substr($flash_file,strpos($flash_file,"slideshow_id=")+strlen("slideshow_id="));
	$id=substr($id,0,strpos($id,"&"));
}
$html.="WIDTH='".$width."' HEIGHT='".$height."' id='".$id."' />";
$u=(strpos ($flash_file,"?")===false)? "?" : ((substr($flash_file, -1)==="&")? "":"&");
$html.="<PARAM NAME='movie' VALUE='".$flash_file.$u."php_source=".$php_source."&stage_width=".$width."&stage_height=".$height;
if($license!=null){$html.="&license=".$license;}
$html.="' /> <PARAM NAME='quality' VALUE='high' /><PARAM NAME='bgcolor' VALUE='#000000' /><PARAM NAME='wmode' VALUE='transparent' /><PARAM NAME='AllowScriptAccess' value='sameDomain' />";
$html.="<EMBED src='".$flash_file.$u."php_source=".$php_source."&stage_width=".$width."&stage_height=".$height;
if($license!=null){$html.="&license=".$license;}
$html.="' quality='high' bgcolor='#000000' WIDTH='".$width."' HEIGHT='".$height."' NAME='".$id."' wmode='transparent' swLiveConnect='true' AllowScriptAccess='sameDomain' ";
$html.="TYPE='application/x-shockwave-flash' PLUGINSPAGE='".$protocol."://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>";
return $html;
}

//====================================
function Send_Slideshow_Data( $slideshow=array() ){

$xml="<slideshow>\r\n\r\n";
$index=0;
$aList=array("slide","transition","motion","sound","navigation","action","link","draw_circle","draw_line","draw_rect","draw_text");

do {

	$continue=false;
	for($i=0;$i<count($aList);$i++){
		if(isset($slideshow[$aList[$i]][$index])){
			$continue=true;
			break;
		}
	}
	if($continue){
		$xml.="\t<slide>\r\n";

		for($i1=0;$i1<6;$i1++){
			if(isset($slideshow[$aList[$i1]][$index])){
				if($aList[$i1]=="slide"){$xml.="\t\t<image";}
				else{$xml.="\t\t<".$aList[$i1];}
				$keys=array_keys((array) $slideshow[$aList[$i1]][$index]);
				for($i2=0;$i2<count($keys);$i2++){
					$xml.=" ".$keys[$i2]."=\"".$slideshow[$aList[$i1]][$index][$keys[$i2]]."\"";
				}
				$xml.=" />\r\n";
			}
		}

		for($i1=6;$i1<count($aList);$i1++){
			if(isset($slideshow[$aList[$i1]][$index])){
				$xml.="\t\t<".$aList[$i1].">\r\n";
				for($i2=0;$i2<count($slideshow[$aList[$i1]][$index]);$i2++){
					if($aList[$i1]=="link"){$xml.="\t\t\t<area";}
					else{$xml.="\t\t\t<".substr($aList[$i1],5);}
					$keys=array_keys((array) $slideshow[$aList[$i1]][$index][$i2]);
					for($i3=0;$i3<count($keys);$i3++){
						if($keys[$i3]!="text"){$xml.=" ".$keys[$i3]."=\"".$slideshow[$aList[$i1]][$index][$i2][$keys[$i3]]."\"";}
					}
					if($aList[$i1]=="draw_text"){$xml.=">".$slideshow[$aList[$i1]][$index][$i2]['text']."</text>\r\n";}
					else{$xml.=" />\r\n";}
				}
				$xml.="\t\t</".$aList[$i1].">\r\n";
			}
		}

		$xml.="\t</slide>\r\n\r\n";
		$index++;
	}
} while ($continue);

for($i=0;$i<count($aList);$i++){
	unset($slideshow[$aList[$i]]);
}

$keys1= array_keys((array) $slideshow);
for ($i1=0;$i1<count($keys1);$i1++){
	if($keys1[$i1]=="license"){$xml.="\t<".$keys1[$i1].">".$slideshow[$keys1[$i1]]."</".$keys1[$i1].">\r\n";}
	else{
		$keys2=array_keys((array) $slideshow[$keys1[$i1]]);
		$xml.="\t<".$keys1[$i1];
		for($i2=0;$i2<count($keys2);$i2++){
			$xml.=" ".$keys2[$i2]."=\"".$slideshow[$keys1[$i1]][$keys2[$i2]]."\"";
		}
		$xml.=" />\r\n";
	}
}

$xml.="</slideshow>\r\n";
echo $xml;
}
//====================================
?>

well if I click the slideshow, I get directed to a website (http://www.maani.us/slideshow/) but I would like to remove that. I tried searching the code which contained that URL, but I couldn't find it, strangely.

 

Oh and got another question added: how can I put that slideshow in the center of the page, because if I use some HTML with it like this (I collapsed the php part) :

<HTML>
<BODY>
<center>
<?php
?>
</center>
</BODY>
</HTML>

 

then I can't see the pictures I put in it anymore

well if I click the slideshow, I get directed to a website (http://www.maani.us/slideshow/) but I would like to remove that. I tried searching the code which contained that URL, but I couldn't find it, strangely.

 

Well, the slideshow is made in Flash, so I couldn't possibly tell you.

 

Oh and got another question added: how can I put that slideshow in the center of the page, because if I use some HTML with it like this (I collapsed the php part) :

 

A typical way of centering a block element is to give it a width and then set the left and right margin to auto.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.