All pastes #97672 Raw Edit

synth7

public php v1 · immutable
#97672 ·published 2006-07-23 23:36 UTC
rendered paste body
<?phprequire_once("config.php");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title><?php echo TITLE; ?></title>	<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />	<script src="js/prototype.js" type="text/javascript"></script>	<script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>	<script src="js/lightbox.js" type="text/javascript"></script>	<link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" /></head><body><div align="center">  <table width="860" border="0" cellspacing="0" cellpadding="0">    <tr>      <td width="860" height="164" background="l_top.png" valign="bottom" align="center">	  <b>lord2800:</b> Look at the code for this page and tell me how we can get the gallery name up in this cell of the table.	  </td>    </tr>    <tr>      <td width="860" height="400" align="center" valign="top" background="l_back.png"><table width="93%" height="100%" border="0" cellpadding="0" cellspacing="0">        <tr>          <th align="center" valign="top" scope="col">	  <!-- #### START GALLERY HERE -->	  <div id="content"><?php$imgs = array();$f = '.';if(array_key_exists('f', $_GET)) $f .= '/' . urldecode($_GET['f']);if(!is_dir(PHOTO_DIR . '/' . $f)) echo '<h1 id="title">Invalid directory!</h1>'."\r\n";else {	echo '<h1 id="title">Galleries in '.($f == '.' ? 'the main folder' : basename($f))."</h1>\r\n";	$folderhtml = '';	$picturehtml = '';	$folders = scandir(PHOTO_DIR . '/' . $f);	foreach($folders as $folder) {		if(is_dir(PHOTO_DIR . '/' . $f . '/' . $folder) && $folder{0} != '.') {			$folderhtml .= '<li class="folder"><a href="?f='.htmlentities(urlencode($f.'/'.$folder)).'">'.htmlentities($folder)."</a></li>\r\n";		} else if(is_file(PHOTO_DIR . '/' . $f . '/' . $folder) && preg_match("/.+\.(jpe?g|png|gif)$/i", $folder, $type)) {			$type = $type[1];			$picturehtml .= '<div class="picture"><a href="'. PHOTO_DIR . '/' . $f . '/' . $folder . '" rel="lightbox['.$f.']"  title="'. substr($folder, 0, strrpos($folder, '.')) .'"><img src="thumb.php?t='.$type.'&amp;f='. PHOTO_DIR . '/' . $f . '/' . $folder . '" alt="'.$folder.'" /></a><br>'. substr($folder, 0, strrpos($folder, '.')) .'</div>'."\r\n";		}	}	echo '<ul>' . $folderhtml . '</ul><br /><br />';	echo $picturehtml;}?></div>	  	  	  <!-- #### END GALLERY HERE -->		  </th>        </tr>      </table></td>    </tr>	    <tr>      <td width="860"><img src="l_bot.png" alt="" width="860" height="80"></td>    </tr>  </table></div></body></html>