<?php
include('../include/admin_inc.php');
$statusedit = new admin;
$id=$_REQUEST['id'];
$cid=$_REQUEST['cid'];
if($_REQUEST['mode']=="edit")
{
$id=$_REQUEST['id'];
$status = $_REQUEST['status'];
$view = $_REQUEST['view'];
$date = date("Y-m-d");
$edit_status_flag = 1;
$admin_name = $_SESSION['usernm'];
$earlierstatus=htmlspecialchars_decode($_REQUEST['earlierstatus']);
$statusedit->editstatus($id,$status,$view,$date,$edit_status_flag,$admin_name,$earlierstatus);
}
if($_REQUEST[i]=='1')
{
?>
<script language="javascript">
window.close();
window.opener.location.href="edit_customer.php?id=<?php echo $cid;?>";
</script>
<?php
}
?>
<html>
<head>
<title>Untitled Document</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="editor/scripts/wysiwyg.js"></script>
<script language="JavaScript" type="text/javascript" src="editor/scripts/wysiwyg-settings.js"></script>
<script language="javascript1.2">
// attach the editor to the textarea with the identifier 'textarea1'.
WYSIWYG.attach('status');
</script>
<script language="javascript">function check(){return true};</script>
</head>
<body onLoad="document.frm.">
<?php
$custstatus = new admin;
$custstatus->getstatustext($id);
if($custstatus->num_rows() > 0)
{
$custstatus->next_record();
}
?>
<form name="frm" method="GET" action="<?php print $PHP_SELF; ?>" onSubmit="return check()">
<input type="hidden" name="mode" value="edit">
<input type="hidden" name="id" value="<?php echo $_REQUEST[id]; ?>">
<input type="hidden" name="cid" value="<?php echo $_REQUEST[cid]; ?>">
<input type="hidden" name="earlierstatus" value="<?php echo htmlspecialchars($custstatus->f('status_text'));?>">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2" align="center"><strong><font color="#33CC00" size="2">Edit Status</font></strong></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td colspan="2" align="left">Status Of Job :<br>
<textarea name="status" id="status"><?php echo $custstatus->f('status_text');?></textarea></td></tr>
<tr>
<td colspan="2">Visible To User :<br><select name="view"><option value="1" <?php if($custstatus->f('view_status')=="1") { echo "selected"; } ?>>Yes</option>
不确定在此网站上如何启动此问题,但是我试图在下面修复此代码,但出现此错误。
警告:使用未定义的常量i-在第18行的/home/eprovide/public_html/status/admin/edit_status.php中假定为“ i”(这会在PHP的未来版本中引发错误)
<option value="0" <?php if($custstatus->f('view_status')=="0") { echo "selected"; } ?>>No</option></select></td>
</tr>
<tr><td colspan="2" align="center"><input type="submit" value="Update"></td></tr>
</table>
</form>
</body>
</html>
答案 0 :(得分:-1)
更改此
$_REQUEST[i]
对此
$_REQUEST["i"]
然后别忘了赞我的答案并将其选择为正确的(复选标记):-)