Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Editar PJ desde AdminCP para 97D  (Visto 139 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline sudomudo on: October 29, 2018, 09:54:30 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 1
  • Gracias recibida: 0
  • ar
Hola, tengo un mu version 97d y quisiera editar el nivel y los puntos de los personajes desde la web, dejo una foto de lo que tengo que actualmente no me funciona por no ser compatible, tiene mas campos, comodigo solo buscaria editar NIVEL y PUNTOS.

Tengo esto:


Dentro del cPanel hay un archivo que se llama edit_character,creeria que es el que tengo que modificar pero no sabria como hacerlo, tiene la siguiente informacion:

Spoiler for Hiden:
<?
/**
* @+===========================================================================+
* @¦ MuCore 1.0.8 en Español.                         ¦
* @¦ Créditos: Isumeru & MaryJo                        ¦
* @¦ +======================================================================+  ¦
* @¦ ¦Los que copian y pegan heredarán mis errores pero no mis conocimientos¦  ¦
* @¦ +======================================================================+  ¦
* @¦ Sitios Oficiales : http://bizarre-networks.net y http://chileplanet.org   ¦
* @+===========================================================================+
*/
if(isset($_GET['get_edit'])){
   $get_edit = safe_input($_GET['get_edit'],'');
   $get_id = $core_db2->Execute("Select memb_guid from MEMB_INFO where memb___id=?",array($get_edit));
   if(!$get_id->EOF){
      header('Location: index.php?get=edit_account&mod=edit&id='.$get_id->fields[0].'');
      
   }
}
if(isset($_GET['mod'])){
   if(empty($_GET['id'])){
      echo notice_message_admin('No se puede proceder con tu petición.','0','1','0');
   }else{
      $id = safe_input($_GET['id'],'');
      $info = $core_db2->Execute("Select  memb_guid,memb___id,bloc_code,mail_addr,sno__numb,SecretQuestion,SecretAnswer,Country,Gender from MEMB_INFO where memb_guid=?",array($id));
      if($info->EOF){
         echo notice_message_admin('No se puede encontrar la cuenta.','0','1','0');
      }else{
         if(isset($_POST['edit'])){
            if($_POST['mode'] == 'x' || $_POST['question'] == 'x' || $_POST['country'] == 'x'){
               echo notice_message_admin('Error, se dejaron algunos campos en blanco.','0','1','0');
            }else{
               if(account_online($info->fields[1]) === true){
                  echo notice_message_admin('La cuenta está conectada en el juego.','0','1','0');
               }else{
                  
               
               
               if(!empty($_POST['password'])){
                  $password = safe_input($_POST['password'],'');
               }
               $mode = safe_input($_POST['mode'],'');
               $mail = safe_input($_POST['email'],'\_\@\.\-');
               if(empty($_POST['pid'])){$pid = '111111111111';}else{$pid = safe_input($_POST['pid'],'');}
               $question = safe_input($_POST['question'],'');
               $answer = safe_input($_POST['answer'],'');
               $country = safe_input($_POST['country'],'');
               $gender = safe_input($_POST['gender'],'');
               
               
               
               if(isset($password)){
                  if($core['config']['md5'] == '1'){
                     $update = $core_db2->Execute("Update MEMB_INFO set memb__pwd=[dbo].[fn_md5](?,?),bloc_code=?,mail_addr=?,sno__numb=?,SecretQuestion=?,SecretAnswer=?,Country=?,Gender=? from MEMB_INFO where memb_guid=?",array($password,$info->fields[1],$mode,$mail,$pid,$question,$answer,$country,$gender,$id));
                  }elseif ($core['config']['md5'] == '1'){
                     $update = $core_db2->Execute("Update memb_info set memb__pwd,bloc_code=?,mail_addr=?,sno__numb=?,SecretQuestion=?,SecretAnswer=?,Country=?,Gender=? from MEMB_INFO where memb_guid=?",array($password,$mode,$mail,$pid,$question,$answer,$country,$gender,$id));
                  }
               }else{
                  $update = $core_db2->Execute("Update MEMB_INFO set bloc_code=?,mail_addr=?,sno__numb=?,SecretQuestion=?,SecretAnswer=?,Country=?,Gender=? from MEMB_INFO where memb_guid=?",array($mode,$mail,$pid,$question,$answer,$country,$gender,$id));
               }
               if($update){
                  echo notice_message_admin('Cuenta editada exitósamente',1,0,'index.php?get=edit_account&mod=edit&id='.$id.'');   
               }else{
                  echo notice_message_admin('No se puede editar la cuenta, error del sistema.','0','1','0');
               }
            }
         }
         }else{
            echo '

   <div align="right" style="width: 90%; margin-bottom: 2px;"><a href="index.php?get=edit_account">[Regresa a Buscar Cuenta]</a></div>
   <form action="" method="POST" name="forum">
   <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_panel">
   <tr>
    <td align="center" class="panel_title" colspan="2">Busca los personajes de la Cuenta (ID de Usuario: '.htmlspecialchars($info->fields[1]).')</td>
   </tr>
   
   
   <tr>
   
   
   </table>
   </form>';
            
            $char = $core_db->Execute("Select mu_id,Name from Character where AccountID=?",array($info->fields[1]));
                  echo '
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_panel" style="margin-top: 20px;">
<tr>
 <td align="center" class="panel_title" colspan="3">'.htmlspecialchars($info->fields[1]).': Personajes</td>
</tr>
<tr>
<td align="left" class="panel_title_sub2">Personaje</td>
<td align="left" class="panel_title_sub2" width="50">Controles</td>
</tr>';
            $count = 0;
            while (!$char->EOF){
               $count++;
               $tr_color = ($count % 2) ? '' : 'even';
               echo '<tr class="'.$tr_color.'">
         <td align="left" class="panel_text_alt_list"><strong>'.htmlspecialchars($char->fields[1]).'</strong></td>
         <td align="left" class="panel_text_alt_list" width="50"><a href="index.php?get=edit_character&mod=edit&id='.$char->fields[0].'"></a></td>
         </tr>';
               $char->MoveNext();
            }
            if($count == '0'){
            echo '<tr><td align="center" class="panel_text_alt_list" colspan="3">No se Encontraron Personajes</td></tr>';
         }
            
         
         echo '</table>';
            
                  
            
            
         }
         
      }
   }
}else{
         
      echo '
<form action="" name="form_edit" method="POST">
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_panel">
<tr>
 <td align="center" class="panel_title" colspan="2">Buscar personajes en la cuenta</td>
</tr>
<tr>
<td align="left" class="panel_title_sub" colspan="2">ID de Usuario</td>
</tr>
<tr>
<td align="left" class="panel_text_alt1" width="45%" valign="top">
Ingresa el ID de Usuario de la cuenta que deseas encontrar.</td>
<td align="left" class="panel_text_alt2" width="45%" valign="top">
';
      if(isset($_SESSION['search_user'])){
         if(isset($_POST['user'])){
            echo '<input type="text" value="'.$_POST['user'].'" name="user">';
         }else{
            echo '<input type="text" value="'.$_SESSION['search_user'].'" name="user">';
         }
         
      }else{
         echo '<input type="text" name="user">';
      }
      echo '
<br>
</td>
</tr>

<tr>
<td align="left" class="panel_title_sub" colspan="2">Criterio de Búsqueda</td>
</tr>
<tr>
<td align="left" class="panel_text_alt1" width="45%" valign="top">
Selecciona el tipo de Búsqueda.<br<br><br><br><b>Concordancia exacta</b> - Buscará el nombre exacto de la cuenta que ingreses.<br><br><b>Concordancia Parcial</b> - Mostrará resultados parciales de la cuenta que ingreses.<br><br>Nota: Si eliges \'Concordancia Parcial\' se mostrarán sólo las primeras 100 coincidencias.</td>
<td align="left" class="panel_text_alt2" width="45%" valign="top">';
      if(isset($_SESSION['search_t'])){
         if(isset($_POST['search_t'])){
            switch ($_POST['search_t']){
               case '0': echo '<label><input type="radio" name="search_t" value="1">Concordancia Exacta</label> <label><input type="radio" name="search_t" value="0"  checked="checked">Concordancia Parcial</label>'; break;
               case '1': echo '<label><input type="radio" name="search_t" value="1" checked="checked">Exact Match</label> <label><input type="radio" name="search_t" value="0"  >Concordancia Parcial</label>'; break;
            }
         }else{
            switch ($_SESSION['search_t']){
               case '0': echo '<label><input type="radio" name="search_t" value="1">Concordancia Exacta</label> <label><input type="radio" name="search_t" value="0"  checked="checked">Concordancia Parcial</label>'; break;
               case '1': echo '<label><input type="radio" name="search_t" value="1" checked="checked">Concordancia Exacta</label> <label><input type="radio" name="search_t" value="0"  >Concordancia Parcial</label>'; break;
            }
         }
         
      }else{
         echo '<label><input type="radio" name="search_t" value="1" checked="checked">Concordancia Exacta</label> <label><input type="radio" name="search_t" value="0"  >Concordancia Parcial</label>';
      }
      
      echo '

</td>
</tr>




<tr>
<td align="right" class="panel_buttons" colspan="2">
<input type="hidden" name="search">
<input type="submit" value="Search"></td>
</tr>
</table>
</form>
';
      

      
      if(isset($_POST['search'])){
         if(!empty($_POST['user'])){
            $_SESSION['search_user'] = $_POST['user'];
            $_SESSION['search_t'] = $_POST['search_t'];
            $userid = safe_input($_POST['user'],'');
         
         echo '
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_panel" style="margin-top: 20px;">
<tr>
 <td align="center" class="panel_title" colspan="5">Resultados de Búsqueda</td>
</tr>
<tr>
<td align="left" class="panel_title_sub2">ID de Usuario</td>
<td align="left" class="panel_title_sub2">Dirección de Email</td>
<td align="left" class="panel_title_sub2">Género</td>
<td align="left" class="panel_title_sub2">País</td>
<td align="left" class="panel_title_sub2" width="50">Controles</td>
</tr>';

         if($_POST['search_t'] == '1'){
            $user = $core_db2->Execute("Select memb_guid from MEMB_INFO where memb___id=?",array($userid));
            #echo $user->fields[0];
            if(!$user->EOF){
               header('Location: index.php?get=edit_account&mod=edit&id='.$user->fields[0].'');
            }else{
               $not_found = '1';
            }
            
         }elseif ($_POST['search_t'] == '0'){
            $user = $core_db2->Execute("Select top 100 memb_guid,memb___id,mail_addr,Gender,Country from MEMB_INFO where memb___id like ?",array('%'.$userid.'%'));
            $count = 0;
            while (!$user->EOF){
               $count++;
               $tr_color = ($count % 2) ? '' : 'even';
               echo '<tr class="'.$tr_color.'">
         <td align="left" class="panel_text_alt_list"><strong>'.htmlspecialchars($user->fields[1]).'</strong></td>
         <td align="left" class="panel_text_alt_list" >'.htmlspecialchars($user->fields[2]).'</td>
         <td align="left" class="panel_text_alt_list" >';
               switch ($user->fields[3]){
                  case '1': echo 'Male'; break;
                  case '2': echo 'Female'; break;
               }
               echo '</td>
         <td align="left" class="panel_text_alt_list" >'.getcountry($user->fields[4]).'</td>
         <td align="left" class="panel_text_alt_list"><a href="index.php?get=edit_account&mod=edit&id='.$user->fields[0].'">[Editar]</a></td>
         </tr>';
               $user->MoveNext();
            }
            
            if($count == '0'){
            echo '<tr><td align="center" class="panel_text_alt_list" colspan="5">No se encontraron Cuentas</td></tr>';}
            
            
         }
         
         if($not_found == '1'){
            echo '<tr><td align="center" class="panel_text_alt_list" colspan="5">No Accounts Found</td></tr>';
         }
         echo '</table>';
            
         }
      }
}

/**
* @+===========================================================================+
* @¦ MuCore 1.0.8 en Español.                         ¦
* @¦ Créditos: Isumeru & MaryJo                        ¦
* @¦ +======================================================================+  ¦
* @¦ ¦Los que copian y pegan heredarán mis errores pero no mis conocimientos¦  ¦
* @¦ +======================================================================+  ¦
* @¦ Sitios Oficiales : http://bizarre-networks.net y http://chileplanet.org   ¦
* @+===========================================================================+
*/
?>
« Ultima edicion: October 29, 2018, 11:20:04 AM by Cloud »

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
990 Views
Last post April 25, 2017, 09:17:54 PM
by hovelisco
3 Replies
581 Views
Last post July 30, 2017, 03:00:45 AM
by rodrigovila22
1 Replies
511 Views
Last post October 17, 2017, 03:53:37 PM
by conchetumare
1 Replies
792 Views
Last post April 25, 2019, 04:38:39 AM
by carlost101
1 Replies
93 Views
Last post August 05, 2019, 11:32:05 AM
by Gaboo;