Login   Register  
PHP Classes

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: 13 years ago
Size: 747 bytes


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>
<textarea name=content rows=20 cols=80></textarea><br>
<input type=submit>

<? } else { ?>


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

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

} ?>