public function __construct() { parent::__construct('aicml_stats'); if ($this->loginError) { return; } $this->loadHttpVars(true, false); if (isset($this->csv_output)) { assert('isset($_SESSION["aicml_stats"])'); $this->stats =& $_SESSION['aicml_stats']; return; } $pubs =& $this->getMachineLearningPapers(); // populate $this->aicml_pi_authors $this->getPiAuthors(); // populate $this->aicml_pdf_students_staff_authors $this->getPdfStudentsAndStaffAuthors(); $this->collectStats($pubs); $_SESSION['aicml_stats'] =& $this->stats; $form = new HTML_QuickForm('aicml_stats', 'get', 'aicml_stats.php'); $form->addElement('submit', 'csv_output', 'Export to CSV'); // create a new renderer because $form->defaultRenderer() creates // a single copy $renderer = new HTML_QuickForm_Renderer_Default(); $form->accept($renderer); echo $renderer->toHtml(); echo $this->allPiPublicationTable(); echo $this->fiscalYearTotalsTable('pi', 'PI Fiscal Year Totals'); foreach ($this->aicml_pi_authors as $pi_author) { echo $this->piPublicationsTable($pi_author); } echo $this->staffPublicationsTable(); echo $this->fiscalYearTotalsTable('staff', 'Staff Fiscal Year Totals'); echo $this->studentTotalsTable(); }
public function __construct() { parent::__construct('tag_non_ml'); if ($this->loginError) { return; } $this->loadHttpVars(); $pubs =& $this->getNonMachineLearningPapers(); $form = new HTML_QuickForm('tag_non_ml_form', 'post', './tag_ml_submit.php'); $form->addElement('header', null, 'Citation</th><th style="width:7%">Is ML'); $count = 0; foreach ($pubs as &$pub) { $pub->dbLoad($this->db, $pub->pub_id, pdPublication::DB_LOAD_VENUE | pdPublication::DB_LOAD_CATEGORY | pdPublication::DB_LOAD_AUTHOR_FULL); ++$count; $form->addGroup(array(HTML_QuickForm::createElement('static', null, null, $pub->getCitationHtml() . ' ' . getPubIcons($this->db, $pub, 0x7)), HTML_QuickForm::createElement('advcheckbox', 'pub_tag[' . $pub->pub_id . ']', null, null, null, array('no', 'yes'))), 'tag_ml_group', $count, '</td><td>', false); } $form->addElement('submit', 'submit', 'Submit'); $renderer =& $form->defaultRenderer(); $form->accept($renderer); $this->renderer =& $renderer; }
public function __construct() { parent::__construct('aicml_publications'); if ($this->loginError) return; $this->loadHttpVars(true, false); if (empty($this->format)) $this->format = 0; if (empty($this->abstracts)) $this->abstracts = 0; // now display the page $form = new HTML_QuickForm('aicml_pubs', 'get', 'aicml_publications.php'); $elements = array(); $elements[] = HTML_QuickForm::createElement( 'advcheckbox', 'format', null, 'Display as HTML', null, array(0, 1)); $elements[] = HTML_QuickForm::createElement( 'advcheckbox', 'abstracts', null, 'Show Abstracts', null, array(0, 1)); $form->addGroup($elements, 'elgroup', '', ' ', false); $form->addElement('submit', 'update', 'Update'); // create a new renderer because $form->defaultRenderer() creates // a single copy $renderer = new HTML_QuickForm_Renderer_Default(); $form->accept($renderer); echo $renderer->toHtml(); echo '<h2>AICML Publications</h2>'; $publist =& $this->getMachineLearningPapers(); if ($this->format) { $result = ''; } foreach ($publist as $pub) { $pub->dbLoad($this->db, $pub->pub_id, pdPublication::DB_LOAD_VENUE | pdPublication::DB_LOAD_CATEGORY | pdPublication::DB_LOAD_AUTHOR_FULL); $citation = $this->getCitationHtml($pub); if ($this->format) { $citation = utf8_decode($citation); } if ($this->format) { $result .= $citation . "<br/>\n"; } else { echo $citation . '<p/>'; } } if ($this->format) echo '<pre style="font-size:medium">' . htmlentities($result) . '</pre>'; }