Formatting

This commit is contained in:
Miles Lott 2001-05-01 09:32:52 +00:00
parent bbcd259b8a
commit 66991480ca
9 changed files with 50 additions and 50 deletions

View File

@ -117,9 +117,9 @@
$fields["tel_pager"] = $pager;
$fields["tel_cell"] = $mphone;
$fields["tel_msg"] = $msgphone;
$fields["tel_car"] = $carphone;
$fields["tel_video"] = $vidphone;
$fields["tel_isdn"] = $isdnphone;
$fields["tel_car"] = $carphone;
$fields["tel_video"] = $vidphone;
$fields["tel_isdn"] = $isdnphone;
$fields["adr_one_street"] = $bstreet;
$fields["adr_one_locality"] = $bcity;
$fields["adr_one_region"] = $bstate;
@ -132,7 +132,7 @@
$ftype = 'one_'.$type;
eval("if (\$\$ftype=='on'\) { \$typed \.= \$type\.';'; }");
}
$fields["adr_one_type"] = substr($typed,0,-1);
$fields["adr_one_type"] = substr($typed,0,-1);
$fields["address2"] = $address2;
$fields["address3"] = $address3;
@ -149,7 +149,7 @@
$ftype = 'two_'.$type;
eval("if \(\$\$ftype=='on'\) { \$typed \.= \$type\.';'; }");
}
$fields["adr_two_type"] = substr($typed,0,-1);
$fields["adr_two_type"] = substr($typed,0,-1);
reset($customfields);
while (list($name,$val) = each($customfields)) {
@ -158,21 +158,21 @@
if ($cust) { $fields[$name] = $cust; }
}
$fields["ophone"] = $ophone;
$fields["tz"] = $timezone;
$fields["bday"] = $bday;
$fields["url"] = $url;
$fields["pubkey"] = $pubkey;
$fields["note"] = $notes;
$fields["label"] = $label;
$fields["ophone"] = $ophone;
$fields["tz"] = $timezone;
$fields["bday"] = $bday;
$fields["url"] = $url;
$fields["pubkey"] = $pubkey;
$fields["note"] = $notes;
$fields["label"] = $label;
if ($access == True) {
$fields["access"] = 'private';
$fields["access"] = 'private';
} else {
$fields["access"] = 'public';
$fields["access"] = 'public';
}
$fields["cat_id"] = $cat_id;
$fields["cat_id"] = $cat_id;
addressbook_add_entry($phpgw_info["user"]["account_id"],$fields,$fields["access"],$fields["cat_id"]);
$ab_id = addressbook_get_lastid();

View File

@ -107,10 +107,10 @@
$fields["tel_pager"] = $pager;
$fields["tel_cell"] = $mphone;
$fields["tel_msg"] = $msgphone;
$fields["tel_car"] = $carphone;
$fields["tel_video"] = $vidphone;
$fields["tel_isdn"] = $isdnphone;
$fields["tel_prefer"] = $tel_prefer;
$fields["tel_car"] = $carphone;
$fields["tel_video"] = $vidphone;
$fields["tel_isdn"] = $isdnphone;
$fields["tel_prefer"] = $tel_prefer;
$fields["adr_one_street"] = $bstreet;
$fields["adr_one_locality"] = $bcity;
@ -124,7 +124,7 @@
$ftype = 'one_'.$type;
eval("if (\$\$ftype=='on'\) { \$typed \.= \$type\.';'; }");
}
$fields["adr_one_type"] = substr($typed,0,-1);
$fields["adr_one_type"] = substr($typed,0,-1);
$fields["address2"] = $address2;
$fields["address3"] = $address3;
@ -141,7 +141,7 @@
$ftype = 'two_'.$type;
eval("if \(\$\$ftype=='on'\) { \$typed \.= \$type\.';'; }");
}
$fields["adr_two_type"] = substr($typed,0,-1);
$fields["adr_two_type"] = substr($typed,0,-1);
reset($customfields);
while (list($name,$val) = each($customfields)) {
@ -150,21 +150,21 @@
if ($cust) { $fields[$name] = $cust; }
}
$fields["ophone"] = $ophone;
$fields["tz"] = $timezone;
$fields["bday"] = $bday;
$fields["url"] = $url;
$fields["pubkey"] = $pubkey;
$fields["note"] = $notes;
$fields["label"] = $label;
$fields["ophone"] = $ophone;
$fields["tz"] = $timezone;
$fields["bday"] = $bday;
$fields["url"] = $url;
$fields["pubkey"] = $pubkey;
$fields["note"] = $notes;
$fields["label"] = $label;
if ($access == True || $access == "private") {
$fields["access"] = 'private';
$fields["access"] = 'private';
} else {
$fields["access"] = 'public';
$fields["access"] = 'public';
}
$fields["cat_id"] = $cat_id;
$fields["cat_id"] = $cat_id;
if (($this->grants[$check[0]['owner']] & PHPGW_ACL_EDIT) && $check[0]['owner'] != $phpgw_info['user']['account_id'])
{

View File

@ -40,7 +40,7 @@
$errorcount = 0;
if (!$field_name) { $error[$errorcount++] = lang('Please enter a name for that field!'); }
$field_name = addslashes($field_name);
$field_name = addslashes($field_name);
if (! $error)
{

View File

@ -50,7 +50,7 @@
$limit = 15;
}
if (!$sort) { $sort = "ASC"; }
if (!$sort) { $sort = "ASC"; }
$fields = read_custom_fields($start,$limit,$query,$sort,$order);
$total_records = count($fields);
@ -87,7 +87,7 @@
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$t->set_var(tr_color,$tr_color);
$field = $fields[$i]['name'];
$field = $fields[$i]['name'];
//-------------------------- template declaration for list records ---------------------------

View File

@ -23,7 +23,7 @@
/* $Id$ */
/*!
/*!
@class contacts
@abstract Contact List System
@discussion Author: jengo/Milosch <br>
@ -61,7 +61,7 @@
$this->grants = $phpgw->acl->get_grants('addressbook');
// The left side are the array elements used throughout phpgw, right side are the ldap attributes
$this->stock_contact_fields = array(
this->stock_contact_fields = array(
"fn" => "cn", // 'prefix given middle family suffix'
"n_given" => "givenname", // firstname
"n_family" => "sn", // lastname
@ -153,7 +153,7 @@
);
// Used to set mail_type fields
$this->email_types = array(
$this->email_types = array(
"INTERNET" => "INTERNET",
"CompuServe" => "CompuServe",
"AOL" => "AOL",
@ -399,7 +399,7 @@
$this->total_records = count($ldap_fields);
//echo '<br>total="'.$this->total_records.'"';
} else {
} else {
$sri = ldap_search($this->ldap, $phpgw_info["server"]["ldap_contact_context"], "phpgwowner=*");
$ldap_fields = ldap_get_entries($this->ldap, $sri);
$this->total_records = ldap_count_entries($this->ldap, $sri);

View File

@ -23,7 +23,7 @@
/* $Id$ */
/*!
/*!
@class acl
@abstract Contact List System
@discussion Author: jengo/Milosch <br>
@ -57,7 +57,7 @@
$this->account_id = $phpgw_info['user']['account_id'];
// The left side are the array elements used throughout phpgw, right side are the db field names.
$this->stock_contact_fields = array(
$this->stock_contact_fields = array(
"fn" => "fn", // 'prefix given middle family suffix'
"n_given" => "n_given", // firstname
"n_family" => "n_family", // lastname
@ -148,7 +148,7 @@
);
// Used to set email_type fields
$this->email_types = array(
$this->email_types = array(
"INTERNET" => "INTERNET",
"CompuServe" => "CompuServe",
"AOL" => "AOL",
@ -183,7 +183,7 @@
$this->db->query("select id,lid,tid,owner,access,cat_id $t_fields from $this->std_table WHERE id='$id'");
$this->db->next_record();
$return_fields[0]["id"] = $this->db->f("id"); // unique id
$return_fields[0]["lid"] = $this->db->f("lid"); // lid for group/account records
$return_fields[0]["tid"] = $this->db->f("tid"); // type id (g/u) for groups/accounts
@ -423,11 +423,11 @@
echo "<br>DEBUG - Filtering with: #" . $filtermethod . "#";
}
if (!$sort) { $sort = "ASC"; }
if (!$sort) { $sort = "ASC"; }
if ($order) {
$ordermethod = "order by $order $sort ";
} else {
} else {
$ordermethod = "order by n_family,n_given,email $sort";
}
@ -471,7 +471,7 @@
. "adr_two_postalcode LIKE '%$query%' OR adr_two_countryname LIKE '%$query%' OR "
. "org_name LIKE '%$query%' OR org_unit LIKE '%$query%') " . $fand . $filtermethod . $ordermethod . " "
. $limit,__LINE__,__FILE__);
} else {
} else {
$this->db3->query("SELECT id,lid,tid,owner,access,cat_id $t_fields FROM $this->std_table " . $fwhere
. $filtermethod,__LINE__,__FILE__);
$this->total_records = $this->db3->num_rows();

View File

@ -147,7 +147,7 @@ function delete_($id)
Stock contact fields, other than accounting fields mentioned above:
$this->stock_contact_fields = array(
$this->stock_contact_fields = array(
"fn" => "fn", // 'prefix given middle family suffix'
"n_given" => "n_given", // firstname
"n_family" => "n_family", // lastname
@ -226,7 +226,7 @@ Other useful arrays for setting option dialogs, etc.
"video" => "video"
);
$this->email_types = array(
$this->email_types = array(
"INTERNET" => "INTERNET",
"CompuServe" => "CompuServe",
"AOL" => "AOL",

View File

@ -269,7 +269,7 @@
function addressbook_form($format,$action,$title="",$fields="",$customfields="",$cat_id="")
{
global $phpgw, $phpgw_info,$referer;
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array( "form" => "form.tpl"));
@ -432,7 +432,7 @@
$email_type .= "</select>";
reset($this->email_types);
$hemail_type = '<select name=hemail_type>';
$hemail_type = '<select name=hemail_type>';
while ($type = each($this->email_types)) {
$hemail_type .= '<option value="'.$type[0].'"';
if ($type[0] == $hemailtype) { $hemail_type .= ' selected'; }

View File

@ -227,7 +227,7 @@
while ($column = each($columns_to_display)) { // each entry column
$ref=$data="";
$coldata = $entries[$i][$column[0]];
// Some fields require special formatting.
// Some fields require special formatting.
if ($column[0] == "url") {
if ( !empty($coldata) && (substr($coldata,0,7) != 'http://') ) { $coldata = 'http://' . $coldata; }
$ref='<a href="'.$coldata.'" target="_new">';