• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP escapeChars函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中escapeChars函数的典型用法代码示例。如果您正苦于以下问题:PHP escapeChars函数的具体用法?PHP escapeChars怎么用?PHP escapeChars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了escapeChars函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: submitOrder2

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;
}
开发者ID:teungri,项目名称:RequirementsApp,代码行数:55,代码来源:ajax.php


示例2: stakeholders

	<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;
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:popup_stakeholder.php


示例3: header

    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");
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:edit_case.php


示例4: mysql_query

    $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");
}
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:edit_review.php


示例5: escapeChars

    $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'];
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:pdf_project_fields.php


示例6: header

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>
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:edit_keyword.php


示例7: session_cache_limiter

//
// 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='" . escapeChars($ses_username) . "' and aa_password='" . pw($ses_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>
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:index.php


示例8: mysql_query

//    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='" . escapeChars($u_username) . "' and u_password='" . pw($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 {
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:login.php


示例9: mysql_query

    }
    $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>
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:fields.php


示例10: mysql_query

}
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>
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:edit_component.php


示例11: like

 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;*/
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:view_all.php


示例12: escapeChars

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='" . pw($tmp_pass) . "' 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%">
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:lost_password.php


示例13: parseDate

<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;
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:popup_release.php


示例14: components

	<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;
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:popup_component.php


示例15: str_replace

	<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;
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:popup_testcase.php


示例16: mysql_query

            $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)) {
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:edit_requirement.php


示例17: str_replace

?>
"/>
	<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();
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:popup_subproject.php


示例18: header

//
//    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)";
开发者ID:teungri,项目名称:RequirementsApp,代码行数:31,代码来源:view_requirement.php


示例19: header

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP escapeShellCmd函数代码示例发布时间:2022-05-15
下一篇:
PHP escape函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap