[php] all
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- <?php
- session_start();
- //echo $USERNAME."-".$PASSWD;
- if (!$USERNAME && !$PASSWD) {
- die("Wrong Username or Password!");
- }
- //databaselogin
- require("../../../lib/fktlogin.php");
- //Schmitz
- if ($_SESSION['ORASID'] == 'MY48030') {
- if ($_SESSION["SES_BUTTONWORK"] != $_GET['BUTTONWORK']) {
- if ($_GET['BUTTONWORK'] == "ON") {
- $query = 'begin'
- . ' MYKENE.PROC$_SET_USER_WORK(1);'
- . 'end;';
- $stmt = OCIParse($con, $query);
- ociexecute($stmt);
- ocifreestatement($stmt);
- }
- elseif ($_GET['BUTTONWORK'] == "OFF") {
- $query = 'begin'
- . ' MYKENE.PROC$_SET_USER_WORK(0);'
- . 'end;';
- $stmt = OCIParse($con, $query);
- ociexecute($stmt);
- ocifreestatement($stmt);
- }
- }
- $_SESSION["SES_BUTTONWORK"] = $_GET['BUTTONWORK'];
- }
- class infocenter {
- var $weekdaynames;
- var $monthnames;
- var $defaultView;
- var $calCaption;
- var $taskCaption;
- var $infoCaption;
- var $emailCaption;
- var $resubmitCaption;
- var $morningCaption;
- var $dayCaption;
- var $eveningCaption;
- var $toCaption;
- var $timeCaption;
- var $oracleDateFormatShort;
- var $oracleTimeFormatShort;
- var $oracleDateTimeFormat;
- var $oracleDateFormat;
- var $oracleStartWeekdayAdjust;
- //Konstruktor
- function infocenter() {
- //Hier Sprachanpassungen vornehmen
- $this->weekdaynames = array('Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag');
- $this->monthnames = array('', 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember');
- $this->defaultView = $_GET['defaultView'];
- $this->calCaption = 'k a l e n d e r';
- $this->taskCaption = 'a u f g a b e n';
- $this->infoCaption = 'i n f o s';
- $this->emailCaption = 'e m a i l s';
- $this->reportCaption = 'r e p o r t';
- $this->resubmitCaption = 'w i e d e r v o r l a g e n';
- $this->morningCaption = 'Guten Morgen';
- $this->dayCaption = 'Guten Tag';
- $this->eveningCaption = 'Guten Abend';
- $this->toCaption = 'bis';
- $this->timeCaption = 'Uhr';
- $this->oracleDateTimeFormat = 'DD.MM.YYYY HH24:MI';
- $this->oracleDateFormat = 'DD.MM.YYYY';
- $this->oracleDateFormatShort = 'DD.MM.';
- $this->oracleTimeFormatShort = 'HH24:MI';
- //Für Wochenstart am Sontag auf 1 setzen
- $this->oracleStartWeekdayAdjust = 0;
- function getColor($Color) {
- $Color = Dechex($Color);
- if (!$Color)
- $Color = 'FFFFFF';
- while (strlen($Color) <= 5)
- $Color = '0' . $Color;
- $Color = $Color{4} . $Color{5} . $Color{2} . $Color{3} . $Color{0} . $Color{1};
- return $Color;
- }
- //funktion wird mit array aufgerufen, die zur ausgabe der daten von aufgaben, kalender etc. dienen
- //der inhalt des arrays wird so bearbeitet, dass keine html oder js ausgeführt wird
- function htmlOut($array) {
- foreach ($array as $key => $value) {
- $array[$key] = htmlentities($value);
- }
- return $array;
- }
- }
- function cal() {
- global $con;
- ?>
- <!-- Kalender -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href="cmd:opencalendar(-1)"><?php echo $this->calCaption; ?></a>
- </td>
- <?php
- if ($this->defaultView == 'cal') {
- ?>
- <td class="head" style="padding-right:10px;text-align:right;font:10px normal Tahoma;color: #0161A7;">
- <?php echo $this->weekdaynames[gmdate("w")] . ", " . gmdate("j.") . $this->monthnames[gmdate("g")] . " " . gmdate("Y") ?>
- </td>
- <?php
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top;">
- <div style="height:100%;padding:10px">
- <table style="width:100%">
- <?php
- $curscal = OCINewCursor($con);
- $querycal = 'begin'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, \''
- . ' select to_char(e.STARTTIME,\'\'' . $this->oracleTimeFormatShort . '\'\')||\'\' ' . $this->toCaption . ' \'\'||to_char(e.ENDTIME,\'\'' . $this->oracleTimeFormatShort . '\'\') STARTTIME,'
- . ' to_char(e.STARTTIME,\'\'' . $this->oracleDateFormatShort . '\'\') STARTDAY, to_char(e.STARTTIME,\'\'D\'\') WEEKDAY,'
- . ' e.ENTRY_ID, e.SUBJECT, trunc(e.STARTTIME)-trunc(sysdate) DAYS, e.COLOR, e.PRIORITY, e.MAN_ID, e.CUST_ID'
- . ' ,c.NAME, c.FIRSTNAME, c.COMPANY1'
- . ' from ts$_entry e, ts$_customer c'
- . ' where e.type_id=3 and entry_id in (select entry_id from ts$_entry_user where user_id='
- . $_SESSION['USERID']
- . ') and STARTTIME>=trunc(sysdate) and STARTTIME<trunc(sysdate)+5 and e.man_id=c.man_id(+) and e.cust_id=c.cust_id(+)'
- . ' group by e.STARTTIME, e.ENDTIME, e.ENTRY_ID, e.SUBJECT, e.COLOR, e.PRIORITY, e.MAN_ID, e.CUST_ID, c.NAME, c.FIRSTNAME, c.COMPANY1'
- . ' order by e.STARTTIME'
- . '\', :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmtcal = OCIParse($con, $querycal);
- OCIBindByName($stmtcal, "cursor", &$curscal, -1, OCI_B_CURSOR);
- OCIBindByName($stmtcal, "o_result", $resultcal, 32);
- OCIBindByName($stmtcal, "o_count", $countcal, 32);
- OCIBindByName($stmtcal, "o_time", $timecal, 32);
- OCIBindByName($stmtcal, "o_errormsg", $errormsgcal, 255);
- ociexecute($stmtcal);
- ociexecute($curscal);
- //echo "<tr><td>ZEIT:".$timecal."</td><td></td></tr>";
- //echo "Result:".$resultcal."-".$errormsgcal."-Anzahl:".$countcal;
- $tempday = -1;
- while (OCIFetchInto($curscal, &$datacal, OCI_ASSOC)) {
- $datacal = htmlOut($datacal);
- if ($tempday != $datacal['DAYS']) {
- if ($datacal['DAYS'] == 0)
- $header = "Heute";
- elseif ($datacal['DAYS'] == 1)
- $header = "Morgen";
- elseif ($datacal['DAYS'] == 2)
- $header = "Übermorgen";
- else
- $header = $this->weekdaynames[gmdate("w") + $datacal['DAYS']];
- $tempday = $datacal['DAYS'];
- ?>
- <tr>
- <td class="header2" colspan="2"><?php echo $header; ?></td>
- <td class="header2"><?php echo $this->weekdaynames[$datacal['WEEKDAY']] . ', ' . $datacal['STARTDAY']; ?></td>
- </tr>
- <?php
- }//else echo "<table style=\"width:100%\">";
- //list($day, $time) = explode (" ", $datacal['STARTTIME']);
- $color = getColor($datacal['COLOR']);
- ?>
- <tr>
- <td style="width:9px;">
- <?php
- if ($datacal['PRIORITY'] == 0)
- echo '<img src="images/priolow_8_12.gif">';
- elseif ($datacal['PRIORITY'] == 2)
- echo '<img src="images/priohigh_8_12.gif">';
- else
- echo '<img src="images/prionorm_8_12.gif">';
- ?>
- </td>
- <td style="width:50px">
- <a class="entrylink" style="width:100%;background-color:#<?php echo $color; ?>;padding:2px" href="cmd:opencalendar(<?php echo $datacal['ENTRY_ID'] ?>)">
- <?php echo html_entity_decode($datacal['STARTTIME']); ?>
- </a>
- </td>
- <td style="width:100%">
- <a class="entrylink" href="cmd:opencalendar(<?php echo $datacal['ENTRY_ID']; ?>);" >
- <?php
- echo $datacal['SUBJECT'];
- if ($datacal['CUST_ID'] > 0)
- echo "<br>" . $datacal['NAME'] . ", " . $datacal['FIRSTNAME'] . " (" . $datacal['COMPANY1'] . ")";
- ?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- </td>
- </tr>
- <?php
- }
- function info() {
- global $con;
- ?>
- <!-- Infos -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href="cmd:openinfo(-1)"><?php echo $this->infoCaption; ?></a>
- </td>
- <?php
- if ($this->defaultView == 'info') {
- ?>
- <td class="head" style="padding-right:10px;text-align:right;font:10px normal Tahoma;color: #0161A7;">
- <?php echo $this->weekdaynames[gmdate("w")] . ", " . gmdate("j.") . $this->monthnames[gmdate("g")] . " " . gmdate("Y"); ?>
- </td>
- <?php
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top;">
- <div style="height:100%;padding:10px">
- <table style="width:100%">
- <?php
- $cursinfo = OCINewCursor($con);
- /* $queryinfo='begin'
- .' :o_result:=PK$_TOOLS.get_sql(:cursor, \'select ENTRY_ID, SUBJECT, COLOR, PRIORITY from ts$_entry where type_id=1 and entry_id in (select entry_id from ts$_entry_user where user_id='
- .$_SESSION['USERID']
- .') and sysdate>=starttime and sysdate<endtime\', :o_count, :o_time, :o_errormsg);'
- .'end;'; */
- $queryinfo = 'begin'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, \''
- . ' select e.ENTRY_ID, e.SUBJECT, e.COLOR, e.PRIORITY, e.MAN_ID, e.CUST_ID, c.NAME, c.FIRSTNAME, c.COMPANY1'
- . ' from ts$_entry e, ts$_customer c'
- . ' where e.type_id=1 and entry_id in (select entry_id from ts$_entry_user where user_id='
- . $_SESSION['USERID']
- . ') and sysdate>=starttime and sysdate<endtime and e.man_id=c.man_id(+) and e.cust_id=c.cust_id(+)'
- . '\', :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmtinfo = OCIParse($con, $queryinfo);
- OCIBindByName($stmtinfo, "cursor", &$cursinfo, -1, OCI_B_CURSOR);
- OCIBindByName($stmtinfo, "o_result", $resultinfo, 32);
- OCIBindByName($stmtinfo, "o_count", $countinfo, 32);
- OCIBindByName($stmtinfo, "o_time", $timeinfo, 32);
- OCIBindByName($stmtinfo, "o_errormsg", $errormsginfo, 255);
- ociexecute($stmtinfo);
- ociexecute($cursinfo);
- //echo "<tr><td>ZEIT:".$timeinfo."</td><td></td></tr>";
- //echo "Result:".$resultinfo."-".$errormsginfo."-Anzahl:".$countinfo;
- while (OCIFetchInto($cursinfo, &$datainfo, OCI_ASSOC)) {
- $cursinfo = htmlOut($cursinfo);
- $color = getColor($datainfo['COLOR']);
- ?>
- <tr>
- <td style="width:9px;">
- <?php
- if ($datainfo['PRIORITY'] == 0)
- echo '<img src="images/priolow_8_12.gif">';
- elseif ($datainfo['PRIORITY'] == 2)
- echo '<img src="images/priohigh_8_12.gif">';
- else
- echo '<img src="images/prionorm_8_12.gif">';
- ?>
- </td>
- <td>
- <a class="entrylink" style="background-color:#<?php echo $color; ?>;padding:2px" href="cmd:openinfo(<?php echo $datainfo['ENTRY_ID']; ?>)" >
- <?php
- echo $datainfo['SUBJECT'];
- if ($datainfo['CUST_ID'] > 0)
- echo "<br>" . $datainfo['NAME'] . ", " . $datainfo['FIRSTNAME'] . " (" . $datainfo['COMPANY1'] . ")";
- ?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- </td>
- </tr>
- <?php
- }
- function task() {
- global $con;
- ?>
- <!-- Aufgaben -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href="cmd:opentask(-1)"><?php echo $this->taskCaption; ?></a>
- </td>
- <?php
- if ($this->defaultView == 'task') {
- ?>
- <td class="head" style="padding-right:10px;text-align:right;font:10px normal Tahoma;color: #0161A7;">
- <?php
- echo $this->weekdaynames[gmdate("w")] . ", " . gmdate("j.") . $this->monthnames[gmdate("g")] . " " . gmdate("Y");
- ?>
- </td>
- <?php
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top;">
- <div style="height:100%;padding:10px">
- <table style="width:100%" cellspacing="5">
- <?php
- $curstask = OCINewCursor($con);
- /* $querytask='begin'
- .' :o_result:=PK$_TOOLS.get_sql(:cursor, \'select e.ENDTIME, e.ENTRY_ID, e.SUBJECT, e.COLOR, e.PRIORITY from ts$_entry e, ts$_entry_status s where e.type_id=2 and entry_id in (select entry_id from ts$_entry_user where user_id='
- .$_SESSION['USERID']
- .') and e.status_id=s.status_id(+) and (s.s_type<4 or s.s_type is null) group by ENDTIME, ENTRY_ID, SUBJECT, COLOR, PRIORITY order by ENDTIME\', :o_count, :o_time, :o_errormsg);'
- .'end;'; */
- $querytask = 'begin'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, \''
- . ' select e.ENDTIME, e.ENTRY_ID, e.SUBJECT, e.COLOR, e.PRIORITY, e.MAN_ID, e.CUST_ID, c.NAME, c.FIRSTNAME, c.COMPANY1, e.LOCATION, c.CUST_EXT_ID, rownum '
- . ' from ts$_entry e, ts$_entry_status s, ts$_customer c'
- . ' where e.type_id=2 and rownum < 51 and entry_id in (select entry_id from ts$_entry_user where user_id='
- . $_SESSION['USERID']
- . ') and e.status_id=s.status_id(+) and (s.s_type<4 or s.s_type is null) and e.man_id=c.man_id(+) and e.cust_id=c.cust_id(+)'
- . ' group by e.ENDTIME, e.ENTRY_ID, e.SUBJECT, e.COLOR, e.PRIORITY, e.MAN_ID, e.CUST_ID, c.NAME, c.FIRSTNAME, c.COMPANY1, e.LOCATION, c.CUST_EXT_ID, rownum'
- . '\', :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmttask = OCIParse($con, $querytask);
- OCIBindByName($stmttask, "cursor", &$curstask, -1, OCI_B_CURSOR);
- OCIBindByName($stmttask, "o_result", $resulttask, 32);
- OCIBindByName($stmttask, "o_count", $counttask, 32);
- OCIBindByName($stmttask, "o_time", $timetask, 32);
- OCIBindByName($stmttask, "o_errormsg", $errormsgtask, 255);
- ociexecute($stmttask);
- ociexecute($curstask);
- //echo "<tr><td>ZEIT:".$timetask."</td><td></td></tr>";
- //echo "Result:".$resulttask."-".$errormsgtask."-Anzahl:".$counttask;
- while (OCIFetchInto($curstask, &$datatask, OCI_ASSOC)) {
- $color = getColor($datatask['COLOR']);
- $datatask = htmlOut($datatask);
- ?>
- <tr>
- <td style="width:9px;">
- <?php
- if ($datatask['PRIORITY'] == 0)
- echo '<img src="images/priolow_8_12.gif">';
- elseif ($datatask['PRIORITY'] == 2)
- echo '<img src="images/priohigh_8_12.gif">';
- else
- echo '<img src="images/prionorm_8_12.gif">';
- ?>
- </td>
- <td style="width:50px">
- <a class="entrylink" style="background-color:#<?php echo $color; ?>;" href="cmd:opentask(<?php echo $datatask['ENTRY_ID']; ?>);">
- <?php
- echo $this->toCaption . ' ' . str_replace(' ', ' ', substr($datatask['ENDTIME'], 0, 16)) . ' ' . $this->timeCaption;
- ?>
- </a>
- </td>
- <td>
- <a class="entrylink" href="cmd:opentask(<?php echo $datatask['ENTRY_ID']; ?>);" >
- <?php
- echo $datatask['SUBJECT'];
- if ($datatask['CUST_ID'] > 0)
- echo "<br /> - " . $datatask['NAME'] . ", " . $datatask['FIRSTNAME'] . " (" . $datatask['COMPANY1'] . ")";
- //GRAVIS
- if ($_SESSION['ORA_SID'] == "MY10013" && (strlen($datatask['LOCATION']) > 0 || strlen($datatask['CUST_EXT_ID']) > 0)) {
- echo "<br />";
- if (strlen($datatask['LOCATION']) > 0)
- echo " - GUPPY: " . $datatask['LOCATION'];
- if (strlen($datatask['CUST_EXT_ID']) > 0)
- echo " - B2: " . $datatask['CUST_EXT_ID'];
- }
- ?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- </td>
- </tr>
- <?php
- }
- function email() {
- global $con;
- ?>
- <!-- Email -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href="cmd:openemail(-1)"><?php echo $this->emailCaption; ?></a>
- </td>
- <?php
- if ($this->defaultView == 'email') {
- ?>
- <td class="head" style="padding-right:10px;text-align:right;font:10px normal Tahoma;color: #0161A7;">
- <?php
- echo $this->weekdaynames[gmdate("w")] . ", " . gmdate("j.") . $this->monthnames[gmdate("g")] . " " . gmdate("Y");
- ?>
- </td>
- <?php
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top;">
- <div style="height:100%;padding:10px">
- <table style="width:100%">
- <?php
- $cursemail = OCINewCursor($con);
- $queryemail = 'begin'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, \'select m.MAIL_ID, m.PRIORITY, m.CREATEDATE, m.SUBJECT, m.MAN_ID, m.CUST_ID'
- . ' , c.NAME, c.FIRSTNAME, c.COMPANY1'
- . ' from ts$_mail_in m, ts$_customer c'
- . ' where m.user_id='
- . $_SESSION['USERID']
- . 'and m.ready=0 and m.man_id=c.man_id(+) and m.cust_id=c.cust_id(+)'
- . ' order by mail_id DESC\', :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmtemail = OCIParse($con, $queryemail);
- OCIBindByName($stmtemail, "cursor", &$cursemail, -1, OCI_B_CURSOR);
- OCIBindByName($stmtemail, "o_result", $resultemail, 32);
- OCIBindByName($stmtemail, "o_count", $countemail, 32);
- OCIBindByName($stmtemail, "o_time", $timeemail, 32);
- OCIBindByName($stmtemail, "o_errormsg", $errormsgemail, 255);
- ociexecute($stmtemail);
- ociexecute($cursemail);
- //echo "<tr><td>ZEIT:".$timeemail."</td><td></td></tr>";
- //echo "Result:".$resultemail."-".$errormsgemail."-Anzahl:".$countemail;
- while (OCIFetchInto($cursemail, &$dataemail, OCI_ASSOC)) {
- ?>
- <tr>
- <td style="width:9px;"> </td>
- <td style="width:50px">
- <a class="entrylink" style="" > </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- </td>
- </tr>
- <?php
- }
- /* REPORT-Anzeige erstellen */
- function report() {
- global $con;
- global $repID;
- ?>
- <!-- report -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href=""><?php echo $this->reportCaption; ?></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="height:18px;">
- <?php
- $sql='begin :o_result:=PK$_DM_REPORTING.get_tempid_queryid(:i_rep_id,:o_tempid, :o_queryid); end;';
- $stmt1=OCIParse($con, $sql);
- OCIBindByName($stmt1, "o_result", $o_result, 32);
- OCIBindByName($stmt1, "i_rep_id", $repID, 32);
- OCIBindByName($stmt1, "o_tempid", $my_temp_id, 32);
- OCIBindByName($stmt1, "o_queryid", $my_query_id, 32);
- OCIExecute($stmt1);
- OCIFreeStatement($stmt1);
- $query = 'Select PK$_DM_REPORTING.get_rep_render_chart(:p_temp_id,:p_query_id) Data from dual';
- $stmt = OCIParse($con, $query);
- ocibindbyname($stmt, ':p_temp_id', $my_temp_id);
- ocibindbyname($stmt, ':p_query_id', $my_query_id);
- OCIExecute($stmt);
- echo $repID , chr(10);
- echo $my_query_id;
- while (OCIFetchInto($stmt, &$data, OCI_ASSOC)) {
- echo $data['DATA']->load();
- }
- OCIFreeStatement($stmt);
- ?>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <?php
- }
- function resubmit() {
- global $con;
- ?>
- <!-- Wiedervorlagen -->
- <tr>
- <td style="height:18px;">
- <table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:18px">
- <tr>
- <td class="head" nowrap>
- <a class="biglink" href="cmd:openresubmit(-1)"><?php echo $this->resubmitCaption; ?></a>
- </td>
- <?php
- if ($this->defaultView == 'resubmit') {
- ?>
- <td class="head" style="padding-right:10px;text-align:right;font:10px normal Tahoma;color: #0161A7;">
- <?php
- echo $this->weekdaynames[gmdate("w")] . ", " . gmdate("j.") . $this->monthnames[gmdate("g")] . " " . gmdate("Y")
- ?>
- </td>
- <?php
- }
- ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="vertical-align:top;">
- <div style="height:100%;padding:10px">
- <table style="width:100%">
- <?php
- $cursresubmit = OCINewCursor($con);
- $queryresubmit = 'begin'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, \'select ENTRY_ID, SUBJECT, COLOR, PRIORITY from ts$_entry where type_id=5 and entry_id in (select entry_id from ts$_entry_user where user_id='
- . $_SESSION['USERID']
- . ')\', :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmtresubmit = OCIParse($con, $queryresubmit);
- OCIBindByName($stmtresubmit, "cursor", &$cursresubmit, -1, OCI_B_CURSOR);
- OCIBindByName($stmtresubmit, "o_result", $resultresubmit, 32);
- OCIBindByName($stmtresubmit, "o_count", $countresubmit, 32);
- OCIBindByName($stmtresubmit, "o_time", $timeresubmit, 32);
- OCIBindByName($stmtresubmit, "o_errormsg", $errormsgresubmit, 255);
- ociexecute($stmtresubmit);
- ociexecute($cursresubmit);
- //echo "<tr><td>ZEIT:".$timeresubmit."</td><td></td></tr>";
- //echo "Result:".$resultresubmit."-".$errormsgresubmit."-Anzahl:".$countresubmit;
- while (OCIFetchInto($cursresubmit, &$dataresubmit, OCI_ASSOC)) {
- $dataresubmit = htmlOut($dataresubmit);
- $color = getColor($dataresubmit['COLOR']);
- ?>
- <tr>
- <td style="width:9px;">
- <?php
- if ($dataresubmit['PRIORITY'] == 0)
- echo '<img src="images/priolow_8_12.gif">';
- elseif ($dataresubmit['PRIORITY'] == 2)
- echo '<img src="images/priohigh_8_12.gif">';
- else
- echo '<img src="images/prionorm_8_12.gif">';
- ?>
- </td>
- <td>
- <a class="entrylink" href="cmd:openresubmit(<?php echo $dataresubmit['ENTRY_ID'] ?>);" ><?php echo $dataresubmit['SUBJECT'] ?></a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- </td>
- </tr>
- <?php
- }
- }
- $classAll = new infocenter();
- //DD.MM.YYYY HH24:MI:SS
- $stmt = ociparse($con, "ALTER SESSION SET NLS_DATE_FORMAT = '" . $classAll->oracleDateTimeFormat . "'");
- ociexecute($stmt);
- ocifreestatement($stmt);
- $curs = OCINewCursor($con);
- $query = 'declare'
- . ' i_sql varchar2(2000);'
- . 'begin'
- . ' i_sql:=\'select * from ts$_entry_conf where conf_id=(select conf_id from ts$_entry_conf_profile where conf_active=1) and visible=1 and access_all=1 and (type_id between 1 and 4 or type_id = 8) order by sort_order\';'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, i_sql, :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmt = OCIParse($con, $query);
- OCIBindByName($stmt, "cursor", &$curs, -1, OCI_B_CURSOR);
- OCIBindByName($stmt, "o_result", $result, 32);
- OCIBindByName($stmt, "o_count", $count, 32);
- OCIBindByName($stmt, "o_time", $time, 32);
- OCIBindByName($stmt, "o_errormsg", $errormsg, 255);
- ociexecute($stmt);
- ociexecute($curs);
- $view = array();
- $i = 0;
- while (OCIFetchInto($curs, &$data, OCI_ASSOC)) {
- $view[$i] = $data['TYPE_ID'];
- $i++;
- if($data['TYPE_ID']==8){
- $repID=$data['FILEPATH'];
- }
- }
- ocifreestatement($stmt);
- ocifreecursor($curs);
- /* Prüfen, ob User in der Abbvie-Gruppe ist */
- $isAbbvieGroup = false;
- $curs_group = OCINewCursor($con);
- $query_group='begin'
- .' :o_result:=PK$_TOOLS.get_sql(:cursor, \'select count(*) COUNT from ts$_user_group where group_id in (164) and user_id = ' . $_SESSION['USERID'] . '\', :o_count, :o_time, :o_errormsg); '
- .'end;';
- $stmt_group = OCIParse($con,$query_group);
- OCIBindByName($stmt_group,"cursor",&$curs_group,-1,OCI_B_CURSOR);
- OCIBindByName($stmt_group,"o_result",$result,32);
- OCIBindByName($stmt_group,"o_count",$count,32);
- OCIBindByName($stmt_group,"o_time",$time,32);
- OCIBindByName($stmt_group,"o_errormsg",$errormsg,255);
- ociexecute($stmt_group);
- ociexecute($curs_group);
- OCIFetchInto($curs_group,&$data,OCI_ASSOC);
- if ($data['COUNT'] > 0) {
- $isAbbvieGroup = true;
- }
- OCIFreeStatement($stmt_group);
- OCIFreeCursor($curs_group);
- //$curs = OCINewCursor($con);
- /*
- $query = 'declare'
- . ' i_sql varchar2(2000);'
- . 'begin'
- . ' i_sql:=\'select count(*) COUNT from ts$_user_group where group_id in (164) and user_id = (Select user_id from Ts$_User where user_dbname=\''
- . $_SESSION['USERNAME']
- . '\')\';'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, i_sql, :o_count, :o_time, :o_errormsg);'
- . 'end;';
- echo $querey
- $stmt = OCIParse($con, $query);
- OCIBindByName($stmt, "cursor", &$curs, -1, OCI_B_CURSOR);
- OCIBindByName($stmt, "o_result", $result, 32);
- OCIBindByName($stmt, "o_count", $count, 32);
- OCIBindByName($stmt, "o_time", $time, 32);
- OCIBindByName($stmt, "o_errormsg", $errormsg, 255);
- ociexecute($stmt);
- ociexecute($curs);
- OCIFetchInto($curs, &$data, OCI_ASSOC);
- if ($data['COUNT'] > 0) {
- $isAbbvieGroup = true;
- }
- ocifreestatement($stmt);
- ocifreecursor($curs);*/
- /* if(!$defaultView)
- {
- $defaultView='cal';
- $infopos=1;
- $taskpos=2;
- $calpos=3;
- $emailpos=4;
- $resubmitpos=5;
- } */
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html style="height:100%; margin:1px;">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <META HTTP-EQUIV="No Cache" CONTENT="no-cache">
- <?php /* <LINK rel="stylesheet" type="text/css" href="/lib/common.css">
- <LINK rel="stylesheet" type="text/css" href="lib/toc.css">
- */ ?>
- <LINK rel="stylesheet" type="text/css" href="css/infocenterStyle.css">
- <title>Portal</title>
- <!-- <meta http-equiv="refresh" content="20; URL=<?php echo stripslashes($REQUEST_URI); ?>"> -->
- <script type="text/javascript" language="javascript">
- function showTabAnruf() {
- if ($("#tabAnruf").is(":visible") === false) {
- $("#tabAnruf").show();
- }
- else {
- $("#tabAnruf").hide();
- }
- }
- function showTabTermin1() {
- if ($("#tabTermin1").is(":visible") === false) {
- $("#tabTermin1").show();
- }
- else {
- $("#tabTermin1").hide();
- }
- }
- function showTabTermin2() {
- if ($("#tabTermin2").is(":visible") === false) {
- $("#tabTermin2").show();
- }
- else {
- $("#tabTermin2").hide();
- }
- }
- function setDivHeight() {
- var h = window.innerHeight
- || document.documentElement.clientHeight
- || document.body.clientHeight;
- document.getElementById("globalDiv").style.height = h + "px";
- }
- function setDivWidth() {
- var w = window.innerWidth
- || document.documentElement.clientWidth
- || document.body.clientWidth;
- document.getElementById("globalInnerDiv").style.width = (w-16) + "px";
- }
- <!--
- //window.setInterval("refresh()",120000);function refresh(){location.reload();}
- //-->
- </script>
- </head>
- <body onresize="setDivHeight();setDivWidth();" onload="setDivHeight();setDivWidth();">
- <div id="globalDiv" style="overflow-y: auto; overflow-x: hidden;">
- <div id="globalInnerDiv" style="height:100%;width:100%;">
- <table style="width:100%;" cellpadding="0" cellspacing="0">
- <tr>
- <?php /* <td colspan=2>
- <table style="width:100%;" cellpadding="0" cellspacing="0">
- <tr>
- <!-- <a href="http://io.mycom-net.com:7779/1031/portal/mod_id1/tagesAus/index.php?PHPSESSID=<?php $session = session_id(); echo $session; ?>">Neue Tagesübersicht</a> --> */ ?>
- <?php
- //Begruessung erstellen________________________________________________________________________________________________
- $query = 'begin :result := pk$_entry.get_welcome(i_userid => :i_userid, o_time => :o_time, o_errormsg => :o_errormsg); end;';
- $stmt = oci_parse($con, $query);
- OCI_Bind_By_Name($stmt, "result", $adress, 100);
- OCI_Bind_By_Name($stmt, "i_userid", $_SESSION['USERID'], 32);
- OCI_Bind_By_Name($stmt, "o_time", $time, 32);
- OCI_Bind_By_Name($stmt, "o_errormsg", $errormsg, 255);
- oci_execute($stmt);
- $hour = date(G);
- if ($hour >= 0 && $hour < 10) {//wenn Uhrzeit zwischen 0 und 10 dann "Guten Morgen"
- $data['WELCOME'] = $classAll->morningCaption . $adress;
- }
- if ($hour >= 17 && $hour <= 23) {
- $data['WELCOME'] = $classAll->eveningCaption . $adress;
- } else {
- $data['WELCOME'] = $classAll->dayCaption . ' ' . $adress;
- }
- $welcome = $data['WELCOME'] . ' - ' . $classAll->weekdaynames[date(N) - 1] . ', ' . date(d) . '.' . date(m) . '.' . date(y);
- oci_free_statement($stmt);
- //Schmitz________________________________________________________________________________________________________
- if ($_SESSION['ORASID'] == 'MY48030') {
- ?>
- <td style="background-color:#666F74; color:#FFFFFF; font:normal 14pt Arial; padding-left:10px">
- <?php
- echo $welcome . "</td><td style=\"width:200px;background-color:#666F74;text-align:center;vertical-align:middle;padding:5px\">";
- //MY48030
- $curs = OCINewCursor($con);
- $query = 'declare'
- . ' i_sql varchar2(2000);'
- . 'begin'
- . ' i_sql:=\'select count(*) COUNT from ts$_user_status_work where user_dbname=\''
- . $_SESSION['USERNAME']
- . '\' and endtime is null\';'
- . ' :o_result:=PK$_TOOLS.get_sql(:cursor, i_sql, :o_count, :o_time, :o_errormsg);'
- . 'end;';
- $stmt = OCIParse($con, $query);
- OCIBindByName($stmt, "cursor", &$curs, -1, OCI_B_CURSOR);
- OCIBindByName($stmt, "o_result", $result, 32);
- OCIBindByName($stmt, "o_count", $count, 32);
- OCIBindByName($stmt, "o_time", $time, 32);
- OCIBindByName($stmt, "o_errormsg", $errormsg, 255);
- ociexecute($stmt);
- ociexecute($curs);
- OCIFetchInto($curs, &$data, OCI_ASSOC);
- if ($data['COUNT'] > 0) {
- echo '<a style="color:#FFFFFF" href="' . $PHP_SELF . '?' . SID . '&BUTTONWORK=OFF"><img src="images/workStop.gif" style="border:0;vertical-align:middle"> Arbeitszeit stoppen</a>';
- } else {
- echo '<a style="color:#FFFFFF" href="' . $PHP_SELF . '?' . SID . '&BUTTONWORK=ON"><img src="images/workStart.gif" style="border:0;vertical-align:middle"> Arbeitszeit starten</a>';
- }
- ocifreestatement($stmt);
- ocifreecursor($curs);
- }
- else {
- ?>
- <td style="width:100%;background-color:#666F74; color:#FFFFFF; font:normal 14pt Arial; padding-left:10px;vertical-align:bottom;">
- <?php echo $welcome; ?>
- <div style="width: 99%;margin-top:5px;">
- <? if($isAbbvieGroup == false) {?>
- <button class="btnx" type="button" onClick="showTabAnruf();" id="APSP1"> 1. Anruf PSP1 </button>
- <button class="btnx" type="button" onClick="showTabTermin1();" id="T1NB"> Terminierung 1. NB </button>
- <button class="btnx" type="button" onClick="showTabTermin2();" id="T2NB"> Terminierung 2. NB </button>
- <? } ?>
- </div>
- </td>
- <td style="background-color:#666F74;vertical-align:middle">
- <a href="http://www.mycom-net.com" target="_blank">
- <img src="images/MycomNeu.gif" border="0" alt="http://www.mycom-net.com">
- </a>
- </td>
- <?php
- }
- /* ?>
- </tr>
- </table>
- </td>
- */ ?>
- </tr>
- </table>
- <div id="tabAnruf" style="width: 100%; height:auto; display: none;">
- <?php
- $cam_id = 172; // live 172 statt 1607
- $title = "1. Anruf PSP1";
- include 'hilcura/patientTable.php';
- ?>
- </div>
- <div id="tabTermin1" style="width: 100%; height:auto; display: none;">
- <?php
- $cam_id = 192; // live 192 statt 1627
- $title = "Terminierung 1. NB";
- include 'hilcura/patientTable.php';
- ?>
- </div>
- <div id="tabTermin2" style="width: 100%; height:auto; display: none;">
- <?php
- $cam_id = 174; // live 174 statt 1627
- $title = "Terminierung 2. NB";
- include 'hilcura/patientTable.php';
- ?>
- </div>
- <table style="width:100%;" cellpadding="0" cellspacing="0">
- <tr>
- <td style="width:50%;height:100%;border-right:1px solid #0161A7">
- <table style="height:100%;width:100%;vertical-align:top;margin:0;padding:0;" cellpadding="0" cellspacing="0">
- <?php
- if ($view[0] == 1)
- $classAll->info();
- elseif ($view[0] == 2)
- $classAll->task();
- elseif ($view[0] == 3)
- $classAll->cal();
- elseif ($view[0] == 4)
- $classAll->email();
- elseif ($view[0] == 8)
- $classAll->report();
- elseif($view[0]==5) $classAll->resubmit();
- //$classAll->report();
- //$classAll->$defaultView();
- ?>
- </table>
- </td>
- <td style="width:50%;height:100%;">
- <table style="height:100%;width:100%;vertical-align:top;" cellpadding="0" cellspacing="0">
- <?php
- for ($i = 1; $i <= 5; $i++) {
- if ($view[$i] == 1)
- $classAll->info();
- elseif ($view[$i] == 2)
- $classAll->task();
- elseif ($view[$i] == 3)
- $classAll->cal();
- elseif ($view[$i] == 4)
- $classAll->email();
- // elseif ($view[$i] == 8)
- // $classAll->report();
- //elseif($view[$i]==5) $classAll->resubmit();
- /*if($infopos==$i && $defaultView!='info' ) $classAll->info();
- if($taskpos==$i && $defaultView!='task') $classAll->task();
- if($calpos==$i && $defaultView!='cal') $classAll->cal();
- if($emailpos==$i && $defaultView!='email') $classAll->email();
- if($resubmitpos==$i && $defaultView!='resubmit') $classAll->resubmit(); */
- }
- //$classAll->report();
- ?>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </body>
- </html>
Editor
You can edit this paste and save as new: