{% else-1 %}
(18 авг 2015, 19:22) (0/0) [0]
$nik = gradient('.$rres[nick].','00FF00', '00CC00'); но не работает,может из-за сборки дцмс 6.6.4?
Добавлено 18.08.15 в 19:23:40:
<?php
function gradient($text, $hexfrom, $hexto){
$text = iconv('utf-8','windows-1251',$text);
$colorsteps = strlen($text);
$fromrgb['r'] = hexdec(substr($hexfrom, 0, 2));
$fromrgb['g'] = hexdec(substr($hexfrom, 2, 2));
$fromrgb['b'] = hexdec(substr($hexfrom, 4, 2));
$torgb['r'] = hexdec(substr($hexto, 0, 2));
$torgb['g'] = hexdec(substr($hexto, 2, 2));
$torgb['b'] = hexdec(substr($hexto, 4, 2));
$steprgb['r'] = ($fromrgb['r'] - $torgb['r']) / ($colorsteps - 1);
$steprgb['g'] = ($fromrgb['g'] - $torgb['g']) / ($colorsteps - 1);
$steprgb['b'] = ($fromrgb['b'] - $torgb['b']) / ($colorsteps - 1);
for($i = 0; $i <= $colorsteps; $i++){
$rgb['r'] = floor($fromrgb['r'] - ($steprgb['r'] * $i));
$rgb['g'] = floor($fromrgb['g'] - ($steprgb['g'] * $i));
$rgb['b'] = floor($fromrgb['b'] - ($steprgb['b'] * $i));
$hexrgb['r'] = sprintf('%02x', ($rgb['r']));
$hexrgb['g'] = sprintf('%02x', ($rgb['g']));
$hexrgb['b'] = sprintf('%02x', ($rgb['b']));
$color = implode(null, $hexrgb);
$return .= '<font color="'.$color.'">'.$text[$i].'</font>';
}
return iconv('windows-1251','utf-8',$return);
}
?>
(18 авг 2015, 19:05) (0/0) [0]
PaRtiZzaN, да не картинку)
Тут идет градиент ника,тоесть переход цвета в другой цвет.
(18 авг 2015, 18:55) (0/0) [0]
function ansc($id) {
global $mysql;
$ansc=$mysql->super_query("SELECT * FROM `tanks` WHERE `id` = '".$id."'"*;
$rres=$mysql->super_query("SELECT * FROM `user` WHERE `id` = '".$ansc['id']."'"*;

$mcu_ansc = $mysql->super_query("SELECT * FROM `collective_user` WHERE `id_user` = '".$rres['id']."'"*;
$mc_ansc = $mysql->super_query("SELECT * FROM `collective` WHERE `id` = '".$mcu_ansc['id_collective']."'"*;
echo'<a href="/id'.$ansc['id'].'">';
if($ansc['status']==1){echo'<font color="blue">'.$rres['nick'].'.MD</font> '.online($rres['id']).'';}
Вопрос,как в этот код возможно градиент впихнуть?
Помогите кто знает решение...
  • 1 из 1