Location: PHPKode > projects > ProjectPress > projectpress/projects/dpl.php
<?php
/**
 * ProjectPress delete project leader
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();

include(dirname(dirname(__FILE__)) . '/config.inc.php');
require_once(PM_DIR . 'pm-includes/global.inc.php');

// Checks if user is logged in; if not redirect to login page.
if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }

// Enable for error checking and troubleshooting.
# display_errors();

pmdb::connect()->query("delete from ".DB."project_leaders where p_id = '".pmdb::connect()->escape($_REQUEST['p_id'])."' AND pl_user = '".pmdb::connect()->escape($_REQUEST['pl_user'])."' AND creator = '" . $_SESSION['username'] . "' LIMIT 1");
Return current item: ProjectPress