require_once _LIB_PATH_ . 'PDO_functions.php'; require_once _LIB_PATH_ . 'error_functions.php'; $session_name = 'PGO_Admin'; session_name($session_name); session_start(); $bot_id = isset($_SESSION['poadmin']['bot_id']) ? $_SESSION['poadmin']['bot_id'] : 1; if (empty($_SESSION) || !isset($_SESSION['poadmin']['uid']) || $_SESSION['poadmin']['uid'] == "") { error_log('Session vars: ' . print_r($_SESSION, true), 3, _LOG_PATH_ . 'session.txt'); exit(json_encode(array('error' => "No session found"))); } // Open the DB $dbConn = db_open(); } if (isset($get_vars['action']) && $get_vars['action'] == "search") { $group = isset($get_vars['group']) ? $get_vars['group'] : 1; exit(runSearch()); } elseif (isset($get_vars['action']) && $get_vars['action'] == "add") { exit(insertAIML()); } elseif (isset($get_vars['action']) && $get_vars['action'] == "update") { exit(updateAIML()); } elseif (isset($get_vars['action']) && $get_vars['action'] == "del" && isset($get_vars['id']) && $get_vars['id'] != "") { exit(delAIML($get_vars['id'])); } else { $mainContent = $template->getSection('EditAimlPage'); } $topNav = $template->getSection('TopNav'); $leftNav = $template->getSection('LeftNav'); $rightNav = $template->getSection('RightNav'); $main = $template->getSection('Main'); $navHeader = $template->getSection('NavHeader'); $FooterInfo = getFooter();
<?php //----------------------------------------------------------------------------------------------- //My Program-O Version 2.0.9 //Program-O chatbot admin area //Written by Elizabeth Perreau and Dave Morton //Aug 2011 //for more information and support please visit www.program-o.com //----------------------------------------------------------------------------------------------- // search.php if (isset($_POST['action']) && $_POST['action'] == "search") { $mainContent = $template->getSection('SearchAIMLForm'); $mainContent .= runSearch(); } elseif (isset($_POST['action']) && $_POST['action'] == "update") { $mainContent = $template->getSection('SearchAIMLForm'); $mainContent .= updateAIML(); } elseif (isset($_GET['action']) && $_GET['action'] == "del" && isset($_GET['id']) && $_GET['id'] != "") { $mainContent = $template->getSection('SearchAIMLForm'); $mainContent .= delAIML($_GET['id']); } elseif (isset($_GET['action']) && $_GET['action'] == "edit" && isset($_GET['id']) && $_GET['id'] != "") { $mainContent = $template->getSection('SearchAIMLForm'); $mainContent .= editAIMLForm($_GET['id']); } else { $mainContent = $template->getSection('SearchAIMLForm'); } $upperScripts = '<script type="text/javascript" src="scripts/tablesorter.js"></script>' . "\n"; $topNav = $template->getSection('TopNav'); $leftNav = $template->getSection('LeftNav'); $main = $template->getSection('Main'); $topNavLinks = makeLinks('top', $topLinks, 12); $navHeader = $template->getSection('NavHeader');