improved multitenancy support

This commit is contained in:
SJ
2013-01-05 16:42:36 +01:00
parent 7085f3c225
commit cafd477392
26 changed files with 417 additions and 39 deletions

View File

@ -19,6 +19,7 @@
<script type="text/javascript">
var piler_ui_lang = '<?php if(LANG == 'en') { ?>en-GB<?php } else { print LANG; } ?>';
var domains_search_url = '<?php print SITE_URL; ?>/index.php?route=domain/domains&';
var email_search_url = '<?php print SITE_URL; ?>index.php?route=group/email&';
var group_search_url = '<?php print SITE_URL; ?>index.php?route=group/group&';
var folder_search_url = '<?php print SITE_URL; ?>index.php?route=folder/folder&';

View File

@ -0,0 +1,16 @@
<?php foreach($domains as $domain) { ?>
<a href="#" onclick="javascript:append_domain_from_slider('domains', '<?php print $domain['domain']; ?>');"><?php print $domain['domain']; ?></a><br />
<?php } ?>
<div id="pagenav">
<?php if($page > 0){ ?><a href="index.php?route=domain/domains&amp;page=0&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &laquo; <?php if($page > 0){ ?></a><?php } ?>
<?php if($page > 0){ ?><a href="index.php?route=domain/domains&amp;page=<?php print $prev_page; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &lsaquo; <?php if($page > 0){ ?></a><?php } ?>
<?php if(count($domains) > 0) { print $domains[0][$sort]; ?> - <?php print $domains[count($domains)-1][$sort]; } ?>
<?php if($total >= $page_len*($page+1) && $total > $page_len){ ?><a href="index.php?route=domain/domains&amp;page=<?php print $next_page; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &rsaquo; <?php if($total >= $page_len*($page+1) && $total > $page_len){ ?></a><?php } ?>
<?php if($page < $total_pages){ ?><a href="index.php?route=domain/domains&amp;page=<?php print $total_pages; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &raquo; <?php if($page < $total_pages){ ?></a><?php } ?>
</div>
<div style="margin-top: 20px;"><a href="#" onclick="javascript: window.close();">close</a></div>

View File

@ -87,18 +87,6 @@
</div>
</div>
<?php if(Registry::get('admin_user') == 1) { ?>
<div class="row">
<div class="cellhealthleft">&nbsp;</div>
<div class="cellhealthright">
<form action="index.php?route=health/worker" method="post">
<input type="hidden" name="resetcounters" value="1" />
<input type="submit" name="submit" value="<?php print $text_reset_counters; ?>" />
</form>
</div>
</div>
<?php } ?>
</div>

View File

@ -22,7 +22,7 @@
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_domain; ?>:</div>
<div class="domaincell"><?php print $text_primary_domain; ?>:</div>
<div class="domaincell">
<select name="domain">
<?php asort($domains); foreach ($domains as $domain) { ?>
@ -32,6 +32,16 @@
</div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_search_domains; ?>*:</div>
<div class="domaincell"><input type="text" id="s_piler_domain" name="s_piler_domain" value="<?php print $text_search_domain_to_add; ?>" class="autocompletetext" onfocus="javascript:toggle_hint('s_piler_domain', '<?php print $text_search_domain_to_add; ?>', 1);" onblur="javascript:toggle_hint('s_piler_domain', '<?php print $text_search_domain_to_add; ?>', 0);" /></div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_domains; ?>**:</div>
<div class="domaincell"><textarea style="height:80px;" name="domains" id="domains" class="domain"><?php if(isset($post['domains'])){ print $post['domains']; } ?></textarea></div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_search_groups; ?>*:</div>
<div class="domaincell"><input type="text" id="s_piler_group" name="s_piler_group" value="<?php print $text_search_group_to_add; ?>" class="autocompletetext" onfocus="javascript:toggle_hint('s_piler_group', '<?php print $text_search_group_to_add; ?>', 1);" onblur="javascript:toggle_hint('s_piler_group', '<?php print $text_search_group_to_add; ?>', 0);" /></div>

View File

@ -24,7 +24,7 @@
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_domain; ?>:</div>
<div class="domaincell"><?php print $text_primary_domain; ?>:</div>
<div class="domaincell">
<select name="domain">
<?php asort($domains); foreach ($domains as $domain) { ?>
@ -34,6 +34,16 @@
</div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_search_domains; ?>*:</div>
<div class="domaincell"><input type="text" id="s_piler_domain" name="s_piler_domain" value="<?php print $text_search_domain_to_add; ?>" class="autocompletetext" onfocus="javascript:toggle_hint('s_piler_domain', '<?php print $text_search_domain_to_add; ?>', 1);" onblur="javascript:toggle_hint('s_piler_domain', '<?php print $text_search_domain_to_add; ?>', 0);" /></div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_domains; ?>**:</div>
<div class="domaincell"><textarea style="height:80px;" name="domains" id="domains" class="domain"><?php if(isset($user['domains'])){ print $user['domains']; } ?></textarea></div>
</div>
<div class="domainrow">
<div class="domaincell"><?php print $text_search_groups; ?>*:</div>
<div class="domaincell"><input type="text" id="s_piler_group" name="s_piler_group" value="<?php print $text_search_group_to_add; ?>" class="autocompletetext" onfocus="javascript:toggle_hint('s_piler_group', '<?php print $text_search_group_to_add; ?>', 1);" onblur="javascript:toggle_hint('s_piler_group', '<?php print $text_search_group_to_add; ?>', 0);" /></div>

View File

@ -3,8 +3,57 @@
<form action="settings.php" method="post" name="setpagelen">
<h4><?php print $text_access_settings; ?></h4>
<div id="search">
<div class="row">
<div class="cell1" style="width: 100px;"><?php print $text_email_addresses; ?>:</div>
<div class="cell2">
<?php print $emails; ?>
</div>
</div>
<?php if(Registry::get('auditor_user') == 1 && RESTRICTED_AUDITOR == 1) { ?>
<div class="row">
<div class="cell1" style="width: 100px;"><?php print $text_domains; ?>:</div>
<div class="cell2">
<?php print $domains; ?>
</div>
</div>
<?php } ?>
<?php if(Registry::get('auditor_user') == 0 || RESTRICTED_AUDITOR == 0) { ?>
<div class="row">
<div class="cell1" style="width: 100px;"><?php print $text_groups; ?>:</div>
<div class="cell2">
<?php print $groups; ?>
</div>
</div>
<?php } ?>
<?php if(ENABLE_FOLDER_RESTRICTIONS == 1) { ?>
<div class="row">
<div class="cell1" style="width: 100px;"><?php print $text_folders; ?>:</div>
<div class="cell2">
<?php print $folders; ?>
</div>
</div>
<?php } ?>
<p><em><?php print $text_access_setting_explanation; ?></em></p>
</div>
<div id="search">
<h4><?php print $text_display_settings; ?></h4>
<div id="search1">
<div class="row">
@ -46,6 +95,7 @@
<p>&nbsp;</p>
<?php if(PASSWORD_CHANGE_ENABLED == 1) { ?>
<h4><?php print $text_change_password; ?></h4>
<form name="pwdchange" action="index.php?route=common/home" method="post" autocomplete="off">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td><?php print $text_password; ?>: </td><td><input type="password" name="password" /></td></tr>