Location: PHPKode > projects > PHPDug > adm/search_stories2.php
<?php
require_once("../includes/config.php");
require_once("../includes/functions/func.global.php");
require_once("../includes/functions/loggincheck.php");
require_once('../includes/lang/admin/lang_'.$config['lang'].'.php');
require_once("class.menu.php");

// Connect to database
db_connect($config);

$obj = new Menu();
$nav = $obj->get_js_menu(0,$config,$lang);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PHPDug Admin - <?php echo $lang['SEARCHSTOR']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="images/style.css">
<SCRIPT LANGUAGE="JavaScript" SRC="menu/JSCookMenu.js"></SCRIPT>
<LINK REL="stylesheet" HREF="menu/themes/Office/theme.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="menu/themes/Office/theme.js"></SCRIPT>
<LINK REL="stylesheet" HREF="menu/themes/Office/theme.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="menu/themes/Office/theme.js"></SCRIPT>
<script language="JavaScript"><!--
function checkBox(theBox){
  var aBox = theBox.form["list[]"];
  var selAll = false;
  var i;
  for(i=0;i<aBox.length;i++){
    if(aBox[i].checked==false) selAll=true;
  }
  if(theBox.name=="selall"){
    for(i=0;i<aBox.length;i++){
      aBox[i].checked = selAll;
    }
    selAll = !selAll;
  }
  //theBox.form.selall.checked = selAll;
}
function init(){
  var theForm = document.f1;
  var aBox = theForm["list[]"];
  var selAll = false;
  var i;
  for(i=0;i<aBox.length;i++){
    if(aBox[i].checked==false) selAll=true;
    aBox[i].onclick = function(){checkBox(this)};
  }
  //theForm.selall.checked = selAll;
}
//--></script>
</head>
<body>
<!--Start top-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%" height="42" align="left" background="images/bg_top.gif"><a href="index.php"><img src="images/logo.gif" width="127" height="37" hspace="10" border="0"></a></td>
  </tr>
  <tr>
    <td><img src="images/dot.gif" width="1" height="1" alt=""></td>
  </tr>
</table>
<!--End top-->
<!--Start topmenu-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#F0F0F0" height="25" style="padding-left:20px;" id="menu"><SCRIPT language="JavaScript" type="text/javascript">
			var myMenu =
				
			// Start the menu
[
<?php echo $nav; ?>
];				

			// Output the menu
			cmDraw ('menu', myMenu, 'hbr', cmThemeOffice, 'ThemeOffice');
			</SCRIPT></td>
  </tr>
  <tr>
    <td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
  </tr>
</table>
<br>

<!--End topmenu-->
<!--Start heading page-->
<table width="850" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="heading"><img src="images/icons/icon_search.gif" width="22" height="23" alt="" align="absmiddle" hspace="5"><?php echo $lang['SEARCHSTOR']; ?></td>
</tr>
<tr>
<td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
</table>
<!--End heading page-->
<!--Start form-->
<br>
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #CCCCCC;">
  <tr>
    <td align="center" bgcolor="#F6F6F6" style="padding:15px;"><div align="right">
        <form action="stories_delete.php" method="post" name="f1" id="f1">
          <div align="right"> <br>
          </div>
          <table width="99%" border="0" align="center" cellpadding="2" cellspacing="0">
            <tr bgcolor="#FF9900">
              <td width="50" height="30"><div align="center">
                  <input type="checkbox" name="selall" value="checkbox" onClick="checkBox(this)">
              </div></td>
              <td height="30" bgcolor="#FF9900" class="rowheader"><?php echo $lang['STORTITLE']; ?></td>
            </tr>
            <tr>
              <td height="1" colspan="2" bgcolor="#000000"><img src="images/dot.gif" height="1"></td>
            </tr>
            <?php
$count = 0;
$counter = 0;

$query = "SELECT story_id,story_title FROM ".$config['db']['pre']."stories WHERE story_id='".addslashes($_POST['id'])."' LIMIT 1";
$query_result = mysql_query($query);
while ($info = @mysql_fetch_array($query_result))
{
	$counter++;
	IF($count == 0)
	{
		$colour = '#F7F7F7';
		$count = 1;
	}
	ELSE
	{
		$colour = '#EFEFEF';
		$count = 0;
	}
?>
            <tr bgcolor="<? echo $colour; ?>">
              <td width="50" height="25" align="center"><input type="hidden" name="titles[]" id="titles[]" value="<? echo $info['story_title']; ?>">
                  <input type="checkbox" name="list[]" id="list[]" value="<? echo $info['story_id']; ?>"></td>
              <td height="25"><span class="title1"><? echo $info['story_title']; ?></span></td>
            </tr>
            <?php
}
?>
            <tr bgcolor="#000000">
              <td height="1" colspan="2"></td>
            </tr>
          </table>
          <div align="left"> <br>
              <table width="99%"  border="0" align="center" cellpadding="2" cellspacing="0">
                <tr>
                  <td width="200" valign="middle"><?php echo $lang['WITHSEL']; ?>&nbsp;
                  <input name="imageField" type="image" src="images/button_empty.gif" width="11" height="13" border="0"></td>
                  <td valign="middle"><div align="center"><span class="style5 style6"><?php echo $lang['SHOWING']; ?> 1-<? echo $counter; ?> <?php echo $lang['OF']; ?> <? echo $counter; ?> <?php echo $lang['RESULTS']; ?></span></div></td>
                  <td width="200" valign="middle">&nbsp;</td>
                </tr>
              </table>
          </div>
        </form>
    </div></td>
  </tr>
</table>
<!--End form-->
<br><br>
<!--Start bottom-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td style="padding:15px;" align="center">
<span class="copyright">Copyright &copy; 2008 <a href="http://www.kubelabs.com/phpdug/" class="copyright" target="_blank">Kubelabs.com</a> All Rights Reserved.</span></td>
</tr>
</table>
<!--End bottom-->
</body>
</html>
Return current item: PHPDug