Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 499

Přidáno uživatelem Roman Ševčík před asi 15 roky(ů)

Integrave asterisku do freentisu - nějaké drobnosti.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/vendors/phpwhois/whois.utils.php
// get nice HTML output
function showHTML($result, $link_myself=true, $params='query=$0&output=nice') {
function showHTML($result, $link_myself=true, $params='$0') {
// adds links fort HTML output
......
if ($link_myself)
{
$out = preg_replace ($ip_regex, '<a href="'.$_SERVER['PHP_SELF'].'?'.$params.'">$0</a>', $out);
$out = preg_replace ($ip_regex, '<a href="'.url_lang::base().'/tools/whois/'.$params.'">$0</a>', $out);
if (isset($result['regrinfo']['domain']['nserver']))
{
......
if (is_array($nserver))
{
reset($nserver);
reset($nserver);
while (list($host, $ip) = each($nserver))
{
$url = '<a href="'. $_SERVER['PHP_SELF'].'?'.str_replace('$0',$ip,$params)."\">$host</a>";
$out = str_replace($host, $url, $out);
$out = str_replace(strtoupper($host), $url, $out);
$out = str_replace(strtoupper($host), $url, $out);
}
}
}
freenetis/trunk/kohana/application/helpers/security.php
}
/**
* @author Michal Kliment
* Generate security password from numbers
* @param $char_count
* @return password
*/
public static function generate_numeric_password($char_count = 8)
{
$password = '';
for ($i = 1; $i <= $char_count; $i++)
{
$password .= chr(mt_rand(48, 57));
}
return $password;
}
} // End security
freenetis/trunk/kohana/application/controllers/voip.php
public function index()
{
url::redirect(url_lang::base().'voip/show_all');
url::redirect(url_lang::base().'voip/show_all');
}
function show_all($limit_results = 500, $order_by = 'user_id', $order_by_direction = 'asc', $page_word = null, $page = 1)
......
));
$grid->order_field('id')->label('ID');
$grid->order_field('name')->label(url_lang::lang('texts.Number'));
//$grid->action_field('id')->label(url_lang::lang('texts.VoIP'))->url(url_lang::base().'voip/show')->action(url_lang::lang('texts.Show'));
......
$voip = $voip_sip->get_record_by_user($user_id);
$voip = $voip->current();
//echo Str_Replace(
// Array("á","č","ď","é","ě","í","ľ","ň","ó","ř","š","ť","ú","ů","ý ","ž","Á","Č","Ď","É","Ě","Í","Ľ","Ň","Ó","Ř","Š","Ť","Ú","Ů","Ý","Ž") ,
// Array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y ","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z") ,
/// $voip->regseconds 'ěščřžýáíé');
//$text = "příliš žluťoučký kůň úpěl ďábelské ódy"
//echo(StrTr($text, "ÁÄČÇĎÉĚËÍŇÓÖŘŠŤÚŮÜÝŽáäčçďéěëíňóöřšťúůüýž", "AACCDEEEINOORSTUUUYZaaccdeeeinoorstuuuyz"));
$voicemail_model = new Voip_voicemail_user_Model();
$voicemail = $voicemail_model->find_by_customer_id($voip->mailbox);
......
$voip_sip = new Voip_sip_Model();
$voip = $voip_sip->get_record_by_user_limited($user_id);
if ($voip->count() == 0)
Controller::error(4);
if ($voip->count() != 0)
url::redirect(url_lang::base().'voip/show/'.$user_id);
$config_model = new Config_Model();
if ($config_model->check_exist_variable('voip_number_interval'))
{
$ranges = array();
$ranges = explode('-', $config_model->get_value_from_name('voip_number_interval'));
$exist_numbers = $voip_sip->select('name')->find_all();
for($i = $ranges[0]; $i <= $ranges[1]; $i++)
{
$selection[$i] = $i;
}
}
else
{
$selection[0] = '';
}
$ranges = form::dropdown('ranges',$selection,'standard');
$view = new View('main');
$view->title = url_lang::lang('texts.Add VoIP account');
$view->content = new View('voip/add');
$view->content->user_id = $user_id;
$view->content->ranges = $ranges;
$view->render(TRUE);
//echo Str_Replace(
// Array("á","č","ď","é","ě","í","ľ","ň","ó","ř","š","ť","ú","ů","ý ","ž","Á","Č","Ď","É","Ě","Í","Ľ","Ň","Ó","Ř","Š","Ť","Ú","Ů","Ý","Ž") ,
// Array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y ","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z") ,
/// $voip->regseconds 'ěščřžýáíé');
//$text = "příliš žluťoučký kůň úpěl ďábelské ódy"
//echo(StrTr($text, "ÁÄČÇĎÉĚËÍŇÓÖŘŠŤÚŮÜÝŽáäčçďéěëíňóöřšťúůüýž", "AACCDEEEINOORSTUUUYZaaccdeeeinoorstuuuyz"));
}
function valid_voip_voicemail_password($input)
freenetis/trunk/kohana/application/views/tools/whois.php
<table>
<tr>
<td><?php echo form::input('query', $hostname); ?></td>
</tr>
<tr>
<td><?php echo form::submit(array('submit' => 'field_name', 'value' => url_lang::lang('texts.Whois'), 'class' => 'submit')); ?></td>
</tr>
</table>
freenetis/trunk/kohana/application/views/voip/add.php
<h2><?php echo url_lang::lang('texts.Add VoIP account') ?></h2><br />
<?php
$links = array();
$links[] = html::anchor(url_lang::base().'users/show/'.$user_id, url_lang::lang('texts.Back to user'));
echo implode (' | ', $links)
?>
<br />
<br />
<?php echo form::open(url_lang::base().'/tools/whois/', array('method'=>'post')); ?>
<table>
<tr>
<td><?php echo url_lang::lang('texts.Number ranges'.':'); ?></td>
<td><?php echo $ranges; ?></td>
<td><?php echo form::submit(array('submit' => 'activate', 'value' => url_lang::lang('texts.Activate'), 'class' => 'submit')); ?></td>
</tr>
</table>
<?php echo form::close(); ?>

Také k dispozici: Unified diff