<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once( "../include/class.SQLString.php" );
include_once("auth.php");

## mysql verbindung aufbauen
db_connect($db_host, $db_user, $db_pass);
## /mysql verbindung aufbauen

$id = safe_query( "select frontpage, cssl, maxmysql from anbieter where anbieter = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$skfrontpage = $werte["frontpage"];
$skssl = $werte["cssl"];
$maxmysql = $werte["maxmysql"];
if ($maxmysql != 0) $skmysql = 1;

if ($skssl < 1)
	{
	 $fehlertext = ltext("kusser_error1");
	 db_close();
	 include("kunden_start.php");
	 exit();
	}

## prüfen, ob kunde eigene ip adresse hat
$id = safe_query( "select * from ipadressen where kunde = ?  and anbieter = ? ", TRUE, new SQLString( $kunde ), new SQLString( $PHP_AUTH_USER ) );
if (db_num_rows($id) < 1)
	{
	 $fehlertext = ltext("kusser_error2", array($kunde));
	 include("kunden_ssl.php");
	 db_close();
	 exit();
	}
## //

$id = safe_query( "select crt, privatekey from cssl where kunde = ?  and anbieter = ?  and loeschen = 0", TRUE, new SQLString( $kunde ), new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$privatekey = $werte["privatekey"];
if ((!istleer($werte["crt"])) && (!istleer($werte["privatekey"])))
	{
	 $vorhanden = 1;
	 db_close();
	 include("kunden_ssl_erstellen2.php");
	 exit();
	}
?>

<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>

<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<br><? include("../fehler.inc.php"); ?>
<script>
function doChange()
{
document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">

<script>
<?
echo js_f_call_help('kusser_descr1', 'kusser_descr2');
?>
</script>
        <form action="kunden_ssl_erstellen2.php" method="post">
            <tr > 
              <td height="15" class="titel-3" >
                <? echo ltext("kusser_cell_title"); ?>
                </td>
            </tr>
            <tr > 
              <td height="15"> 
                <select name="vorhanden">
                  <option value="1"<? if (!istleer($privatekey)) echo " selected"; ?>>
                  <? echo ltext("kusser_select_crt"); ?>
                  </option>
                  <option value="0"<? if (istleer($privatekey)) echo " selected"; ?>>
                  <? echo ltext("kusser_select_nothing"); ?>
                  </option>
                </select>
                <input type="hidden" name="kunde" value="<? echo $kunde; ?>">
                </td>
            </tr>
            <tr > 
              <td height="15"><? echo std_button(ltext("kusser_cell_btn"), "javascript:doChange()"); ?></td>
            </tr>
</TABLE>
</form>
</BODY>
</HTML>
<?
db_close();
?>
