 |
 |
 |
 |
 |
Ostatnio widziani |
 |
 |
 |
 |
|
| Zarejestrowanych: 39,509 |
| Gości on-line: 16 |
|
|
 |
 |
 |
|
 |
 |
 |
 |
Zobacz Temat |
 |
 |
 |
 |
 |
 |
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 11:41 |
|
|
@turfik
Co do odejmowania punktów trzeba sprawdzić ilość punktów użytkownika i jeśli np. prezent kosztuje 10 pkt to sprawdza czy ma więcej niż 10 pkt.
Wyglądałoby to tak:
if ($userdata['user_points'] >= 10) {
echo "Możesz dać prezent";
$set = $userdata['user_points'] - 10; //odejmowanie 10 punktow
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' "); // odejmowanie 10 pkt z bazy
echo "10 punktów zostało zabranych";
} else {
echo "Masz za mało punktów aby dodać prezent. "; //komunikat jesli nie ma 10 pkt na koncie
}
Musisz jeszcze to wkomponować do pliku wtyczki prezenty_dodaj.php.
Nad:
if (isset($etap) && $etap=="1") {
dodajesz:
if ($userdata['user_points'] >= 10) {
$set = $userdata['user_points'] - 10;
Dalej szukasz:
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '1')");
oraz
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '0')");
i pod każdym z tych dwóch dodajesz:
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
Pozostaje tylko dodanie else gdy ktoś nie ma 10 pkt. Dodaj przed:
closetable();
} else {
opentable("Zaloguj sie");
kod:
} else {
echo "Masz za mało punktów aby dodać prezent. "; //komunikat jesli nie ma 10 pkt na koncie
}
Jakby coś nie działało to pisz bo nie sprawdzałem czy działa ;)
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:04 |
|
|
nie działa :( pisze ze mam za malo punkcików
a zmieniłam te 10-tki na 1 punkt wymagany
a oto kod :
cały z prezenty_dodaj:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once "../../side_left.php";
$zab = "Tutaj wstaw tekst dla odbiorcy prezentu";
if (file_exists(INFUSIONS."prezenty2/locale/".$settings['locale'].".php")) {
include INFUSIONS."prezenty2/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."prezenty2/locale/English.php";
}
if (iMEMBER) {
opentable("Dodaj prezent");
if ($userdata['user_points'] >= 1) { //ptk
$set = $userdata['user_points'] - 1; //ptk
if (isset($etap) && $etap=="1") {
$idzapytania = mysql_query("SELECT `prezent_id`,`prezent_nr`,`prezent_opis` FROM ".$db_prefix."prezenty_lista`");
echo "<div align='center'><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 1 ".$locale['ppa8']." 2</td>
</tr>
<tr>
<td colspan='4' class='tbl1'>".$locale['ppa1']."</td>
<td colspan='4' class='tbl1'>".$locale['ppa3']."</td>
<td colspan='4' class='tbl1' width='15%'>".$locale['ppa6']."</td>
</tr>";
echo "<form action='".FUSION_SELF."?etap=2' name='etap1' method='post'>";
while ($info = dbarray($idzapytania)) {
echo "
<tr>
<td colspan='4' width='15%' class='tbl1'>
<div align='center'><img src='".$info['prezent_nr']."' height='20' weight='20' border='0'></div>
</td>
<td colspan='4' width='15' class='tbl1'>
<div align='center' width='150'>". $info['prezent_opis'] ."</div>
</td>
<td colspan='4' width='15%' class='tbl1'>
<div align='center' width='15%'><input type='radio' name='prezent' value='".$info['prezent_id']."'></div>
</td>
</tr>
";
}
echo "</table><br><input value='".$locale['p22']."' name='etap1' class='button' type='submit' /><br>
".$locale['p21']."
</div><br> </form>";
}
if (isset($etap) && $etap=="2") {
$etap1 = $_POST['etap1'];
if ($etap1) {
$prezent = strip_tags($_POST['prezent']);
$prezent = addslashes($prezent);
$idzapytania = dbquery("SELECT `prezent_nr`, `prezent_opis` FROM ".$db_prefix."prezenty_lista WHERE prezent_id='$prezent'");
echo "<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 2 ".$locale['ppa8']." 2</td>
</tr>
<tr><td class='tbl1' colspan='4'><div align='center'>Wybrany prezent</div></td><td colspan='4' class='tbl1'><a href='".FUSION_SELF."?etap=1'>".$locale['pa4b']."</a><td><td></tr>
";
while ($dane = dbarray($idzapytania)) {
echo "
<tr><td colspan='4' width='15%' class='tbl1'><div align='center'><img src='".$dane['prezent_nr']."' height='20' weight='20' border='0'></div></td><td colspan='4' width='150' class='tbl1'><div align='center' width='150'>".$dane['prezent_opis']."</div></td></tr><table>";
}
echo "<br><br>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<form action='".FUSION_SELF."?etap=3' name='etap2' method='post'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p4']."</td>
<td colspan='4' width='30%' class='tbl1'><select name='odbiorca' class='textbox'>
";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_level<'104' ORDER BY user_name");
while ($data = dbarray($result)) {
echo "<option>".$data['user_name']."</option>\n";
}
echo "
</select></td>
</tr>
<input type='hidden' class='textbox' name='prezent' value='$prezent'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p5']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='text' class='textbox' width='50' name='tresc'>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p27']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='checkbox' name='ano'> <small>(".$locale['p28'].")</small>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'><input value='".$locale['p10']."' name='etap2' class='button' type='submit' /></td>
</td>
</tr>
</form>
</table>
";
//} else {
//echo "".$locale['p18']."";
//}
}
}
if (isset($etap) && $etap=="3") {
$etap2 = $_POST['etap2'];
if ($etap2) {
$odbiorca = strip_tags($_POST['odbiorca']);
$tresc = strip_tags($_POST['tresc']);
$ano = $_POST['ano'];
$prezent = strip_tags($_POST['prezent']);
if ($odbiorca == "" or $tresc == "" or $prezent == "") {
echo "".$locale['p18']."";
} else {
if (strlen($tresc) < 60) {
$odbiorca = addslashes($odbiorca);
$tresc = addslashes($tresc);
$prezent = addslashes($prezent);
if ($ano) {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '1')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' "); //ptk
} else {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '0')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' "); //ptk
}
} else {
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p20']."
</td></tr>
</table>";
}
}
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td colspan='3' class='tbl2'><center><font size='3' color='yellow'>Prezent został dodany użytkownikowi</font><center></td>
</tr>
<tr>
<td class='tbl2'><center><a href='../../index.php'>Strona Główna</a></td>
<td class='tbl2'><center><a href='prezenty_dodaj.php?etap=1'>Dodaj kolejny prezent</a></td>
<td class='tbl2'><center><a href='".BASEDIR."profile.php?lookup=$resule'>Profil Obdarowanej Osoby</a></td>
</tr>
</table>";
#=============
} else {
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p18']."</td></tr>
</table>";
}
}
} else { //ptk
echo "Masz za mało punktów aby dodać prezent. "; // nie ma 1 pkt na koncie
} //ptk
closetable();
} else {
opentable("Zaloguj sie");
echo "
<div align='center'>
<form name='loginform' method='post' action='setuser.php'>
<span class='color'>Login:</span><br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
<span class='color'>Haslo:</span><br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'><span class='color'>Zapamietaj mnie</span><br><br>
<input type='submit' name='login' value='Zaloguj' class='button'><br>
</form>
</div>
";
closetable();
}
require_once "../../side_right.php";
require_once "../../footer.php";
?>
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:08 |
|
|
Zamień:
if ($userdata['user_points'] >= 10) {
na to:
if(iMEMBER && show_points($userdata['user_id']) >= 10) {
Właśnie coś mi się wydawało, że było już kiedyś :P
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:18 |
|
|
nie odejmuje punktów ://
//EDIT
no niestety :(
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:21 |
|
|
Może zamień jeszcze:
$set = $userdata['user_points'] - 1;
na:
$set = show_points($userdata['user_points']) - 10;
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:34 |
|
|
nie ;/ hmn ciekawe dlaczemu może coś w pliku profile trzeba zmienic
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 12:50 |
|
|
Sprawdziłem i wszystko u mnie działa. Masz cały plik prezenty_dodaj.php:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once "../../side_left.php";
$zab = "Tutaj wstaw tekst dla odbiorcy prezentu";
if (file_exists(INFUSIONS."prezenty2/locale/".$settings['locale'].".php")) {
include INFUSIONS."prezenty2/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."prezenty2/locale/English.php";
}
if (iMEMBER) {
opentable("Dodaj prezent");
if(show_points($userdata['user_id']) >= 10) {
$set = $userdata['user_points'] - 10;
if (isset($etap) && $etap=="1") {
$idzapytania = mysql_query("SELECT `prezent_id`,`prezent_nr`,`prezent_opis` FROM ".$db_prefix."prezenty_lista`");
echo "<div align='center'><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 1 ".$locale['ppa8']." 2</td>
</tr>
<tr>
<td colspan='4' class='tbl1'>".$locale['ppa1']."</td>
<td colspan='4' class='tbl1'>".$locale['ppa3']."</td>
<td colspan='4' class='tbl1' width='15%'>".$locale['ppa6']."</td>
</tr>";
echo "<form action='".FUSION_SELF."?etap=2' name='etap1' method='post'>";
while ($info = dbarray($idzapytania)) {
echo "
<tr>
<td colspan='4' width='15%' class='tbl1'>
<div align='center'><img src='".$info['prezent_nr']."' height='96' weight='96' border='1'></div>
</td>
<td colspan='4' width='150' class='tbl1'>
<div align='center' width='150'>". $info['prezent_opis'] ."</div>
</td>
<td colspan='4' width='15%' class='tbl1'>
<div align='center' width='15%'><input type='radio' name='prezent' value='".$info['prezent_id']."'></div>
</td>
</tr>
";
}
echo "</table><br><input value='".$locale['p22']."' name='etap1' class='button' type='submit' /><br>
".$locale['p21']."
</div><br> </form>";
}
if (isset($etap) && $etap=="2") {
$etap1 = $_POST['etap1'];
if ($etap1) {
$prezent = strip_tags($_POST['prezent']);
$prezent = addslashes($prezent);
$idzapytania = dbquery("SELECT `prezent_nr`, `prezent_opis` FROM ".$db_prefix."prezenty_lista WHERE prezent_id='$prezent'");
echo "<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 2 ".$locale['ppa8']." 2</td>
</tr>
<tr><td class='tbl1' colspan='4'><div align='center'>Wybrany prezent</div></td><td colspan='4' class='tbl1'><a href='".FUSION_SELF."?etap=1'>".$locale['pa4b']."</a><td><td></tr>
";
while ($dane = dbarray($idzapytania)) {
echo "
<tr><td colspan='4' width='15%' class='tbl1'><div align='center'><img src='".$dane['prezent_nr']."' height='96' weight='96' border='1'></div></td><td colspan='4' width='150' class='tbl1'><div align='center' width='150'>".$dane['prezent_opis']."</div></td></tr><table>";
}
echo "<br><br>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<form action='".FUSION_SELF."?etap=3' name='etap2' method='post'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p4']."</td>
<td colspan='4' width='30%' class='tbl1'><select name='odbiorca' class='textbox'>
";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_level<'104' ORDER BY user_name");
while ($data = dbarray($result)) {
echo "<option>".$data['user_name']."</option>\n";
}
echo "
</select></td>
</tr>
<input type='hidden' class='textbox' name='prezent' value='$prezent'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p5']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='text' class='textbox' width='50' name='tresc'>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p27']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='checkbox' name='ano'> <small>(".$locale['p28'].")</small>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'><input value='".$locale['p10']."' name='etap2' class='button' type='submit' /></td>
</td>
</tr>
</form>
</table>
";
//} else {
//echo "".$locale['p18']."";
//}
}
}
if (isset($etap) && $etap=="3") {
$etap2 = $_POST['etap2'];
if ($etap2) {
$odbiorca = strip_tags($_POST['odbiorca']);
$tresc = strip_tags($_POST['tresc']);
$ano = $_POST['ano'];
$prezent = strip_tags($_POST['prezent']);
if ($odbiorca == "" or $tresc == "" or $prezent == "") {
echo "".$locale['p18']."";
} else {
if (strlen($tresc) < 60) {
$odbiorca = addslashes($odbiorca);
$tresc = addslashes($tresc);
$prezent = addslashes($prezent);
if ($ano) {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '1')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '0')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
}
} else {
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p20']."
</td></tr>
</table>";
}
}
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['pa15']." - <a href='../../index.php'>".$locale['p26']."</a>
</td></tr>
</table>";
} else {
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p18']."</td></tr>
</table>";
}
}
} else {
echo "Masz za malo punktów aby dodac prezent. ";
}
closetable();
} else {
opentable("Zaloguj sie");
echo "
<div align='center'>
<form name='loginform' method='post' action='setuser.php'>
<span class='color'>Login:</span><br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
<span class='color'>Haslo:</span><br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'><span class='color'>Zapamietaj mnie</span><br><br>
<input type='submit' name='login' value='Zaloguj' class='button'><br>
</form>
</div>
";
closetable();
}
require_once "../../side_right.php";
require_once "../../footer.php";
?>
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 13:20 |
|
|
U mnie punktów nie odejmuje :/
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 08-11-2009 13:42 |
|
|
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once "../../side_left.php";
$zab = "Tutaj wstaw tekst dla odbiorcy prezentu";
if (file_exists(INFUSIONS."prezenty2/locale/".$settings['locale'].".php")) {
include INFUSIONS."prezenty2/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."prezenty2/locale/English.php";}
if (iMEMBER) {
opentable("Daj prezencik");
if(show_points($userdata['user_id']) >= 10) {
$set = $userdata['user_points'] - 10;
if (isset($etap) && $etap=="1") {
$idzapytania = mysql_query("SELECT `prezent_id`,`prezent_nr`,`prezent_opis` FROM ".$db_prefix."prezenty_lista`");
echo "<div align='center'><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl1'>".$locale['ppa7']." 1 ".$locale['ppa8']." 2</td></tr><tr>
<td colspan='4' class='tbl1'>".$locale['ppa1']."</td>
<td colspan='4' class='tbl1'>".$locale['ppa3']."</td>
<td colspan='4' class='tbl1' width='15%'>".$locale['ppa6']."</td></tr>";
echo "<form action='".FUSION_SELF."?etap=2' name='etap1' method='post'>";
while ($info = dbarray($idzapytania)) {
echo "<tr><td colspan='4' width='15%' class='tbl1'>
<div align='center'><img src='".$info['prezent_nr']."' height='20' weight='20' border='0'></div></td>
<td colspan='4' width='15' class='tbl1'>
<div align='center' width='150'>". $info['prezent_opis'] ."</div></td>
<td colspan='4' width='15%' class='tbl1'>
<div align='center' width='15%'><input type='radio' name='prezent' value='".$info['prezent_id']."'></div></td></tr>";}
echo "</table><br><input value='".$locale['p22']."' name='etap1' class='button' type='submit' /><br>
".$locale['p21']."
</div><br> </form>";}
if (isset($etap) && $etap=="2") {
$etap1 = $_POST['etap1'];
if ($etap1) {
$prezent = strip_tags($_POST['prezent']);
$prezent = addslashes($prezent);
$idzapytania = dbquery("SELECT `prezent_nr`, `prezent_opis` FROM ".$db_prefix."prezenty_lista WHERE prezent_id='$prezent'");
echo "<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl1'>".$locale['ppa7']." 2 ".$locale['ppa8']." 2</td></tr>
<tr><td class='tbl1' colspan='4'><div align='center'>Wybrany prezent</div></td><td colspan='4' class='tbl1'><a href='".FUSION_SELF."?etap=1'>".$locale['pa4b']."</a><td><td></tr>";
while ($dane = dbarray($idzapytania)) {
echo "<tr><td colspan='4' width='15%' class='tbl1'><div align='center'><img src='".$dane['prezent_nr']."' height='20' weight='20' border='0'></div></td><td colspan='4' width='150' class='tbl1'><div align='center' width='150'>".$dane['prezent_opis']."</div></td></tr><table>";}
echo "<br><br>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<form action='".FUSION_SELF."?etap=3' name='etap2' method='post'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p4']."</td>
<td colspan='4' width='30%' class='tbl1'><select name='odbiorca' class='textbox'>
";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_level<'104' ORDER BY user_name");
while ($data = dbarray($result)) {
echo "<option>".$data['user_name']."</option>\n";
}
echo "</select></td>
</tr>
<input type='hidden' class='textbox' name='prezent' value='$prezent'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p5']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='text' class='textbox' width='50' name='tresc'></td></tr><tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p27']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='checkbox' name='ano'> <small>(".$locale['p28'].")</small></td></tr><tr>
<td colspan='4' width='15%' class='tbl1'><input value='".$locale['p10']."' name='etap2' class='button' type='submit' /></td></td></tr></form></table>";
//} else {
//echo "".$locale['p18']."";
//}}}
if (isset($etap) && $etap=="3") {
$etap2 = $_POST['etap2'];
if ($etap2) {
$odbiorca = strip_tags($_POST['odbiorca']);
$tresc = strip_tags($_POST['tresc']);
$ano = $_POST['ano'];
$prezent = strip_tags($_POST['prezent']);
if ($odbiorca == "" or $tresc == "" or $prezent == "") {
echo "".$locale['p18']."";
} else {
if (strlen($tresc) < 60) {
$odbiorca = addslashes($odbiorca);
$tresc = addslashes($tresc);
$prezent = addslashes($prezent);
if ($ano) {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '1')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '0')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
}
} else {
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p20']."
</td></tr>
</table>";
}
}
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td colspan='3' class='tbl2'><center><font size='3' color='yellow'>Prezent został dodany użytkownikowi</font><center></td>
</tr>
<tr>
<td class='tbl2'><center><a href='../../index.php'>Strona Główna</a></td>
<td class='tbl2'><center><a href='prezenty_dodaj.php?etap=1'>Dodaj kolejny prezent</a></td>
<td class='tbl2'><center><a href='".BASEDIR."profile.php?lookup=$resule'>Profil Obdarowanej Osoby</a></td>
</tr>
</table>";
#=============
} else {
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p18']."</td></tr>
</table>";
}
}
} else { //ptk
echo "Masz za mało punktów aby dodać prezent. "; // nie ma 1 pkt na koncie
} //ptk
closetable();
} else {
opentable("Zaloguj sie");
echo "
<div align='center'>
<form name='loginform' method='post' action='setuser.php'>
<span class='color'>Login:</span><br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
<span class='color'>Haslo:</span><br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'><span class='color'>Zapamietaj mnie</span><br><br>
<input type='submit' name='login' value='Zaloguj' class='button'><br>
</form>
</div>";
closetable();
}
require_once "../../side_right.php";
require_once "../../footer.php";
?>
kłamczuszek
o nie
kłamczuch !
nie działa -naprawde :(
może jak sierściak przyjdzie to coś poradzi
a moze to:
-jak uzytkownik daje prezenty to odejmują mu sie punkty(jak ma 0 to nie może dawać)
-po najechaniu na prezent w profilu uzytkownika(chodzi juz o te dane prezenty) on sie powieksza :P
hihi miliony pomysłów na sekunde ;p
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 09-11-2009 01:18 |
|
|
Kurna @turfik zamotała punktami ale zgubił sie wątek profilu ja nie czaję jeszcze wysysania z bazy i pewnie jeszcze długo się tego nie nauczę ale na moje myślenie tępaka musi to być cos w stylu
$odbiorca = userdata[user_name]
userdata[user_name] = userdata[user_id]
userdata[user_id] = $profil
wiem wiem zamotałem ale nie znam się na tym może to niema być tak i jest prostszy sposób, punkty mnie nie interesują tylko ten link by to działało pozdro al
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 09-11-2009 10:00 |
|
|
no to tak :P
"zrobimy" ten link co powraca na strone uzytkownika
punkciki
oraz onmouseover :)
później będziemy świetować ^^ :)
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 09-11-2009 14:33 |
|
|
Powrót do strony użytkownika do będzie:
$result = dbquery("SELECT user_id FROM ".$db_prefix."users WHERE user_name='".$odbiorca."' ");
$id = dbarray($result);
echo "<a href='profile.php?lookup=".$id['user_id']."'>Wróć na profil użytkownika</a>";
Myślę, że powinno być dobrze.
Co do tych punktów to sprawdzę później co z nimi nie tak ale jakoś u mnie odejmuje O.o @turfik - Sprawdzę ten Twój plik bo widziałem, że jest trochę zmodyfikowany i może w złym miejscu jest kod.
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 09-11-2009 17:31 |
|
|
hoho ale gdzie jak to u mnie dodac ;p
probowalam ale wychodzilo pozniej
ze brak strony
bo ja mam troszke pozmieniane ;p
zreszta wyslalam swoje *.php ;p
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 09-11-2009 18:58 |
|
|
No i oto się chechlało hahaha dzieki @Xana
@turfik znajdż w pliku prezenty_dodaj.php to
echo "
<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td colspan='3' class='tbl2'><center><font size='3' color='yellow'>Prezent został dodany użytkownikowi</font><center></td>
</tr>
<tr>
<td class='tbl2'><center><a href='../../index.php'>Strona Główna</a></td>
<td class='tbl2'><center><a href='prezenty_dodaj.php?etap=1'>Dodaj kolejny prezent</a></td>
<td class='tbl2'><center><a href='profile.php?lookup=$resule'>Profil Obdarowanej Osoby</a></td>
</tr>
</table>";
I nad tym wklej to
$result = dbquery("SELECT user_id FROM ".$db_prefix."users WHERE user_name='".$odbiorca."' ");
$id = dbarray($result);
Teraz te linie znajduje się w kawałku szukanym wyżej
<td class='tbl2'><center><a href='profile.php?lookup=$resule'>Profil Obdarowanej Osoby</a></td>
zamień na
<td class='tbl2'><center><a href='profile.php?lookup=".$id['user_id']."'>Profil Obdarowanej Osoby</a></td>
Pozdro all
|
|
|
| RE: Wtyczka prezentów 2 || Dodane dnia 10-11-2009 07:45 |
|
|
Po przyjrzeniu się wtyczce mam kilka zastrzeżeń, mógł byś dać zablokowanie możliwości dodania prezentu samemu sobie, to nie jest trudne, pobrać id usera i sprawdzić czy id profilu nie jest takie same. Tabeli są tragiczne, nie równe i nie pasujące do siebie krawędziami. Ale pomysł jest ciekawy. Zaraz zacznę robić to po swojemu ;)
|
|
|
| RE: [EF] [INF] prezenty v2.0 || Dodane dnia 10-11-2009 13:00 |
|
|
no to zobacze jak wroce do domku co i jak :P
a ten tego no .....
co to ja mia łam .....
a te inne rzeczy takie ciut ciut malutkie < prosi > :P
wg mnie ta wtyczka wygra konkurs wszystkich wtyczek jakby byl taki oczywiscie :)
|
|
|
| RE: [EF] [INF] prezenty v2.0 || Dodane dnia 10-11-2009 14:17 |
|
|
@Rafik89
Możesz robić ;) Jak będę miał jeszcze czas to zrobię kolejną wersje poprawiając to co pisaliście.
"Tabeli są tragiczne, nie równe i nie pasujące do siebie krawędziami." Nie rozumiem tylko tego. Gdzie tak jest?
Co do blokady dodania prezentu samemu sobie - moje niedopatrzenie. Będzie dodane. W następnej wersji dodam również możliwość zablokowania dostawania prezentów jakby ktoś nie chciał.
|
|
|
| RE: [EF] [INF] prezenty v2.0 || Dodane dnia 10-11-2009 18:14 |
|
|
Xena mam już napisany nowy panel administracyjny do tej wtyczki :)
Dobry pomysł blokady;P Tabelki widziałem gdzieś nie równe były chyba w dodawaniu prezentu coś nie grało.
|
|
|
| RE: [EF] [INF] prezenty v2.0 || Dodane dnia 10-11-2009 19:39 |
|
|
mężczyźni
INO gadają :P
a jak co do działania przychodzi to ....... 2 minuty sławy i klaps ^^
zrobiłam tak i
http://my-php.net/notify/1.php :(
żeby nie bylo kod:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once "../../side_left.php";
$zab = "Tutaj wstaw tekst dla odbiorcy prezentu";
if (file_exists(INFUSIONS."prezenty2/locale/".$settings['locale'].".php")) {
include INFUSIONS."prezenty2/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."prezenty2/locale/English.php";
}
if (iMEMBER) {
opentable("");
if(show_points($userdata['user_id']) >= 10) {
$set = $userdata['user_points'] - 10;
if (isset($etap) && $etap=="1") {
$idzapytania = mysql_query("SELECT `prezent_id`,`prezent_nr`,`prezent_opis` FROM ".$db_prefix."prezenty_lista`");
echo "<div align='center'><table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 1 ".$locale['ppa8']." 2</td>
</tr><tr>
<td colspan='4' class='tbl1'>".$locale['ppa1']."</td>
<td colspan='4' class='tbl1'>".$locale['ppa3']."</td>
<td colspan='4' class='tbl1' width='15%'>".$locale['ppa6']."</td>
</tr>";
echo "<form action='".FUSION_SELF."?etap=2' name='etap1' method='post'>";
while ($info = dbarray($idzapytania)) {
echo "
<tr>
<td colspan='4' width='15%' class='tbl1'>
<div align='center'><img src='".$info['prezent_nr']."' height='20' weight='20' border='0'></div>
</td>
<td colspan='4' width='15' class='tbl1'>
<div align='center' width='150'>". $info['prezent_opis'] ."</div>
</td>
<td colspan='4' width='15%' class='tbl1'>
<div align='center' width='15%'><input type='radio' name='prezent' value='".$info['prezent_id']."'></div></td></tr>";
}
echo "</table><br><input value='".$locale['p22']."' name='etap1' class='button' type='submit' /><br>
".$locale['p21']."
</div><br> </form>";
}
if (isset($etap) && $etap=="2") {
$etap1 = $_POST['etap1'];
if ($etap1) {
$prezent = strip_tags($_POST['prezent']);
$prezent = addslashes($prezent);
$idzapytania = dbquery("SELECT `prezent_nr`, `prezent_opis` FROM ".$db_prefix."prezenty_lista WHERE prezent_id='$prezent'");
echo "<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl1'>".$locale['ppa7']." 2 ".$locale['ppa8']." 2</td>
</tr>
<tr><td class='tbl1' colspan='4'><div align='center'>Wybrany prezent</div></td><td colspan='4' class='tbl1'><a href='".FUSION_SELF."?etap=1'>".$locale['pa4b']."</a><td><td></tr>
";
while ($dane = dbarray($idzapytania)) {
echo "
<tr><td colspan='4' width='15%' class='tbl1'><div align='center'><img src='".$dane['prezent_nr']."' height='20' weight='20' border='0'></div></td><td colspan='4' width='150' class='tbl1'><div align='center' width='150'>".$dane['prezent_opis']."</div></td></tr><table>";
}
echo "<br><br>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<form action='".FUSION_SELF."?etap=3' name='etap2' method='post'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p4']."</td>
<td colspan='4' width='30%' class='tbl1'><select name='odbiorca' class='textbox'>
";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_level<'104' ORDER BY user_name");
while ($data = dbarray($result)) {
echo "<option>".$data['user_name']."</option>\n";
}
echo "</select></td>
</tr>
<input type='hidden' class='textbox' name='prezent' value='$prezent'>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p5']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='text' class='textbox' width='50' name='tresc'>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'>".$locale['p27']."</td>
<td colspan='4' width='30%' class='tbl1'><input type='checkbox' name='ano'> <small>(".$locale['p28'].")</small>
</td>
</tr>
<tr>
<td colspan='4' width='15%' class='tbl1'><input value='".$locale['p10']."' name='etap2' class='button' type='submit' /></td>
</td>
</tr>
</form>
</table>
";
}
}
if (isset($etap) && $etap=="3") {
$etap2 = $_POST['etap2'];
if ($etap2) {
$odbiorca = strip_tags($_POST['odbiorca']);
$tresc = strip_tags($_POST['tresc']);
$ano = $_POST['ano'];
$prezent = strip_tags($_POST['prezent']);
if ($odbiorca == "" or $tresc == "" or $prezent == "") {
echo "".$locale['p18']."";
} else {
if (strlen($tresc) < 60) {
$odbiorca = addslashes($odbiorca);
$tresc = addslashes($tresc);
$prezent = addslashes($prezent);
if ($ano) {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '1')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."prezenty (prezent_id, prezent_do, prezent_nr, prezent_tresc, prezent_od, prezent_ano) VALUES ('', '$odbiorca', '$prezent', '$tresc', '".$userdata['user_name']."', '0')");
$result = dbquery("UPDATE ".$db_prefix."users SET user_points='".$set."' WHERE user_id='".$userdata['user_id']."' ");
}
} else {
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p20']."
</td></tr>
</table>";
}
}
$result = dbquery("SELECT user_id FROM ".$db_prefix."users WHERE user_name='".$odbiorca."' ");
$id = dbarray($result);
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td colspan='3' class='tbl2'><center><font size='3' color='yellow'>Prezent został dodany użytkownikowi</font><center></td>
</tr>
<tr>
<td class='tbl2'><center><a href='../../index.php'>Strona Główna</a></td>
<td class='tbl2'><center><a href='prezenty_dodaj.php?etap=1'>Dodaj kolejny prezent</a></td>
<td class='tbl2'><center><a href='profile.php?lookup=".$id['user_id']."'>Profil Obdarowanej Osoby</a></td>
</tr>
</table>";
} else {
echo "<table align='center' width='80%' cellpadding='0' cellspacing='1' class='tbl-border'><tr>
<td class='tbl2'>
".$locale['p18']."</td></tr>
</table>";
}
}
} else {
echo "Masz za mało punktów aby dodać prezent.";
}
closetable();
} else {
opentable("");
echo "
<div align='center'>
<form name='loginform' method='post' action='setuser.php'>
<span class='color'>student:</span><br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
<span class='color'>haslo:</span><br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'><span class='color'>Zapamietaj mnie</span><br><br>
<input type='submit' name='login' value='ok' class='button'><br>
</form>
</div>";
closetable();
}
require_once "../../side_right.php";
require_once "../../footer.php";
?>
|
|
|
| RE: [EF] [INF] prezenty v2.0 || Dodane dnia 11-11-2009 02:40 |
|
|
Witam no to ja nie mogę być gorszy i wyjść na lenia więc pomyślałem nad dymkami a więc do rzeczy
1 tworzwmy 2 pliku
1.1 p nazwie thumbnailviewer.js
// -------------------------------------------------------------------
// Image Thumbnail Viewer Script- By Dynamic Drive, available at: http://www.dynamicdrive.com
// Last updated: July 7th, 2008- Fixed enlarged image not showing in IE sometimes
// -------------------------------------------------------------------
var thumbnailviewer={
enableTitle: true, //Should "title" attribute of link be used as description?
enableAnimation: true, //Enable fading animation?
definefooter: '<div class="footerbar">CLOSE X</div>', //Define HTML for footer interface
defineLoading: '<img src="loading.gif" /> Loading Image...', //Define HTML for "loading" div
/////////////No need to edit beyond here/////////////////////////
scrollbarwidth: 16,
opacitystring: 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=10); -moz-opacity: 0.1; opacity: 0.1',
targetlinks:[], //Array to hold links with rel="thumbnail"
createthumbBox:function(){
//write out HTML for Image Thumbnail Viewer plus loading div
document.write('<div id="thumbBox" onClick="thumbnailviewer.closeit()"><div id="thumbImage"></div>'+this.definefooter+'</div>')
document.write('<div id="thumbLoading">'+this.defineLoading+'</div>')
this.thumbBox=document.getElementById("thumbBox")
this.thumbImage=document.getElementById("thumbImage") //Reference div that holds the shown image
this.thumbLoading=document.getElementById("thumbLoading") //Reference "loading" div that will be shown while image is fetched
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
},
centerDiv:function(divobj){ //Centers a div element on the page
var ie=document.all && !window.opera
var dom=document.getElementById
var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth
var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document
var objwidth=divobj.offsetWidth //width of div element
var objheight=divobj.offsetHeight //height of div element
var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px" //Vertical position of div element: Either centered, or if element height larger than viewpoint height, 10px from top of viewpoint
divobj.style.left=docwidth/2-objwidth/2+"px" //Center div element horizontally
divobj.style.top=Math.floor(parseInt(topposition))+"px"
divobj.style.visibility="visible"
},
showthumbBox:function(){ //Show ThumbBox div
thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div
this.centerDiv(this.thumbBox)
if (this.enableAnimation){ //If fading animation enabled
this.currentopacity=0.1 //Starting opacity value
this.opacitytimer=setInterval("thumbnailviewer.opacityanimation()", 20)
}
},
loadimage:function(link){ //Load image function that gets attached to each link on the page with rel="thumbnail"
if (this.thumbBox.style.visibility=="visible") //if thumbox is visible on the page already
this.closeit() //Hide it first (not doing so causes triggers some positioning bug in Firefox
var imageHTML='<img src="'+link.getAttribute("href")+'" style="'+this.opacitystring+'" />' //Construct HTML for shown image
if (this.enableTitle && link.getAttribute("title")) //Use title attr of the link as description?
imageHTML+='<br />'+link.getAttribute("title")
this.centerDiv(this.thumbLoading) //Center and display "loading" div while we set up the image to be shown
this.thumbImage.innerHTML=imageHTML //Populate thumbImage div with shown image's HTML (while still hidden)
this.featureImage=this.thumbImage.getElementsByTagName("img")[0] //Reference shown image itself
if (this.featureImage.complete)
thumbnailviewer.showthumbBox()
else{
this.featureImage.onload=function(){ //When target image has completely loaded
thumbnailviewer.showthumbBox() //Display "thumbbox" div to the world!
}
}
if (document.all && !window.createPopup) //Target IE5.0 browsers only. Address IE image cache not firing onload bug: panoramio.com/blog/onload-event/
this.featureImage.src=link.getAttribute("href")
this.featureImage.onerror=function(){ //If an error has occurred while loading the image to show
thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div, game over
}
},
setimgopacity:function(value){ //Sets the opacity of "thumbimage" div per the passed in value setting (0 to 1 and in between)
var targetobject=this.featureImage
if (targetobject.filters && targetobject.filters[0]){ //IE syntax
if (typeof targetobject.filters[0].opacity=="number") //IE6
targetobject.filters[0].opacity=value*100
else //IE 5.5
targetobject.style.filter="alpha(opacity="+value*100+")"
}
else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
targetobject.style.MozOpacity=value
else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
targetobject.style.opacity=value
else //Non of the above, stop opacity animation
this.stopanimation()
},
opacityanimation:function(){ //Gradually increase opacity function
this.setimgopacity(this.currentopacity)
this.currentopacity+=0.1
if (this.currentopacity>1)
this.stopanimation()
},
stopanimation:function(){
if (typeof this.opacitytimer!="undefined")
clearInterval(this.opacitytimer)
},
closeit:function(){ //Close "thumbbox" div function
this.stopanimation()
this.thumbBox.style.visibility="hidden"
this.thumbImage.innerHTML=""
this.thumbBox.style.left="-2000px"
this.thumbBox.style.top="-2000px"
},
cleanup:function(){ //Clean up routine on page unload
this.thumbLoading=null
if (this.featureImage) this.featureImage.onload=null
this.featureImage=null
this.thumbImage=null
for (var i=0; i<this.targetlinks.length; i++)
this.targetlinks[i].onclick=null
this.thumbBox=null
},
dotask:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
},
init:function(){ //Initialize thumbnail viewer script by scanning page and attaching appropriate function to links with rel="thumbnail"
if (!this.enableAnimation)
this.opacitystring=""
var pagelinks=document.getElementsByTagName("a")
for (var i=0; i<pagelinks.length; i++){ //BEGIN FOR LOOP
if (pagelinks[i].getAttribute("rel") && pagelinks[i].getAttribute("rel")=="thumbnail"){ //Begin if statement
pagelinks[i].onclick=function(){
thumbnailviewer.stopanimation() //Stop any currently running fade animation on "thumbbox" div before proceeding
thumbnailviewer.loadimage(this) //Load image
return false
}
this.targetlinks[this.targetlinks.length]=pagelinks[i] //store reference to target link
} //end if statement
} //END FOR LOOP
//Reposition "thumbbox" div when page is resized
this.dotask(window, function(){if (thumbnailviewer.thumbBox.style.visibility=="visible") thumbnailviewer.centerDiv(thumbnailviewer.thumbBox)}, "resize")
} //END init() function
}
thumbnailviewer.createthumbBox() //Output HTML for the image thumbnail viewer
thumbnailviewer.dotask(window, function(){thumbnailviewer.init()}, "load") //Initialize script on page load
thumbnailviewer.dotask(window, function(){thumbnailviewer.cleanup()}, "unload")
1.2 o nazwie thumbnailviewer.css
#thumbBox{ /*Outermost DIV for thumbnail viewer*/
position: absolute;
left: 0;
top: 0;
width: auto;
padding: 10px;
padding-bottom: 0;
background: #313131;
visibility: hidden;
z-index: 10;
cursor: hand;
cursor: pointer;
}
#thumbBox .footerbar{ /*Footer DIV of thumbbox that contains "close" link */
font: bold 25px Tahoma;
letter-spacing: 10px;
line-height: 1.1em;
color: red;
padding: 10px 0;
text-align: center;
}
#thumbBox #thumbImage{ /*DIV within thumbbox that holds the enlarged image */
background-color: black;
}
#thumbLoading{ /*DIV for showing "loading" status while thumbbox is being generated*/
position: absolute;
visibility: hidden;
border: 1px solid black;
background-color: #EFEFEF;
padding: 5px;
z-index: 5;
}
2 obydwoje wrzucamy do katalogu INCLUDES z tym że plik css możemy a raczej powinniśmy edytować byle nie notatnikiem i dostosować do swoich potrzeb kolory czcionki rozmiary itd.
3 zasysamy plik subheader.php i do niego dodajemy to
<link rel='stylesheet' href='".INCLUDES."thumbnailviewer.css' type='text/css'/>
<script type='text/javascript' src='".INCLUDES."thumbnailviewer.js'></script>
4 zapisujemy i wrzucamy na server
5 teraz w pliku profiles.php szukamy tej linji
echo "<img src='".INFUSIONS."/prezenty2/".$img['prezent_nr']."' title='".$prezenty['prezent_od']." - ".$prezenty['prezent_tresc']."' width='30' height='30'>";
i zmieniamy na tą
echo "<a href='".INFUSIONS."/prezenty2/".$img['prezent_nr']."' rel='thumbnail' title='".$prezenty['prezent_od']." - ".$prezenty['prezent_tresc']."'><img src='".INFUSIONS."/prezenty2/".$img['prezent_nr']."' style='width: 30px; height: 30px'/></a>";
6 zapisujemy wrzucamy na server i cieszymy się fajnymi dymkami
Pozdro dla ekipy i extrememaniaków mam nadzieje że niczego nie pomieszałem
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
Szybka Odpowiedź |
 |
 |
 |
 |
 |
 |
Temat został zablokowany bądź nie zaakceptowałeś jeszcze regulaminu dostępnego TUTAJ
|
 |
 |
 |
 |
|