Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #1  
Old 6th June 2013, 00:26
Giorgatzelos's Avatar
Giorgatzelos Giorgatzelos is offline
Senior Member
 
Join Date: Nov 2009
Greece
Posts: 300
Default staffapp.php footer misplaced error...
Hi, somewhere in https://www.phpmybittorrent.com/forum/ i found this mod, wich works excelent but the applicants form, wich shows the footer misplaced...how can it be fixed? Thanx!


PHP Code:
<?php
/*
*----------------------------phpMyBitTorrent V 2.0.4---------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*--------------   Created By Antonio Anzivino (aka DJ Echelon)   --------------*
*-------------------   And Joe Robertson (aka joeroberts)   -------------------*
*-------------               http://www.p2pmania.it               -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*-------------              http://www.bittorrent.com             -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*--   This program 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.                                    --*
*--                                                                          --*
*--   This program 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 this program; if not, write to the Free Software            --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA --*
*--                                                                          --*
*------------------------------------------------------------------------------*
*------              ©2010 phpMyBitTorrent Development Team              ------*
*-----------               http://phpmybittorrent.com               -----------*
*------------------------------------------------------------------------------*
*-------------------   Saturday, JUN 27, 2009 1:05 AM   -----------------------*
*/
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
include (
"header.php");
//OpenTable(_btfaqs);
// Fill in application
if (!isset($form))$form '';
if (
$form != "1")
{

  
$res $db->sql_query("SELECT status FROM ".$db_prefix."_staffapp WHERE userid = " $user->id) or btsqlerror("SELECT status FROM ".$db_prefix."_staffapp WHERE userid = " $user->id);
  
$arr $db->sql_fetchrow($res);
  if (
$user->moderator)
  
bterror("It appears you are allready part of our Staff team.","Access denied");
  elseif (
$arr["status"] == "pending")
  
bterror("It appears you are currently pending confirmation of your Staff application.","Access denied");
  elseif (
$arr["status"] == "rejected")
  
bterror("It appears you have applied for staff before and have been rejected. If you would like a second chance please contact an administrator.","Access denied");
  else 
  {
      
OpenTable("Staff application");
      print(
"<h1 align=center>Staff application</h1>");
      print(
"<table width=750 border=1 cellspacing=0 cellpadding=10><tr><td>");
      print(
"<form action=staffapp.php method=post enctype=multipart/form-data>");
      print(
"<table border=1 cellspacing=0 cellpadding=5 align=center>");

      if (
$user->downloaded 0)
    
$ratio $user->uploaded $user->downloaded;
      elseif (
$user->uploaded 0)
    
$ratio 1;
      else
    
$ratio 0;

      
$res $db->sql_query("SELECT connectable FROM ".$db_prefix."_peers WHERE uid=" $user->id)or btsqlerror("SELECT connectable FROM ".$db_prefix."_peers WHERE uid=" $user->id);
      if (
$row $db->sql_fetchrow($res))
    {
        
$connect $row[0];
        if (
$connect == "yes")
        
$connectable "Yes";
        else
        
$connectable "No";
    }
    else
    
$connectable "Pending";

      print(
"<tr><td class=rowhead>My username is</td><td><input name=userid type=hidden value=".$user->id.">".$user->name."</td></tr>");
      print(
"<tr><td class=rowhead>I have a positive ratio</td><td>".($ratio >= "Yes" "No")."</td></tr>");
      print(
"<tr><td class=rowhead>I am connectable</td><td><input name=connectable type=hidden value=$connectable>$connectable</td></tr>");
      print(
"<tr><td class=rowhead>What I have to offer</td><td><textarea name=offer cols=80 rows=1 wrap=VIRTUAL></textarea></td></tr>");
      print(
"<tr><td class=rowhead>Why I should be promoted</td><td><textarea name=whatreason cols=80 rows=2 wrap=VIRTUAL></textarea></td></tr>");
      print(
"<tr><td class=rowhead>I am a staff member on other sites</td><td><input type=radio name=sites value=yes>Yes
      <input name=sites type=radio value=no checked>No</td></tr>"
);
      print(
"<tr><td class=rowhead>Those sites are</td><td><textarea name=sitenames cols=80 rows=1 wrap=VIRTUAL></textarea></td></tr>");
      print(
"<tr><td colspan=2>");
      print(
"<br>&nbsp;&nbsp;I know how to help others when needed.");
      print(
"<br><input type=radio name=creating value=yes>Yes
      <input name=creating type=radio value=no checked>No"
);
      print(
"<br><br>&nbsp;&nbsp;I understand that if i mess up bad enough on the site i will be automatically demoted and also be warned");
      print(
"<br><input type=radio name=seeding value=yes>Yes
      <input name=seeding type=radio value=no checked>No"
);
      print(
"<br><br><input name=form type=hidden value=1>");
      print(
"</td></tr>");
      print(
"</table>");
      print(
"<p align=center><input type=submit name=Submit value=Send></p>");
      print(
"</table></form>");
      print(
"</td></tr></table>");
      
CloseTable();
  }

// Process application

}
else
{

  
$connectable $connectable;
  
$speed 0;
  
$offer addslashes($offer);
  
$reason addslashes($whatreason);
  
$sites $sites;
  
$sitenames addslashes($sitenames);

  if (!
$offer)
  
bterror("It appears you have left the field with the things you have to offer blank.","Error");
echo 
$reason;
  if (!
$reason)
  
bterror("It appears you have left the field with the reason why we should promote you blank.","Error");
echo
'test';
  if (
$sites == "yes" && !$sitenames)
  
bterror("It appears you have left the field with the sites you are staff at blank.","Error");
echo
'test';

  
$res $db->sql_query("INSERT INTO ".$db_prefix."_staffapp(userid,applied,connectable,offer,reason,sites,sitenames) VALUES(" $user->id ", '".implode("','",array_map("escape",array(get_date_time(), $connectable$offer$reason$sites$sitenames)))."')") or die("INSERT INTO ".$db_prefix."_staffapp(userid,applied,connectable,offer,reason,sites,sitenames) VALUES(" $user->id ", '".implode("','",array_map("escape",array(get_date_time(), $connectable$offer$reason$sites$sitenames)))."')");
  if (!
$res) {
      
$sqler $db->sql_error();
      if (
$sqler['code'] == 1062)
      
bterror("It appears you tried to send your application twice.","Error");
    else
    
bterror("It appears something went wrong while sending your application. Please <a href=staffapp.php>try again</a>.","Error");
  }
  else
  
bterror("Your application has succesfully been sent to the staff.","Application sent");
}
include (
"footer.php");
?>
Attached Thumbnails
2.png  
Reply With Quote
  #2  
Old 6th June 2013, 02:09
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
replace
PHP Code:
print("</table>");
      print(
"<p align=center><input type=submit name=Submit value=Send></p>");
      print(
"</table></form>");
      print(
"</td></tr></table>");
      
CloseTable();
  }

// Process application 
with
PHP Code:
print("</table>");
      print(
"<p align=center><input type=submit name=Submit value=Send></p>");
      print(
"</form>");
      print(
"</table>");
      
CloseTable();
  }

// Process application 
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #3  
Old 6th June 2013, 16:23
Giorgatzelos's Avatar
Giorgatzelos Giorgatzelos is offline
Senior Member
 
Join Date: Nov 2009
Greece
Posts: 300
Default
Thanks Joe...
Reply With Quote
Reply

Tags
error , footer , misplaced , staffappphp

Thread Tools

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



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