projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added phpdoc blocks to netstyle theme.
[squirrelmail.git]
/
themes
/
darkness.php
diff --git
a/themes/darkness.php
b/themes/darkness.php
index 61fbb4884074036a5cb012e2c41cdde04ed1c0f3..a6e11c6a3233091aca5bb6a26b7ee22816bd107d 100755
(executable)
--- a/
themes/darkness.php
+++ b/
themes/darkness.php
@@
-37,18
+37,18
@@
function IsUnique($Distance, $r, $g, $b, $usedArray)
// Always tremble background
// This might make people go insane. Yes! *Victory dance!*
function Darkness_HeaderPlugin() {
// Always tremble background
// This might make people go insane. Yes! *Victory dance!*
function Darkness_HeaderPlugin() {
- global $PHP_SELF
, $Darkness_Transition
;
-
+ global $PHP_SELF;
+
if (substr($PHP_SELF, -18) == '/src/left_main.php') {
echo '<meta http-equiv="Page-Enter" content="' .
if (substr($PHP_SELF, -18) == '/src/left_main.php') {
echo '<meta http-equiv="Page-Enter" content="' .
- 'blendTrans(Duration=2.0)">' . "\n";
+ 'blendTrans(Duration=2.0)"
/
>' . "\n";
}
}
-
-?><script language=
javascript
>
+
+?><script language=
"javascript"
>
darkness_color = 0;
darkness_dir = +1;
darkness_color = 0;
darkness_dir = +1;
-darkness_hex = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- '
A', 'B', 'C', 'D', 'E', 'F
');
+darkness_hex = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ '
a', 'b', 'c', 'd', 'e', 'f
');
function DarknessTremble() {
if (darkness_color >= 32 || darkness_color <= 0)
darkness_dir = - darkness_dir;
function DarknessTremble() {
if (darkness_color >= 32 || darkness_color <= 0)
darkness_dir = - darkness_dir;
@@
-63,7
+63,7
@@
function DarknessTremble() {
}
setTimeout('DarknessTremble()', 10000);
</script>
}
setTimeout('DarknessTremble()', 10000);
</script>
-<?
PHP
+<?
php
}
global $squirrelmail_plugin_hooks;
}
global $squirrelmail_plugin_hooks;
@@
-84,24
+84,24
@@
$squirrelmail_plugin_hooks['generic_header']['theme_darkness'] =
$unique = true;
foreach ($used as $col) {
if (abs($r - $col) < $targetDistance)
$unique = true;
foreach ($used as $col) {
if (abs($r - $col) < $targetDistance)
- $unique = false;
+
$unique = false;
}
if ($unique) {
$i = array_shift($Left);
$color[$i] = sprintf('#%02X%02X%02X',$r,$r, $r);
}
if ($unique) {
$i = array_shift($Left);
$color[$i] = sprintf('#%02X%02X%02X',$r,$r, $r);
- $used[] = $r;
- $targetDistance = $BackgroundTargetDistance;
+
$used[] = $r;
+
$targetDistance = $BackgroundTargetDistance;
} else {
$targetDistance -= $BackgroundAdjust;
}
}
} else {
$targetDistance -= $BackgroundAdjust;
}
}
-
+
// Set the error color to some shade of red
$r = mt_rand(196, 255);
$g = mt_rand(144, ($r * .8));
$color[2] = sprintf('#%02X%02X%02X', $r, $g, $g);
$used = array(array($r, $g, $g));
// Set the error color to some shade of red
$r = mt_rand(196, 255);
$g = mt_rand(144, ($r * .8));
$color[2] = sprintf('#%02X%02X%02X', $r, $g, $g);
$used = array(array($r, $g, $g));
-
+
// Set normal text colors
$cmin = 196;
$cmax = 255;
// Set normal text colors
$cmin = 196;
$cmax = 255;
@@
-113,14
+113,14
@@
$squirrelmail_plugin_hooks['generic_header']['theme_darkness'] =
$color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
$used[] = array($r, $g, $b);
}
$color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
$used[] = array($r, $g, $b);
}
-
+
$Left = array(1, 7, 11, 13, 14, 15);
$targetDistance = $TextTargetDistance;
while (count($Left) > 0) {
// Text colors -- Try to keep the colors distinct
$cmin = 196;
$cmax = 255;
$Left = array(1, 7, 11, 13, 14, 15);
$targetDistance = $TextTargetDistance;
while (count($Left) > 0) {
// Text colors -- Try to keep the colors distinct
$cmin = 196;
$cmax = 255;
-
+
/** generate random color **/
$r = mt_rand($cmin,$cmax);
$g = mt_rand($cmin,$cmax);
/** generate random color **/
$r = mt_rand($cmin,$cmax);
$g = mt_rand($cmin,$cmax);
@@
-129,8
+129,8
@@
$squirrelmail_plugin_hooks['generic_header']['theme_darkness'] =
if (IsUnique($targetDistance, $r, $g, $b, $used)) {
$i = array_shift($Left);
$color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
if (IsUnique($targetDistance, $r, $g, $b, $used)) {
$i = array_shift($Left);
$color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b);
- $used[] = array($r, $g, $b);
- $targetDistance = $TextTargetDistance;
+
$used[] = array($r, $g, $b);
+
$targetDistance = $TextTargetDistance;
} else {
$targetDistance *= $TextAdjust;
}
} else {
$targetDistance *= $TextAdjust;
}
@@
-157,4
+157,4
@@
f 14: Color for text with more than one quote (default: #FF0000)
**/
**/
-?>
+?>
\ No newline at end of file