当前位置: 首页>>代码示例>>PHP>>正文


PHP misc::sToHMS方法代码示例

本文整理汇总了PHP中misc::sToHMS方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::sToHMS方法的具体用法?PHP misc::sToHMS怎么用?PHP misc::sToHMS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在misc的用法示例。


在下文中一共展示了misc::sToHMS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

   </div>
   <div>
    <div style="text-align: right; border-top: 1px solid black; margin-top: 5px; padding-top: 5px;"><a class="link" href="module.php?action=remove&nodeId=' . $node->data['id'] . '&slotId=' . $_GET['slotId'] . '">' . $ui['removeModule'] . '</a></div>
   </div>
  </div>
 </div>';
                    if (count($node->queue['train'])) {
                        echo '<div class="container" style="text-align: right; padding: 5px 0; margin: 5px 0; border-top: 1px solid black;">';
                        foreach ($node->queue['train'] as $item) {
                            if (!$item['stage']) {
                                $stage = $ui['add'];
                            } else {
                                $stage = $ui['remove'];
                            }
                            $remaining = $item['start'] + $item['duration'] * 60 - time();
                            echo '<div>' . $stage . ' ' . $item['quantity'] . ' ' . $gl['units'][$node->data['faction']][$item['unit']]['name'] . ' <span id="train_' . $item['id'] . '">' . implode(':', misc::sToHMS($remaining)) . '</span><script type="text/javascript">timedJump("train_' . $item['id'] . '", "module.php?action=get&nodeId=' . $node->data['id'] . '&slotId=' . $_GET['slotId'] . '");</script> | <a class="link" href="module.php?action=cancelUnit&nodeId=' . $node->data['id'] . '&slotId=' . $_GET['slotId'] . '&trainId=' . $item['id'] . '">x</a></div>';
                        }
                        echo '</div>';
                    }
                    echo '<div style="border-bottom: 1px solid black;"><div>';
                    $cc = 0;
                    foreach ($node->components as $key => $component) {
                        echo '<div class="cell">' . $component['value'] . '</div><div class="cell"><img class="resource" src="templates/' . $_SESSION[$shortTitle . 'User']['template'] . '/images/components/' . $node->data['faction'] . '/' . $key . '.png" title="' . $gl['components'][$node->data['faction']][$key]['name'] . '"></div>';
                        $cc++;
                        if ($cc == 9) {
                            echo '</div><div>';
                        }
                    }
                    echo '</div></div>';
                    echo '<div style="border-bottom: 1px solid black;"><div>';
                    $uc = 0;
开发者ID:yunsite,项目名称:devana-heroic,代码行数:31,代码来源:module.php

示例2: time

                         $action = 'incoming';
                     }
                 } else {
                     if ($item['sender'] == $node->data['id']) {
                         $action = 'returning';
                     }
                 }
                 $remaining = $item['start'] + $item['duration'] * 60 - time();
                 $otherNode = new node();
                 if ($item['sender'] == $node->data['id']) {
                     $status = $otherNode->get('id', $item['recipient']);
                 } else {
                     $status = $otherNode->get('id', $item['sender']);
                 }
                 if ($status == 'done') {
                     echo '<div><div class="cell">' . $ui[$action] . ' ' . $ui['combat'] . '</div><div class="cell">"' . $otherNode->data['name'] . '"</div><div class="cell"><span id="combat_' . $item['id'] . '">' . implode(':', misc::sToHMS($remaining)) . '</span><script type="text/javascript">timedJump("combat_' . $item['id'] . '", "node.php?action=get&nodeId=' . $node->data['id'] . '");</script></div>' . $cancel . '</div>';
                 }
             }
             echo '</div>';
         }
     }
     break;
 case 'set':
     if (isset($node->data['id'])) {
         $costData = '';
         foreach ($game['factions'][$node->data['faction']]['costs']['set'] as $key => $cost) {
             $costData .= '<div class="cell">' . $cost['value'] . '</div><div class="cell"><img class="resource" src="templates/' . $_SESSION[$shortTitle . 'User']['template'] . '/images/resources/' . $cost['resource'] . '.png" title="' . $gl['resources'][$cost['resource']]['name'] . '"></div>';
         }
         $selectedFocus = array('hp' => '', 'damage' => '', 'armor' => '');
         $selectedFocus[$node->data['focus']] = ' selected';
         echo '
开发者ID:yunsite,项目名称:devana-heroic,代码行数:31,代码来源:node.php


注:本文中的misc::sToHMS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。