HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/old-myadmin/NewUpdate/modify.php
<?php
if (!defined('WEB_ROOT')) {
	exit;
}

if (isset($_GET['Id']) && $_GET['Id'] > 0) {
	$Id = $_GET['Id'];
} else {
	header('Location: index.php');
}
function pdflist()
{
$sql = "select pdf_title, pdf_url from mypdf"; 
$result = mysql_query($sql) or die("ERROR:".mysql_error());
$num_row = mysql_num_fields($result);
$row1 = mysql_num_rows($result);
while ($row = mysql_fetch_row($result))
	{
	print ('<option value="'.$row[1].'" >'.$row[0]."</option>");
	}
}
// get product info
$sql = "SELECT * FROM newupdate WHERE nw_id = $Id";
$result = mysql_query($sql);
$row    = mysql_fetch_assoc($result);
extract($row);
?> 
<div id="ptitle"> :.: NEWS &amp; UPDATES >> EDIT Details </div>
<form action="processNew.php?action=modifyNews&Id=<?php echo $Id; ?>" method="post" enctype="multipart/form-data" name="frmModifyDeal" id="frmModifyDeal">
<script>
  function myshow()
  {
   var a = document.getElementById('opt').value;
   document.getElementById('nwlink').value = 'http://www.sbsc.in/pdf/' + a;
   if(document.getElementById('nwlink').value == 'pdf/Select PDF / DOC')
	{document.getElementById('nwlink').value = '';}
  }
</script>
 <p align="center" class="formTitle">Modify Details</p>
 
 <table border="0" cellspacing="2"  id="table1">
	<tr>
		<td>Title</td>
		<td><input type="text" name="nw_title" value="<?php echo $nw_title; ?>" size="100" ></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td valign="top"></td>
		<td><a href="<?php echo $nw_link; ?>" target="_black" >View OLD LINK</a></td>
		<td></td>
	</tr>
		<tr>
		<td valign="bottom">Select NEW PDF To Link</td>
		<td> OR <br /> <br />
		<select id="opt" name="prodid" onchange="myshow()" style="width:300px;" >
		<option selected >Select PDF / DOC</option>
		<?php pdflist(); ?> </select></td>
		<td></td>
	</tr>
	<tr>
		<td valign="top">Or Past Direct Links</td>
		<td><input type="text" name="nwlink" id="nwlink" size="100" maxlength="45">
		<br/>
		(Note: OR Paste Full URL Eg. "http://www.sbsc.in/gallery.php" )
		</td>
		<td></td>
	</tr>
</table>
 <p align="center"> 
  <input name="btnModifyDeal" type="submit" id="btnModifyDeal" value="Modify Detail" onClick="checkAddDealForm();" class="box">
  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="box">  
 </p>
</form>