Nice![]()
wasnt so hard now fixin all the stuff
my problem^^ http://imageshack.us/photo/my-images...pg/]ImageShack
table name not work
Last edited by denise456; 15-12-12 at 01:17 AM.
try this (module/func.php)
You still need MySQL database of this website for get working well (or you have to edit much things)PHP Code:<?php
require_once('sts/include.php');
function db_log($qrl){
// $lkl = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$lkl) err_log('db_log: can\'t connect to SQL server');
// $dbsl = mysql_select_db(MY_DB, $lkl);
// if (!$dbsl) err_log('db_log: can\'t select SQL database');
// $qr=mysql_query($qrl);
// if(!$qr) err_log('db_log: SQL querry:'.$qrl.', error: '.mysql_error());
// mysql_close($lkl);
}
function svsts(){
ob_start();
sv_sts();
$result = ob_get_contents();
ob_end_clean();
$result = str_replace(PHP_EOL,"",$result);
$parts = explode("<br />",$result);
if(count($parts[0])==0||$parts[0]!="Success"){
$svsts=array('0','Heaven','0','3000','0');
}else{
for($x=0;$x<count($parts);++$x){
$lines = explode( "|", $parts[$x] );
if( count( $lines ) < 5 ) continue;
if($lines[0]=='Id')continue;
$svsts=$lines;
}
db_log('INSERT INTO online(Heaven,Hell) VALUES ('.$svsts[2].',0)');
}
return $svsts;
}
function err_log($text) {
$h=fopen('logs/'.date("ymd").'_error_log.txt','a');
if(is_writable('logs/'.date("ymd").'_error_log.txt')){
if(!$h=fopen('logs/'.date("ymd").'_error_log.txt','a'))
die('Error opening log file, check permissions.');
if (fwrite($h,"[".date("d.m.y H:i:s")."] ".$text."\n")===false)
die('Error writing log file, check permissions.');
fclose($h);
}else
die('Error, log file is not writable.');
}
function escape($s) {
global $text;
$text = strip_tags($text);
$code = $s[1];
$code = htmlspecialchars($code);
$code = str_replace("[", "[", $code);
$code = str_replace("]", "]", $code);
return '<div class=n_qtn>Code:</div><div class=n_qtb><pre>'.$code.'</pre></div>';
};
function removeBr($s) {
return str_replace("<br />", "", $s[0]);
}
function BBCode2Html($text) {
$text = trim($text);
$text = preg_replace_callback('/\[code\](.*?)\[\/code\]/msi', "escape", $text);
$in = array( '/\[b\](.*?)\[\/b\]/msi',
'/\[center\](.*?)\[\/center\]/msi',
'/\[i\](.*?)\[\/i\]/msi',
'/\[u\](.*?)\[\/u\]/msi',
'/\[img\](.*?)\[\/img\]/msi',
'/\[email\](.*?)\[\/email\]/msi',
'/\[url\="?(.*?)"?\](.*?)\[\/url\]/msi',
'/\[url\](.*?)\[\/url\]/msi',
'/\[size\="?(.*?)"?\](.*?)\[\/size\]/msi',
'/\[font\="?(.*?)"?\](.*?)\[\/font\]/msi',
'/\[color\="?(.*?)"?\](.*?)\[\/color\]/msi',
'/\[quote](.*?)\[\/quote\]/msi',
'/\[quote\=(.*?)\](.*?)\[\/quote\]/msi',
'/\
[list\=(.*?)\](.*?)\[\/list\]/msi',
'/\
[list\](.*?)\[\/list\]/msi',
'/\[\*\]\s?(.*?)\n/msi'
);
$out = array( '<strong>\1</strong>',
'<center>\1</center>',
'<em>\1</em>',
'<u>\1</u>',
'<img src="\1" alt="\1" />',
'<a href="mailto:\1">\1</a>',
'<a href="\1">\2</a>',
'<a href="\1">\1</a>',
'<font size="\1">\2</font>',
'<font face="\1">\2</font>',
'<font color="\1">\2</font>',
'<div class=n_qtn>Quote:</div><div class=n_qtb>\1</div>',
'<div class=n_qtn>Quote <b>\1</b>:</div><div class=n_qtb>\2</div>',
'<ol start="\1">\2</ol>',
'<ul>\1</ul>',
'<li>\1</li>'
);
$text = preg_replace($in, $out, $text);
$text = str_replace("\r", "", $text);
$text = nl2br($text);
$text = preg_replace_callback('/<pre>(.*?)<\/pre>/ms', "removeBr", $text);
$text = preg_replace('/<p><pre>(.*?)<\/pre><\/p>/ms', "<pre>\\1</pre>", $text);
$text = preg_replace_callback('/<ul>(.*?)<\/ul>/ms', "removeBr", $text);
$text = preg_replace('/<p><ul>(.*?)<\/ul><\/p>/ms', "<ul>\\1</ul>", $text);
return $text;
}
function get_news($x){
// $link = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$link) die('Could not connect to MySQL server.');
// $db_selected = mysql_select_db(MY_DB, $link);
// if (!$db_selected) die('Could not connect to MySQL database.');
// $q=mysql_query('SELECT id,`date`,title,body FROM news WHERE type='.$x.' ORDER BY id DESC LIMIT 6');
// while($r=mysql_fetch_row($q)){
// $news[]=$r;
// }
// mysql_close($link);
// return $news;
}
function cache($func,$time){
// $id=md5($func);
// $fn='cache/'.$id;
// if(file_exists($fn) && (time()-filemtime($fn))<$time){
// $x=file_get_contents($fn);
// if($x) $data=unserialize($x);
// else die('Cache Error !!!');
// }else{
// $data=eval($func);
// if($data)fwrite(fopen($fn,"w"),serialize($data));
// else die('Cache Error !!!');
// }
// return $data;
}
?>
http://localhostr.com/file/AOIwsI5DKFKs/playsro.png
[QUOTE=RevoLand;7370725]try this (module/func.php)
PHP Code:<?php
require_once('sts/include.php');
function db_log($qrl){
// $lkl = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$lkl) err_log('db_log: can\'t connect to SQL server');
// $dbsl = mysql_select_db(MY_DB, $lkl);
// if (!$dbsl) err_log('db_log: can\'t select SQL database');
// $qr=mysql_query($qrl);
// if(!$qr) err_log('db_log: SQL querry:'.$qrl.', error: '.mysql_error());
// mysql_close($lkl);
}
function svsts(){
ob_start();
sv_sts();
$result = ob_get_contents();
ob_end_clean();
$result = str_replace(PHP_EOL,"",$result);
$parts = explode("<br />",$result);
if(count($parts[0])==0||$parts[0]!="Success"){
$svsts=array('0','Heaven','0','3000','0');
}else{
for($x=0;$x<count($parts);++$x){
$lines = explode( "|", $parts[$x] );
if( count( $lines ) < 5 ) continue;
if($lines[0]=='Id')continue;
$svsts=$lines;
}
db_log('INSERT INTO online(Heaven,Hell) VALUES ('.$svsts[2].',0)');
}
return $svsts;
}
function err_log($text) {
$h=fopen('logs/'.date("ymd").'_error_log.txt','a');
if(is_writable('logs/'.date("ymd").'_error_log.txt')){
if(!$h=fopen('logs/'.date("ymd").'_error_log.txt','a'))
die('Error opening log file, check permissions.');
if (fwrite($h,"[".date("d.m.y H:i:s")."] ".$text."\n")===false)
die('Error writing log file, check permissions.');
fclose($h);
}else
die('Error, log file is not writable.');
}
function escape($s) {
global $text;
$text = strip_tags($text);
$code = $s[1];
$code = htmlspecialchars($code);
$code = str_replace("[", "[", $code);
$code = str_replace("]", "]", $code);
return '<div class=n_qtn>Code:</div><div class=n_qtb><pre>'.$code.'</pre></div>';
};
function removeBr($s) {
return str_replace("<br />", "", $s[0]);
}
function BBCode2Html($text) {
$text = trim($text);
$text = preg_replace_callback('/\[code\](.*?)\[\/code\]/msi', "escape", $text);
$in = array( '/\[b\](.*?)\[\/b\]/msi',
'/\[center\](.*?)\[\/center\]/msi',
'/\[i\](.*?)\[\/i\]/msi',
'/\[u\](.*?)\[\/u\]/msi',
'/\[img\](.*?)\[\/img\]/msi',
'/\[email\](.*?)\[\/email\]/msi',
'/\[url\="?(.*?)"?\](.*?)\[\/url\]/msi',
'/\[url\](.*?)\[\/url\]/msi',
'/\[size\="?(.*?)"?\](.*?)\[\/size\]/msi',
'/\[font\="?(.*?)"?\](.*?)\[\/font\]/msi',
'/\[color\="?(.*?)"?\](.*?)\[\/color\]/msi',
'/\[quote](.*?)\[\/quote\]/msi',
'/\[quote\=(.*?)\](.*?)\[\/quote\]/msi',
'/\
[list\=(.*?)\](.*?)\[\/list\]/msi',
'/\
[list\](.*?)\[\/list\]/msi',
'/\[\*\]\s?(.*?)\n/msi'
);
$out = array( '<strong>\1</strong>',
'<center>\1</center>',
'<em>\1</em>',
'<u>\1</u>',
'<img src="\1" alt="\1" />',
'<a href="mailto:\1">\1</a>',
'<a href="\1">\2</a>',
'<a href="\1">\1</a>',
'<font size="\1">\2</font>',
'<font face="\1">\2</font>',
'<font color="\1">\2</font>',
'<div class=n_qtn>Quote:</div><div class=n_qtb>\1</div>',
'<div class=n_qtn>Quote <b>\1</b>:</div><div class=n_qtb>\2</div>',
'<ol start="\1">\2</ol>',
'<ul>\1</ul>',
'<li>\1</li>'
);
$text = preg_replace($in, $out, $text);
$text = str_replace("\r", "", $text);
$text = nl2br($text);
$text = preg_replace_callback('/<pre>(.*?)<\/pre>/ms', "removeBr", $text);
$text = preg_replace('/<p><pre>(.*?)<\/pre><\/p>/ms', "<pre>\\1</pre>", $text);
$text = preg_replace_callback('/<ul>(.*?)<\/ul>/ms', "removeBr", $text);
$text = preg_replace('/<p><ul>(.*?)<\/ul><\/p>/ms', "<ul>\\1</ul>", $text);
return $text;
}
function get_news($x){
// $link = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$link) die('Could not connect to MySQL server.');
// $db_selected = mysql_select_db(MY_DB, $link);
// if (!$db_selected) die('Could not connect to MySQL database.');
// $q=mysql_query('SELECT id,`date`,title,body FROM news WHERE type='.$x.' ORDER BY id DESC LIMIT 6');
// while($r=mysql_fetch_row($q)){
// $news[]=$r;
// }
// mysql_close($link);
// return $news;
}
function cache($func,$time){
// $id=md5($func);
// $fn='cache/'.$id;
// if(file_exists($fn) && (time()-filemtime($fn))<$time){
// $x=file_get_contents($fn);
// if($x) $data=unserialize($x);
// else die('Cache Error !!!');
// }else{
// $data=eval($func);
// if($data)fwrite(fopen($fn,"w"),serialize($data));
// else die('Cache Error !!!');
// }
// return $data;
}
?>
[/quote]Thank'sYou still need MySQL database of this website for get working well (or you have to edit much things)
http://localhostr.com/file/AOIwsI5DKFKs/playsro.png
Try Use The Zend Server its Better
I use Xampp
ok thx
[QUOTE=RevoLand;7370725]try this (module/func.php)
PHP Code:<?php
require_once('sts/include.php');
function db_log($qrl){
// $lkl = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$lkl) err_log('db_log: can\'t connect to SQL server');
// $dbsl = mysql_select_db(MY_DB, $lkl);
// if (!$dbsl) err_log('db_log: can\'t select SQL database');
// $qr=mysql_query($qrl);
// if(!$qr) err_log('db_log: SQL querry:'.$qrl.', error: '.mysql_error());
// mysql_close($lkl);
}
function svsts(){
ob_start();
sv_sts();
$result = ob_get_contents();
ob_end_clean();
$result = str_replace(PHP_EOL,"",$result);
$parts = explode("<br />",$result);
if(count($parts[0])==0||$parts[0]!="Success"){
$svsts=array('0','Heaven','0','3000','0');
}else{
for($x=0;$x<count($parts);++$x){
$lines = explode( "|", $parts[$x] );
if( count( $lines ) < 5 ) continue;
if($lines[0]=='Id')continue;
$svsts=$lines;
}
db_log('INSERT INTO online(Heaven,Hell) VALUES ('.$svsts[2].',0)');
}
return $svsts;
}
function err_log($text) {
$h=fopen('logs/'.date("ymd").'_error_log.txt','a');
if(is_writable('logs/'.date("ymd").'_error_log.txt')){
if(!$h=fopen('logs/'.date("ymd").'_error_log.txt','a'))
die('Error opening log file, check permissions.');
if (fwrite($h,"[".date("d.m.y H:i:s")."] ".$text."\n")===false)
die('Error writing log file, check permissions.');
fclose($h);
}else
die('Error, log file is not writable.');
}
function escape($s) {
global $text;
$text = strip_tags($text);
$code = $s[1];
$code = htmlspecialchars($code);
$code = str_replace("[", "[", $code);
$code = str_replace("]", "]", $code);
return '<div class=n_qtn>Code:</div><div class=n_qtb><pre>'.$code.'</pre></div>';
};
function removeBr($s) {
return str_replace("<br />", "", $s[0]);
}
function BBCode2Html($text) {
$text = trim($text);
$text = preg_replace_callback('/\[code\](.*?)\[\/code\]/msi', "escape", $text);
$in = array( '/\[b\](.*?)\[\/b\]/msi',
'/\[center\](.*?)\[\/center\]/msi',
'/\[i\](.*?)\[\/i\]/msi',
'/\[u\](.*?)\[\/u\]/msi',
'/\[img\](.*?)\[\/img\]/msi',
'/\[email\](.*?)\[\/email\]/msi',
'/\[url\="?(.*?)"?\](.*?)\[\/url\]/msi',
'/\[url\](.*?)\[\/url\]/msi',
'/\[size\="?(.*?)"?\](.*?)\[\/size\]/msi',
'/\[font\="?(.*?)"?\](.*?)\[\/font\]/msi',
'/\[color\="?(.*?)"?\](.*?)\[\/color\]/msi',
'/\[quote](.*?)\[\/quote\]/msi',
'/\[quote\=(.*?)\](.*?)\[\/quote\]/msi',
'/\
[list\=(.*?)\](.*?)\[\/list\]/msi',
'/\
[list\](.*?)\[\/list\]/msi',
'/\[\*\]\s?(.*?)\n/msi'
);
$out = array( '<strong>\1</strong>',
'<center>\1</center>',
'<em>\1</em>',
'<u>\1</u>',
'<img src="\1" alt="\1" />',
'<a href="mailto:\1">\1</a>',
'<a href="\1">\2</a>',
'<a href="\1">\1</a>',
'<font size="\1">\2</font>',
'<font face="\1">\2</font>',
'<font color="\1">\2</font>',
'<div class=n_qtn>Quote:</div><div class=n_qtb>\1</div>',
'<div class=n_qtn>Quote <b>\1</b>:</div><div class=n_qtb>\2</div>',
'<ol start="\1">\2</ol>',
'<ul>\1</ul>',
'<li>\1</li>'
);
$text = preg_replace($in, $out, $text);
$text = str_replace("\r", "", $text);
$text = nl2br($text);
$text = preg_replace_callback('/<pre>(.*?)<\/pre>/ms', "removeBr", $text);
$text = preg_replace('/<p><pre>(.*?)<\/pre><\/p>/ms', "<pre>\\1</pre>", $text);
$text = preg_replace_callback('/<ul>(.*?)<\/ul>/ms', "removeBr", $text);
$text = preg_replace('/<p><ul>(.*?)<\/ul><\/p>/ms', "<ul>\\1</ul>", $text);
return $text;
}
function get_news($x){
// $link = mysql_connect(MY_ADD, MY_UID, MY_PWD);
// if (!$link) die('Could not connect to MySQL server.');
// $db_selected = mysql_select_db(MY_DB, $link);
// if (!$db_selected) die('Could not connect to MySQL database.');
// $q=mysql_query('SELECT id,`date`,title,body FROM news WHERE type='.$x.' ORDER BY id DESC LIMIT 6');
// while($r=mysql_fetch_row($q)){
// $news[]=$r;
// }
// mysql_close($link);
// return $news;
}
function cache($func,$time){
// $id=md5($func);
// $fn='cache/'.$id;
// if(file_exists($fn) && (time()-filemtime($fn))<$time){
// $x=file_get_contents($fn);
// if($x) $data=unserialize($x);
// else die('Cache Error !!!');
// }else{
// $data=eval($func);
// if($data)fwrite(fopen($fn,"w"),serialize($data));
// else die('Cache Error !!!');
// }
// return $data;
}
?>
[/quote]how did you get the slider working ^^ ?You still need MySQL database of this website for get working well (or you have to edit much things)
http://localhostr.com/file/AOIwsI5DKFKs/playsro.png