Пример #1
0
 /**
  * Check Post-Vars und Data Validation
  *
  * @return Boolean
  */
 function getPostVars()
 {
     $taet_foo = new taet_foo();
     $event = true;
     if (empty($_POST['activitydescription'])) {
         $this->errors[] = 'err_300';
         $event = false;
     } else {
         $taet_foo->taet_short_desc = clearVars($_POST['activitydescription']);
     }
     $taet_foo->taet_full_desc = empty($_POST['description']) ? '' : clearVars($_POST['description']);
     if (!empty($_POST['taetid'])) {
         $taet_foo->taet_id = $_POST['taetid'];
     }
     $taet_foo->shourActive = $_POST['shour'];
     $taet_foo->sminActive = $_POST['smin'];
     $taet_foo->dhourActive = $_POST['dhour'];
     $taet_foo->dminActive = $_POST['dmin'];
     $taet_foo->fhourActive = $_POST['fhour'];
     $taet_foo->fminActive = $_POST['fmin'];
     if ($taet_foo->fhourActive > 23) {
         $taet_foo->fminActive = 0;
     }
     if (!empty($_POST['taetdate'])) {
         $taet_start = getDateTime($_POST['taetdate']);
         if (!$taet_start) {
             $this->errors[] = 'err_302';
             $event = false;
         }
         $taet_foo->show_taetdate = $_POST['taetdate'];
         $taet_foo->taet_start = mktime($taet_foo->shourActive, $taet_foo->sminActive, 0, (int) date('m', $taet_start), (int) date('d', $taet_start), (int) date('Y', $taet_start));
         $taet_foo->taet_finish = mktime($taet_foo->fhourActive, $taet_foo->fminActive, 0, (int) date('m', $taet_start), (int) date('d', $taet_start), (int) date('Y', $taet_start));
         $_SESSION['taetdate'] = $taet_foo->taet_start;
     } else {
         $taet_foo->show_taetdate = '';
         $this->errors[] = 'err_302';
         $event = false;
     }
     if (empty($_POST['projectposid']) || empty($_POST['projectid'])) {
         $this->errors[] = 'err_301';
         $event = false;
     } else {
         $taet_foo->taet_prpos_id = $_POST['projectposid'];
         $_SESSION['prpos_id'] = $_POST['projectposid'];
         $_SESSION['projectnr'] = $_POST['projectid'];
         $taet_foo->projectActive = $_POST['projectid'];
     }
     $this->taet_foo = $taet_foo;
     return $event;
 }
Пример #2
0
 /**
  * Check Post-Vars und Data Validation
  *
  * @return Boolean
  */
 function getPostVars()
 {
     $employees_foo = new employees_foo();
     $event = true;
     if (empty($_POST['employeelogin'])) {
         $this->errors[] = 'err_110';
         $event = false;
     } else {
         $employees_foo->empl_login = clearVars($_POST['employeelogin']);
     }
     if (empty($_POST['employeesurname'])) {
         $this->errors[] = 'err_111';
         $event = false;
     } else {
         $employees_foo->empl_surname = clearVars($_POST['employeesurname']);
     }
     if (empty($_POST['employeefirstname'])) {
         $this->errors[] = 'err_112';
         $event = false;
     } else {
         $employees_foo->empl_firstname = clearVars($_POST['employeefirstname']);
     }
     if (empty($_POST['employeeid'])) {
         if (empty($_POST['employeepassword'])) {
             $this->errors[] = 'err_113';
             $event = false;
         } else {
             if (empty($_POST['employeepasswordretry']) || $_POST['employeepasswordretry'] != $_POST['employeepassword']) {
                 $this->errors[] = 'err_114';
                 $event = false;
             } else {
                 $employees_foo->empl_pwd = md5($_POST['employeepassword']);
             }
         }
     } else {
         if (!empty($_POST['employeepassword'])) {
             if ($_POST['employeepasswordretry'] != $_POST['employeepassword']) {
                 $this->errors[] = 'err_114';
                 $event = false;
             } else {
                 $employees_foo->empl_pwd = md5($_POST['employeepassword']);
             }
         }
     }
     if (!empty($_POST['employeeid'])) {
         $employees_foo->empl_id = (int) $_POST['employeeid'];
     }
     if (isset($_POST['employeeposition'])) {
         $employees_foo->empl_position = (int) $_POST['employeeposition'];
     }
     $employees_foo->empl_status = isset($_POST['employeeaktive']) ? (int) $_POST['employeeaktive'] : 0;
     if (!empty($_POST['employeecomment'])) {
         $employees_foo->empl_comment = clearVars($_POST['employeecomment']);
     }
     $employees_foo->memberProjectListArray = isset($_POST['MemberInProjects']) ? $_POST['MemberInProjects'] : array();
     $this->employees_foo = $employees_foo;
     return $event;
 }
Пример #3
0
$copystyle    = empty($_POST['projectid']) ?  'none' : 'inline';

if (empty($_SESSION['psortfield']))
{
    $_SESSION['psortfield'] = 'login';
}

$psortfield = !isset($_POST['psortfield']) ? $_SESSION['psortfield'] : $_POST['psortfield'];
$_SESSION['psortfield'] = $psortfield;

if (empty($_SESSION['psortorder'])) $_SESSION['psortorder'] = 'ASC';
$psortorder = !isset($_POST['psortorder']) ? $_SESSION['psortorder'] : $_POST['psortorder'];
$_SESSION['psortorder'] = $psortorder;

if (empty($_SESSION['psearchstring'])) $_SESSION['psearchstring'] = '';
$psearchstring = !isset($_POST['psearchstring']) ? $_SESSION['psearchstring'] : clearVars($_POST['psearchstring']);
$_SESSION['psearchstring'] = $psearchstring;

if (empty($_SESSION['pstatus'])) $_SESSION['pstatus'] = 1;
$pstatus = !isset($_POST['pstatus']) ? $_SESSION['pstatus'] : $_POST['pstatus'];
$_SESSION['pstatus'] = $pstatus;

$status_options = array( -1 => $dict['all_projects'],
1 => $dict['pr_enabled_only'],
0 => $dict['pr_disabled_only'] );

$projects = new projects();
        $xajax    = $xajax_todo->getJavascript('includes/xajax');
$pr_formvars = new project_foo();

if (!empty($_POST['formsend']))
Пример #4
0
     * Wert für ein Jahr gespeichert.
     */
    $options_array = cookie_to_object($_COOKIE['todo']);
} else {
    $options_array['searchstring'] = '';
    $options_array['pr_id'] = -1;
    $options_array['prio'] = '';
    $options_array['status'] = -1;
    $options_array['sortfield'] = 'id';
    $options_array['sortorder'] = 'DESC';
    setcookie('todo', object_to_cookie($options_array), time() + 60 * 60 * 24 * 365);
}
// Neue Filter-Daten, falls vorhanden, werden eingesetzt.
$searchstring = isset($_POST['searchstring']) ? clearVars($_POST['searchstring']) : $options_array['searchstring'];
$pr_id = isset($_POST['projectnumber']) ? $_POST['projectnumber'] : $options_array['pr_id'];
$prio = isset($_POST['prio']) ? clearVars($_POST['prio']) : $options_array['prio'];
$status = isset($_POST['status']) ? $_POST['status'] : $options_array['status'];
$sortfield = isset($_POST['sortfield']) ? $_POST['sortfield'] : $options_array['sortfield'];
$sortorder = isset($_POST['sortorder']) ? $_POST['sortorder'] : $options_array['sortorder'];
/**
 * Evtl. durch neue Filter-Einstelungen geänderte Daten werden erneut serialisiert
 * in Coockies gespeichert für ein weiteres Jahr
 */
$options_array['searchstring'] = $searchstring;
$options_array['pr_id'] = $pr_id;
$options_array['prio'] = $prio;
$options_array['status'] = $status;
$options_array['sortfield'] = $sortfield;
$options_array['sortorder'] = $sortorder;
setcookie('todo', object_to_cookie($options_array), time() + 60 * 60 * 24 * 365);
// Der Benutzer soll ermittelt werden
Пример #5
0
 /**
  * Check Post-Vars und Data Validation
  *
  * @return Boolean
  */
 function getPostVars()
 {
     $todo_foo = new todo_foo();
     $event = true;
     if (empty($_POST['todotitle'])) {
         $this->errors[] = 'err_100';
         $event = false;
     } else {
         $todo_foo->todo_title = clearVars($_POST['todotitle']);
     }
     if (empty($_POST['todoprio'])) {
         $this->errors[] = 'err_101';
         $event = false;
     } else {
         $todo_foo->todo_prio = clearVars($_POST['todoprio']);
     }
     if (!empty($_POST['todostart'])) {
         $todo_foo->todo_start = getDateTime($_POST['todostart']);
         $todo_foo->show_start = $_POST['todostart'];
     }
     if (!empty($_POST['todofinish'])) {
         $todo_foo->todo_finish = getDateTime($_POST['todofinish'], true);
         $todo_foo->show_finish = $_POST['todofinish'];
     }
     if (!empty($_SESSION['edit_todo_id'])) {
         $todo_foo->todo_id = (int) $_SESSION['edit_todo_id'];
     }
     if (!empty($_POST['movefield'])) {
         $todo_foo->move = $_POST['movefield'];
     }
     if (!empty($_POST['todoproject'])) {
         $todo_foo->todo_pr_id = $_POST['todoproject'];
     } else {
         $todo_foo->todo_pr_id = '0';
     }
     $todo_foo->todo_warndiff = isset($_POST['todowarndiff']) ? $_POST['todowarndiff'] : 0;
     $todo_foo->todo_privat = isset($_POST['todoprivat']) ? $_POST['todoprivat'] : 0;
     if (!empty($_POST['tododof'])) {
         $todo_foo->todo_statusbar = $_POST['tododof'];
     }
     if (isset($_POST['todoagreed'])) {
         $todo_foo->todo_status = $_POST['todoagreed'];
     }
     if (!empty($_POST['todocomment'])) {
         $todo_foo->todo_comment = clearVars($_POST['todocomment']);
     }
     $this->todo_foo = $todo_foo;
     return $event;
 }
Пример #6
0
                    while ($line = trim(fgets($diff))) {
                        $listing[$index++]['info'] = $line;
                        clearVars();
                    }
                    continue;
                }
                // Check for error messages
                if (strncmp(trim($line), 'svn: ', 5) == 0) {
                    $listing[$index++]['info'] = urldecode($line);
                    $vars['success'] = false;
                    continue;
                }
                $listing[$index++]['info'] = $line;
            }
            if ($node) {
                clearVars();
                $listing[$index++]['endpath'] = true;
            }
            if ($debug) {
                print_r($listing);
            }
            pclose($diff);
        }
    }
    if (!$rep->hasUnrestrictedReadAccess($relativePath1) || !$rep->hasUnrestrictedReadAccess($relativePath2, false)) {
        $vars['error'] = $lang['NOACCESS'];
    }
}
$vars['template'] = 'compare';
$template = $rep ? $rep->getTemplatePath() : $config->getTemplatePath();
parseTemplate($template . 'header.tmpl', $vars, $listing);
 /**
  * Check Post-Vars und Data Validation
  *
  * @return Boolean
  */
 function getPostVars()
 {
     $projectposition_foo = new projectposition_foo();
     $event = true;
     if (empty($_POST['projectposition'])) {
         $this->errors[] = 'err_130';
         $event = false;
     } else {
         $projectposition_foo->prpos_name = clearVars($_POST['projectposition']);
     }
     $projectposition_foo->prpos_comment = empty($_POST['prposcomment']) ? '' : clearVars($_POST['prposcomment']);
     if (!empty($_POST['projectposid'])) {
         $projectposition_foo->prpos_id = $_POST['projectposid'];
     }
     $projectposition_foo->orderright = $_POST['orderright'];
     if (empty($_SESSION['projectnr'])) {
         $this->errors[] = 'err_141';
         $event = false;
     } else {
         $this->prpos_project_id = $_SESSION['projectnr'];
     }
     if (empty($_POST['siblingid'])) {
         $projectposition_foo->orderright = 2;
         $projectposition_foo->prpos_parent_id = 0;
         $this->getLastOrderNumber($projectposition_foo->prpos_parent_id, $projectposition_foo->prpos_ordernumber);
     } else {
         if ($projectposition_foo->prpos_id && $_POST['siblingid'] == $projectposition_foo->prpos_id) {
             $projectposition_foo->noupdate = true;
         } else {
             if ($projectposition_foo->prpos_id) {
                 if ($this->isNewSiblingMyChild($projectposition_foo->prpos_id, $_POST['siblingid'])) {
                     $this->errors[] = 'err_140';
                     $event = false;
                 } elseif ($projectposition_foo->orderright == 2) {
                     $projectposition_foo->prpos_parent_id = $_POST['siblingid'];
                     $this->getLastOrderNumber($projectposition_foo->prpos_parent_id, $projectposition_foo->prpos_ordernumber);
                 } else {
                     $this->getParentId($_POST['siblingid'], $projectposition_foo->prpos_parent_id);
                     $test = '';
                     $this->getSiblingNumberById($_POST['siblingid'], $projectposition_foo->prpos_ordernumber);
                     $test = '';
                 }
             } else {
                 if ($projectposition_foo->orderright == 2) {
                     $projectposition_foo->prpos_parent_id = $_POST['siblingid'];
                     $this->getLastOrderNumber($projectposition_foo->prpos_parent_id, $projectposition_foo->prpos_ordernumber);
                 } else {
                     $this->getParentId($_POST['siblingid'], $projectposition_foo->prpos_parent_id);
                     $this->getSiblingNumberById($_POST['siblingid'], $projectposition_foo->prpos_ordernumber);
                 }
             }
         }
     }
     $projectposition_foo->prpos_status = isset($_POST['prposstatus']) ? $_POST['prposstatus'] : 0;
     $this->projectposition_foo = $projectposition_foo;
     return $event;
 }
Пример #8
0
 /**
  * Check Post-Vars und Data Validation
  *
  * @return Boolean
  */
 function getPostVars()
 {
     $project_foo = new project_foo();
     $event = true;
     if (empty($_POST['projectname'])) {
         $this->errors[] = 'err_120';
         $event = false;
     } else {
         $project_foo->pr_name = clearVars($_POST['projectname']);
     }
     if (!empty($_POST['projectid'])) {
         $project_foo->pr_id = $_POST['projectid'];
     }
     $project_foo->pr_status = isset($_POST['projectstatus']) ? $_POST['projectstatus'] : 0;
     if (!empty($_POST['projectcomment'])) {
         $project_foo->pr_comment = clearVars($_POST['projectcomment']);
     }
     $project_foo->membersListArray = isset($_POST['MembersInProject']) ? $_POST['MembersInProject'] : array();
     $this->project_foo = $project_foo;
     return $event;
 }