Location: PHPKode > scripts > CodeKit > codekit/ck_setup_php.html
<title>CodeKit PHP Source Code Setup</title>
<link rel="STYLESHEET" type="text/css" href="main.css">

  Copyright (C) 2003 John Gorman <hide@address.com>

<body bgcolor="#F0FFFF" text="#000000"
      link="#873852" vlink="#873852" alink="#B52E2E">

<table width="600">

<div align="right">
[<a href="ck_schema.html">Code Table Setup</a>]
[<a href="index.html">Index</a>]
[<a href="ck_setup_perl.html">Perl Setup</a>]

<a href="http://www.webbysoft.com/codekit">CodeKit</a>
PHP Source Code Setup</h2></center>

Read the <a href="ck_overview.html">Overview</a> and the
<a href="ck_schema.html">Code Table Setup</a> pages first.

The CodeKit PHP source code is in the php directory:

    CodeKit.php        - CodeKit class definition.
    ck_admin.php       - Setup for ck_admin_main.inc.
    ck_admin_main.inc  - CodeKit Administration page.
    ck_connect.inc     - Database connection setup.
    ck_demo.php        - CodeKit demo page.
    TEST               - Run t/test.t
    t/test.t           - Regression testing.

CodeKit requires the PEAR DB library or phplib.

<h4>1. Database Schema and Core Record Loading</h4>

Read and follow directions for
<a href="ck_schema.html">Code Table Setup</a>.

Load and test the ck_code table schema definition as well
as the core data records.  If you want to run the demo
load the demo data records.

<h4>2. Database Connection Setup</h4>

Customize the ck_connect.inc file to open
a database handle to your database.  If your application
setup has already opened a database handle, use that
handle instead of opening a new one.  The handle
should be set up to autocommit.

ck_connect.inc is used by ck_admin.php, ck_demo.php
and by t/test.t.

<h4>3. CodeKit.php Installation</h4>

Copy the CodeKit.php file into a directory on your php
include_path so that your application code can require it. 

Run the TEST script to test the basic CodeKit class
functions.  This WILL FAIL unless you have completed
the above steps!!!

<h4>4. CodeKit Administration Page Setup</h4>

You may wish to customize the ck_admin.php file to your situation:

Require and open a <a href="ck_new_php.html">CodeKit handle</a>.
Set the $perm_add, $perm_upd and $perm_del global variables.
These let the user add, update and delete codes.
Define the cka_sess_url() function.  Customize this if
you are carrying session identifiers in your urls.
Require ck_admin_main.inc and call the cka_admin_main() function.

It is fine to make multiple copies of ck_admin.php
to set up different permissions for different classes
of users.

<h4>5. Demo Page Setup</h4>

In order for the demo page to function, you will need
to load the <a href="ck_schema.html#demodata">demo data records</a>.

<div align="right">
[<a href="ck_schema.html">Code Table Setup</a>]
[<a href="index.html">Index</a>]
[<a href="ck_setup_perl.html">Perl Setup</a>]


Return current item: CodeKit