当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 4

LukeZhang / wss
暂停

forked from 小老虎 / wss
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
task_type_edit.php 5.33 KB
一键复制 编辑 原始数据 按行查看 历史
陈学虎 提交于 2016-04-23 19:26 . 1.3.2版本提交
<?php require_once('config/tank_config.php'); ?>
<?php require_once('session_admin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ( empty( $_POST['task_tpye_order'] ) ){
$task_tpye_order = "task_tpye_backup1='0'";
}else{
$task_tpye_order = sprintf("task_tpye_backup1=%s", GetSQLValueString($_POST['task_tpye_order'], "text"));
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE tk_task_tpye SET task_tpye=%s, $task_tpye_order WHERE id=%s",
GetSQLValueString($_POST['task_status'], "text"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_tankdb, $tankdb);
$Result1 = mysql_query($updateSQL, $tankdb) or die(mysql_error());
$updateGoTo = "task_type_list.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['editID'])) {
$colname_Recordset1 = $_GET['editID'];
}
mysql_select_db($database_tankdb, $tankdb);
$query_Recordset1 = sprintf("SELECT * FROM tk_task_tpye WHERE id = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $tankdb) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WSS - <?php echo $multilingual_tasktype_edit; ?></title>
<link href="skin/themes/base/tk_style.css" rel="stylesheet" type="text/css" />
<link href="skin/themes/base/lhgcheck.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="srcipt/lhgcore.js"></script>
<script type="text/javascript" src="srcipt/lhgcheck.js"></script>
<script type="text/javascript">
<!--
J.check.rules = [
{name: 'task_status', mid: 'csa_text_msg', requir: true, type: '', warn: '<?php echo $multilingual_default_required4; ?>'},
{name: 'task_tpye_order', mid: 'task_tpye_order_msg', type: 'rang', min: -1, warn: '<?php echo $multilingual_default_required5; ?>' }
];
window.onload = function()
{
J.check.regform('form1');
}
//-->
</script>
<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>
<body>
<?php require('admin_head_sub.php'); ?>
<br />
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table class="filter_table" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th colspan="2" ><?php echo $multilingual_tasktype_edit; ?></th>
</tr>
</thead>
<tbody>
<tr >
<td><?php echo $multilingual_tasktype_name; ?>:<br />
<input type="text" name="task_status" id="task_status" value="<?php echo htmlentities($row_Recordset1['task_tpye'], ENT_COMPAT, 'utf-8'); ?>" size="32" class="width-p80" /><span id="csa_text_msg"></span></td>
<td><?php echo $multilingual_default_order; ?>:<br />
<input type="text" name="task_tpye_order" id="task_tpye_order" value="<?php echo htmlentities($row_Recordset1['task_tpye_backup1'], ENT_COMPAT, 'utf-8'); ?>" size="32" /><span id="task_tpye_order_msg"></span></td>
</tr>
</tbody>
<tfoot>
<tr >
<td colspan="2" ><input type="submit" value="<?php echo $multilingual_global_action_save; ?>"
<?php if( $_SESSION['MM_Username'] == $multilingual_dd_user_readonly){
echo "disabled='disabled'";
} ?>
/>
<label>
<input name="button" type="submit" id="button" onclick="MM_goToURL('self','task_type_list.php');return document.MM_returnValue" value="<?php echo $multilingual_global_action_cancel; ?>" />
</label></td>
</tr>
</tfoot>
</table>
<input type="hidden" name="MM_update" value="form1" />
<input type="hidden" name="id" value="<?php echo $row_Recordset1['id']; ?>" />
</form>
<p>&nbsp;</p>
<?php require('foot.php'); ?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/keenlove/wss.git
git@gitee.com:keenlove/wss.git
keenlove
wss
wss
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891