Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Steven Haryanto  >  StoryPager  >  demo.php  >  Download  
File: demo.php
Role: ???
Content type: text/plain
Description: an example
Class: StoryPager
Author: By
Last change:
Date: 2000-12-14 06:59
Size: 747 bytes
 

Contents

Class file image Download
<a href=demo.phps>source code</a><br>

<? require "StoryPager.lib"; $pager=new StoryPager; ?>

<? if (!$content) { ?>

<form method=POST>
target_nop:<br><input name=target_nop><br>
optimum_pl:<br><input name=optimum_pl><br>
even_paging: <input type=checkbox name=even_paging><br>
text:<br>
<textarea name=content rows=20 cols=80></textarea><br>
<input type=submit>
</form>

<? } else { ?>

<?

    if ($target_nop) $pager->target_nop($target_nop);
    if ($optimum_pl) $pager->optimum_pl($optimum_pl);
    $pager->even_paging($even_paging ? 1:0);

    $pager->split($content);
    foreach ($pager->pages as $page) {
        echo "<p>page ", ++$i, ", length = ", strlen($page), "<hr>";
        echo $page;
    }

} ?>