Bilder brandmarken

Dieses Thema im Forum "Webentwicklung" wurde erstellt von White_Angel, 10. April 2007 .

Schlagworte:
  1. 10. April 2007
    Hey,
    ich habe auf anderen Seiten gesehen das man seine Bilder brandmarken kann also
    wenn jemand was hochläd also ein bild das da unten z.b. der name deiner Seite steht als schutz oder zu sagen das es von meiner seite kommt...

    weiß jemand wie das geht ?? sowas könnte ich für meine Gallery gebrauchen
     
  2. 10. April 2007
    AW: Bilder brandmarken

    Sowas nennt sich Wasserzeichen

    [G]PHP Wasserzeichen[/G] oder webmaster-resource.de
     
  3. 10. April 2007
    AW: Bilder brandmarken

    Aehm sorry,
    gibst da auch noch eine andere Möglichkeit? Bin da sehr dran interessiert.
    greetz
    Schlimm
     
  4. 10. April 2007
    Zuletzt von einem Moderator bearbeitet: 15. April 2017
    AW: Bilder brandmarken

    Methode 1:
    Auf deinem PC als Stapelverarbeitung alle Fotos mit Wasserzeichen versehen.
    Siehe hier (eins meiner wenigen Post in der Grafik-Abteilung )

    Methode 2:
    Beim Hochladen dem Server die Aufgabe überlassen.
    Siehe hier
     
  5. 10. April 2007
    AW: Bilder brandmarken

    Gut ich nehme mal das hier

    Code:
     1.
     <?php
     2.
     
     3.
     $Grafik = ImageCreateFromJPEG("grafik.jpg");
     4.
     $Wasserzeichen = ImageCreateFromPNG("wasserzeichen.png");
     5.
     
     6.
     ImageCopy($Grafik, $Wasserzeichen, imagesx($Grafik)-imagesx($Wasserzeichen), imagesy($Grafik)-imagesy($Wasserzeichen), 0, 0, imagesx($Wasserzeichen), imagesy($Wasserzeichen));
     7.
     
     8.
     imagejpeg($Grafik);
     9.
     
     10.
     ?>
    und ich möchte das hier einbinden

    Code:
    <?php
    /*
     ########################################################################
    # #
    # Version 4 / / / #
    # -----------__---/__---__------__----__---/---/- #
    # | /| / /___) / ) (_ ` / ) /___) / / #
    # _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
    # Free Content / Management System #
    # / #
    # #
    # #
    # Copyright 2005-2006 by webspell.org / webspell.info #
    # #
    # visit webSPELL.org, webspell.info to get webSPELL for free #
    # - Script runs under the GNU GENERAL PUBLIC LICENCE #
    # - It's NOT allowed to remove this copyright-tag #
    # -- http://www.fsf.org/licensing/licenses/gpl.html #
    # #
    # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
    # Far Development by Development Team - webspell.org / webspell.info #
    # #
    # visit webspell.org / webspell.info #
    # #
    # visit www.webspell.de.tt for addons #
    # #
     ########################################################################
    */
    
    $galclass = new Gallery;
    
    if($userID) {
    
    if($_POST['save']) {
     if($_POST['name']) safe_query("INSERT INTO ".PREFIX."gallery ( name, date, userID ) values( '".$_POST['name']."', '".time()."', '".$userID."' ) ");
     else redirect('index.php?site=usergallery&action=add','Bitte geben Sie einen Namen ein!');
    }
    elseif($_POST['saveedit']) {
     safe_query("UPDATE ".PREFIX."gallery SET name='".$_POST['name']."' WHERE galleryID='".$_POST['galleryID']."' AND userID='".$userID."'");
    }
    elseif($_POST['saveform']) {
     
     $dir = 'images/gallery/';
     $picture = $_FILES[picture];
    
     if($picture[name] != "") {
    
     if($_POST['name']) $insertname = $_POST['name'];
     else $insertname = $picture[name];
     safe_query("INSERT INTO ".PREFIX."gallery_pictures ( galleryID, name, comment, comments) VALUES ('".$_POST['galleryID']."', '".$insertname."', '".$_POST['comment']."', '".$_POST['comments']."' )");
    
     $typ = getimagesize($picture[tmp_name]);
     switch ($typ[2]) {
     case 1: $typ = '.gif'; break;
     case 2: $typ = '.jpg'; break;
     }
    
     $insertid = mysql_insert_id();
     move_uploaded_file($picture[tmp_name], $dir.'large/'.$insertid.$typ);
     $galclass->savethumb($dir.'large/'.$insertid.$typ, $dir.'thumb/'.$insertid.'.jpg'); 
     
     if( ($galclass->getuserspace($userID)+filesize($dir.'large/'.$insertid.$typ) + filesize($dir.'thumb/'.$insertid.'.jpg')) > $maxusergalleries ) {
     @unlink($dir.'large/'.$insertid.$typ);
     @unlink($dir.'thumb/'.$insertid.'.jpg'); 
     safe_query("DELETE FROM ".PREFIX."gallery_pictures WHERE picID='".$insertid."'");
     echo '<p style="color:'.$loosecolor.'">Es ist kein Speicher mehr vorhanden: Abbruch.</p>';
     }
     }
    }
    elseif($_GET['delete']) {
     //SQL
     if(safe_query("DELETE FROM ".PREFIX."gallery WHERE galleryID='".$_GET['galleryID']."' AND userID='".$userID."'")) {
     //FILES
     $ergebnis=safe_query("SELECT picID FROM ".PREFIX."gallery_pictures WHERE galleryID='".$_GET['galleryID']."'");
     while($ds=mysql_fetch_array($ergebnis)) {
     @unlink('images/gallery/thumb/'.$ds[picID].'.jpg'); //thumbnails
     $path = 'images/gallery/large/';
     if(file_exists($path.$ds[picID].'.jpg')) $path = $path.$ds[picID].'.jpg';
     else $path = $path.$ds[picID].'.gif';
     @unlink($path); //large
     safe_query("DELETE FROM ".PREFIX."comments WHERE parentID='".$ds[picID]."' AND type='ga'");
     }
     safe_query("DELETE FROM ".PREFIX."gallery_pictures WHERE galleryID='".$_GET['galleryID']."'");
     }
    }
    
    echo'<h2>Usergalerien</h2>';
    if($_GET['action']=="add") {
    
     echo'<table cellpadding="4" cellspacing="0">
     <form method="post" action="index.php?site=usergallery">
     <tr>
     <td>Galerie-Name:</td>
     <td><input type="text" name="name" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'"></td>
     </tr>
     <tr>
     <td>Gruppe:</td>
     <td>User-Galerie</td>
     </tr>
     <tr>
     <td>&nbsp;</td>
     <td><input type="submit" name="save" value="Galerie hinzuf&uuml;gen"></td>
     </tr>
     </form>
     </table>';
    }
    elseif($_GET['action']=="edit") {
    
     $ergebnis=safe_query("SELECT * FROM ".PREFIX."gallery WHERE galleryID='".$_GET['galleryID']."' AND userID='".$userID."'");
     $ds=mysql_fetch_array($ergebnis);
    
     echo'<table cellpadding="4" cellspacing="0">
     <form method="post" action="index.php?site=usergallery">
     <tr>
     <td>Gruppen-Name:</td>
     <td><input type="text" name="name" value="'.$ds[name].'" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'"></td>
     </tr>
     <tr>
     <td>Gruppe:</td>
     <td>User-Galerie</td>
     </tr>
     <tr>
     <td><input type="hidden" name="galleryID" value="'.$ds[galleryID].'"></td>
     <td><input type="submit" name="saveedit" value="update"></td>
     </tr>
     </form>
     </table>';
    }
    elseif($_GET['action']=="upload") {
    
     $id=$_GET['galleryID'];
    
     echo'<table cellpadding="4" cellspacing="0">
     <form method="post" action="index.php?site=usergallery" enctype="multipart/form-data">
     <tr>
     <td>Name:</td>
     <td><input type="text" name="name" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'"></td>
     </tr>
     <tr>
     <td>Kommentar:</td>
     <td><input type="text" name="comment" size="50" maxlength="255" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'"></td>
     </tr>
     <tr>
     <td>Besucherkommentare:</td>
     <td><select name="comments"><option value="0">Kommentare sperren</option><option value="1" selected>Userkommentare zulassen</option><option value="2">Besucherkommentare zulassen</option></select></td>
     </tr>
     <tr>
     <td>Bild:</td>
     <td><input name="picture" type="file" class="form_off"></td>
     </tr>
     <tr>
     <td><input type="hidden" name="galleryID" value="'.$id.'"></td>
     <td><input type="submit" name="saveform" value="Bild hinzuf&uuml;gen"></td>
     </tr>
     </form>
     </table>';
    
    
    
    }
    else {
     
     $size = $galclass->getuserspace($userID);
     $percent = percent($size, $maxusergalleries, 0);
     
     if($percent>95) $color = $loosecolor;
     else $color = $wincolor;
     
     $bg1=BG_1;
     $bg2=BG_2;
     $pagebg=PAGEBG;
     $border=BORDER;
     $bghead=BGHEAD;
     $bgcat=BGCAT;
    
     
     echo'<br>
     <table border="0" width="100%">
     <tr>
     <td width="50%"><input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=usergallery&action=add\');return document.MM_returnValue" value="Galerie hinzuf&uuml;gen"></td>
     <td>
     <table width="104" cellspacing="1" cellpadding="1" bgcolor="'.$border.'">
     <tr bgcolor="'.$bg1.'">
     <td background="images/icons/poll_bg.gif"><img src="images/icons/poll.gif" width="'.$percent.'" height="5"></td>
     </tr>
     </table>
     </td>
     <td><span style="color:'.$color.'">&nbsp;'.round($size/(1024*1024),2).' Megabyte</span> von '.round($maxusergalleries/(1024*1024),2).' Megabyte in Verwendung.</span></td>
     </tr>
     </table>';
    
     $ergebnis=safe_query("SELECT * FROM ".PREFIX."gallery WHERE userID='".$userID."'");
     echo'<table width="100%" cellpadding="2" cellspacing="1" bgcolor="'.$border.'">
     <form method="post" name="ws_gallery" action="index.php?site=usergallery">
     <tr>
     <td class="title" align="center">Galerie-Name:</td>
     <td class="title" align="center" colspan="3">Optionen:</td>
     </tr>
     <tr bgcolor="'.$pagebg.'">
     <td colspan="4"></td>
     </tr>';
     for($i=1;$ds=mysql_fetch_array($ergebnis);$i++) {
     if($i%2) $bg=$bg1;
     else $bg=$bg2;
     echo'<tr bgcolor="'.$bg.'">
     <td><a href="index.php?site=gallery&galleryID='.$ds[galleryID].'"><b>'.$ds[name].'</b></a></td>
     <td align="center"><input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=usergallery&action=upload&upload=form&galleryID='.$ds[galleryID].'\');return document.MM_returnValue" value="Bild hinzuf&uuml;gen"></td>
     <td align="center"><input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=usergallery&action=edit&galleryID='.$ds[galleryID].'\');return document.MM_returnValue" value="bearbeiten"></td>
     <td align="center"><input type="button" class="button" onClick="MM_confirm(\'Diese Kategorie wirklich entfernen?\', \'index.php?site=usergallery&delete=true&galleryID='.$ds[galleryID].'\')" value="entfernen"></td>
     </tr>';
     }
     if($i==1) echo '<tr bgcolor="'.$bg1.'"><td colspan="4">Keine Galerien vorhanden.</td></tr>';
     echo '</form></table>';
    }
    
    } else redirect('index.php?site=login','',0);
    ?>
    
    da ist nen action code wo das mit dem hochladen ist...oder ist das die falsche datei ?
     
  6. 10. April 2007
    AW: Bilder brandmarken

    Schau mal in deinen Webspell Ordner nach der Datei picture.php, wenn die Datei vorhanden ist mach davon ein Backup und lösche sie. Nun erstellt du eine neue picture.php und fügst dort folgenden Code ein:

    PHP:
    <? php
    error_reporting
    ( E_ALL );

    if(
    phpversion () <  "4.3.0" ) {
     function 
    file_get_contents ( $file )
     {
      
    $fd  fopen ( " $file " "rb" );
      
    $content  fread ( $fd filesize ( $file ));
      
    fclose ( $fd );
      return 
    $content ;
     }
    }

    if(
    file_exists ( 'images/gallery/large/' . $_GET [ 'id' ]. '.jpg' ))  $dest  imagecreatefromjpeg ( 'images/gallery/large/' . $_GET [ 'id' ]. '.jpg' );
    elseif(
    file_exists ( 'images/gallery/large/' . $_GET [ 'id' ]. '.gif' ))  $dest  imagecreatefromjpeg ( 'images/gallery/large/' . $_GET [ 'id' ]. '.gif' );
    elseif(
    file_exists ( 'images/gallery/large/' . $_GET [ 'id' ]. '.png' ))  $dest  imagecreatefromjpeg ( 'images/gallery/large/' . $_GET [ 'id' ]. '.png' );

    # Wasserzeichen Config
    $wasserzeichen_img = "wasserzeichen.gif" ;
    $crandx = 0 ;
    $crandy = 0 ;

    $wasserzeichen  imageCreateFromGIF ( $wasserzeichen_img );
    $xcpos = 0 + $crandx ;
    $ycpos = imageSY ( $dest )- imageSY ( $wasserzeichen )- $crandy ;
    imageCopyMerge ( $dest $wasserzeichen $xcpos $ycpos 0 0 imageSX ( $wasserzeichen ),  imageSY ( $wasserzeichen ),  100 );

    Header ( "Content-type: image/gif" );
    imageinterlace  ( $dest , 1 );
    imagejpeg ( $dest );
    imagedestroy ( $dest );
    imagedestroy ( $dest );

    ?>
    Dann machst du noch ein Bild im gif Format (bei anderen Dateitypen muss du dann auch noch den Header ändern / anpassen) und nennst es wasserzeichen.gif. Dann lade ein Bild in deiner Gallery hoch und nun sollte es das Wasserzeichen beinhalten.
     
  7. 11. April 2007
    AW: Bilder brandmarken

    geht nicht die bilder können nicht angezeigt werden
    habe ein beliebiges gif bild genommen und in Gallery abgespeichert um zu testen geht net :/
     
  8. 11. April 2007
    AW: Bilder brandmarken

    Habe es gerade getestet und bei mir funktioniert es. Kann sein das dir eine Datei fehlt, das weiß ich jetzt aber nicht. Werde heute Nachmittag oder heute Abend nochmal nachsehen und dir bescheid geben.
     
  9. 11. April 2007
    AW: Bilder brandmarken

    Also ich habe
    "webSPELL4.01.05de" <- kann ja sein das es an der version liegt aber bei mir sind alle daten da
     
  10. 11. April 2007
    AW: Bilder brandmarken

    gallery.php
    PHP:
    <? php
    //Options

    $galleries_per_row  1 ;
    $pics_per_row  2 ;

    //Script

    $dir = 'images/gallery/' ;

    $bgcat  BGCAT ;
    $pagebg  PAGEBG ;

    if(
    $_POST [ 'saveedit' ]) {
        
        include(
    '_mysql.php' );    
        include(
    '_settings.php' );    
        include(
    '_functions.php' );

        
    $galclass  = new  Gallery ;
        
        
    $ds = mysql_fetch_array ( safe_query ( "SELECT galleryID FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_POST [ 'picID' ]. "'" ));
        
        if((
    isgalleryadmin ( $userID ) OR  $galclass -> isgalleryowner ( $ds [ 'galleryID' ],  $userID )) AND  $_POST [ 'picID' ]) {
        
            
    safe_query ( "UPDATE " . PREFIX . "gallery_pictures SET name='" . $_POST [ 'name' ]. "', comment='" . $_POST [ 'comment' ]. "' WHERE picID='" . $_POST [ 'picID' ]. "'" );
            if(
    $_POST [ 'reset' ])  safe_query ( "UPDATE " . PREFIX . "gallery_pictures SET views='0' WHERE picID='" . $_POST [ 'picID' ]. "'" );
        
        } else 
    redirect ( 'index.php?site=gallery' , 'No picture set.' );
        
        
    redirect ( 'index.php?site=gallery&picID=' . $_POST [ 'picID' ], '' , 0 );
            

    elseif(
    $_GET [ 'action' ] ==  "edit" ) {
        
        if(
    $_GET [ 'id' ]) {    
            
            
    $ds  mysql_fetch_array ( safe_query ( "SELECT * FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_GET [ 'id' ]. "'" ));
            
            
    $picID  $_GET [ 'id' ];
            
            eval (
    "\$gallery = \"" . gettemplate ( "gallery_edit" ). "\";" );
            echo 
    $gallery ;
            
        } else 
    redirect ( 'index.php?site=gallery' , 'No picture set.' );
        
    }
    elseif(
    $_GET [ 'action' ] ==  "delete" ) {
        
        include(
    '_mysql.php' );    
        include(
    '_settings.php' );    
        include(
    '_functions.php' );

        
    $galclass  = new  Gallery ;

        
    $ds = mysql_fetch_array ( safe_query ( "SELECT galleryID FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_GET [ 'id' ]. "'" ));
        
        if((
    isgalleryadmin ( $userID ) OR  $galclass -> isgalleryowner ( $ds [ 'galleryID' ],  $userID )) AND  $_GET [ 'id' ]) {
            
            
    $ds  mysql_fetch_array ( safe_query ( "SELECT galleryID FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_GET [ 'id' ]. "'" ));
            
            
    //delete thumb
            
            
    @ unlink ( $dir . 'thumb/' . $_GET [ 'id' ]. '.jpg' );
            
            
    //delete original
            
            
    if( file_exists ( $dir . 'large/' . $_GET [ 'id' ]. '.jpg' )) @ unlink ( $dir . 'large/' . $_GET [ 'id' ]. '.jpg' );
            else @
    unlink ( $dir . 'large/' . $_GET [ 'id' ]. '.gif' );
            
            
    //delete database entry
            
            
    safe_query ( "DELETE FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_GET [ 'id' ]. "'" );
          
    safe_query ( "DELETE FROM " . PREFIX . "comments WHERE parentID='" . $_GET [ 'id' ]. "' AND type='ga'" );            
        }
        
    redirect ( 'index.php?site=gallery&galleryID=' . $ds [ galleryID ], '' , 0 );    
    }
    elseif(
    $_GET [ 'action' ] ==  "diashow"  OR  $_GET [ 'action' ] ==  "window" ) {
        
        include(
    '_mysql.php' );    
        include(
    '_settings.php' );    
        include(
    '_functions.php' );
        
        if(!
    $_GET [ 'picID' ])    {
            
    $result  mysql_fetch_array ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET [ 'galleryID' ]. "' ORDER BY picID ASC LIMIT 0,1" ));
            
    $picID  $result [ picID ];
        } else 
    $picID  $_GET [ 'picID' ];
        
        
    //get name+comment
        
    $ds  mysql_fetch_array ( safe_query ( "SELECT name, comment FROM " . PREFIX . "gallery_pictures WHERE picID=" . $picID . "" ));
        
        echo 
    '<html><head><title>webSPELL Diashow: ' . $ds [ name ]. '</title><link href="_stylesheet.css" rel="stylesheet" type="text/css"> ' ;
        
        
    //get next
        
        
    $browse = mysql_fetch_array ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET [ 'galleryID' ]. "' AND picID>" . $picID . " ORDER BY picID ASC LIMIT 0,1" ));
        if(
    $browse [ picID ] AND  $_GET [ 'action' ] ==  "diashow" ) echo  '<meta http-equiv="refresh" content="2;URL=gallery.php?action=diashow&galleryID=' . $_GET [ 'galleryID' ]. '&picID=' . $browse [ picID ]. '">' ;
        
        echo 
    '</head><body><center>' ;
        
        if(
    $_GET [ 'action' ] ==  "diashow" ) {
            if(
    $browse [ picID ]) {
                echo 
    '<a href="gallery.php?action=diashow&galleryID=' . $_GET [ 'galleryID' ]. '&picID=' . $browse [ picID ]. '">' ;
                
    safe_query ( "UPDATE " . PREFIX . "gallery_pictures SET views=views+1 WHERE picID='" . $picID . "'" );
            }    
        } else echo 
    '<a href="javascript:close()">' ;
        
        
    //output image
        
        
    echo  '<img src="picture.php?id=' . $picID . '" border="0"><br><b>' . cleartext ( $ds [ comment ],  false ). '</b></b>' ;
        
        if(
    $browse [ picID ] OR  $_GET [ 'action' ] ==  "window" ) echo  '</a>' ;
        
        echo 
    '</center></body></html>' ;

    }
    elseif(
    $_GET [ 'picID' ]) {
        
        
    $galclass  = new  Gallery ;
        
        eval (
    "\$gallery = \"" . gettemplate ( "title_gallery" ). "\";" );
        echo 
    $gallery ;
        
        
    safe_query ( "UPDATE " . PREFIX . "gallery_pictures SET views=views+1 WHERE picID='" . $_GET [ 'picID' ]. "'" );
        
        
    $ds = mysql_fetch_array ( safe_query ( "SELECT * FROM " . PREFIX . "gallery_pictures WHERE picID='" . $_GET [ 'picID' ]. "'" ));
        
        
    $picturename  clearfromtags ( $ds [ name ]);
        
    $picID  $ds [ picID ];
        
        
    $picture = $galclass -> getlargefile ( $picID );
        
        
    $picinfo  getimagesize ( $picture );
        
    $xsize = $picinfo [ 0 ];
        
    $ysize = $picinfo [ 1 ];
        
        
    $xwindowsize = $xsize + 30 ;
        
    $ywindowsize = $ysize + 30 ;
        
        
    $comment  cleartext ( $ds [ comment ],  false );
        
    $views  $ds [ views ];
        
        if(
    $xsize > $picsize_l $width = 'width="' . $picsize_l . '"' ;
        else 
    $width = 'width="' . $xsize . '"' ;
        
        
    $filesize  round ( filesize ( $picture )/ 1024 , 1 );

        
    //next picture
        
    $browse = mysql_fetch_array ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $ds [ galleryID ]. "' AND picID>" . $ds [ picID ]. " ORDER BY picID ASC LIMIT 0,1" ));
        if(
    $browse [ picID ])  $forward  '<a href="index.php?site=gallery&picID=' . $browse [ picID ]. '#picture">Next</a>' ;

        
    $browse = mysql_fetch_array ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $ds [ galleryID ]. "' AND picID<" . $ds [ picID ]. " ORDER BY picID DESC LIMIT 0,1" ));
        if(
    $browse [ picID ])  $backward  '<a href="index.php?site=gallery&picID=' . $browse [ picID ]. '#picture">Back</a>' ;
        
        
    //rateform
        
        
    if( $loggedin ) {

             
    $getgallery = safe_query ( "SELECT gallery_pictures FROM " . PREFIX . "user WHERE userID='" . $userID . "'" );
              
    $found = false ;
             if(
    mysql_num_rows ( $getgallery )) {
              
    $ga = mysql_fetch_array ( $getgallery );
                if(
    $ga [ gallery_pictures ]!= "" ) {
                 
    $string = $ga [ gallery_pictures ];
                   
    $array = explode ( ":" $string );
                    
    $anzarray = count ( $array );
               for(
    $i = 0 $i < $anzarray $i ++) {
                       if(
    $array [ $i ]== $_GET [ 'picID' ])  $found = true ;
                  }
                  }
             }
             
             if(
    $found $rateform = "<i>You have already rated.</i>" ;
             else 
    $rateform = '<form method="post" name="rating_picture' . $_GET [ 'picID' ]. '" action="rating.php">Rate now! <select name="rating">
                          <option>0 - poor</option>
                          <option>1</option>
                          <option>2</option>
                          <option>3</option>
                          <option>4</option>
                          <option>5</option>
                          <option>6</option>
                         <option>7</option>
                          <option>8</option>
                          <option>9</option>
                          <option>10 - perfect</option>
                          </select>
                            <input type="hidden" name="userID" value="'
    . $userID . '">
                            <input type="hidden" name="type" value="ga">
                            <input type="hidden" name="id" value="'
    . $_GET [ 'picID' ]. '">
                             <input type="submit" name="Submit" value="rate"></form>'
    ;
                             
      } else 
    $rateform  '<i>Rate: You have to register or login!</i>' ;
      
      
    $votes = $ds [ votes ];
      
        unset(
    $ratingpic );
      
    $ratings =array( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 );
        for(
    $i = 0 $i < $ds [ rating ];  $i ++) {
          
    $ratings [ $i ]= 1 ;
        }
        
    $ratingpic = '<img src="images/icons/rating_' . $ratings [ 0 ]. '_start.gif" width="1" height="5">' ;
        foreach(
    $ratings  as  $pic ) {
          
    $ratingpic .= '<img src="images/icons/rating_' . $pic . '.gif" width="4" height="5">' ;
        }

      
    //admin
      
      
    if(( isgalleryadmin ( $userID ) AND  $publicadmin ) OR  $galclass -> isgalleryowner ( $ds [ 'galleryID' ], $userID )) {
          
          
    $adminaction  '<input type="button" class="button" onClick="MM_goToURL(\'parent\',\'index.php?site=gallery&action=edit&id=' . $_GET [ 'picID' ]. '\');return document.MM_returnValue" value="Edit"> <input type="button" class="button" onClick="MM_confirm(\'really delete this entry?\', \'gallery.php?action=delete&id=' . $_GET [ picID ]. '\')" value="delete">' ;
          
          
      }

        
    //group+gallery

        
    $gallery  '<a href="index.php?site=gallery&galleryID=' . $ds [ galleryID ]. '" class="titlelink">' . $galclass -> getgalleryname ( $_GET [ 'picID' ]). '</a>' ;    
         if(
    $galclass -> getgroupid_by_gallery ( $ds [ galleryID ]))  $group  '<a href="index.php?site=gallery&groupID=' . $galclass -> getgroupid_by_gallery ( $ds [ galleryID ]). '" class="titlelink">' . $galclass -> getgroupname ( $galclass -> getgroupid_by_gallery ( $ds [ galleryID ])). '</a>' ;
         else 
    $group  '<a href="index.php?site=profile&action=galleries&id=' . $galclass -> getgalleryowner ( $ds [ galleryID ]). '" class="titlelink">' . getnickname ( $galclass -> getgalleryowner ( $ds [ galleryID ])). '</a>' ;
            
        eval (
    "\$gallery = \"" . gettemplate ( "gallery_comments" ). "\";" );
        echo 
    $gallery ;
        
        
    //comments
        
        
    $comments_allowed  $ds [ comments ];
        
    $parentID  $ds [ picID ];
        
    $type  "ga" ;
        
    $referer  "index.php?site=gallery&picID=" . $ds [ picID ];
        
        include(
    "comments.php" );
    }
    elseif(
    $_GET [ 'galleryID' ]) {
        
        
    $galclass  = new  Gallery ;

        eval (
    "\$gallery = \"" . gettemplate ( "title_gallery" ). "\";" );
        echo 
    $gallery ;

        
    $ds = mysql_fetch_array ( safe_query ( "SELECT name FROM " . PREFIX . "gallery WHERE galleryID='" . $_GET [ 'galleryID' ]. "'" ));
        
    $title  $ds [ name ];
         
    $pics  mysql_num_rows ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET [ 'galleryID' ]. "'" ));
         
    $pages  ceil ( $pics / $gallerypictures );
         
    $gallery [ galleryID ]= $_GET [ 'galleryID' ];
         if(
    $galclass -> getgroupid_by_gallery ( $_GET [ 'galleryID' ]))  $group  '<a href="index.php?site=gallery&groupID=' . $galclass -> getgroupid_by_gallery ( $_GET [ 'galleryID' ]). '" class="titlelink">' . $galclass -> getgroupname ( $galclass -> getgroupid_by_gallery ( $_GET [ 'galleryID' ])). '</a>' ;
         else 
    $group  '<a href="index.php?site=profile&action=galleries&id=' . $galclass -> getgalleryowner ( $_GET [ 'galleryID' ]). '" class="titlelink">' . getnickname ( $galclass -> getgalleryowner ( $_GET [ 'galleryID' ])). '</a>' ;
         
         if(!
    $_GET [ 'page' ])  $page  1 ;
         else 
    $page  $_GET [ 'page' ];
         
         if(
    $pages > 1 $pagelink  makepagelink ( "index.php?site=gallery&galleryID=" . $_GET [ 'galleryID' ],  $page $pages );
        else 
    $pagelink  '<img src="images/icons/multipage.gif" width="10" height="12"> <span class="small">page 1 of 1</span>' ;
        
         eval (
    "\$gallery = \"" . gettemplate ( "gallery_gallery_head" ). "\";" );
         echo 
    $gallery ;
         
         if (
    $page  ==  "1" ) {
            
    $ergebnis  safe_query ( "SELECT * FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET [ 'galleryID' ]. "' ORDER BY picID LIMIT 0, $gallerypictures " );
        }
        else {
            
    $start = $page * $gallerypictures - $gallerypictures ;
            
    $ergebnis  safe_query ( "SELECT * FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $_GET [ 'galleryID' ]. "' ORDER BY picID LIMIT  $start , $gallerypictures " );
        }
         
         echo 
    '<tr height="100%">' ;
         
    $i = 1 ;
         
         
    $percent = 100 / $pics_per_row ;
         
         while(
    $pic  mysql_fetch_array ( $ergebnis )) {
                  
             if(
    $i % 2 $bg = BG_2 ;
             else 
    $bg = BG_1 ;

             
    $pic [ pic ] =  $dir . 'thumb/' . $pic [ picID ]. '.jpg' ;
             if(!
    file_exists ( $pic [ pic ]))  $pic [ pic ] =  'images/nopic.gif' ;
             
    $pic [ name ] =  clearfromtags ( $pic [ name ]);
             
    $pic [ comment ] =  cleartext ( $pic [ comment ],  false );
             
    $pic [ comments ] =  mysql_num_rows ( safe_query ( "SELECT commentID FROM " . PREFIX . "comments WHERE parentID='" . $pic [ picID ]. "' AND type='ga'" ));
                 
            eval (
    "\$gallery = \"" . gettemplate ( "gallery_showlist" ). "\";" );
             echo 
    $gallery ;
             
            if(
    $pics_per_row > 1 ) { 
                if((
    $i - 1 )% $pics_per_row ) echo  '</tr><tr height="100%">' ; }
            else echo 
    '</tr><tr height="100%">' ;
            
    $i ++;
         }
         if(!(
    $i % 2 )) echo  '<td bgcolor="' . $bgcat . '">&nbsp;</td>' ;
         
         echo 
    '</tr>' ;

        eval (
    "\$gallery = \"" . gettemplate ( "gallery_gallery_foot" ). "\";" );
         echo 
    $gallery ;
        

    }
    elseif(
    $_GET [ 'groupID' ]) {
        
        
    $galclass  = new  Gallery ;

        eval (
    "\$gallery = \"" . gettemplate ( "title_gallery" ). "\";" );
        echo 
    $gallery ;
        
         
    $galleries  mysql_num_rows ( safe_query ( "SELECT galleryID FROM " . PREFIX . "gallery WHERE groupID='" . $_GET [ 'groupID' ]. "'" ));
         
    $pages  ceil ( $galleries / $gallerypictures );
         
         if(!
    $_GET [ 'page' ])  $page  1 ;
         else 
    $page  $_GET [ 'page' ];
         
         if(
    $pages > 1 $pagelink  makepagelink ( "index.php?site=gallery&groupID=" . $_GET [ 'groupID' ],  $page $pages );
        else 
    $pagelink  '<img src="images/icons/multipage.gif" width="10" height="12"> <span class="small">page 1 of 1</span>' ;
        
         
    $group  $galclass -> getgroupname ( $_GET [ 'groupID' ]);

         eval (
    "\$gallery = \"" . gettemplate ( "gallery_group_head" ). "\";" );
         echo 
    $gallery ;
         
         if (
    $page  ==  "1" ) {
            
    $ergebnis  safe_query ( "SELECT * FROM " . PREFIX . "gallery WHERE groupID='" . $_GET [ 'groupID' ]. "' ORDER BY galleryID DESC LIMIT 0, $gallerypictures " );
        }
        else {
            
    $start = $page * $gallerypictures - $gallerypictures ;
            
    $ergebnis  safe_query ( "SELECT * FROM " . PREFIX . "gallery WHERE groupID='" . $_GET [ 'groupID' ]. "' ORDER BY galleryID DESC LIMIT  $start , $gallerypictures " );
        }
         
         echo 
    '<tr height="100%">' ;
         
    $i = 1 ;
         
         while(
    $gallery  mysql_fetch_array ( $ergebnis )) {
                  
             if(
    $i % 2 $bg = BG_2 ;
             else 
    BG_1 ;
             
             
    $gallery [ picID ] =  $galclass -> randompic ( $gallery [ galleryID ]);         
             
    $gallery [ pic ] =  $dir . 'thumb/' . $gallery [ picID ]. '.jpg' ;
             
    $gallery [ pics ] =  mysql_num_rows ( safe_query ( "SELECT picID FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $gallery [ galleryID ]. "'" ));
             
    $gallery [ date ] =  date ( "d.m.Y - H:i" , $gallery [ date ]);
             if(!
    file_exists ( $gallery [ pic ]))  $gallery [ pic ] =  'images/nopic.gif' ;
                 
            eval (
    "\$gallery = \"" . gettemplate ( "gallery_showlist_group" ). "\";" );
             echo 
    $gallery ;
             
            if(
    $galleries_per_row > 1 ) { if(( $i - 1 )% $galleries_per_row ) echo  '</tr><tr height="100%">' ; }
            else echo 
    '</tr><tr height="100%">' ;

            
    $i ++;
         }
         if(!(
    $i % 2 )) echo  '<td>&nbsp;</td>' ;
         
         echo 
    '</tr>' ;

        eval (
    "\$gallery = \"" . gettemplate ( "gallery_group_foot" ). "\";" );
         echo 
    $gallery ;
         
    }
    else {
        
        
    $galclass  = new  Gallery ;    

        eval (
    "\$gallery = \"" . gettemplate ( "title_gallery" ). "\";" );
        echo 
    $gallery ;
        
        
    //latest gallery
        
    $ds  mysql_fetch_array ( safe_query ( "SELECT galleryID FROM " . PREFIX . "gallery WHERE userID='0' ORDER BY galleryID DESC LIMIT 0,1" ));
        
    $latest  $galclass -> showthumb ( $galclass -> randompic ( $ds [ galleryID ]));

        
    //random    
        
    $random  $galclass -> showthumb ( $galclass -> randompic ());

        
    //top comments
        
    $ds  mysql_fetch_array ( safe_query ( "SELECT parentID, COUNT(parentID) as max FROM " . PREFIX . "comments WHERE type='ga' GROUP BY parentID ORDER BY max DESC LIMIT 0, 1" ));
        if(!
    $ds [ parentID ])  $ds [ parentID ] =  $galclass -> randompic ();
        
    $most_comments  $galclass -> showthumb ( $ds [ parentID ]);
        
        eval (
    "\$gallery = \"" . gettemplate ( "gallery_content_head" ). "\";" );
         echo 
    $gallery ;
         
         
    $ergebnis  safe_query ( "SELECT * FROM " . PREFIX . "gallery_groups" );
         
        eval (
    "\$gallery_all = \"" . gettemplate ( "gallery_all_head" ). "\";" );
        echo 
    $gallery_all ;
        
    $i = 1 ;
         while(
    $ds = mysql_fetch_array ( $ergebnis )) {
             
            
    //$title='<a href="index.php?site=gallery&groupID='.$ds[groupID].'">'.$ds[name].'</a>';
            
    $groupID = $ds [ groupID ];
            
    $groupname = '<a href="index.php?site=gallery&groupID=' . $groupID . '">' . $ds [ name ]. '</a>' ;
            

             
            
    $befehl = safe_query ( "SELECT * FROM " . PREFIX . "gallery WHERE groupID='" . $ds [ groupID ]. "' ORDER BY galleryID DESC" );
             while(
    $gallery  mysql_fetch_array ( $befehl )) {
            
    $i ++;
            if(
    $i % 2 ) {
                
    $bg1 = BG_1 ;
                
    $bg2 = BG_2 ;
            }
            else {
                
    $bg1 = BG_3 ;
                
    $bg2 = BG_4 ;
            }
            
    $galID = $gallery [ galleryID ];
            
    $name = '<a href="index.php?site=gallery&galleryID=' . $galID . '">' . $gallery [ name ]. '</a>' ;
            
    $galanz = mysql_num_rows ( safe_query ( "SELECT * FROM " . PREFIX . "gallery_pictures WHERE galleryID='" . $galID . "' " ));
            eval (
    "\$gallery_all = \"" . gettemplate ( "gallery_all_content" ). "\";" );
            echo 
    $gallery_all ;
            }
             

             
         
    }
        eval (
    "\$gallery_all = \"" . gettemplate ( "gallery_all_bottom" ). "\";" );
        echo 
    $gallery_all ;
         

    }

    ?>
    Ersetzt das Script mal mit der gallery.php.
     
  11. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.