Polish Bittorrent Tracker Support

  • Maj 18, 2012, 03:26:59
  • Witamy, Gość
Zaloguj się lub zarejestruj.

Zaloguj się podając nazwę użytkownika, hasło i długość sesji
Szukanie zaawansowane  

Aktualności:

Autor Wątek: Sekcja requestów  (Przeczytany 2389 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

Kuba1530

  • Gość
Sekcja requestów
« dnia: Październik 15, 2005, 10:42:34 »

I następny modzik :)
Dodaj do bazy danych zapytanie:
CREATE TABLE `requests` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`request` varchar(225) default NULL,
`descr` text NOT NULL,
`added` datetime NOT NULL default '0000-00-00 00:00:00',
`hits` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`id`),
KEY `userid` (`userid`)
);
CREATE TABLE `addedrequests` (
`id` int(10) unsigned NOT NULL auto_increment,
`requestid` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`id`),
KEY `pollid` (`id`),
KEY `userid` (`userid`)
);
ALTER TABLE requests ADD cat int(10) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE requests ADD filled varchar(75) NULL;
ALTER TABLE requests ADD filledby int(10) UNSIGNED NOT NULL;

Stwórz plik addrequest.php  i daj do niego kod :)
<?

require_once("include/bittorrent.php");

dbconn();

stdhead("Vote");

$requestid = $_GET["id"];
$userid = $CURUSER["id"];
$res = mysql_query("SELECT * FROM addedrequests WHERE requestid=$requestid and userid = $userid") or sqlerr();
$arr = mysql_fetch_assoc($res);
$voted = $arr;

if ($voted) {
?>
<h1>You've Already Voted</h1>
<p>You've already voted for this request, only 1 vote for each request is allowed<p><p><p></p><p>Back to <a href="viewrequests.php"><b>requests</b></a><p><p><p></p>
<?
}
else {

mysql_query("UPDATE requests SET hits = hits + 1 WHERE id=$requestid") or sqlerr();
@mysql_query("INSERT INTO addedrequests VALUES(0, $requestid, $userid)") or sqlerr();

print("<h1>Vote accepted</h1>");
print("<p>Successfully voted for request $requestid</p><p>Back to <a href=viewrequests.php><b>requests</b></a></p>");

}

?>
2. Stwórz plik delreq.php i daj do niego kod
<?

require_once("include/bittorrent.php");

dbconn();

stdhead("Vote");

$requestid = $_GET["id"];
$userid = $CURUSER["id"];
$res = mysql_query("SELECT * FROM addedrequests WHERE requestid=$requestid and userid = $userid") or sqlerr();
$arr = mysql_fetch_assoc($res);
$voted = $arr;

if ($voted) {
?>
<h1>You've Already Voted</h1>
<p>You've already voted for this request, only 1 vote for each request is allowed<p><p><p><p></p><p>Back to <a href="viewrequests.php"><b>requests</b></a><p><p><p><p></p>
<?
}
else {

mysql_query("UPDATE requests SET hits = hits + 1 WHERE id=$requestid") or sqlerr();
@mysql_query("INSERT INTO addedrequests VALUES(0, $requestid, $userid)") or sqlerr();

print("<h1>Vote accepted</h1>");
print("<p>Successfully voted for request $requestid</p><p>Back to <a href=viewrequests.php><b>requests</b></a></p>");

}

?>           
3.Stwórz plik reqdetalis.php
<?
require "include/bittorrent.php";

dbconn();

loggedinorreturn();

stdhead("Request Details");
$id = $_GET["id"];
$res = mysql_query("SELECT * FROM requests WHERE id = $id") or sqlerr();
$num = mysql_fetch_array($res);

$s = $num["request"];

print("<h1>Details Of $s</h1>\n");

print("<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td align=left>Request</td><td width=90% align=left>$num[request]</td></tr>");
if ($num["descr"])
print("<tr><td align=left>Info</td><td width=90% align=left>$num[descr]</td></tr>");
print("<tr><td align=left>Added</td><td width=90% align=left>$num[added]</td></tr>");

$cres = mysql_query("SELECT username FROM users WHERE id=$num[userid]");
   if (mysql_num_rows($cres) == 1)
   {
     $carr = mysql_fetch_assoc($cres);
     $username = "$carr[username]";
   }
print("<tr><td align=left>Requested By</td><td width=90% align=left>$username</td></tr>");
print("<tr><td align=left>Vote for this request</td><td width=50% align=left><a href=addrequest.php?id=$id><b>Vote</b></a></td></tr>");

print("</table>");
?>
<br />
<?
print("<input type=text size=80 name=filledurl value=$BASEURL/details.php?id=1>\n");
print("<input type=hidden value=$id name=requestid>");
print("<input type=submit value=\"Fill Request\" style='height: 22px'>\n</form>");

print("<p></p><form method=\"get\" action=\"requests.php#add\"><input type=\"submit\" value=\"Add Request\" style='height: 22px' /></form>");
stdfoot();
die;

?>
4.Stwórz plik reqfilled.php i daj do niego taki kod:
<?php
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();

stdhead("Fill Request");

if (
get_user_class() < 3)
{
 print(
"<h1>Sorry</h2><p>You must be Uploader+ to fill requests, see the <a href=faq.php><b>FAQ</b></a> for information on different user classes</p>");
 die();
}

begin_main_frame();

$filledurl $_GET["filledurl"];
$requestid $_GET["requestid"];


$res mysql_query("SELECT users.username, requests.userid, requests.request FROM requests inner join users on requests.userid = users.id where requests.id = $requestid") or sqlerr();
 
$arr mysql_fetch_assoc($res);

$res2 mysql_query("SELECT username FROM users where id =" $CURUSER[id]) or sqlerr();
 
$arr2 mysql_fetch_assoc($res2);


$msg "Your request, [url=reqdetails.php?id=" $requestid "][b]" $arr[request] . "[/b][/url] has been filled by [url=userdetails.php?id=" $CURUSER[id] . "][b]" $arr2[username] . "[/b][/url]. You can download your request from [url=" $filledurl"][b]" $filledurl"[/b][/url].  Please do not forget to leave thanks where due.  If for some reason this is not what you requested, please reset your request so someone else can fill it by following [URL=reqreset.php?requestid=" $requestid "]this[/url] link.  Do [b]NOT[/b] follow this link unless you are sure that this does not match your request.";

 
      mysql_query ("UPDATE requests SET filled = '$filledurl', filledby = $CURUSER[id] WHERE id = $requestid") or sqlerr();
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, $arr[userid], '" get_date_time() . "', " sqlesc($msg) . ")") or sqlerr(__FILE____LINE__);


print(
"Request $requestid successfully filled with <a href=$filledurl>$filledurl</a>.  User <a href=userdetails.php?id=$arr[userid]><b>$arr[username]</b></a> automatically PMd.  If you have made a mistake in filling in the URL or have realised that your torrent does not actually satisfy this request, please reset the request so someone else can fill it by clicking <a href=reqreset.php?requestid=$requestid>here</a>  Do <b>NOT</b> follow this link unless you are sure there is a problem.");

end_main_frame();
stdfoot();
?>

5. Stwórz plik reqreset.php i daj do niego kod:
<?php
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn();

stdhead("Reset Request");

begin_main_frame();

$requestid $_GET["requestid"];


$res mysql_query("SELECT userid, filledby FROM requests WHERE id =$requestid") or sqlerr();
 
$arr mysql_fetch_assoc($res);


if ((
$CURUSER[id] == $arr[userid]) || (get_user_class() >= 4) || ($CURUSER[id] == $arr[filledby]))
{

 @
mysql_query("UPDATE requests SET filled='', filledby=0 WHERE id =$requestid") or sqlerr();
 
 print(
"Request $requestid successfully reset.");
}
else
 print(
"Sorry, cannot reset a request when you are not the owner"); 


end_main_frame();
stdfoot();
?>

6. Stwórz plik request.php i daj do niego kod:
<?
ob_start("ob_gzhandler");
require "include/bittorrent.php";

dbconn();

loggedinorreturn();

stdhead("Requests Page");

if (get_user_class() < 2)
{
 print("<h1>Sorry</h2><p>You must be VIP+ to request, see the <a href=faq.php><b>FAQ</b></a> for information on different user classes</p>");
 die();
}

print("<h1>Make a Request</h1><p>To view all requests, click <a href=viewrequests.php>here</a></p>\n");

/*

$res = mysql_query("SELECT users.username, requests.id, requests.userid, requests.request, requests.added, categories.name as cat FROM requests inner join categories on requests.cat = categories.id inner join users on requests.userid = users.id order by requests.id desc LIMIT 10") or sqlerr();
$num = mysql_num_rows($res);

print("<table border=1 width=800 cellspacing=0 cellpadding=5>\n");
print("<tr><td class=colhead align=left width=400>Requested</td><td class=colhead align=center width=100>Category</td><td class=colhead align=center>Added</td><td class=colhead align=center width=100>Requested By</td></tr>\n");
for ($i = 0; $i < $num; ++$i)
{
 $arr = mysql_fetch_assoc($res);
 {

     $addedby = "<td style='padding: 0px' align=center><b><a href=userdetails.php?id=$arr[userid]>$arr[username]</a></b></td>";
 }
 
 print("<tr><td align=left><a href=reqdetails.php?id=$arr[id]><b>$arr[request]</b></a></td><td align=left>$arr[cat]</td>" .
 "<td align=center>$arr[added]</td>".
   "$addedby</tr>\n");
}
print("<tr><td align=center colspan=4><form method=\"get\" action=viewrequests.php><input type=\"submit\" value=\"Show All\" style='height: 22px' /></form></td></tr>\n");
print("</table>\n");

*/

print("<br>\n");

$where = "WHERE userid = " . $CURUSER["id"] . "";
$res2 = mysql_query("SELECT * FROM requests $where") or sqlerr();
$num2 = mysql_num_rows($res2);

/*print("<table border=1 width=800 cellspacing=0 cellpadding=5>\n");
print("<tr><td class=colhead align=left width=400>Your Added Requests</td><td class=colhead align=center>Category</td><td class=colhead align=center>Added</td></tr>\n");
for ($i = 0; $i < $num; ++$i)
{
 $arr = mysql_fetch_assoc($res2);
 
 print("<tr><td align=left><b>$arr[request]</b></td><td align=left>$arr[cat]</td>" .
 "<td align=center>$arr[added]</td>".
   "</tr>\n");
}
print("</table>");

print("<br>\n");
*/
?>



<table border="1" width="800" cellspacing="0" cellpadding="5">
<tr><td class="colhead" background="../pic/ambimiddle.jpg" style="color:#000000" align="left">Search Torrents (i.e. for the torrent before adding a request)</td>
</tr>
<tr><td align="left"><form method="get" action="browse.php">
<input type="text" name="search" size="40" value="<?= htmlspecialchars($searchstr) ?>" />
in
<select name="cat">
<option value="0">(all types)</option>
<?


$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
   $catdropdown .= "<option value=\"" . $cat["id"] . "\"";
   if ($cat["id"] == $_GET["cat"])
       $catdropdown .= " selected=\"selected\"";
   $catdropdown .= ">" . htmlspecialchars($cat["name"]) . "</option>\n";
}

$deadchkbox = "<input type=\"checkbox\" name=\"incldead\" value=\"1\"";
if ($_GET["incldead"])
   $deadchkbox .= " checked=\"checked\"";
$deadchkbox .= " /> including dead torrents\n";

?>
<?= $catdropdown ?>
</select>
<?= $deadchkbox ?>
<input type="submit" value="Search!" style='height: 18px' />
</form>
</td></tr></table>

<? print("<br>\n");

print("<form method=post action=takerequest.php><a name=add id=add></a>\n");
print("<table border=\"1\" width=\"800\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td class=\"colhead\" background=\"../pic/ambimiddle.jpg\" style=\"color:#000000\" align=\"left\">Add your request here:</td><tr>\n");
print("<tr><td align=\"center\"><b>Title: </b><input type=text size=40 name=requesttitle>");
?>

<select name="category">
<option value="0">(Select a Category)</option>
<?
$res2 = mysql_query("SELECT id, name FROM categories order by name");
$num = mysql_num_rows($res2);
$catdropdown2 = "";
for ($i = 0; $i < $num; ++$i)
   {
 $cats2 = mysql_fetch_assoc($res2);  
     $catdropdown2 .= "<option value=\"" . $cats2["id"] . "\"";
     $catdropdown2 .= ">" . htmlspecialchars($cats2["name"]) . "</option>\n";
   }

?>
<?= $catdropdown2 ?>
</select>

<? print("<br>\n");

print("<tr><td align=center>Additional Information (Optional)<br><textarea name=descr rows=5 cols=100></textarea>");
print("<tr><td align=center><input type=submit value=Submit! style='height: 22px'></form></table>");
print("</form>");
print("</table>");

end_main_frame();


end_frame();

stdfoot();
die;
?>
7.Stwóz plik takedelreq.php i daj do niego kod:
<?
require_once("include/bittorrent.php");
function bark($msg) {
 stdhead();
   stdmsg("Failed", $msg);
 stdfoot();
 exit;
}
dbconn();
loggedinorreturn();
if (get_user_class() > 3) {

if (empty($_POST["delreq"]))
   bark("Don't leave any fields blank.");

$do="DELETE FROM requests WHERE id IN (" . implode(", ", $_POST[delreq]) . ")";
$do2="DELETE FROM addedrequests WHERE requestid IN (" . implode(", ", $_POST[delreq]) . ")";
$res2=mysql_query($do2);
$res=mysql_query($do);
}
else
{ bark("You're not staff, bugger off");}
header("Refresh: 0; url=viewrequests.php");
?>
8.Stwóz plik takerequest.php i wrzuć do niego kod:
<?

require_once("include/bittorrent.php");

dbconn();

function bark($msg) {
 stdhead();
stdmsg("Signup failed!", $msg);
 stdfoot();
 exit;
}

$userid = $_POST["userid"];
$userid = $_POST["userid"];
if (!validfilename($requesttitle))
bark("No Title!");
$request = $requesttitle;
$descr = unesc($_POST["descr"]);
if (!$descr)
bark("You must enter a description!");
$cat = (0 + $_POST["category"]);
if (!is_valid_id($cat))
bark("You must select a category to put the request in!");

$descr = $_POST["descr"];
$cat = $_POST["category"];

$userid = sqlesc($userid);
$request = sqlesc($request);
$descr = sqlesc($descr);
$cat = sqlesc($cat);


mysql_query("INSERT INTO requests (hits,userid, cat, request, descr, added) VALUES(1,$CURUSER[id], $cat, $request, $descr, '" . get_date_time() . "')") or sqlerr(__FILE__,__LINE__);


$id = mysql_insert_id();

@mysql_query("INSERT INTO addedrequests VALUES(0, $id, $CURUSER[id])") or sqlerr();


//write_log("$request was added to the Request section");

header("Refresh: 0; url=requests.php");


?>
« Ostatnia zmiana: Październik 15, 2005, 10:57:42 wysłana przez Kuba1530 »
Zapisane

GoldIp

  • Początkujący++
  • ***
  • Reputacja 7
  • Offline Offline
  • Wiadomości: 21
Odp: Sekcja requestów
« Odpowiedź #1 dnia: Październik 28, 2005, 06:14:06 »

Połącz plik z tamtej 2 cz. requestów bo się na poczatku nie kampnąłem gdzie są viewrequests.php i votesview.php
« Ostatnia zmiana: Październik 28, 2005, 06:24:49 wysłana przez GoldIp »
Zapisane

Knedels

  • Gość
Odp: Sekcja requestów
« Odpowiedź #2 dnia: Listopad 22, 2005, 05:38:24 »

Jak klikam w reqdetails.php w Fill Request print("<input type=submit value=\"Fill Request\" style='height: 22px'>\n</form>"); to nic sie nie dzieje  :-\

Edit

Ten działa reqdetails.php

<?
require "include/bittorrent.php";

dbconn();

loggedinorreturn();

stdhead("Request Details");
$id = $_GET["id"];
$res = mysql_query("SELECT * FROM requests WHERE id = $id") or sqlerr();
$num = mysql_fetch_array($res);

$s = $num["request"];

print("<h1>Detale dla $s</h1>\n");

print("<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td align=left>Prosba</td><td width=90% align=left>$num[request]</td></tr>");
if ($num["descr"])
print("<tr><td align=left>Info</td><td width=90% align=left>$num[descr]</td></tr>");
print("<tr><td align=left>Dodana</td><td width=90% align=left>$num[added]</td></tr>");

$cres = mysql_query("SELECT username FROM users WHERE id=$num[userid]");
   if (mysql_num_rows($cres) == 1)
   {
     $carr = mysql_fetch_assoc($cres);
     $username = "$carr[username]";
   }
print("<tr><td align=left>Prosba &nbsp;od</td><td width=90% align=left>$username</td></tr>");
print("<tr><td align=left>Głosuj na ta prosbe</td><td width=50% align=left><a href=addrequest.php?id=$id><b>Głosuj</b></a></tr></tr>");

if ($num["filled"] == NULL)
{
print("<form method=get action=reqfilled.php>");
print("<tr><td align=left>Wypelnij Prosbe</td><td>Podaj <b>cały</b> adres URL do torrenta n.p. http://exorrent.org/details.php?id=1 (skopiuj/wklej linka z profilu torrenta) lub zmodyfikuj ten wpisujac odpowiedni nr ID</td></tr>");
print("</table>");
print("<input type=text size=80 name=filledurl value=Wpisz/Skopiuj adres Url torrenta>\n");
print("<input type=hidden value=$id name=requestid>");
print("<input type=submit value=\"Wypelnij Prosbe\" style='height: 22px'>\n</form>");
}

print("<p></p><form method=\"get\" action=\"requests.php#add\"><input type=\"submit\" value=\"Dodaj Prosbe\" style='height: 22px' /></form>");
stdfoot();
die;

?>
« Ostatnia zmiana: Listopad 22, 2005, 05:58:40 wysłana przez Knedels »
Zapisane

Piterownik

  • Zaawansowany
  • *****
  • Reputacja 4
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 125
Odp: Sekcja requestów
« Odpowiedź #3 dnia: Grudzień 28, 2005, 03:39:53 »

Potwierdzam, Fill Request nie działa. Ale jaka jest rużnica pomiędzy tym działającym (napisanym post wyżej) a tym nie działającym (napisanym na początku tematu)?
Zapisane

Knedels

  • Zaawansowany
  • *****
  • Reputacja 0
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 146
Odp: Sekcja requestów
« Odpowiedź #4 dnia: Marzec 11, 2006, 08:17:39 »

Taka że ten działa a tamten nie  :w00t: :w00t:
Zapisane

mild

  • Super zaawansowany
  • ******
  • Reputacja 11
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 293
Odp: Sekcja requestów
« Odpowiedź #5 dnia: Marzec 20, 2006, 07:56:48 »

Tak się składa że requesty wypełniane są w reqfilled.php
<?php
require_once("include/bittorrent.php");
hit_start();
dbconn();
loggedinorreturn();

stdhead("Wypełnij requesta");

begin_main_frame();

$filledurl $_GET["filledurl"];
$requestid $_GET["requestid"];


$res mysql_query("SELECT users.username, requests.userid, requests.request FROM requests inner join users on requests.userid = users.id where requests.id = $requestid") or sqlerr();
 
$arr mysql_fetch_assoc($res);

$res2 mysql_query("SELECT username FROM users where id =" $CURUSER[id]) or sqlerr();
 
$arr2 mysql_fetch_assoc($res2);


$msg "Twój request, [url=reqdetails.php?id=" $requestid "][b]" htmlspecialchars($arr[request]) . "[/b][/url] został wypełniony przez [url=userdetails.php?id=" $CURUSER[id] . "][b]" htmlspecialchars($arr2[username]) . "[/b][/url]. Możesz go pobrać pod linkiem: [url=" $filledurl"][b]" $filledurl"[/b][/url].  Nie zapomnij podziękować!  Jeśli nie jest to to czego szukałeś, proszę, zresetuj requesta pod tym linkiem: [URL=reqreset.php?requestid=" $requestid "]Reset[/url].  [b]Nie używaj tego linka jeśli nie jesteś pewien czy to to[/b].";

       
mysql_query ("UPDATE requests SET filledurl = '$filledurl', filled = 'yes', filledby = $CURUSER[id] WHERE id = $requestid") or sqlerr();
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, $arr[userid], '" get_date_time() . "', " sqlesc($msg) . ")") or sqlerr(__FILE____LINE__);


print(
"Request $requestid wypełniony przez <a href=$filledurl>$filledurl</a>.  Użytkownik <a href=userdetails.php?id=$arr[userid]><b>$arr[username]</b></a> otrzymał PM.  ");

end_main_frame();
stdfoot();
?>

Zapisane

michael2

  • Super zaawansowany
  • ******
  • Reputacja 0
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 200
  • Prisoner
Odp: Sekcja requestów
« Odpowiedź #6 dnia: Marzec 28, 2006, 03:11:45 »

A to przy próbie wypelnienia :

http://img370.imageshack.us/img370/4590/beztytuu17pg.png

Jak to naprawic  ?
Zapisane
Konto zaparkowane...

michael2

  • Super zaawansowany
  • ******
  • Reputacja 0
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 200
  • Prisoner
Odp: Sekcja requestów
« Odpowiedź #7 dnia: Marzec 28, 2006, 05:20:04 »

Napewno dodałeś wszystko do bazy danych?

Jak chce dodac to 3 zapytanie to wyskakuje to :

Błąd

zapytanie SQL:

ALTER TABLE requests ADD cat int( 10 ) UNSIGNED NOT NULL DEFAULT '0'

MySQL zwrócił komunikat: 
#1060 - Duplicate column name 'cat'

 :blushing:

Caly czas nie moge sobie poradzic z tym....

SQL Error
Unknown column 'filledurl' in 'field list'

Pomoze ktos :(
« Ostatnia zmiana: Marzec 28, 2006, 07:13:25 wysłana przez michael2 »
Zapisane
Konto zaparkowane...

null

  • Super zaawansowany
  • ******
  • Reputacja 40
  • Offline Offline
  • Wiadomości: 1679
Odp: Sekcja requestów
« Odpowiedź #8 dnia: Marzec 28, 2006, 07:27:33 »

Napewno dodałeś wszystko do bazy danych?

KUBO!
U ciebie brakuje kodu na stworzenie filledurl. Druga sprawa - skoro tworzysz tabelę requests, to po co chwile pozniej robisz ALTER? nie mozna stworzyc tabeli raz, a dobrze? :|

//dopisane
Knedels - a co ja moge wytlumaczyc? Przecież to Kuba nie podał kodu tak jak trzeba.
« Ostatnia zmiana: Marzec 28, 2006, 08:32:51 wysłana przez nav »
Zapisane
NullPointerException. chantico podejście drugie. Faza projektowania.

Knedels

  • Zaawansowany
  • *****
  • Reputacja 0
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 146
Odp: Sekcja requestów
« Odpowiedź #9 dnia: Marzec 28, 2006, 08:19:53 »

Jak nav coś wytłumaczy to wszystko jest jasne. Myśle nav że mu nie pomogłeś zbytnio  ;)
Zapisane

michael2

  • Super zaawansowany
  • ******
  • Reputacja 0
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 200
  • Prisoner
Odp: Sekcja requestów
« Odpowiedź #10 dnia: Kwiecień 16, 2006, 11:36:32 »

Przy kasowaniu requestów ( delreq ) w panelu moderatora....

SQL Error
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'and userid = 3' at line 1


 :wallbash:
Zapisane
Konto zaparkowane...

irek

  • Średnio zaawansowany
  • ****
  • Reputacja 1
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 54
Odp: Sekcja requestów
« Odpowiedź #11 dnia: Sierpień 19, 2006, 11:06:50 »

A wie ktos moze w którym pliku idzie zmienic aby inni mogli  mogli dodawać requesty bo u mnie jest tak ze ino ort! Sysop
« Ostatnia zmiana: Sierpień 19, 2006, 11:26:29 wysłana przez nav »
Zapisane

null

  • Super zaawansowany
  • ******
  • Reputacja 40
  • Offline Offline
  • Wiadomości: 1679
Odp: Sekcja requestów
« Odpowiedź #12 dnia: Sierpień 19, 2006, 11:27:06 »

if ($CURUSER['class'] [< | == | >] UC_KLASA) ...
Zapisane
NullPointerException. chantico podejście drugie. Faza projektowania.

irek

  • Średnio zaawansowany
  • ****
  • Reputacja 1
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 54
Odp: Sekcja requestów
« Odpowiedź #13 dnia: Sierpień 19, 2006, 11:36:25 »

zobacz zaznaczyłem okno czarną linią te okno widzi tylko i wyłącznie Sysop a ono jest do dodawania requestów w którym pliku to zmienic aby te okno było widoczne od rangi Uploadera
Zapisane

null

  • Super zaawansowany
  • ******
  • Reputacja 40
  • Offline Offline
  • Wiadomości: 1679
Odp: Sekcja requestów
« Odpowiedź #14 dnia: Sierpień 19, 2006, 11:45:57 »

zapewne w pliku req.php. Jak sama nazwa wskazuje...
Zapisane
NullPointerException. chantico podejście drugie. Faza projektowania.

irek

  • Średnio zaawansowany
  • ****
  • Reputacja 1
  • Offline Offline
  • Płeć: Mężczyzna
  • Wiadomości: 54
Odp: Sekcja requestów
« Odpowiedź #15 dnia: Sierpień 23, 2006, 07:07:27 »

Witam
Mam jeszcze jeden problem po wypełnieniu requesta w przeglądaj requesty ten co został wypełniony zmienia kolor z czerwonego no na zielony yes i po kliknięciu w te Yes powinna sie otworzyc strona z detalami torrenta np http://moja strona/details.php?id=187 a u mnie w kazdym wypełnionym requescie jest taka strona http://moja strona/yes
wie ktos moze jak to naprawić z góry dzieki za odpowiedz
Zapisane

maniek999

  • Super zaawansowany
  • ******
  • Reputacja 9
  • Offline Offline
  • Wiadomości: 258
Odp: Sekcja requestów
« Odpowiedź #16 dnia: Sierpień 23, 2006, 11:35:01 »

$filled = $arr['filled'];
if ($filled)
$filled = "<a href=$filled><font color=green><b>yes</b></font></a>";
else
$filled = "<a href=reqdetails.php?id=$arr[id]><font color=red><b>no</b></font></a>";

z tego wyczytasz skad sa pobierane dane
Zapisane

Dziubus

  • Początkujący++
  • ***
  • Reputacja 1
  • Offline Offline
  • Wiadomości: 26
Odp: Sekcja requestów
« Odpowiedź #17 dnia: Sierpień 29, 2006, 06:12:24 »

Mam troszke bardziej rozbudowaną werjse tego moda o edycje requestow. I mam taki progblem, ponieważ kiedy zatwierdzam zmiany wyskakuje mi taki błąd

SQL Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

in /home/fafal/public_html/takereqedit.php, line 46

Plik takereqedit.php http://www.phpfi.com/146911
Zapisane

null

  • Super zaawansowany
  • ******
  • Reputacja 40
  • Offline Offline
  • Wiadomości: 1679
Odp: Sekcja requestów
« Odpowiedź #18 dnia: Sierpień 29, 2006, 06:19:37 »

Zapytanie wygląda poprawnie. Dodaj przed nim echo "UPDATE requests SET cat=$cat, filledby = 0, request=$request, descr=$descr, filled = 'no' WHERE id = $id"; a następnie napisz co wyświetliło.
Zapisane
NullPointerException. chantico podejście drugie. Faza projektowania.

Dziubus

  • Początkujący++
  • ***
  • Reputacja 1
  • Offline Offline
  • Wiadomości: 26
Odp: Sekcja requestów
« Odpowiedź #19 dnia: Sierpień 29, 2006, 08:58:56 »

UPDATE requests SET cat='21', filledby = 0, request='Broendby - Widzew (21.08.1996)', descr='Mile widziany także pierwszy mecz w Łodzi.', filled = 'no' WHERE id =
SQL Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

in /home/fafal/public_html/takereqedit.php, line 47

plik takereqedit.php http://www.phpfi.com/146948
Zapisane
 

Strona wygenerowana w 0.263 sekund z 22 zapytaniami.