Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1486

Přidáno uživatelem David Raška před asi 12 roky(ů)

Upravy:
- #208: Sitove nastroje predelany do tabu, nefunkcni telnet uplne odstranen

Zobrazit rozdíly:

freenetis/branches/network/application/controllers/tools.php
*/
/**
* Tools controller (SSH console, WHO IS info, Telnet)
* Tools controller (SSH console, WHO IS info)
*
* @package Controller
*/
class Tools_Controller extends Controller
{
/**
* Tools menu
* Contruct of controller sets tabs names
*/
public function __construct()
{
parent::__construct();
$this->sections = array
(
'ssh' => __('SSH'),
'whois' => __('WHOIS')
);
}
/**
* Redirects to ssh
*/
public function index()
{
if (!$this->acl_check_edit('Devices_Controller', 'tools'))
Controller::error(ACCESS);
$view = new View('main');
$view->title = __('Tools');
$view->content = new View('tools/index');
$view->content->headline = __('Tools');
$view->render(TRUE);
$this->ssh();
}
/**
......
$ip = '';
$view = new View('main');
$view->title = __('Tools') . ' - ' . __('ssh');
$view->content = new View('tools/ssh');
$view->content->headline = __('Tools') . ' - ' . __('ssh');
$view->content->ip = $ip;
$view->title = __('Tools') . ' - ' . __('SSH');
$view->content = new View('tools/index');
$view->content->current = 'ssh';
$view->content->headline = __('SSH');
$view->content->content = new View('tools/ssh');
$view->content->content->ip = $ip;
$view->render(TRUE);
}
/**
* Telnet tool
*
* @param string $ip
* @param integer $port
*/
public function telnet($ip = NULL, $port = NULL)
{
if (!$this->acl_check_edit('Devices_Controller', 'tools'))
Controller::error(ACCESS);
if (!isset($ip) && !valid::ip($ip))
$ip = '';
$view = new View('main');
$view->title = __('Tools') . ' - ' . __('telnet');
$view->content = new View('tools/telnet');
$view->content->headline = __('Tools') . ' - ' . __('telnet');
$view->content->ip = $ip;
$view->render(TRUE);
}
/**
* Who is tool
*
* @param string $hostname
......
}
$view = new View('main');
$view->title = __('Tools') . ' - ' . __('whois');
$view->content = new View('tools/whois');
$view->content->headline = __('Tools') . ' - ' . __('whois');
$view->content->hostname = $hostname;
$view->content->winfo = $winfo;
$view->title = __('Tools') . ' - ' . __('WHOIS');
$view->content = new View('tools/index');
$view->content->current = 'whois';
$view->content->headline = __('WHOIS');
$view->content->content = new View('tools/whois');
$view->content->content->hostname = $hostname;
$view->content->content->winfo = $winfo;
$view->render(TRUE);
}
freenetis/branches/network/application/views/tools/telnet.php
<h2><?php echo $headline ?></h2>
<br />
<?php echo __('Tools') ?>: <?php echo html::anchor(url_lang::base() . 'tools/ssh', __('ssh')) ?> |
<?php echo __('telnet') ?> |
<?php echo html::anchor(url_lang::base() . 'tools/whois', __('whois')) ?>
freenetis/branches/network/application/views/tools/whois.php
<h2><?php echo $headline ?></h2>
<br />
<?php echo __('Tools') ?>: <?php echo html::anchor(url_lang::base() . 'tools/ssh', __('ssh')) ?> |
<?php echo html::anchor(url_lang::base() . 'tools/telnet', __('telnet')) ?> |
<?php echo __('whois') ?>
<br />
<br />
<?php echo __('Example') . ': example.com, 198.182.196.48, AS220' ?>
<br />
<br />
<?php echo form::open(url_lang::base() . '/tools/whois/', array('method' => 'post')); ?>
<?php echo form::open(url_lang::base() . 'tools/whois/', array('method' => 'post')); ?>
<table>
<tr>
<td><?php echo form::input('query', $hostname); ?></td>
freenetis/branches/network/application/views/tools/ssh.php
<h2><?php echo $headline ?></h2>
<br />
<?php echo __('Tools') ?>: <?php echo __('ssh') ?> |
<?php echo html::anchor(url_lang::base() . 'tools/telnet', __('telnet')) ?> |
<?php echo html::anchor(url_lang::base() . 'tools/whois', __('whois')) ?>
<br />
<br />
<applet code='com.mindbright.application.MindTerm.class' archive='<?php echo url::base() . 'media/java/mindterm.jar'; ?>' width=100% height=450px>
<param name='sepframe' value='false' />
......
<param name="idhost" value="false">
</applet>
<br />
<a href="http://www.appgate.com/index/products/mindterm/run_mindterm.html">doc link</a>
<br />
<a href="http://www.appgate.com/index/products/mindterm/run_mindterm.html"><?php echo __('documentation') ?></a>
freenetis/branches/network/application/views/tools/index.php
<h2><?php echo $headline ?></h2>
<h2><?php echo __('Tools') ?></h2>
<ul class="tabs">
<?php foreach ($this->sections as $section => $name): ?>
<li class="ui-corner-all<?php echo ($current == $section) ? ' current' : '' ?>"><a id="<?php echo $section ?>-link" href="<?php echo url_lang::base().'tools/'.$section ?>"><?php echo $name ?></a></li>
<?php endforeach; ?>
</ul>
<div id="tools-content" class="clear">
<h3><?php echo $headline ?></h3>
<br />
<?php echo __('Tools') ?>: <?php echo html::anchor(url_lang::base() . 'tools/ssh', __('ssh')) ?> |
<?php echo html::anchor(url_lang::base() . 'tools/telnet', __('telnet')) ?> |
<?php echo html::anchor(url_lang::base() . 'tools/whois', __('whois')) ?>
<?php echo $content ?>
</div>

Také k dispozici: Unified diff