<?php
/**
* ProjectPress add project type
*
* @package ProjectPress
* @since 2.0
*/
// Starts the session.
session_start();
define('access', true);
include(dirname(dirname(__FILE__)) . '/config.inc.php');
include(PM_DIR . 'pm-includes/global.inc.php');
// Checks if user is admin and logged in.
if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }
// Enable for error checking and troubleshooting.
# display_errors();
if($_POST) {
$project_type = pmdb::connect()->escape($_POST['project_type']);
$sql = pmdb::connect()->query("INSERT INTO ".DB."project_types (project_type) VALUES ('$project_type')");
} else { }
?>
<li class="project_type"><?php echo $project_type;?> <a style="float:right;" href="#" id="PTID-<?php echo $row['pt_id'];?>" class="pt_delete"><img src="<?php echo PM_URI ?>/images/delete.png" alt="Delete" title="Delete" /></a></li>