Skip to content

Commit

Permalink
Merged branch devel-addressbook from r443 back to trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascube committed Apr 28, 2007
1 parent 9e5d051 commit f115416
Show file tree
Hide file tree
Showing 63 changed files with 3,192 additions and 2,716 deletions.
30 changes: 15 additions & 15 deletions README
Expand Up @@ -29,6 +29,18 @@ The current development skin uses icons designed by Stephen Horlander and Kevin
Gerich for Mozilla.org.


Installation:
-------------
For detailed instructions on how to install RoundCube webmail on your server,
please refer to the INSTALL document in the same directory as this document.


Licensing:
----------
This product is distributed under the GPL. Please read through the file
LICENSE for more information about our license.


How it works:
-------------
The main authority for the RoundCube access is the IMAP server. If
Expand All @@ -42,32 +54,20 @@ will be allowed.

Code Layout:
------------

Basic sequence (index.php):
- index.php -> load_gui -> parse_template
- index.php -> rcmail_load_gui -> new rcmail_template -> rcmail_template::send
- authentication details in this sequence

Tasks
- index.php limits tasks to set list
- can see task in roundcube link when you mouse over it
- task templates stored in skins/default/templates
- templates "roundcube:" tokens that get replaced in parse_template
- templates "roundcube:" tokens that get replaced in rcmail_template class

program/include/rcube_shared.inc
- defines rcube_html_page, class that lays out a roundcube web page
- defines form control classes


Installation:
-------------
For detailed instructions on how to install RoundCube webmail on your server,
please refer to the INSTALL document in the same directory as this document.


Licensing:
----------
This product is distributed under the GPL. Please read through the file
LICENSE for more information about our license.
- provides common functions


Contact:
Expand Down
2 changes: 2 additions & 0 deletions UPGRADING
Expand Up @@ -17,6 +17,8 @@ from version 1.0-beta2
$rcmail_config['preview_pane'] = TRUE;
$rcmail_config['date_today'] = 'H:i';
$rcmail_config['double_auth'] = TRUE;
* If you have LDAP servers configured, change prop key 'mail_field'
to 'email_field' for each server confgured in /config/main.inc.php


form version 0.1-beta
Expand Down
16 changes: 16 additions & 0 deletions bin/html2text.php
@@ -0,0 +1,16 @@
<?php

require_once('../program/lib/html2text.inc');

$htmlText = $HTTP_RAW_POST_DATA;
$converter = new html2text($htmlText);

header('Content-Type: text/plain; charset=UTF-8');
$plaintext = $converter->get_text();

if (function_exists('html_entity_decode'))
print html_entity_decode($plaintext, ENT_COMPAT, 'UTF-8');
else
print $plaintext;

?>
49 changes: 23 additions & 26 deletions program/steps/mail/quotaimg.inc → bin/quotaimg.php
Expand Up @@ -2,7 +2,7 @@

/*
+-----------------------------------------------------------------------+
| program/steps/mail/quotaimg.inc |
| program/bin/quotaimg.php |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005, RoundCube Dev. - Switzerland |
Expand Down Expand Up @@ -81,84 +81,81 @@ function genQuota($used, $total, $width, $height)
***** DO NOT EDIT BELOW HERE *****
****************************/

if(ereg("^[^0-9?]*$", $used) || ereg("^[^0-9?]*$", $total))
{
if (ereg("^[^0-9?]*$", $used) || ereg("^[^0-9?]*$", $total))
return false;
}
if(strpos($used, '?')!==false || strpos($total, '?')!==false && $used != 0)
{

if (strpos($used, '?')!==false || strpos($total, '?')!==false && $used != 0)
$unknown = true;
}

$im = imagecreate($width, $height);

if($border)
{
if ($border)
{
list($r, $g, $b) = explode(',', $color['border']);
$borderc = imagecolorallocate($im, $r, $g, $b);
imageline($im, 0, 0, $width, 0, $borderc);
imageline($im, 0, $height-$border, 0, 0, $borderc);
imageline($im, $width-1, 0, $width-$border, $height, $borderc);
imageline($im, $width, $height-$border, 0, $height-$border, $borderc);
}
}

list($r, $g, $b) = explode(',', $color['text']);
$text = imagecolorallocate($im, $r, $g, $b);

if($unknown)
{
if ($unknown)
{
list($r, $g, $b) = explode(',', $color['bg']['Unknown']);
$background = imagecolorallocate($im, $r, $g, $b);
imagefilledrectangle($im, 0, 0, $width, $height, $background);

$string = 'Unknown';
$mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1;
imagestring($im, $font, $mid, $padding, $string, $text);
}
else if($used > $total)
{
}
else if ($used > $total)
{
list($r, $g, $b) = explode(',', $color['bg']['OL']);
$background = imagecolorallocate($im, $r, $g, $b);
imagefilledrectangle($im, 0, 0, $width, $height, $background);

$string = 'Over Limit';
$mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1;
imagestring($im, $font, $mid, $padding, $string, $text);
}
}
else
{
{
list($r, $g, $b) = explode(',', $color['bg']['quota']);
$background = imagecolorallocate($im, $r, $b, $g);
imagefilledrectangle($im, 0, 0, $width, $height, $background);

$quota = ($used==0)?0:(round($used/$total, 2)*100);

if($quota >= $limit['high'])
{
if ($quota >= $limit['high'])
{
list($r, $g, $b) = explode(',', $color['fill']['high']);
$fill = imagecolorallocate($im, $r, $g, $b);
}
}
elseif($quota >= $limit['mid'])
{
{
list($r, $g, $b) = explode(',', $color['fill']['mid']);
$fill = imagecolorallocate($im, $r, $g, $b);
}
}
else // if($quota >= $limit['low'])
{
{
list($r, $g, $b) = explode(',', $color['fill']['low']);
$fill = imagecolorallocate($im, $r, $g, $b);
}
}

$quota_width = $quota / 100 * $width;
imagefilledrectangle($im, $border, 0, $quota, $height-2*$border, $fill);

$string = $quota.'%';
$mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1;
imagestring($im, $font, $mid, $padding, $string, $text); // Print percent in black
}
}

header('Content-Type: image/gif');
header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+86400)." GMT");
header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+86400)." GMT");
header("Cache-Control: ");
header("Pragma: ");

Expand Down
20 changes: 11 additions & 9 deletions config/main.inc.php.dist
Expand Up @@ -190,16 +190,18 @@ $rcmail_config['mail_header_delimiter'] = NULL;
// like the Verisign example below. if you would like to test,
// simply uncomment the Verisign example.
/**
* example config for Verisign directory
* example config for Verisign directory
*
* $rcmail_config['ldap_public']['Verisign'] = array('hosts' => array('directory.verisign.com'),
* 'port' => 389,
* 'base_dn' => '',
* 'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
* 'name_field' => 'cn',
* 'mail_field' => 'mail',
* 'scope' => 'sub',
* 'fuzzy_search' => 0);
* $rcmail_config['ldap_public']['Verisign'] = array(
* 'name' => 'Verisign.com',
* 'hosts' => array('directory.verisign.com'),
* 'port' => 389,
* 'base_dn' => '',
* 'search_fields' => array('mail', 'cn'), // fields to search in
* 'name_field' => 'cn', // this field represents the contact's name
* 'email_field' => 'mail', // this field represents the contact's e-mail
* 'scope' => 'sub', // search mode: sub|base|list
* 'fuzzy_search' => true); // server allows wildcard search
*/

// don't allow these settings to be overriden by the user
Expand Down

0 comments on commit f115416

Please sign in to comment.