Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

addcategory.php 881B

1234567891011121314151617181920212223242526272829303132333435
  1. <?PHP
  2. require_once('lib/dashboard.php');
  3. require_once('lib/common.php');
  4. if (isset($_POST['submit'])) {
  5. $_POST['name'] = trim($_POST['name']);
  6. if (empty($_POST['name'])) {
  7. header('Location: '.CP_PATH.'categories');
  8. return;
  9. }
  10. $sql = 'INSERT INTO issues_categories
  11. (icat_id, icat_name) VALUES(\'0\', \''.m($_POST['name']).'\')';
  12. $res = mysql_query($sql) or die(mysql_error().'<br />'.$sql);
  13. logger::log('Issue tracker: category added: '.$_POST['name'], getUserID($_SERVER['REDIRECT_REMOTE_USER']), logger::information);
  14. header('Location: '.CP_PATH.'categories');
  15. return;
  16. }
  17. define('TITLE', 'Issue tracker :: Add Category');
  18. addDashboardItem('Actions', 'Add Category', 'addcategory');
  19. include_once('res/commonDashboard.php');
  20. require_once('lib/header.php');
  21. require_once('pages/addcategory.php');
  22. require_once('lib/footer.php');
  23. ?>