bernd
SSHFP-Records (Thanks to Martin Gollowitzer)
bernd commited 3490c29 at 2011-06-21 15:08:34
<?php
require_once('inc/debug.php');
require_once('inc/db_connect.php');
require_once('inc/base.php');
require_once('inc/security.php');
require_once('inc/error.php');
require_once('class/domain.php');
function get_dyndns_accounts()
{
$uid = (int) $_SESSION['userinfo']['uid'];
$result = db_query("SELECT * FROM dns.dyndns WHERE uid={$uid}");
$list = array();
while ($item = mysql_fetch_assoc($result)) {
array_push($list, $item);
}
DEBUG($list);
return $list;
}
function get_dyndns_account($id)
{
$id = (int) $id;
$uid = (int) $_SESSION['userinfo']['uid'];
$result = db_query("SELECT * FROM dns.dyndns WHERE id={$id} AND uid={$uid}");
if (mysql_num_rows($result) != 1) {
logger(LOG_WARNING, "modules/dns/include/dnsinclude", "dyndns", "account »{$id}« invalid for uid »{$uid}«.");
system_failure("Account ungültig");
}
$item = mysql_fetch_assoc($result);
DEBUG($item);
return $item;
}
function create_dyndns_account($handle, $password_http, $sshkey)
{
$uid = (int) $_SESSION['userinfo']['uid'];
if ($password_http == '' && $sshkey == '')
system_failure('Sie müssen entweder einen SSH-Key oder ein Passwort zum Web-Update eingeben.');
$handle = maybe_null(mysql_real_escape_string(filter_input_username($handle)));
$sshkey = maybe_null(mysql_real_escape_string(filter_input_general($sshkey)));
$pwhash = 'NULL';
if ($password_http)
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX