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/add.php
<?php

if (!defined('WEB_ROOT')) {
	exit;
}
function pdflist()
{
if (isset($_GET['id']) && (int)$_GET['id'] > 0) {
		$pdfid = (int)$_GET['id'];
	$sql = "select pdf_title, pdf_url from mypdf where pdf_id='$pdfid'";
	}
	elseif (isset($_GET['view'])) {
$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>");
	}
}
?> 
<div id="ptitle"> :.: NEWS &amp; UPDATES >> Add New </div>
<form onload="pdflist()" action="processNew.php?action=add" method="post" enctype="multipart/form-data" onsubmit="return checkAddForm()" name="frmAdd" id="frmAdd">
<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>
<table  width="90%" border="0" cellspacing="2"  id="table1">
<tr>
 <td align="center" colspan="3"> <p align="center" class="formTitle"><h2>Add New Update</h2> </p> </td>
 </tr>
 <tr>
		<td>Title</td>
		<td><input type="text" id="Title" name="Title" size="100" ></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>Select PDF To Link</td>
		<td><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">Links</td>
		<td><input type="text" name="nwlink" id="nwlink" size="100" maxlength="100">
		<br/>
		<br/>
		</td>
		<td></td>
	</tr>
</table>
 <p align="center"> 
  <input name="btnAddDeal" type="submit" id="btnAddDeal" value="Add" style="width:150px; height:30px; font-weight:bold;">
  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" style="width:150px; height:30px; font-weight:bold;">  
 </p>
</form>