diff --git a/cis/reihung/insertantwort.php b/cis/reihung/insertantwort.php index e27d71271..f6cbe21dd 100644 --- a/cis/reihung/insertantwort.php +++ b/cis/reihung/insertantwort.php @@ -6,13 +6,13 @@ } mysql_select_db($dbname); - $query = "insert into rt_antwort(gruppe, pruefling, nummer, antwort, ) "; - $query .= "values ($gruppe, $pruefling, $nummer, '$antwort'; + $query = "insert into rt_antwort (gruppe, pruefling, nummer, antwort) "; + $query.= "values ($gruppe, $pruefling, $nummer, '$antwort')"; $result = mysql_query($query, $dbh); $id = mysql_insert_id($dbh); - echo "$id"; + echo $id; mysql_close($dbh); ?> diff --git a/content/lvplanung/nextUNR.php b/content/lvplanung/nextUNR.php index a2358a062..77b0cec13 100644 --- a/content/lvplanung/nextUNR.php +++ b/content/lvplanung/nextUNR.php @@ -6,30 +6,21 @@ include('../../vilesci/config.inc.php'); -$conn = pg_pconnect(CONN_STRING)) -if ($conn) { - $sql="select max(unr) as max_unr from tbl_lehrveranstaltung"; - - - -if(!($erg=pg_exec($conn, $sql_query))) { - $this->errormsg=pg_errormessage($conn); - return false; - } - $num_rows=pg_numrows($erg); - $result=array(); - for($i=0;$i<$num_rows;$i++) - { - $row=pg_fetch_object($erg,$i); - - - - - - -} else { - echo 'no connection'; +$conn = pg_pconnect(CONN_STRING); +if (!$conn) + die('no connection'); + +$sql="select max(unr) as max_unr from tbl_lehrveranstaltung"; +if(!($erg=pg_exec($conn, $sql_query))) +{ + $this->errormsg=pg_errormessage($conn); + return false; } - +$num_rows=pg_numrows($erg); +$result=array(); +for($i=0;$i<$num_rows;$i++) +{ + $row=pg_fetch_object($erg,$i); +} ?> diff --git a/include/functions.inc.php b/include/functions.inc.php index 2f791fc1b..e4036c95d 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -109,23 +109,24 @@ function jump_week($datum, $wochen) } function jahreskalenderjump($link) -{ +{ + $crlf=crlf(); $datum=mktime(); $woche=kalenderwoche($datum); $datum=montag($datum); - echo '
Jump to KW
'; + echo '
Jump to KW
'.$crlf; for ($anz=1;$anz<26;$anz++) { $linknew=$link.'&datum='.$datum; if ($woche==53) $woche=1; - echo ' '.$woche.' '; + echo ' '.$woche.''.$crlf; if ($anz%5==0) - echo '
'; + echo '
'.$crlf; $datum+=60*60*24*7; $woche++; } - echo '
'; + echo '
'.$crlf; } function loadVariables($conn, $user) diff --git a/include/globals.inc.php b/include/globals.inc.php index 95a342541..6508fa210 100644 --- a/include/globals.inc.php +++ b/include/globals.inc.php @@ -1,8 +1,8 @@ '; - echo ''; - echo '

'; + echo ''.$this->crlf; + echo ' '.$this->crlf; + echo ' '; + echo '        Kalender:    '.$this->crlf; + echo ' '.$this->studiensemester_now->name.' '.$this->crlf; + echo ' HTML'.$this->crlf; + echo ' CSV'.$this->crlf; + echo ' CSV-Outlook'.$this->crlf; + echo ' vCal Version 1.0'.$this->crlf; + echo ' vCal Version 2.0'.$this->crlf; + echo '     '.$this->studiensemester_next->name.' '.$this->crlf; + echo ' HTML'.$this->crlf; + echo ' CSV'.$this->crlf; + echo ' CSV-Outlook'.$this->crlf; + echo ' iCal Version 1.0'.$this->crlf; + echo ' iCal Version 2.0'.$this->crlf; + echo ' '.$this->crlf; + echo ' '.$this->crlf; // Kalenderjump - echo ''; - echo ''; - echo '
'.$this->crlf; + echo '

'; if ($this->type=='student' || $this->type=='lektor') echo 'Person: '.$this->pers_titelpre.' '.$this->pers_vorname.' '.$this->pers_nachname.' - '.$this->pers_uid.'
'; if ($this->type=='student' || $this->type=='verband') @@ -346,44 +347,36 @@ class wochenplan } if ($this->type=='ort') echo 'Ort: '.$this->ort_kurzbz.' - '.$this->ort_bezeichnung.'
'; - echo '

'; + echo '

'.$this->crlf; + echo '
'.$this->crlf; //Kalender $this->kal_link.='&pers_uid='.$this->pers_uid.'&ort_kurzbz='.$this->ort_kurzbz.'&stg_kz='.$this->stg_kz.'&sem='.$this->sem.'&ver='.$this->ver.'&grp='.$this->grp.'&gruppe_kurzbz='.$this->gruppe_kurzbz; //global $kalender_begin_ws, $kalender_ende_ws, $kalender_begin_ss, $kalender_ende_ss; $kal_link_ws=$this->kal_link.'&begin='.$this->studiensemester_now->start.'&ende='.$this->studiensemester_now->ende; $kal_link_ss=$this->kal_link.'&begin='.$this->studiensemester_next->start.'&ende='.$this->studiensemester_next->ende; - echo '       Kalender:    '; - echo ''.$this->studiensemester_now->name.' '; - echo ' - HTML'; - echo ' - CSV'; - echo ' - CSV-Outlook'; - echo ' - vCal Version 1.0'; - echo ' - vCal Version 2.0'; - echo '    '.$this->studiensemester_next->name.' '; - echo ' - HTML'; - echo ' - CSV'; - echo ' - CSV-Outlook'; - echo ' - iCal Version 1.0'; - echo ' - iCal Version 2.0'; - echo '
'; + echo ' '.$this->crlf; jahreskalenderjump($this->link); - echo '


'; + echo ' '.$this->crlf; + echo ' '.$this->crlf; + echo '
'.$this->crlf.$this->crlf; // Jump Wochenweise if ($this->type=='verband') @@ -410,39 +403,39 @@ class wochenplan $next_ort=pg_fetch_object($result_ort,$i); // Ort Jump - echo '

'; + echo ''.$this->crlf; + echo '

'.$this->crlf; //$datum=mktime($this->datum[hours], $this->datum[minutes], $this->datum[seconds], $this->datum[mon], $this->datum[mday], $this->datum[year]); if (isset($prev_ort)) { - echo ''; + echo ' '.$this->crlf; + echo ' '.$this->crlf; + echo ' '.$this->crlf; } - echo "".$this->crlf; for ($i=0;$i<$num_rows_ort;$i++) { $row=pg_fetch_object ($result_ort, $i); - echo '"; + echo ">$row->ort_kurzbz".$this->crlf; } - echo ''; + echo ' '.$this->crlf; if (isset($next_ort)) { - echo ''; + echo ' '.$this->crlf; + echo ' '.$this->crlf; + echo ' '.$this->crlf; } - echo '

'; + echo '

'; $link_parameter='&ort_kurzbz='.$this->ort_kurzbz; } - echo '

'; + echo '

'; // 4 Wochen zurueck - echo ''; + echo ' '.$this->crlf; + echo ' '.$this->crlf; + echo ' '; // 1 Woche zurueck echo '; + echo $erg.'
'; //echo $sql_query; }