Example #1
0
}
?>
 />
			</p>
			
			<p>Short Description:<br />
            <textarea name = "description" rows = "4" cols = "36" class="short"> <?php 
echo htmlentities($current_page["description"]);
?>
 </textarea>
			</p>
			
			<p><label>Content:<br />
				<?php 
// need process output content. remove escaple string character "/"
$page_content = utility::remove_escape($current_page["content"]);
?>
            <textarea name = "content" rows = "4" cols = "36"> <?php 
echo $page_content;
?>
 </textarea>
         	</label>
			</p>
			
			<input type="submit" name="submit" value="Edit Page" />
			
		</form>
		
		<br />
		<a href="manage_content.php?page=<?php 
echo urlencode($current_page["id"]);
 /**
  * print content at manage_content.php to print accordion
  * @param int $display_num to limit the number of record to display
  * @return HTML
  */
 public static function print_pages_at_manage_content($display_num)
 {
     global $dbo;
     $content_page = self::find_all_pages(false);
     $count = 0;
     $output = "<div id = \"accordion\">";
     while ($page = $dbo->fetch_assoc($content_page)) {
         if ($count < $display_num) {
             $output .= "<h2>" . htmlentities($page["menu_name"]) . "</h2>";
             $output .= "<div><p>" . nl2br(utility::remove_escape(htmlentities($page["content"]))) . "</p></div>";
         } else {
             break;
         }
         $count++;
     }
     $output .= "</div> ";
     return $output;
 }
Example #3
0
     */
    //1. the current page number($current_page)
    $paginate = !empty($_GET['paginate']) ? (int) $_GET['paginate'] : 1;
    //2. records per page ($per_page)
    $per_page = 3;
    //3. total record count ($total_count)
    $total_count = $dbo->count_number_rows($comment_set);
    $pagination = new pagination($paginate, $per_page, $total_count);
    $offset = $pagination->offset();
    $comments = comment::paginate_comments($per_page, $offset);
    ?>
			
			<?php 
    while ($comment = $dbo->fetch_assoc($comments)) {
        $author = utility::remove_escape($comment["author"]);
        $content = utility::remove_escape($comment["body"]);
        echo "<p><code><strong>{$author}</strong><br />";
        echo " {$content} </code></p>";
    }
    ?>
			
			<div id="pagination"><?php 
    echo $pagination->built_pagination_links($paginate);
    ?>
</div>	
			
			<h3><?php 
    echo session::message();
    ?>
</h3>
			
    echo $current_page["visible"] == 1 ? "yes" : "no";
    ?>
 <br />
					subject id : <?php 
    echo $current_page["subject_id"];
    ?>
 <br />
					ID: <?php 
    echo $current_page["id"];
    ?>
 <br />
				</p>
				<p class = "view-content">	
					Content:<br />
					<?php 
    echo utility::remove_escape(nl2br(htmlentities($current_page["content"])));
    ?>
<br />
					<br />
					<a href="edit_page.php?page=<?php 
    echo urlencode($current_page["id"]);
    ?>
">edit page</a>	
				</p>		
					
				
		<?php 
} else {
    ?>
			
			<h2> The 10 most recent notes </h2>