Commit 6c1fe858 authored by Benoit Mortier's avatar Benoit Mortier

switched from tab to space in the code

parent 9756a9c2
......@@ -37,59 +37,59 @@ class addressbookgosa extends plugin{
class addressbook extends plugin
{
/* Definitions */
var $plHeadline = "Addressbook";
var $plDescription= "The addressbook plugin show internal users and external ones";
/* Definitions */
var $plHeadline = "Addressbook";
var $plDescription= "The addressbook plugin show internal users and external ones";
/* Generic */
var $ui;
/* Phonelist attributes */
var $telephone_list = array();
var $new_dn = "";
var $orig_cn = "";
var $storage_base = "";
var $orig_storage_base= "";
/* Phonelist attributes */
var $telephone_list = array();
var $new_dn = "";
var $orig_cn = "";
var $storage_base = "";
var $orig_storage_base= "";
/* Filter attributes */
var $start = 0;
var $search_for = "*";
var $search_base = "";
var $search_type = "";
var $range = 20;
var $start = 0;
var $search_for = "*";
var $search_base = "";
var $search_type = "";
var $range = 20;
/* Currently edited/added entry attributes */
var $sn = "";
var $cn = "";
var $givenName = "";
var $mail = "";
var $title = "";
var $personalTitle = "";
var $initials = "";
var $homePostalAddress = "";
var $homePhone = "";
var $mobile = "";
var $o = "";
var $postalAddress = "";
var $l = "";
var $postalCode = "";
var $st = "";
var $ou = "";
var $telephoneNumber = "";
var $facsimileTelephoneNumber = "";
var $pager = "";
var $sn = "";
var $cn = "";
var $givenName = "";
var $mail = "";
var $title = "";
var $personalTitle = "";
var $initials = "";
var $homePostalAddress = "";
var $homePhone = "";
var $mobile = "";
var $o = "";
var $postalAddress = "";
var $l = "";
var $postalCode = "";
var $st = "";
var $ou = "";
var $telephoneNumber = "";
var $facsimileTelephoneNumber = "";
var $pager = "";
var $view_logged = FALSE;
/* attribute list for save action */
var $attributes= array("sn", "givenName", "mail", "title",
"initials", "homePostalAddress", "displayName",
"homePhone", "mobile", "o", "postalAddress", "l",
"postalCode", "st", "ou", "telephoneNumber",
"facsimileTelephoneNumber", "pager");
/* attribute list for save action */
var $attributes= array("sn", "givenName", "mail", "title",
"initials", "homePostalAddress", "displayName",
"homePhone", "mobile", "o", "postalAddress", "l",
"postalCode", "st", "ou", "telephoneNumber",
"facsimileTelephoneNumber", "pager");
var $objectclasses= array("top", "person", "organizationalPerson", "inetOrgPerson");
var $objectclasses= array("top", "person", "organizationalPerson", "inetOrgPerson");
var $abobjectclass= "dc=addressbook";
var $abobjectclass= "dc=addressbook";
var $acl_targets_objects = array();
function addressbook (&$config, $dn= NULL)
......@@ -216,7 +216,7 @@ class addressbook extends plugin
return($smarty->fetch(get_template_path('dial.tpl', TRUE)));
return;
} else {
msg_dialog::display(_("Error"), _("You need to set your personal phone number in order to perform direct dials."), ERROR_DIALOG);
msg_dialog::display(_("Error"), _("You need to set your personal phone number in order to perform direct dials."), ERROR_DIALOG);
}
}
......@@ -253,7 +253,7 @@ class addressbook extends plugin
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
msg_dialog::display(_("Permission"),permDelete($this->dn),ERROR_DIALOG);
msg_dialog::display(_("Permission"),permDelete($this->dn),ERROR_DIALOG);
new log("remove","addressbook/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick address book deletion.");
}
......@@ -361,7 +361,7 @@ class addressbook extends plugin
/* Obviously the user isn't allowed to delete. Show message and
clean session. */
msg_dialog::display(_("Permission"),permDelete($this->dn),ERROR_DIALOG);
msg_dialog::display(_("Permission"),permDelete($this->dn),ERROR_DIALOG);
}
}
session::set('show_info',"ADD");
......@@ -647,7 +647,7 @@ class addressbook extends plugin
if(isset($_POST['EntryPerPage'])){
$this->range = $_POST['EntryPerPage'];
}
$range = $this->range;
$range = $this->range;
$smarty->assign("internal", 1);
}
if (isset($_GET['start'])){
......
......@@ -55,8 +55,8 @@
<a href="main.php{$plug}&amp;global=edit">{t}Edit entry{/t}</a><br>
{/if}
{if $internal_removeable}
<img alt="" src="{$delete_image}" class="center">&nbsp;
<a href="main.php{$plug}&amp;global=remove" style="vertical-align:middle;">{t}Remove entry{/t}</a><br>
<img alt="" src="{$delete_image}" class="center">&nbsp;
<a href="main.php{$plug}&amp;global=remove" style="vertical-align:middle;">{t}Remove entry{/t}</a><br>
{/if}
{/if}
</p>
......@@ -71,48 +71,48 @@
</table>
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
<tr>
<td>
<tr>
<td>
<input type="checkbox" name="organizational" value="1" {$organizational} onClick="mainform.submit()" title="{t}Select to see regular users{/t}">{t}Show organizational entries{/t}<br>
<input type="checkbox" name="global" value="1" {$global} onClick="mainform.submit()" title="{t}Select to see users in addressbook{/t}">{t}Show addressbook entries{/t}<br>
</td>
</tr>
</td>
</tr>
</table>
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
<tr>
<td>
<label for="search_base"><img class="center" alt="" src="{$tree_image}" align=middle title='{t}Display results for department{/t}'></label>
</td>
<td>
<select name="search_base" style='width:220px' onChange="mainform.submit()" title="{t}Choose the department the search will be based on{/t}">
{html_options options=$deplist selected=$depselect}
<option disabled>&nbsp;</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="search_base"><img class="center" alt="" src="{$tree_image}" align=middle title='{t}Display results for department{/t}'></label>
</td>
<td>
<select name="search_base" style='width:220px' onChange="mainform.submit()" title="{t}Choose the department the search will be based on{/t}">
{html_options options=$deplist selected=$depselect}
<option disabled>&nbsp;</option>
</select>
</td>
</tr>
</table>
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
<tr>
<td>
<label for="object_type"><img class="center" alt="" src="{$obj_image}" align=middle title='{t}Match object{/t}'></label>
</td>
<td>
<select id="object_type" style='width:220px' name="object_type" onChange="mainform.submit()" title="{t}Choose the object that will be searched in{/t}">
{html_options options=$objlist selected=$object_type}
<option disabled>&nbsp;</option>
</select>
</td>
</tr>
<tr>
<td>
<label for="object_type"><img class="center" alt="" src="{$obj_image}" align=middle title='{t}Match object{/t}'></label>
</td>
<td>
<select id="object_type" style='width:220px' name="object_type" onChange="mainform.submit()" title="{t}Choose the object that will be searched in{/t}">
{html_options options=$objlist selected=$object_type}
<option disabled>&nbsp;</option>
</select>
</td>
</tr>
</table>
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
<tr>
<td><label for="search_for"><img class="center" alt="" src="{$search_image}" style="text-align:center;" title='{t}Search for{/t}'></label>
</td>
<td>
<input id="search_for" style='width:99%' type='text' name='search_for' maxlength='20' value='{$search_for}' title='{t}Search string{/t}' onChange="mainform.submit()">
</td>
</tr>
<tr>
<td><label for="search_for"><img class="center" alt="" src="{$search_image}" style="text-align:center;" title='{t}Search for{/t}'></label>
</td>
<td>
<input id="search_for" style='width:99%' type='text' name='search_for' maxlength='20' value='{$search_for}' title='{t}Search string{/t}' onChange="mainform.submit()">
</td>
</tr>
</table>
{$apply}
</div>
......@@ -123,6 +123,6 @@
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
focus_field('search_for');
focus_field('search_for');
-->
</script>
......@@ -26,24 +26,24 @@ if ( $cleanup ){
}else{
/* Create phonelist object on demand */
if (!session::is_set('addressbook')){
$addressbook = new addressbook ($config);
$addressbook -> set_acl_base($ui->dn);
$addressbook -> set_acl_category("addressbook");
session::set('addressbook',$addressbook);
session::un_set('show_info');
}
$addressbook= session::get('addressbook');
/* Execute formular */
$display= $addressbook->execute ();
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
/* Page header*/
$display= print_header(get_template_path('plugins/addressbook/images/plugin.png'), _("Addressbook")).$display;
/* Store changes in session */
session::set('addressbook',$addressbook);
/* Create phonelist object on demand */
if (!session::is_set('addressbook')){
$addressbook = new addressbook ($config);
$addressbook -> set_acl_base($ui->dn);
$addressbook -> set_acl_category("addressbook");
session::set('addressbook',$addressbook);
session::un_set('show_info');
}
$addressbook= session::get('addressbook');
/* Execute formular */
$display= $addressbook->execute ();
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
/* Page header*/
$display= print_header(get_template_path('plugins/addressbook/images/plugin.png'), _("Addressbook")).$display;
/* Store changes in session */
session::set('addressbook',$addressbook);
}
?>
......@@ -24,16 +24,16 @@ class servapacheVhostEdit extends plugin
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("apacheServerName","apacheDocumentRoot","apacheServerAlias",
"apacheServerAdmin","apacheScriptAlias","apacheSuexecUid","apacheSuexecGid");
var $attributes = array("apacheServerName","apacheDocumentRoot","apacheServerAlias",
"apacheServerAdmin","apacheScriptAlias","apacheSuexecUid","apacheSuexecGid");
var $objectclasses = array("whatever");
var $apacheServerName = "";
var $apacheDocumentRoot = "";
var $apacheServerAdmin = "";
var $apacheSuexecUid = "";
var $apacheSuexecGid = "";
var $apacheServerName = "";
var $apacheDocumentRoot = "";
var $apacheServerAdmin = "";
var $apacheSuexecUid = "";
var $apacheSuexecGid = "";
var $apacheServerAlias = array();
var $apacheScriptAlias = array();
......@@ -273,7 +273,7 @@ class servapacheVhostEdit extends plugin
/* Add a new "Script Alias"
*/
if((isset($_POST['AddSCRecord'])) && (!empty($_POST['StrSCAlias'])) && (!empty($_POST['StrSCDir']))){
if((isset($_POST['AddSCRecord'])) && (!empty($_POST['StrSCAlias'])) && (!empty($_POST['StrSCDir']))){
$this->apacheScriptAlias[] = trim($_POST['StrSCAlias']." ".$_POST['StrSCDir']);
}
......@@ -372,7 +372,7 @@ class servapacheVhostEdit extends plugin
/* Check given mail address
*/
if(!tests::is_email($this->apacheServerAdmin) || empty($this->apacheServerAdmin)){
if(!tests::is_email($this->apacheServerAdmin) || empty($this->apacheServerAdmin)){
$message[] = msgPool::invalid(_("Admin mail address"),$this->apacheServerAdmin);
}
......
<h2>{t}Apache VHosts{/t}</h2>
<table summary="" width="100%">
<tr>
<td style="width:100%;vertical-align:top;">
{$VhostList}
<td style="width:100%;vertical-align:top;">
{$VhostList}
{render acl=$VirtualHostACL}
<input type="submit" name="AddVhost" value="{t}Add{/t}">
{/render}
</td>
{render acl=$VirtualHostACL}
<input type="submit" name="AddVhost" value="{t}Add{/t}">
{/render}
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
......
<h2>{t}Generic{/t}</h2>
<table summary="" width="100%">
<tr>
<td style="width:50%;vertical-align:top;border-right:1px solid #b0b0b0;">
<table summary="">
<tr>
<td>{t}Virtual host name{/t}{$must}
</td>
<td><input type="text" name="apacheServerName" value="{$apacheServerName}" {if $NotNew} disabled {/if}>
</td>
</tr>
<tr>
<td>{t}Document root{/t}{$must}
</td>
<td><input type="text" name="apacheDocumentRoot" value="{$apacheDocumentRoot}">
</td>
</tr>
<tr>
<td>{t}Admin mail address{/t}{$must}
</td>
<td><input type="text" name="apacheServerAdmin" value="{$apacheServerAdmin}">
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;">
<table summary="" width="100%">
<tr>
<td style="vertical-align:top;width:100%;border-right:1px solid #b0b0b0;">
<h2>{t}Server Alias{/t}</h2>
<table width="100%">
<tr>
<td>
{$apacheServerAlias}
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td style="vertical-align:top;width:30%;">
<h2>{t}URL Alias{/t}</h2>
</td>
<td>
<h2>{t}Directory Path{/t}</h2>
</td>
</tr>
<tr>
<td style="vertical-align:top;width:30%;">
<input type="text" name="StrSAAlias" value="">
</td>
<td>
<input type="text" name="StrSADir" value="">
<input type="submit" name="AddSARecord" value="{t}Add{/t}">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width:50%;vertical-align:top;border-right:1px solid #b0b0b0;">
<table summary="">
<tr>
<td>{t}Virtual host name{/t}{$must}
</td>
<td><input type="text" name="apacheServerName" value="{$apacheServerName}" {if $NotNew} disabled {/if}>
</td>
</tr>
<tr>
<td>{t}Document root{/t}{$must}
</td>
<td><input type="text" name="apacheDocumentRoot" value="{$apacheDocumentRoot}">
</td>
</tr>
<tr>
<td>{t}Admin mail address{/t}{$must}
</td>
<td><input type="text" name="apacheServerAdmin" value="{$apacheServerAdmin}">
</td>
</tr>
</table>
</td>
<td style="vertical-align:top;">
<table summary="" width="100%">
<tr>
<td style="vertical-align:top;width:100%;border-right:1px solid #b0b0b0;">
<h2>{t}Server Alias{/t}</h2>
<table width="100%">
<tr>
<td>
{$apacheServerAlias}
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td style="vertical-align:top;width:30%;">
<h2>{t}URL Alias{/t}</h2>
</td>
<td>
<h2>{t}Directory Path{/t}</h2>
</td>
</tr>
<tr>
<td style="vertical-align:top;width:30%;">
<input type="text" name="StrSAAlias" value="">
</td>
<td>
<input type="text" name="StrSADir" value="">
<input type="submit" name="AddSARecord" value="{t}Add{/t}">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p class="seperator">&nbsp;</p>
<br>
<table summary="" width="100%">
<tr>
<td style="vertical-align:top;width:50%;border-right:1px solid #b0b0b0;">
<h2>{t}Script Alias{/t}</h2>
<table width="100%">
<tr>
<td>
{$apacheScriptAlias}
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td style="vertical-align:top;width:30%;">
<h2>{t}Alias Directory{/t}</h2>
</td>
<td>
<h2>{t}Script Directory{/t}</h2>
</td>