Exemplo n.º 1
0
function submitOrder2($tmpOrder, $r_id)
{
    $tmpPos = substr_count(substr($tmpOrder, 0, strpos($tmpOrder, "|" . $r_id . "|")), "|");
    //history
    $query = "select * from requirements where r_id=" . $r_id;
    $tmp .= $query . "\n\r";
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $query = "insert into requirements_history (r_parent_id, r_p_id,r_release, r_c_id, r_s_id, r_stakeholder,r_glossary,r_keyword, r_u_id, r_assigned_u_id, r_name, r_desc, r_state, r_type_r, r_priority, r_valid, r_link, r_satisfaction, r_dissatisfaction, r_conflicts, r_depends, r_component, r_source, r_risk, r_complexity, r_weight, r_points, r_creation_date, r_change_date, r_accept_date, r_accept_user, r_version, r_save_date, r_save_user, r_parent_id2, r_pos, r_stub, r_keywords, r_userfield1, r_userfield2, r_userfield3, r_userfield4, r_userfield5, r_userfield6) values (\"" . $r_id . "\",\"" . escapeChars($row['r_p_id']) . "\",\"" . escapeChars($row['r_release']) . "\",\"" . escapeChars($row['r_c_id']) . "\",\"" . escapeChars($row['r_s_id']) . "\",\"" . escapeChars($row['r_stakeholder']) . "\",\"" . escapeChars($row['r_glossary']) . "\",\"" . escapeChars($row['r_keyword']) . "\",\"" . escapeChars($row['r_u_id']) . "\",\"" . $row['r_assigned_u_id'] . "\",\"" . escapeChars($row['r_name']) . "\",\"" . escapeChars($row['r_desc']) . "\",\"" . escapeChars($row['r_state']) . "\",\"" . escapeChars($row['r_type_r']) . "\",\"" . escapeChars($row['r_priority']) . "\",\"" . escapeChars($row['r_valid']) . "\",\"" . escapeChars($row['r_link']) . "\",\"" . escapeChars($row['r_satisfaction']) . "\",\"" . escapeChars($row['r_dissatisfaction']) . "\",\"" . escapeChars($row['r_conflicts']) . "\",\"" . escapeChars($row['r_depends']) . "\",\"" . escapeChars($row['r_component']) . "\",\"" . escapeChars($row['r_source']) . "\",\"" . escapeChars($row['r_risk']) . "\",\"" . escapeChars($row['r_complexity']) . "\",\"" . escapeChars($row['r_weight']) . "\",\"" . escapeChars($row['r_points']) . "\",\"" . escapeChars($row['r_creation_date']) . "\",\"" . escapeChars($row['r_change_date']) . "\",\"" . escapeChars($row['r_accept_date']) . "\",\"" . escapeChars($row['r_accept_user']) . "\",\"" . escapeChars($row['r_version']) . "\",DATE_ADD( NOW( ) , INTERVAL - " . TIME_DIFF_HOURS . " HOUR),\"" . $_SESSION['uid'] . "\",\"" . escapeChars($row['r_parent_id']) . "\",\"" . escapeChars($row['r_pos']) . "\",\"" . escapeChars($row['r_stub']) . "\",\"" . escapeChars($row['r_keywords']) . "\",\"" . escapeChars($row['r_userfield1']) . "\",\"" . escapeChars($row['r_userfield2']) . "\",\"" . escapeChars($row['r_userfield3']) . "\",\"" . escapeChars($row['r_userfield4']) . "\",\"" . escapeChars($row['r_userfield5']) . "\",\"" . escapeChars($row['r_userfield6']) . "\")";
        $tmp .= $query . "\n\r";
        mysql_query($query) or die(mysql_error());
        $rh_id = mysql_insert_id();
        $p_id = $row['r_p_id'];
        $r_parent_id_tmp = $row['r_parent_id'];
        $r_pos = $row['r_pos'];
    }
    if ($r_pos > $tmpPos) {
        $query2 = "update requirements set r_pos=r_pos+1 where (r_pos<" . $r_pos . " and r_pos>=" . $tmpPos . ") and r_parent_id=" . $r_parent_id_tmp . " and r_p_id=" . $p_id;
    } else {
        $query2 = "update requirements set r_pos=r_pos-1 where (r_pos>" . $r_pos . " and r_pos<=" . $tmpPos . ") and r_parent_id=" . $r_parent_id_tmp . " and r_p_id=" . $p_id;
    }
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    //saving requirement
    $query2 = "update requirements set r_pos=" . $tmpPos . " where r_id=" . $r_id . " and r_p_id=" . $p_id;
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    //saving undo/redoes
    $current = 0;
    $all_c = 0;
    $query2 = "select count(*), th_current from tree_history where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $_SESSION['projects'] . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR) group by th_current";
    $tmp .= $query2 . "\n\r";
    $rs2 = mysql_query($query2) or die(mysql_error());
    if ($row2 = mysql_fetch_array($rs2)) {
        $all_c = $row2[0];
        $current = $row2[1];
    }
    if ($current > $all_c) {
        $query2 = "update tree_history set th_current=" . $all_c . " where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $_SESSION['projects'] . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR)";
        $tmp .= $query2 . "\n\r";
        mysql_query($query2) or die(mysql_error());
    }
    $query2 = "delete from tree_history where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $p_id . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR) order by th_id desc limit " . $current;
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "update tree_history set th_current=0 where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $p_id . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR)";
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "insert into tree_history (th_r_id,th_u_id,th_p_id,th_parent_old,th_parent_old_pos,th_parent_new,th_parent_new_pos,th_rh_id,th_date,th_current) values (" . $r_id . "," . $_SESSION['uid'] . "," . $_SESSION['projects'] . "," . $r_parent_id_tmp . "," . $r_pos . "," . $r_parent_id_tmp . "," . $tmpPos . "," . $rh_id . ",now(),0)";
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "update test set r_id='" . $tmp . "' where t_id=5";
    $rs2 = mysql_query($query2) or die(mysql_error());
    return $tmp;
}
Exemplo n.º 2
0
	<meta name="keywords" content="<?php 
echo $lng[1][3];
?>
"/>
	<title><?php 
echo $lng[1][1];
?>
</title>
	<link rel='STYLESHEET' type='text/css' href='dhtmlxTree/samples/common/style.css'>
	<link rel="stylesheet" href="s.css" type="text/css"/>
</head>
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    $query = "insert into stakeholders (s_name, s_function, s_email, s_interests, s_global) values ('" . escapeChars($s_name) . "','" . escapeChars($s_function) . "','" . escapeChars($s_email) . "','" . escapeChars($s_interests) . "','" . escapeChars($s_global) . "')";
    mysql_query($query) or die(mysql_error());
    $s_id = mysql_insert_id();
    $query = "insert into project_stakeholders (ps_p_id, ps_s_id) values ('" . $p_id . "','" . $s_id . "')";
    mysql_query($query) or die(mysql_error());
    ?>
    <script>
      <?php 
    if ($where != "1") {
        ?>
      opener.change_select();
      opener.document.forms['edit'].r_stakeholder.value+=<?php 
        echo $s_id;
        ?>
+",";
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
Exemplo n.º 3
0
    header("Location:index.php?inc=manage_cases");
}
if ($action == "add") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $ta2 = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta2));
    $query = "insert into cases (c_name, c_desc, c_result, c_status, c_global) values ('" . escapeChars($c_name) . "','" . stripbr(escapeChars($ta)) . "','" . stripbr(escapeChars($ta2)) . "','" . escapeChars($c_status) . "','" . escapeChars($c_global) . "')";
    mysql_query($query) or die(mysql_error());
    $c_id = mysql_insert_id();
    //header("Location:index.php?inc=manage_cases");
}
if ($action == "update" && $c_id != "") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $ta2 = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta2));
    $query = "update cases set c_name='" . escapeChars($c_name) . "', c_desc='" . stripbr(escapeChars($ta)) . "', c_result='" . stripbr(escapeChars($ta2)) . "', c_status='" . escapeChars($c_status) . "', c_global='" . escapeChars($c_global) . "' where c_id=" . $c_id;
    mysql_query($query) or die(mysql_error());
    //header("Location:index.php?inc=manage_cases");
}
//  if ($what=="projects_list" && $c_id!="")
if ($action != "") {
    $query = "delete from project_cases where pc_c_id=" . $c_id;
    mysql_query($query) or die(mysql_error());
    $list = explode(",", substr($projects_list, 1));
    if ($projects_list != "") {
        while (list($key, $val) = each($list)) {
            $query = "insert into project_cases (pc_c_id, pc_p_id) values ('" . $c_id . "','" . $val . "')";
            mysql_query($query) or die(mysql_error());
        }
    }
    //header("Location:index.php?inc=manage_cases");
Exemplo n.º 4
0
    $query = "delete from reviews where r_id=" . $r_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_reviews");
}
if ($action == "add") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "insert into reviews (r_name, r_desc, r_date, r_status, r_p_id) values ('" . escapeChars($r_name) . "','" . stripbr(escapeChars($ta)) . "',DATE_ADD( NOW( ) , INTERVAL - " . TIME_DIFF_HOURS . " HOUR),'" . escapeChars($r_status) . "','" . escapeChars($r_p_id) . "')";
    mysql_query($query) or die(mysql_error());
    $r_id = mysql_insert_id();
    //header("Location:index.php?inc=manage_projects");
}
if ($action == "update" && $r_id != "") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "update reviews set r_name='" . escapeChars($r_name) . "', r_desc='" . stripbr(escapeChars($ta)) . "', r_status='" . escapeChars($r_status) . "', r_p_id='" . escapeChars($r_p_id) . "' where r_id=" . $r_id;
    mysql_query($query) or die(mysql_error());
    //header("Location:index.php?inc=manage_projects");
}
if ($action != "") {
    $query = "delete from review_users where ru_r_id=" . $r_id;
    mysql_query($query) or die(mysql_error());
    $list = explode(",", substr($users_list, 1));
    if ($users_list != "") {
        while (list($key, $val) = each($list)) {
            $query = "insert into review_users (ru_r_id, ru_u_id) values ('" . $r_id . "','" . $val . "')";
            mysql_query($query) or die(mysql_error());
        }
    }
    //header("Location:index.php?inc=manage_projects");
}
    $query2 .= "'" . escapeChars($open_points) . "', ";
    $query2 .= "'" . escapeChars($keywords) . "', ";
    $query2 .= "'" . escapeChars($satisfaction) . "', ";
    $query2 .= "'" . escapeChars($dissatisfaction) . "', ";
    $query2 .= "'" . escapeChars($depends) . "', ";
    $query2 .= "'" . escapeChars($conflicts) . "', ";
    $query2 .= "'" . escapeChars($author) . "', ";
    $query2 .= "'" . escapeChars($url) . "', ";
    $query2 .= "'" . escapeChars($parent) . "', ";
    $query2 .= "'" . escapeChars($position) . "', ";
    $query2 .= "'" . escapeChars($userfields) . "', ";
    $query2 .= "'" . escapeChars($creation_date) . "', ";
    $query2 .= "'" . escapeChars($last_change) . "', ";
    $query2 .= "'" . escapeChars($accepted_date) . "', ";
    $query2 .= "'" . escapeChars($accepted_user) . "', ";
    $query2 .= "'" . escapeChars($comments) . "')";
    mysql_query($query2) or die(mysql_error());
    $templates = mysql_insert_id();
}
if ($templates != "") {
    $query2 = "select * from export_fields where ef_id=" . $templates . " and ef_uid=" . $_SESSION['uid'];
    $rs = mysql_query($query2) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $description = $row['ef_description'];
        $project = $row['ef_project'];
        $subproject = $row['ef_subproject'];
        $release = $row['ef_release'];
        $test_case = $row['ef_test_case'];
        $stakeholder = $row['ef_stakeholder'];
        $glossary = $row['ef_glossary'];
        $state = $row['ef_state'];
Exemplo n.º 6
0
if (!($_SESSION['rights'] == "1" || $_SESSION['rights'] == "2" || $_SESSION['rights'] == "3" || $_SESSION['rights'] == "4" || $_SESSION['rights'] == "5")) {
    header("Location:index.php");
}
if ($action == "delete" && $k_id != "") {
    $query = "delete from keywords where k_id=" . $k_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_keywords");
}
if ($action == "add") {
    $query = "insert into keywords (k_name,k_global) values ('" . escapeChars($k_name) . "','" . escapeChars($k_global) . "')";
    mysql_query($query) or die(mysql_error());
    $k_id = mysql_insert_id();
    header("Location:index.php?inc=manage_keywords");
}
if ($action == "update" && $k_id != "") {
    $query = "update keywords set k_name='" . escapeChars($k_name) . "', k_global='" . escapeChars($k_global) . "' where k_id=" . $k_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_keywords");
}
if ($k_id != "") {
    $query = "select * from keywords where k_id=" . $k_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $k_name = htmlspecialchars($row['k_name']);
        $k_global = htmlspecialchars($row['k_global']);
    }
}
?>
<table border="0" width="50%">
  <tr valign="top">
    <td>
Exemplo n.º 7
0
//
// Page: "Homepage" - requiring login
include "inc/conn.php";
include "inc/func.php";
include "inc/conn_admin.php";
if ($_POST['username'] != "" && $_POST['password'] != "") {
    //if logged - creating session vars
    session_cache_limiter('');
    ini_set('session.gc_maxlifetime', '121600');
    $ses_username = $_POST['username'];
    $_SESSION['ses_username'] = $ses_username;
    //session_register("ses_username");
    $ses_password = $_POST['password'];
    $_SESSION['ses_password'] = $ses_password;
    //session_register("ses_password");
    $query = "select * from admin_access where aa_username='******' and aa_password='******'";
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        header("Location:frameset.html");
    }
}
?>
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK HREF="css/styles_admin.css" REL=stylesheet>
</head>
<body bgcolor=#E6E6E6 topmargin=0 leftmargin=0>
<br>
<center>
Exemplo n.º 8
0
//    GNU Affero General Public License for more details.
//
//    You should have received a copy of the GNU Affero General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------
//
// Page: "Login" - user's login
if (!isset($u_username)) {
    $u_username = "";
}
if ($u_username != "") {
    //deleting all old records from tree history
    $query = "delete from tree_history where th_date<DATE_SUB(now(), INTERVAL 1 HOUR);";
    mysql_query($query) or die(mysql_error());
    $query = "select * from users where u_username='******' and u_password='******'";
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $_SESSION['uid'] = $row['u_id'];
        $_SESSION['email'] = $row['u_email'];
        $_SESSION['username'] = stripslashes($row['u_username']);
        $_SESSION['name'] = stripslashes($row['u_name']);
        $_SESSION['rights'] = $row['u_rights'];
        if (strstr($_SESSION['http_ref'], "lost_password")) {
            header("Location:index.php");
        } elseif ($_SESSION['http_ref'] != "") {
            header("Location:index.php?" . $_SESSION['http_ref']);
        } else {
            header("Location:index.php");
        }
    } else {
Exemplo n.º 9
0
    }
    $rs = mysql_query($query) or die(mysql_error());
    if ($uf_name_en4 != "") {
        $query = "update user_fields set uf_name_en='" . escapeChars($uf_name_en4) . "', uf_name_de='" . escapeChars($uf_name_de4) . "', uf_name_fr='" . escapeChars($uf_name_fr4) . "', uf_name_it='" . escapeChars($uf_name_it4) . "', uf_text_en='" . escapeChars($uf_text_en4) . "', uf_text_de='" . escapeChars($uf_text_de4) . "', uf_text_fr='" . escapeChars($uf_text_fr4) . "', uf_text_it='" . escapeChars($uf_text_it4) . "', uf_type='" . escapeChars($uf_type4) . "', uf_values='" . escapeChars($uf_values4) . "' where uf_id=4";
    } else {
        $query = "update user_fields set uf_name_en='', uf_name_de='', uf_name_fr='', uf_name_it='', uf_text_en='', uf_text_de='', uf_text_fr='', uf_text_it='', uf_type='', uf_values='' where uf_id=4";
    }
    $rs = mysql_query($query) or die(mysql_error());
    if ($uf_name_en5 != "") {
        $query = "update user_fields set uf_name_en='" . escapeChars($uf_name_en5) . "', uf_name_de='" . escapeChars($uf_name_de5) . "', uf_name_fr='" . escapeChars($uf_name_fr5) . "', uf_name_it='" . escapeChars($uf_name_it5) . "', uf_text_en='" . escapeChars($uf_text_en5) . "', uf_text_de='" . escapeChars($uf_text_de5) . "', uf_text_fr='" . escapeChars($uf_text_fr5) . "', uf_text_it='" . escapeChars($uf_text_it5) . "', uf_type='" . escapeChars($uf_type5) . "', uf_values='" . escapeChars($uf_values5) . "' where uf_id=5";
    } else {
        $query = "update user_fields set uf_name_en='', uf_name_de='', uf_name_fr='', uf_name_it='', uf_text_en='', uf_text_de='', uf_text_fr='', uf_text_it='', uf_type='', uf_values='' where uf_id=5";
    }
    $rs = mysql_query($query) or die(mysql_error());
    if ($uf_name_en6 != "") {
        $query = "update user_fields set uf_name_en='" . escapeChars($uf_name_en6) . "', uf_name_de='" . escapeChars($uf_name_de6) . "', uf_name_fr='" . escapeChars($uf_name_fr6) . "', uf_name_it='" . escapeChars($uf_name_it6) . "', uf_text_en='" . escapeChars($uf_text_en6) . "', uf_text_de='" . escapeChars($uf_text_de6) . "', uf_text_fr='" . escapeChars($uf_text_fr6) . "', uf_text_it='" . escapeChars($uf_text_it6) . "', uf_type='" . escapeChars($uf_type6) . "', uf_values='" . escapeChars($uf_values6) . "' where uf_id=6";
    } else {
        $query = "update user_fields set uf_name_en='', uf_name_de='', uf_name_fr='', uf_name_it='', uf_text_en='', uf_text_de='', uf_text_fr='', uf_text_it='', uf_type='', uf_values='' where uf_id=6";
    }
    $rs = mysql_query($query) or die(mysql_error());
}
$query = "select * from user_fields order by uf_id asc";
$rs = mysql_query($query) or die(mysql_error());
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK HREF="css/styles_admin.css" REL=stylesheet>
</head>
<body bgcolor=#E6E6E6 topmargin=0 leftmargin=0>
Exemplo n.º 10
0
}
if ($action == "delete" && $c_id != "") {
    $query = "delete from project_components where pco_c_id=" . $c_id;
    mysql_query($query) or die(mysql_error());
    $query = "delete from components where c_id=" . $c_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_components");
}
if ($action == "add") {
    $query = "insert into components (c_name,c_global) values ('" . escapeChars($c_name) . "','" . escapeChars($c_global) . "')";
    mysql_query($query) or die(mysql_error());
    $c_id = mysql_insert_id();
    header("Location:index.php?inc=manage_components");
}
if ($action == "update" && $c_id != "") {
    $query = "update components set c_name='" . escapeChars($c_name) . "',c_global='" . escapeChars($c_global) . "' where c_id=" . $c_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_components");
}
if ($c_id != "") {
    $query = "select * from components where c_id=" . $c_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $c_name = htmlspecialchars($row['c_name']);
        $c_global = htmlspecialchars($row['c_global']);
    }
}
?>
<table border="0" width="50%">
  <tr valign="top">
    <td>
Exemplo n.º 11
0
 if ($filter2 != "") {
     $search .= " and r.r_state=" . $filter2;
 }
 if ($filter4 != "") {
     $search .= " and r.r_priority=" . $filter4;
 }
 if ($filter5 != "") {
     $query4 = "select * from comments where c_text like('%" . escapeChars($filter5) . "%')";
     $rs4 = mysql_query($query4) or die(mysql_error());
     $new_pr29 = "(0";
     while ($row4 = mysql_fetch_array($rs4)) {
         $new_pr29 .= "," . $row4['c_r_id'];
     }
     $new_pr29 .= ")";
     //$search.=" and r.r_id in ".$new_pr29;
     $search .= " and (r.r_id in " . $new_pr29 . " or (r.r_desc like ('%" . escapeChars($filter5) . "%') or r.r_source like ('%" . escapeChars($filter5) . "%') or r.r_name like ('%" . escapeChars($filter5) . "%') or r.r_userfield1 like ('%" . escapeChars($filter5) . "%') or r.r_userfield2 like ('%" . escapeChars($filter5) . "%') or r.r_userfield3 like ('%" . escapeChars($filter5) . "%') or r.r_userfield4 like ('%" . escapeChars($filter5) . "%') or r.r_userfield5 like ('%" . escapeChars($filter5) . "%') or r.r_userfield6 like ('%" . escapeChars($filter5) . "%')))";
 }
 if ($filter6 != "") {
     $search .= " and r.r_assigned_u_id=" . $filter6;
 }
 if ($filter7 != "") {
     $search .= " and CONCAT(',',r.r_release) like ('%," . $filter7 . ",%')";
     /*$query4="select * from project_releases where pr_r_id=".$filter7;
       $rs4 = mysql_query($query4) or die(mysql_error());
       $new_pr="(0";
       while($row4=mysql_fetch_array($rs4)) 
        {
         $new_pr.=",".$row4['pr_p_id'];
        } 
       $new_pr.=")";	 
       $search.=" and r.r_p_id in ".$new_pr;*/
Exemplo n.º 12
0
if ($u_email != "") {
    $query = "select * from users where u_email='" . escapeChars($u_email) . "'";
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        //creating new password
        $tmp_pass = uniqid(10);
        $query = "update users set u_password='******' where u_email='" . escapeChars($u_email) . "'";
        mysql_query($query) or die(mysql_error());
        //mailing user
        $to = $u_email;
        $from = DEFAULT_EMAIL;
        $subject = $lng[7][6];
        $headers = "Content-type: text/plain; charset=utf-8\r\n";
        $headers .= "From: " . $from . "\n\r";
        $message .= "\n\r" . $lng[7][7] . ":\n\r";
        $message .= $lng[7][8] . ": " . escapeChars($row['u_username']) . "\n\r";
        $message .= $lng[7][9] . ": " . $tmp_pass . "\n\r";
        $message .= "\n\r" . $lng[7][10] . ": " . PROJECT_URL . "\n\r";
        mail($to, $subject, $message, $headers);
        $tmp = "<br><span class='error'>" . $lng[7][4] . "</span>";
        header("Location:index.php?inc=login&lp=yes");
    } else {
        $tmp = "<br><span class='error'>" . $lng[7][5] . "</span>";
    }
}
?>
<table border="0">
  <tr valign="top">
    <td>
      <form method="post" name="f" action="">
	<table border="0" cellpadding="2" cellspacing="2" class="content" width="50%">
Exemplo n.º 13
0
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    if (!isValidDate($r_date)) {
        $tmp = $lng[14][13];
    }
    if ($r_released_date != "" && !isValidDate($r_released_date)) {
        $tmp = $lng[14][14];
    }
    if ($tmp == "") {
        $r_date = parseDate($r_date, "%d.%m.%Y");
        //parsing date into mysql format
        $r_released_date = parseDate($r_released_date, "%d.%m.%Y");
        //parsing date into mysql format
        $query = "insert into releases (r_name, r_date, r_released_date, r_global) values ('" . escapeChars($r_name) . "','" . escapeChars($r_date) . "','" . escapeChars($r_released_date) . "','" . escapeChars($r_global) . "')";
        mysql_query($query) or die(mysql_error());
        $r_id = mysql_insert_id();
        $query = "insert into project_releases (pr_p_id, pr_r_id) values ('" . $p_id . "','" . $r_id . "')";
        mysql_query($query) or die(mysql_error());
        ?>
    <script>
      <?php 
        if ($where != "1") {
            ?>
      opener.change_select();
      opener.document.forms['edit'].r_release.value+=<?php 
            echo $r_id;
            ?>
+",";
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
Exemplo n.º 14
0
	<meta name="keywords" content="<?php 
echo $lng[1][3];
?>
"/>
	<title><?php 
echo $lng[1][1];
?>
</title>
	<link rel='STYLESHEET' type='text/css' href='dhtmlxTree/samples/common/style.css'>
	<link rel="stylesheet" href="s.css" type="text/css"/>
</head>
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    $query = "insert into components (c_name,c_global) values ('" . escapeChars($c_name) . "','" . escapeChars($c_global) . "')";
    mysql_query($query) or die(mysql_error());
    $c_id = mysql_insert_id();
    $query = "insert into project_components (pco_p_id, pco_c_id) values ('" . $p_id . "','" . $c_id . "')";
    mysql_query($query) or die(mysql_error());
    ?>
    <script>
      <?php 
    if ($where != "1") {
        ?>
      opener.change_select();
      opener.document.forms['edit'].r_component.value+=<?php 
        echo $c_id;
        ?>
+",";
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
Exemplo n.º 15
0
	<title><?php 
echo $lng[1][1];
?>
</title>
	<link rel='STYLESHEET' type='text/css' href='dhtmlxTree/samples/common/style.css'>
	<link rel="stylesheet" href="s.css" type="text/css"/>
</head>
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    //work up the text
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $ta2 = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta2));
    $query = "insert into cases (c_name, c_desc, c_result, c_status, c_global) values ('" . escapeChars($c_name) . "','" . stripbr(escapeChars($ta)) . "','" . stripbr(escapeChars($ta2)) . "','" . escapeChars($c_status) . "','" . escapeChars($c_global) . "')";
    mysql_query($query) or die(mysql_error());
    $c_id = mysql_insert_id();
    $query = "insert into project_cases (pc_c_id, pc_p_id) values ('" . $c_id . "','" . $p_id . "')";
    mysql_query($query) or die(mysql_error());
    ?>
    <script>
      <?php 
    if ($where != "1") {
        ?>
      opener.change_select();
      opener.document.forms['edit'].r_c_id.value+=<?php 
        echo $c_id;
        ?>
+",";
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
Exemplo n.º 16
0
            $query = "select * from requirements where r_p_id='" . $r_p_id_tmp . "' and r_parent_id=" . $r_id . " order by r_pos asc";
            $rs = mysql_query($query) or die(mysql_error());
            $cnt = 0;
            while ($row = mysql_fetch_array($rs)) {
                $cnt++;
                $arr[] = $cnt . "|" . $row['r_id'];
                getTree2($row['r_id'], $cnt, $arr);
            }
            while ($cnt > 0 && (list($key, $val) = each($arr))) {
                //moving whole tree to new project
                $tmp_r_id = substr($val, strpos($val, "|") + 1);
                //history
                $query = "select * from requirements where r_id=" . $tmp_r_id;
                $rs = mysql_query($query) or die(mysql_error());
                if ($row = mysql_fetch_array($rs)) {
                    $query = "insert into requirements_history (r_parent_id, r_p_id, r_release, r_c_id, r_s_id, r_stakeholder, r_glossary, r_keyword, r_u_id, r_assigned_u_id, r_name, r_desc, r_state, r_type_r, r_priority, r_valid, r_link, r_satisfaction, r_dissatisfaction, r_conflicts, r_depends, r_component, r_source, r_risk, r_complexity, r_weight, r_points, r_creation_date, r_change_date, r_accept_date, r_accept_user, r_version, r_save_date, r_save_user, r_parent_id2, r_pos, r_stub, r_keywords, r_userfield1, r_userfield2, r_userfield3, r_userfield4, r_userfield5, r_userfield6) values ('" . $tmp_r_id . "','" . escapeChars($row['r_p_id']) . "','" . escapeChars($row['r_release']) . "','" . escapeChars($row['r_c_id']) . "','" . escapeChars($row['r_s_id']) . "','" . escapeChars($row['r_stakeholder']) . "','" . escapeChars($row['r_glossary']) . "','" . escapeChars($row['r_keyword']) . "','" . escapeChars($row['r_u_id']) . "','" . $row['r_assigned_u_id'] . "','" . escapeChars($row['r_name']) . "','" . escapeChars($row['r_desc']) . "','" . escapeChars($row['r_state']) . "','" . escapeChars($row['r_type_r']) . "','" . escapeChars($row['r_priority']) . "','" . escapeChars($row['r_valid']) . "','" . escapeChars($row['r_link']) . "','" . escapeChars($row['r_satisfaction']) . "','" . escapeChars($row['r_dissatisfaction']) . "','" . escapeChars($row['r_conflicts']) . "','" . escapeChars($row['r_depends']) . "','" . escapeChars($row['r_component']) . "','" . escapeChars($row['r_source']) . "','" . escapeChars($row['r_risk']) . "','" . escapeChars($row['r_complexity']) . "','" . escapeChars($row['r_weight']) . "','" . escapeChars($row['r_points']) . "','" . escapeChars($row['r_creation_date']) . "','" . escapeChars($row['r_change_date']) . "','" . escapeChars($row['r_accept_date']) . "','" . escapeChars($row['r_accept_user']) . "','" . escapeChars($row['r_version']) . "',DATE_ADD( NOW( ) , INTERVAL - " . TIME_DIFF_HOURS . " HOUR),'" . $_SESSION['uid'] . "','" . escapeChars($row['r_parent_id']) . "','" . escapeChars($row['r_pos']) . "','" . escapeChars($row['r_stub']) . "','" . escapeChars($row['r_keywords']) . "','" . escapeChars($row['r_userfield1']) . "','" . escapeChars($row['r_userfield2']) . "','" . escapeChars($row['r_userfield3']) . "','" . escapeChars($row['r_userfield4']) . "','" . escapeChars($row['r_userfield5']) . "','" . escapeChars($row['r_userfield6']) . "')";
                    mysql_query($query) or die(mysql_error());
                }
                $query = "update requirements set r_p_id='" . $r_p_id . "' where r_id=" . $tmp_r_id;
                mysql_query($query) or die(mysql_error());
            }
        }
        if ($ref == "short") {
            header("Location:index.php?inc=view_requirement&r_id=" . $r_id);
        }
        if ($ref == "long") {
            header("Location:index.php?inc=view_requirement_long&r_id=" . $r_id);
        }
    }
}
if (!isset($tmp_p_id)) {
Exemplo n.º 17
0
?>
"/>
	<title><?php 
echo $lng[1][1];
?>
</title>
	<link rel='STYLESHEET' type='text/css' href='dhtmlxTree/samples/common/style.css'>
	<link rel="stylesheet" href="s.css" type="text/css"/>
</head>
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "insert into subprojects (s_name, s_desc, s_p_id) values ('" . escapeChars($s_name) . "','" . stripbr(escapeChars($ta)) . "','" . escapeChars($p_id) . "')";
    mysql_query($query) or die(mysql_error());
    $s_id = mysql_insert_id();
    ?>
    <script>
      <?php 
    if ($where != "1") {
        ?>
      opener.change_select();
      opener.document.forms['edit'].r_s_id_tmp.value='<?php 
        echo $s_id;
        ?>
';
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
      opener.document.forms['edit'].submit();
      self.close();
Exemplo n.º 18
0
//
//    You should have received a copy of the GNU Affero General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------
//
// Page: "add/edit requirement" - editing/adding/deleting requirements
if ($viewtypefl == "y") {
    $_SESSION['viewtype'] = 0;
}
if ($_SESSION['viewtype'] == 1) {
    header("Location:index.php?inc=view_requirement_long&r_id=" . $r_id);
}
//if review comment
if ($rc_text != "") {
    $query = "insert into review_comments (rc_rev_id, rc_req_id, rc_text, rc_comment, rc_date, rc_u_id) values ('" . $review_id . "','" . $r_id . "','" . escapeChars($rc_text) . "','" . escapeChars($rc_comment) . "', now(),'" . $_SESSION['uid'] . "')";
    mysql_query($query) or die(mysql_error());
}
if ($r_id != "") {
    //check if logged
    if ($_SESSION['uid'] == "") {
        //authorization check
        $query = "select r.* from requirements r, projects p where r.r_id=" . $r_id . " and ((r.r_p_id=p.p_id and p.p_status=1) OR r.r_p_id=0)";
        $rs = mysql_query($query) or die(mysql_error());
        if ($row = mysql_fetch_array($rs)) {
        } else {
            header("Location:index.php");
        }
    } else {
        //authorization check
        $query = "select r.* from requirements r, projects p where r.r_id=" . $r_id . " and ((r.r_p_id=p.p_id and p.p_id in (" . $project_list . ")) OR r.r_p_id=0)";
    header("Location:index.php?inc=view_requirement&r_id=" . $r_id);
}
//reverting to old version
if ($r_id_old != "" && $r_id != "") {
    //add to history
    $query = "select * from requirements where r_id=" . $r_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $query = "insert into requirements_history (r_parent_id, r_p_id, r_release, r_c_id, r_s_id, r_stakeholder, r_glossary, r_keyword, r_u_id, r_assigned_u_id, r_name, r_desc, r_state, r_type_r, r_priority, r_valid, r_link, r_satisfaction, r_dissatisfaction, r_conflicts, r_depends, r_component, r_source, r_risk, r_complexity, r_weight, r_points, r_creation_date, r_change_date, r_accept_date, r_accept_user, r_version, r_save_date, r_save_user, r_parent_id2, r_pos, r_stub, r_keywords, r_userfield1, r_userfield2, r_userfield3, r_userfield4, r_userfield5, r_userfield6) values ('" . $r_id . "','" . escapeChars($row['r_p_id']) . "','" . escapeChars($row['r_release']) . "','" . escapeChars($row['r_c_id']) . "','" . escapeChars($row['r_s_id']) . "','" . escapeChars($row['r_stakeholder']) . "','" . escapeChars($row['r_glossary']) . "','" . escapeChars($row['r_keyword']) . "','" . escapeChars($row['r_u_id']) . "','" . $row['r_assigned_u_id'] . "','" . escapeChars($row['r_name']) . "','" . escapeChars($row['r_desc']) . "','" . escapeChars($row['r_state']) . "','" . escapeChars($row['r_type_r']) . "','" . escapeChars($row['r_priority']) . "','" . escapeChars($row['r_valid']) . "','" . escapeChars($row['r_link']) . "','" . escapeChars($row['r_satisfaction']) . "','" . escapeChars($row['r_dissatisfaction']) . "','" . escapeChars($row['r_conflicts']) . "','" . escapeChars($row['r_depends']) . "','" . escapeChars($row['r_component']) . "','" . escapeChars($row['r_source']) . "','" . escapeChars($row['r_risk']) . "','" . escapeChars($row['r_complexity']) . "','" . escapeChars($row['r_weight']) . "','" . escapeChars($row['r_points']) . "','" . escapeChars($row['r_creation_date']) . "',now(),'" . escapeChars($row['r_accept_date']) . "','" . escapeChars($row['r_accept_user']) . "','" . escapeChars($row['r_version']) . "',DATE_ADD( NOW( ) , INTERVAL - " . TIME_DIFF_HOURS . " HOUR),'" . $_SESSION['uid'] . "','" . escapeChars($row['r_parent_id']) . "','" . escapeChars($row['r_pos']) . "','" . escapeChars($row['r_stub']) . "','" . escapeChars($row['r_keywords']) . "','" . escapeChars($row['r_userfield1']) . "','" . escapeChars($row['r_userfield2']) . "','" . escapeChars($row['r_userfield3']) . "','" . escapeChars($row['r_userfield4']) . "','" . escapeChars($row['r_userfield5']) . "','" . escapeChars($row['r_userfield6']) . "')";
        mysql_query($query) or die(mysql_error());
    }
    //update the record with the old one
    $query = "select * from requirements_history where r_id=" . $r_id_old;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $query = "update requirements set r_name='" . escapeChars($row['r_name']) . "', r_desc='" . escapeChars($row['r_desc']) . "', r_p_id='" . escapeChars($row['r_p_id']) . "', r_release='" . escapeChars($row['r_release']) . "', r_c_id='" . escapeChars($row['r_c_id']) . "', r_s_id='" . escapeChars($row['r_s_id']) . "', r_stakeholder='" . escapeChars($row['r_stakeholder']) . "', r_glossary='" . escapeChars($row['r_glossary']) . "',  r_keyword='" . escapeChars($row['r_keyword']) . "', r_assigned_u_id='" . escapeChars($row['r_assigned_u_id']) . "',  r_state='" . escapeChars($row['r_state']) . "', r_type_r='" . escapeChars($row['r_type_r']) . "',  r_priority='" . escapeChars($row['r_priority']) . "', r_link='" . escapeChars($row['r_link']) . "',  r_satisfaction='" . escapeChars($row['r_satisfaction']) . "', r_dissatisfaction='" . escapeChars($row['r_dissatisfaction']) . "',  r_conflicts='" . escapeChars($row['r_conflicts']) . "', r_depends='" . escapeChars($row['r_depends']) . "',  r_component='" . escapeChars($row['r_component']) . "', r_source='" . escapeChars($row['r_source']) . "',  r_risk='" . escapeChars($row['r_risk']) . "', r_complexity='" . escapeChars($row['r_complexity']) . "',  r_weight='" . escapeChars($row['r_weight']) . "', r_points='" . escapeChars($row['r_points']) . "', r_creation_date='" . escapeChars($row['r_creation_date']) . "', r_change_date='" . escapeChars($row['r_change_date']) . "', r_accept_date='" . escapeChars($row['r_accept_date']) . "', r_accept_user='******'r_accept_user']) . "', r_keywords='" . escapeChars($row['r_keywords']) . "', r_userfield1='" . escapeChars($row['r_userfield1']) . "', r_userfield2='" . escapeChars($row['r_userfield2']) . "', r_userfield3='" . escapeChars($row['r_userfield3']) . "', r_userfield4='" . escapeChars($row['r_userfield4']) . "', r_userfield5='" . escapeChars($row['r_userfield5']) . "', r_userfield6='" . escapeChars($row['r_userfield6']) . "', r_stub='" . escapeChars($row['r_stub']) . "', r_version=r_version+1 where r_id=" . $r_id;
        mysql_query($query) or die(mysql_error());
    }
}
if ($r_id != "") {
    //check if logged
    if ($_SESSION['uid'] == "") {
        //authorization check
        $query = "select r.* from requirements r, projects p where r.r_id=" . $r_id . " and ((r.r_p_id=p.p_id and p.p_status=1) OR r.r_p_id=0)";
        $rs = mysql_query($query) or die(mysql_error());
        if ($row = mysql_fetch_array($rs)) {
        } else {
            header("Location:index.php");
        }
    } else {
        //authorization check
Exemplo n.º 20
0
                if ($row = mysql_fetch_array($rs)) {
                    $k_id3 = $row['k_id'];
                } else {
                    $query = "insert into keywords (k_name) values ('" . escapeChars($liste[$i][8]) . "')";
                    mysql_query($query) or die(mysql_error());
                    $k_id3 = mysql_insert_id();
                }
                $keywords .= $k_id3 . ",";
            }
            //check for date
            if ($liste[$i][3] != "") {
                $r_date = "'" . parseDate($liste[$i][3], "%d.%m.%Y") . "'";
            } else {
                $r_date = "now()";
            }
            $query = "insert into requirements (r_p_id, r_u_id, r_name, r_desc, r_state, r_type_r, r_priority,r_satisfaction,r_dissatisfaction,r_source,r_points,r_creation_date,r_change_date, r_keywords, r_parent_id) values ('" . $p_id . "','" . $u_id . "','" . escapeChars($liste[$i][4]) . "','" . escapeChars($liste[$i][5]) . "','0','0','1','5','5','" . escapeChars($liste[$i][2]) . "','" . escapeChars($liste[$i][9]) . "'," . $r_date . ",now(),'" . $keywords . "','0')";
            mysql_query($query) or die(mysql_error());
        }
        if ($cnt == 0) {
            $tmp .= "<span class='error'>" . $cnt . " " . $lng[34][12] . "</span><br>";
        } else {
            $tmp .= "<span class='error'>" . ($cnt - 1) . " " . $lng[34][12] . "</span><br>";
        }
    }
}
if (!isset($tmp)) {
    $tmp = "";
}
if ($tmp != "") {
    echo $tmp . "<br>";
}
Exemplo n.º 21
0
//    Programmed by i-nature.com
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU Affero General Public License as
//    published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
//
//    You should have received a copy of the GNU Affero General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// -----------------------------------------------------------------
//
// Page: "checking if user is logged"
session_start();
$query = "select * from admin_access where aa_username='******'ses_username']) . "' and aa_password='******'ses_password']) . "'";
$rs = mysql_query($query) or die(mysql_error());
if ($row = mysql_fetch_array($rs)) {
} else {
    ?>
  <script>parent.location.href="index.php";</script>
  <?php 
    die("Not logged!");
}
?>

Exemplo n.º 22
0
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $tmp = "<br><span class='error'>" . $lng[6][10] . "</span>";
    }
    $query = "select * from users where u_email='" . escapeChars($u_email) . "' and u_id<>" . $u_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $tmp = "<br><span class='error'>" . $lng[6][18] . "</span>";
    }
    $query = "select * from users where u_name='" . escapeChars($u_name) . "' and u_id<>" . $u_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $tmp = "<br><span class='error'>" . $lng[6][19] . "</span>";
    }
    if ($tmp == "") {
        $query = "update users set u_name='" . escapeChars($u_name) . "', u_username='******', u_email='" . escapeChars($u_email) . "', u_rights='" . escapeChars($u_rights) . "' where u_id=" . $u_id;
        mysql_query($query) or die(mysql_error());
        $query = "delete from project_users where pu_u_id=" . $u_id;
        mysql_query($query) or die(mysql_error());
        $list = explode(",", substr($users_list, 1));
        while (list($key, $val) = each($list)) {
            $query = "insert into project_users (pu_p_id, pu_u_id) values ('" . $val . "','" . $u_id . "')";
            mysql_query($query) or die(mysql_error());
        }
        header("Location:index.php?inc=manage_users");
    }
}
if ($u_id != "") {
    $query = "select * from users where u_id=" . $u_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
Exemplo n.º 23
0
     }
     $p_load = "";
     $p_id = $p_id_new;
 }
 if ($action == "add") {
     //work up the text
     $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
     $query = "insert into projects (p_name, p_phase, p_status, p_leader, p_date, p_desc, p_template, p_req_del) values ('" . escapeChars($p_name) . "','" . escapeChars($p_phase) . "','" . escapeChars($p_status) . "','" . escapeChars($p_leader) . "',DATE_ADD( NOW( ) , INTERVAL - " . TIME_DIFF_HOURS . " HOUR),'" . stripbr(escapeChars($ta)) . "','" . escapeChars($p_name) . "','" . escapeChars($p_req_del) . "')";
     mysql_query($query) or die(mysql_error());
     $p_id = mysql_insert_id();
     //header("Location:index.php?inc=manage_projects");
 }
 if ($action == "update" && $p_id != "") {
     //work up the text
     $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
     $query = "update projects set p_name='" . escapeChars($p_name) . "', p_phase='" . escapeChars($p_phase) . "', p_status='" . escapeChars($p_status) . "', p_leader='" . escapeChars($p_leader) . "', p_desc='" . stripbr(escapeChars($ta)) . "', p_template='" . escapeChars($p_template) . "', p_req_del='" . escapeChars($p_req_del) . "' where p_id=" . $p_id;
     mysql_query($query) or die(mysql_error());
     //header("Location:index.php?inc=manage_projects");
 }
 //if ($what=="users_list" && $p_id!="")
 if ($action != "") {
     $query = "delete from project_users where pu_p_id=" . $p_id;
     mysql_query($query) or die(mysql_error());
     $list = explode(",", substr($users_list, 1));
     if ($users_list != "") {
         while (list($key, $val) = each($list)) {
             $query = "insert into project_users (pu_p_id, pu_u_id) values ('" . $p_id . "','" . $val . "')";
             mysql_query($query) or die(mysql_error());
         }
     }
     //header("Location:index.php?inc=manage_projects");
Exemplo n.º 24
0
        header("Location:index.php?inc=manage_releases");
    }
}
if ($action == "update" && $r_id != "") {
    if (!isValidDate($r_date)) {
        $tmp = $lng[14][13];
    }
    if ($r_released_date != "" && !isValidDate($r_released_date)) {
        $tmp = $lng[14][14];
    }
    if ($tmp == "") {
        $r_date = parseDate($r_date, "%d.%m.%Y");
        //parsing date into mysql format
        $r_released_date = parseDate($r_released_date, "%d.%m.%Y");
        //parsing date into mysql format
        $query = "update releases set r_name='" . escapeChars($r_name) . "', r_date='" . escapeChars($r_date) . "', r_released_date='" . escapeChars($r_released_date) . "', r_global='" . escapeChars($r_global) . "' where r_id=" . $r_id;
        mysql_query($query) or die(mysql_error());
        header("Location:index.php?inc=manage_releases");
    }
}
if ($r_id != "") {
    $query = "select *, date_format(r_date, '%d.%m.%Y') as d1, date_format(r_released_date, '%d.%m.%Y') as d2 from releases where r_id=" . $r_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $r_name = htmlspecialchars($row['r_name']);
        $r_date = $row['d1'];
        $r_released_date = $row['d2'];
        $r_global = $row['r_global'];
    }
}
?>
Exemplo n.º 25
0
    $query = "delete from glossary where g_id=" . $g_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_glossary");
}
if ($action == "add") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "insert into glossary (g_name, g_term, g_abbreviation, g_desc,g_global) values ('" . escapeChars($g_name) . "','" . escapeChars($g_term) . "','" . escapeChars($g_abbreviation) . "','" . stripbr(escapeChars($ta)) . "','" . escapeChars($g_global) . "')";
    mysql_query($query) or die(mysql_error());
    $g_id = mysql_insert_id();
    header("Location:index.php?inc=manage_glossary");
}
if ($action == "update" && $g_id != "") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "update glossary set g_name='" . escapeChars($g_name) . "', g_term='" . escapeChars($g_term) . "', g_abbreviation='" . escapeChars($g_abbreviation) . "', g_desc='" . stripbr(escapeChars($ta)) . "', g_global='" . escapeChars($g_global) . "' where g_id=" . $g_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_glossary");
}
if ($g_id != "") {
    $query = "select * from glossary where g_id=" . $g_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $g_name = htmlspecialchars($row['g_name']);
        $g_term = htmlspecialchars($row['g_term']);
        $g_abbreviation = htmlspecialchars($row['g_abbreviation']);
        $g_global = htmlspecialchars($row['g_global']);
        $ta = $row['g_desc'];
    }
}
?>
Exemplo n.º 26
0
        $headers = "Content-type: text/plain; charset=utf-8\r\n";
        $headers .= "From: " . $from . "\n\r";
        $message = "\n\r" . $lng[6][12] . " " . escapeChars($u_username) . $lng[6][13] . "\n\r";
        $message .= "\n\r" . $lng[6][14] . ":\n\r";
        $message .= $lng[6][15] . ": " . escapeChars($u_username) . "\n\r";
        $message .= $lng[6][16] . ": " . escapeChars($u_password) . "\n\r";
        $message .= "\n\r" . $lng[6][17] . ": " . PROJECT_URL . "\n\r";
        mail($to, $subject, $message, $headers);
        //mailing administrator
        $to = DEFAULT_EMAIL;
        $from = DEFAULT_EMAIL;
        $subject = $lng[6][20];
        $headers = "Content-type: text/plain; charset=utf-8\r\n";
        $headers .= "From: " . $from . "\n\r";
        $message = "\n\r" . $lng[6][5] . ": " . escapeChars($u_name) . "\n\r";
        $message .= $lng[6][6] . ": " . escapeChars($u_email) . "\n\r";
        mail($to, $subject, $message, $headers);
        $query = "insert into project_users (pu_p_id, pu_u_id) values ('" . $p_id . "','" . $u_id . "')";
        mysql_query($query) or die(mysql_error());
        ?>
    <script>
      <?php 
        if ($where != "1") {
            ?>
      opener.change_select();
      opener.document.forms['edit'].r_assigned_u_id_tmp.value='<?php 
            echo $u_id;
            ?>
';
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
      opener.document.forms['edit'].submit();
Exemplo n.º 27
0
	<meta name="keywords" content="<?php 
echo $lng[1][3];
?>
"/>
	<title><?php 
echo $lng[1][1];
?>
</title>
	<link rel='STYLESHEET' type='text/css' href='dhtmlxTree/samples/common/style.css'>
	<link rel="stylesheet" href="s.css" type="text/css"/>
</head>
<body bgcolor="#ffffff">

<?php 
if ($action == "add") {
    $query = "insert into glossary (g_name, g_term, g_abbreviation, g_desc, g_global) values ('" . escapeChars($g_name) . "','" . escapeChars($g_term) . "','" . escapeChars($g_abbreviation) . "','" . stripbr(escapeChars($ta)) . "','" . escapeChars($g_global) . "')";
    mysql_query($query) or die(mysql_error());
    $g_id = mysql_insert_id();
    $query = "insert into project_glossary (pg_p_id, pg_g_id) values ('" . $p_id . "','" . $g_id . "')";
    mysql_query($query) or die(mysql_error());
    ?>
    <script>
      <?php 
    if ($where != "1") {
        ?>
      opener.change_select();
      opener.document.forms['edit'].r_glossary.value+=<?php 
        echo $g_id;
        ?>
+",";
      opener.document.forms['edit'].tmp_p_id.value=opener.document.forms['edit'].r_p_id.value;
Exemplo n.º 28
0
while ($row = mysql_fetch_array($rs)) {
    $cnt45++;
    $arr45[] = $cnt45 . "|" . $row['r_id'];
    $arr45_1[] = $row['r_id'];
    getTree2_1($row['r_id'], $cnt45, $arr45, $arr45_1);
}
?>


<?php 
//sortable columns
if ($order == "") {
    $order = "r_change_date desc";
}
//search
$filter5 = escapeChars(stripslashes($filter5));
/*
if ($filter1!="") $search.=" and r.r_u_id=".$filter1;
if ($filter2!="") $search.=" and r.r_state=".$filter2;
if ($filter4!="") $search.=" and r.r_priority=".$filter4;
if ($filter5!="") $search.=" and (r.r_desc like ('%".escapeChars($filter5)."%') or r.r_source like ('%".escapeChars($filter5)."%') or r.r_name like ('%".escapeChars($filter5)."%'))";
if ($filter6!="") $search.=" and r.r_assigned_u_id=".$filter6;
if ($filter7!="") 
 {
  $query4="select * from project_releases where pr_r_id=".$filter7;
  $rs4 = mysql_query($query4) or die(mysql_error());
  $new_pr="(0";
  while($row4=mysql_fetch_array($rs4)) 
   {
    $new_pr.=",".$row4['pr_p_id'];
   } 
Exemplo n.º 29
0
}
if ($action == "delete" && $s_id != "") {
    $query = "delete from project_stakeholders where ps_s_id=" . $s_id;
    mysql_query($query) or die(mysql_error());
    $query = "delete from stakeholders where s_id=" . $s_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_stakeholders");
}
if ($action == "add") {
    $query = "insert into stakeholders (s_name, s_function, s_email, s_interests, s_global) values ('" . escapeChars($s_name) . "','" . escapeChars($s_function) . "','" . escapeChars($s_email) . "','" . escapeChars($s_interests) . "','" . escapeChars($s_global) . "')";
    mysql_query($query) or die(mysql_error());
    $s_id = mysql_insert_id();
    header("Location:index.php?inc=manage_stakeholders");
}
if ($action == "update" && $s_id != "") {
    $query = "update stakeholders set s_name='" . escapeChars($s_name) . "', s_function='" . escapeChars($s_function) . "', s_email='" . escapeChars($s_email) . "', s_interests='" . escapeChars($s_interests) . "', s_global='" . escapeChars($s_global) . "' where s_id=" . $s_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_stakeholders");
}
if ($s_id != "") {
    $query = "select * from stakeholders where s_id=" . $s_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $s_name = htmlspecialchars($row['s_name']);
        $s_function = htmlspecialchars($row['s_function']);
        $s_email = htmlspecialchars($row['s_email']);
        $s_interests = htmlspecialchars($row['s_interests']);
        $s_global = htmlspecialchars($row['s_global']);
    }
}
?>
Exemplo n.º 30
0
    $query = "delete from subprojects where s_id=" . $s_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_subprojects");
}
if ($action == "add") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "insert into subprojects (s_name, s_desc, s_p_id) values ('" . escapeChars($s_name) . "','" . stripbr(escapeChars($ta)) . "','" . escapeChars($s_p_id) . "')";
    mysql_query($query) or die(mysql_error());
    $s_id = mysql_insert_id();
    header("Location:index.php?inc=manage_subprojects");
}
if ($action == "update" && $s_id != "") {
    //work up the text
    $ta = str_replace('<link href="styles.css" rel="stylesheet" />', '', stripslashes($ta));
    $query = "update subprojects set s_name='" . escapeChars($s_name) . "', s_desc='" . stripbr(escapeChars($ta)) . "', s_p_id='" . escapeChars($s_p_id) . "' where s_id=" . $s_id;
    mysql_query($query) or die(mysql_error());
    header("Location:index.php?inc=manage_subprojects");
}
if ($s_id != "") {
    $query = "select * from subprojects where s_id=" . $s_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $s_name = htmlspecialchars($row['s_name']);
        $s_desc = $row['s_desc'];
        $s_p_id = $row['s_p_id'];
    }
}
//projects
$query = "select * from projects where p_status<>2";
$rs = mysql_query($query) or die(mysql_error());