Добро пожаловать, Гость!
:: + Добавить ссылку через биллинг
:: + Добавить ссылку анонимно
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
❤️МИР, ЯРКИХ ЗНАКОМСТВ И ОБЩЕНИЯ!❤️
Цвет шапки - Страница 1
PHP/MySQL | Цвет шапки
Ciller :
Всем Привет,КАк зделать что бы шапка меняла цвет как и панель скрин 1!
Код Шапки
<?
$set['web'] = false;
//header("Content-type: application/vnd.wap.xhtml+xml");
//header("Content-type: application/xhtml+xml");
header("Content-type: text/html");
echo '<?xml version="1.0" encoding="utf-8"?>
';
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title>
<?=$set['title']?>
</title>
<link rel="shortcut icon" href="/style/themes/
<?=$set['set_them']?>
/favicon.ico" />
<link rel="stylesheet" href="/style/themes/
<?=$set['set_them']?>
/style.css" type="text/css" />
<?
// Левое меню
if (isset($user))
{
?>
<!--[if lt IE 9]>
<sсript src="http://html5shim.googlecode.com/svn/trunk/html5.js"></sсript>
<![endif]-->
<link rel="stylesheet" href="/style/themes/
<?=$set['set_them']?>
/style_css3.css" type="text/css" />
<sсript src="http://code.jquery.com/jquery-1.9.1.js"></sсript>
<sсript>
var Sidebar = {
toggle: function(event)
{
if (document.getElementById("eventCount").value == '1')
{
// Открываем
$('.bar_menu').css({'text-align':'left'});
$('.bar_razdel').css({'height':'auto', 'padding':'4px'});
$('.bar_link').css({'display':'inline-block'});
$('.left_side_bar').css({'width' : '200px'});
$('#eventOpen').css({'width' : '200px'});
document.getElementById("eventCount").value = 2;
}
else
{
// Закрываем
$('.bar_menu').css({'text-align':'center'});
$('.bar_razdel').css({'height':'10px', 'padding':'0px'});
$('.bar_link').css({'display':'none'});
$('.left_side_bar').css({'width' : '60px'});
$('#eventOpen').css({'width' : '60px'});
document.getElementById("eventCount").value = 1;
}
}
}
</sсript>
<?
}
?>
</head>
<body>
<div class="body">
<?
if (isset($_SESSION['message']))
{
echo '<div class="msg">' . $_SESSION['message'] . '</div>';
$_SESSION['message'] = NULL;
}
?>
<div id="logo" class="logo"><img src="/style/themes/
<?=$set['set_them']?>
/logo.png" alt="DS" /></div>
<?
// Левое меню
if (isset($user))
{
?>
<table cellpadding="0" cellspacing="0">
<tr>
<td class="left_side_bar" id="left_side_bar">
<div id="eventOpen" onclick="Sidebar.toggle(event);"><input id="eventCount" value="1" style="display: none"></div>
<div id="logo_bar" class="auts">
<a href="/index.php">
<img src="/style/themes/
<?=$set['set_them']?>
/side_bar/ds.png" alt="DS" />
<span class="bar_link"><img src="/style/themes/
<?=$set['set_them']?>
/side_bar/social.png" alt="SOCIAL" /></span>
</a>
</div>
<a href="/id
<?=$user['id']?>
">
<div class="bar_menu">
<?=user::avatar($user['id'], 1)?>
<span class="bar_link">
<?=user::nick($user['id'], 0)?>
</div>
</a>
<?
// Основные разделы сайта
require_once H. 'style/themes/' . $set['set_them'] . '/menu.php';
?>
</td>
<td class="content" id="site_content">
<?
}
код панельки
<?
function title(){
global $user,$set;
$test=array
(
array('d67c7c','8e5252','ce8686','a36161'),
array('d69a7c','8e6652','ce9e86','a37761'),
array('d6b87c','8e7a52','ceb686','a38d61'),
array('d6d67c','8e8e52','cece86','a3a361'),
array('b8d67c','7a8e52','b6ce86','8da361'),
array('9ad67c','668e52','9ece86','77a361'),
array('7cd67c','528e52','86ce86','61a361'),
array('7cd69a','528e66','86ce9e','61a377'),
array('7cd6b8','528e7a','86ceb6','61a38d'),
array('7cd6d6','528e8e','86cece','61a3a3'),
array('7cb8d6','527a8e','86b6ce','618da3'),
array('7c9ad6','52668e','869ece','6177a3'),
array('7c7cd6','52528e','8686ce','6161a3'),
array('9a7cd6','66528e','9e86ce','7761a3'),
array('b87cd6','7a528e','b686ce','8d61a3'),
array('d67cd6','8e528e','ce86ce','a361a3'),
array('d67cb8','8e527a','ce86b6','a3618d'),
array('d67c9a','8e5266','ce869e','a36177'),
array('b2b2b2','4c4c4c','afafaf','939393'),
array('cccccc','666666','c9c9c9','adadad'),
array('e5e5e5','7f7f7f','e2e2e2','c6c6c6'),
array('995858','512f2f','825454','5b3737'),
array('996e58','513a2f','826354','5b4337'),
array('998358','51462f','827254','5b4f37'),
array('999958','51512f','828254','5b5b37'),
array('839958','46512f','728254','4f5b37'),
array('6e9958','3a512f','638254','435b37'),
array('589958','2f512f','548254','375b37'),
array('58996e','2f513a','548263','375b43'),
array('589983','2f5146','548272','375b4f'),
array('589999','2f5151','548282','375b5b'),
array('588399','2f4651','547282','374f5b'),
array('586e99','2f3a51','546382','37435b'),
array('585899','2f2f51','545482','37375b'),
array('635482','43375b','6e5899','3a2f51'),
array('835899','462f51','725482','4f375b'),
array('995899','512f51','825482','5b375b'),
array('995883','512f46','825472','5b374f'),
array('99586e','512f3a','825463','5b3743'),
array('666666','000000','636363','474747'),
array('7f7f7f','191919','7c7c7c','606060'),
array('999999','333333','969696','7a7a7a')
);
if (!isset($user))
{
$test[$user['panel']][0]='7c9ad6';
$test[$user['panel']][1]='52668e';
$test[$user['panel']][2]='869ece';
$test[$user['panel']][3]='6177a3';
$per='6780b2';
}
else $per=$user['panel_style'];
?>
<style>
.panelD {
position: relative;
background: #
<?echo $per;?>
;
background: -webkit-gradient(linear,left top,left bottom,from(#
<?echo $test[$user['panel']][0].'),to(#'.$test[$user['panel']][1];?>
));
background: -moz-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
background: -o-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
background: -ms-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
filter: progidXImageTransform.Microsoft.gradient(startColorstr='#
<?echo $test[$user['panel']][0]." ',endColorstr='# ".$test[$user['panel']][1];?>
');
zoom: 1;}
a.panel_link {
display: block;
text-align: center;
padding: 3px;}
a.panel_link:hover {background: #
<?echo $per;?>
;}
.text {
color: #ffffff;
text-decoration: none;
font-size: medium;
}
#panel_n table a{
border-left: 1px solid #
<?echo $test[$user['panel']][2];?>
;
border-right: 1px solid #
<?echo $test[$user['panel']][3];?>
;
border-bottom: 1px solid #
<?echo $test[$user['panel']][3];?>
;
border-top: 1px solid #
<?echo $test[$user['panel']][3];?>
;}
.ncount {
color: #ffff00;
font-size: medium;
vertical-align: bottom;}
.time {
padding: 3px;
background: #d0d2d6;
border-left: 1px solid #cccaca;
border-right: 1px solid #cccaca;
border-bottom: 1px solid #b3b3b3;
font-size: small;
text-align: right;
color: #000000;
}
</style>
<?
if ($set['web']==false){
if (isset($user)){
$k_new=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail` LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]' WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_new_fav=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail` LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]' WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$jn = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$ln = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0); // Лента
$dn = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0);
$zn = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
if ($ln > 0)$j2 = 'tape';
elseif ($jn > 0)$j2 = 'discussions';
elseif ($zn > 0)$j2 = 'notification';
else $j2 = 'tape';
$k_l = $ln+$jn+$zn;
echo '<div id="panel_n" class=" "><div class="panelD"><table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a style="border-left:none !important;" class="panel_link user_color_link" href="/info.php?id='.$user['id'].'" title="Анкета">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/1.png" alt="Анкета"/>':'<span class="text">Анк</span>').'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/'.($k_new==0 && $k_new_fav==0?'konts':'new_mess').'.php" title="Почта">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/2'.($k_new_fav!=0?'_2':null).'.png" alt="Почта"/>':'<span class="text">Поч</span>').' '.($k_new!=0?'<span class="ncount">'.($k_new).'</span>':null).'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/user/'.$j2.'/index.php" title="Уведомления">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/3.png" alt="Уведомления"/>':'<span class="text">Увед</span>').' '.($k_l!=0?'<sp
Цвет шапки
21 Фев 2014Всем Привет,КАк зделать что бы шапка меняла цвет как и панель скрин 1!
Код Шапки
<?
$set['web'] = false;
//header("Content-type: application/vnd.wap.xhtml+xml");
//header("Content-type: application/xhtml+xml");
header("Content-type: text/html");
echo '<?xml version="1.0" encoding="utf-8"?>
';
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<title>
<?=$set['title']?>
</title>
<link rel="shortcut icon" href="/style/themes/
<?=$set['set_them']?>
/favicon.ico" />
<link rel="stylesheet" href="/style/themes/
<?=$set['set_them']?>
/style.css" type="text/css" />
<?
// Левое меню
if (isset($user))
{
?>
<!--[if lt IE 9]>
<sсript src="http://html5shim.googlecode.com/svn/trunk/html5.js"></sсript>
<![endif]-->
<link rel="stylesheet" href="/style/themes/
<?=$set['set_them']?>
/style_css3.css" type="text/css" />
<sсript src="http://code.jquery.com/jquery-1.9.1.js"></sсript>
<sсript>
var Sidebar = {
toggle: function(event)
{
if (document.getElementById("eventCount").value == '1')
{
// Открываем
$('.bar_menu').css({'text-align':'left'});
$('.bar_razdel').css({'height':'auto', 'padding':'4px'});
$('.bar_link').css({'display':'inline-block'});
$('.left_side_bar').css({'width' : '200px'});
$('#eventOpen').css({'width' : '200px'});
document.getElementById("eventCount").value = 2;
}
else
{
// Закрываем
$('.bar_menu').css({'text-align':'center'});
$('.bar_razdel').css({'height':'10px', 'padding':'0px'});
$('.bar_link').css({'display':'none'});
$('.left_side_bar').css({'width' : '60px'});
$('#eventOpen').css({'width' : '60px'});
document.getElementById("eventCount").value = 1;
}
}
}
</sсript>
<?
}
?>
</head>
<body>
<div class="body">
<?
if (isset($_SESSION['message']))
{
echo '<div class="msg">' . $_SESSION['message'] . '</div>';
$_SESSION['message'] = NULL;
}
?>
<div id="logo" class="logo"><img src="/style/themes/
<?=$set['set_them']?>
/logo.png" alt="DS" /></div>
<?
// Левое меню
if (isset($user))
{
?>
<table cellpadding="0" cellspacing="0">
<tr>
<td class="left_side_bar" id="left_side_bar">
<div id="eventOpen" onclick="Sidebar.toggle(event);"><input id="eventCount" value="1" style="display: none"></div>
<div id="logo_bar" class="auts">
<a href="/index.php">
<img src="/style/themes/
<?=$set['set_them']?>
/side_bar/ds.png" alt="DS" />
<span class="bar_link"><img src="/style/themes/
<?=$set['set_them']?>
/side_bar/social.png" alt="SOCIAL" /></span>
</a>
</div>
<a href="/id
<?=$user['id']?>
">
<div class="bar_menu">
<?=user::avatar($user['id'], 1)?>
<span class="bar_link">
<?=user::nick($user['id'], 0)?>
</div>
</a>
<?
// Основные разделы сайта
require_once H. 'style/themes/' . $set['set_them'] . '/menu.php';
?>
</td>
<td class="content" id="site_content">
<?
}
код панельки
<?
function title(){
global $user,$set;
$test=array
(
array('d67c7c','8e5252','ce8686','a36161'),
array('d69a7c','8e6652','ce9e86','a37761'),
array('d6b87c','8e7a52','ceb686','a38d61'),
array('d6d67c','8e8e52','cece86','a3a361'),
array('b8d67c','7a8e52','b6ce86','8da361'),
array('9ad67c','668e52','9ece86','77a361'),
array('7cd67c','528e52','86ce86','61a361'),
array('7cd69a','528e66','86ce9e','61a377'),
array('7cd6b8','528e7a','86ceb6','61a38d'),
array('7cd6d6','528e8e','86cece','61a3a3'),
array('7cb8d6','527a8e','86b6ce','618da3'),
array('7c9ad6','52668e','869ece','6177a3'),
array('7c7cd6','52528e','8686ce','6161a3'),
array('9a7cd6','66528e','9e86ce','7761a3'),
array('b87cd6','7a528e','b686ce','8d61a3'),
array('d67cd6','8e528e','ce86ce','a361a3'),
array('d67cb8','8e527a','ce86b6','a3618d'),
array('d67c9a','8e5266','ce869e','a36177'),
array('b2b2b2','4c4c4c','afafaf','939393'),
array('cccccc','666666','c9c9c9','adadad'),
array('e5e5e5','7f7f7f','e2e2e2','c6c6c6'),
array('995858','512f2f','825454','5b3737'),
array('996e58','513a2f','826354','5b4337'),
array('998358','51462f','827254','5b4f37'),
array('999958','51512f','828254','5b5b37'),
array('839958','46512f','728254','4f5b37'),
array('6e9958','3a512f','638254','435b37'),
array('589958','2f512f','548254','375b37'),
array('58996e','2f513a','548263','375b43'),
array('589983','2f5146','548272','375b4f'),
array('589999','2f5151','548282','375b5b'),
array('588399','2f4651','547282','374f5b'),
array('586e99','2f3a51','546382','37435b'),
array('585899','2f2f51','545482','37375b'),
array('635482','43375b','6e5899','3a2f51'),
array('835899','462f51','725482','4f375b'),
array('995899','512f51','825482','5b375b'),
array('995883','512f46','825472','5b374f'),
array('99586e','512f3a','825463','5b3743'),
array('666666','000000','636363','474747'),
array('7f7f7f','191919','7c7c7c','606060'),
array('999999','333333','969696','7a7a7a')
);
if (!isset($user))
{
$test[$user['panel']][0]='7c9ad6';
$test[$user['panel']][1]='52668e';
$test[$user['panel']][2]='869ece';
$test[$user['panel']][3]='6177a3';
$per='6780b2';
}
else $per=$user['panel_style'];
?>
<style>
.panelD {
position: relative;
background: #
<?echo $per;?>
;
background: -webkit-gradient(linear,left top,left bottom,from(#
<?echo $test[$user['panel']][0].'),to(#'.$test[$user['panel']][1];?>
));
background: -moz-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
background: -o-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
background: -ms-linear-gradient(top,#
<?echo $test[$user['panel']][0].',#'.$test[$user['panel']][1];?>
);
filter: progidXImageTransform.Microsoft.gradient(startColorstr='#
<?echo $test[$user['panel']][0]." ',endColorstr='# ".$test[$user['panel']][1];?>
');
zoom: 1;}
a.panel_link {
display: block;
text-align: center;
padding: 3px;}
a.panel_link:hover {background: #
<?echo $per;?>
;}
.text {
color: #ffffff;
text-decoration: none;
font-size: medium;
}
#panel_n table a{
border-left: 1px solid #
<?echo $test[$user['panel']][2];?>
;
border-right: 1px solid #
<?echo $test[$user['panel']][3];?>
;
border-bottom: 1px solid #
<?echo $test[$user['panel']][3];?>
;
border-top: 1px solid #
<?echo $test[$user['panel']][3];?>
;}
.ncount {
color: #ffff00;
font-size: medium;
vertical-align: bottom;}
.time {
padding: 3px;
background: #d0d2d6;
border-left: 1px solid #cccaca;
border-right: 1px solid #cccaca;
border-bottom: 1px solid #b3b3b3;
font-size: small;
text-align: right;
color: #000000;
}
</style>
<?
if ($set['web']==false){
if (isset($user)){
$k_new=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail` LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]' WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_new_fav=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail` LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]' WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$jn = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$ln = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0); // Лента
$dn = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]'"), 0);
$zn = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
if ($ln > 0)$j2 = 'tape';
elseif ($jn > 0)$j2 = 'discussions';
elseif ($zn > 0)$j2 = 'notification';
else $j2 = 'tape';
$k_l = $ln+$jn+$zn;
echo '<div id="panel_n" class=" "><div class="panelD"><table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a style="border-left:none !important;" class="panel_link user_color_link" href="/info.php?id='.$user['id'].'" title="Анкета">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/1.png" alt="Анкета"/>':'<span class="text">Анк</span>').'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/'.($k_new==0 && $k_new_fav==0?'konts':'new_mess').'.php" title="Почта">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/2'.($k_new_fav!=0?'_2':null).'.png" alt="Почта"/>':'<span class="text">Поч</span>').' '.($k_new!=0?'<span class="ncount">'.($k_new).'</span>':null).'</a></td>
<td style="vertical-align:top;width:'.($dn==0?'25':'20').'% ;"><a class="panel_link user_color_link" href="/user/'.$j2.'/index.php" title="Уведомления">'.($user['panel_vid']==0?'<img class="icon" src="/style/panel/3.png" alt="Уведомления"/>':'<span class="text">Увед</span>').' '.($k_l!=0?'<sp
Комментарии: