header('Location:index.php'); return; } $action = isset($_GET['act']) ? $_GET['act'] : ''; $mode = isset($_GET['mode']) ? $_GET['mode'] : 'morph'; switch ($action) { case 'save': sentence_save($id); header("Location:sentence.php?id={$id}"); break; case 'save_src': sentence_save_source($id, $_POST['src_text']); header("Location:sentence.php?id={$id}"); break; default: $smarty->assign('sentence', $sentence = get_sentence($id)); if ($mode == 'syntax') { if ($sentence['syntax_moder_id'] && $_SESSION['user_id'] == $sentence['syntax_moder_id']) { $smarty->assign('group_types', get_syntax_group_types()); $smarty->assign('groups', get_groups_by_sentence($id, $_SESSION['user_id'])); $smarty->assign('all_groups', $all = get_all_groups_by_sentence($id)); $users = array(); foreach (array_keys($all) as $uid) { $users[$uid] = get_user_info($uid); } $smarty->assign('group_owners', $users); $smarty->display('sentence_syntax_moderator.tpl'); } else { $smarty->assign('group_types', get_syntax_group_types()); $smarty->assign('groups', get_groups_by_sentence($id, $_SESSION['user_id'])); $smarty->display('sentence_syntax.tpl');
} if ($e != false) { $ek = explode("-", $e); $em = $ek[1]; $ey = $ek[0]; $ea = " -e {$em},{$ey}"; } if ($c != false) { $ck = explode("-", $c); $cm = $ck[1]; $cy = $ck[0]; $ca = " -c {$cm},{$cy}"; } return shell_exec("python titlegen.py{$la}{$ma}{$ra}{$ea}{$ca}"); } $sentence = get_sentence($lookback, $max, $mrange, $earliest, $latest); if (!$bare) { $archiveEarliest = $data->earliest->year . "-" . ($data->earliest->month < 10 ? "0" : "") . $data->earliest->month; $archiveLatest = $data->latest->year . "-" . ($data->latest->month < 10 ? "0" : "") . $data->latest->month; $html = <<<HTML <html lang="en"> \t<head> \t\t<title>BeezFud</title> \t\t<meta name="viewport" content="width=device-width, user-scalable=no"> \t\t<link rel="stylesheet" type="text/css" href="stylesheets/main.css" /> \t</head> \t<body> \t\t<div id="tr-corner"> \t\t\t<a href="https://github.com/EVA-01/beezfud" id="github">GitHub</a> \t\t</div> \t\t<div id="tl-corner">