Removed old Files

This commit is contained in:
oesi
2015-03-16 13:50:00 +01:00
parent fbf344ee62
commit d604e82338
6 changed files with 0 additions and 445 deletions
-23
View File
@@ -1,23 +0,0 @@
<HTML>
<HEAD>
<TITLE>Stundenplan Import</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</HEAD>
<BODY class="background_main">
<form accept-charset="UTF-8" name="import" method="post" action="stdplan_import.php" enctype="multipart/form-data">
<p><b>Import von Untis </b>(lesson.txt)
<input type="file" name="userfile" size="20" maxlength="30">
<input type="submit" name="save" value="Go">
</p>
<hr>
</form>
<P><A href="stdplan_import_check_ID.php">Check IDs</A> (UPDATE untis SET ort='DUMMY'
WHERE ort='')</P>
<P><A href="stdplan_import_sendmail.php">Send Mails</A></P>
<P>Send Mails Modul</P>
<P><A href="stdplan_import_takeover.php">Take Over</A> (DELETE FROM tbl_stundenplan WHERE datum>='2005-02-14')</P>
<P><A href="stdplan_import_takeover_modul.php">Take Over Einheiten</A></P>
</BODY>
</HTML>
-82
View File
@@ -1,82 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
?>
<HTML>
<BODY>
<?php
$field=file($userfile);
$anz=count($field);
for ($i=0;$i<$anz;$i++)
{
//echo $field[$i].'<br>';
$endpos=strpos($field[$i],9);
$lektor=substr($field[$i],0,$endpos);
//echo $lektor.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$wochentag=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $wochentag.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$stunde_id=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $stunde_id.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$lehrfach=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $lehrfach.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$ort=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $ort.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$unr=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $unr.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$keineahnung=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $keineahnung.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$klassenbez=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $klassenbez.'<br>';
$beginpos=$endpos+1;
$endpos=strlen($field[$i]);
$jahreswochen=trim(substr($field[$i],$beginpos,$endpos-$beginpos));
//echo $jahreswochen.'<br>';
$sql_query="INSERT INTO untis (lektor,wochentag,stunde,lehrfach,ort,unr,jahreswochen,klassenbez) VALUES ('$lektor','$wochentag','$stunde_id','$lehrfach','$ort','$unr','$jahreswochen','$klassenbez')";
$result=$db->db_query($sql_query);
if(!$result)
die($db->db_last_error().'<BR>'.$i.'<BR>'.$sql_query);
}
?>
Finished <BR>
<A href="index.html">Zur&uuml;ck</A>
</BODY>
</HTML>
@@ -1,130 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Send Mails</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body class="background_main">
<H1>eMails werden verschickt</H1>
<?php
// Untis abfragen
$sql_query="SELECT id, unr, wochentag, stunde_id, ort_id, lehrfach_id, lektor_id, jahreswochen, studiengang_id, semester, verband, gruppe FROM untis WHERE checkmail='f' AND ort_id>0 AND lehrfach_id>0 AND lektor_id>0 AND studiengang_id>0 AND lehrfach NOT LIKE '\\\\_%' ORDER BY lektor";
//echo $sql_query;
$num_rows=0;
if($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Eintraege in der Tabelle Untis fuer den Stundenplan<BR><BR>Verarbeitung laeuft (0) ';
flush();
$lektor_id=0;
$text="";
$sendmail=0;
$stundenanzahl=0;
for ($i=0; $i<$num_rows; $i++)
{
if ($i%10==0)
{
echo '.';
flush();
}
$row=$db->db_fetch_object($result,$i);
if ($lektor_id!=$row->lektor_id)
{
if (($lektor_id!=0) && $sendmail)
{
$text.="\nhttp://cis.technikum-wien.at\n\nFehler und Feedback bitte an mailto:stpl@technikum-wien.at";
$sql_query="SELECT emailtw FROM lektor WHERE id=$lektor_id";
$result_sendto=$db->db_query($sql_query);
$row_sendto=$db->db_fetch_object($result_sendto,0);
$sendto=$row_sendto->emailtw;
if (!mail($sendto, "Stundenplan Aenderung ($stundenanzahl Stunden)", $text, "From: stpl@technikum-wien.at\r\n"."Reply-To: stpl@technikum-wien.at\r\n"."X-Mailer: PHP/".phpversion() ) )
die ("<BR>Mail an <b>$sendto</b> konnte nicht verschickt werden.<BR>");
echo '<BR>Mail verschickt an <b>'.$sendto.'</b><br>Verarbeitung laeuft ('.$i.') ';
flush();
$stundenanzahl=0;
$sendmail=0;
}
$lektor_id=$row->lektor_id;
$text="Dies ist eine automatische eMail!\nFolgende Aenderungen sind in ihrem Stundenplan vorgenommen worden\n\n";
$text.="Datum\t\tStunde\tVerband\n";
}
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="SELECT * FROM stundenplan WHERE studiengang_id=$row->studiengang_id AND semester=$row->semester AND ";
$sql_query.="verband='$row->verband' AND gruppe='$row->gruppe' AND ort_id=$row->ort_id AND datum='$date' AND ";
$sql_query.="stunde_id=$row->stunde_id AND lehrfach_id=$row->lehrfach_id AND lektor_id=$row->lektor_id";
$num_checkmail=0;
if ($result_checkmail=$db->db_query($sql_query))
$num_checkmail=$db->db_num_rows($result_checkmail);
if ($num_checkmail==0)
{
$text.="$date\t$row->stunde_id\t$row->semester$row->verband$row->gruppe\r\n";
$stundenanzahl++;
$sendmail=1;
}
}
}
$sql_query="UPDATE untis SET checkmail='t' WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
if ($sendmail)
{
$text.="\nhttp://cis.technikum-wien.at\n\nFehler und Feedback bitte an mailto:stpl@technikum-wien.at";
$sql_query="SELECT emailtw FROM lektor WHERE id=$lektor_id";
$result_sendto=$db->db_query($sql_query);
$row_sendto=$db->db_fetch_object($result_sendto,0);
$sendto=$row_sendto->emailtw;
$sendto=$row_sendto->emailtw;
if (!mail($sendto, "Stundenplan Aenderung ($stundenanzahl Stunden)", $text, "From: stpl@technikum-wien.at\r\n"."Reply-To: stpl@technikum-wien.at\r\n"."X-Mailer: PHP/".phpversion() ) )
die ("<BR>Mail an <b>$sendto</b> konnte nicht verschickt werden.");
echo 'Mail verschickt an <b>'.$sendto.'</b><br>';
}
echo '<BR>Verarbeitung erfolgreich abgeschlossen!';
?>
</body>
</html>
@@ -1,83 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Check ID</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</head>
<body class="background_main">
<H1>Stundenplan wird übertragen</H1>
<?php
// Studiengänge abfragen
$sql_query="SELECT id, unr, wochentag, stunde, ort_kurzbz, lehrfach_nr, lektor_uid, jahreswochen, studiengang_kz, semester, verband, gruppe FROM untis
WHERE ort_kurzbz IS NOT NULL AND lehrfach_nr>0 AND lektor_uid IS NOT NULL AND studiengang_kz IS NOT NULL AND lehrfach NOT LIKE '\\\\_%'";
//echo $sql_query;
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Rows will be moved<BR>';
flush();
for ($i=0; $i<$num_rows; $i++)
{
if (($i%50)==0)
echo '<BR>'.$i;
echo '.';
flush();
$row=$db->db_fetch_object($result,$i);
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="INSERT INTO tbl_stundenplan (unr, studiengang_kz, semester, verband, gruppe, ort_kurzbz, datum, stunde, lehrfach_nr, uid)
VALUES ('$row->unr',$row->studiengang_kz,$row->semester,'$row->verband','$row->gruppe', '$row->ort_kurzbz', '$date', $row->stunde, $row->lehrfach_nr, '$row->lektor_uid')";
$result_insert=$db->db_query($sql_query);
}
}
$sql_query="DELETE FROM untis WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
?>
<BR>Finished!
</body>
</html>
@@ -1,81 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Check ID</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</head>
<body class="background_main">
<H1>Einheitenplan wird übertragen</H1>
<?php
// Studiengänge abfragen
$sql_query="SELECT id, unr, wochentag, stunde, ort_kurzbz, lehrfach_nr, lektor_uid, einheit_kurzbz, studiengang_kz, semester, jahreswochen FROM untis
WHERE ort_kurzbz IS NOT NULL AND lehrfach_nr IS NOT NULL AND lektor_uid IS NOT NULL AND studiengang_kz IS NOT NULL AND semester IS NOT NULL AND lehrfach LIKE '\\\\_%'";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Rows will be moved<BR>';
flush();
for ($i=0; $i<$num_rows; $i++)
{
if (($i%50)==0)
echo '<BR>'.$i;
echo '.';
flush();
$row=$db->db_fetch_object($result,$i);
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="INSERT INTO tbl_stundenplan (unr, ort_kurzbz, datum, stunde, lehrfach_nr, einheit_kurzbz, uid, studiengang_kz, semester, verband, gruppe) VALUES
('$row->unr', '$row->ort_kurzbz', '$date', $row->stunde, $row->lehrfach_nr,'$row->einheit_kurzbz','$row->lektor_uid',$row->studiengang_kz,$row->semester,NULL,NULL)";
$result_insert=$db->db_query($sql_query);
}
}
$sql_query="DELETE FROM untis WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
?>
<BR>Finished!
</body>
</html>
-46
View File
@@ -1,46 +0,0 @@
<?php
$week_date[36]=mktime(0,0,0,9,1,2003);
$week_date[37]=mktime(0,0,0,9,8,2003);
$week_date[38]=mktime(0,0,0,9,15,2003);
$week_date[39]=mktime(0,0,0,9,22,2003);
$week_date[40]=mktime(0,0,0,9,29,2003);
$week_date[41]=mktime(0,0,0,10,6,2003);
$week_date[42]=mktime(0,0,0,10,13,2003);
$week_date[43]=mktime(0,0,0,10,20,2003);
$week_date[44]=mktime(0,0,0,10,27,2003);
$week_date[45]=mktime(0,0,0,11,3,2003);
$week_date[46]=mktime(0,0,0,11,10,2003);
$week_date[47]=mktime(0,0,0,11,17,2003);
$week_date[48]=mktime(0,0,0,11,24,2003);
$week_date[49]=mktime(0,0,0,12,1,2003);
$week_date[50]=mktime(0,0,0,12,8,2003);
$week_date[51]=mktime(0,0,0,12,15,2003);
$week_date[52]=mktime(0,0,0,12,22,2003);
$week_date[1]=mktime(0,0,0,1,3,2005);
$week_date[2]=mktime(0,0,0,1,10,2005);
$week_date[3]=mktime(0,0,0,1,17,2005);
$week_date[4]=mktime(0,0,0,1,24,2005);
$week_date[5]=mktime(0,0,0,1,31,2005);
$week_date[6]=mktime(0,0,0,2,7,2005);
$week_date[7]=mktime(0,0,0,2,14,2005);
$week_date[8]=mktime(0,0,0,2,21,2005);
$week_date[9]=mktime(0,0,0,2,28,2005);
$week_date[10]=mktime(0,0,0,3,7,2005);
$week_date[11]=mktime(0,0,0,3,14,2005);
$week_date[12]=mktime(0,0,0,3,21,2005);
$week_date[13]=mktime(0,0,0,3,28,2005);
$week_date[14]=mktime(0,0,0,4,4,2005);
$week_date[15]=mktime(0,0,0,4,11,2005);
$week_date[16]=mktime(0,0,0,4,18,2005);
$week_date[17]=mktime(0,0,0,4,25,2005);
$week_date[18]=mktime(0,0,0,5,2,2005);
$week_date[19]=mktime(0,0,0,5,9,2005);
$week_date[20]=mktime(0,0,0,5,16,2005);
$week_date[21]=mktime(0,0,0,5,23,2005);
$week_date[22]=mktime(0,0,0,5,30,2005);
$week_date[23]=mktime(0,0,0,6,6,2005);
$week_date[24]=mktime(0,0,0,6,13,2005);
$week_date[25]=mktime(0,0,0,6,20,2005);
$week_date[26]=mktime(0,0,0,6,27,2005);
$week_date[27]=mktime(0,0,0,7,4,2005);
?>