|
#1
|
||||
|
||||
Update code
hello,
so I use code TS 2.5 its based TBDev 08 and works on php 5 so what i must change in my code, to works on php 7. thnk you for answer |
#2
|
||||
|
||||
all mysql_ will become mysqli_ and a host of other conversions are needed. Its not a hard thing to do, but will take some time figuring out if any of the old code was deprecated and convert it to php 7
|
#3
|
||||
|
||||
is here any coder to help me
ex: Quote:
Quote:
Quote:
Last edited by elvira; 13th October 2019 at 19:23. |
#4
|
||||
|
||||
you need to connect the database. you have to create a database variable. You can use yakpro, but it wont fix deprecated code
I can only use TT as an example, but it should look like this, $GLOBALS is a php universal Quote:
Quote:
each() mysql_result() the above are deprecated, emulate the function if you need to Last edited by MicroMonkey; 13th October 2019 at 23:27. |
#5
|
||||
|
||||
this is in config file to connect database
|
#6
|
||||
|
||||
post your config file, maybe someone can help
Last edited by MicroMonkey; 17th October 2019 at 03:07. |
#7
|
||||
|
||||
Code:
<?php # IMPORTANT: Do not edit below unless you know what you are doing! if(!defined('IN_TRACKER')) die('Hacking attempt!'); readconfig ('MAIN'); $SITE_ONLINE = $MAIN['site_online']; $max_torrent_size = $MAIN['max_torrent_size']; $announce_interval = $MAIN['announce_interval']; $signup_timeout = $MAIN['signup_timeout']; $minvotes = $MAIN['minvotes']; $max_dead_torrent_time = $MAIN['max_dead_torrent_time']; $maxusers = $MAIN['maxusers']; $torrent_dir = $MAIN['torrent_dir']; $announce_urls = array(); $announce_urls[] = $MAIN['announce_urls']; $BASEURL = $MAIN['BASEURL']; $DEFAULTBASEURL = $MAIN['DEFAULTBASEURL']; $MEMBERSONLY = $MAIN['MEMBERSONLY']; $PEERLIMIT = $MAIN['PEERLIMIT']; $SITEEMAIL = $MAIN['SITEEMAIL']; $SITENAME = $MAIN['SITENAME']; $autoclean_interval = $MAIN['autoclean_interval']; $pic_base_url = $MAIN['pic_base_url']; $table_cat = $MAIN['table_cat']; $REPORTMAIL = $MAIN['reportemail']; $invitesystem = $MAIN['invitesystem']; $registration = $MAIN['registration']; $showpolls = $MAIN['showpolls']; $showstats = $MAIN['showstats']; $showlastxforumposts = $MAIN['showlastxforumposts']; $showlastxtorrents = $MAIN['showlastxtorrents']; $showtrackerload = $MAIN['showtrackerload']; $showwhatsgoinon = $MAIN['showwhatsgoinon']; $showshoutbox = $MAIN['showshoutbox']; $waitsystem = $MAIN['waitsystem']; $maxdlsystem = $MAIN['maxdlsystem']; $bitbucket = $MAIN['bitbucket']; $cache = $MAIN['cache']; $showforumstats = $MAIN['showforumstats']; $verification = $MAIN['verification']; $invite_count = $MAIN['invite_count']; $invite_timeout = $MAIN['invite_timeout']; $forum_online = $MAIN['forum_online']; $attachment_dir = $MAIN['attachment_dir']; $maxchar = $MAIN['maxchar']; readconfig('DATABASE'); $mysql_host = $DATABASE['mysql_host']; $mysql_user = $DATABASE['mysql_user']; $mysql_pass = $DATABASE['mysql_pass']; $mysql_db = $DATABASE['mysql_db']; readconfig('SMTP'); $smtptype = $SMTP['smtptype']; $smtp_host = $SMTP['smtp_host']; $smtp_port = $SMTP['smtp_port']; if (strtoupper(substr(PHP_OS,0,3)=='WIN')) $smtp_from = $SMTP['smtp_from']; $smtpaddress = $SMTP['smtpaddress']; $smtpport = $SMTP['smtpport']; $accountname = $SMTP['accountname']; $accountpassword = $SMTP['accountpassword']; readconfig('SECURITY'); $securelogin = $SECURITY['securelogin']; $iv = $SECURITY['iv']; $maxip = $SECURITY['maxip']; $maxloginattempts = $SECURITY['maxloginattempts']; $disablerightclick = $SECURITY['disablerightclick']; readconfig('TWEAK'); $where = $TWEAK['where']; $iplog1 = $TWEAK['iplog1']; $iplog2 = $TWEAK['iplog2']; $ctracker = $TWEAK['ctracker']; $autorefresh = $TWEAK['autorefresh']; $autorefreshtime = $TWEAK['autorefreshtime']; $leftmenu = $TWEAK['leftmenu']; $gzipcompress = $TWEAK['gzipcompress']; $shoutname = $TWEAK['shoutname']; $shoutbot = $TWEAK['shoutbot']; $shoutduty = $TWEAK['shoutduty']; readconfig('EXTRA'); $nc = $EXTRA['nc']; $rqs = $EXTRA['rqs']; $split = $EXTRA['split']; $imageresizermode = !empty($EXTRA['imageresizermode']) ? $EXTRA['imageresizermode'] : 'enlarge'; $freeleech = $EXTRA['freeleech']; $imdbupload = $EXTRA['imdbupload']; $naziv = !empty($EXTRA['naziv']) ? $EXTRA['naziv'] : '48 sati free leech!'; $ai = $EXTRA['ai']; $pd = $EXTRA['pd']; $ref = $EXTRA['ref']; readconfig('PAYPAL'); $pmail = $PAYPAL['pmail']; $pcc = $PAYPAL['pcc']; $tn = $PAYPAL['tn']; readconfig('KPS'); $bonus = $KPS['bonus']; $kpsseed = $KPS['kpsseed']; $kpsupload = $KPS['kpsupload']; $kpscomment = $KPS['kpscomment']; $kpsthanks = $KPS['kpsthanks']; $kpsrate = $KPS['kpsrate']; $kpspoll = $KPS['kpspoll']; $kpstopic = $KPS['kpstopic']; $kpspost = $KPS['kpspost']; readconfig('REDIRECT'); $redirect = $REDIRECT['redirect']; $text = $REDIRECT['text']; $localaddresses = $REDIRECT['localaddresses']; $protocol = $REDIRECT['protocol']; $delay = $REDIRECT['delay']; $title = $REDIRECT['title']; ReadConfig( 'WORDCENSOR' ) ; $wordlist = $WORDCENSOR['words']; readconfig('SHOUTCAST'); $radio_online = $SHOUTCAST['radio_online']; $SC_ENABLED = $SHOUTCAST['SC_ENABLED']; $SC_HTTPTIMEOUT = $SHOUTCAST['SC_HTTPTIMEOUT']; $SC_TITLE = $SHOUTCAST['SC_TITLE']; $SC_HOSTNAME = $SHOUTCAST['SC_HOSTNAME']; $SC_PORT = $SHOUTCAST['SC_PORT']; $SC_USERNAME = $SHOUTCAST['SC_USERNAME']; $SC_PASSWORD = $SHOUTCAST['SC_PASSWORD']; readconfig('TEMPLATE'); $charset = !empty($TEMPLATE['charset']) ? $TEMPLATE['charset'] : 'UTF-8'; $metakeywords = !empty($TEMPLATE['metakeywords']) ? $TEMPLATE['metakeywords'] : 'torrent, php, source, torrent source, free'; $metadesc = !empty($TEMPLATE['metadesc']) ? $TEMPLATE['metadesc'] : 'Best Torrent Source Ever '; $slogan = !empty($TEMPLATE['slogan']) ? $TEMPLATE['slogan'] : 'Slogan!'; ?> |
#8
|
|||
|
|||
the above as nothing to do with if (mysql_affected_rows() === 0) {
Look at the files it call on And the line your looking at must be as below PHP Code:
it will need a few more functions for it too work Ive done so many i know what im talking about |
|
|