$var_id = $_GET["id"]; } elseif ($_POST["id"] != "") { $var_id = $_POST["id"]; } $var_country = "UnitedStates"; //$var_userid = $_SESSION["sess_staffid"]; $var_staffid = $_SESSION["sess_staffid"]; if ($_POST["postback"] == "" && $var_id != "") { $sql = "Select * from sptbl_news "; $sql .= " where nNewsId='" . mysql_real_escape_string($var_id) . "'"; $var_result = executeSelect($sql, $conn); if (mysql_num_rows($var_result) > 0) { $var_row = mysql_fetch_array($var_result); $var_title = $var_row["vTitle"]; $var_news = $var_row["tNews"]; $var_validdate = datetimefrommysql($var_row["dVaildDate"]); $vtype = $var_row["vType"]; } else { $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR . "</font>"; } } ?> <form name="frmNews" method="POST" action="<?php echo $_SERVER["REQUEST_URI"]; ?> "> <table width="100%" border="0"> <tr> <td width="76%" valign="top"> <table width="100%" border="0" cellspacing="10" cellpadding="0"> <tr>
//echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"><td> <?php echo htmlentities(trim_the_string($row["vDescription"])); ?> </td> <td><?php echo datetimefrommysql($row["dPostdate"]); ?> </td> <td><?php echo $row["vURL"]; ?> </td> <td align="center"><a href="javascript:download('<?php echo $row["nDLId"]; ?> ');"><img src="././../images/download.gif" width="13" height="13" border="0" title="<?php echo TEXT_TITLE_DOWNLOAD; ?> "></a></td> </tr> <?php
echo htmlentities($var_refno); ?> </td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td width="13%" align="left"> </td> <td width="26%" align="left" class="toplinks"><?php echo TEXT_DATE; ?> </td> <td width="61%" align="left" class="toplinks"> <?php echo datetimefrommysql(htmlentities($var_pdate)); ?> <input type=hidden name=txtDate value="<?php echo htmlentities($var_pdate); ?> "> </td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td width="13%" align="left"> </td> <td width="26%" align="left" class="toplinks"><?php echo TEXT_TILE; ?>
echo $cnt; ?> " value="<?php echo $row["nNewsId"]; ?> " class="checkbox"></td> <td><?php echo htmlentities(trim_the_string($row["vTitle"])); ?> </td> <td><?php echo datetimefrommysql($row["dPostdate"]); ?> </td> <td><?php echo datetimefrommysql($row["dVaildDate"]); ?> </td> <td width="6%" align="center"><a href="editnews.php?id=<?php echo $row["nNewsId"]; ?> &stylename=STYLENEWS&styleminus=minus11&styleplus=plus11&"><img src="././../images/edit.gif" width="13" height="13" border="0" title="<?php echo TEXT_TITLE_EDIT; ?> "></a></td> <td width="6%" align="center"><a href="javascript:deleted('<?php echo $row["nNewsId"]; ?> ');"><img src="././../images/delete.gif" width="13" height="13" border="0" title="<?php echo TEXT_TITLE_DELETE; ?>