* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class AdminProfiles extends AdminTab { public function __construct() { global $cookie; $this->table = 'profile'; $this->className = 'Profile'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array( 'id_profile' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 200)); $this->identifier = 'id_profile'; $list_profile = array(); foreach(Profile::getProfiles($cookie->id_lang) as $profil) $list_profile[] = array('value' => $profil['id_profile'], 'name' => $profil['name']); parent::__construct(); } public function postProcess() { if (isset($_GET['delete'.$this->table]) AND $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) $this->_errors[] = $this->l('For security reasons, you cannot delete the Administrator profile'); else parent::postProcess(); } public function displayForm($isMainTab = true) { global $currentIndex; parent::displayForm(); if (!($obj = $this->loadObject(true))) return; echo '
'; } }