<?php 
include('protector.php');
include('header.php');
?>
<style type="text/css">
<!--
.style4 {font-size: 14px; }
.style9 {font-size: 14px; font-weight: bold; }
-->
</style>

<blockquote>
  <table width="621"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="16"><img src="images/top_lef.gif" alt="f" width="16" height="16" /></td>
      <td height="16" background="images/top_mid.gif"><img src="images/top_mid.gif" alt="g" width="16" height="16" /></td>
      <td width="24"><img src="images/top_rig.gif" alt="h" width="24" height="16" /></td>
    </tr>
    <tr>
      <td width="16" background="images/cen_lef.gif"><img src="images/cen_lef.gif" alt="d" width="16" height="11" /></td>
      <td align="center" valign="middle" bgcolor="#FFFFFF"><table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="38%"><font size="3"><strong>Configuração Gbox</strong></font></td>
    <td width="29%"><font size="3"><strong>Gbox keys</strong></font></td>
    <td width="33%"><font size="3"><strong>Outros</strong></font></td>
  </tr>
  <tr>
    <td><a class="style4" href="editor.php?file=cwshare.cfg" target="_self">- cwshare.cfg</a></td>
    <td><a class="style4" href="editor.php?file=nagra" target="_self">- Nagravision</a></td>
    <td><a class="style4" href="editor.php?file=atack.txt" target="_self">- atack.txt</a></td>
  </tr>
  <tr>
    <td><a class="style4" href="editor.php?file=gbox_cfg" target="_self">- gbox_cfg</a></td>
    <td><a class="style4" href="editor.php?file=crypto" target="_self">- Cryptoworks</a></td>
    <td><a class="style4" href="editor.php?file=debug.txt" target="_self">- debug.txt</a></td>
  </tr>
  <tr>
    <td><a class="style4" href="editor.php?file=softcam.cfg" target="_self">- softcam.cfg</a></a></td>
    <td><a class="style4" href="editor.php?file=nds" target="_self">- NDS</a></td>
    <td><a class="style4" href="editor.php?file=online.log" target="_self">- online.log</a></td>
  </tr>
  <tr>
    <td><a class="style4" href="editor.php?file=ignore.list" target="_self">- ignore List</a></td>
    <td><a class="style4" href="editor.php?file=irdeto" target="_self">- Irdeto</a></td>
    <td><a class="style4" href="editor.php?file=share.log" target="_self">- share.log</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><a class="style4" href="editor.php?file=seca" target="_self">- Seca</a></td>
    <td><a class="style4" href="editor.php?file=share.stat" target="_self">- share.stat</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><a class="style4" href="editor.php?file=tps" target="_self">- TPS</a></td>
    <td><a class="style4" href="editor.php?file=sc.info" target="_self">- sc.info</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><a class="style4" href="editor.php?file=via" target="_self">- Viaccess</a></td>
    <td><a class="style4" href="editor.php?file=ident.info" target="_self">- ident.info</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><a class="style4" href="editor.php?file=conax" target="_self">- Conax</a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
      </p></td>
      <td width="24" background="images/cen_rig.gif"><img src="images/cen_rig.gif" alt="e" width="24" height="11" /></td>
    </tr>
    <tr>
      <td width="16" height="16"><img src="images/bot_lef.gif" alt="a" width="16" height="16" /></td>
      <td height="16" background="images/bot_mid.gif"><img src="images/bot_mid.gif" alt="b" width="16" height="16" /></td>
      <td width="24" height="16"><img src="images/bot_rig.gif" alt="c" width="24" height="16" /></td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <table width="621"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="16"><img src="images/top_lef.gif" alt="f" width="16" height="16" /></td>
      <td height="16" background="images/top_mid.gif"><img src="images/top_mid.gif" alt="g" width="16" height="16" /></td>
      <td width="24"><img src="images/top_rig.gif" alt="h" width="24" height="16" /></td>
    </tr>
    <tr>
      <td width="16" background="images/cen_lef.gif"><img src="images/cen_lef.gif" alt="d" width="16" height="11" /></td>
      <td align="center" valign="middle" bgcolor="#FFFFFF"><div align="center">
  <blockquote>
    <p>
      <?php
 if (isset($_POST['Submit2'])) {
    $data = $_POST['text1'];
	$file_np = $_POST['filename'];
	$file = $gbox_path.$_POST['filename'];  
   if (isset($_POST['site']) && $_POST['site']==1) {	$file = '../'.$_POST['filename'];  };
    if (!$file_handle = fopen($file,"w")) { echo "<h6>Erro ao abrir $file_np. Rever permissões.\n</h6>"; }  
    if (!fwrite($file_handle, $data)) { echo "<h6>Error ao escrever $file_np. Rever permissões.\n</h6>"; }  
     echo "<font color=\"#FF0000\" face=\"Arial\" size=\"4\">$file_np - Guardado com sucesso!</font>";   
    fclose($file_handle);  
 }
 if (isset($_GET['file'])){
   $file = $_GET['file'];
   
   {
   if (file_exists($gbox_path.$file)) {
   $cw = file_get_contents($gbox_path.$file);
   print "<h2 align=\"center\">".$file."</h2>";}
   else {   print "<h4 align=\"center\">Ficheiro não encontrado - ".$file."</h4>"; $cw='';}
   }
 
?>
    </p>
  </blockquote>
  <form id="form1" name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
  <div align="center">
    <p>
      <textarea name="text1" cols="100" rows="20"><?=$cw?></textarea>
    </p>
    <p>
      <input name="site" type="hidden" value="<?=isset($_GET['site'])?>">
      <input name="filename" type="hidden" value="<?=$file?>">
	  <input type="submit" name="Submit2" value="Guardar" />
    </p>
  </div>
<?php
  }
  else print "<h4 align=\"center\">Seleccione um ficheiro na tabela de cima</h4>"; 
?>
</form>
</div></p></td>
      <td width="24" background="images/cen_rig.gif"><img src="images/cen_rig.gif" alt="e" width="24" height="11" /></td>
    </tr>
    <tr>
      <td width="16" height="16"><img src="images/bot_lef.gif" alt="a" width="16" height="16" /></td>
      <td height="16" background="images/bot_mid.gif"><img src="images/bot_mid.gif" alt="b" width="16" height="16" /></td>
      <td width="24" height="16"><img src="images/bot_rig.gif" alt="c" width="24" height="16" /></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</blockquote>



<?
include('footer.php');
?>

