<?
########## 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 maxftp, webmail, webftp, pwschutz, fehlerseiten, perl from kunden where kunde = ? ", TRUE, new SQLString( $PHP_AUTH_USER ) );
$werte = db_fetch_array($id);
$maxftp = $werte["maxftp"];
$skwebmail = $werte["webmail"];
$skwebftp = $werte["webftp"];
$skfehlerseiten = $werte["fehlerseiten"];
$skpwschutz = $werte["pwschutz"];
$skperl = $werte["perl"];

?>
<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">
<tr>
    <TD valign="top"> 
      <P>
        <? echo ltext("tocg_title"); ?>
        </P>
      <P>
        <? echo ltext("tocg_desc1"); ?>
        </P>
      <form action="tools_cgicheck2.php" method="post" name="check" target="_blank">
        <table border="1" cellpadding="3" cellspacing="0" bordercolorlight="<? echo $color_dark_grey; ?>" bordercolordark="#FFFFFF" width="420">
        <tr>
          <td class="titel-3" ><? echo ltext("tocg_cell_script"); ?></td>
        </tr>
        <tr>
          <td><input type="text" name="file" value="<? echo $file; ?>" size="40"><? echo std_button(ltext('tocg_check'), 'javascript:doChange()') ?></td>
        </tr>
      </table></form>
      <br>
      <table border="1" cellpadding="3" cellspacing="0" bordercolorlight="<? echo $color_dark_grey; ?>" bordercolordark="#FFFFFF" width="420">
  <tr>
    <td class="titel-3" ><? echo ltext("tocg_cell_dir"); ?></td>
  </tr>
<?
if ((substr($dir, 0, 1) != "/") && (!istleer($dir))) $dir = "/".$dir;
$cdir = "/$PHP_AUTH_USER/html".$dir;

echo '<tr bgcolor="'.$color_light_grey.'"><td><img src="'.$strSkinName.'/file_icons/file_dir.gif" width="16" height="16" border="0"> <a class=data href="tools_cgicheck.php?dir=">html</a></td></tr>';

$dirs = explode("/", $cdir);
for ($n = 3; $n < count($dirs); $n++)
	{
	 $dirlink = "";
	 if (!istleer($dirs[$n]))
		{
		 for ($x = 3; $x <= $n; $x++) $dirlink .= "/".$dirs[$x];
		 $leer = ($x-3) * 16;
		 echo '<tr><td><img src="'.$strSkinName.'/file_icons/1x1.gif" width="'.$leer.'" height="16"><img src="'.$strSkinName.'/file_icons/file_dir.gif" width="16" height="16" border="0"><a class=data href="tools_cgicheck.php?dir='.$dirlink.'">'.$dirs[$n].'</a></td></tr>';
		}
	}

$leer += 16;

$exec = $bindir."/lsdir.pl ".$cdir." 1";
exec($exec, $list, $return);

for ($i = 0; $i < count($list); $i++)
	{
	 $file = substr($list[$i], 1, (strlen($list[$i]) - 1));
	 if (substr($list[$i], 0, 1) == "f")
		{
		 $imgsrc = "file_generic.gif";
		 $link = 'tools_cgicheck.php?dir='.$dir.'&file='.$dir.'/'.$file;
		} else
		{
		 $link = 'tools_cgicheck.php?dir='.$dir.'/'.$file;
		 $imgsrc = "file_dir.gif";
		 $actionlink = '&nbsp;';
		}
		 
	 echo '<tr><td><img src="'.$strSkinName.'/file_icons/1x1.gif" width="'.$leer.'" height="16"><img src="'.$strSkinName.'/file_icons/'.$imgsrc.'" width="16" height="16" border="0"> <a class=data href="'.$link.'">'.$file.'</a></td></tr>';
	}
?>
</table>
</TD>
  </TR>
  </TBODY> 
</TABLE>
</BODY>
</HTML>
<?
db_close(); 
?>
