Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

With no SQL modifications :

Replace:



//$country

$res = SQL_Query_exec("SELECT name FROM countries WHERE id=$user[country] LIMIT 1");

if (mysql_num_rows($res) == 1){

$arr = mysql_fetch_assoc($res);

$country = "$arr[name]";

}



if (!$country) $country = "<b>Unknown</b>";
by:


//$country

$res = SQL_Query_exec("SELECT name, flagpic FROM countries WHERE id=$user[country] LIMIT 1");

if (mysql_num_rows($res) == 1){

$arr = mysql_fetch_assoc($res);

$country = "<img src=". $site_config['SITEURL']."/images/flags/$arr[flagpic] title='$arr[name]' />";

}



if (!$country) $country = "<b>Unknown</b>";



you must use thib's flag.rar. (images/flags/)
Original Post : [url="http://www.torrenttrader.org/topic/9016-auto-detect-browser-in-account-details/page__hl__browser"]http://www.torrenttr...ge__hl__browser[/url]

Just modded for v2.08...

Add in SQL

ALTER TABLE `users` ADD `browser` varchar(50) NOT NULL;





Find code in functions.php



SQL_Query_exec("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip).", page=".sqlesc($where)." WHERE id=" . $row["id"]);





replace code



		if(preg_match("/Opera/u", getenv("HTTP_USER_AGENT"))) $browser = "opera";

else if(preg_match("/Safari/u", getenv("HTTP_USER_AGENT"))) $browser = "safari";

else if(preg_match("/WebTV/u", getenv("HTTP_USER_AGENT"))) $browser = "webtv";

else if(preg_match("/Maxthon/u", getenv("HTTP_USER_AGENT"))) $browser = "maxthon";

else if(preg_match("/Konqueror/u", getenv("HTTP_USER_AGENT"))) $browser = "Konqueror";

else if(preg_match("/Firefox/u", getenv("HTTP_USER_AGENT"))) $browser = "firefox";

else if(preg_match("/MSIE/u", getenv("HTTP_USER_AGENT"))) $browser = "Internet Explorer";

else if(preg_match("/Lynx/u", getenv("HTTP_USER_AGENT"))) $browser = "lynx";

else if((preg_match("/Nav/u", getenv("HTTP_USER_AGENT"))) || (preg_match("/Gold/u", getenv("HTTP_USER_AGENT"))) || (preg_match("/X11/u", getenv("HTTP_USER_AGENT"))) || (preg_match("/Mozilla/u", getenv("HTTP_USER_AGENT"))) || (preg_match("/Netscape/u", getenv("HTTP_USER_AGENT"))) ) $browser = "mozilla";

else $browser = "Autre - Inconnu";



SQL_Query_exec("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip).", browser=".sqlesc($browser).", page=".sqlesc($where)." WHERE id=" . $row["id"]);





Find code in account-details.php



<?php echo T_("TITLE"); ?>: <i><?php echo format_comment($user["title"])?></i><br />





Add after code



<?php echo T_("BROWSER"); ?>: <?php echo htmlspecialchars($user["browser"]);?><br />





Find code in account.php



<?php print("<b>".T_("IP").":</b> " . $CURUSER["ip"] . "\n"); ?><br />





Add after code



<?php print("<b>".T_("BROWSER").":</b> " . $CURUSER["browser"] . "\n"); ?><br />







Add this to /languages/english.php:



$LANG["BROWSER"] = "Browser";





For French, add this to /languages/french.php:



$LANG["BROWSER"] = "Navigateur";
not for lack of time, but I just do much more than what you did believe me

if I do not post it because I do not have time for one and two, no desire to take my mind was what to put in and what to vip member ...

Finally, Walker knows that the day I am an MP I would file my sources .. However, it've never done ...
my server is not in France ...
+1 Walker... thanks for your sincerity.

the fault is mine, I could not test the web links without first enable PHP, however, as everyone knows there not go very far with ca ...  ;)

As a Cherokee, I challenge you to test it, you'll see even locally you will not be disappointed with the knowledge required for its use ...

DJNoob : distrib my site ...; hihihih no problem... it's an HTracker with SIF modifiction.... it's OpenSource... it's Free !!!  ;)  :P
yes  ;)  lol !
too much! AC flies high at home ... I compile my web serv was 4am and then the opening five minutes without web access php (which distributes mode Read / Send PHP files) Basically you are very good!

Also if you do that AC has done to satisfy your craving for superiority, is not a problem I know also be a scum: P

Walker PHPMyAdmin? CPanel? is not for noob?

Vulnerabililty CHMOD ?.... ahahahah....
hello !

Just a tips !

if you have suggest.js for search, Jquery News don't work...

suggest.js conflict with jquery-1.3.2.min.js / Jquery.js
there is simply put everything on the same line

{

NewWin=window.open('...................................directories=no,mnubar=no,resizable=yes');

}


all the party which lies between the {}

when you do a simple copy and paste from a forum that does not .... simply ...
Hello Azuris,

to answer your question, I give you directly change that I make in relation to the first post of Alamandra, hope that it may serve you ...

in upload-torrent.php replace :

{NewWin=window.open('<?=$site_config['SITEURL']?>/preview.php','home',

'width=1000,height=1000,scrollbars=yes,toolbar=yes,status=no,directories=no,m

nubar=no,resizable=yes');}





Replace with :





{

NewWin=window.open('<?=$site_config['SITEURL']?>/preview.php','home','width=1000,height=1000,scrollbars=yes,toolbar=yes,status=no,directories=no,m

nubar=no,resizable=yes');

}





and here is my preview.php =>





<?

require_once("backend/functions.php");

dbconn();

stdhead("Previsualisation du post");



begin_frame("Previsualisation du Post");

?>

<table width="100%" border="1">

<tr>

<td align="center" style='border: 0;'>

<div align="center">

<p><?=format_comment($body)?></p>

</div>

<table width="100%">

<form name="preview" method="post" action="?">

<textarea name="body" cols="80" rows="30"><?=$body?></textarea><br>

<div align="center">

<input type="submit" class="btn" value="Preview">

</div>

</form>

</table>

</td>

<table width="100%" border="1">

<td align="center" style='border: 0;'>

<?

require_once("backend/bbcode.php");

print ("".textbbcode("preview","body",$body)."");

?>



</td>

</tr>

</table>



<?

end_frame();

stdfoot();

?>
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728