Reformulacio de l'index de tabs
This commit is contained in:
pare
5bd6dd3af7
commit
ff0de35688
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Xenoteca Digital",
|
||||
"host": "xenoteca.digital",
|
||||
"host": "https://xenoteca.digital",
|
||||
"protocol": "ftp",
|
||||
"port": 21,
|
||||
"username": "hermesblack",
|
||||
|
|
|
@ -15,14 +15,13 @@ $fn - jpg image onto which hands are to be added
|
|||
|
||||
$l - length in pixels of minute hand (hour hand is shorter)
|
||||
|
||||
$x and $y - centre of clock */
|
||||
$x and $y - centre of clock *
|
||||
function hands($image, $l = 170, $x = 300, $y = 300) {
|
||||
$h = date("G",time());
|
||||
$m = date("i",time());
|
||||
|
||||
$angle_min = 90.0 - $m * 6.0; # minute to degrees
|
||||
$angle_hour = 270.0 - ($h + $m / 60.0) * 15; /*TODO: Comprovar que aixó funciona */
|
||||
|
||||
$angle_hour = 270.0 - ($h + $m / 60.0) * 15;
|
||||
$minx = $l * cos($angle_min / 57.295779);
|
||||
$miny = $l * sin($angle_min / 57.295779);
|
||||
$hourx = 0.65 * $l * cos($angle_hour / 57.295779);
|
||||
|
@ -66,12 +65,12 @@ function hands($image, $l = 170, $x = 300, $y = 300) {
|
|||
# Un minut es 0.25º
|
||||
# Una hora son 15º
|
||||
# Coordinades de GIRONA: 41.98, 2.81
|
||||
|
||||
date_default_timezone_set('Europe/Madrid');
|
||||
|
||||
list($dia,$mes,$any) = explode(":",date("d:m:Y",time()));
|
||||
include("moonClass.php");
|
||||
include("./moonClass.php");
|
||||
$lluna = Moon::calculateMoonTimes($mes, $dia, $any, 41.98, 2.81);
|
||||
$fase = Moon::phase('Europe/Madrid');
|
||||
$lluna = json_decode(json_encode($lluna), true);
|
||||
|
||||
$sol = date_sun_info(time(),41.98,2.81);
|
||||
|
@ -97,29 +96,33 @@ $gris = imagecolorallocate($imagen,100,100,100);
|
|||
$blau = imagecolorallocate($imagen,00,255,255);
|
||||
$plata = imagecolorallocate($imagen,192,192,192);
|
||||
|
||||
/*Primer pintem un fons*/
|
||||
// Primer pintem un fons
|
||||
imagefilledrectangle($imagen,0,0,600,600,$blanc);
|
||||
|
||||
/* I el fons del dia */
|
||||
// I el fons del dia
|
||||
imagefilledarc($imagen, 300, 300, 450, 450,360, 0, $negre, IMG_ARC_PIE);
|
||||
imagefilledarc($imagen, 300, 300, 450, 450, $sortidaGraus, $postaGraus, $blau, IMG_ARC_PIE);
|
||||
|
||||
/*sobre el fons pintem una lluna*/
|
||||
// sobre el fons pintem una lluna
|
||||
imagefilledarc($imagen, 300, 300, 450, 450, $sortidaLGraus, $postaLGraus,$plata, IMG_ARC_PIE);
|
||||
|
||||
/*Sobre la lluna tornem a pintar el dia, més petitonet.'*/
|
||||
// Sobre la lluna tornem a pintar el dia, més petitonet.
|
||||
imagefilledarc($imagen, 300, 300, 430, 430,360, 0, $negre, IMG_ARC_PIE);
|
||||
imagefilledarc($imagen, 300, 300, 430, 430, $sortidaGraus, $postaGraus, $blau, IMG_ARC_PIE);/**/
|
||||
imagefilledarc($imagen, 300, 300, 430, 430, $sortidaGraus, $postaGraus, $blau, IMG_ARC_PIE);
|
||||
|
||||
/** Pintem les mans */
|
||||
// Pintem les mans
|
||||
hands($imagen);
|
||||
|
||||
/** Pintem els números */
|
||||
imagettftext($imagen, 20, 0, 250,20,$negre,'./FairfaxHaxHD.ttf','12'); # TODO: Centrar l'hora.
|
||||
imagearc($imagen, 300, 300, 450, 450,360, 0, $negre);
|
||||
|
||||
|
||||
header('Content-type: image/png');
|
||||
header('Content-Type: image/png');
|
||||
imagepng($imagen);
|
||||
imagedestroy($imagen);
|
||||
imagedestroy($imagen);/**/
|
||||
$imagen = imagecreatetruecolor(600, 600);
|
||||
$negre = imagecolorallocate($imagen, 0,0,0);
|
||||
imagearc($imagen, 300, 300, 450, 450,0, 360, $negre);
|
||||
header('Content-Type: image/png');
|
||||
imagepng($imagen);
|
||||
imagedestroy($imagen);/**/
|
||||
|
||||
?>
|
|
@ -337,4 +337,4 @@ class Moon {
|
|||
} /**/
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
$sel = 'SELECT tag_id, tag_name, count(articles.article_id) as "count", max(articles.article_timestamp) as last_date FROM tags, articles, article_tags WHERE tags.tag_id = article_tags.tag and article_tags.article = articles.article_id group by tag_name order by count desc';
|
||||
$tagsList = $db->query($sel);
|
||||
while($row = $tagsList->fetchArray()){
|
||||
echo "<li><small><span class='tag'><a class='inherit' href='/tag/".$row['tag_id']."'>" . $row['tag_name'] . "</a></span><br /> " .$row['count']. " articles, l'últim de ". strftime('%a, %d/%m/%Y (%R)', $row['last_date']). " </small></li>";
|
||||
echo "<li><small><span class='tag'><a class='inherit' href='/tag/".$row['tag_id']."'><abbr style='text-decoration:none' title='L'últim dels " . $row['count'] . " articles d'aquesta categoria data del ". strftime('%a, %d/%m/%Y (%R)', $row['last_date']) ."'>" . $row['tag_name'] . " </abbr></a></span></small></li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
|
Carregant…
Referencia en una nova incidència