All pastes #243617 Raw Edit

Untitled

public php v1 · immutable
·published 2006-11-08 18:43 UTC
rendered paste body
<?php	require_once('../dbconnect.php');	require_once('functions.php');		$query = 'SELECT * FROM clan_news ORDER BY date_entered DESC';		if ($r = mysql_query ($query)) {		if ( $_SESSION['level_id'] < 2) {			print '';		} else {		}		if ( $_SESSION['level_id'] < 2) {			while ($row = mysql_fetch_array ($r)) {				print '<table width="564" border="0" cellspacing="0" cellpadding="0">						  <tr>						    <td height="24" background="images/Decline_25.jpg"><table width="543" border="0" align="right" cellpadding="0" cellspacing="0">						      <tr>						        <td width="334"><span class="newstitle">'. $row['title'] .'</span></td>						        <td width="111"><span class="Postedby">Posted by:</span><span class="style3">'. $row['author'] .'</a></strong></span></td>						        <td width="98"><span class="Postedby">Date:</span> <span class="postedname">'. $row['date_entered'] .'</span></td>						      </tr>						    </table></td>						  </tr>						  <tr>						    <td background="images/Decline_23.jpg"><table width="543" border="0" align="center" cellpadding="0" cellspacing="0">						      <tr>						        <td><span class="infostats">'. $row['entry'] .'</span></td>						        </tr>						    </table></td>						  </tr>						  <tr>						    <td><img src="images/Decline_24.jpg" width="564" height="7" /></td>						  </tr>						</table>					';			}		} else {			while ($row = mysql_fetch_array ($r)) {				print '<table width="564" border="0" cellspacing="0" cellpadding="0">						  <tr>						    <td height="24" background="images/Decline_25.jpg"><table width="543" border="0" align="right" cellpadding="0" cellspacing="0">						      <tr>						        <td width="334"><span class="newstitle">'. $row['title'] .'</span></td>						        <td width="111"><span class="Postedby">Posted by:</span><span class="style3">'. $row['author'] .'</a></strong></span></td>						        <td width="98"><span class="Postedby">Date:</span> <span class="postedname">'. $row['date_entered'] .'</span></td>						      </tr>						    </table></td>						  </tr>						  <tr>						    <td background="images/Decline_23.jpg"><table width="543" border="0" align="center" cellpadding="0" cellspacing="0">						      <tr>						        <td><span class="infostats">'. $row['entry'] .'</span></td>						      </tr>							  <tr height="20"></tr>							  <tr>								<form action="" method="post">								<td><input name="edit" value="Edit" type="submit" />&nbsp;<input name="delete" value="Delete" type="submit" /></p></td>								</form>							  </tr>						    </table></td>						  </tr>						  <tr>						    <td><img src="images/Decline_24.jpg" width="564" height="7" /></td>						  </tr>						</table>					';				print '<div align="right"><a href="index.php?page=admin+post">Create New Post</a></div>';					if (isset ($_POST['delete']) ) {					delete_news();				}			}		}	} else {		die(mysql_error());	}		mysql_close();	?>