File: test.faqmanager.php

Recommend this page to a friend!
  Classes of Andrew Collington  >  class.faqmanager.php  >  test.faqmanager.php  >  Download  
File: test.faqmanager.php
Role: Example script
Content type: text/plain
Description: An example of how to use the class (note: you'll have to populate the database first!)
Class: class.faqmanager.php
Author: By
Last change:
Date: 18 years ago
Size: 1,764 bytes
 

Contents

Class file image Download
<?php

include "class.faqmanager.php";

$faq = new faq_viewer("user","pass","localhost");
$faq->setDBvars("test","faq_questions","faq_categories");
$faq->connectDB();

?>

<html>
<head>
    <style type="text/css">
    <!-- //
        body,td,tr,ul,li,ol,form,input,select,option,p
        {
            font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size : 10px;
        }
        a
        {
            font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size : 10px;
            text-decoration: none;
            font-weight: none;
        }
        a:hover
        {
            text-decoration: underline;
            font-weight: none;
        }
        .category
        {
            font-family : Helvetica, Arial, Geneva, Verdana, sans-serif;
            font-weight: bold;
            font-size: 14px;
            color: #003471;
        }
        .question
        {
            font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size: 12px;
        }
        .answer, .navigation
        {
            font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size : 10px;
        }
        .small
        {
            font-family : Helvetica, Arial, Geneva, Verdana, sans-serif;
            font-size: 9px;
            color: #CCCCCC;
        }
    // -->
    </style>
</head>
<body bgcolor="#FFFFFF">

<div align="center">
<table border="0" cellpadding="1" cellspacing="0" width="90%">
<tr>
    <td bgcolor="#000000">
        <table border="0" cellpadding="5" cellspacing="0" width="100%">
        <tr>
            <td align="left" bgcolor="#CECECE"><?php $faq->showSearchForm(); ?></td>
        </tr>
        <tr>
            <td valign="top" align="left" bgcolor="#FFFFFF">
            <?php
       
               
if (isset($search)) $faq->searchQuestions();
                else if (isset(
$cat)) $faq->showQuestionList();
                else
$faq->showCategoryList();
       
           
?>
</td>
        </tr>
        </table>
    </td>
</tr>
</table>
</div>

</body>
</html>


For more information send a message to info at phpclasses dot org.