Вы можете видеть на первом изображении у меня есть подстраница, где местоположение к CSS неверно, потому что путь к CSS выглядит следующим образом:
http://localhost/tibiaservers_11.10.19/dbko-inferno.pl-ots/css_bootstrap/bootstrap.css
это должно быть как показано ниже
http://localhost/tibiaservers_11.10.19/css_bootstrap/bootstrap.css
это ссылки на подстраницы, которые выглядят как name-ots
<td class="mobile_hide_180"><a class="hrefo " href="'.$web_link.strtolower($Row['ip']).'-ots/"> '.$Row['name'].'</a><span style="display:none;"><a class="IDhrefo hidden" href="'.$Row['id'].'"></a></span></td>
https://imgur.com/ABSmgna
https://imgur.com/hwgH6Am
и это код всего файла ots.php
Какбороться с этой проблемой? Все остальные подстраницы загружают CSS с правильным путем.
<?php
if(isset($_GET['postlang'])){
include('../mysql_config.php');
include('../config.php');
include('../includes/functions.php');
include('view_quick_buttons.php');
include('view_comments.php');
$lang = addslashes ( $_GET['postlang'] );
if ( is_file ( '../lang/' .$lang. '.php' ) )
{
include '../lang/'.$lang.'.php';
$_SESSION['lang']=$lang;
}else{
include '../lang/'.$default_lang.'.php';
$_SESSION['lang']=$default_lang;
}
}
$class['fav']="";
if(isset($_GET['ip'])){
$ZapytanieID = $mysqli -> query ( 'SELECT * FROM `list_ots` WHERE `ip` = "' .$_GET['ip']. '"' );
$Row = $ZapytanieID->fetch_assoc();
//echo $rowZ['id'];
$IP = $Row['ip'];
$ID = $Row['id'];
}
if(isset($_GET['id'])){
$SearchQuery = $mysqli -> query ( 'SELECT * FROM `list_ots` WHERE `id` = "' .$_GET['id']. '"' );
$Row = $SearchQuery -> fetch_assoc();
$ID = $Row['id'];
$IP = $Row['ip'];
}
if ( $SearchQuery -> num_rows == 1)
{
if(!isset($_GET['postlang'])){
include('pages/view_quick_buttons.php');
include('pages/view_comments.php');
}
$vote_good = $mysqli -> query ( 'SELECT count(*) FROM `list_votes` WHERE `server`="'.$IP.'" AND `vote`="1"')->fetch_assoc();
$vote_bad = $mysqli -> query ( 'SELECT count(*) FROM `list_votes` WHERE `server`="'.$IP.'" AND `vote`="2"')->fetch_assoc();
/*$check_ban=$mysqli->query('SELECT count(*) FROM `list_bans` where `server`="'.$rowZ['id'].'"')->fetch_assoc();
if($check_ban['count(*)']!=0){
header("Location: $web_link");
exit;
}*/
if ( $Row['status'] == 1)
{
$ColorStatus = 'dark_green';
$Status = 'Online';
$PlayersCount = $Row['players']. ' (' .$Row['rec']. ') / ' .$Row['maxplayers'];
}else{
$ColorStatus = 'red';
$Status = 'Offline';
$PlayersCount = '0 (' .$Row['rec']. ') / ' .$Row['maxplayers'];
}
$desc=str_replace("\n","</br>",$Row['desc']);
if($Row['client']==-1){
$Row['client']=$_LANG['server_info']['na'];
}
$uptime_temp=explode('.',number_format($Row['uptimepc'],2));
$uptime=$uptime_temp[0];
if($uptime_temp[1]!="00") $uptime.='.'.$uptime_temp[1];
echo '
<div class="status-widgets">
<div class="row-fluid w940">
<div class="well-header">
<h5>'.$Row['name'].'</h5>
</div>
<div id="otswholeborder">
<div class="row-fluid w940">
<div class="span6">
<div class="widget borderots clearfix">
<div class="details">
<div class="number">
<p>'.$Row['ip'].'</p>
</div>
<div class="description">
IP
</div>
</div>
</div>
</div>
<div class="span6">
<div class="widget borderots clearfix">
<div class="details">
<div class="number">
'.$Row['port'].'
</div>
<div class="description">
PORT
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid w940">
<div class="span6">
<div class="widget borderots clearfix">
<div class="details">
<div class="number">
'.$PlayersCount.'
</div>
<div class="description">
'.$_LANG['server_info']['players'].'
</div>
</div>
</div>
</div>
<div class="span6">
<div class="widget borderots clearfix">
<div class="details">
<div class="number">
'.$uptime.' %
</div>
<div class="description">
'.$_LANG['server_info']['uptime'].'
</div>
</div>
</div>
</div>
<div class="row-fluid w940">
<div class="span6">
<div class="widget borderots clearfix"">
<div class="details">
<div class="number">
<span class="description>"Status</span> '.$Status.'
</div>
<div class="description">
Status
</div>
</div>
</div>
</div>
<div class="span6">
<div class="widget borderots clearfix"">
<div class="details">
<div class="number">
'.$Row['client'].'
</div>
<div class="description">
'.$_LANG['server_info']['client'].'
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid w940">
<div class="quick-actions">
<ul>
';
if(is_logged()){
echo'
<li><a class="'.$class['vote_good'].'" rel="tooltip" data-placement="bottom" title="'.$_LANG['server_view']['good'].'" href="?page=ots&ip='.$Row['ip'].'&action=vote_good"><i class="fa fa-thumbs-up"></i></a></li>
<li><a class="'.$class['vote_bad'].'" rel="tooltip" data-placement="bottom" title="'.$_LANG['server_view']['bad'].'" href="?page=ots&ip='.$Row['ip'].'&action=vote_bad"><i class="fa fa-thumbs-down"></i></a></li>
<li><a class="'.$class['fav'].'" rel="tooltip" data-placement="bottom" title="'.$_LANG['server_view']['fav'].'" href="?page=ots&ip='.$Row['ip'].'&id='.$Row['id'].'&action=fav"><i class="icon-heart"></i></a></li>';
}else{
echo'
<li><a rel="tooltip" data-placement="bottom" title="'.$_LANG['account']['for_users'].'" href="#"><i class="icon-plus"></i></a></li>
<li><a rel="tooltip" data-placement="bottom" title="'.$_LANG['account']['for_users'].'" href="#"><i class="icon-minus"></i></a></li>
<li><a rel="tooltip" data-placement="bottom" title="'.$_LANG['account']['for_users'].'" href="#"><i class="icon-heart"></i></a></li>
';
}
echo'
<li><a class="btn like" style="margin-left: 30px;"> '.$vote_good['count(*)'].'</a></li>
<li><a class="btn unlike">'.$vote_bad['count(*)'].'</a></li>
</ul>
</div>
</div>
</div>
<div class="row-fluid w940">
<div class="well">
<div class="well-content no_padding">
<div class="navbar-inner">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_desc" data-toggle="tab">'.$_LANG['server_view']['desc'].'</a></li>
<li><a onclick="load_motd('.$Row['id'].')" href="#tab_motd" data-toggle="tab">MOTD</a></li>';
if( $add_image_enable==1){
echo '<li><a onclick="load_map('.$Row['id'].')" href="#tab_map" data-toggle="tab">'.$_LANG['server_view']['map'].'</a></li>';
}
echo '<li><a onclick="load_more_info('.$Row['id'].', \''.$_SESSION['lang'].'\')" href="#tab_info" data-toggle="tab">'.$_LANG['server_view']['info'].'</a></li>';
if( $comments_enable==1 and $Row['comments']==1){
echo '<li><a onclick="load_comments('.$Row['id'].')" href="#tab_comments" data-toggle="tab">'.$_LANG['server_view']['comments'].'</a></li>';
}
echo '</ul>
</div>
<div class="tab-content">
<div class="tab-pane active" id="tab_desc">
<p>'.$desc.'</p>
</div>
<div class="tab-pane" id="tab_motd">
<div id="motd">
<img src="img/preloader.gif">
</div>
</div>';
if( $add_image_enable==1){
echo '<div class="tab-pane no_padding" id="tab_map">
<div id="map">
<img src="img/preloader.gif">
</div>
</div>';
}
echo '<div class="tab-pane no_padding" id="tab_info">
<div id="more_info">
<img src="img/preloader.gif">
</div>
</div>';
if( $comments_enable==1 and $Row['comments']==1){
echo '<div class="tab-pane no_padding" id="tab_comments">
<div class="well-content no_padding">
<div id="comments">
<img src="img/preloader.gif">
</div>
<div class="type_message">';
if(is_logged()){
echo '<form method="POST" action="?page=ots&ip='.$IP.'">
<input maxlength="200" type="text" class="span12" name="message" placeholder="'.$_LANG['server_view']['type_here'].'">
<button type="submit" name="submit" class="btn input_button blue"><i class="fa fa-commenting-o"></i></button>
</form>';
}else{
echo '<input maxlength="200" type="text" class="span12" id="message" name="message" placeholder="'.$_LANG['server_view']['type_here'].'">
<button rel="tooltip" title="'.$_LANG['account']['for_users'].'" type="submit" class="btn input_button blue"><i class="fa fa-commenting-o"></i></button>';
}
echo '</div>
</div>
</div>';
}
echo '</div>
</div>
</div>
</div>';
//}else{
// header("Location: $web_link");
// exit;
}
?>
<script src="js/jquery-1.9.1.min.js"></script>