Na początku do Stron Informacyjnych wklejamy:
<?php
$result = dbquery("INSERT INTO ".$db_prefix."eps_points VALUES ('6', 'Photo', '6')");
$result = dbquery("INSERT INTO ".$db_prefix."eps_points VALUES ('7', 'SMS', '7')");
$result = dbquery("INSERT INTO ".$db_prefix."eps_points VALUES ('8', 'Joke', '8')");
$result = dbquery("INSERT INTO ".$db_prefix."eps_points VALUES ('9', 'Descriptions', '9')");
$result = dbquery("INSERT INTO ".$db_prefix."eps_points VALUES ('10', 'Movie', '10')");
?>
Kliknij podgląd i wyjdź, nie zapisuj.
Plik infusions/EPS/eps_settings.php:
Pod:
if (isset($_POST['points'])) {
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$forum' WHERE point_id='1'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$shout' WHERE point_id='2'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$link' WHERE point_id='3'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$article' WHERE point_id='4'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$news' WHERE point_id='5'");
Dodaj:
//NOWE LINIJKI
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$foto' WHERE point_id='6'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$sms' WHERE point_id='7'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$joke' WHERE point_id='8'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$desc' WHERE point_id='9'");
$result = dbquery("UPDATE ".$db_prefix."eps_points SET point_ammount='$movie' WHERE point_id='10'");
//
Pod:
$row4 = dbquery("SELECT point_ammount FROM ".$db_prefix."eps_points WHERE point_id='4'");
$points4=dbarray($row4);
$article = $points4['point_ammount'];
$row5 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='5'");
$points5=dbarray($row5);
$news = $points5['point_ammount'];
Dodaj:
//NOWE LINIJKI
$row6 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='6'");
$points6=dbarray($row6);
$foto = $points6['point_ammount'];
$row7 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='7'");
$points7=dbarray($row7);
$sms = $points7['point_ammount'];
$row8 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='8'");
$points8=dbarray($row8);
$joke = $points8['point_ammount'];
$row9 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='9'");
$points9=dbarray($row9);
$desc = $points9['point_ammount'];
$row10 = dbquery("SELECT * FROM ".$db_prefix."eps_points WHERE point_id='10'");
$points10=dbarray($row10);
$movie = $points10['point_ammount'];
//
Pod:
<tr>
<td width='250'>".EPS_004."</td><td><input type='text' name='link' value='".$link."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>".EPS_005."</td><td><input type='text' name='article' value='".$article."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>".EPS_006."</td><td><input type='text' name='news' value='".$news."' class='textbox' style='width:50px;'></td>
</tr>
Dodaj:
echo "<tr>
<td width='250'>Zdjęcie: </td><td><input type='text' name='foto' value='".$foto."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>SMS: </td><td><input type='text' name='sms' value='".$sms."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>Dowcip: </td><td><input type='text' name='joke' value='".$joke."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>Opis: </td><td><input type='text' name='desc' value='".$desc."' class='textbox' style='width:50px;'></td>
</tr>
<tr>
<td width='250'>Filmik: </td><td><input type='text' name='movie' value='".$movie."' class='textbox' style='width:50px;'></td>
</tr>";
//
------------------------------------------------------------------------------
Plik infusions/extreme_opis/opis_add.php
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."opis_cat");
if (dbrows($result) != 0) {
if ($step == "delete")
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT opis_nick FROM ".$db_prefix."opis WHERE opis_id='$opis_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='9'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['opis_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."opis VALUES('', '$opis_nick', '$opis_mail', '$opis_name', '$opis_description', '$opis_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='9'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$opis_nick'");
//
------------------------------------------------------------------------------
Plik infusions/extreme_opis/opis_admin.php:
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."opis_cat");
if (dbrows($result) != 0) {
if ($step == "delete") {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT opis_nick FROM ".$db_prefix."opis WHERE opis_id='$opis_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='9'"));
$result2 = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['opis_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."opis VALUES('', '$opis_nick', '$opis_mail', '$opis_name', '$opis_description', '$opis_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='9'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$opis_nick'");
//
------------------------------------------------------------------------------
Plik infusions/extreme_sms/sms_add.php
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."joke_cat");
if (dbrows($result) != 0) {
if ($step == "delete") {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT joke_nick FROM ".$db_prefix."joke WHERE joke_id='$joke_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='7'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['joke_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."joke VALUES('', '$joke_nick', '$joke_mail', '$joke_name', '$joke_description', '$joke_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='7'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$joke_nick'");
//
------------------------------------------------------------------------------
infusions/extreme_sms/sms_admin.php:
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."joke_cat");
if (dbrows($result) != 0) {
if ($step == "delete") {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT joke_nick FROM ".$db_prefix."joke WHERE joke_id='$joke_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='7'"));
$result2 = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['joke_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."joke VALUES('', '$joke_nick', '$joke_mail', '$joke_name', '$joke_description', '$joke_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='7'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$joke_nick'");
//
------------------------------------------------------------------------------
Plik infusions/extreme_joke/joken_add.php:
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."joken_cat");
if (dbrows($result) != 0) {
if ($step == "delete") {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT joken_nick FROM ".$db_prefix."joken WHERE joken_id='$joken_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='8'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['joken_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."joken VALUES('', '$joken_nick', '$joken_mail', '$joken_name', '$joken_description', '$joken_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='8'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$joken_nick'");
//
------------------------------------------------------------------------------
Plik infusions/extreme_joke/joken_admin.php:
Pod:
$result = dbquery("SELECT * FROM ".$db_prefix."joken_cat");
if (dbrows($result) != 0) {
if ($step == "delete") {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT joken_nick FROM ".$db_prefix."joken WHERE joken_id='$joken_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='8'"));
$result2 = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$nick['joken_nick']."'");
//
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."joken VALUES('', '$joken_nick', '$joken_mail', '$joken_name', '$joken_description', '$joken_cat', '".time()."')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='8'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_name='$joken_nick'");
//
------------------------------------------------------------------------------
Plik administration/photos.php:
Pod:
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[b],photo_user[/b] FROM ".$db_prefix."photos WHERE photo_id='$photo_id'"));
dodaj:
//ODEJMOWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='6'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_name='".$data['photo_user']."'");
//
Pamiętaj także dodać pogrubione do zapytania!
Pod:
$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) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$userdata['user_id']."', '0', '$photo_order', '$photo_comments', '$photo_ratings')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='6'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
//
------------------------------------------------------------------------------
Plik administration/submissions.php:
Pod:
$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) VALUES ('$album_id', '$photo_title', '$photo_description', '$photo_file', '$photo_thumb1', '$photo_thumb2', '".time()."', '".$data['submit_user']."', '0', '$photo_order', '1', '1')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='6'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$data['submit_user']."'");
//
------------------------------------------------------------------------------
Plik movie_add.php:
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."movie VALUES('', '".$_POST['movie_cat']."', '$subject', '$body', '$body2', '$breaks', '".$userdata['user_id']."', '".time()."', '0', '$comments', '$ratings')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='10'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
//
Pod:
</center>\n";
closetable();
}
} else if (isset($_POST['delete'])) {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT movie_name FROM ".$db_prefix."movie WHERE movie_id='$movie_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='10'"));
$result2 = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_id='".$nick['movie_name']."'");
//
------------------------------------------------------------------------------
Plik administration/movies_admin.php:
Pod:
} else {
$result = dbquery("INSERT INTO ".$db_prefix."movie VALUES('', '".$_POST['movie_cat']."', '$subject', '$body', '$body2', '$breaks', '".$userdata['user_id']."', '".time()."', '0', '$comments', '$ratings')");
dodaj:
//DODAWANIE PUNKTOW
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='10'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
//
Pod:
</center>\n";
closetable();
}
} else if (isset($_POST['delete'])) {
dodaj:
//ODEJMOWANIE PUNKTOW
$nick = dbarray(dbquery("SELECT movie_name FROM ".$db_prefix."movie WHERE movie_id='$movie_id'"));
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='10'"));
$result2 = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal-".($przydzial['point_ammount'])." WHERE user_id='".$nick['movie_name']."'");
//
W załączniku dodaję gotowe pliki.
Jeśli o czymś zapomniałem lub coś nie działa to pisać!
bartek124 dodał/a następującą plik:
Nie pomagam na komunikatorach oraz PW!
|