72 lines
No EOL
2.4 KiB
PHP
72 lines
No EOL
2.4 KiB
PHP
<?php
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors',1);
|
|
require('lib/config.php');
|
|
require('lib/mysql.class.php');
|
|
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
|
$GLOBALS['rasql'] = new mysql(CONFIG_RASQL_HOST,CONFIG_RASQL_USER,CONFIG_RASQL_PW,CONFIG_RASQL_DB);
|
|
header("Content-Type: text/html; charset=utf-8");
|
|
//----------------------------------------------------------------------------------------------------------
|
|
//date_default_timezone_set('Europe/London');
|
|
date_default_timezone_set('Europe/Berlin');
|
|
$jahr = (int)date('Y');
|
|
$monat = (int)date('n');
|
|
$tag = (int)date('j');
|
|
$kw = (int)date('W');
|
|
//----------------------------------------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------------------------------------
|
|
$check = $GLOBALS['rasql']->query_single("SELECT * FROM tliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND typ=3 limit 1");
|
|
if ($check['num_rows']!=0) {
|
|
if ($check['norm']!=0) {
|
|
echo 'Daten mit norm vorhanden...</br>';
|
|
|
|
$copydata = $GLOBALS['rasql']->query("SELECT * FROM tliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND sped=1");
|
|
while($row = $copydata->fetch_assoc()) {
|
|
$jbdata = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND tour='".$row['tour']."'");
|
|
//----------------
|
|
$GLOBALS['mysql']->insert("UPDATE tourenliste SET zeit='".$row['zeit']."' WHERE id='".$jbdata['id']."'");
|
|
|
|
if($row['fertigzeit']!=0) {
|
|
echo 'zeit da';
|
|
}
|
|
echo 'keine zeit da';
|
|
|
|
|
|
|
|
echo "<pre>"; print_r($jbdata); echo "</pre>";
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
//----------------------------------------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------------------------------------
|
|
echo "<pre>"; print_r($check); echo "</pre>";
|
|
|
|
|
|
|
|
|
|
echo "<pre>"; print_r('-------------------------------'); echo "</pre>";
|
|
|
|
//----------------------------------------------------------------------------------------------------------
|
|
|
|
//echo "<pre>"; print_r($html); echo "</pre>";
|
|
|
|
|
|
|
|
/*
|
|
for($i=1; $i < 60; $i++) {
|
|
print_r ('x:'.$html[$i]);
|
|
echo'<pre>'; print_r($html[$i]); echo'</pre>';
|
|
|
|
}
|
|
*/
|
|
//----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo "</br>"; echo"fertig_saso nummer copy";
|
|
?>
|