Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Yuna Scatari Edition (YSE) (http://www.bvlist.com/forumdisplay.php?f=22)
-   -   Yuna Scatari v2.0 PRE7 RC0 & RC1 (http://www.bvlist.com/showthread.php?t=182)

Nilsons 21st March 2008 22:02

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 !!! :sos: :sos: :sos: :sos: I don't now how to fiks it i'm noob :cry: :cry: :cry:

djlee 22nd March 2008 06:41

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

Nilsons 22nd March 2008 09:24

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 tooffers

");
}
else
stderr($tracker_lang['error'],"Unable to delete

Return to offers

");
}

/ / 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("
\n");
print("\n");
print("\n");
print("");
$s = "\n";
print("
\n
Edit Offer\"" . $row["name"] . "\"
?Name:
Category:
$s


Description:
");
textbbcode("form","msg",unesc(htmlspecialchars($row["descr"])));
print("\n");
print("
\n");
print ("");
print("\n");
//delete
print("
");
print("
\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



Back to the Offers

");
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



Back to Offers

");
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 ("
");
echo ("");
echo ("\n");
echo ("");
$s = "\n";
echo ("\n");
echo ("");
echo ("");
echo ("
Offer
Name:
Category:
$s


Description:
");
textbbcode("form","msg",htmlspecialchars(unesc($arr["texxt"])));
echo ("
");
echo ("
");
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("\n");
print("");
print("");
if ($num["descr"])
?>
print("");

$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("
Offer details \"$num[name]\"
Name$num[name]
Description
Added$num[added]
Offers $username

BoLaMN 22nd March 2008 10:51

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 tooffers

");
}
else
stderr($tracker_lang['error'],"Unable to delete

Return to offers

");
}

// 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("
\n");
print("\n");
print("\n");
print("
Edit Offer\"" . $row["name"] . "\"
[b]

ANDiTKO 22nd March 2008 17:21

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]

vankata 23rd March 2008 21:23

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? :sos:

djlee 23rd March 2008 23:01

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

vankata 24th March 2008 09:48

Re: Yuna Scatari v2.0 PRE7 RC0
 
10x i frogot about that :friend:

trurl3 3rd April 2008 12:47

Re: Yuna Scatari v2.0 PRE7 RC0
 
So we lost 3 pages of conversation :shock:

BoLaMN 3rd April 2008 14:43

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!!


All times are GMT +2. The time now is 05:41.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.