|
#71
|
|||
|
|||
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
|
||||
|
||||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
||||
|
||||
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
|
|||
|
|||
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
|
||||
|
||||
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
|
|||
|
|||
Re: Yuna Scatari v2.0 PRE7 RC0
10x i frogot about that
|
#79
|
|||
|
|||
Re: Yuna Scatari v2.0 PRE7 RC0
So we lost 3 pages of conversation :shock:
|
#80
|
|||
|
|||
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!!
|
Tags |
pre7 , rc0 , rc1 , scatari , v20 , yuna |
|
|
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 |