phpUserTrack
[ class tree: phpUserTrack ] [ index: phpUserTrack ] [ all elements ]

Source for file site.php

Documentation is available at site.php

  1. <?php
  2. require_once './include/version.php';
  3. require_once './lib/core.php';
  4.  
  5. require('smarty/libs/Smarty.class.php');
  6. $smarty new Smarty();
  7.  
  8. $smarty->plugins_dir['include';
  9. require_once $smarty->_get_plugin_filepath('function''html_doctype');
  10.  
  11. try {
  12.     $login new login(true);
  13.     $smarty->assign('login'$login);
  14. catch (LoginException $e{
  15.     header'Location: login.php' ;
  16.  
  17. if (isset($_POST['submit'])) {
  18.     $db new phpusertrack_site();
  19.     $db->addSite($_POST['name']$_POST['url']$_POST['desc']);
  20.     $notify[array('title' => 'Site Added'
  21.         'desc' => '\'' $_POST['name''\' was successfully added',
  22.         'type' => 'success'
  23.     );
  24.     $smarty->assign('siteAdded'true);
  25. }
  26.  
  27. $smarty->assign('notifMsg'$notify);
  28.  
  29. $smarty->display('header.tpl');
  30. $smarty->display('site.tpl');
  31. $smarty->display('footer.tpl');
  32.  
  33. ?>

Documentation generated on Tue, 06 Nov 2007 09:22:12 -0800 by phpDocumentor 1.4.0a2