| Forum: General Help for 2.X |
|---|
| Topic: Login redirect problem |
|---|
|
| Topic: problem with forum path |
|---|
|
| Topic: Link between Joomla and PHPMyBitTorrent? |
|---|
|
| Topic: comments |
|---|
|
| Topic: editing login.php |
|---|
| editing login.php [message #4911] |
Sat, 25 September 2010 08:37 |
firefly007  Messages: 79 Registered: May 2010 |
Seeder |
|
|
Hi there
I need to know how to remove or make inadvisable the surrounding
box around the login form it does not fit in to what im working on.
Where will that be found and how will it be done.
thank you very much

http://www.gower.co.za
|
|
|
| Topic: add gb to users |
|---|
| add gb to users [message #4840] |
Mon, 06 September 2010 17:22 |
|
from trader source needs converting to work here.
add in admincp.php:
<td align=center><a href=admincp.php?action=addgigs><img src=images/admin/control_bonus.png border=0 width=32 height=32><br><center><b>Add Gigs</center></b></a><BR></td>
add now at the end of your admincp.php:
#======================================================================#
# Add Gigs To Users
#======================================================================#
if($action == "addgigs")
{
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if ($_POST['doit'] == 'yes') {
mysql_query("UPDATE users SET uploaded = uploaded + 2147483648 WHERE status='confirmed'");
stderr("Upload", "2GB upload is sent to everyone...");
die;
}
if ($_POST["username"] == "" || $_POST["gigs"] == "" || $_POST["gigs"] == "")
show_error_msg("Error", "Missing form data.");
$username = sqlesc($_POST["username"]);
$uploaded = sqlesc($_POST["uploaded"]);
$userid = $CURUSER["id"];
$mb_basic=1024*1024;
if(isset($_POST['unit'])){
if ($_POST["unit"] =='1')
$nobits = $gigs*$mb_basic;
if ($_POST["unit"] =='2')
$nobits = $gigs*$mb_basic*1024;
}
$modcomment = gmdate("Y-m-d") . " - ".$CURUSER['username']." has given ".mksize($nobits)." to this user.\n " .$modcomment;
mysql_query("UPDATE users SET modcomment = '$modcomment', uploaded=uploaded + $nobits WHERE username=$username") or sqlerr(__FILE__, __LINE__);
$res = mysql_query("SELECT id FROM users WHERE username=$username");
$arr = mysql_fetch_row($res);
if (!$arr)
show_error_msg("Error", "Unable to update account.");
header("Location: $site_config[SITEURL]/account-details.php?id=$arr[0]");
die;
}
stdhead("Update Users Upload Amounts");
navmenu();
begin_frame("Update Users Uploaded Amounts",false,10,false);
echo "<form method=\"post\" action=\"admincp.php?action=addgigs\">";
?>
<center><font color=red size=2><b>To add gigs put in the user's name and amount then choose MB for megabytes or GB for gigabytes.</b></font></center>
<p align=center><table border=0 width=100% cellspacing=0 cellpadding=0>
<tr><td class="rowhead"><b>User name</b></td><td class="row1"><input type="text" name="username" size="40"/></td></tr>
<tr><td class="rowhead"><b>Amount</b></td><td class="row1"><input type="text" name="gigs" size="5"/><select name=unit><option value=1>MB</option><option value=2>GB</option></td></tr>
<tr><td colspan="2" class="row1" align="center"><input type="submit" value="Okay" class="btn"/></td></tr>
</table>
</form>
<?
end_frame();
stdfoot();
}
here is a screenshot


For cheap, fast, reliable webhosting, please click here on my affiliate link!
|
|
|
| Topic: Search by Relevance & Search Exact Phrase |
|---|
| Search by Relevance & Search Exact Phrase [message #4667] |
Thu, 05 August 2010 18:22 |
watermolecule  Messages: 109 Registered: July 2010 |
Super-Seeder |
|
|
We are trying to implement a Search by Relevance option in the Order By dropbox within the search page. We'd also like to implement a 'Search Exact Phrase' checkbok in the search page...
Has anyone had any luck modifying the search in PMBT? We'd like to hear from you / get some assistance.
Thanks
|
|
|
| Topic: Login page |
|---|
|
| Topic: currently browsing |
|---|
|
| Topic: httperror.php little fix |
|---|
| httperror.php little fix [message #3541] |
Mon, 18 January 2010 06:47 |
erika  Messages: 8 Registered: January 2010 |
Leecher |
|
|
In the file httperror.php ,check ($admin_email)...
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
include("header.php");
switch ($errid) {
case 400: {
header("HTTP/1.0 400 Bad request");
bterror(str_replace("**email**",spellmail($admin_email),_http400errtxt),_http400errttl);
break;
}
case 401: {
header("HTTP/1.0 401 Access Denied");
bterror(str_replace("**email**",spellmail($admin_email),_http401errtxt),_http401errttl);
break;
}
case 403: {
header("HTTP/1.0 403 Forbidden");
bterror(str_replace("**email**",spellmail($admin_email),_http403errtxt),_http403errttl);
break;
}
case 404: {
header("HTTP/1.0 404 Access Denied");
bterror(str_replace("**email**",spellmail($admin_email),_http404errtxt),_http404errttl);
break;
}
case 500: {
header("HTTP/1.0 500 Internal Server Error");
bterror(str_replace("**email**",spellmail($admin_email),_http500errtxt),_http500errttl);
break;
}
}
include("footer.php");
?>
[Updated on: Mon, 18 January 2010 12:56] by Moderator Report message to a moderator
|
|
|
| Topic: Torrent category viewer |
|---|
| Torrent category viewer [message #3149] |
Fri, 06 November 2009 19:39 |
dophert  Messages: 16 Registered: November 2009 |
Leecher |
|
|
Hey,
I want to have my categories viewed when i'm on the "Torrent" button. how to do that.
And how to create categories in categories like games>pc games
bv.
|
|
|
| Topic: ip system |
|---|
| ip system [message #2923] |
Thu, 10 September 2009 20:21 |
|
replace
function getip() {
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && validip($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && validip($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR') && validip(getenv('HTTP_X_FORWARDED_FOR'))) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP') && validip(getenv('HTTP_CLIENT_IP'))) {
$ip = getenv('HTTP_CLIENT_IP');
} else {
$ip = getenv('REMOTE_ADDR');
}
}
return $ip;
}
with this in include/functions.php
function getip() {
$check = array('HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED',
'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED',
'HTTP_VIA', 'HTTP_X_COMING_FROM', 'HTTP_COMING_FROM');
foreach ($check as $c) {
if (ip_valid(&$_SERVER[$c])) {
return ip_first($_SERVER[$c]);
}
}
return $_SERVER['REMOTE_ADDR'];
}
function ip_first($ips) {
if (($pos = strpos($ips, ',')) != false) {
return substr($ips, 0, $pos);
} else {
return $ips;
}
}
function ip_valid($ips) {
if (isset($ips)) {
$ip = ip_first($ips);
$ipnum = ip2long($ip);
if ($ipnum !== -1 && $ipnum !== false && (long2ip($ipnum) === $ip)) { // PHP 4 and PHP 5
if (($ipnum < 167772160 || $ipnum > 184549375) && // Not in 10.0.0.0/8
($ipnum < -1408237568 || $ipnum > -1407188993) && // Not in 172.16.0.0/12
($ipnum < -1062731776 || $ipnum > -1062666241)) // Not in 192.168.0.0/16
return true;
}
}
return false;
}
|
|
|
| Topic: Problem with user.php |
|---|
| Problem with user.php [message #2863] |
Thu, 06 August 2009 17:25 |
|
Hello.
I change in takeregister.php this line :
$sql = "INSERT INTO ".$db_prefix."_users (username, clean_username, email, password, act_key, regdate" . $passkeyrow . ") VALUES ('".addslashes($username)."', '".strtolower($username)."', '".addslashes($email)."', '".md5($password)."', '".$act_key."', NOW(),'1')" . $passkey .");";
And next :
OpenTable(_btsignup);
/*$replace_markers = Array("**sitename**","**siteurl**","**username**","**password**","**key**");
$replace_data = Array ($sitename,$siteurl,$username,$password,md5($act_key));
$confirm_mail = New eMail;
$confirm_mail->sender = $admin_email;
$confirm_mail->subject = $userregconfirmmailsub[$language];
$confirm_mail->body = str_replace($replace_markers,$replace_data,$userregconfirmmailtext[$language]);
$confirm_mail->Add($email);
$confirm_mail->Send();
echo "<p>"._btregcomplete.spellmail($admin_email)."</p>";
*/
echo "<p>You have been registerd with this site Thank You </p>";
*/
echo "<p>You have been registerd with this site Thank You </p>";
CloseTable();
And ok I don't have problem whit e-mail reg. but. When I logout then i get this error :
SQL Error
Error Executing SQL Query SELECT * FROM gustaff_prt_users WHERE username =''LIMIT 1
Error ID: 1146
Error Message: Table 'gustaff_prt.gustaff_prt_users' doesn't exist
And when I login on site : mysite.com/user.php then get blank site and must del /user.php for back logged on site.
Sory for my english
solved
[Updated on: Thu, 06 August 2009 23:09] Report message to a moderator
|
|
|
| Topic: error |
|---|
| error [message #2603] |
Thu, 07 May 2009 22:05 |
evil  Messages: 25 Registered: May 2009 |
Leecher |
|
|
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 '(*) FROM torrent_casino_bets WHERE id = 2' at line 1
can anyone help sort this for me plz
i get that wen i took a bet in the casino
thank you
|
|
|