Trả lời: Xtremedia 1.2 Full (Cài đặt bằng File Install) Giúp Em với Anh ! Bản này của anh lỗi login hay sao ấy !
tình hình là bản này bị lỗi login ! em tìm rồi sửa file config.php tìm
$refreshType = 1;
$setCookieType =
2;
sửa lại thành
$refreshType = 1;
$setCookieType =
2
kể cả em thay 1 bằng 2 hay 2 bằng 1 ở $setCookieType =
2 cũng ko xong

(
nhưng sao vẫn ko đc
login vào nó báo đã đăng nhập nhưng vẫn hiện lên
Username
Mật khẩu
phải bấm F5 mới đc !
Anh xem giùm em đi ! bản này của anh cũng đc nhưng cái thay skin còn nhìu cái nản quá !

a xem giúp em cái login đi
Toàn Bộ Code ở dưới đây
--------------------------------------------
<?php
$db_host = 'xxxxxxx';
$db_name = 'xxxxxxxxxxxxx';
$db_user = 'xxxxxxx';
$db_pass = 'xxxxxx';
$tb_prefix = 'media_';
$refreshType = 1;
$setCookieType = 2;
$use_default_tpl = 1; // Chi su dung Templates Default, vo hieu hoa cac templates do Users chon
if (!defined('IN_MEDIA')) die("Hacking attempt");
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start('ob_gzhandler');
else ob_start();
header("Content-Type: text/html; charset=UTF-8");
if (!session_id()) session_start();
if (!ini_get('register_globals')) {
@$_GET = $HTTP_GET_VARS;
@$_POST = $HTTP_POST_VARS;
@$_COOKIE = $HTTP_COOKIE_VARS;
extract($_GET);
extract($_POST);
}
if ($_GET['refresh']) {
m_refresh();
}
define('NOW',time());
define('IP',$_SERVER['REMOTE_ADDR']);
define('USER_AGENT',$_SERVER['HTTP_USER_AGENT']);
define('CURRENT_LINK',$_SERVER["REQUEST_URI"]);
if (!USER_AGENT || !IP) exit();
function m_refresh() {
global $refreshType;
if ($refreshType == 1) {
if (!$_SESSION['current_page']) $_SESSION['current_page'] = 'Home';
$_SESSION['is_refresh'] = 1;
header("Location: ./#".$_SESSION['current_page']);
}
else header("Location: ./");
exit();
}
function m_setcookie($name, $value = '', $permanent = true) {
global $mainURL, $setCookieType;
$expire = ($permanent)?(time() + 60 * 60 * 24 * 365):0;
if ($setCookieType == 1) {
$url = $mainURL;
if ($url[strlen($url)-1] != '/') $url .= '/';
$secure = (($_SERVER['HTTPS'] == 'on' OR $_SERVER['HTTPS'] == '1') ? true : false);
$p = parse_url($url);
$path = !empty($p['path']) ? $p['path'] : '/';
$domain = $p['host'];
if (substr_count($domain, '.') > 1) {
while (substr_count($domain, '.') > 1)
{
$pos = strpos($domain, '.');
$domain = substr($domain, $pos + 1);
}
}
else $domain = '';
@setcookie($name, $value, $expire, $path, $domain, $secure);
}
else @setcookie($name,$value,$expire);
}
function m_get_config($name) {
global $mysql,$tb_prefix,$cached;
if (!$cached['config'][$name]) {
$r = $mysql->fetch_array($mysql->query("SELECT config_value FROM ".$tb_prefix."config WHERE config_name = '".$name."'"));
$cached['config'][$name] = stripslashes($r['config_value']);
}
return $cached['config'][$name];
}
include('dbconnect.php');
$mainURL = m_get_config('web_url');
if ($mainURL[strlen($mainURL)-1] == '/') $mainURL = substr($mainURL,0,-1);
$webTitle = m_get_config('web_title');
$cached = array();
$q = '';
$mediaFolder = m_get_config('server_url').'/'.m_get_config('server_folder');
if (!$_COOKIE['SID']) {
$sid = md5(session_id());
m_setcookie('SID',$sid);
define('SID',$sid);
unset($sid);
}
else define('SID',$_COOKIE['SID']);
?>