myPortal CMS - the web design community
  • MyPortal 2.0
  • download
  • demo
  • manual
  • editor
  • faq
  • blog
  • forum

free account: Click here
Username: Password:

Manual

mp.class.php

myPortal regitry class

  • MP::$GET - escaped $_GET
  • MP::$POST - escaped $_POST
  • MP::$CONFIG - content of configuration table
  • MP::$DB - db connection
  • MP::$SESSION - equals $_SESSION['myportal']
  • MP::$SELF - $_SERVER['PHP_SELF']
  • MP::$MP - url data and segments
  • MP::$TMP - temporary registry
  • MP::$DEBUG - sql debug inforamtion
  • MP::$TABLE - tables schemas

Usage:

// static variables
echo MP::$GET[1];
if(isset(MP::$POST['password'])) exit();
echo MP::$DB->get_val("SELECT NOW()");
 
// other functions
if(MP::home()) echo 'this is the default page';
if(MP::version('base')) echo 'this is BASE version'; 
MP::get_version(); // returns 'base', 'pro' or 'pro+'

Try myPortal 2: