Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Yuna Scatari Edition (YSE)
Closed Thread
Thread Tools
  #71  
Old 21st March 2008, 22:02
Nilsons Nilsons is offline
Senior Member
 
Join Date: Dec 2007
Latvia
Posts: 40
Post Re: Yuna Scatari v2.0 PRE7 RC0
[flash=,:70ecsdd8]http://img222.imageshack.us/img222/6274/50036860pb6.jpg[/flash:70ecsdd8]

Theres an error when in offers clicking new offer or Want to offer !!! I don't now how to fiks it i'm noob :cry: :cry: :cry:
  #72  
Old 22nd March 2008, 06:41
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Yuna Scatari v2.0 PRE7 RC0
post teh code for offers.php

also copy and paste teh full error message into your next reply along with that code
  #73  
Old 22nd March 2008, 09:24
Nilsons Nilsons is offline
Senior Member
 
Join Date: Dec 2007
Latvia
Posts: 40
Post Re: Yuna Scatari v2.0 PRE7 RC0
[code]<?

/*
// +--------------------------------------------------------------------------+
// | Project: TBDevYSE - TBDev Yuna Scatari Edition |
// +--------------------------------------------------------------------------+
// | This file is part of TBDevYSE. TBDevYSE is based on TBDev, |
// | originally by RedBeard of TorrentBits, extensively modified by |
// | Gartenzwerg. |
// | |
// | TBDevYSE is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | TBDevYSE is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with TBDevYSE; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +--------------------------------------------------------------------------+
// | Do not remove above lines! |
// +--------------------------------------------------------------------------+
*/

require "include/bittorrent.php";

dbconn(false);

loggedinorreturn();

if ($_SERVER['REQUEST_METHOD'] == 'POST')
$action = $_POST["action"];
else
$action = $_GET["action"];

/ / get the post removal offer
if ($_POST["deloffer"])
{
if (get_user_class() < UC_MODERATOR)
stderr($tracker_lang['error'],"You have no rights to delete");
if (isset($_POST["deloffer"]))
{
sql_query("DELETE FROM ".TABLE_OFFERS." WHERE id = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_OFFERVOTES." WHERE offerid = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_COMMENTS." WHERE offer = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_CHECKCOMM." WHERE checkid =".sqlesc($_POST["deloffer"])." AND offer = 1") or sqlerr(__FILE__, __LINE__);
stderr($tracker_lang['success'],"Deleted!

Return to<a href=viewoffers.php>offers</a></p>");
}
else
stderr($tracker_lang['error'],"Unable to delete

Return to <a href=viewoffers.php>offers</a></p>");
}

/ / edit offer
if ($action == 'edit') {
if ($_SERVER['REQUEST_METHOD']=='POST') {
$id = 0 + $_POST["id"];
$name = htmlspecialchars($_POST["offertitle"]);
$descr = $_POST["msg"];
$cat = 0 + $_POST["category"];
$name = sqlesc($name);
$descr = sqlesc($descr);
$cat = sqlesc($cat);
sql_query("UPDATE ".TABLE_OFFERS." SET category=$cat, name=$name, descr=$descr WHERE id=$id");
header("Location: offers.php?id=$id");
}
$id = 0 + $_GET["id"];
if (!$id)
die();
$res = sql_query("SELECT * FROM ".TABLE_OFFERS." WHERE id = $id");
$row = mysql_fetch_array($res);
if ($CURUSER["id"] != $row["userid"]){
if (get_user_class() < UC_MODERATOR)
stderr("Error!", "You are not authorized to edit this");
}
stdhead("Edit offer \"" . $row["name"] . "\"");
if (!$row)
die();
print("<form method=post name=form action=offers.php>\n");
print("<table border=1 width=560 cellspacing=0 cellpadding=5>\n");
print("<tr><td class=colhead align=left colspan=2>Edit Offer\"" . $row["name"] . "\"</td><tr>\n");
print("<tr><td align=left>?Name:
<input type=text size=80 name=offertitle value=\"" . $row["name"] . "\"></td>");
$s = "<select name=\"category\">\n";
$cats = genrelist();
foreach ($cats as $subrow) {
$s .= "<option value=\"" . $subrow["id"] . "\"";
if ($subrow["id"] == $row["category"])
$s .= " selected=\"selected\"";
$s .= ">" . htmlspecialchars($subrow["name"]) . "</option>\n";
}
$s .= "</select>\n";
print("<td align=right>Category:
$s</tr></td>
\n<tr><td align=center colspan=2>

Description:
");
textbbcode("form","msg",unesc(htmlspecialchars($ro w["descr"])));
print("<input type=\"hidden\" name=\"id\" value=\"$id\">\n");
print("<tr><td align=center colspan=2><input type=submit value=\"Edit!\">\n");
print ("<input type=hidden name=action value=edit>");
print("</form>\n");
//delete
print("<form method=post action=offers.php><input type=hidden name=deloffer value=$id><input type=submit value=Delete></form>");
print("</table>\n");
stdfoot();
die;
}

/ / browse voted for the offer
if ($action == 'vote')
{
$offerid = 0 + $_GET["voteid"];
$userid = $CURUSER["id"];
$res = sql_query("SELECT * FROM offervotes WHERE offerid=$offerid and userid=$userid") or sqlerr(__FILE__, __LINE__);
$arr = mysql_fetch_assoc($res);
$voted = $arr;
stdhead("Vote");
if ($voted)
{
stdmsg($tracker_lang['error'], "

you have already voted for the offer, you can vote only once for one offer</p>

Back to the <a href=viewoffers.php>Offers</a></p>");
stdfoot();
die;
}
else
{
sql_query("UPDATE ".TABLE_OFFERS." SET `votes` = `votes` + 1 WHERE id=$offerid") or sqlerr(__FILE__, __LINE__);
@sql_query("INSERT INTO ".TABLE_OFFERVOTES." (offerid, userid) VALUES($offerid, $userid)") or sqlerr(__FILE__, __LINE__);
stdmsg("Your vote was added", "

Your vote was added</p>

Back to <a href=viewoffers.php>Offers</a></p>");
stdfoot();
die;
}
}


/ / create a new offer
if ($action == 'new') {
if ($_SERVER['REQUEST_METHOD']=='POST') {
if (get_user_class() < UC_UPLOADER)
die;
$name = htmlspecialchars($_POST["name"]);
$descrmain = unesc($_POST["msg"]);
$descr = "$descrmain";
$catid = (0 + $_POST["type"]);
if (!is_valid_id($catid))
stderr($tracker_lang['error'],"You have not chosen a category!");
if (!$name)
stderr($tracker_lang['error'],"You have not chosen a name!");
if (!$descr)
stderr($tracker_lang['error'],You did not enter a description!");
// Replace punctuation characters with spaces
$ret = sql_query("INSERT INTO ".TABLE_OFFERS." (userid, name, descr, category, added) VALUES (" .
implode(",", array_map("sqlesc", array($CURUSER["id"], $name, $descr, 0 + $_POST["type"]))) .
", '" . TIMENOW . "')");
if (!$ret) {
if (mysql_errno() == 1062)
stderr($tracker_lang['error'],"!!!");
stderr($tracker_lang['error'],"mysql puked: ".mysql_error());
}
$id = mysql_insert_id();
header("Location: offers.php?id=$id");
}

stdhead("Offer");
if (get_user_class() < UC_UPLOADER)
{
stdmsg($tracker_lang['error'], "You can not create offers.", 'error');
stdfoot();
exit;
}
echo ("<form action=\"offers.php\" name=\"form\" method=\"post\">");
echo ("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=560>");
echo ("<tr><td class=colhead align=left colspan=2>Offer</td><tr>\n");
echo ("<tr><td align=left>Name:
<input type=\"text\" name=\"name\" size=\"80\" /></td>");
$s = "<select name=\"type\">\n<option value=\"0\">(Select)</option>\n";
$cats = genrelist();
foreach ($cats as $row)
$s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
$s .= "</select>\n";
echo ("<td align=right>Category:
$s</tr></td>\n<tr><td align=center colspan=2>

Description:
");
textbbcode("form","msg",htmlspecialchars(unesc($ar r["texxt"])));
echo ("</td></tr>");
echo ("<input type=hidden name=action value=new>");
echo ("<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" class=btn value=\"Create\"></td></tr>");
echo ("</table>");
echo ("</form>");
stdfoot();
die;
}


/ / body, viewing suggestions
$id = 0 + $_GET["id"];

$res = sql_query("SELECT * FROM `".TABLE_OFFERS."` WHERE `id` = $id") or sqlerr(__FILE__, __LINE__);
$num = mysql_fetch_array($res);
if (mysql_num_rows($res) == 0)
stderr ($tracker_lang['error'],"Invalid Offer ID");

$s = $num["votes"];

stdhead("Offer Details\"" . $num["name"] . "\"");

print("<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
print("<tr><td class=\"colhead\" colspan=\"2\">Offer details \"$num[name]\"</td></tr>");
print("<tr><td align=left>Name</td><td width=90% align=left >$num[name]</td></tr>");
if ($num["descr"])
?><tr><td align=left>Description</td><td width=90% align=left colspan=2><?=format_comment($num["descr"])?></td></tr><?

print("<tr><td align=left>Added</td><td width=90% align=left >$num[added]</td></tr>");

$cres = sql_query("SELECT username FROM ".TABLE_USERS." WHERE id=" . $num["userid"]);
if (mysql_num_rows($cres) == 1)
{
$carr = mysql_fetch_assoc($cres);
$username = $carr["username"];
}

$url = "offers.php?action=edit&id=$id";
if (isset($_GET["returnto"]))
{
$addthis = "&returnto=" . urlencode($_GET["returnto"]);
$url .= $addthis;
$keepget .= $addthis;
}
$editlink = "a href=\"$url\" class=\"sublink\"";
print("<tr><td align=left>Offers</td><td width=90% align=left> <a href=\"userdetails.php?id=".$num["userid"]."\">$username</a>
The Following User Says Thank You to Nilsons For This Useful Post:
x517530 (1st January 2009)
  #74  
Old 22nd March 2008, 10:51
BoLaMN BoLaMN is offline
Senior Member
 
Join Date: Jan 2008
Australia
Posts: 93
Default Re: Yuna Scatari v2.0 PRE7 RC0
Offers.php fix

[code]

<?


require "include/bittorrent.php";

dbconn(false);

loggedinorreturn();

if ($_SERVER['REQUEST_METHOD'] == 'POST')
$action = $_POST["action"];
else
$action = $_GET["action"];

if ($_POST["deloffer"])
{
if (get_user_class() < UC_MODERATOR)
stderr($tracker_lang['error'],"You have no rights to delete");
if (isset($_POST["deloffer"]))
{
sql_query("DELETE FROM ".TABLE_OFFERS." WHERE id = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_OFFERVOTES." WHERE offerid = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_COMMENTS." WHERE offer = ".sqlesc($_POST["deloffer"])) or sqlerr(__FILE__, __LINE__);
sql_query("DELETE FROM ".TABLE_CHECKCOMM." WHERE checkid =".sqlesc($_POST["deloffer"])." AND offer = 1") or sqlerr(__FILE__, __LINE__);
stderr($tracker_lang['success'],"Deleted!

Return to<a href=viewoffers.php>offers</a></p>");
}
else
stderr($tracker_lang['error'],"Unable to delete

Return to <a href=viewoffers.php>offers</a></p>");
}

// edit offer
if ($action == 'edit') {
if ($_SERVER['REQUEST_METHOD']=='POST') {
$id = 0 + $_POST["id"];
$name = htmlspecialchars($_POST["offertitle"]);
$descr = $_POST["msg"];
$cat = 0 + $_POST["category"];
$name = sqlesc($name);
$descr = sqlesc($descr);
$cat = sqlesc($cat);
sql_query("UPDATE ".TABLE_OFFERS." SET category=$cat, name=$name, descr=$descr WHERE id=$id");
header("Location: offers.php?id=$id");
}
$id = 0 + $_GET["id"];
if (!$id)
die();
$res = sql_query("SELECT * FROM ".TABLE_OFFERS." WHERE id = $id");
$row = mysql_fetch_array($res);
if ($CURUSER["id"] != $row["userid"]){
if (get_user_class() < UC_MODERATOR)
stderr("Error!", "You are not authorized to edit this");
}
stdhead("Edit offer \"" . $row["name"] . "\"");
if (!$row)
die();
print("<form method=post name=form action=offers.php>\n");
print("<table border=1 width=560 cellspacing=0 cellpadding=5>\n");
print("<tr><td class=colhead align=left colspan=2>Edit Offer\"" . $row["name"] . "\"</td><tr>\n");
print("<tr><td align=left>[b]
  #75  
Old 22nd March 2008, 17:21
ANDiTKO's Avatar
ANDiTKO ANDiTKO is offline
Senior Member
 
Join Date: Mar 2008
Greece
Posts: 47
Default Re: Yuna Scatari v2.0 PRE7 RC0
Small translation needed at BoLaMN version
In admincp.php?op=rules[hr:hepsnwdq]
Change the "Question" to "Title" and "Answer" to "Body"
[flash=,:hepsnwdq]http://img253.imageshack.us/img253/9767/95791301ql1.th.png[/flash:hepsnwdq][hr:hepsnwdq]
Change the "Question" to "Title" and "?????" to "Body"
[flash=,:hepsnwdq]http://img527.imageshack.us/img527/6431/93251804oo8.th.png[/flash:hepsnwdq][hr:hepsnwdq]
  #76  
Old 23rd March 2008, 21:23
vankata vankata is offline
Member
 
Join Date: Mar 2008
Posts: 6
Default Re: Yuna Scatari v2.0 PRE7 RC0
How do you install this...
What i just upload the files and import the SQL is that it?
  #77  
Old 23rd March 2008, 23:01
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: Yuna Scatari v2.0 PRE7 RC0
basically ... yes

u will also need to edit the main configuration file (bitorrent.php) so that u change the site name and max users ect ect ect .. the main thing in the bitorrent is the torrents folder.. if u dont create a torrent folder, chmod is to 777 (under unix) and tehn change the torrent directory in bitorrent .. ur site wont allow uploads
  #78  
Old 24th March 2008, 09:48
vankata vankata is offline
Member
 
Join Date: Mar 2008
Posts: 6
Default Re: Yuna Scatari v2.0 PRE7 RC0
10x i frogot about that
  #79  
Old 3rd April 2008, 12:47
trurl3 trurl3 is offline
Senior Member
 
Join Date: Mar 2008
Posts: 28
Default Re: Yuna Scatari v2.0 PRE7 RC0
So we lost 3 pages of conversation :shock:
  #80  
Old 3rd April 2008, 14:43
BoLaMN BoLaMN is offline
Senior Member
 
Join Date: Jan 2008
Australia
Posts: 93
Default Re: Yuna Scatari v2.0 PRE7 RC0
owell too bad lol, will be releasing my new version probably in the next few days not sure if im going to release it yet untill ive finishing settings.php and the installer as they go hand in hand, settings.php is 70% complete so we shall see!!
Closed Thread

Tags
pre7 , rc0 , rc1 , scatari , v20 , yuna


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
blank pm page in yuna scatari v2.2 pre7 farshidkiani Yuna Scatari Edition (YSE) 2 4th December 2009 11:19
Problem with Yuna Scatari Edition PRE7 2.2 AneXA Yuna Scatari Edition (YSE) 2 26th October 2009 18:18
Yuna Scatari v2.2 PRE7 --vs--Nehalem? ampedm Yuna Scatari Edition (YSE) 7 25th March 2009 15:49
BlackJack for Yuna Scatari v2.0 PRE7 Kotafi Yuna Scatari Edition (YSE) 3 18th July 2008 14:23
Some Yuna Scatari v2.0 PRE7 RC2 shoutbox questions 3v0 Yuna Scatari Edition (YSE) 6 18th June 2008 01:52



All times are GMT +2. The time now is 04:17. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.