function formData() { $this->out->hidden('group-h-' . $this->idGroup, $this->idGroup, 'idGroup'); // Box para apuntes automáticos $this->out->elementStart('div', array('class' => 'notes-div-auto')); $this->out->element('p', 'notes-text-auto', 'Generar Apuntes Automáticos'); $this->out->element('p', null, 'Se seleccionarán los tweets con la máxima puntuación hasta la fecha.'); $this->out->elementStart('div'); $this->out->submit('notes-submit-auto', _m('BUTTON', 'Aceptar'), 'submit', 'submit-auto'); $this->out->elementEnd('div'); $this->out->elementEnd('div'); // Box para apuntes personalizados $this->out->elementStart('div', array('class' => 'notes-div-manual')); $this->out->element('p', 'notes-text-manual', 'Generar Apuntes Personalizados'); $this->out->elementStart('div'); $this->out->element('p', 'notes-manual-option', 'Hashtag: '); $this->out->elementStart('select', array('name' => 'combo-tag', 'id' => 'notes-combo-hashtag', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboTag(' . $this->idGroup . ');')); $tags = NotesPDF::getTagsOfUserWithGradeInGroup($this->idGroup, '%', '%'); $this->out->element('option', array('value' => 'Todos'), 'Todos'); for ($i = 0; $i < count($tags); $i++) { $this->out->element('option', array('value' => $tags[$i]), $tags[$i]); } $this->out->elementEnd('select'); $this->out->elementEnd('div'); $this->out->elementStart('div'); $this->out->element('p', 'notes-manual-option', 'Usuario: '); $this->out->elementStart('select', array('name' => 'combo-user', 'id' => 'notes-combo-user', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboUser(' . $this->idGroup . ');')); $nicks = NotesPDF::getUsersinGroupWithHashtagAndGrade($this->idGroup, '%', '%'); $this->out->element('option', array('value' => 'Todos'), 'Todos'); for ($i = 0; $i < count($nicks); $i++) { $this->out->element('option', array('value' => $nicks[$i]), $nicks[$i]); } $this->out->elementEnd('select'); $this->out->elementEnd('div'); $this->out->elementStart('div'); $this->out->element('p', 'notes-manual-option', 'Puntuación: '); $this->out->elementStart('select', array('name' => 'combo-grade', 'id' => 'notes-combo-grade', 'class' => 'notes-combo-manual', 'onchange' => 'changeComboGrade(' . $this->idGroup . ');')); $grades = NotesPDF::getGradesinGroupWithTagAndUser($this->idGroup, '%', '%'); $this->out->element('option', array('value' => 'Todos'), 'Todos'); for ($i = 0; $i < count($grades); $i++) { $this->out->element('option', array('value' => $grades[$i]), $grades[$i]); } $this->out->elementEnd('select'); $this->out->elementEnd('div'); $this->out->submit('notes-submit-manual', _m('BUTTON', 'Aceptar'), 'submit', 'submit-custom'); $this->out->elementEnd('div'); }
<?php /** * * BoloTweet 2.0 * * @author Alvaro Ortego <*****@*****.**> * */ define('STATUSNET', true); define('LACONICA', true); // compatibility define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../../..')); require_once INSTALLDIR . '/lib/common.php'; require_once INSTALLDIR . '/local/plugins/NotesPDF/classes/NotesPDF.php'; $tag = $_POST['tag'] == 'Todos' ? '%' : $_POST['tag']; $grade = $_POST['grade'] == 'Todos' ? '%' : $_POST['grade']; $groupid = $_POST['groupid']; $users = NotesPDF::getUsersinGroupWithHashtagAndGrade($groupid, $tag, $grade); echo '<option value="Todos">Todos</option>'; for ($i = 0; $i < count($users); $i++) { echo '<option value="' . $users[$i] . '">' . $users[$i] . '</option>'; }