init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
38
sscheck.php
Normal file
38
sscheck.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',1);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
require('lib/config.php');
|
||||
require('lib/mysql.class.php');
|
||||
$jahr = (int)date('Y');
|
||||
$kw = (int)date('W');
|
||||
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
||||
|
||||
$rasql = new mysql(CONFIG_RASQL_HOST,CONFIG_RASQL_USER,CONFIG_RASQL_PW,CONFIG_RASQL_DB);
|
||||
$mdata = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
||||
|
||||
$abfrageS = $rasql->query_array("SELECT * FROM tliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND sped=1");
|
||||
$abfrage_jb = $mdata->query("SELECT * FROM tourenliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND typ=19");
|
||||
|
||||
|
||||
while($row = $abfrage_jb->fetch_assoc()) {
|
||||
//echo $row['id'];
|
||||
|
||||
$tour_id= array_search($row['tour'], array_column($abfrageS, 'tour'));
|
||||
echo "Tour: ".$abfrageS[$tour_id]['id']." Status: ".$abfrageS[$tour_id]['status']."</br>";
|
||||
|
||||
//$abfrage1 = $rasql->query_single("SELECT * FROM tliste WHERE kw='".$kw."' AND jahr='".$jahr."' AND tour='".$row['tour']."'");
|
||||
if($row['status']!=$abfrageS[$tour_id]['status']) {
|
||||
$mdata->query("UPDATE tourenliste SET status='".$abfrageS[$tour_id]['status']."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// mysql_close ($GLOBALS['rasql']);
|
||||
// mysql_close ($GLOBALS['mysql']);
|
||||
|
||||
echo "fertig";
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue