<?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>
Not sure how to start this problem here on this website but I am trying to fix this code below, I get this error.
Warning: Use of undefined constant i - assumed 'i' (this will throw an Error in a future version of PHP) in /home/eprovide/public_html/status/admin/edit_status.php on line 18
<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>