// blah blah // <!-- end bio --> // Three different ways of using this script. // * Simple GET: displays a small how-to // * "Simulate harvest": simulates a harvest // * "Harvest": does the harvest // The last two only differ in whether the sql to insert is run or displayed. $relPath = '../../pinc/'; include_once $relPath . 'base.inc'; include_once $relPath . 'theme.inc'; include_once $relPath . 'misc.inc'; // html_safe() include_once 'authors.inc'; include_once 'menu.inc'; require_login(); abort_if_not_authors_db_manager(true); output_header(_("Harvest existing biographies from project comments")); // Tables must exist (because this script shouldn't need to care about creating them) // and be empty (because if they're not, the harvest is likely done in error) if (!table_exists('authors') || !table_exists('biographies')) { echo _("The tables have not been created! Please create them by having a Site Admin run create_authors_bios_tables.php."); exit; } $result = mysql_query('SELECT * FROM authors'); if (mysql_num_rows($result) > 0) { echo _("The table 'authors' is not empty. Please empty it and try again."); exit; } $result = mysql_query('SELECT * FROM biographies'); if (mysql_num_rows($result) > 0) { echo _("The table 'biographies' is not empty. Please empty it and try again.");
$relPath = '../../pinc/'; include_once $relPath . 'base.inc'; include_once $relPath . 'theme.inc'; include_once $relPath . 'misc.inc'; // html_safe() include_once $relPath . 'user_is.inc'; include_once $relPath . 'SortUtility.inc'; include_once $relPath . 'BrowseUtility.inc'; include_once 'authors.inc'; include_once 'search.inc'; include_once 'menu.inc'; require_login(); $title = _("Manage biographies"); output_header($title); abort_if_not_authors_db_manager(); if ($_SERVER['QUERY_STRING'] == '') { echo "<script language='JavaScript'><!--\nlocation.href='?reload';\n"; echo "document.open();\ndocument.write('Please <a href=\"?reload\">continue</a>.');\ndocument.close();\n--></script>\n"; echo '<noscript>Please note that you need to have JavaScript turned on in order to use this page.</noscript>'; exit; } echo_menu(); echo "<h2 align='center'>{$title}</h2>"; $message = @$_GET['message']; if (isset($message)) { echo '<center>' . html_safe($message) . '</center><br />'; } if (isset($_POST) && count($_POST) > 0) { // find out what to do -- store in different 'queues' $delete_bios = array();