<?php foreach($_GET as $campo => $valor){${$campo}=$valor;} ?>

<?php include('reset0.php'); ?>
<?php $xcias=explode('.',$cias); ?>


<?php if($token==''){ ?>
<!--   <input type="color" id="color" value="#000000"/></input> -->
  <input type="text" id="token"/></input>
  <input type="button" value="TOKEN" onclick="{location.href='?token='+document.getElementById('token').value;}"/></input>
<?php } ?>
  <?php 
    echo var_dump($xcias); 
    $token=str_replace('cpsess','',$token);
   ?>



<?php
//  for($cont=0; $cont<count($xcias); $cont++)
 for($cont=0; $cont<5; $cont++)
 { 
     $dom = new DOMDocument();
          $dom->encoding = 'utf-8';
          $dom->xmlVersion = '1.0';
          $dom->formatOutput = true;

      $dom->appendChild($dom->createElement("br"));
      $button=$dom->appendChild($dom->createElement("button", $xcias[$cont]));
      $button->setAttribute("onclick","crea_user('".$xcias[$cont]."')");
      $dom->appendChild($dom->createElement("br"));

      
//       echo '<br>';
//       echo '<a onclick="{crea_user('.$xcias[$cont].');}">';
//       echo '<button>';
//       echo $xcias[$cont];
//       echo '</button>';
//       echo '</a>';
//       echo '<br>';
      
      echo $dom->saveXML();
      
 }

?>


<script type="text/javascript">
     function crea_user(newuser)
     {
          ccias=window.open("http://cpanel.vcrxol.com/cpsess<?php echo $token; ?>/frontend/paper_lantern/sql/index.html");
          setTimeout(function(newuser){
          ccias.document.getElementById('user').value=newuser;
          ccias.document.getElementById('password').value='vicore1976';
          ccias.document.getElementById('password2').value='vicore1976';
          ccias.document.getElementById("submit_new_user").click();
          }, 10000);
     }
</script>


<?php if($token!=''){ ?>
  <script type="text/javascript">
  window.Xonload = function ()
  {
    
//       var ccias[];
      
    <?php //for($cont=0; $cont<count($xcias); $cont++){ ?>
    <?php for($cont=0; $cont<5; $cont++){ ?>
//        setTimeout(function(){
     ccias[<?php echo $cont; ?>]=window.open("http://cpanel.vcrxol.com/cpsess<?php echo $token; ?>/frontend/paper_lantern/sql/index.html");
//        setTimeout(function(){
//      ccias.document.getElementById('user').value='<?php echo $xcias[$cont]; ?>full';
//      ccias.document.getElementById('password').value='vicore1976';
//      ccias.document.getElementById('password2').value='vicore1976';
//      ccias.document.getElementById("submit_new_user").click();
//      }, 10000);
    <?php } ?>
       
       setTimeout(function(){
     ccias[<?php echo $cont; ?>]=window.open("http://cpanel.vcrxol.com/cpsess<?php echo $token; ?>/frontend/paper_lantern/sql/index.html");
     ccias[<?php echo $cont; ?>].document.getElementById('user').value='<?php echo $xcias[$cont]; ?>full';
     ccias[<?php echo $cont; ?>].document.getElementById('password').value='vicore1976';
     ccias[<?php echo $cont; ?>].document.getElementById('password2').value='vicore1976';
     ccias[<?php echo $cont; ?>].document.getElementById("submit_new_user").click();
     }, 10000);
       
       
  }
  </script>
<?php } ?>


