Elimde eski bir script var benim için manevi değeri yüksek. Sql güncellemerinden sonra sql ile bağlantısı kesildi. Bu sicripti bir şekilde çalıştırmam lazım.
Sanırım
$CFG_SERVER komutları yeni sürüm ile devre dışı kalmış. konuyla alakalı Türkçe bir doküman sunan bir site buldum ama php hakkında pek bilgi sahibi olmadığım için anlamadım. Aşağıdaki config dosyasını nasıl yeni sisteme göre derleyebilirim? Yardımcı olursanız çok sevinirim.
Sitenin verdiği bağlantı hatası; "; exit; } $email = strip_tags($_POST[email]); $nick = strip_tags($_POST[nick]); $action = $_POST[action]; if ($action == '1'){ $v1 = strpos($email,"@"); $v2 = strpos($email,"."); if (!(($v1>0)&&($v2>0))) erro("Geçersiz e-posta adresi"); $RA=getenv("X_FORWARDED_FOR"); if($RA=="") $RA=getenv("REMOTE_ADDR"); $p = mysql_query("SELECT * FROM players WHERE email='$email' AND nick='$nick'") or die("select error"); if (mysql_num_rows($p) == 0) erro("Bilgileri doğru girdiğinizden emin misiniz? Eminseniz Sistem Yöneticisi ile irtibata geçiniz!"); $row = mysql_fetch_array($p); mail($email,"WebMaster"," Kullanici Bilgileriniz... Kullanici Adi : $row[nick] Parola: $row[password] $CFG_SITE_URL ---------------------------------Konuyla alakalı türkçe dökmüman; https://www.it-swarm.dev/tr/php/conf...si/1070680597/ Sql Bağlantısını Sağlayan Config.php dosyası; <?
error_reporting(E_ERROR); /* Will show only critical errors *///set_magic_quotes_runtime(1); /* Convert quotes */
$VERSION = "1.3-dev";$_CONFIG = true;
$CFG_GERCEK_SUNUCU = true;
if ($CFG_GERCEK_SUNUCU)
{
$CFG_SERVER = "localhost";
$CFG_USER = "";
$CFG_PASSWORD = "";
$CFG_DATABASE = "";
}
else
{
$CFG_SERVER = "localhost";
$CFG_USER = "root";
$CFG_PASSWORD = "";
$CFG_DATABASE = "bb";
mysql_query("SET NAMES ?latin5'");
mysql_query("SET CHARACTER SET latin5'");
mysql_query("SET COLLATION_CONNECTION = ?latin5_turkish_ci?");
}
$BAD_PLAYER_ONLINE_LIMIT =0;
$ONLINE_LIMIT = 250; /* how many users can conect simultaniously? 0 = unlimited */
$ONLINE_LIMIT_ALTIN = 500; /* how many users can conect simultaniously? 0 = unlimited */
$CFG_EXPIREGAME = 3; /* number of days before untouched games expire (minimum 1)*/
$ONLINEGOSTERMESURESI = 600;
$CFG_SESSIONTIMEOUT = 9000000000000000000000000000000000000; /* session times out if user doesn't interact after x secs */
$CFG_EXPIRETARIHCE =3; /*Ar?ivin silinme süresi*/
$CFG_PERMIT_HOW_MANY_GAMES = 18; /* The limit that the player can match ?*/
$CFG_PERMIT_GOLDEN_HOW_MANY_GAMES = 300; /* The limit that the GOLD player can match ?*/
$CFG_EXPIREGAMESOON = 3;
$CFG_MINAUTORELOAD = 160; /* min number of secs between automatic reloads reloads */
$CFG_USEEMAILNOTIFICATION = FALSE; /* Use email notification requires PHP to be properly configured for */
$CFG_MAILADDRESS = "msn@satrancsaati.com"; /* email address people see when receiving WebChess generated mail */
$CFG_SITE_URL = "http://www.satrancsaati.com";
$CFG_NICKCHANGEALLOWED = FALSE; /* whether a user can change their nick from the main menu */
$CFG_MIN_ROUNDS = 2; /* Number of rounds needed to a game count in the ranking - Minimun 1 */
$CFG_ENABLE_UNDO = FALSE; /* Can permit undo moves? */
$CFG_DEFAULT_LANGUAGE = "turkish"; /* Default Language */
$CFG_RANKING_LIMIT = 100; /* Use 0 to show all players*/
$CFG_PERPAGE_LIST = 10; /* How many items should be displayed per page */
$CFG_LOG_PATH = "bb"; /* webchess.log must be writeable to http server user, use Blank to disable log*/
$CFG_LOG_DEBUG = TRUE; /* Save Ranking updates in the txt log */
$CFG_ENABLE_CHAT = TRUE; /* Can permit chat between players? */
$CFG_SOHBET_ACIK = FALSE;
$CFG_RANK_COMPUTER = FALSE; /* Games played against chess-bots can count at ranking? */
$CFG_ENABLE_SUBRANKING = TRUE; /* Enable SubRanking (Medal Ranking) */
$CFG_USE_RANDOM_QUOTES = TRUE; /* Radom quotes in the mainmenu */
$CFG_DEFAULT_COLOR_THEME = "ay"; /* Color Theme to use at index and to the new users */
$CFG_DEFAULT_PIECES = "ay";
$CFG_DEFAULT_BOARD_SIZE = 55;
$CFG_PERMIT_MULTIPLE_GAMES = FALSE; /* Can the same player be invited more than once at the same time?*/
$CFG_CONFIRM_MOVE = FALSE; /* Ask confirmation for every move */
$CFG_CONFIRM_EMAIL = FALSE;
$STRONG_EMAIL_VALIDATION = FALSE; /* Checks for e-mail validation at login, and ask the user to choose a valid email.*/ /* Useful for old databases
*/
$COMPRESSION = TRUE; /* Compress pages */
$AVATAR_LOCATION = "directory"; /* Where store avatars? (database|directory) */
$max_size = 25; /* Maximum File Size in KB */
$max_width= 160; /* maximum width in pixel */
$max_height= 160; /* maximum height in pixel */
$extensions = array("jpg", "gif"); /* allowed files (.gif and .GIF are different!!!) */
$def_avatar = "default.gif"; /* name of the default avatar (in /avatars/ directory) */
$CFG_ENABLE_TRIAL_RATING = FALSE; /* Should new users pass by 5 games before receive a rating? */
$CFG_TIME_ARRAY = array( 18,5,10,15,20,30,45,60,120,150,180,240,300,360,420,480,540,600); /* Time that can be used in time limited games (in seconds and less than 1440) */
$JAVASCRIPT_EXT = ".js"; /* What javascript extension to use?.js are faster but if you are updating from anolder version of compwebchess use .php */
$TEAM_LIMIT = "5"; /* how many player in one team? *//* Tournament Section*/
$t_banned_users = array(3 ); // array(1,2,3,4); Banned user Ids -> Can't create or join a tournament
$t_min_rating = array(1150,1200,1250,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500); /* Minimum experiecne selection*/
$t_max_rating = array(1200,2500,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000); /* Minimum experiecne selection */
$t_admin_only = true; // if true, only admins can create big tournaments
//$kommentatoren = array(5,15); // UserID who is allowed to write comments
//$kommentierte_spiele = array(3394); // gameID ot that game which shouldn't have any further comments
$min_kommentare = 5; // min. comments a game need to display it at mainmenu.php
$anz_spiele = 10; // max. displayed commented games at mainmenu.php
$ag_leiter = array(7); // these is the array for that users which can create more than one group
$CFG_JPGRAPH_DIR = "./jpgraph"; /* Path where JPgraph is installed */
$CFG_GRAPH_LINE_COLOR = "blue"; /* Rating Graph */
$CFG_GRAPH_FILL_COLOR = "red";
/* % Victories Graph */
$CFG_GRAPH_LINE2_COLOR = "black"; /* Victories Graph */
$CFG_GRAPH_FILL2_COLOR = "#60A0F0";
$CFG_GRAPH_SHOW = "rating"; /* Values = rating | pv */
$CFG_GRAPH_SHOW2 = "pv"; /* Values = rating | pv */
$CFG_GRAPH_LIMIT = 10;/* Show graphic from these number of past games. Less number means faster graphics */
?>