Example #1
0
    echo $lang['common_private_job'];
    ?>
</td>
    <td class="list">
      <input type="checkbox" name="privatejob" value="1" <?php 
    echo $privatejob_status;
    ?>
><?php 
    echo $lang['common_private_job_desc'];
    ?>
    </td>
  </tr>
    <tr>
      <td class="list">&nbsp;</td>
      <?php 
    if (tool::securePost('action') == "edit") {
        ?>
        <td class="list"><input type="submit" value="<?php 
        echo $lang['common_save'];
        ?>
"><input type="reset" value="<?php 
        echo $lang['common_reset'];
        ?>
"></td>
      <?php 
    } else {
        ?>
        <td class="list"><input type="submit" value="<?php 
        echo $lang['common_insert'];
        ?>
"><input type="reset" value="<?php 
Example #2
0
"></td>
  <?php 
}
?>
  </tr>
</table>

<?php 
#######################################################################
## list existing records
# order
$order = "project";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
if (tool::securePost('desc') == "DESC") {
    $desc = "";
} else {
    $desc = "DESC";
}
$list = $requestInst->getList($order, $desc);
?>

<br><br>
<h2><?php 
echo $lang['requests_available'];
?>
 (<?php 
echo $requestInst->matches;
?>
 <?php 
Example #3
0
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
#######################################################################
## make edit / new form
if (tool::securePost('action') == "edit") {
    ?>
  <h2><?php 
    echo $lang['common_editRecord'];
    ?>
</h2>
  <form method="post">
  <input type="hidden" name="action" value="edit">
  <input type="hidden" name="id" value="<?php 
    echo tool::securePost('id');
    ?>
">
  <table border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td><b><?php 
    echo $lang['right_available'];
    ?>
</b></td>
      <td>&nbsp;</td>
      <td><b><?php 
    echo $lang['right_included'];
    ?>
</b></td>
    </tr>
    <tr>
Example #4
0
if (!isset($HTTP_SESSION_VARS['loginid'])) {
    // session is not set -> authenticate
    // try to authenticate by IP
    if ($loginInst->authByIp()) {
        $HTTP_SESSION_VARS['loginid'] = $loginInst->authByIp();
    } elseif (tool::securePost('loginname') && $loginInst->authByPassword(tool::securePost('loginname'), tool::securePost('password'))) {
        $HTTP_SESSION_VARS['loginid'] = $loginInst->authByPassword(tool::securePost('loginname'), tool::securePost('password'));
    }
    if (isset($HTTP_SESSION_VARS['loginid']) && $HTTP_SESSION_VARS['loginid'] != "" && !session_is_registered("loginid")) {
        $loginid = $HTTP_SESSION_VARS['loginid'];
        if (!session_register("loginid")) {
            echo "<b>" . $lang['common_unableToSaveLoginInSession'] . "</b><br>";
            // could not save session -> give up
            exit;
        }
    } elseif (!session_is_registered("loginid") && (tool::securePost('loginname') || tool::securePost('password'))) {
        // show error message only, if username/password was submitted
        $toolInst->errorStatus($lang['common_userUnknownOrPasswordWrong']);
    }
}
if (session_is_registered("loginid")) {
    if (!isset($HTTP_SESSION_VARS['loginid']) || $HTTP_SESSION_VARS['loginid'] == "") {
        echo "<b>" . $lang['common_unableToFindloginInSession'] . "</b><br>";
        // could not save session -> give up
        exit;
    }
    $loginInst->activate($HTTP_SESSION_VARS['loginid']);
    $filename = preg_replace(array("/^[\\.]*/", "/\\//"), array("", ""), tool::secureGet('filename'));
    $filecreated = ereg_replace("[^0-9]", "", tool::secureGet('created'));
    $file_size = @filesize($config['attach_url'] . "/{$filecreated}/{$filename}");
    if ($filename && $filecreated && $file_size) {
Example #5
0
?>
">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img src="grafx/dummy.gif" width="1" height="300" border="0"></td>
    <td>
      <table border="0" cellpadding="1" cellspacing="2" width="100%">
        <tr>
          <td align="right"><?php 
echo $lang['common_username'];
?>
:&nbsp;</td>
          <td><?php 
$selected = "";
if (tool::securePost('loginname') && tool::securePost('loginname') != "") {
    $selected = tool::securePost('loginname');
}
?>
          <input type="text" name="loginname" value="<?php 
echo $selected;
?>
" size="<?php 
echo $htmlconfig['text_size3'];
?>
"></td>
          </td>
        </tr><tr>
          <td align="right"><?php 
echo $lang['common_password'];
?>
:&nbsp;</td>
Example #6
0
    <?php 
} else {
    ?>
      <th><nobr>days left</nobr></th>
    <?php 
}
?>
    <th>percentage</th>
    <th>&nbsp;</th>
  </tr>

<?php 
$taskInst = new task();
$order = "finish";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
$list = $taskInst->getList($order);
if ($order == "plannedhours") {
    $listByHour = array();
    while ($element = current($list)) {
        $taskInst->activate($element);
        if (!$taskInst->isDone() && $taskInst->statusId != TASK_STATUS_WAITING && $taskInst->plannedHours && $taskInst->plannedHours != "0") {
            $diff = $taskInst->plannedHours * 60 * 60 - $taskInst->getSummary();
            $listByHour[$diff] = $taskInst->id;
        }
        next($list);
    }
    ksort($listByHour);
    while (list($diff, $id) = each($listByHour)) {
        $taskInst->activate($id);
Example #7
0
$requestInst = new request(tool::secureGet('requestid'));
$projectInst = new project($requestInst->projectId);
// this request doesn't exists
if (!$requestInst->id) {
    echo "<div>" . $lang['common_request_not_exists'] . "</div>";
    exit;
}
#######################################################################
## show request details
#######################################################################
## perform action
if (tool::securePost('action') == "taskify" && $loginInst->hasAccess("request.assignTo") || tool::securePost('action') == "save" && tool::securePost('taskid')) {
    if (!tool::securePost('taskid')) {
        $taskId = $requestInst->assignTo(tool::securePost('userid'));
    } else {
        $taskId = tool::securePost('taskid');
    }
    if ($taskId) {
        include "taskdetails.php";
        exit;
    }
}
?>

<form method="post" name="form1">
<input type="hidden" name="action" value="taskify">
<input type="hidden" name="requestid" value="<?php 
echo $requestInst->id;
?>
">
Example #8
0
    exit;
}
?>

<h1><?php 
echo $lang['password_change'];
?>
</h1>
<form method="post">

<?php 
if (tool::securePost('action') == "update") {
    if (!DEMO_MODE) {
        $loginInst->changeLanguage(tool::securePost('language'));
        if (tool::securePost('new_password') && tool::securePost('new_password') != "") {
            $loginInst->updatePassword(tool::securePost('old_password'), tool::securePost('new_password'), tool::securePost('new_password_2'));
        }
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
?>
<br />
<br />
<h2><?php 
echo $lang['password_change'];
?>
</h2>
<input type="hidden" name="action" value="update">
<table border="0" cellpadding="2" cellspacing="0">
  <tr>
Example #9
0
    //insert the report
    $reportInst->append("  <id>" . $reportId . "</id>");
    // append id
    $reportInst->append("</report>");
    $reportInst->update();
} else {
    // don't forget the closing tag
    $reportInst->append("</report>");
}
if (tool::securePost('action') == "view") {
    $reportId = tool::securePost('viewreport');
}
if ($reportId != "") {
    $template = tool::securePost('templateview');
    if (tool::securePost('action') == "save") {
        $template = tool::securePost('templatecreate');
    }
    ?>

  <script language="javascript">
    <!--
     reportwindow('<?php 
    echo $toolInst->encodeUrl("reportviewer.php?reportid=" . $reportId . "&template=" . $template);
    ?>
');
    //-->
  </script>
<?php 
}
?>
</form>
Example #10
0
                    echo "<td align=\"right\" class=\"rmgreen\">" . $percent . " %</td>\n";
                }
            } else {
                echo "<td colspan=\"2\" class=\"" . $taskInst->getStatusStyle() . "\">" . $taskInst->getStatusName() . "</td>\n";
            }
            echo "<td width=\"100%\">&nbsp;</td>\n";
            echo "</tr>\n";
            next($taskList);
            $count = $taskDepth;
            processTask(++$count, $taskInst->childs());
        }
    }
    // now we create a tasklist, containing only the root tasks
    $childs = array();
    $taskInst = new task();
    $taskInst->filterProjectId = tool::securePost('id');
    $taskInst->filterMountId = 0;
    processTask(1, $taskInst->getList());
    ?>
  <tr class="dark">
    <td align="right" colspan="<?php 
    echo $max + 5;
    ?>
"><b>average</b></td>
    <?php 
    $percent = 100;
    if ($rows > 0) {
        $percent = $toolInst->numberRound($sumPercentage / $rows, 2);
    }
    if ($percent > 100) {
        ?>