Autor Zpráva
Petr B.
Profil *
Dobrý den. Stáhl jsem si galerii v php na svojí stránku,všecho funguje jak má,až na to,že na všech stránkách se mi zobrazuje nějaký text. Viz .
V kódu index.php žádný takový text není a v žádném jiném souboru také ne ,takže nevím jak to zpravit.
V php začínám a tak se musím zeptat vás,profíků.Díky moc za každou radu,nashledaneou.
tady je kód ze souboru index.php



<?php
/********************************************************************* **

Copyright (C) 2006 Aizu Ikmal Ahmad (aizu@ikmal.com.my)

This file is part of iFoto.

iFoto 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.

iFoto 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

********************************************************************** **/

require('config.php');

define('SORT_BY', $sort_thumbs_by);
define('SORT_ORDER', $sort_thumbs_order);
define('STRIP_SORT_NUMBER', $strip_sort_number);
define('DISPLAY_HOMEPAGE_LAST_ADDTION', $display_home_last_addition);
define('THUMBS_PER_PAGE', $thumbs_per_page);
define('TILE_STYLE', $tile_style);

require('includes/functions.php');
require('includes/thumbnailer.php');

requirement_checker();

$template = 'default';
if(!is_file('templates/'.$template.'.html')){ errorMsg('Sorry, template '.$template.' does not exist.'); }

require('templates/'.$template.'.html');



function home_page(){
?>
<div id="homepage">
<h3><font color="#FF6600">i</font>Foto</h3>
My Simple Photo Gallery
<br /><br />
Click on the left category to view photos.
<br /><br />
Current release : 1.0 (Non-MySQL)

<?php if(DISPLAY_HOMEPAGE_LAST_ADDTION){html_LastAddition();} ?>

</div>
<?php
}

function html_stat(){



}

function html_nav(){

echo '<ul>';
echo '<li class="home_button"><a href="?">Home</a></li>';
map_dirs('gallery/',0);
echo '</ul>';
$style_on_current = '';

}

function map_dirs($path,$level) {
if(is_dir($path)) {
if($contents = opendir($path)) {
while(($node = readdir($contents)) !== false) {
if($node!="." && $node!="..") {
for($i=0;$i<$level;$i++) echo " ";
if(is_dir($path."/".$node)){
if((urldecode(get_param('dir')) == str_replace('gallery//','',$path).'/'.$node) OR urldecode(get_param('dir')) == $node){$style_on_current = 'class="active"';}else{$style_on_current = '';}
if($i == 0){
echo '<li '.$style_on_current.'><a href="?dir='.urlencode($node).'" title="'.$node.'">'.$node.'</a></li>';
}else{
echo '<li '.$style_on_current.' style="margin-left:10px;"><a href="?dir='.str_replace('gallery//','',$path)."/".urlencode($node).'" title="'.$node.'" style="font-weight:normal;">'.$node.'</a></li>';
}
}
map_dirs("$path/$node",$level+1);
}
}
}
}
}

function html_contents(){

if(get_param('pic')){

if(!get_param('dir')){ exit('<pre>Get dir error.</pre>'); }

$current_image_list = readDirectory(get_param('dir'), true);

$current_image_list = multi_array_sort($current_image_list, SORT_BY, SORT_ORDER);

$total_images = count($current_image_list);

$search_key = multi_array_search(get_param('pic'), $current_image_list);
//pre($current_image_list);
$current_key = $search_key[0];

@$curr_image = $current_image_list[$current_key];
@$prev_image = $current_image_list[$current_key-1];
@$next_image = $current_image_list[$current_key+1];


$max_width = 560;

/* to avoid small image getting as big as $max_width */
if($curr_image['width'] > $max_width){
$img_width = $max_width;
}else{
$img_width = $curr_image['width'];
}

$curr_image_meta_id = str_replace('.jpg','',str_replace('data/thumbdata_','',$curr_image['th umb']));

if(file_exists('data/desc_'.$curr_image_meta_id.'.desc')){
$current_image_description = '<div class="description">'.implode ('', file ('data/desc_'.$curr_image_meta_id.'.desc')).'</div>';
}else{
$current_image_description = '';
}

?>

<script language="JavaScript">
<!-- Begin Image Preload

image_prev = new Image();
image_prev.src = "gallery/<?php echo $prev_image['dir']; ?>/<?php echo $prev_image['filename']; ?>";

image_next = new Image();
image_next.src = "gallery/<?php echo $next_image['dir']; ?>/<?php echo $next_image['filename']; ?>";

// End -->
</script>
<div id="fullsize">

<div class="menu">
<div class="left">
Photo <?php echo $current_key+1 ; ?> from <?php echo $total_images; ?>
</div>
<div class="right">
<?php if($current_key != 0){ ?><a href="?dir=<?php echo urlencode(get_param('dir')); ?>&pic=<?php echo urlencode($prev_image['title']); ?>" title="<?php echo $prev_image['title'];?>">Prev</a> | <?php }else{ ?> Prev | <?php }; ?>
<?php if($current_key+1 != $total_images){ ?><a href="?dir=<?php echo urlencode(get_param('dir')); ?>&pic=<?php echo urlencode($next_image['title']); ?>" title="<?php echo $next_image['title'];?>">Next</a><?php }else{ ?> Next <?php }; ?>
</div>
<div class="clear">&nbsp;</div>
</div>


<div class="image_wrapper">
<div class="shadow">&nbsp;</div>
<div class="image">
<a href="gallery/<?php echo urldecode($curr_image['dir']); ?>/<?php echo urldecode($curr_image['filename']); ?>" rel="lightbox">
<img src="gallery/<?php echo urldecode($curr_image['dir']); ?>/<?php echo urldecode($curr_image['filename']); ?>" width="<?php echo $img_width; ?>px" border="0">
</a>
</div>
</div>

<div class="title"><?php echo $curr_image['title']; ?></div>
<?php echo $current_image_description;?>


<div class="footer">
<div class="thumb_wrapper prev">
<div class="content">
<div class="shadow">&nbsp;</div>
<div class="thumb">
<?php if($current_key != 0){ ?>
<a href="?dir=<?php echo urlencode($prev_image['dir']); ?>&pic=<?php echo urlencode($prev_image['title']);?>" title="<?php echo $prev_image['title'];?>"><img src="<?php echo $prev_image['thumb'];?>" border="0"/></a>
<?php }else{ ?>
<img src="templates/default/first.jpg">
<?php } ?>
</div>
</div>
</div>

<div class="desc">
<ul>
<li><b>Filename :</b> <?php echo $curr_image['filename']; ?></li>
<li><b>Original Size :</b> <?php echo $curr_image['width']; ?>x<?php echo $curr_image['height']; ?> </li>
<li><b>Uploaded :</b> <?php echo date('l, j F Y',$curr_image['modified']); ?></li>
<li><b>Filesize :</b> <?php echo number_format($curr_image['filesize']/1024, 2, '.', '').' kb'; ?></li>
</ul>
</div>
<div class=
Petr B.
Profil *
zjistil jsem že za to může IC lišta...viz IC


<script type="text/javascript">
function popup_latestupdate() {
newwindow2=window.open('','name','height=270,width=150');
var tmp = newwindow2.document;
tmp.write('<html><head><title>Latest Added Photos</title>');
tmp.write('<style type="text/css">html, body {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #494949; background-color:#DDDDDD; text-align:center;}</style>');
tmp.write('</head><body>
<!-- IClista -->
<script type="text/javascript" src="http://img.ic.cz/3/lista.black.iso.js"></script>
<noscript>
<div style="display:block !important;visibility:visible !important;overflow:hidden;position:absolute;top:0px;left:0px;height:2 4px;z-index:20;width:100%">
<div style="display:block !important;visibility:visible !important;font-family:arial;font-size:11px;text-align:center;height:2 4px;color:#ffffff;background-color:#000000;z-index:15;line-height:24px ;">
<p style="margin:0 !important;padding:0 6px 0 0 !important;display:inline !important;"></p>
<a title="Najděte si lepší práci!" href="http://www.jobpilot.cz/">Práce, brigády</a> | <a title="Nejlevnejsi letenky nejen pro studenty" href="http://letenky.studentagency.cz/letenky/">Nejlevnejsi letenky</a> | <a title="Sázení na sport po internetu - získejte bonus až 1000 Kč!" href="http://adserver.itsfogo.com/click.aspx?zoneid=21448">Sázení na sport</a> | <a title="Hosting za super ceny." href="http://www.forpsi.com/">Webhosting od 19 Kč</a> | <a title="Nejlevnější pneumatiky a disky" href="http://www.dobrepneu.cz/">Dobré pneu</a> | <a title="Registrace domén .CZ za 440,- Kč na rok!" href="http://www.forpsi.com/">Doména .CZ za 440 Kč!</a> | <a title="Široký výběr LCD televizorů." href="http://www.videoplaneta.cz/b/lcd-televize/">LCD televize</a> | <a title="Královna mezi rezervačními systémy letenek!" href="http://www.kralovna.cz/">Letenky Královna</a> | <a title="Vložte si svůj profesní životopis zdarma!" href="http://www.jobpilot.cz/content/service/myjobpilot/enter_cv.html" >Vložte svůj životopis</a> |
</div>
</div>
<div style="height:24px;display:block !important;visibility:visible !important; width:24px"></div></noscript>
<!-- /IClista --><p><b>Notes About Latest Added Photos</b></p>');
tmp.write('The latest photos list are based on File Creation Date/Time in UNIX timestamp format, and after thumbnail image created.<br />On Windows platform, see file 'Properties' and 'File Created' attribute.<br /><br />PHP Ref : filectime();');
tmp.write('<p><a href="javascript:self.close()">Close</a></p>');
tmp.write('</body></html>');
tmp.close();
}

</script>



A wz:




<script type="text/javascript">
function popup_latestupdate() {
newwindow2=window.open('','name','height=270,width=150');
var tmp = newwindow2.document;
tmp.write('<html><head><title>Latest Added Photos</title>');
tmp.write('<style type="text/css">html, body {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #494949; background-color:#DDDDDD; text-align:center;}</style>');
tmp.write('</head><body><p><b>Notes About Latest Added Photos</b></p>');
tmp.write('The latest photos list are based on File Creation Date/Time in UNIX timestamp format, and after thumbnail image created.<br />On Windows platform, see file 'Properties' and 'File Created' attribute.<br /><br />PHP Ref : filectime();');
tmp.write('<p><a href="javascript:self.close()">Close</a></p>');
tmp.write('</body></html>');
tmp.close();
}
</script>

...Jenže nevím co s tím...:(....Nepomůže někdo???
Toto téma je uzamčeno. Odpověď nelze zaslat.

0