remove more unused bits
This commit is contained in:
parent
5c36d996e0
commit
77b99adca7
@ -339,27 +339,6 @@ function make_form($target, $method="POST", $multipart=False, $form_id="", $onsu
|
|||||||
return '<form action="'.$target.'" method="'.$method.'" '.$extra.'>'.$auth;
|
return '<form action="'.$target.'" method="'.$method.'" '.$extra.'>'.$auth;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Make a link to a static file in the current theme's
|
|
||||||
* directory
|
|
||||||
*/
|
|
||||||
function theme_file($filepath) {
|
|
||||||
global $config;
|
|
||||||
$theme = $config->get_string("theme","default");
|
|
||||||
return make_link('themes/'.$theme.'/'.$filepath);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function hsl_rainbow() {
|
|
||||||
$ct = Array();
|
|
||||||
$s = 100; $l = 25; for($h= 0; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
$s = 100; $l = 50; for($h= 0; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
$s = 50; $l = 25; for($h= 0; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
$s = 100; $l = 25; for($h=30; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
$s = 100; $l = 50; for($h=30; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
$s = 50; $l = 25; for($h=30; $h<360; $h+=60) {$ct[] = "hsl($h, $s%, $l%);";}
|
|
||||||
return $ct;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||||
* CAPTCHA abstraction *
|
* CAPTCHA abstraction *
|
||||||
@ -864,23 +843,6 @@ function full_copy($source, $target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
function weighted_random($weights) {
|
|
||||||
$total = 0;
|
|
||||||
foreach($weights as $k => $w) {
|
|
||||||
$total += $w;
|
|
||||||
}
|
|
||||||
|
|
||||||
$r = mt_rand(0, $total);
|
|
||||||
foreach($weights as $k => $w) {
|
|
||||||
$r -= $w;
|
|
||||||
if($r <= 0) {
|
|
||||||
return $k;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||||
* Event API *
|
* Event API *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user