{ $projects->project_foo = new project_foo(); $projects->project_foo->pr_id = $_POST['projectidfromposition']; $onLoadElement = ' onload="x_getProjectData('.$projects->project_foo->pr_id.')"'; $archivestyle = $projects->isDeletable($projects->project_foo->pr_id) ? 'inline' : 'none'; } $projectlist = $projects->GetList($psortfield,$psortorder,$psearchstring,$pstatus); $pr_id = isset($projects->project_foo->pr_id) ? $projects->project_foo->pr_id : $pr_formvars->pr_id; if ($projects->getMembersInProject($pr_id)) $pr_formvars->membersInProjectArray = $projects->membersInProjectArray; if ($projects->getMembersList($pr_id)) $pr_formvars->membersArray = $projects->membersArray; $membid = $user->empl_position < 100 ? $user->empl_id : 0; $taet = new taet(); $taet->getMemberProjects($membid); $formvars->projectsArray = $taet->projectsArray; $timestamp = time(); $thisMonth = (int) date('m',$timestamp); $thisYear = (int) date('Y',$timestamp); $lastDayOfMonth = (int) date('t',$timestamp); $startThisMonth = mktime(0,0,0,$thisMonth,1,$thisYear); $finishThisMonth = mktime(23,59,59,$thisMonth,$lastDayOfMonth,$thisYear); $formvars->expstart = date(DATEFIELD,$startThisMonth); $formvars->expfinish = date(DATEFIELD,$finishThisMonth); $PageTitle = $dict['projectmanagement']; $ContentTPL = 'projects.tpl'; $JavaScript =<<<END
function getTaetData($taet_id) { global $objResponse, $dict; if (!($taet = new taet())) { header('HTTP/1.0 500 Internal Server Error'); } elseif ($obj = $taet->initById($taet_id)) { $objResponse->addAssign('taetid', 'value', $taet_id); $objResponse->addAssign('activitydescription', 'value', $obj->taet_short_desc); $objResponse->addAssign('description', 'value', $obj->taet_full_desc); $objResponse->addScript("setNewDefaultOption('projectid', {$obj->projectActive})"); $pr_id = $taet->getProjectIdByPrPos($obj->taet_prpos_id); if (!($projectposition = new projectposition())) { header('HTTP/1.0 500 Internal Server Error'); ob_flush(); } else { $_SESSION['projectnr'] = $pr_id; $nodesArr = $projectposition->getNodes($pr_id); $objResponse->addScript("clearSelection('projectposid')"); foreach ($nodesArr as $prpos) { $vorsatz = $prpos->level > 0 ? str_repeat('¤', $prpos->level) : ''; $status = $prpos->prpos_status == 0 ? 0 : 1; $objResponse->addScript("addOption('projectposid','{$vorsatz}{$prpos->prpos_name}',{$prpos->prpos_id},{$obj->taet_prpos_id},{$status})"); } } $objResponse->addScript("setNewDefaultOption('projectposid', {$obj->taet_prpos_id})"); $objResponse->addAssign('taetdate', 'value', $obj->show_taetdate); if ($obj->fhourActive < 1 && $obj->sminActive >= $obj->fminActive) { $obj->fhourActive = 24; } $objResponse->addScript("setNewDefaultOption('shour','{$obj->shourActive}')"); $objResponse->addScript("setNewDefaultOption('smin' ,'{$obj->sminActive}')"); $objResponse->addScript("setNewDefaultOption('dhour','{$obj->dhourActive}')"); $objResponse->addScript("setNewDefaultOption('dmin' ,'{$obj->dminActive}')"); $objResponse->addScript("setNewDefaultOption('fhour','{$obj->fhourActive}')"); $objResponse->addScript("setNewDefaultOption('fmin' ,'{$obj->fminActive}')"); // $objResponse->addAssign('errdiv','innerHTML',''); $objResponse->addAssign('created', 'innerHTML', $dict['created'] . ':<br />' . $obj->show_created . '<br />' . $obj->show_created_name); $objResponse->addAssign('changed', 'innerHTML', $dict['changed'] . ':<br />' . $obj->show_changed . '<br />' . $obj->show_changed_name); $objResponse->addScript("setFormTitle('" . $dict['activityedit'] . "')"); $objResponse->addAssign('remove', 'style.display', 'inline'); $objResponse->addScript("markThisDiv({$taet_id})"); } return $objResponse->getXML(); }
} elseif (!$usrcfg->initCfgVars($user->empl_id)) { header('HTTP/1.0 500 Internal Server Error'); ob_flush(); } if (empty($usrcfg->language)) { $language = DEFAULTLANGUAGE; } else { $language = $usrcfg->language; } require_once ROOT_PATH . 'includes/lang/' . $language . '.php'; if (isset($_POST['users'])) { $users = $user->empl_position >= 50 ? $_POST['users'] : array($user->empl_id); } else { $users = array($user->empl_id); } $taet = new taet(); $expstart = getDateTime($_POST['expstart']); $expfinish = getDateTime($_POST['expfinish']) + 60 * 60 * 24; $projectsarr = $_POST['expprojectid']; $groupby = $_POST['groupby']; $options1 = isset($_POST['options1']) ? $_POST['options1'] : array(); if (isset($_POST['taetexport'])) { $options1[] = 'users'; } $options2 = isset($_POST['options2']) ? $_POST['options2'] : array(); $options3 = isset($_POST['options3']) ? $_POST['options3'] : array(); switch ($groupby) { case 'userprojects': $options = $options1; $zusatz = ''; $xsl_template = 'export.xsl';
* 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 * */ $taet = new taet(); $xajax = $xajax_todo->getJavascript('includes/xajax'); if (!empty($_POST['nextday'])) { $_SESSION['taetdate'] = $_POST['nextday']; } $formvars = new taet_foo(); $formvars->listDateShort = date(DATEFIELD, $formvars->taet_start); $formvars->listDateFull = strftime(FULLDATE, $formvars->taet_start); $archivestyle = 'none'; if (!empty($_POST['formsend'])) { /* Wenn das Eintrag gelöschet werden soll, dann brauchen wir * es zuerst nicht auf $_POST Variablen auswerten */ if (!empty($_POST['deletetaet']) && !empty($_POST['taetid'])) { if (!$taet->delete($_POST['taetid'])) { $erg = $taet->getPostVars();