Cordial saludo a todos, he estado tratando de solucionar este problema pero hasta la fecha no he podido, y no es que sea un experto en el tema por eso recurro a ustedes que conocen mas sobre esto, el problema recae aca:
http://www.ivao.org/timeivanupd/updating_time.php
este es el codigo
<html>
<body>
<table border="2" width="100%">
<tr>
<td bgcolor="#CCCCCC" width="100%"><center><b>Pilot Time Update Log</b></center><td>
</tr>
<tr>
<td bgcolor="#CCCCCC" width="100%"><? include '../members/person/updating_pilot.php'; ?></td>
</tr>
</table>
<br><br>
<table border="2" width="100%">
<tr>
<td bgcolor="#CCCCCC" width="100%"><center><b>Staff Time Update Log</b></center><td>
</tr>
<tr>
<td bgcolor="#CCCCCC" width="100%"><? include '../members/person/updating_staff.php'; ?></td>
</tr>
</table>
<br><br>
<table border="2" width="100%">
<tr>
<td bgcolor="#CCCCCC" width="100%"><center><b>ATC Time Update Log</b></center><td>
</tr>
<tr>
<td bgcolor="#CCCCCC" width="100%"><? include '../members/person/updating_atc.php'; ?></td>
</tr>
</table>
<br><br>
<? include '../members/person/delall.php'; ?>
<?
print '-- Data are now updated and deleted for all user --<br><br><b>Update time script written by Julien Lhernault (IVAO-AWM1) for Ivao.org</b>';
?>
este php genera una serie de errores como por ejemplo:
Warning: include(update_time_pilot.php?Id=118282) [function.include]: failed to open stream: Invalid argument in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \updating_pilot.php on line 12
Warning: include() [function.include]: Failed opening 'update_time_pilot.php?Id=118282' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \updating_pilot.php on line 12
este es el codigo de "updating_pilot.php"
<?php
include("config/conf.php");
// CONNEXION MYSQL
$db_link = @mysql_connect($sql_serveur,$sql_user,$sql_passwd) ;
if(!$db_link) {echo "No connected to <b>$sql_bdd</b> on the server <b>$sql_server</b>"; exit;}
$allvid=mysql_db_query($sql_bdd,"select Pers_Id from user_data where Pers_Activate=\"1\" and new_password=\"1\" and Rating>1 and Pers_Sand=\"0\"",$db_link) or die(mysql_error());
while ($data = mysql_fetch_array($allvid)) {
{
include 'update_time_pilot.php?Id='.$data['Pers_Id'].'';
}
}
?>
<?
print '<br><br><b>Pilot Update time written by Julien Lhernault (IVAO-AWM1) for Ivao.org</b>';
?>
<?
mysql_close($db_link);
?>
que a su vez en la linea 12 nos dirige a este codigo: update_time_pilot.php
<?php
include("config/conf.php");
$requestvid = $_GET['Id'];
// CONNEXION MYSQL
$db_link = @mysql_connect($sql_serveur,$sql_user,$sql_passwd) ;
if(!$db_link) {echo "No connected to <b>$sql_bdd</b> on the server <b>$sql_server</b>"; exit;}
$details=mysql_db_query($sql_bdd,"select * from user_data where Pers_Id=\"$requestvid\"",$db_link) or die(mysql_error());
$Pers_Last_Name=mysql_result($details,0,"Pers_Last _Name");
$Pers_First_Name=mysql_result($details,0,"Pers_Fir st_Name");
$Pers_Id=mysql_result($details,0,"Pers_Id");
$Pers_Time_Pilot=mysql_result($details,0,"Pers_Tim e_Pilot");
$Pers_isPilot=mysql_result($details,0,"Pers_isPilo t");
$Pers_Time_Total=mysql_result($details,0,"Pers_Tim e_Total");
$Pers_Time_All=mysql_result($details,0,"Pers_Time_ All");
$cumulold = '0';
if($Pers_isPilot=="0")print 'Not Pilot '.$requestvid.'<br>';
else
{
$cumulreq=mysql_db_query($sql_bdd,"select CUMUL from ivan_time where VID=\"$requestvid\" and TYPE=\"PILOT\"",$db_link) or die(mysql_error());
{
// SI L'ID N'EXISTE PAS
if(mysql_num_rows($cumulreq)==0)
{
print 'No Pilot time '.$requestvid.'<br>';
}
else
{
while ($data = mysql_fetch_array($cumulreq)) {
{
$cumul = $cumulold + $data['CUMUL'];
$cumulold = $cumul;
}
}
$new_cumul = $cumulold;
$cumul_minutes = floor($new_cumul / 60);
$total_cumul = $Pers_Time_Pilot + $cumul_minutes;
$total_total = $Pers_Time_Total + $cumul_minutes;
$total_all = $Pers_Time_All + $cumul_minutes;
$Pers_Updated_Set = date("Y-m-d H:i:s");
$hourupdate=mysql_db_query($sql_bdd,"UPDATE user_data SET Pers_Time_Pilot='$total_cumul',Pers_Time_Total='$t otal_total',Pers_Time_All='$total_all',Pers_Update d='$Pers_Updated_Set' WHERE Pers_Id='$requestvid'",$db_link) or die(mysql_error());
{
if($hourupdate)
{
print ''.$requestvid.' updated<br>';
}
}
$requete=mysql_db_query($sql_bdd,"select max(DATE_FIN) from ivan_time where VID=\"$requestvid\" and TYPE=\"PILOT\"",$db_link) or die(mysql_error());
$datemax=mysql_result($requete,0,"max(DATE_FIN)");
$datemax=$datemax-3600;
$lastonlineupdate=mysql_db_query($sql_bdd,"UPDATE user_data SET lo_pilot='$datemax' WHERE Pers_Id='$requestvid'",$db_link) or die(mysql_error());
$delall=mysql_db_query($sql_bdd,"DELETE FROM ivan_time WHERE VID=\"$requestvid\" and TYPE=\"PILOT\"",$db_link) or die(mysql_error());
}
}
}
?>
<?
mysql_close($db_link);
?>
este codigo genera este error:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 12
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 13
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 14
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 15
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 16
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 17
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in C:\Inetpub\vhosts\ivao.org\httpdocs\members\person \update_time_pilot.php on line 18
espero en medio de este enredo me puedan ayudar, ya no se que hacer,
Gracias
IVAO AWM