summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authortill <till@php.net>2008-02-20 15:51:09 +0000
committertill <till@php.net>2008-02-20 15:51:09 +0000
commit15062e8a7cab9fb06b89b91e1598bb58d92c73fc (patch)
tree00f482eac99a7bf480a3b760b76fc81f20633d0b /bin
parent4d3f3b9a3f53ae992cf726c94e5fb769510fa3bb (diff)
* added references to used functions
* moved comments from the function in the docblock
Diffstat (limited to 'bin')
-rw-r--r--bin/quotaimg.php70
1 files changed, 40 insertions, 30 deletions
diff --git a/bin/quotaimg.php b/bin/quotaimg.php
index 5896eac12..48debd71f 100644
--- a/bin/quotaimg.php
+++ b/bin/quotaimg.php
@@ -1,5 +1,4 @@
<?php
-
/*
+-----------------------------------------------------------------------+
| program/bin/quotaimg.php |
@@ -15,7 +14,7 @@
| Author: Brett Patterson <brett2@umbc.edu> |
+-----------------------------------------------------------------------+
- $Id: $
+ $Id: $
*/
@@ -24,34 +23,45 @@ $quota = ((isset($_GET['q']) && !empty($_GET['q'])) || $_GET['q']=='0')?(int)$_G
$width = empty($_GET['w']) ? 100 : (int)$_GET['w'];
$height = empty($_GET['h']) ? 14 : (int)$_GET['h'];
+/**
+ * Quota display
+ *
+ * Modify the following few elements to change the display of the image.
+ * Modifiable attributes are:
+ * bool border :: Defines whether you want to show a border around it?
+ * bool unknown :: Leave default; Defines whether quota is "unknown"
+ *
+ * int height :: Defines height of the image
+ * int width :: Defines width of the image
+ * int font :: Changes the font size & font used in the GD library.
+ * Available values are from 1 to 5.
+ * int padding :: Changes the offset (in pixels) from the top of the image
+ * to where the top of the text will be aligned. User
+ * greater than 0 to ensure text is off the border.
+ * array limit :: Holds the integer values of in an associative array as
+ * to what defines the upper and lower levels for quota
+ * display.
+ * High - Quota is nearing capacity.
+ * Mid - Quota is around the middle
+ * Low - Currently not used.
+ * array color :: An associative array of strings of comma separated
+ * values (R,G,B) for use in color creation. Define the
+ * RGB values you'd like to use. A list of colors (and
+ * their RGB values) can be found here:
+ * http://www.december.com/html/spec/colorcodes.html
+ *
+ * @return void
+ *
+ * @param mixed $used The amount used, or ?? if unknown.
+ * @param mixed $total The total available, or ?? if unknown.
+ * @param int $width Width of the image.
+ * @param int $height Height of the image.
+ *
+ * @see rcube_imap::get_quota()
+ * @see iil_C_GetQuota()
+ */
function genQuota($used, $total, $width, $height)
{
- /**
- * Quota Display
- *
- * Modify the following few elements to change the display of the image.
- * Modifiable attributes are:
- * bool border :: Defines whether you want to show a border around it or not.
- * bool unknown :: Leave default; Defines whether quota is "unknown"
- *
- * int height :: Defines height of the image
- * int width :: Defines width of the image
- * int font :: Changes the font size & font used in the GD library.
- * Available values are from 1 to 5.
- * int padding :: Changes the offset (in pixels) from the top of the image to
- * where the top of the text will be aligned. User greater than
- * 0 to ensure text is off the border.
- * array limit :: Holds the integer values of in an associative array as to what
- * defines the upper and lower levels for quota display.
- * High - Quota is nearing capacity.
- * Mid - Quota is around the middle
- * Low - Currently not used.
- * array color :: An associative array of strings of comma separated values (R,G,B)
- * for use in color creation. Define the RGB values you'd like to
- * use. A list of colors (and their RGB values) can be found here:
- * http://www.december.com/html/spec/colorcodes.html
- **/
-
$unknown = false;
$border = 0;
@@ -77,9 +87,9 @@ function genQuota($used, $total, $width, $height)
$color['text'] = '102, 102, 102';
- /****************************
+ /************************************
***** DO NOT EDIT BELOW HERE *****
- ****************************/
+ ***********************************/
if (ereg("^[^0-9?]*$", $used) || ereg("^[^0-9?]*$", $total))
return false;