summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-24 11:45:36 +0100
committerMinteck <contact@minteck.org>2023-02-24 11:45:36 +0100
commit15bb1453008237edbc2cb4e82a9eb44db6f99794 (patch)
treea0e07c50b7f38b5a1a399ef1bf5c1264a6fc1d6c /pages
parent3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (diff)
downloadpluralconnect-15bb1453008237edbc2cb4e82a9eb44db6f99794.tar.gz
pluralconnect-15bb1453008237edbc2cb4e82a9eb44db6f99794.tar.bz2
pluralconnect-15bb1453008237edbc2cb4e82a9eb44db6f99794.zip
Updated 10 files (automated)
Diffstat (limited to 'pages')
-rw-r--r--pages/api/raindrops-img-round.php76
-rw-r--r--pages/api/raindrops-img2-round.php76
-rw-r--r--pages/home.inc2
-rw-r--r--pages/page.inc2
4 files changed, 2 insertions, 154 deletions
diff --git a/pages/api/raindrops-img-round.php b/pages/api/raindrops-img-round.php
index f733cc8..5e80bd0 100644
--- a/pages/api/raindrops-img-round.php
+++ b/pages/api/raindrops-img-round.php
@@ -5,82 +5,6 @@ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
$url = isset($fronters['members'][0]) ? ($fronters['members'][0]["avatar_url"] ?? "/assets/uploads/raindrops.png") : "/assets/uploads/raindrops.png";
file_put_contents("/tmp/temp", file_get_contents($url));
-function imageCreateCorners($sourceImageFile, $radius) {
- # test source image
- if (file_exists($sourceImageFile)) {
- $res = is_array($info = getimagesize($sourceImageFile));
- }
- else $res = false;
-
- # open image
- if ($res) {
- $w = $info[0];
- $h = $info[1];
- switch ($info['mime']) {
- case 'image/jpeg': $src = imagecreatefromjpeg($sourceImageFile);
- break;
- case 'image/gif': $src = imagecreatefromgif($sourceImageFile);
- break;
- case 'image/png': $src = imagecreatefrompng($sourceImageFile);
- break;
- default:
- $res = false;
- }
- }
-
- # create corners
- if ($res) {
-
- $q = 10; # change this if you want
- $radius *= $q;
-
- # find unique color
- do {
- $r = rand(0, 255);
- $g = rand(0, 255);
- $b = rand(0, 255);
- }
- while (imagecolorexact($src, $r, $g, $b) < 0);
-
- $nw = $w*$q;
- $nh = $h*$q;
-
- $img = imagecreatetruecolor($nw, $nh);
- $alphacolor = imagecolorallocatealpha($img, $r, $g, $b, 127);
- imagealphablending($img, false);
- imagesavealpha($img, true);
- imagefilledrectangle($img, 0, 0, $nw, $nh, $alphacolor);
-
- imagefill($img, 0, 0, $alphacolor);
- imagecopyresampled($img, $src, 0, 0, 0, 0, $nw, $nh, $w, $h);
-
- imagearc($img, $radius-1, $radius-1, $radius*2, $radius*2, 180, 270, $alphacolor);
- imagefilltoborder($img, 0, 0, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $radius-1, $radius*2, $radius*2, 270, 0, $alphacolor);
- imagefilltoborder($img, $nw-1, 0, $alphacolor, $alphacolor);
- imagearc($img, $radius-1, $nh-$radius, $radius*2, $radius*2, 90, 180, $alphacolor);
- imagefilltoborder($img, 0, $nh-1, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $nh-$radius, $radius*2, $radius*2, 0, 90, $alphacolor);
- imagefilltoborder($img, $nw-1, $nh-1, $alphacolor, $alphacolor);
- imagealphablending($img, true);
- imagecolortransparent($img, $alphacolor);
-
- # resize image down
- $dest = imagecreatetruecolor($w, $h);
- imagealphablending($dest, false);
- imagesavealpha($dest, true);
- imagefilledrectangle($dest, 0, 0, $w, $h, $alphacolor);
- imagecopyresampled($dest, $img, 0, 0, 0, 0, $w, $h, $nw, $nh);
-
- # output image
- $res = $dest;
- imagedestroy($src);
- imagedestroy($img);
- }
-
- return $res;
-}
-
header("Content-Type: image/png");
$id = bin2hex(random_bytes(8));
diff --git a/pages/api/raindrops-img2-round.php b/pages/api/raindrops-img2-round.php
index 8ca6c81..1b0d320 100644
--- a/pages/api/raindrops-img2-round.php
+++ b/pages/api/raindrops-img2-round.php
@@ -5,82 +5,6 @@ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
$url = isset($fronters['members'][1]) ? ($fronters['members'][1]["avatar_url"] ?? "/assets/uploads/raindrops.png") : "/assets/uploads/raindrops.png";
file_put_contents("/tmp/temp", file_get_contents($url));
-function imageCreateCorners($sourceImageFile, $radius) {
- # test source image
- if (file_exists($sourceImageFile)) {
- $res = is_array($info = getimagesize($sourceImageFile));
- }
- else $res = false;
-
- # open image
- if ($res) {
- $w = $info[0];
- $h = $info[1];
- switch ($info['mime']) {
- case 'image/jpeg': $src = imagecreatefromjpeg($sourceImageFile);
- break;
- case 'image/gif': $src = imagecreatefromgif($sourceImageFile);
- break;
- case 'image/png': $src = imagecreatefrompng($sourceImageFile);
- break;
- default:
- $res = false;
- }
- }
-
- # create corners
- if ($res) {
-
- $q = 10; # change this if you want
- $radius *= $q;
-
- # find unique color
- do {
- $r = rand(0, 255);
- $g = rand(0, 255);
- $b = rand(0, 255);
- }
- while (imagecolorexact($src, $r, $g, $b) < 0);
-
- $nw = $w*$q;
- $nh = $h*$q;
-
- $img = imagecreatetruecolor($nw, $nh);
- $alphacolor = imagecolorallocatealpha($img, $r, $g, $b, 127);
- imagealphablending($img, false);
- imagesavealpha($img, true);
- imagefilledrectangle($img, 0, 0, $nw, $nh, $alphacolor);
-
- imagefill($img, 0, 0, $alphacolor);
- imagecopyresampled($img, $src, 0, 0, 0, 0, $nw, $nh, $w, $h);
-
- imagearc($img, $radius-1, $radius-1, $radius*2, $radius*2, 180, 270, $alphacolor);
- imagefilltoborder($img, 0, 0, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $radius-1, $radius*2, $radius*2, 270, 0, $alphacolor);
- imagefilltoborder($img, $nw-1, 0, $alphacolor, $alphacolor);
- imagearc($img, $radius-1, $nh-$radius, $radius*2, $radius*2, 90, 180, $alphacolor);
- imagefilltoborder($img, 0, $nh-1, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $nh-$radius, $radius*2, $radius*2, 0, 90, $alphacolor);
- imagefilltoborder($img, $nw-1, $nh-1, $alphacolor, $alphacolor);
- imagealphablending($img, true);
- imagecolortransparent($img, $alphacolor);
-
- # resize image down
- $dest = imagecreatetruecolor($w, $h);
- imagealphablending($dest, false);
- imagesavealpha($dest, true);
- imagefilledrectangle($dest, 0, 0, $w, $h, $alphacolor);
- imagecopyresampled($dest, $img, 0, 0, 0, 0, $w, $h, $nw, $nh);
-
- # output image
- $res = $dest;
- imagedestroy($src);
- imagedestroy($img);
- }
-
- return $res;
-}
-
header("Content-Type: image/png");
$id = bin2hex(random_bytes(8));
diff --git a/pages/home.inc b/pages/home.inc
index d206100..4249947 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -32,7 +32,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE
<span style="display: inline-block;background: transparent;position:absolute;width: 0;height: 0;margin-top: 17px;box-shadow: 0 6px 20px 20px #<?= $member["color"] ?>;z-index: 9;margin-left: 8px;opacity: .75;"></span>
</div><?php endforeach; ?>
</div>
- <div style="padding:5px 10px;background:#3332328a;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;position:relative;z-index: 99999;backdrop-filter: blur(30px);">
+ <div style="padding:5px 10px;background:#3332328a;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;position:relative;z-index: 999;backdrop-filter: blur(30px);">
<h2 style="margin-top: 20px;">Cold Haze</h2>
<?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?>
<p><?= count($byColor) ?> poneys dans une tĂȘte</p>
diff --git a/pages/page.inc b/pages/page.inc
index 7fe039c..d35dba8 100644
--- a/pages/page.inc
+++ b/pages/page.inc
@@ -36,7 +36,7 @@ if (($parts[0] !== "cloudburst" && $parts[0] !== "raindrops" && $parts[0] !== $a
$parts[0] = $app["other"]["slug"];
}
- if ($parts[1] === "unknown-rd" || $parts[1] === "unknown-cb" || (($isLoggedIn || $isLowerLoggedIn) && $parts[1] === $app["other"]["slug"])) $parts[1] = "unknown";
+ if ($parts[1] === "unknown-rd" || $parts[1] === "unknown-cb" || (($isLoggedIn || $isLowerLoggedIn) && $parts[1] === $app["other"]["unknown"])) $parts[1] = "unknown";
}
$system = $parts[0];