/** * @brief display unit resources * @global type $tool_content * @global type $langUnknownResType * @global type $is_editor * @param type $info * @return type */ function show_resource($info) { global $tool_content, $langUnknownResType, $is_editor; if ($info->visible == 0 and !$is_editor) { return; } switch ($info->type) { case 'doc': $tool_content .= show_doc($info->title, $info->comments, $info->id, $info->res_id); break; case 'text': $tool_content .= show_text($info->comments, $info->id, $info->visible); break; case 'description': $tool_content .= show_description($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'lp': $tool_content .= show_lp($info->title, $info->comments, $info->id, $info->res_id); break; case 'video': case 'videolink': $tool_content .= show_video($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'videolinkcategory': $tool_content .= show_videocat($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'exercise': $tool_content .= show_exercise($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'work': $tool_content .= show_work($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'topic': case 'forum': $tool_content .= show_forum($info->type, $info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'wiki': $tool_content .= show_wiki($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'poll': $tool_content .= show_poll($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'link': $tool_content .= show_link($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'linkcategory': $tool_content .= show_linkcat($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'ebook': $tool_content .= show_ebook($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'section': $tool_content .= show_ebook_section($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; case 'subsection': $tool_content .= show_ebook_subsection($info->title, $info->comments, $info->id, $info->res_id, $info->visible); break; default: $tool_content .= $langUnknownResType; } }
function show_links($is_logged_in, $is_admin, $is_verified) { $show_duo = 0; if ($is_logged_in) { require_once 'db.php'; $result = do_query("SELECT use_duo FROM users WHERE uid={$is_logged_in}"); $row = get_row($result); $show_duo = !$row['use_duo']; } if (!$is_logged_in) { show_link('login', _('Login'), _('Begin here')); } show_link('news', _('News'), _("What's new?")); show_link('trade', _('Trade'), _('Buy and sell')); if ($is_logged_in) { show_link('profile', _('Profile'), _('Dox on you')); } if ($is_logged_in) { show_link('statement', _('Statement'), _('Chronological ledger')); } if ($is_logged_in) { show_link('deposit', _('Deposit'), _('Top up your account')); } if ($is_logged_in) { show_link('withdraw', _('Withdraw'), _('Take out money')); } show_link('orderbook', _('Orderbook'), _('Show orders')); if ($show_duo) { show_link('turn_on_duo', _('Security'), _('Use two-factor authentification')); } if ($is_logged_in && !$is_verified) { show_link('identity', _('Identify'), _('Upload ID to get your account verified')); } if (CHARTS_PAGE) { printf("<li><a target='_blank' href='%s'>%s</a>%s\n", CHARTS_PAGE, _('Charts'), _('From bitcoincharts.com')); } show_link('help', _('Help'), _('Seek support')); if ($is_admin) { show_link('docs', _('Docs'), _('Show docs from unverified users'), 1); } if ($is_admin) { show_link('users', _('Users'), _('Show registered users'), 1); } if ($is_admin) { show_link('add_cash', _('Add cash'), _('Deposit using bank statement'), 1); } if ($is_admin) { show_link('commission', _('Commission'), _('Show commission statement'), 1); } if ($is_admin) { show_link('bank', _('Bank'), _('Show bank statement & pending withdrawals'), 1); } if ($is_admin) { show_link('freeze', _('Freeze'), _('Stop activity on the exchange'), 1); } if ($is_admin) { show_link('graph', _('Charts'), _('Various admin graphs'), 1); } if ($is_logged_in) { show_link('logout', _('Logout'), _('End this session')); } echo "<br/><g:plusone annotation=\"bubble\" href=\"https://www.worldbitcoinexchange.com/\"></g:plusone>\n"; }
<legend>Nghĩa</legend> <textarea class="textMeanings" name="meanings"><?php echo $meanings; ?> </textarea> </fieldset> <br /> <fieldset class="fs"> <legend>Xác thực</legend> Tên <input type="text" name="user" value="" class="inputUser" maxlength="36"> Mật mã <input id="f_pass" type="password" name="pass" value="" class="inputPass" maxlength="36"> </fieldset> <br /> <input type="hidden" name="dict" value="<?php echo $dict; ?> "> <input type="submit" name="submit" value="<?php echo $title[$action]; ?> "> </form> <hr noshade size=1 width="50%"> <?php show_link($root_url, "Trang từ điển"); ?> </center> </body> </html>