Recommended Links

Common For all pages

This section shows you how you can have editable content which is the same throughout the site ( NOTE: It is language specific ) .All the navs below are generated using snippets that are included with the framework, edit this content to see how it was generated

Sub Nav:

Main Nav:

Footer Nav:

Unique Per Page

Captcha

The Captcha library allong with the captcha include file provides functions to easily handle captcha.

NOTE: Inorder to display the captcha to the user you will need to set the src attribute of the image to point to "http://macs-framework.sourceforge.net/index.php//libs/standalone/securimage/securimage_show.php"

Example:

  //This is a function within a controller
  public function captcha()
  {
    //Get the User submitted captcha code
    $captchaCode = trim(Post::getByKey('captcha_code'));

    //Include the Captcha library
    require_once Config::$siteDir.'libs/standalone/Captcha.php';

    //Creat an instance of the captcha class
    $captcha = new Captcha();

    //Check to see if the code entered by the user is correct
    if(!$captcha->check($captchaCode))
      $this->returnContent('Invalid Captcha Code');
  }


Site Powered by Mac's PHP MVC Framework Framework of the future
Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.