Metis Project Management Module-开源

  • r8_754553
    了解作者
  • 39.7KB
    文件大小
  • 文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-11 04:59
    上传日期
Metis是使用MySQL针对数据库后端使用PHP开发的开源项目管理模块。 Metis具有简单的安装和配置,其设计以简单易用为主要目标。
metis-0.1.1.tar.gz
  • metis
  • install
  • install.php
    4KB
  • metis.sql
    3KB
  • style
  • default.css
    5.2KB
  • img
  • comment-off.png
    582B
  • comment-on.png
    568B
  • f-off.png
    689B
  • f-on.png
    516B
  • e-on.png
    512B
  • spacer.gif
    43B
  • d-on.png
    631B
  • d-off.png
    726B
  • r-on.png
    476B
  • docs
  • LICENSE
    14.5KB
  • TODO
    269B
  • README
    5.4KB
  • CHANGELOG
    5.7KB
  • footer.php
    2KB
  • config.php
    3.2KB
  • header.php
    5.1KB
  • functions.php
    81.1KB
  • admin.php
    16.4KB
  • index.php
    8.5KB
内容介绍
<?php // +----------------------------------------------------------------+ // | Metis - Project Management Module | // +----------------------------------------------------------------+ // | Metis is a PHP/MySQL web application to manage projects of any | // | sort. Featured include multiple users with various levels of | // | access, progress graphs to show how much work/time remain on a | // | project, a clean & simple approach to keep the interface tidy, | // | and much more. | // | | // | Metis is based off of the last released version (0.9.1) of the | // | Incyte Project Manager software which was originally authored | // | by phlux and licensed under the GPL. | // +----------------------------------------------------------------+ // | 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 | // | along with this program; if not, write to the Free Software | // | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | // +----------------------------------------------------------------+ // | Justin Rebelo <justin.rebelo@gmail.com> - http://metis.sf.net | // +----------------------------------------------------------------+ // -----------------------------------------------------------------+ // PROJECT FUNCTIONS | // -----------------------------------------------------------------+ // projectExists(): If project exists, returns true. Else, false. function projectExists ($project_id) { $qry = "SELECT project_id FROM metis_projects WHERE project_id='$project_id'"; $rlt = mysql_query($qry); if (mysql_num_rows($rlt)) { return true; } else { return false; } } // getProjectVal(): Retreives a single field about a project. function getProjectVal ($project_id, $idx) { $qry = "SELECT $idx FROM metis_projects WHERE project_id='$project_id'"; $rlt = mysql_query($qry); return mysql_result($rlt,0,$idx); } // addProject(): Show the form to create a new project. function addProject () { // Make sure the user has permission to created new projects. if (checkLevel() < 2) { message('You do not have permission to create new projects.'); return false; } // Some data values. $today = date('j'); $thismonthname = date('M'); $thismonthvalue = date('n'); $thisyear = date('Y'); ?> <form action=<?php echo $_SERVER[PHP_SELF]; ?>?op=addprojectaction method=post> <table cellspacing=0 cellpadding=2 border=0 bordercolor=000000 align=center width=90%> <tr> <td colspan=2 width=100% align=left class=header> <b>Add New Project</b> </td> </tr> <tr> <td class=darker width=38% align=right> <b>Project Name: </b> </td> <td class=lighter width=62%> <input name=name type=text size=40> </td> </tr> <tr> <td class=darker align=right> <b>Start Date: </b> </td> <td class=lighter> <select name=startmonth size=1> <option value=<?php echo $thismonthvalue; ?> selected><?php echo $thismonthname; ?></option> <option value=<?php echo $thismonthvalue; ?>>-----</option> <?php for ($m = 1; $m < 13; $m++) { echo "<option value=".date('m', mktime(0, 0, 0, $m)).">".date('M', mktime(0, 0, 0, $m))."</option>"; } ?> </select> <select name=startday size=1> <option value=<?php echo $today; ?> selected><?php echo $today; ?></option> <option value=<?php echo $today; ?>>-----</option> <?php for ($d = 1; $d < 32; $d++) { echo "<option value=".date('d', mktime(0, 0, 0, 0, $d)).">".date('d', mktime(0, 0, 0, 0, $d))."</option>"; } ?> </select> <select name=startyear size=1> <option value=<?php echo $thisyear; ?> selected><?php echo $thisyear; ?></option> <option value=<?php echo $thisyear; ?>>-----</option> <option value=<?php echo $thisyear - 1; ?>><?php echo $thisyear - 1; ?></option> <option value=<?php echo $thisyear; ?>><?php echo $thisyear; ?></option> <option value=<?php echo $thisyear + 1; ?>><?php echo $thisyear + 1; ?></option> <option value=<?php echo $thisyear + 2; ?>><?php echo $thisyear + 2; ?></option> <option value=<?php echo $thisyear + 3; ?>><?php echo $thisyear + 3; ?></option> </select> </td> </tr> <tr> <td class=darker align=right> <b>Deadline: </b> </td> <td class=lighter> <select name=endmonth size=1> <option value=<?php echo $thismonthvalue; ?> selected><?php echo $thismonthname; ?></option> <option value=<?php echo $thismonthvalue; ?>>-----</option> <?php for ($m = 1; $m < 13; $m++) { echo "<option value=".date('m', mktime(0, 0, 0, $m)).">".date('M', mktime(0, 0, 0, $m))."</option>"; } ?> </select> <select name=endday size=1> <option value=<?php echo $today; ?> selected><?php echo $today; ?></option> <option value=<?php echo $today; ?>>-----</option> <?php for ($d = 1; $d < 32; $d++) { echo "<option value=".date('d', mktime(0, 0, 0, 0, $d)).">".date('d', mktime(0, 0, 0, 0, $d))."</option>"; } ?> </select> <select name=endyear size=1> <option value=<?php echo $thisyear; ?> selected><?php echo $thisyear; ?></option> <option value=<?php echo $thisyear; ?>>-----</option> <option value=<?php echo $thisyear - 1; ?>><?php echo $thisyear - 1; ?></option> <option value=<?php echo $thisyear; ?>><?php echo $thisyear; ?></option> <option value=<?php echo $thisyear + 1; ?>><?php echo $thisyear + 1; ?></option> <option value=<?php echo $thisyear + 2; ?>><?php echo $thisyear + 2; ?></option> <option value=<?php echo $thisyear + 3; ?>><?php echo $thisyear + 3; ?></option> </select> </td> </tr> <tr align=top> <td class=darker align=right> <b>Description: </b> </td> <td class=lighter> <textarea cols=40 rows=4 name=description></textarea> </td> </tr> <tr> <td class=header align=center colspan=2> <input class=button type=reset> <input class=button type=submit value="Add Project"> </td> </tr> </table> </form> <?php } // addProjectAction(): Insert a new project into the database. function addProjectAction () { // Make sure user has permission to create new projects. if (checkLevel() < 2) { return 'You do not have permission to create new projects.'; } // Clean up data for insertion. $startdate = "$_POST[startyear].$_POST[startmonth].$_POST[startday]"; $enddate = "$_POST[endyear].$_POST[endmonth].$_POST[endday]"; $Fname = addslashes($_POST[name]); $Fdescription = addslashes($_POST[description]); // Create the new project. $insert_qry = "INSERT INTO metis_projects VALUES (NULL,'$Fname','$startdate','$enddate','$Fdescription','0','0000-00-00')"; $insert_rlt = mysql_query($insert_qry); // Verify insertion. if (mysql_affected_rows()) { reloadPage(METISURL.'?op=projectdetail&project_id='.mysql_insert_id()); } else { return 'An error occurred creating the new project (ERROR CODE HERE).'; } } // confirmDeleteProject(): Confirm intent to delete a project. function confirmDeleteProject ($project_id) { // Make sure the user has access to this function. if (checkLevel() < 2) { message('You do not have access to delete projects.'); } // Get verification from the user to delete the project. $query = "SELECT name FROM metis_projects W
评论
    相关推荐