Dodatkowe pola przy dodawaniu zdjęć do galerii
|
kefirek |
Dodany dnia 04.05.2008 11:25:52
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Z photogaller.php to nie ma problemu wystarczy dodać to co na czerwono
echo "</tr>\n</table>\n";
tablebreak();
echo "<div align='center' style='margin:5px;'>\n";
echo "<a href=\"javascript:;\" onclick=\"window.open('showphoto.php?photo_id=".$data['photo_id']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($photo_size[0]+20).",height=".($photo_size[1]+20)."')\">";
echo "<img src='".($photo_thumb ? $photo_thumb : $photo_file)."' alt='".$data['photo_filename']."' title='".$locale['453']."' border='0'></a>\n</div>\n";
echo "<div align='center' style='margin:5px 0px 5px 0px'>\n";
if ($data['photo_description']) echo nl2br(parseubb($data['photo_description']))."</b><br><br>\n";
echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['434']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['454']."$photo_size[0] x $photo_size[1] ".$locale['455']."<br>\n";
echo $locale['456'].parsebytesize(filesize($photo_file))."<br>\n";
echo $locale['436'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."<br>\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".IMAGES."star.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br>\n";
echo $locale['457'].$data['photo_views']."";
[color=red][b] echo "<br>Data zrobienia: ".showdate("shortdate", ($data['datawykonania']))."<br>";
echo "Miejsce: ".$data['miejscezrobienia']."";[/b][/color]
i działa ale z to co wczoraj podałem nie działa jeszcze do końca data nie chce się dodawać ale pracuje nad tym
Plik submit.php
<tr>
<td class='tbl'>Data wykonania:</td>
<td class='tbl'>
<select name='[color=lime]datax1[/color]' class='textbox'>\n<option>--</option>\n";
for ($i=1;$i<=31;$i++) echo "<option>$i</option>\n";
echo "</select>
<select name='[color=lime]datax2[/color]' class='textbox'>\n<option>--</option>\n";
for ($i=1;$i<=12;$i++) echo "<option>$i</option>\n";
echo "</select>
<select name='[color=lime]datax3[/color]' class='textbox'>\n<option>----</option>\n";
for ($i=1970;$i<=2010;$i++) echo "<option>$i</option>\n";
echo "</select> /
<select name='[color=lime]datax4[/color]' class='textbox'>\n";
for ($i=0;$i<=24;$i++) echo "<option>$i</option>\n";
echo "</select> :
<select name='[color=lime]datax5[/color]' class='textbox'>\n";
for ($i=0;$i<=60;$i++) echo "<option>$i</option>\n";
echo "</select>";
echo "</td>
</tr>
<tr>
<td class='tbl'>Miejsce wykonania:</td>
<td class='tbl'><input type='text' name='[color=lime]gdzie[/color]' maxlength='100' class='textbox' style='width:250px;'></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['622']."</td>
<td class='tbl'><textarea name='photo_description' rows='5' class='textbox' style='width:250px;'></textarea></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['623']."</td>
<td class='tbl'><input type='file' name='photo_pic_file' class='textbox' style='width:250px;'><br>
<span class='small2'>".sprintf($locale['624'], parsebytesize($settings['photo_max_b']), $settings['photo_max_w'], $settings['photo_max_h'])."</span></td>
</tr>
<tr>
<td class='tbl'>".$locale['625']."</td>
<td class='tbl'><select name='album_id' class='textbox'>
$opts</select></td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><br>
<input type='submit' name='submit_photo' value='".$locale['626']."' class='button'>
</td>
</tr>
</table>
</form>\n";
} else {
echo "<center><br>\n".$locale['591']."<br><br>\n</center>\n";
}
closetable();
}
}
echo "<script type='text/javascript'>
function validateLink(frm) {
if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateNews(frm) {
if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateArticle(frm) {
if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
alert(\"".$locale['590']."\");
return false;
}
}
function validatePhoto(frm) {
if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" || frm.photo_pic_file.value==\"\" [color=red]|| frm.gdzie.value==\"\"[/color]
) {
alert(\"".$locale['590']."\");
return false;
}
}
</script>\n";
require_once "side_right.php";
require_once "footer.php";
?>
I na końcu chciałem dodać po
echo "<script type='text/javascript'>
function validateLink(frm) {
if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateNews(frm) {
if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateArticle(frm) {
if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
alert(\"".$locale['590']."\");
return false;
}
}
function validatePhoto(frm) {
if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" || frm.photo_pic_file.value==\"\" [color=lime]|| frm.gdzie.value==\"\"[/color]
[color=blue]|| frm.datax1.value==\"\" || frm.datax2.value==\"\" || frm.datax3.value==\"\" || frm.datax4.value==\"\" || frm.datax5.value==\"\")[/color] {
alert(\"".$locale['590']."\");
return false;
}
}
</script>\n";
Po dodaniu na końcu tego formularz nie chce sie wysyłać
[color=blue]|| frm.datax1.value==\"\" || frm.datax2.value==\"\" || frm.datax3.value==\"\" || frm.datax4.value==\"\" || frm.datax5.value==\"\")[/color]
Edytowane przez kefirek dnia 04.05.2008 11:38:27
|
|
|
|
Wścibski Gość |
Dodany dnia 23.12.2024 10:42:39
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
wlodekp |
Dodany dnia 04.05.2008 11:35:53
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Zauważ, że to wyświetlanie występuje w trzech mejscach u mnie data jest ok zarówno dodawanie jak i poprawa w edycji u Ciebie kod daty popatrz na newsy np końcową
<select name='datawykonania[mday]' class='textbox'>\n<option>--</option>\n";
for ($i=1;$i<=31;$i++) echo "<option".(isset([color=red]$datawykonania[/color]['mday']) && $datawykonania['mday'] == $i ? " selected" : "").">$i</option>\n";
echo "</select>
|
|
|
|
Piwi |
Dodany dnia 04.05.2008 11:38:29
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Super!! Ogromne dzięki wszystkim!
Mam jeszcze pytanie:
Jak usunąć wyświetlające się pod kazdym zdjęciem
- Data (chodzi o tą datę dodania - jest mi ona teraz zbędna)
- Wymiary:
- Rozmiar pliku:
- Komentarzy:
- Ocena:
(komentarze i oceny i tak za każdym razem wyłączam)
I jeszcze jedno pytanie:
Po wejściu w galerię, widzimy albumy. Pod każdym z nich jest napisane "Data:, Utworzony przez:". Chciałbym też te dwie pozycje usunąć.
Z góry bardzo dziękuję za pomoc jeszcze w tej kwestii
Pozdrowienia,
Piotrek |
|
|
|
kefirek |
Dodany dnia 04.05.2008 11:40:50
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Ja już zrobiłem to że przy dodawaniu może edytować np. miejsce zrobienie które wpisał użytkownik ale jest problem z tą datą
Plik submissions.php
if ($stage == "2" && $t == "p") {
if (isset($_POST['publish'])) {
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
define("PHOTODIR", PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : ""));
require_once INCLUDES."photo_functions_include.php";
$photo_file = ""; $photo_thumb1 = ""; $photo_thumb2 = "";
$data = dbarray(dbquery(
"SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts
LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id
WHERE submit_id='$submit_id'"
));
$submit_criteria = unserialize($data['submit_criteria']);
$photo_title = stripinput($_POST['photo_title']);
$photo_description = stripinput($_POST['photo_description']);
$album_id = isNum($_POST['album_id']) ? $_POST['album_id'] : "0";
$photo_name = strtolower(substr($submit_criteria['photo_file'], 0, strrpos($submit_criteria['photo_file'], ".")));
$photo_ext = strtolower(strrchr($submit_criteria['photo_file'],"."));
$photo_dest = PHOTODIR;
$photo_file = image_exists($photo_dest, $photo_name.$photo_ext);
[color=green] $gdzie = stripinput($_POST['gdzie']);
$datax1 = ($_POST['datax1']);
$datax2 = ($_POST['datax2']);
$datax3 = ($_POST['datax3']);
$datax4 = ($_POST['datax4']);
$datax5 = ($_POST['datax5']);[/color]
[color=red] $wykonany = array(
"mday" => isNum($_POST['data']['mday']) ? $_POST['data']['mday'] : "--",
"mon" => isNum($_POST['data']['mon']) ? $_POST['data']['mon'] : "--",
"year" => isNum($_POST['data']['year']) ? $_POST['data']['year'] : "----",
"hours" => isNum($_POST['data']['hours']) ? $_POST['data']['hours'] : "0",
"minutes" => isNum($_POST['data']['minutes']) ? $_POST['data']['minutes'] : "0",
);[/color]
[color=red] if ($_POST['data']['mday']!="--" && $_POST['data']['mon']!="--" && $_POST['data']['year']!="----") {
$wykonany = mktime($_POST['data']['hours'],$_POST['data']['minutes'],0,$_POST['data']['mon'],$_POST['data']['mday'],$_POST['data']['year']);
}[/color]
copy(PHOTOS."submissions/".$submit_criteria['photo_file'], $photo_dest.$photo_file);
chmod($photo_dest.$photo_file, 0644);
unlink(PHOTOS."submissions/".$submit_criteria['photo_file']);
$imagefile = @getimagesize($photo_dest.$photo_file);
$photo_thumb1 = image_exists($photo_dest, $photo_name."_t1".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb1, $settings['thumb_w'], $settings['thumb_h']);
if ($imagefile[0] > $settings['photo_w'] || $imagefile[1] > $settings['photo_h']) {
$photo_thumb2 = image_exists($photo_dest, $photo_name."_t2".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb2, $settings['photo_w'], $settings['photo_h']);
}
$photo_order = dbresult(dbquery("SELECT MAX(photo_order) FROM ".$db_prefix."photos WHERE album_id='$album_id'"), 0) + 1;
$result = dbquery("INSERT INTO ".$db_prefix."photos (album_id, photo_title, photo_description, photo_filename, photo_thumb1, photo_thumb2, photo_datestamp, photo_user, photo_views, photo_order, photo_allow_comments, photo_allow_ratings,
[color=red]datawykonania, miejscezrobienia[/color]) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file',
'$photo_thumb1', '$photo_thumb2', '".time()."', '".$data['submit_user']."', '0',
'$photo_order', '1', '1',[color=red] '$wykonany', '$gdzie'[/color])");
$result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'");
opentable($locale['580']);
echo "<br><div align='center'>".$locale['581']."<br><br>
<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br><br>
<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br>\n";
closetable();
} else if (isset($_POST['delete'])) {
opentable($locale['582']);
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"));
$submit_criteria = unserialize($data['submit_criteria']);
unlink(PHOTOS."submissions/".$submit_criteria['photo_file']);
$result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'");
echo "<br><div align='center'>".$locale['583']."<br><br>
<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br><br>
<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br>\n";
closetable();
} else {
$data = dbarray(dbquery(
"SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts
LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id
WHERE submit_id='$submit_id'"
));
$submit_criteria = unserialize($data['submit_criteria']);
$photo_title = $submit_criteria['photo_title'];
[color=green] $gdzie = $submit_criteria['gdzie'];
$datax1 = $submit_criteria['datax1'];
$datax2 = $submit_criteria['datax2'];
$datax3 = $submit_criteria['datax3'];
$datax4 = $submit_criteria['datax4'];
$datax5 = $submit_criteria['datax5'];[/color]
$photo_description = $submit_criteria['photo_description'];
$photo_file = $submit_criteria['photo_file'];
$album_id = $submit_criteria['album_id'];
$photo_albums = ""; $sel = "";
$result2 = dbquery("SELECT * FROM ".$db_prefix."photo_albums ORDER BY album_title");
if (dbrows($result2)) {
while ($data2 = dbarray($result2)) {
if (isset($album_id)) $sel = ($album_id == $data2['album_id'] ? " selected" : "");
$photo_albums .= "<option value='".$data2['album_id']."'$sel>".$data2['album_title']."</option>\n";
}
}
opentable($locale['500']);
echo "<form name='publish' method='post' action='".FUSION_SELF.$aidlink."&sub=submissions&stage=2&t=p&submit_id=$submit_id'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='100' class='tbl'>".$locale['596']."</td>
<td width='80%' class='tbl'><input type='text' name='photo_title' value='$photo_title' class='textbox' style='width: 250px'></td>
</tr>
[color=red]<tr>
<td width='100' class='tbl'>Data wykonania:</td>
<td width='80%' class='tbl'>
<select name='data[mday]' value='$datax1' class='textbox'>\n<option>$datax1</option>\n";
for ($i=1;$i<=31;$i++) echo "<option".(isset($wykonany['mday']) && $wykonany['mday'] == $i ? " selected" : "").">$i</option>\n";
echo "</select>
<select name='data[mon]' value='$datax2' class='textbox'>\n<option>$datax2</option>\n";
for ($i=1;$i<=12;$i++) echo "<option".(isset($wykonany['mon']) && $wykonany['mon'] == $i ? " selected" : "").">$i</option>\n";
echo "</select>
<select name='data[year]' value='$datax3' class='textbox'>\n<option>$datax3</option>\n";
for ($i=1970;$i<=2010;$i++) echo "<option".(isset($wykonany['year']) && $wykonany['year'] == $i ? " selected" : "").">$i</option>\n";
echo "</select> /
<select name='data[hours]' value='$datax4' class='textbox'>\n";
for ($i=0;$i<=24;$i++) echo "<option".(isset($wykonany['hours']) && $wykonany['hours'] == $i ? " selected" : "").">$i</option>\n";
echo "</select> :
<select name='data[minutes]' value='$datax5' class='textbox'>\n";
for ($i=0;$i<=60;$i++) echo "<option".(isset($wykonany['minutes']) && $wykonany['minutes'] == $i ? " selected" : "").">$i</option>\n";
echo "</select>
</td>
</tr>[/color]
[color=red]<tr>
<td width='100' class='tbl'>Miejsce wykonania:</td>
<td width='80%' class='tbl'><input type='text' name='gdzie' value='$gdzie' class='textbox' style='width: 250px'></td>
</tr>[/color]
<tr>
<td width='100' class='tbl'>".$locale['597']."</td>
<td width='80%' class='tbl'><input type='text' name='photo_description' value='$photo_description' class='textbox' style='width: 250px'></td>
</tr>
<tr>
<td width='100' class='tbl'>".$locale['598']."</td>
<td width='80%' class='tbl'><select name='album_id' class='textbox'>
<option value='0'>".$locale['507']."</option>
$photo_albums</select>
</td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl1'><br>
<a href='".PHOTOS."submissions/".$photo_file."' target='_blank'>".$locale['591']."</a><br><br>
".$locale['592']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br><br>
".$locale['593']."<br>
<input type='submit' name='publish' value='".$locale['594']."' class='button'>
<input type='submit' name='delete' value='".$locale['595']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
}
echo "</td>\n";
require_once BASEDIR."footer.php";
?>
Edytowane przez kefirek dnia 04.05.2008 11:54:37
|
|
|
|
wlodekp |
Dodany dnia 04.05.2008 11:43:41
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Ja Ci powiem tak wielu właśnie przez takie kaprysy przestało cokolwiek pisać nie ma jeszcze finału, a Ty już masz następne zachcianki taką kosmetykę to już powinieneś sam sobie zrobić i nie zawracać głowy d u p erszmitam-bo może nastąpić koniec jeszcze przed finałem.
Edytowane przez wlodekp dnia 04.05.2008 11:44:49
|
|
|
|
Piwi |
Dodany dnia 04.05.2008 11:46:39
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Przepraszam zatem. |
|
|
|
kefirek |
Dodany dnia 04.05.2008 11:47:07
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Problem mam w pliku submit.php
echo "<script type='text/javascript'>
function validateLink(frm) {
if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateNews(frm) {
if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateArticle(frm) {
if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
alert(\"".$locale['590']."\");
return false;
}
}
function validatePhoto(frm) {
if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" || frm.photo_pic_file.value==\"\" [color=red]|| frm.gdzie.value==\"\"[/color]
|| frm.datax1.value==\"\") {
alert(\"".$locale['590']."\");
return false;
}
}
</script>\n";
require_once "side_right.php";
require_once "footer.php";
?>
I jak dodam po tym || frm.gdzie.value==\"\" takie coś
[color=red]|| frm.datax1.value==\"\" || frm.datax2.value==\"\" || frm.datax3.value==\"\" || frm.datax4.value==\"\" || frm.datax5.value==\"\") [/color]
to pisze podczas wypełniana że wypełnij wszystkie pola
Edytowane przez kefirek dnia 04.05.2008 11:51:47
|
|
|
|
wlodekp |
Dodany dnia 04.05.2008 11:53:57
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Jaki problem to tylko komunikaty javascript jak nie wypełnisz pola, dla ubogich normalnie, powinno się dopisać do error jako następny numer by nie zapisywało przy odświerzaniu i dało konretną treść proszę podać np miejsce zrobienia.
|
|
|
|
kefirek |
Dodany dnia 04.05.2008 11:59:55
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
I jak dodam po tym frm.gdzie.value==\"\" takie coś
|| frm.datax1.value==\"\" || frm.datax2.value==\"\" || frm.datax3.value==\"\" || frm.datax4.value==\"\" || frm.datax5.value==\"\")
to pisze podczas wypełniana że wypełnij wszystkie pola mimo że je wypełniłem
a jeśli usunę to
|| frm.datax1.value==\"\" || frm.datax2.value==\"\" || frm.datax3.value==\"\" || frm.datax4.value==\"\" || frm.datax5.value==\"\")
To wtedy wszytko ok. miejsce zrobienia zdjęcia podczas akceptacji może zmienić itp ale data którą wpisał użytkownik się nie wyświetla może tylko wpisać jak admina jaką chcesz datę
A powinna się wyświetlić ta którą wpisał użytkownik
I jako admin możesz ją zmienić
Edytowane przez kefirek dnia 04.05.2008 12:03:04
|
|
|
|
wlodekp |
Dodany dnia 04.05.2008 12:13:34
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
I zmuszsz mnie do skontrolowania całego kodu napisałem z jakiego założenia wychodzę, popatrzę jeszcze na te błędy bo nawet nie wiem jak te pola się nazywają w Twoim formularzu.
Edycja daty musi być wsparta(nie zapis)
$datawykonania = getdate($data['datawykonania']);
|
|
|
|
kefirek |
Dodany dnia 04.05.2008 15:01:23
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Jeśli mówisz że chcesz datę wpisywać ręcznie to nie ma problemu
ZMIENIASZ POLE W BAZIE DATA WYKONANIA NA VARCHAR 100 tak jak pole MIJESCE WYKONANIA te same warności
proszę o to cały kod
Plik submit.php
} elseif ($stype == "p") {
if (isset($_POST['submit_photo'])) {
require_once INCLUDES."photo_functions_include.php";
$error = "";
$submit_info['photo_title'] = stripinput($_POST['photo_title']);
$submit_info['photo_description'] = stripinput($_POST['photo_description']);
[color=red] $submit_info['gdzie'] = stripinput($_POST['gdzie']);
$submit_info['kiedy'] = stripinput($_POST['kiedy']);[/color]
$submit_info['album_id'] = isNum($_POST['album_id']) ? $_POST['album_id'] : "0";
if (is_uploaded_file($_FILES['photo_pic_file']['tmp_name'])) {
$photo_types = array(".gif",".jpg",".jpeg",".png");
$photo_pic = $_FILES['photo_pic_file'];
$photo_name = strtolower(substr($photo_pic['name'], 0, strrpos($photo_pic['name'], ".")));
$photo_ext = strtolower(strrchr($photo_pic['name'],"."));
$photo_dest = PHOTOS."submissions/";
if (!preg_match("/^[-0-9A-Z_\[\]]+$/i", $photo_name)) {
$error = 1;
} elseif ($photo_pic['size'] > $settings['photo_max_b']){
$error = 2;
} elseif (!in_array($photo_ext, $photo_types)) {
$error = 3;
} else {
$photo_file = image_exists($photo_dest, $photo_name.$photo_ext);
move_uploaded_file($photo_pic['tmp_name'], $photo_dest.$photo_file);
chmod($photo_dest.$photo_file, 0644);
$imagefile = @getimagesize($photo_dest.$photo_file);
if (!verify_image($photo_dest.$photo_file)) {
$error = 3;
unlink($photo_dest.$photo_file);
} elseif ($imagefile[0] > $settings['photo_max_w'] || $imagefile[1] > $settings['photo_max_h']) {
$error = 4;
unlink($photo_dest.$photo_file);
} else {
$submit_info['photo_file'] = $photo_file;
}
}
}
opentable($locale['570']);
if (!$error) {
$result = dbquery("INSERT INTO ".$db_prefix."submissions (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('p', '".$userdata['user_id']."', '".time()."', '".serialize($submit_info)."')");
echo "<center><br>\n".$locale['580']."<br><br>
<a href='submit.php?stype=p'>".$locale['581']."</a><br><br>
<a href='index.php'>".$locale['412']."</a><br><br>\n</center>\n";
} else {
echo "<center><br>\n".$locale['600']."<br><br>\n";
if ($error == 1) { $message .= $locale['601']; }
elseif ($error == 2) { $message .= sprintf($locale['602'], $settings['photo_max_b']); }
elseif ($error == 3) { $message .= $locale['603']; }
elseif ($error == 4) { $message .= sprintf($locale['604'], $settings['photo_max_w'], $settings['photo_max_h']); }
echo "<br><br>\n<a href='submit.php?stype=p'>".$locale['411']."</a><br><br>\n</center>\n";
}
closetable();
} else {
$opts = "";
opentable($locale['570']);
$result = dbquery("SELECT * FROM ".$db_prefix."photo_albums ORDER BY album_title");
if (dbrows($result)) {
while ($data = dbarray($result)) $opts .= "<option value='".$data['album_id']."'>".$data['album_title']."</option>\n";
echo $locale['620']."<br><br>
<form name='submit_form' method='post' action='".FUSION_SELF."?stype=p' enctype='multipart/form-data' onSubmit='return validatePhoto(this);'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td class='tbl'>".$locale['621']."</td>
<td class='tbl'><input type='text' name='photo_title' maxlength='100' class='textbox' style='width:250px;'></td>
</tr>
[color=red]<tr>
<td class='tbl'>Data wykonania:</td>
<td class='tbl'><input type='text' name='kiedy' maxlength='100' class='textbox' style='width:250px;'></td>
</tr>[/color]
[color=red]<tr>
<td class='tbl'>Miejsce wykonania:</td>
<td class='tbl'><input type='text' name='gdzie' maxlength='100' class='textbox' style='width:250px;'></td>
</tr>[/color]
<tr>
<td valign='top' class='tbl'>".$locale['622']."</td>
<td class='tbl'><textarea name='photo_description' rows='5' class='textbox' style='width:250px;'></textarea></td>
</tr>
<tr>
<td valign='top' class='tbl'>".$locale['623']."</td>
<td class='tbl'><input type='file' name='photo_pic_file' class='textbox' style='width:250px;'><br>
<span class='small2'>".sprintf($locale['624'], parsebytesize($settings['photo_max_b']), $settings['photo_max_w'], $settings['photo_max_h'])."</span></td>
</tr>
<tr>
<td class='tbl'>".$locale['625']."</td>
<td class='tbl'><select name='album_id' class='textbox'>
$opts</select></td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><br>
<input type='submit' name='submit_photo' value='".$locale['626']."' class='button'>
</td>
</tr>
</table>
</form>\n";
} else {
echo "<center><br>\n".$locale['591']."<br><br>\n</center>\n";
}
closetable();
}
}
echo "<script type='text/javascript'>
function validateLink(frm) {
if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateNews(frm) {
if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
alert(\"".$locale['590']."\"); return false;
}
}
function validateArticle(frm) {
if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
alert(\"".$locale['590']."\");
return false;
}
}
function validatePhoto(frm) {
if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" [color=red]|| frm.gdzie.value==\"\" || frm.kiedy.value==\"\" [/color]|| frm.photo_pic_file.value==\"\"
) {
alert(\"".$locale['590']."\");
return false;
}
}
</script>\n";
require_once "side_right.php";
require_once "footer.php";
?>
Plik submissions.php
}
if ($stage == "2" && $t == "p") {
if (isset($_POST['publish'])) {
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
define("PHOTODIR", PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : ""));
require_once INCLUDES."photo_functions_include.php";
$photo_file = ""; $photo_thumb1 = ""; $photo_thumb2 = "";
$data = dbarray(dbquery(
"SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts
LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id
WHERE submit_id='$submit_id'"
));
$submit_criteria = unserialize($data['submit_criteria']);
$photo_title = stripinput($_POST['photo_title']);
$photo_description = stripinput($_POST['photo_description']);
$album_id = isNum($_POST['album_id']) ? $_POST['album_id'] : "0";
$photo_name = strtolower(substr($submit_criteria['photo_file'], 0, strrpos($submit_criteria['photo_file'], ".")));
$photo_ext = strtolower(strrchr($submit_criteria['photo_file'],"."));
$photo_dest = PHOTODIR;
$photo_file = image_exists($photo_dest, $photo_name.$photo_ext);
[color=red] $gdzie = stripinput($_POST['gdzie']);
$kiedy = stripinput($_POST['kiedy']);[/color]
copy(PHOTOS."submissions/".$submit_criteria['photo_file'], $photo_dest.$photo_file);
chmod($photo_dest.$photo_file, 0644);
unlink(PHOTOS."submissions/".$submit_criteria['photo_file']);
$imagefile = @getimagesize($photo_dest.$photo_file);
$photo_thumb1 = image_exists($photo_dest, $photo_name."_t1".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb1, $settings['thumb_w'], $settings['thumb_h']);
if ($imagefile[0] > $settings['photo_w'] || $imagefile[1] > $settings['photo_h']) {
$photo_thumb2 = image_exists($photo_dest, $photo_name."_t2".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb2, $settings['photo_w'], $settings['photo_h']);
}
$photo_order = dbresult(dbquery("SELECT MAX(photo_order) FROM ".$db_prefix."photos WHERE album_id='$album_id'"), 0) + 1;
$result = dbquery("INSERT INTO ".$db_prefix."photos (album_id, photo_title,
photo_description, photo_filename, photo_thumb1,
photo_thumb2, photo_datestamp, photo_user,
photo_views, photo_order, photo_allow_comments,
photo_allow_ratings, [color=red]datawykonania, miejscezrobienia[/color])
VALUES ('$album_id', '$photo_title', '$photo_description',
'$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$data['submit_user']."',
'0', '$photo_order', '1', '1',[color=red] '$kiedy', '$gdzie'[/color])");
$result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'");
opentable($locale['580']);
echo "<br><div align='center'>".$locale['581']."<br><br>
<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br><br>
<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br>\n";
closetable();
} else if (isset($_POST['delete'])) {
opentable($locale['582']);
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'"));
$submit_criteria = unserialize($data['submit_criteria']);
unlink(PHOTOS."submissions/".$submit_criteria['photo_file']);
$result = dbquery("DELETE FROM ".$db_prefix."submissions WHERE submit_id='$submit_id'");
echo "<br><div align='center'>".$locale['583']."<br><br>
<a href='".FUSION_SELF.$aidlink."'>".$locale['402']."</a><br><br>
<a href='index.php".$aidlink."'>".$locale['403']."</a></div><br>\n";
closetable();
} else {
$data = dbarray(dbquery(
"SELECT ts.*, user_id,user_name FROM ".$db_prefix."submissions ts
LEFT JOIN ".$db_prefix."users tu ON ts.submit_user=tu.user_id
WHERE submit_id='$submit_id'"
));
$submit_criteria = unserialize($data['submit_criteria']);
$photo_title = $submit_criteria['photo_title'];
[color=red] $gdzie = $submit_criteria['gdzie'];
$kiedy = $submit_criteria['kiedy'];[/color]
$photo_description = $submit_criteria['photo_description'];
$photo_file = $submit_criteria['photo_file'];
$album_id = $submit_criteria['album_id'];
$photo_albums = ""; $sel = "";
$result2 = dbquery("SELECT * FROM ".$db_prefix."photo_albums ORDER BY album_title");
if (dbrows($result2)) {
while ($data2 = dbarray($result2)) {
if (isset($album_id)) $sel = ($album_id == $data2['album_id'] ? " selected" : "");
$photo_albums .= "<option value='".$data2['album_id']."'$sel>".$data2['album_title']."</option>\n";
}
}
opentable($locale['500']);
echo "<form name='publish' method='post' action='".FUSION_SELF.$aidlink."&sub=submissions&stage=2&t=p&submit_id=$submit_id'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='100' class='tbl'>".$locale['596']."</td>
<td width='80%' class='tbl'><input type='text' name='photo_title' value='$photo_title' class='textbox' style='width: 250px'></td>
</tr>
[color=red]<tr>
<td width='100' class='tbl'>Data wykonania:</td>
<td width='80%' class='tbl'><input type='text' name='kiedy' value='$kiedy' class='textbox' style='width: 250px'></td>
</tr>[/color]
[color=red]<tr>
<td width='100' class='tbl'>Miejsce wykonania:</td>
<td width='80%' class='tbl'><input type='text' name='gdzie' value='$gdzie' class='textbox' style='width: 250px'></td>
</tr>[/color]
<tr>
<td width='100' class='tbl'>".$locale['597']."</td>
<td width='80%' class='tbl'><input type='text' name='photo_description' value='$photo_description' class='textbox' style='width: 250px'></td>
</tr>
<tr>
<td width='100' class='tbl'>".$locale['598']."</td>
<td width='80%' class='tbl'><select name='album_id' class='textbox'>
<option value='0'>".$locale['507']."</option>
$photo_albums</select>
</td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl1'><br>
<a href='".PHOTOS."submissions/".$photo_file."' target='_blank'>".$locale['591']."</a><br><br>
".$locale['592']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br><br>
".$locale['593']."<br>
<input type='submit' name='publish' value='".$locale['594']."' class='button'>
<input type='submit' name='delete' value='".$locale['595']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
}
echo "</td>\n";
require_once BASEDIR."footer.php";
?>
Plik photogallery.php
}
echo "</tr>\n</table>\n";
tablebreak();
echo "<div align='center' style='margin:5px;'>\n";
echo "<a href=\"javascript:;\" onclick=\"window.open('showphoto.php?photo_id=".$data['photo_id']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($photo_size[0]+20).",height=".($photo_size[1]+20)."')\">";
echo "<img src='".($photo_thumb ? $photo_thumb : $photo_file)."' alt='".$data['photo_filename']."' title='".$locale['453']."' border='0'></a>\n</div>\n";
echo "<div align='center' style='margin:5px 0px 5px 0px'>\n";
if ($data['photo_description']) echo nl2br(parseubb($data['photo_description']))."</b><br><br>\n";
echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['434']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['454']."$photo_size[0] x $photo_size[1] ".$locale['455']."<br>\n";
echo $locale['456'].parsebytesize(filesize($photo_file))."<br>\n";
echo $locale['436'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."<br>\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".IMAGES."star.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br>\n";
echo $locale['457'].$data['photo_views']."";
[color=red]
echo "<br>Data zrobienia: ".$data['datawykonania']."<br>";
echo "Miejsce: ".$data['miejscezrobienia']."";[/color]
Jak znajdę czas to zrobię tak jak chciałem na początku by datę wybierało się za pomocą pola wyboru i potem zapisywała się w bazie w formacie UNIXowym
Edytowane przez kefirek dnia 04.05.2008 15:13:11
|
|
|
|
Piwi |
Dodany dnia 04.05.2008 19:58:10
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Chciałbym jeszcze aby była możliwość edycji istniejących już zdjęć z PA, czy wie ktoś może jak to zrobić? |
|
|
|
wlodekp |
Dodany dnia 04.05.2008 20:16:15
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Było moje nie pasowało usunąłem, zresztą testowo zrobiłem oczywiście sobie całość z datą jak było w początkowym zamyśle tego tematu.
A do tego zapewne Kolega Ci dopiszę, bo w takiej postaci nie jest to nic trudnego i mnie osobiście nie interesuje
|
|
|
|
Piwi |
Dodany dnia 04.05.2008 22:11:22
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Zrobiłem wszystko tak jak pokazał Kefirek w ostatniej modyfikacji, ale:
Po wpisaniu danych do dodatkowych pól pojawiają się one w nadesłanych materiałach, jest wszystko OK,
publikuję zdjęcie i niestety w galerii pod zdjęciem tam gdzie są dodatkowe pola jest pusto (tzn tak jakby nic w nich nie było wpisane)..
Kefirek pomocy!
Pozdrawiam.
Edytowane przez Piwi dnia 04.05.2008 22:14:10
|
|
|
|
wlodekp |
Dodany dnia 04.05.2008 22:15:15
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Zapewne Ci pomoże po pewnie jak ja ma maila po 3 minutach w śledzonych tematach o nowym wpisie.
|
|
|
|
kefirek |
Dodany dnia 05.05.2008 09:18:12
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Jak ci może wyświetlać dane z bazy jak pola nie są takie jak w bazie
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."photogallery.php";
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
if (isset($photo_id) && !isNum($photo_id)) fallback(FUSION_SELF);
if (isset($album_id) && !isNum($album_id)) fallback(FUSION_SELF);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if(isset($photo_id)){
$result = dbquery(
"SELECT tp.*, ta.*, tu.user_id,user_name, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes
FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."photo_albums ta USING (album_id)
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
LEFT JOIN ".$db_prefix."ratings tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P'
WHERE photo_id='$photo_id' GROUP BY tp.photo_id"
);
$data = dbarray($result);
if (!checkgroup($data['album_access'])) {
fallback(FUSION_SELF);
} else {
define("PHOTODIR", PHOTOS.(!SAFEMODE ? "album_".$data['album_id']."/" : ""));
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
$result=dbquery("UPDATE ".$db_prefix."photos SET photo_views=(photo_views+1) WHERE photo_id='".$photo_id."'");
$pres = dbquery("SELECT photo_id FROM ".$db_prefix."photos WHERE photo_order='".($data['photo_order']-1)."' AND album_id='".$data['album_id']."'");
$nres = dbquery("SELECT photo_id FROM ".$db_prefix."photos WHERE photo_order='".($data['photo_order']+1)."' AND album_id='".$data['album_id']."'");
if (dbrows($pres)) $prev = dbarray($pres);
if (dbrows($nres)) $next = dbarray($nres);
opentable($locale['450']);
if ($data['photo_thumb2']) { $photo_thumb = PHOTODIR.$data['photo_thumb2']; } else { $photo_thumb = ""; }
$photo_file = PHOTODIR.$data['photo_filename'];
$photo_size = @getimagesize($photo_file);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='tbl2'>\n";
echo "<a href='".FUSION_SELF."'>".$locale['400']."</a> >\n";
echo "<a href='".FUSION_SELF."?album_id=".$data['album_id']."'>".$data['album_title']."</a> >\n";
echo "<a href='".FUSION_SELF."?photo_id=$photo_id'>".$data['photo_title']."</a>\n</td>\n";
if ((isset($prev['photo_id']) && isNum($prev['photo_id'])) || (isset($next['photo_id']) && isNum($next['photo_id']))) {
if (isset($prev)) echo "<td width='1%' class='tbl2'><a href='".FUSION_SELF."?photo_id=".$prev['photo_id']."' title='".$locale['451']."'><<</a></td>\n";
if (isset($next)) echo "<td width='1%' class='tbl2'><a href='".FUSION_SELF."?photo_id=".$next['photo_id']."' title='".$locale['452']."'>>></a></td>\n";
}
echo "</tr>\n</table>\n";
tablebreak();
echo "<div align='center' style='margin:5px;'>\n";
echo "<a href=\"javascript:;\" onclick=\"window.open('showphoto.php?photo_id=".$data['photo_id']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($photo_size[0]+20).",height=".($photo_size[1]+20)."')\">";
echo "<img src='".($photo_thumb ? $photo_thumb : $photo_file)."' alt='".$data['photo_filename']."' title='".$locale['453']."' border='0'></a>\n</div>\n";
echo "<div align='center' style='margin:5px 0px 5px 0px'>\n";
if ($data['photo_description']) echo nl2br(parseubb($data['photo_description']))."</b><br><br>\n";
echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['434']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['454']."$photo_size[0] x $photo_size[1] ".$locale['455']."<br>\n";
echo $locale['456'].parsebytesize(filesize($photo_file))."<br>\n";
echo $locale['436'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."<br>\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".IMAGES."star.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br>\n";
echo $locale['457'].$data['photo_views']."<br>\n";
[color=red][b]echo "Data: ".$data['data']."<br>";
echo "Lotnisko: ".$data['lotnisko']."<br>";
echo "Samolot: ".$data['samolot']."<br>";
echo "Rejestracja: ".$data['rejestracja']."";[/b][/color]
closetable();
if ($data['photo_allow_comments'] == "1") showcomments("P","photos","photo_id",$photo_id,FUSION_SELF."?photo_id=$photo_id");
if ($data['photo_allow_ratings']) showratings("P",$photo_id,FUSION_SELF."?photo_id=$photo_id");
}
} elseif (isset($album_id)) {
define("PHOTODIR", PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : ""));
$result = dbquery(
"SELECT ta.* FROM ".$db_prefix."photo_albums ta WHERE album_id='$album_id'"
);
if (!dbrows($result)) {
fallback(FUSION_SELF);
} else {
$data = dbarray($result);
if (!checkgroup($data['album_access'])) {
fallback(FUSION_SELF);
} else {
$rows = dbcount("(photo_id)", "photos", "album_id='$album_id'");
opentable($locale['420']);
tablebreak();
echo "<table align='center' cellpadding='0' cellspacing='0' width='80%'>\n<tr>\n";
echo "<td rowspan='2' align='center' class='tbl1'><img src='".PHOTOS.$data['album_thumb']."'></td>\n";
echo "<td valign='top' width='100%'><div class='tbl2' style='font-weight:bold;vertical-align:top'>".$locale['421'].$data['album_title']."</div>\n";
echo "<div class='tbl1' style='vertical-align:middle'>".nl2br(parseubb($data['album_description']))."</div>\n</td>\n</tr>\n";
echo "<tr>\n<td valign='bottom' width='100%'>\n<div class='tbl2' style='vertical-align:bottom'>\n";
if ($rows) {
$pdata = dbarray(dbquery("SELECT tp.*, tu.user_id,user_name FROM ".$db_prefix."photos tp LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id WHERE album_id='$album_id' ORDER BY photo_datestamp DESC LIMIT 1"));
echo $locale['422']."$rows<br>\n";
echo $locale['423']."<a href='".BASEDIR."profile.php?lookup=".$pdata['user_id']."'>".$pdata['user_name']."</a>".$locale['424'].showdate("longdate", $pdata['photo_datestamp'])."\n";
} else {
echo $locale['425']."\n";
}
echo "</div>\n</td>\n</tr>\n</table>";
tablebreak();
closetable();
if ($rows) {
tablebreak();
opentable($locale['430']);
$result = dbquery(
"SELECT tp.*, tu.user_id,user_name, SUM(tr.rating_vote) AS sum_rating, COUNT(tr.rating_item_id) AS count_votes
FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
LEFT JOIN ".$db_prefix."ratings tr ON tr.rating_item_id = tp.photo_id AND tr.rating_type='P'
WHERE album_id=$album_id GROUP BY photo_id ORDER BY photo_datestamp DESC LIMIT $rowstart,".$settings['thumbs_per_page']
);
$counter = 0;
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n<td class='tbl2'>\n";
echo "<a href='".FUSION_SELF."'>".$locale['400']."</a> >\n";
echo "<a href='".FUSION_SELF."?album_id=".$data['album_id']."'>".$data['album_title']."</a>\n";
echo "</td>\n</tr>\n</table>\n";
tablebreak();
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $settings['thumbs_per_row'] == 0)) echo "</tr>\n<tr>\n";
echo "<td align='center' valign='top' class='tbl'>\n";
echo "<b>".$data['photo_title']."</b><br><br>\n<a href='".FUSION_SELF."?photo_id=".$data['photo_id']."'>";
if ($data['photo_thumb1'] && file_exists(PHOTODIR.$data['photo_thumb1'])){
echo "<img src='".PHOTODIR.$data['photo_thumb1']."' alt='".$data['photo_thumb1']."' title='".$locale['431']."' border='0'>";
} else {
echo $locale['432'];
}
echo "</a><br><br>\n<span class='small'>\n";
echo $locale['433'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['434']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['436'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."<br>\n";
echo $locale['437'].($data['count_votes'] > 0 ? str_repeat("<img src='".IMAGES."star.gif' alt='*' style='vertical-align:middle'>", ceil($data['sum_rating'] / $data['count_votes'])) : $locale['438'])."<br>\n";
echo $locale['435'].$data['photo_views']."</span><br>\n";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
closetable();
}
if ($rows > $settings['thumbs_per_page']) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$settings['thumbs_per_page'],$rows,3,FUSION_SELF."?album_id=$album_id&")."\n</div>\n";
}
}
} else {
opentable($locale['400']);
$rows = dbcount("(album_id)", "photo_albums", groupaccess('album_access'));
if ($rows) {
$result = dbquery(
"SELECT ta.*, tu.user_id,user_name FROM ".$db_prefix."photo_albums ta
LEFT JOIN ".$db_prefix."users tu ON ta.album_user=tu.user_id
WHERE ".groupaccess('album_access')." ORDER BY album_order
LIMIT $rowstart,".$settings['thumbs_per_page']
);
$counter = 0; $r = 0; $k = 1;
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $settings['thumbs_per_row'] == 0)) echo "</tr>\n<tr>\n";
echo "<td align='center' valign='top' class='tbl'>\n";
echo "<b>".$data['album_title']."</b><br><br>\n<a href='".FUSION_SELF."?album_id=".$data['album_id']."'>";
if ($data['album_thumb'] && file_exists(PHOTOS.$data['album_thumb'])){
echo "<img src='".PHOTOS.$data['album_thumb']."' alt='".$data['album_thumb']."' title='".$locale['401']."' border='0'>";
} else {
echo $locale['402'];
}
echo "</a><br><br>\n<span class='small'>\n";
echo $locale['403'].showdate("shortdate", $data['album_datestamp'])."<br>\n";
echo $locale['404']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>\n";
echo $locale['405'].dbcount("(photo_id)", "photos", "album_id='".$data['album_id']."'")."</span><br>\n";
echo "</td>\n";
$counter++; $k++;
}
echo "</tr>\n</table>\n";
closetable();
if ($rows > $settings['thumbs_per_page']) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$settings['thumbs_per_page'],$rows,3)."\n</div>\n";
}else{
echo "<center><br>".$locale['406']."<br><br></center>\n";
closetable();
}
}
require "side_right.php";
require "footer.php";
?>
Edytowane przez kefirek dnia 05.05.2008 09:18:50
|
|
|
|
Piwi |
Dodany dnia 05.05.2008 09:27:53
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Dziękuje, faktycznie tam był błąd Teraz śmiga
Gdyby Kefirek udało Ci się jeszcze opracować tą edycje z PA to byłoby już całkiem super.
Pozdrawiam. |
|
|
|
kefirek |
Dodany dnia 05.05.2008 10:06:42
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Proszę zrób sobie podobnie edytuj plik photos.php i dodaj to co na czerwono:D
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../maincore.php";
require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";
require_once INCLUDES."photo_functions_include.php";
include LOCALE.LOCALESET."admin/photos.php";
define("SAFEMODE", @ini_get("safe_mode") ? true : false);
if (!checkrights("PH") || !defined("iAUTH") || $aid != iAUTH) fallback("../index.php");
if (!isset($album_id) && !isNum($album_id)) fallback("photoalbums.php".$aidlink);
if (isset($photo_id) && !isNum($photo_id)) fallback(FUSION_SELF.$aidlink);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (!isset($action)) $action = "";
if (isset($status)) {
if ($status == "savepn") {
$title = $locale['400'];
$message = "<b>".$locale['410']."</b>";
} elseif ($status == "savepu") {
$title = $locale['401'];
$message = "<b>".$locale['411']."</b>";
} elseif ($status == "delp") {
$title = $locale['402'];
$message = "<b>".$locale['412']."</b>";
} elseif ($status == "delpd") {
$title = $locale['402'];
$message = "<b>".$locale['413']."</b>";
} elseif ($status == "savepe") {
$title = $locale['420'];
$message = "<b>".$locale['421']."</b><br>\n";
if ($error == 1) { $message .= $locale['422']; }
elseif ($error == 2) { $message .= sprintf($locale['423'], parsebytesize($settings['photo_max_b'])); }
elseif ($error == 3) { $message .= $locale['424']; }
elseif ($error == 4) { $message .= sprintf($locale['425'], $settings['photo_max_w'], $settings['photo_max_h']); }
}
opentable($title);
echo "<div align='center'>".$message."</div>\n";
closetable();
tablebreak();
}
if (isset($_POST['cancel'])) {
redirect(FUSION_SELF.$aidlink."&album_id=$album_id");
}
define("PHOTODIR", PHOTOS.(!SAFEMODE ? "album_".$album_id."/" : ""));
if ($action == "deletepic") {
$data = dbarray(dbquery("SELECT photo_filename,photo_thumb1,photo_thumb2 FROM ".$db_prefix."photos WHERE photo_id='$photo_id'"));
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_filename='', photo_thumb1='', photo_thumb2='' WHERE photo_id='$photo_id'");
@unlink(PHOTODIR.$data['photo_filename']);
@unlink(PHOTODIR.$data['photo_thumb1']);
if ($data['photo_thumb2']) @unlink(PHOTODIR.$data['photo_thumb2']);
redirect(FUSION_SELF.$aidlink."&status=delp&album_id=$album_id");
} elseif ($action == "delete") {
$data = dbarray(dbquery("SELECT album_id,photo_filename,photo_thumb1,photo_thumb2,photo_order FROM ".$db_prefix."photos WHERE photo_id='$photo_id'"));
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=(photo_order-1) WHERE photo_order>'".$data['photo_order']."' AND album_id='$album_id'");
$result = dbquery("DELETE FROM ".$db_prefix."photos WHERE photo_id='$photo_id'");
$result = dbquery("DELETE FROM ".$db_prefix."comments WHERE comment_item_id='$photo_id' and comment_type='P'");
$result = dbquery("DELETE FROM ".$db_prefix."ratings WHERE rating_item_id='$photo_id' and rating_type='P'");
if ($data['photo_filename']) @unlink(PHOTODIR.$data['photo_filename']);
if ($data['photo_thumb1']) @unlink(PHOTODIR.$data['photo_thumb1']);
if ($data['photo_thumb2']) @unlink(PHOTODIR.$data['photo_thumb2']);
redirect(FUSION_SELF.$aidlink."&status=delpd&album_id=$album_id");
} elseif($action=="mup") {
if (!isNum($order)) fallback(FUSION_SELF.$aidlink."&album_id=$album_id");
$data = dbarray(dbquery("SELECT photo_id FROM ".$db_prefix."photos WHERE album_id='$album_id' AND photo_order='$order'"));
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=photo_order+1 WHERE photo_id='".$data['photo_id']."'");
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=photo_order-1 WHERE photo_id='$photo_id'");
$rowstart = $order > $settings['thumbs_per_page'] ? ((ceil($order / $settings['thumbs_per_page'])-1)*$settings['thumbs_per_page']) : "0";
redirect(FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart");
} elseif ($action=="mdown") {
if (!isNum($order)) fallback(FUSION_SELF.$aidlink."&album_id=$album_id");
$data = dbarray(dbquery("SELECT photo_id FROM ".$db_prefix."photos WHERE album_id='$album_id' AND photo_order='$order'"));
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=photo_order-1 WHERE photo_id='".$data['photo_id']."'");
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=photo_order+1 WHERE photo_id='$photo_id'");
$rowstart = $order > $settings['thumbs_per_page'] ? ((ceil($order / $settings['thumbs_per_page'])-1)*$settings['thumbs_per_page']) : "0";
redirect(FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart");
} elseif (isset($_POST['save_photo'])) {
$error="";
$photo_title = stripinput($_POST['photo_title']);
[color=red] $datawykonania = stripinput($_POST['datawykonania']);
$miejscezrobienia = stripinput($_POST['miejscezrobienia']);[/color]
$photo_description = stripinput($_POST['photo_description']);
$photo_order = isNum($_POST['photo_order']) ? $_POST['photo_order'] : "";
$photo_comments = isset($_POST['photo_comments']) ? "1" : "0";
$photo_ratings = isset($_POST['photo_ratings']) ? "1" : "0";
$photo_file = ""; $photo_thumb1 = ""; $photo_thumb2 = "";
if (is_uploaded_file($_FILES['photo_pic_file']['tmp_name'])) {
$photo_types = array(".gif",".jpg",".jpeg",".png");
$photo_pic = $_FILES['photo_pic_file'];
$photo_name = strtolower(substr($photo_pic['name'], 0, strrpos($photo_pic['name'], ".")));
$photo_ext = strtolower(strrchr($photo_pic['name'],"."));
$photo_dest = PHOTODIR;
if (!preg_match("/^[-0-9A-Z_\.\[\]]+$/i", $photo_pic['name'])) {
$error = 1;
} elseif ($photo_pic['size'] > $settings['photo_max_b']){
$error = 2;
} elseif (!in_array($photo_ext, $photo_types)) {
$error = 3;
} else {
$photo_file = image_exists($photo_dest, $photo_name.$photo_ext);
move_uploaded_file($photo_pic['tmp_name'], $photo_dest.$photo_file);
chmod($photo_dest.$photo_file, 0644);
$imagefile = @getimagesize($photo_dest.$photo_file);
if ($imagefile[0] > $settings['photo_max_w'] || $imagefile[1] > $settings['photo_max_h']) {
$error = 4;
unlink($photo_dest.$photo_file);
} else {
$photo_thumb1 = image_exists($photo_dest, $photo_name."_t1".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb1, $settings['thumb_w'], $settings['thumb_h']);
if ($imagefile[0] > $settings['photo_w'] || $imagefile[1] > $settings['photo_h']) {
$photo_thumb2 = image_exists($photo_dest, $photo_name."_t2".$photo_ext);
createthumbnail($imagefile[2], $photo_dest.$photo_file, $photo_dest.$photo_thumb2, $settings['photo_w'], $settings['photo_h']);
}
}
}
}
if (!$error) {
if ($action == "edit") {
$update_photos = $photo_file ? "photo_filename='$photo_file', photo_thumb1='$photo_thumb1', photo_thumb2='$photo_thumb2', " : "";
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_title='$photo_title', photo_description='$photo_description', ".$update_photos."photo_datestamp='".time()."', photo_allow_comments='$photo_comments',
photo_allow_ratings='$photo_ratings'[color=red], datawykonania='$datawykonania',[/color]
[color=red]miejscezrobienia='$miejscezrobienia',[/color] WHERE photo_id='$photo_id'");
$rowstart = $photo_order > $settings['thumbs_per_page'] ? ((ceil($photo_order / $settings['thumbs_per_page'])-1)*$settings['thumbs_per_page']) : "0";
redirect(FUSION_SELF.$aidlink."&status=savepu&album_id=$album_id&rowstart=$rowstart");
}else{
if (!$photo_order) $photo_order = dbresult(dbquery("SELECT MAX(photo_order) FROM ".$db_prefix."photos WHERE album_id='$album_id'"), 0) + 1;
$result = dbquery("UPDATE ".$db_prefix."photos SET photo_order=(photo_order+1) WHERE photo_order>='$photo_order' AND album_id='$album_id'");
$result = dbquery("INSERT INTO ".$db_prefix."photos (album_id, photo_title, photo_description, photo_filename, photo_thumb1, photo_thumb2, photo_datestamp, photo_user, photo_views, photo_order, photo_allow_comments, photo_allow_ratings, [color=red]datawykonania, miejscezrobienia[/color]) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$userdata['user_id']."', '0', '$photo_order', '$photo_comments',
'$photo_ratings', [color=red]'$datawykonania', '$miejscezrobienia'[/color])");
$rowstart = $photo_order > $settings['thumbs_per_page'] ? ((ceil($photo_order / $settings['thumbs_per_page'])-1)*$settings['thumbs_per_page']) : "0";
redirect(FUSION_SELF.$aidlink."&status=savepn&album_id=$album_id&rowstart=$rowstart");
}
}
if ($error) {
redirect(FUSION_SELF.$aidlink."&status=savepe&error=$error&album_id=$album_id");
}
}else{
if ($action == "edit") {
$result = dbquery("SELECT * FROM ".$db_prefix."photos WHERE photo_id='$photo_id'");
$data = dbarray($result);
$photo_title = $data['photo_title'];
[color=red] $miejscezrobienia = $data['miejscezrobienia'];
$datawykonania = $data['datawykonania'];[/color]
$photo_description = $data['photo_description'];
$photo_filename = $data['photo_filename'];
$photo_thumb1 = $data['photo_thumb1'];
$photo_thumb2 = $data['photo_thumb2'];
$photo_order = $data['photo_order'];
$photo_comments = $data['photo_allow_comments'] == "1" ? " checked" : "";
$photo_ratings = $data['photo_allow_ratings'] == "1" ? " checked" : "";
$formaction = FUSION_SELF.$aidlink."&action=edit&album_id=$album_id&photo_id=".$data['photo_id'];
opentable($locale['400']." - ($photo_id - $photo_title)");
}else{
$photo_title = "";
[color=red] $datawykonania = "";
$miejscezrobienia = "";[/color]
$photo_description = "";
$photo_filename = "";
$photo_thumb1 = "";
$photo_thumb2 = "";
$photo_order = "";
$photo_comments = " checked";
$photo_ratings = " checked";
$formaction = FUSION_SELF.$aidlink."&album_id=$album_id";
opentable($locale['401']);
}
echo "<form name='inputform' method='post' action='$formaction' enctype='multipart/form-data'>
<table align='center' cellspacing='0' cellpadding='0'>
<tr>
<td class='tbl'>".$locale['440']."</td>
<td class='tbl'><input type='textbox' name='photo_title' value='$photo_title' maxlength='100' class='textbox' style='width:330px;'></td>
</tr>
[color=red]<tr>
<td class='tbl'>Data wykonania:</td>
<td class='tbl'><input type='textbox' name='datawykonania' value='$datawykonania' maxlength='100' class='textbox' style='width:330px;'></td>
</tr>[/color]
[color=red]<tr>
<td class='tbl'>Miejsce zrobienia:</td>
<td class='tbl'><input type='textbox' name='miejscewykonania' value='$miejscezrobienia' maxlength='100' class='textbox' style='width:330px;'></td>
</tr>[/color]
<tr>
<td valign='top' class='tbl'>".$locale['441']."</td>
<td class='tbl'><textarea name='photo_description' rows='5' class='textbox' style='width:330px;'>$photo_description</textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('photo_description', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('photo_description', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('photo_description', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('photo_description', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('photo_description', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('photo_description', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('photo_description', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('photo_description', '[small]', '[/small]');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('photo_description', '[quote]', '[/quote]');\">
</td>
</tr>
<tr>\n";
if (!$action) {
echo "<td class='tbl'>".$locale['442']."</td>
<td class='tbl'><input type='textbox' name='photo_order' value='$photo_order' maxlength='5' class='textbox' style='width:40px;'></td>
</tr>";}
if ($action && $photo_thumb1 && file_exists(PHOTODIR.$photo_thumb1)) {
echo "<tr>\n<td valign='top' class='tbl'>".$locale['443']."</td>
<td class='tbl'><img src='".PHOTODIR.$photo_thumb1."' border='1' alt='$photo_thumb1'></td>
</tr>\n";
}
echo "<tr>\n<td valign='top' class='tbl'>".$locale['444'];
if ($action && $photo_thumb2 && file_exists(PHOTODIR.$photo_thumb2)) {
echo "<br><br>\n<a class='small' href='".FUSION_SELF.$aidlink."&action=deletepic&album_id=$album_id&photo_id=$photo_id'>".$locale['470']."</a></td>
<td class='tbl'><img src='".PHOTODIR.$photo_thumb2."' border='1' alt='$photo_thumb2'>";
} elseif ($action && $photo_filename && file_exists(PHOTODIR.$photo_filename)) {
echo "<br><br>\n<a class='small' href='".FUSION_SELF.$aidlink."&action=deletepic&album_id=$album_id&photo_id=$photo_id'>".$locale['470']."</a></td>
<td class='tbl'><img src='".PHOTODIR.$photo_filename."' border='1' alt='$photo_filename'>";
} else {
echo "</td>\n<td class='tbl'><input type='file' name='photo_pic_file' class='textbox' style='width:250px;'>\n";
}
echo "</td>
</tr>
<tr>
<td colspan='2' align='center' class='tbl'><br>
<input type='checkbox' name='photo_comments' value='yes'$photo_comments> ".$locale['445']."<br>
<input type='checkbox' name='photo_ratings' value='yes'$photo_ratings> ".$locale['446']."<br><br>
<input type='submit' name='save_photo' value='".$locale['447']."' class='button'>\n";
if ($action) {
echo "<input type='submit' name='cancel' value='".$locale['448']."' class='button'>\n";
echo "<input type='hidden' name='photo_order' value='$photo_order'>\n";
}
echo "</td></tr>\n</table></form>\n";
closetable();
}
tablebreak();
opentable($locale['460']);
$rows = dbcount("(photo_id)", "photos", "album_id='$album_id'");
if ($rows) {
$result = dbquery(
"SELECT tp.*, tu.user_id,user_name FROM ".$db_prefix."photos tp
LEFT JOIN ".$db_prefix."users tu ON tp.photo_user=tu.user_id
WHERE album_id='$album_id' ORDER BY photo_order
LIMIT $rowstart,".$settings['thumbs_per_page']
);
$counter = 0; $k = ($rowstart == 0 ? 1 : $rowstart + 1);
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
$up = ""; $down = "";
if ($rows != 1){
$orderu = $data['photo_order'] - 1;
$orderd = $data['photo_order'] + 1;
if ($k == 1) {
$down = " ·\n<a href='".FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart&action=mdown&order=$orderd&photo_id=".$data['photo_id']."'><img src='".THEME."images/right.gif' alt='".$locale['469']."' title='".$locale['469']."' border='0' style='vertical-align:middle'></a>\n";
} elseif ($k < $rows){
$up = "<a href='".FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart&action=mup&order=$orderu&photo_id=".$data['photo_id']."'><img src='".THEME."images/left.gif' alt='".$locale['468']."' title='".$locale['468']."' border='0' style='vertical-align:middle'></a> ·\n";
$down = " ·\n<a href='".FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart&action=mdown&order=$orderd&photo_id=".$data['photo_id']."'><img src='".THEME."images/right.gif' alt='".$locale['469']."' title='".$locale['469']."' border='0' style='vertical-align:middle'></a>\n";
} else {
$up = "<a href='".FUSION_SELF.$aidlink."&album_id=$album_id&rowstart=$rowstart&action=mup&order=$orderu&photo_id=".$data['photo_id']."'><img src='".THEME."images/left.gif' alt='".$locale['468']."' title='".$locale['468']."' border='0' style='vertical-align:middle'></a> ·\n";
}
}
if ($counter != 0 && ($counter % $settings['thumbs_per_row'] == 0)) echo "</tr>\n<tr>\n";
echo "<td align='center' valign='top' class='tbl' style='white-space:nowrap'>\n";
echo "<b>".$data['photo_title']."</b><br><br>\n";
if ($data['photo_thumb1'] && file_exists(PHOTODIR.$data['photo_thumb1'])){
echo "<img src='".PHOTODIR.$data['photo_thumb1']."' alt='".$locale['461']."' border='0'>";
} else {
echo $locale['462'];
}
echo "<br><br>\n<span class='small'>".$up;
echo "<a href='".FUSION_SELF.$aidlink."&action=edit&album_id=$album_id&photo_id=".$data['photo_id']."'>".$locale['469']."</a> ·\n";
echo "<a href='".FUSION_SELF.$aidlink."&action=delete&album_id=$album_id&photo_id=".$data['photo_id']."'>".$locale['470']."</a> ".$down;
echo "<br><br>\n".$locale['463'].showdate("shortdate", $data['photo_datestamp'])."<br>\n";
echo $locale['464']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
[color=red] Miejsce zrobienia: ".$data['miejscezrobienia']."<br>
Data zrobienienia: ".$data['datawykonania']."<br>\n";[/color]
echo $locale['465'].$data['photo_views']."<br>\n";
echo $locale['466'].dbcount("(comment_id)", "comments", "comment_type='P' AND comment_item_id='".$data['photo_id']."'")."</span><br>\n";
echo "</td>\n";
$counter++; $k++;
}
echo "</tr>\n<tr>\n<td align='center' colspan='".$settings['thumbs_per_row']."' class='tbl2'><a href='photoalbums.php".$aidlink."'>".$locale['481']."</a></td>\n</tr>\n</table>\n";
if ($rows > $settings['thumbs_per_page']) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$settings['thumbs_per_page'],$rows,3,FUSION_SELF.$aidlink."&album_id=$album_id&")."\n</div>\n";
}else{
echo "<center>".$locale['480']."</center>\n";
}
closetable();
echo "</td>\n";
require_once BASEDIR."footer.php";
?>
Edytowane przez kefirek dnia 05.05.2008 12:02:34
|
|
|
|
Piwi |
Dodany dnia 05.05.2008 11:15:50
|
Przedszkolak
Postów: 39
Data rejestracji: 27.05.2007 14:58
|
Niestety nie działa edycja. Wpisuję dane w pola i po kliknięciu "zapisz" nie zapisują się.. |
|
|
|
wlodekp |
Dodany dnia 05.05.2008 11:45:37
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
@kefirek ja odnoszę wrażenie, że Ty specjalnie to wszysko kaszanisz, żeby cały czas być na topie i były już takie opinie spradź najpierw łaskawie kod i dopiero go wstawiaj.
Temat na dwa trzy posty, przy Twoich zagrywkach rozrasta się do rzeki, morza i dalej grasz w kulki, aby znowu Ci kliknęli, a konkretna pomoc w lesie.
|
|
|