function generateImageArray($sqlResult, $userName, $uID, $softwareRoot) { $res = ""; $sqlResultNumRows = mysql_num_rows($sqlResult); for ($imageArrayIndex = 0; $imageArrayIndex < $sqlResultNumRows; $imageArrayIndex++) { $fileName = mysql_result($sqlResult, $imageArrayIndex, 'FileName'); $fileNamePrefix = str_replace('.jpg', '', $fileName); /* $ratio = (mysql_result($sqlResult, $imageArrayIndex, 'ExifImageWidth') / mysql_result($sqlResult, $imageArrayIndex, 'ExifImageHeight')); if (mysql_result($sqlResult, $imageArrayIndex, 'Orientation') >= '5') { $ratio = 1.0 / $ratio; } */ if (mysql_result($sqlResult, $imageArrayIndex, 'ExifImageHeight') !== '0') { $ratio = mysql_result($sqlResult, $imageArrayIndex, 'ExifImageWidth') / mysql_result($sqlResult, $imageArrayIndex, 'ExifImageHeight'); if (mysql_result($sqlResult, $imageArrayIndex, 'Orientation') >= '5') { $ratio = 1.0 / $ratio; } } else { $ratio = 1; // hier ggf. Mail an Admin versenden } $downloadStatus = 0; //Erzeugung der Download-Icons: $Owner = mysql_result($sqlResult, $imageArrayIndex, 'Owner'); $check = fileExists($fileName, $uID); if ($check > 0) { //Die Datei befindet sich im Download-Ordner des Users und wird mit Klick auf das Icon geloescht: $downloadStatus = 100; } else { //Die Datei befindet sich nicht im Download-Ordner des Users und wird mit Klick auf das Icon dort hin kopiert: if ($uID == $Owner and hasPermission($uID, 'downloadmypics', $softwareRoot) or hasPermission($uID, 'downloadallpics', $softwareRoot)) { if (directDownload($uID, $softwareRoot)) { $downloadStatus = 1; } else { $downloadStatus = 2; } } else { $downloadStatus = 0; } } $res .= 'imageArray.push({fileName: "' . $fileNamePrefix . '", ratio: ' . $ratio . ', id: "' . mysql_result($sqlResult, $imageArrayIndex, 'pic_id') . '", downloadStatus: ' . $downloadStatus . ', Owner: ' . $Owner . '}); '; } return $res; }
getHQPreviewNow($pic_id, $hoehe_neu, $breite_neu, $base_file, isset($kat_id), $mod, $form_name); echo "\n\t\t\t\t</div>\n\t\t\t\t</TD>"; } //Erzeugung der Download-Icons: $Owner = mysql_result($result6, $i6, 'Owner'); //Pruefung, ob diese Datei bereits im Download-Ordner des angemeldeten Users liegt. Wenn nicht: Download-Icon mit link zur Kopier-Routine; wenn ja: selected-Icon mit Link zur L�sch-Routine: $check = fileExists($FileName, $c_username); if ($check > '0') { //Die Datei befindet sich im Download-Ordner des Users und wird mit Klick auf das Icon geloescht: $icon[$i6] = "\n\t\t\t\t<TD align='center' width='43'>\n\t\t\t\t<div id='box{$pic_id}'>\n\t\t\t\t<SPAN style='cursor:pointer;' onClick='delPicture(\"{$FileName}\",\"{$c_username}\",\"{$pic_id}\")'>\n\t\t\t\t<img src='{$inst_path}/pic2base/bin/share/images/selected.gif' width='12' height='12' hspace='0' vspace='0'/>\n\t\t\t\t</SPAN>\t\n\t\t\t\t</div>\n\t\t\t\t</TD>"; } else { //echo $Owner.", ".$user_id; //Die Datei befindet sich nicht im Download-Ordner des Users und wird mit Klick auf das Icon dort hin kopiert: //IF(hasPermission($c_username, 'adminlogin') OR hasPermission($c_username, 'downloadpic')) if ($user_id == $Owner and hasPermission($c_username, 'downloadmypics') or hasPermission($c_username, 'downloadallpics')) { if (directDownload($c_username, $sr)) { $icon[$i6] = "\n\t\t\t\t\t\t<TD align='center'width='43'>\n\t\t\t\t\t\t<div id='box{$pic_id}'>\n\t\t\t\t\t\t<SPAN style='cursor:pointer;' onClick='window.open(\"{$inst_path}/pic2base/bin/share/download_picture.php?FileName={$FileName}&c_username={$c_username}&pic_id={$pic_id}\")'>\n\t\t\t\t\t\t<img src='{$inst_path}/pic2base/bin/share/images/download.gif' width='12' height='12' hspace='0' vspace='0' title='Bild direkt herunterladen'/></SPAN>\n\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t</TD>"; } else { $icon[$i6] = "\n\t\t\t\t\t\t<TD align='center'width='43'>\n\t\t\t\t\t\t<div id='box{$pic_id}'>\n\t\t\t\t\t\t<SPAN style='cursor:pointer;' onClick='copyPicture(\"{$FileName}\",\"{$c_username}\",\"{$pic_id}\")'>\n\t\t\t\t\t\t<img src='{$inst_path}/pic2base/bin/share/images/download.gif' width='12' height='12' hspace='0' vspace='0' title='Bild in den FTP-Download-Ordner kopieren'/></SPAN>\n\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t</TD>"; } } else { $icon[$i6] = "<TD align='center' width='43'><BR></TD>"; } } } //Leer-Raum mit Leer-Zellen auffuellen (Zelle mit Dummy-Bild zur Streckung gefuellt), wenn Bilder gefunden wurden: if ($num6_1 > '0') { for ($i_r = '0'; $i_r < $rest; $i_r++) { echo "<TD align='center' colspan='1'>\n\t\t\t\t<img src='{$inst_path}/pic2base/bin/share/images/no_pic.gif' width='124' height='10' /></TD>"; } }
} else { if (hasPermission($uid, 'addpic', $sr)) { echo "\n\t\t\t\t\t<TR class='normal' style='height:15px;'>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Uploads:</TD>\n\t\t\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:green'>Ihr Upload-Ordner ist leer.</TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR>\n\t\t\t\t\t<TD class='normal' align='center' colspan='10' style='height:30px;'><BR></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<INPUT type='hidden' name='ordner' value='{$ftp_path}/{$uid}/uploads' size='70' readonly>\n\t\t\t\t\t\n\t\t\t\t\t<TR class='normal'>\n\t\t\t\t\t<TD class='normal' align='center' style='height:20px;' colspan='10'> </TD>\n\t\t\t\t\t</TR>"; } else { echo "\n\t\t\t\t\t<TR class='normal' style='height:15px;'>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'><BR></TD>\n\t\t\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:green'><BR></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR>\n\t\t\t\t\t<TD class='normal' align='center' colspan='10' style='height:30px;'><BR></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR class='normal'>\n\t\t\t\t\t<TD class='normal' align='center' style='height:20px;' colspan='10'> </TD>\n\t\t\t\t\t</TR>"; } } if ($m > '0' and (hasPermission($uid, 'downloadmypics', $sr) or hasPermission($uid, 'downloadallpics', $sr)) and !directDownload($uid, $sr)) { $download_path = 'ftp://' . $username . "@" . $_SERVER['SERVER_NAME'] . '/downloads/'; $html_path = 'http://' . $_SERVER['SERVER_NAME'] . $inst_path . "/pic2base/userdata/" . $uid . '/downloads/'; //echo $download_path; echo "\n\t\t\t\t<tr class='normal' style='height:30px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Downloads:</TD>\n\t\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:red';>" . $hinweis3 . "\n\t\t\t\t<a href=" . $download_path . " target='_blank'>" . $download_path . "</a>\n\t\t\t\t</style></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'></TD>\n\t\t\t\t<TD class='normal' align='left' colspan='7'>\n\t\t\t\t<INPUT type='button' tabindex='1' VALUE='Hier klicken, um alle Meta-Informationen aus diesen Dateien vor dem Download zu entfernen' onClick='delAllMetadata(\"{$uid}\")'>\n\t\t\t\t</TD>\n\t\t\t\t</TR>"; } else { if ((hasPermission($uid, 'downloadmypics', $sr) or hasPermission($uid, 'downloadallpics', $sr)) and !directDownload($uid, $sr)) { echo "\n\t\t\t\t\t<tr class='normal' style='height:30px;'>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Downloads:</TD>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green'>Ihr Download-Ordner ist leer.</style></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR class='normal'>\n\t\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t\t</TR>"; } elseif ((hasPermission($uid, 'downloadmypics', $sr) or hasPermission($uid, 'downloadallpics', $sr)) and directDownload($uid, $sr)) { echo "\n\t\t\t\t\t<tr class='normal' style='height:30px;'>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Download-Modus:</TD>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green'>Direkter Download</style></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR class='normal'>\n\t\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t\t</TR>"; } else { echo "\n\t\t\t\t\t<tr class='normal' style='height:30px;'>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'><BR></TD>\n\t\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green'><BR></style></TD>\n\t\t\t\t\t</TR>\n\t\t\t\t\t\n\t\t\t\t\t<TR class='normal'>\n\t\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t\t</TR>"; } } echo "\t<TR class='normal' style='height:35px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>" . $ol_text . "</TD>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7'>" . $online_hinweis . "</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>" . $loesch_text . "</TD>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7'>" . $loesch_hinweis . "</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t</TR>\n\t\t\t\n\t\t\t\t<TR class='normal' style='height:3px;'>\n\t\t\t\t<TD class='normal' align='center' bgcolor='darkred' colspan='10'>\n\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' colspan='10'> \n\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<tr class='normal'>\n\t\t\t\t<td class='normal' align='left' colspan='3'>Die pic2base - TopTen:</TD>\n\t\t\t\t<td class='normal' align='center' colspan='7'></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<tr class='normal'>\n\t\t\t\t<td class='normal' align='center' colspan='10'> \n\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<tr class='normal'>"; for ($i4 = '0'; $i4 < $num4; $i4++) { $file = mysql_result($result4, $i4, 'FileNameHQ'); $ranking = mysql_result($result4, $i4, 'ranking'); //$bild = $pic_hq_path."/".$file; $bild = "http://" . $_SERVER['SERVER_NAME'] . "" . $inst_path . "/pic2base/images/vorschau/hq-preview/" . $file; $param = getimagesize($pic_hq_path . "/" . $file); $width = $param[0]; $height = $param[1]; //echo $bild;
function generateGeoImageArray($pic_id_arr, $userName, $uID, $softwareRoot) { //$start1 = microtime(); //Startzeit-Variable zur Laufzeitermittlung //flush(); include $softwareRoot . '/bin/share/db_connect1.php'; $res = ""; $num_pic = count($pic_id_arr); //Gesamtzahl der gefundenen Bilder for ($imageArrayIndex = 0; $imageArrayIndex < $num_pic; $imageArrayIndex++) { $res1 = mysql_query("SELECT * FROM {$table2} WHERE pic_id = '{$pic_id_arr[$imageArrayIndex]}'"); $fileName = mysql_result($res1, 0, 'FileName'); $fileNamePrefix = str_replace('.jpg', '', $fileName); $ratio = mysql_result($res1, 0, 'ExifImageWidth') / mysql_result($res1, 0, 'ExifImageHeight'); if (mysql_result($res1, 0, 'Orientation') >= '5') { $ratio = 1.0 / $ratio; } $downloadStatus = 0; //Erzeugung der Download-Icons: $Owner = mysql_result($res1, 0, 'Owner'); $check = fileExists($fileNamePrefix, $uID); if ($check > 0) { //Die Datei befindet sich im Download-Ordner des Users und wird mit Klick auf das Icon geloescht: $downloadStatus = 100; } else { //Die Datei befindet sich nicht im Download-Ordner des Users und wird mit Klick auf das Icon dort hin kopiert: if ($uID == $Owner and hasPermission($uID, 'downloadmypics', $softwareRoot) or hasPermission($uID, 'downloadallpics', $softwareRoot)) { if (directDownload($uID, $softwareRoot)) { $downloadStatus = 1; } else { $downloadStatus = 2; } } else { $downloadStatus = 0; } } $res .= 'imageArray.push({fileName: "' . $fileNamePrefix . '", ratio: ' . $ratio . ', id: "' . $fileNamePrefix . '", downloadStatus: ' . $downloadStatus . ', Owner: ' . $Owner . '}); '; } return $res; }
} else { if (hasPermission($c_username, 'addpic')) { echo "\n\t\t\t\t<TR class='normal' style='height:25px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Uploads:</TD>\n\t\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:green';>Ihr Upload-Ordner ist leer.</TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR>\n\t\t\t\t<TD class='normal' align='center' colspan='10' style='height:30px;'><BR></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<INPUT type='hidden' name='ordner' value='{$ftp_path}/{$c_username}/uploads' size='70' readonly>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' style='height:20px;' colspan='10'> </TD>\n\t\t\t\t</TR>"; } else { echo "\n\t\t\t\t<TR class='normal' style='height:25px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'><BR></TD>\n\t\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:green';><BR></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR>\n\t\t\t\t<TD class='normal' align='center' colspan='10' style='height:30px;'><BR></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' style='height:20px;' colspan='10'> </TD>\n\t\t\t\t</TR>"; } } if ($m > '0' and (hasPermission($c_username, 'downloadmypics') or hasPermission($c_username, 'downloadallpics')) and !directDownload($c_username, $sr)) { $download_path = 'ftp://' . $c_username . "@" . $_SERVER['SERVER_NAME'] . '/downloads/'; $html_path = 'http://' . $_SERVER['SERVER_NAME'] . $inst_path . "/pic2base/userdata/" . $c_username . '/downloads/'; //echo $download_path; echo "\n\t\t\t<tr class='normal' style='height:50px;'>\n\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Downloads:</TD>\n\t\t\t<td class='normal' align='left' valign='top' colspan='7' style='color:red';>" . $hinweis3 . "\n\t\t\t<a href=" . $download_path . " target='_blank'>" . $download_path . "</a>\n\t\t\t</style></TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<TR class='normal'>\n\t\t\t<TD class='normal' align='left' valign='top' colspan='3'></TD>\n\t\t\t<TD class='normal' align='left' colspan='7'>\n\t\t\t<INPUT type='button' tabindex='1' VALUE='Hier klicken, um alle Meta-Informationen aus diesen Dateien vor dem Download zu entfernen' onClick='delAllMetadata(\"{$c_username}\")'>\n\t\t\t</TD>\n\t\t\t</TR>"; } else { if ((hasPermission($c_username, 'downloadmypics') or hasPermission($c_username, 'downloadallpics')) and !directDownload($c_username, $sr)) { echo "\n\t\t\t\t<tr class='normal' style='height:50px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Downloads:</TD>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green';>Ihr Download-Ordner ist leer.</style></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t</TR>"; } elseif ((hasPermission($c_username, 'downloadmypics') or hasPermission($c_username, 'downloadallpics')) and directDownload($c_username, $sr)) { echo "\n\t\t\t\t<tr class='normal' style='height:50px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>Download-Modus:</TD>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green';>Direkter Download</style></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t</TR>"; } else { echo "\n\t\t\t\t<tr class='normal' style='height:50px;'>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='3'><BR></TD>\n\t\t\t\t<TD class='normal' align='left' valign='top' colspan='7' style='color:green';><BR></style></TD>\n\t\t\t\t</TR>\n\t\t\t\t\n\t\t\t\t<TR class='normal'>\n\t\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t\t</TR>"; } } echo "\t<TR class='normal' style='height:35px;'>\n\t\t\t<TD class='normal' align='left' valign='top' colspan='3'>" . $ol_text . "</TD>\n\t\t\t<TD class='normal' align='left' valign='top' colspan='7'>" . $online_hinweis . "</TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<TR class='normal'>\n\t\t\t<TD class='normal' align='center' colspan='10'> </TD>\n\t\t\t</TR>\n\t\t\n\t\t\t<TR class='normal' style='height:3px;'>\n\t\t\t<TD class='normal' align='center' bgcolor='#FF9900' colspan='10'>\n\t\t\t</TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<TR class='normal'>\n\t\t\t<TD class='normal' align='center' colspan='10'> \n\t\t\t</TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<tr class='normal'>\n\t\t\t<td class='normal' align='left' colspan='3'>Die pic2base - TopTen:</TD>\n\t\t\t<td class='normal' align='center' colspan='7'></TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<tr class='normal'>\n\t\t\t<td class='normal' align='center' colspan='10'> \n\t\t\t</TD>\n\t\t\t</TR>\n\t\t\t\n\t\t\t<tr class='normal'>"; for ($i4 = '0'; $i4 < $num4; $i4++) { $file = mysql_result($result4, $i4, 'FileNameHQ'); $ranking = mysql_result($result4, $i4, 'ranking'); //$bild = $pic_hq_path."/".$file; $bild = "http://" . $_SERVER['SERVER_NAME'] . "" . $inst_path . "/pic2base/images/vorschau/hq-preview/" . $file; $param = getimagesize($pic_hq_path . "/" . $file); $width = $param[0]; $height = $param[1]; //echo $bild;