romarc
asked on
Showing next record (page) with filter
Hi Experts, im using a url paramiter to display to my page from a data base but i need to show as a repeating region.
I need an sql stement that will show more records in that database. chapters that are taged with manual.
manual_id_book and id_manual are the common links.
my database is as follows
Recordset (adminchapters)
 id_book
 manual_id_book
 title_book
 revdate_book
 supercddate_book
Recordset (adminchapter2)
 id_manual
 name_manual
 id_level_manual
the url paramater from the chapter list is admin_chapters.php?id_book =1&id_manu al=1
this diaplays the name_manual and the id_book but doesnt recoginize the other book associated with the particular manual.
Recordset (adminchapter1) is filtered as id_book = id_book
Recordset (adminchapter2) is filtered as id_manual = id_manual  as url paramiters.
i tried to filter Recordset (adminchapter1) as manual_id_book = id_manual, this sees the oter records in that manual but directs me to the first record.
im not good at all with sql statments what tis the best way to display only those records that are taged with that manual. here is the detail page im having problems with.
first page is the detail recoord set and the net is the list that shows the chapters in that manual.
<?php require_once('../../Connec tions/roma rc.php'); ?>
<?php
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p hp');
// Load the tNG classes
require_once('../../includ es/tng/tNG .inc.php') ;
// Make unified connection variable
$conn_romarc = new KT_connection($romarc, $database_romarc);
//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_r omarc, "../../");
//Grand Levels: Level
$restrict->addLevel("3");
$restrict->Execute();
//End Restrict Access To Page
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_adminchapters = 1;
$pageNum_adminchapters = 0;
if (isset($_GET['pageNum_admi nchapters' ])) {
 $pageNum_adminchapters = $_GET['pageNum_adminchapte rs'];
}
$startRow_adminchapters = $pageNum_adminchapters * $maxRows_adminchapters;
$colname_adminchapters = "-1";
if (isset($_GET['id_book'])) {
 $colname_adminchapters = (get_magic_quotes_gpc()) ? $_GET['id_book'] : addslashes($_GET['id_book' ]);
}
mysql_select_db($database_ romarc, $romarc);
$query_adminchapters = sprintf("SELECT * FROM chapters WHERE id_book = %s", $colname_adminchapters);
$query_limit_adminchapters = sprintf("%s LIMIT %d, %d", $query_adminchapters, $startRow_adminchapters, $maxRows_adminchapters);
$adminchapters = mysql_query($query_limit_a dminchapte rs, $romarc) or die(mysql_error());
$row_adminchapters = mysql_fetch_assoc($adminch apters);
if (isset($_GET['totalRows_ad minchapter s'])) {
 $totalRows_adminchapters = $_GET['totalRows_adminchap ters'];
} else {
 $all_adminchapters = mysql_query($query_adminch apters);
 $totalRows_adminchapters = mysql_num_rows($all_adminc hapters);
}
$totalPages_adminchapters = ceil($totalRows_adminchapt ers/$maxRo ws_adminch apters)-1;
$colname_adminchapters2 = "-1";
if (isset($_GET['id_manual']) ) {
 $colname_adminchapters2 = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua l']);
}
mysql_select_db($database_ romarc, $romarc);
$query_adminchapters2 = sprintf("SELECT * FROM manuals WHERE id_manual = %s", $colname_adminchapters2);
$adminchapters2 = mysql_query($query_adminch apters2, $romarc) or die(mysql_error());
$row_adminchapters2 = mysql_fetch_assoc($adminch apters2);
$totalRows_adminchapters2 = mysql_num_rows($adminchapt ers2);
$queryString_adminchapters = "";
if (!empty($_SERVER['QUERY_ST RING'])) {
 $params = explode("&", $_SERVER['QUERY_STRING']);
 $newParams = array();
 foreach ($params as $param) {
  if (stristr($param, "pageNum_adminchapters") == false &&Â
    stristr($param, "totalRows_adminchapters") == false) {
   array_push($newParams, $param);
  }
 }
 if (count($newParams) != 0) {
  $queryString_adminchapters = "&" . htmlentities(implode("&", $newParams));
 }
}
$queryString_adminchapters = sprintf("&totalRows_adminc hapters=%d %s", $totalRows_adminchapters, $queryString_adminchapters );
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chapters for Admin</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: bold;
      color: #005A9C;
}
-->
</style>
<link href="../../ASInew.css" rel="stylesheet" type="text/css" />
<link href="../../copyright.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {font-family: Arial, Helvetica, sans-serif}
.style5 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
}
.style6 {font-size: 18}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
 var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
 for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='" +args[i+1] +"'");
}
//-->
</script>
</head>
<body>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
 <tr>
  <td valign="top"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
   <tr>
    <td valign="top"><span class="admin">
     <?php
 mxi_includes_start("header .php");
 require(basename("header.p hp"));
 mxi_includes_end();
?></span></td>
   </tr>
   <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td valign="top"><?php
 mxi_includes_start("Saluta tions.php" );
 require(basename("Salutati ons.php")) ;
 mxi_includes_end();
?></td>
      </tr>
      <tr>
       <td valign="top"><div align="center"><span class="style5"></span>
        <table width="700" border="0" cellspacing="0" cellpadding="0">
         <tr>
          <td valign="top"><div align="center">
           <?php do { ?>
            <table width="95%" border="0" cellspacing="6" cellpadding="8">
              <tr>
                <td><div align="center" class="style1"><?php echo $row_adminchapters2['descr iption_man ual']; ?></div></td>
              </tr>
              <tr>
                <td class="style5"><div align="left" class="style2 style6"><?php echo $row_adminchapters['title_ book']; ?></div></td>
              </tr>
              <tr>
                <td><div align="left"><?php echo $row_adminchapters['text_b ook']; ?></div></td>
              </tr>
             <tr>
              <td height="55" valign="top"><div align="left">
               <?php
// Show IF Conditional region1
if (@$row_adminchapters['revd ate_book'] != "") {
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Revision Date: <?php echo $row_adminchapters['revdat e_book']; ?></td>
                 </tr>
                </table>
                <?php }
// endif Conditional region1
?>
               <?php
// Show IF Conditional region2
if (@$row_adminchapters['supe rcddate_bo ok'] != "") {
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Supercid es Date: <?php echo $row_adminchapters['superc ddate_book ']; ?></td>
                 </tr>
                </table>
                <?php }
// endif Conditional region2
?>
               <?php
// Show IF Conditional region3
if (@$row_adminchapters['orig inal_date_ book'] != "") {
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Original  Date: <?php echo $row_adminchapters['origin al_date_bo ok']; ?></td>
                 </tr>
                </table>
                <?php }
// endif Conditional region3
?>
              </div></td>
             </tr>
                         </table>
            <?php } while ($row_adminchapters = mysql_fetch_assoc($adminch apters)); ?>
           <table border="0" width="33%" align="center">
            <tr>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters > 0) { // Show if not first page ?>
               <a href="<?php printf("%s?pageNum_adminch apters=%d% s", $currentPage, 0, $queryString_adminchapters ); ?>"><img src="First.gif" border=0></a>
               <?php } // Show if not first page ?>
             </td>
             <td width="31%" align="center"><?php if ($pageNum_adminchapters > 0) { // Show if not first page ?>
               <a href="<?php printf("%s?pageNum_adminch apters=%d% s", $currentPage, max(0, $pageNum_adminchapters - 1), $queryString_adminchapters ); ?>"><img src="Previous.gif" border=0></a>
               <?php } // Show if not first page ?>
             </td>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters < $totalPages_adminchapters) { // Show if not last page ?>
               <a href="<?php printf("%s?pageNum_adminch apters=%d% s", $currentPage, min($totalPages_adminchapt ers, $pageNum_adminchapters + 1), $queryString_adminchapters ); ?>"><img src="Next.gif" border=0></a>
               <?php } // Show if not last page ?>
             </td>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters < $totalPages_adminchapters) { // Show if not last page ?>
               <a href="<?php printf("%s?pageNum_adminch apters=%d% s", $currentPage, $totalPages_adminchapters, $queryString_adminchapters ); ?>"><img src="Last.gif" border=0></a>
               <?php } // Show if not last page ?>
             </td>
            </tr>
           </table>
           <br />
</div> Â Â Â Â Â Â Â Â Â Â Â <div align="center" class="style1">
            <div align="left" class="title style3"></div>
           </div></td>
         </tr>
        </table>
       </div>         <div align="center" class="style1">
          <div align="left" class="title style3"></div>
        </div></td>
      </tr>
     Â
      <tr>
       <td height="40" background="../images/Bott omBkg.gif" ><div align="right">
        <table width="700" border="0" cellspacing="0" cellpadding="6">
         <tr>
          <td width="345"><div align="left"><img src="../images/fileprint.p ng" width="22" height="22" /><span class="admin"> Printer Friendly Page </span></div></td>
          <td width="114"><div align="right">
           <input name="button" type="button" onclick="history.go(-1); return false;" value="Go Back" />
          </div></td>
          <td width="104">             <input name="delete" type="submit" id="delete" onclick="MM_goToURL('paren t','delete 1_chapter. php?id_boo k=<?php echo $row_adminchapters['id_boo k']; ?>');return document.MM_returnValue" value="Delete Chapter" />           </td>
          <td width="89"><div align="right">
           <input name="Button" type="button" onclick="MM_goToURL('paren t','edit_c hapter.php ?id_book=< ?php echo $row_adminchapters['id_boo k']; ?>&manual_id_book=<?ph p echo $row_adminchapters2['id_ma nual']; ?>');return document.MM_returnValue" value="Edit Chapter" />
          </div></td>
         </tr>
        </table>
       </div></td>
      </tr>
    </table></td>
   </tr>
  </table></td>
 </tr>
</table>
<?php
 mxi_includes_start("footer .php");
 require(basename("footer.p hp"));
 mxi_includes_end();
?></body>
</html>
<?php
mysql_free_result($adminch apters);
mysql_free_result($adminch apters2);
?>
.......................lis t page...................... .......... ........
<?php require_once('../../Connec tions/roma rc.php'); ?>
<?php
// Load the tNG classes
require_once('../../includ es/tng/tNG .inc.php') ;
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p hp');
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p hp');
// Make unified connection variable
$conn_romarc = new KT_connection($romarc, $database_romarc);
//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_r omarc, "../../");
//Grand Levels: Level
$restrict->addLevel("3");
$restrict->Execute();
//End Restrict Access To Page
$colname_adminrecord = "-1";
if (isset($_GET['id_manual']) ) {
 $colname_adminrecord = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua l']);
}
mysql_select_db($database_ romarc, $romarc);
$query_adminrecord = sprintf("SELECT * FROM chapters WHERE manual_id_book = %s ORDER BY title_book ASC", $colname_adminrecord);
$adminrecord = mysql_query($query_adminre cord, $romarc) or die(mysql_error());
$row_adminrecord = mysql_fetch_assoc($adminre cord);
$totalRows_adminrecord = mysql_num_rows($adminrecor d);
$colname_adminrecord2 = "-1";
if (isset($_GET['id_manual']) ) {
 $colname_adminrecord2 = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua l']);
}
mysql_select_db($database_ romarc, $romarc);
$query_adminrecord2 = sprintf("SELECT * FROM manuals WHERE id_manual = %s", $colname_adminrecord2);
$adminrecord2 = mysql_query($query_adminre cord2, $romarc) or die(mysql_error());
$row_adminrecord2 = mysql_fetch_assoc($adminre cord2);
$totalRows_adminrecord2 = mysql_num_rows($adminrecor d2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Manual Index</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: bold;
      color: #005A9C;
}
-->
</style>
<link href="../../includes/skins /mxkollect ion3.css" rel="stylesheet" type="text/css" />
<link href="../../ASInew.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      font-size: 16px;
      color: #666666;
}
-->
</style>
<link href="../../copyright.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
 <tr>
  <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
      <td valign="top"><?php
 mxi_includes_start("header .php");
 require(basename("header.p hp"));
 mxi_includes_end();
?></td>
     </tr>
     <tr>
      <td valign="top"><?php
 mxi_includes_start("Saluta tions.php" );
 require(basename("Salutati ons.php")) ;
 mxi_includes_end();
?></td>
     </tr>
    </table></td>
   </tr>
   <tr>
    <td valign="top" class="newmenu"></td>
   </tr>
   <tr>
    <td valign="top"><table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
      <tr>
       <td width="29%" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6">
        <tr>
         <td><?php
 mxi_includes_start("adminM enu.php");
 require(basename("adminMen u.php"));
 mxi_includes_end();
?></td>
        </tr>
       </table></td>
       <td width="71%" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="8" class="leftBorder">
         <tr>
          <td><div align="center"><span class="style1"><?php echo $row_adminrecord2['descrip tion_manua l']; ?></span></div></td>
         </tr>
         <tr>
          <td><div align="center"><span class="style3">INDEX</span ></div></t d>
         </tr>
         <tr>
          <td valign="top"><?php do { ?>
            <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
             <tr>
              <td width="4%" class="newmenu"><img src="../images/smallArrowM enu.gif" width="11" height="11" /></td>
              <td width="72%" class="newmenu"><a href="admin_chapters.php?i d_book=<?p hp echo $row_adminrecord['id_book' ]; ?>&id_manual=<?php echo $row_adminrecord2['id_manu al']; ?>"><?php echo $row_adminrecord['title_bo ok']; ?></a></td>
              <td width="24%" class="newmenu"><div align="right">
                <?php
//Show If User Is Logged In (region1)
$isLoggedIn = new tNG_UserLoggedIn($conn_rom arc);
//Grand Levels: Level
$isLoggedIn->addLevel("3") ;
if ($isLoggedIn->Execute()) {
?>
                <table width="100" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td><div align="right"><a href="edit_chapter.php?id_ book=<?php echo $row_adminrecord['id_book' ]; ?>&id_manual=<?php echo $row_adminrecord2['id_manu al']; ?>">Edit</a></div></td>
                 </tr>
                </table>
               <?php
}
//End Show If User Is Logged In (region1)
?>
              </div></td>
             </tr>
             <tr>
              <td height="4" colspan="3" class="newmenu"><hr size="1" /></td>
             </tr>
            </table>
           <?php } while ($row_adminrecord = mysql_fetch_assoc($adminre cord)); ?>
            <table width="100%" border="0" cellspacing="23" cellpadding="9">
             <tr>
              <td><div align="right">
               <input name="button" type="button" onclick="history.go(-1); return false;" value="Go Back" />
</div></td>
             </tr>
            </table>
            <p> </p></td>
         </tr>
       </table></td>
      </tr>
    </table></td>
   </tr>
   <tr>
    <td height="40" background="../images/Bott omBkg.gif" > </t d>
   </tr>
  </table></td>
 </tr>
</table>
<?php
 mxi_includes_start("footer .php");
 require(basename("footer.p hp"));
 mxi_includes_end();
?></body>
</html>
<?php
mysql_free_result($adminre cord);
mysql_free_result($adminre cord2);
?>
I need an sql stement that will show more records in that database. chapters that are taged with manual.
manual_id_book and id_manual are the common links.
my database is as follows
Recordset (adminchapters)
 id_book
 manual_id_book
 title_book
 revdate_book
 supercddate_book
Recordset (adminchapter2)
 id_manual
 name_manual
 id_level_manual
the url paramater from the chapter list is admin_chapters.php?id_book
this diaplays the name_manual and the id_book but doesnt recoginize the other book associated with the particular manual.
Recordset (adminchapter1) is filtered as id_book = id_book
Recordset (adminchapter2) is filtered as id_manual = id_manual  as url paramiters.
i tried to filter Recordset (adminchapter1) as manual_id_book = id_manual, this sees the oter records in that manual but directs me to the first record.
im not good at all with sql statments what tis the best way to display only those records that are taged with that manual. here is the detail page im having problems with.
first page is the detail recoord set and the net is the list that shows the chapters in that manual.
<?php require_once('../../Connec
<?php
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p
// Load the tNG classes
require_once('../../includ
// Make unified connection variable
$conn_romarc = new KT_connection($romarc, $database_romarc);
//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_r
//Grand Levels: Level
$restrict->addLevel("3");
$restrict->Execute();
//End Restrict Access To Page
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_adminchapters = 1;
$pageNum_adminchapters = 0;
if (isset($_GET['pageNum_admi
 $pageNum_adminchapters = $_GET['pageNum_adminchapte
}
$startRow_adminchapters = $pageNum_adminchapters * $maxRows_adminchapters;
$colname_adminchapters = "-1";
if (isset($_GET['id_book'])) {
 $colname_adminchapters = (get_magic_quotes_gpc()) ? $_GET['id_book'] : addslashes($_GET['id_book'
}
mysql_select_db($database_
$query_adminchapters = sprintf("SELECT * FROM chapters WHERE id_book = %s", $colname_adminchapters);
$query_limit_adminchapters
$adminchapters = mysql_query($query_limit_a
$row_adminchapters = mysql_fetch_assoc($adminch
if (isset($_GET['totalRows_ad
 $totalRows_adminchapters = $_GET['totalRows_adminchap
} else {
 $all_adminchapters = mysql_query($query_adminch
 $totalRows_adminchapters = mysql_num_rows($all_adminc
}
$totalPages_adminchapters = ceil($totalRows_adminchapt
$colname_adminchapters2 = "-1";
if (isset($_GET['id_manual'])
 $colname_adminchapters2 = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua
}
mysql_select_db($database_
$query_adminchapters2 = sprintf("SELECT * FROM manuals WHERE id_manual = %s", $colname_adminchapters2);
$adminchapters2 = mysql_query($query_adminch
$row_adminchapters2 = mysql_fetch_assoc($adminch
$totalRows_adminchapters2 = mysql_num_rows($adminchapt
$queryString_adminchapters
if (!empty($_SERVER['QUERY_ST
 $params = explode("&", $_SERVER['QUERY_STRING']);
 $newParams = array();
 foreach ($params as $param) {
  if (stristr($param, "pageNum_adminchapters") == false &&Â
    stristr($param, "totalRows_adminchapters")
   array_push($newParams, $param);
  }
 }
 if (count($newParams) != 0) {
  $queryString_adminchapters
 }
}
$queryString_adminchapters
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chapters for Admin</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: bold;
      color: #005A9C;
}
-->
</style>
<link href="../../ASInew.css" rel="stylesheet" type="text/css" />
<link href="../../copyright.css"
<style type="text/css">
<!--
.style3 {font-family: Arial, Helvetica, sans-serif}
.style5 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
}
.style6 {font-size: 18}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
 var i, args=MM_goToURL.arguments;
 for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"
}
//-->
</script>
</head>
<body>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
 <tr>
  <td valign="top"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
   <tr>
    <td valign="top"><span class="admin">
     <?php
 mxi_includes_start("header
 require(basename("header.p
 mxi_includes_end();
?></span></td>
   </tr>
   <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td valign="top"><?php
 mxi_includes_start("Saluta
 require(basename("Salutati
 mxi_includes_end();
?></td>
      </tr>
      <tr>
       <td valign="top"><div align="center"><span class="style5"></span>
        <table width="700" border="0" cellspacing="0" cellpadding="0">
         <tr>
          <td valign="top"><div align="center">
           <?php do { ?>
            <table width="95%" border="0" cellspacing="6" cellpadding="8">
              <tr>
                <td><div align="center" class="style1"><?php echo $row_adminchapters2['descr
              </tr>
              <tr>
                <td class="style5"><div align="left" class="style2 style6"><?php echo $row_adminchapters['title_
              </tr>
              <tr>
                <td><div align="left"><?php echo $row_adminchapters['text_b
              </tr>
             <tr>
              <td height="55" valign="top"><div align="left">
               <?php
// Show IF Conditional region1
if (@$row_adminchapters['revd
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Revision
                 </tr>
                </table>
                <?php }
// endif Conditional region1
?>
               <?php
// Show IF Conditional region2
if (@$row_adminchapters['supe
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Supercid
                 </tr>
                </table>
                <?php }
// endif Conditional region2
?>
               <?php
// Show IF Conditional region3
if (@$row_adminchapters['orig
?>
                <table border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td width="232" class="copyright">Original
                 </tr>
                </table>
                <?php }
// endif Conditional region3
?>
              </div></td>
             </tr>
                         </table>
            <?php } while ($row_adminchapters = mysql_fetch_assoc($adminch
           <table border="0" width="33%" align="center">
            <tr>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters > 0) { // Show if not first page ?>
               <a href="<?php printf("%s?pageNum_adminch
               <?php } // Show if not first page ?>
             </td>
             <td width="31%" align="center"><?php if ($pageNum_adminchapters > 0) { // Show if not first page ?>
               <a href="<?php printf("%s?pageNum_adminch
               <?php } // Show if not first page ?>
             </td>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters < $totalPages_adminchapters)
               <a href="<?php printf("%s?pageNum_adminch
               <?php } // Show if not last page ?>
             </td>
             <td width="23%" align="center"><?php if ($pageNum_adminchapters < $totalPages_adminchapters)
               <a href="<?php printf("%s?pageNum_adminch
               <?php } // Show if not last page ?>
             </td>
            </tr>
           </table>
           <br />
</div> Â Â Â Â Â Â Â Â Â Â Â <div align="center" class="style1">
            <div align="left" class="title style3"></div>
           </div></td>
         </tr>
        </table>
       </div>         <div align="center" class="style1">
          <div align="left" class="title style3"></div>
        </div></td>
      </tr>
     Â
      <tr>
       <td height="40" background="../images/Bott
        <table width="700" border="0" cellspacing="0" cellpadding="6">
         <tr>
          <td width="345"><div align="left"><img src="../images/fileprint.p
          <td width="114"><div align="right">
           <input name="button" type="button" onclick="history.go(-1); return false;" value="Go Back" />
          </div></td>
          <td width="104">             <input name="delete" type="submit" id="delete" onclick="MM_goToURL('paren
          <td width="89"><div align="right">
           <input name="Button" type="button" onclick="MM_goToURL('paren
          </div></td>
         </tr>
        </table>
       </div></td>
      </tr>
    </table></td>
   </tr>
  </table></td>
 </tr>
</table>
<?php
 mxi_includes_start("footer
 require(basename("footer.p
 mxi_includes_end();
?></body>
</html>
<?php
mysql_free_result($adminch
mysql_free_result($adminch
?>
.......................lis
<?php require_once('../../Connec
<?php
// Load the tNG classes
require_once('../../includ
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p
// Require the MXI classes
require_once ('../../includes/mxi/MXI.p
// Make unified connection variable
$conn_romarc = new KT_connection($romarc, $database_romarc);
//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_r
//Grand Levels: Level
$restrict->addLevel("3");
$restrict->Execute();
//End Restrict Access To Page
$colname_adminrecord = "-1";
if (isset($_GET['id_manual'])
 $colname_adminrecord = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua
}
mysql_select_db($database_
$query_adminrecord = sprintf("SELECT * FROM chapters WHERE manual_id_book = %s ORDER BY title_book ASC", $colname_adminrecord);
$adminrecord = mysql_query($query_adminre
$row_adminrecord = mysql_fetch_assoc($adminre
$totalRows_adminrecord = mysql_num_rows($adminrecor
$colname_adminrecord2 = "-1";
if (isset($_GET['id_manual'])
 $colname_adminrecord2 = (get_magic_quotes_gpc()) ? $_GET['id_manual'] : addslashes($_GET['id_manua
}
mysql_select_db($database_
$query_adminrecord2 = sprintf("SELECT * FROM manuals WHERE id_manual = %s", $colname_adminrecord2);
$adminrecord2 = mysql_query($query_adminre
$row_adminrecord2 = mysql_fetch_assoc($adminre
$totalRows_adminrecord2 = mysql_num_rows($adminrecor
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Manual Index</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: bold;
      color: #005A9C;
}
-->
</style>
<link href="../../includes/skins
<link href="../../ASInew.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      font-size: 16px;
      color: #666666;
}
-->
</style>
<link href="../../copyright.css"
<style type="text/css">
<!--
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
 <tr>
  <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
      <td valign="top"><?php
 mxi_includes_start("header
 require(basename("header.p
 mxi_includes_end();
?></td>
     </tr>
     <tr>
      <td valign="top"><?php
 mxi_includes_start("Saluta
 require(basename("Salutati
 mxi_includes_end();
?></td>
     </tr>
    </table></td>
   </tr>
   <tr>
    <td valign="top" class="newmenu"></td>
   </tr>
   <tr>
    <td valign="top"><table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
      <tr>
       <td width="29%" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="6">
        <tr>
         <td><?php
 mxi_includes_start("adminM
 require(basename("adminMen
 mxi_includes_end();
?></td>
        </tr>
       </table></td>
       <td width="71%" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="8" class="leftBorder">
         <tr>
          <td><div align="center"><span class="style1"><?php echo $row_adminrecord2['descrip
         </tr>
         <tr>
          <td><div align="center"><span class="style3">INDEX</span
         </tr>
         <tr>
          <td valign="top"><?php do { ?>
            <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
             <tr>
              <td width="4%" class="newmenu"><img src="../images/smallArrowM
              <td width="72%" class="newmenu"><a href="admin_chapters.php?i
              <td width="24%" class="newmenu"><div align="right">
                <?php
//Show If User Is Logged In (region1)
$isLoggedIn = new tNG_UserLoggedIn($conn_rom
//Grand Levels: Level
$isLoggedIn->addLevel("3")
if ($isLoggedIn->Execute()) {
?>
                <table width="100" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                  <td><div align="right"><a href="edit_chapter.php?id_
                 </tr>
                </table>
               <?php
}
//End Show If User Is Logged In (region1)
?>
              </div></td>
             </tr>
             <tr>
              <td height="4" colspan="3" class="newmenu"><hr size="1" /></td>
             </tr>
            </table>
           <?php } while ($row_adminrecord = mysql_fetch_assoc($adminre
            <table width="100%" border="0" cellspacing="23" cellpadding="9">
             <tr>
              <td><div align="right">
               <input name="button" type="button" onclick="history.go(-1); return false;" value="Go Back" />
</div></td>
             </tr>
            </table>
            <p> </p></td>
         </tr>
       </table></td>
      </tr>
    </table></td>
   </tr>
   <tr>
    <td height="40" background="../images/Bott
   </tr>
  </table></td>
 </tr>
</table>
<?php
 mxi_includes_start("footer
 require(basename("footer.p
 mxi_includes_end();
?></body>
</html>
<?php
mysql_free_result($adminre
mysql_free_result($adminre
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.