mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:47:02 +02:00
added pop3 import to the gui
This commit is contained in:
@ -38,6 +38,7 @@ if(isset($this->request->get['route'])) {
|
||||
|
||||
if($this->request->get['route'] == 'health/health') { ?> onload="Piler.load_health(); setInterval('Piler.load_health()', Piler.health_refresh * 1000);"<?php }
|
||||
if($this->request->get['route'] == 'stat/online') { ?> onload="setInterval('Piler.reload_page()', Piler.health_refresh * 1000);"<?php }
|
||||
if($this->request->get['route'] == 'import/jobs') { ?> onload="setInterval('Piler.reload_page()', 10 * 1000);"<?php }
|
||||
|
||||
} ?>>
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
<?php if(ENABLE_SAAS == 1) { ?>
|
||||
<li><a href="index.php?route=ldap/list"><i class="icon-key"></i> <?php print $text_ldap; ?></a></li>
|
||||
<li><a href="index.php?route=customer/list"><i class="icon-wrench"></i> <?php print $text_customers; ?></a></li>
|
||||
<li><a href="index.php?route=import/list"><i class="icon-lightbulb"></i> <?php print $text_import; ?></a></li>
|
||||
<?php } ?>
|
||||
<li><a href="index.php?route=policy/archiving"><i class="icon-folder-open"></i> <?php print $text_archiving_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/retention"><i class="icon-time"></i> <?php print $text_retention_rules; ?></a></li>
|
||||
|
61
webui/view/theme/default/templates/import/jobs.tpl
Normal file
61
webui/view/theme/default/templates/import/jobs.tpl
Normal file
@ -0,0 +1,61 @@
|
||||
<div id="deleteconfirm-modal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
|
||||
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php print $text_import_job_delete_confirm_message; ?> <span id="name">ERROR</span>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
|
||||
<a href="index.php?route=import/remove&id=-1&name=Error&confirmed=0" class="btn btn-primary" id="id"><?php print $text_delete; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(isset($errorstring)){ ?><div class="alert alert-danger"><?php print $text_error; ?>: <?php print $errorstring; ?></div><?php } ?>
|
||||
<?php if(isset($x)){ ?>
|
||||
<div class="alert alert-success"><?php print $x; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($id == -1) { ?>
|
||||
|
||||
<h4><?php print $text_progress; ?></h4>
|
||||
|
||||
<div class="listarea">
|
||||
|
||||
<?php if(isset($entries)){ ?>
|
||||
|
||||
<table id="ss1" class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php print $text_type; ?></th>
|
||||
<th><?php print $text_username; ?></th>
|
||||
<th><?php print $text_server_name; ?></td>
|
||||
<th><?php print $text_progress; ?></td>
|
||||
<th><?php print $text_status; ?></td>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
<?php foreach($entries as $e) { ?>
|
||||
<tr>
|
||||
<td><?php print $e['type']; ?></td>
|
||||
<td><?php print $e['username']; ?></td>
|
||||
<td><?php print $e['server']; ?></td>
|
||||
<td><?php print $e['imported']; ?> / <?php print $e['total']; ?></td>
|
||||
<td><?php print $import_status[$e['status']]; ?></td>
|
||||
<td><a href="index.php?route=import/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['username']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['username']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-error lead">
|
||||
<?php print $text_not_found; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
104
webui/view/theme/default/templates/import/list.tpl
Normal file
104
webui/view/theme/default/templates/import/list.tpl
Normal file
@ -0,0 +1,104 @@
|
||||
<div id="deleteconfirm-modal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
|
||||
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php print $text_import_job_delete_confirm_message; ?> <span id="name">ERROR</span>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
|
||||
<a href="index.php?route=import/remove&id=-1&name=Error&confirmed=0" class="btn btn-primary" id="id"><?php print $text_delete; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?php if(isset($id) && ($id > 0)) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4>
|
||||
|
||||
<?php if(isset($errorstring)){ ?><div class="alert alert-danger"><?php print $text_error; ?>: <?php print $errorstring; ?></div><?php } ?>
|
||||
<?php if(isset($x)){ ?>
|
||||
<div class="alert alert-success"><?php print $x; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<form method="post" name="add1" action="index.php?route=import/list" class="form-horizontal">
|
||||
|
||||
<?php if(isset($id) && ($id > 0)) { ?>
|
||||
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="type" id="type" value="pop3" />
|
||||
|
||||
<div class="control-group<?php if(isset($errors['server'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="server"><?php print $text_server_name; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="server" id="server" placeholder="" value="<?php if(isset($a['server'])) { print $a['server']; } ?>" />
|
||||
<?php if ( isset($errors['server']) ) { ?><span class="help-inline"><?php print $errors['server']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['username'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="username"><?php print $text_username; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="username" id="username" placeholder="" value="<?php if(isset($a['username'])) { print $a['username']; } ?>" />
|
||||
<?php if ( isset($errors['username']) ) { ?><span class="help-inline"><?php print $errors['username']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['password'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="password"><?php print $text_password; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="password" class="password" name="password" id="password" placeholder="" value="<?php if(isset($a['password'])) { print $a['password']; } ?>" /> <input type="button" value="<?php print $text_test_connection; ?>" class="btn btn-danger" onclick="Piler.test_pop3_connection(); return false;" /> <span id="LDAPTEST"></span>
|
||||
<?php if ( isset($errors['password']) ) { ?><span class="help-inline"><?php print $errors['password']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?php if(isset($id) && ($id > 0)) { print $text_modify; } else { print $text_add; } ?>" class="btn btn-primary" />
|
||||
<?php if(isset($id) && ($id > 0)) { ?>
|
||||
<a href="index.php?route=import/list" class="btn"><?php print $text_cancel; ?></a>
|
||||
<?php } else { ?>
|
||||
<input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($id == -1) { ?>
|
||||
|
||||
<h4><?php print $text_existing_entries; ?> <a href="index.php?route=import/jobs"><?php print $text_view_progress; ?></a></h4>
|
||||
|
||||
<div class="listarea">
|
||||
|
||||
<?php if(isset($entries)){ ?>
|
||||
|
||||
<table id="ss1" class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php print $text_type; ?></th>
|
||||
<th><?php print $text_username; ?></th>
|
||||
<th><?php print $text_password; ?></th>
|
||||
<th><?php print $text_server_name; ?></td>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
<?php foreach($entries as $e) { ?>
|
||||
<tr>
|
||||
<td><?php print $e['type']; ?></td>
|
||||
<td><?php print $e['username']; ?></td>
|
||||
<td>*******</td>
|
||||
<td><?php print $e['server']; ?></td>
|
||||
<td><a href="index.php?route=import/list&id=<?php print $e['id']; ?>"><i class="icon-edit"></i> <?php print $text_edit; ?></a></td>
|
||||
<td><a href="index.php?route=import/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['username']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['username']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-error lead">
|
||||
<?php print $text_not_found; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
13
webui/view/theme/default/templates/import/remove.tpl
Normal file
13
webui/view/theme/default/templates/import/remove.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
<div>
|
||||
|
||||
<?php if($confirmed){ ?>
|
||||
|
||||
<div class="alert alert-success"><?php print $x; ?>.</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<p><a href="index.php?route=import/list"><i class="icon-circle-arrow-left"></i> <?php print $text_back; ?></a></p>
|
||||
|
||||
</div>
|
||||
|
@ -35,6 +35,7 @@ if(isset($this->request->get['route'])) {
|
||||
|
||||
if($this->request->get['route'] == 'health/health') { ?> onload="Piler.load_health(); setInterval('Piler.load_health()', Piler.health_refresh * 1000);"<?php }
|
||||
if($this->request->get['route'] == 'stat/online') { ?> onload="setInterval('Piler.reload_page()', Piler.health_refresh * 1000);"<?php }
|
||||
if($this->request->get['route'] == 'import/jobs') { ?> onload="setInterval('Piler.reload_page()', 10 * 1000);"<?php }
|
||||
|
||||
} ?>>
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
<?php if(ENABLE_SAAS == 1) { ?>
|
||||
<li><a href="index.php?route=ldap/list"><?php print $text_ldap; ?></a></li>
|
||||
<li><a href="index.php?route=customer/list"><?php print $text_customers; ?></a></li>
|
||||
<li><a href="index.php?route=import/list"><?php print $text_import; ?></a></li>
|
||||
<?php } ?>
|
||||
<li><a href="index.php?route=policy/archiving"><?php print $text_archiving_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/retention"><?php print $text_retention_rules; ?></a></li>
|
||||
|
61
webui/view/theme/mobile/templates/import/jobs.tpl
Normal file
61
webui/view/theme/mobile/templates/import/jobs.tpl
Normal file
@ -0,0 +1,61 @@
|
||||
<div id="deleteconfirm-modal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
|
||||
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php print $text_import_job_delete_confirm_message; ?> <span id="name">ERROR</span>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
|
||||
<a href="index.php?route=import/remove&id=-1&name=Error&confirmed=0" class="btn btn-primary" id="id"><?php print $text_delete; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(isset($errorstring)){ ?><div class="alert alert-danger"><?php print $text_error; ?>: <?php print $errorstring; ?></div><?php } ?>
|
||||
<?php if(isset($x)){ ?>
|
||||
<div class="alert alert-success"><?php print $x; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($id == -1) { ?>
|
||||
|
||||
<h4><?php print $text_progress; ?></h4>
|
||||
|
||||
<div class="listarea">
|
||||
|
||||
<?php if(isset($entries)){ ?>
|
||||
|
||||
<table id="ss1" class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php print $text_type; ?></th>
|
||||
<th><?php print $text_username; ?></th>
|
||||
<th><?php print $text_server_name; ?></td>
|
||||
<th><?php print $text_progress; ?></td>
|
||||
<th><?php print $text_status; ?></td>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
<?php foreach($entries as $e) { ?>
|
||||
<tr>
|
||||
<td><?php print $e['type']; ?></td>
|
||||
<td><?php print $e['username']; ?></td>
|
||||
<td><?php print $e['server']; ?></td>
|
||||
<td><?php print $e['imported']; ?> / <?php print $e['total']; ?></td>
|
||||
<td><?php print $import_status[$e['status']]; ?></td>
|
||||
<td><a href="index.php?route=import/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['username']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['username']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-error lead">
|
||||
<?php print $text_not_found; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
104
webui/view/theme/mobile/templates/import/list.tpl
Normal file
104
webui/view/theme/mobile/templates/import/list.tpl
Normal file
@ -0,0 +1,104 @@
|
||||
<div id="deleteconfirm-modal" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" role="dialog" aria-hidden="true"><i class="icon-remove"></i></button>
|
||||
<h3><?php print $text_confirm; ?> <?php print $text_delete; ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php print $text_import_job_delete_confirm_message; ?> <span id="name">ERROR</span>?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
|
||||
<a href="index.php?route=import/remove&id=-1&name=Error&confirmed=0" class="btn btn-primary" id="id"><?php print $text_delete; ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><?php if(isset($id) && ($id > 0)) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4>
|
||||
|
||||
<?php if(isset($errorstring)){ ?><div class="alert alert-danger"><?php print $text_error; ?>: <?php print $errorstring; ?></div><?php } ?>
|
||||
<?php if(isset($x)){ ?>
|
||||
<div class="alert alert-success"><?php print $x; ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<form method="post" name="add1" action="index.php?route=import/list" class="form-horizontal">
|
||||
|
||||
<?php if(isset($id) && ($id > 0)) { ?>
|
||||
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="type" id="type" value="pop3" />
|
||||
|
||||
<div class="control-group<?php if(isset($errors['server'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="server"><?php print $text_server_name; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="server" id="server" placeholder="" value="<?php if(isset($a['server'])) { print $a['server']; } ?>" />
|
||||
<?php if ( isset($errors['server']) ) { ?><span class="help-inline"><?php print $errors['server']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['username'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="username"><?php print $text_username; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="username" id="username" placeholder="" value="<?php if(isset($a['username'])) { print $a['username']; } ?>" />
|
||||
<?php if ( isset($errors['username']) ) { ?><span class="help-inline"><?php print $errors['username']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['password'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="password"><?php print $text_password; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="password" class="password" name="password" id="password" placeholder="" value="<?php if(isset($a['password'])) { print $a['password']; } ?>" /> <input type="button" value="<?php print $text_test_connection; ?>" class="btn btn-danger" onclick="Piler.test_pop3_connection(); return false;" /> <span id="LDAPTEST"></span>
|
||||
<?php if ( isset($errors['password']) ) { ?><span class="help-inline"><?php print $errors['password']; ?></span><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?php if(isset($id) && ($id > 0)) { print $text_modify; } else { print $text_add; } ?>" class="btn btn-primary" />
|
||||
<?php if(isset($id) && ($id > 0)) { ?>
|
||||
<a href="index.php?route=import/list" class="btn"><?php print $text_cancel; ?></a>
|
||||
<?php } else { ?>
|
||||
<input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($id == -1) { ?>
|
||||
|
||||
<h4><?php print $text_existing_entries; ?> <a href="index.php?route=import/jobs"><?php print $text_view_progress; ?></a></h4>
|
||||
|
||||
<div class="listarea">
|
||||
|
||||
<?php if(isset($entries)){ ?>
|
||||
|
||||
<table id="ss1" class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php print $text_type; ?></th>
|
||||
<th><?php print $text_username; ?></th>
|
||||
<th><?php print $text_password; ?></th>
|
||||
<th><?php print $text_server_name; ?></td>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
<?php foreach($entries as $e) { ?>
|
||||
<tr>
|
||||
<td><?php print $e['type']; ?></td>
|
||||
<td><?php print $e['username']; ?></td>
|
||||
<td>*******</td>
|
||||
<td><?php print $e['server']; ?></td>
|
||||
<td><a href="index.php?route=import/list&id=<?php print $e['id']; ?>"><i class="icon-edit"></i> <?php print $text_edit; ?></a></td>
|
||||
<td><a href="index.php?route=import/remove&id=<?php print $e['id']; ?>&name=<?php print urlencode($e['username']); ?>&confirmed=1" class="confirm-delete" data-id="<?php print $e['id']; ?>" data-name="<?php print $e['username']; ?>"><i class="icon-remove-sign"></i> <?php print $text_remove; ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-error lead">
|
||||
<?php print $text_not_found; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
13
webui/view/theme/mobile/templates/import/remove.tpl
Normal file
13
webui/view/theme/mobile/templates/import/remove.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
<div>
|
||||
|
||||
<?php if($confirmed){ ?>
|
||||
|
||||
<div class="alert alert-success"><?php print $x; ?>.</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<p><a href="index.php?route=import/list"><i class="icon-circle-arrow-left"></i> <?php print $text_back; ?></a></p>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user