Ejemplo n.º 1
0
//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');
$leftNavLinks = makeLinks('left', $leftLinks, 12);
$FooterInfo = getFooter();
$errMsgClass = !empty($msg) ? "ShowError" : "HideError";
Ejemplo n.º 2
0
    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();
$errMsgClass = !empty($msg) ? "ShowError" : "HideError";
$errMsgStyle = $template->getSection($errMsgClass);
$noLeftNav = '';
$noTopNav = '';
$noRightNav = $template->getSection('NoRightNav');
$headerTitle = 'Actions:';
Ejemplo n.º 3
0
$group = isset($get_vars['group']) ? $get_vars['group'] : 1;
if (isset($post_vars['action']) && $post_vars['action'] == "search") {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent .= runSearch();
    $mainContent = str_replace('[group]', $group, $mainContent);
} elseif (isset($get_vars['group'])) {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent .= runSearch();
    $mainContent = str_replace('[group]', $group, $mainContent);
} elseif (isset($post_vars['action']) && $post_vars['action'] == "update") {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent .= updateAIML();
    $mainContent = str_replace('[group]', $group, $mainContent);
} elseif (isset($get_vars['action']) && $get_vars['action'] == "del" && isset($get_vars['id']) && $get_vars['id'] != "") {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent .= delAIML($get_vars['id']);
    $mainContent = str_replace('[group]', $group, $mainContent);
} elseif (isset($get_vars['action']) && $get_vars['action'] == "edit" && isset($get_vars['id']) && $get_vars['id'] != "") {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent .= editAIMLForm($get_vars['id']);
    $mainContent = str_replace('[group]', $group, $mainContent);
} else {
    $mainContent = $template->getSection('SearchAIMLForm');
    $mainContent = str_replace('[group]', $group, $mainContent);
}
$mainContent = str_replace('[group]', $group, $mainContent);
$upperScripts = '<script type="text/javascript" src="scripts/tablesorter.min.js"></script>' . "\n";
$topNav = $template->getSection('TopNav');
$leftNav = $template->getSection('LeftNav');
$rightNav = $template->getSection('RightNav');
$main = $template->getSection('Main');