?> </td> <td><a style="<?php echo 'client/' . $_SERVER['REMOTE_ADDR'] == $client['nv_key'] ? 'font-weight:bold' : ''; ?> " href="<?php echo actionUrl('client_settings', 'devices', array('id' => $client['nv_key'])); ?> "><?php echo $client['nv_key']; ?> </a></td> <td><?php echo ageToString($client['nv_lastupdate']); ?> </td> </tr><?php } ?> </table> <hr/> <input type="button" value="reload" onclick="document.location.href='<?php echo actionUrl('clients', 'devices', array('do' => 'reload')); ?> ';"/> all screens <?php if ($_REQUEST['do'] == 'reload') {
$normalUrl = cqrequest('http://'.cfg('service/server').'/?signin'); $prettyUrl = cqrequest('http://'.cfg('service/server').'/signin'); ?><div class="banner"> <? if(substr($prettyUrl['headers']['code'], 0, 1) != '4') print('<div class="smallwin">Pretty URLs supported</div>'); else print('<div class="win">Pretty URLs not supported</div>');?> </div><? $server_status = ob_get_clean(); ob_start(); $pingServer = cfg('ping/server'); if(!strStartsWith($pingServer, 'http://')) $pingServer = 'http://'.$pingServer; if(file_exists('log/cron.last.log')) { $btype = 'smallwin'; $lastPing = filectime('log/cron.last.log'); $lastPingText = 'Last ping: '.ageToString($lastPing, 'very recently'); } else { $btype = 'fail'; $lastPingText = 'Waiting for ping from '.$pingServer.'...'; } if(cfg('ping/remote') && cfg('ping/server') != '') { $pingStatus = h2_nv_retrieve('ping/status'); if($pingStatus['server'] != $pingServer) { $pingRequest = cqrequest($pingServer, array('origin' => 'http://'.cfg('service/server').'/cron.php', 'request' => 'activate', 'password' => cfg('ping/password')), 2); if($pingRequest['data']['result'] == 'OK') { $btype = 'win';
function dyn_type_post(&$data, &$ds, &$flags) { /* are there any comments? */ $comments = MsgModel::getComments($ds['m_key']); /* define the standard actions for this post */ $metaElements = array( ageToString($ds['m_created']), '<a onclick="springComment('.$ds['m_key'].')">Comment</a>', '<a onclick="springVote('.$ds['m_key'].')">Vote</a>'); /* insert entries from the cmd array in $flags (these come from plugins) */ if(is_array($flags['cmd'])) foreach($flags['cmd'] as $cmd) $metaElements[] = $cmd; /* admin users get to see an "inspect" button */ if(object('user')->isAdmin()) $metaElements[] = '<a target="_blank" href="'.actionUrl('inspect', 'test', array('id' => $ds['m_key'])).'">Inspect</a>'; /* if user is either the owner or the author, she gets to see the delete button */ if(object('user')->entity == $ds['m_owner'] || object('user')->entity == $ds['m_author']) $metaElements[] = '<a onclick="deletePost('.$ds['m_key'].')">Delete</a>'; $text = h2_post_excerpt($data['text'], $ds['m_key']); /* onward to the actual display of the message: */ ?><div class="post" id="post_<?php echo $ds['m_key']; ?> "> <div class="postimg"><img src="img/anonymous.png" width="64"/></div> <div class="postcontent"> <div> <? if($ds['m_author'] != $ds['m_owner']) print(HubbubEntity::linkFromId($ds['m_author']).' ► '); ?> <?php echo HubbubEntity::linkFromId($ds['m_owner']); ?> <?php echo $text; ?> </div> <? if(isset($flags['infoblock'])) print('<div>'.$flags['infoblock'].'</div>'); ?> <div class="postmeta"><?php echo implode(' · ', $metaElements); ?> </div> <div id="post_<?php echo $ds['m_key']; ?> _votething" style="display:none" class="comment_item"> ✓ I am: <input type="text" id="vote_<?php echo $ds['m_key']; ?> _text" value="liking it" style="width: 100px" onkeypress="if(event.keyCode == 13) postVote(<?php echo $ds['m_key']; ?> ); else if(event.keyCode == 27) cancelVote(<?php echo $ds['m_key']; ?> );"/> <input class="smallbtn" type="button" value="Vote" onclick="postVote(<?php echo $ds['m_key']; ?> )"/><input class="smallbtn" type="button" value="Cancel" onclick="cancelVote(<?php echo $ds['m_key']; ?> )"/> </div> <? tmpl_commentlist($ds, $comments, true) ?> <div class="post_actions" id="post_<?php echo $ds['m_key']; ?> _actions"> <div class="post_pseudocomment" onclick="springComment(<?php echo $ds['m_key']; ?> )">Click here to comment</div> </div> <div id="post_<?php echo $ds['m_key']; ?> _temp" style="display:none"></div> <div id="post_<?php echo $ds['m_key']; ?> _temp_commentthing" style="display:none"> <textarea id="post_<?php echo $ds['m_key']; ?> _comment" onblur="closeCommentIfEmpty(<?php echo $ds['m_key']; ?> )"></textarea> <input type="button" value="Comment" onclick="postComment(<?php echo $ds['m_key']; ?> )"/> <span id="post_<?php echo $ds['m_key']; ?> _status"></span> </div> </div> </div><? }