echo h(Login::$member->mail); ?> </span> </div> <div class="input <?php echo stripes(); ?> "> <label><?php echo _("PGP Public Key import"); ?> </label> <span class="input"><textarea name="key" cols="80" rows="15"></textarea></span> </div> <div class="input <?php echo stripes(); ?> "> <label><?php echo _("Fingerprint"); ?> </label> <span class="input"><input type="text" name="fingerprint" value="<?php echo h(Login::$member->fingerprint); ?> " size="50" maxlength="<?php echo Member::fingerprint_length; ?> "> <? Login::$member->display_fingerprint_info();
/** * table body * * overload method for line highlighting * * @param resource $result * @param boolean $direct_edit * @param boolean $show_edit_column * @param integer $linescount */ protected function display_list_tbody($result, $direct_edit, $show_edit_column, $linescount) { ?> <tbody> <? if ($this->enable_pager) { if (!isset($_GET['page']) and isset($_GET['hl'])) { // go to the page with the record to be highlighted $line = 0; while ( $object = DB::fetch_object($result, $this->classname) ) { if ($_GET['hl']==$object->id) { $this->pager->page = $this->pager->page_for_line($line); break; } $line++; } } $this->pager->seek($result); $line = $this->pager->firstline; } else { $line = 0; } while ( $object = DB::fetch_object($result, $this->classname) and (!$this->enable_pager or $line <= $this->pager->lastline) ) { ?> <tr class="<?=stripes($line); if (isset($_GET['hl']) and $_GET['hl']==$object->id) { ?> highlight<? } ?>"> <? // use the submitted values instead of the the record from the database if ($direct_edit and isset($this->directedit_objects[$object->id])) { $object = $this->directedit_objects[$object->id]; } foreach ( $this->columns as $column ) { if (isset($column[3]) and $column[3]===false) continue; ?> <td<? $this->cellclass($column) ?>><? $method = "print_".(!empty($column[3])?$column[3]:"text"); if (method_exists($this, $method)) { $this->$method( // parameters for print methods: ($column[0]?$object->$column[0]:null), // 1 content $object, // 2 object $column, // 3 column description (array) $line, // 4 line number (starting at 0) $linescount // 5 count of lines selected in the database ); } else { $method = "dbtableadmin_".$method; $object->$method( // parameters for print methods: ($column[0]?$object->$column[0]:null), // 1 content $column, // 2 column description (array) $line, // 3 line number (starting at 0) $linescount // 4 count of lines selected in the database ); } ?></td> <? } // right column for edit, delete, duplicate if ($show_edit_column) { ?> <td class="nowrap"> <? // edit if ($this->enable_edit) { ?> <a href="<?=URI::append(['id'=>$object->id])?>" class="iconlink"><img src="img/edit.png" width="16" height="16" <?alt(_("edit"))?>></a> <? } // duplicate if ($this->enable_duplicate) { ?> <input type="button" value="<?=_("duplicate")?>" onclick="submit_button('duplicate', <?=$object->id?>);"> <? } // delete if ( $this->enable_delete_single or $this->enable_delete_checked ) { $this->display_list_delete($object); } ?> </td> <? } ?> </tr> <? $line++; } // end while ?> </tbody> <? }
/** * form fields of the edit form */ protected function display_edit_content() { foreach ($this->columns as $index => $column) { if (isset($column[4]) and $column[4]===false) continue; ?> <div class="input <?php echo stripes($index); ?> "><label for="<?php echo $column[0]; ?> "><?php echo $column[1]; ?> </label><span class="input"><? $method = "edit_".(!empty($column[4])?$column[4]:'text'); if (method_exists($this, $method)) { $callee = $this; } else { $callee = $this->object; $method = "dbtableadmin_".$method; } $callee->$method( // parameters for edit functions: $column[0], // 1 column/attribute name $this->object->$column[0], // 2 default $this->object->id, // 3 ID !empty($column['disabled']), // 4 disabled (not editable) $column // 5 (array) column description ); ?></span></div> <? } }
/** * display a list of voting mode votes * * @param resource $result * @param string $token (optional) token of the logged in member for highlighting */ public static function display_votingmode_votes($result, $token="") { ?> <table class="votes"> <tr><th><?=_("Vote token")?></th><th><?=_("Voting time")?></th><th><?=_("Demands offline voting")?></th></tr> <? // votes $previous_token = null; while ( $row = DB::fetch_assoc($result) ) { DB::to_bool($row['demand']); ?> <tr class="<?=stripes(); // highlight votes of the logged in member if ($token == $row['token']) { ?> self<? } // strike through votes, which have been overridden by a later vote if ($row['token'] == $previous_token) { ?> overridden<? } else $previous_token = $row['token']; ?>"><td><?=$row['token']?></td><? ?><td class="tdc"><?=date(VOTETIME_FORMAT, strtotime($row['votetime']))?></td><? ?><td><? display_checked($row['demand']) ?></td><? ?></tr> <? } ?> </table> <? }
if (!$pager->linescount) { ?> <tr class="td0"><td colspan="<?=$colspan?>" class="center"><? if ($period->state=="ballot_application") { echo _("There are no applications for ballots yet."); } else { echo _("There were no applications for ballots."); } ?></td></tr> <? } else { $line = $pager->firstline; while ( $ballot = DB::fetch_object($result, "Ballot") and $line <= $pager->lastline ) { ?> <tr class="<?=stripes()?>"> <td class="right"><?=$ballot->id?></td> <td><?=h($ballot->name)?></td> <td><?=$ballot->ngroup()->name?></td> <td class="center"><?=timeformat($ballot->opening)?> – <?=BALLOT_CLOSE_TIME?></td> <td><?=h($ballot->agents)?></td> <td class="center"><?=$ballot->voters?></td> <? if ($entitled) { ?> <td> <? /** @noinspection PhpUndefinedVariableInspection */ if ($row_voters and $row_voters['ballot']==$ballot->id) { if ($row_voters['agent']) { ?><a href="ballot_edit.php?id=<?=$ballot->id?>" class="icontextlink"><img src="img/edit.png" width="16" height="16" <?alt(_("edit"))?>><?=_("You are agent for this ballot.")?></a><?