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


PHP Lang::string方法代码示例

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


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

示例1: pagination

 public static function pagination($link_url, $page, $total_rows, $rows_per_page = 0, $max_pages = 0, $pagination_label = false, $target_elem = false)
 {
     global $CFG;
     $link_url = preg_replace("/[^a-zA-Z\\.]/", "", $link_url);
     $page = preg_replace("/[^0-9]/", "", $page);
     $total_rows = preg_replace("/[^0-9]/", "", $total_rows);
     $rows_per_page = preg_replace("/[^0-9]/", "", $rows_per_page);
     $max_pages = preg_replace("/[^0-9]/", "", $max_pages);
     $first_page = false;
     $last_page = false;
     $page = $page > 0 ? $page : 1;
     if (!($rows_per_page > 0)) {
         return false;
     }
     if ($total_rows > $rows_per_page) {
         $num_pages = ceil($total_rows / $rows_per_page);
         $page_array = range(1, $num_pages);
         if ($max_pages > 0) {
             $p_deviation = ($max_pages - 1) / 2;
             $alpha = $page - 1;
             $alpha = $alpha < $p_deviation ? $alpha : $p_deviation;
             $beta = $num_pages - $page;
             $beta = $beta < $p_deviation ? $beta : $p_deviation;
             if ($alpha < $p_deviation) {
                 $beta = $beta + ($p_deviation - $alpha);
             }
             if ($beta < $p_deviation) {
                 $alpha = $alpha + ($p_deviation - $beta);
             }
         }
         $first_text = Lang::string('first-page');
         $last_text = Lang::string('last-page');
         if ($page != 1) {
             $first_page = '<a href="' . $link_url . '?' . http_build_query(array('page' => 1)) . '">' . $first_text . '</a>';
         }
         if ($page != $num_pages) {
             $last_page = ' &nbsp;<a href="' . $link_url . '?' . http_build_query(array('page' => $num_pages)) . '">' . $last_text . '</a>';
         }
         $pagination = '<div class="pagination"><div style="float:left;">' . $first_page;
         foreach ($page_array as $p) {
             if ($p >= $page - $alpha && $p <= $page + $beta || $max_pages == 0) {
                 if ($p == $page) {
                     $pagination .= ' <span>' . $p . '</span> ';
                 } else {
                     $pagination .= ' <a href="' . $link_url . '?' . http_build_query(array('page' => $p)) . '">' . $p . '</a> ';
                 }
             }
         }
         $pagination .= '</div>';
         $label = str_ireplace('[results]', '<b>' . $total_rows . '</b>', Lang::string('transactions-pagination'));
         $label = str_ireplace('[num_pages]', '<b>' . $num_pages . '</b>', $label);
         $pagination .= '<div style="float:right" class="pagination_label">' . $label . '</div>';
         $pagination .= $last_page . '<div style="clear:both;height:0;">&nbsp;</div></div>';
         return $pagination;
     }
 }
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:56,代码来源:Content.php

示例2:

    ?>
		    	<div style="margin-bottom:10px;">
		    		<div class="g-recaptcha" data-sitekey="<?php 
    echo $CFG->google_recaptch_api_key;
    ?>
"></div>
		    	</div>
		    	<?php 
}
?>
	    		<input type="hidden" name="submitted" value="1" />
	    		<input type="hidden" name="uniq" value="<?php 
echo $_SESSION["register_uniq"];
?>
" />
	    		<input type="submit" name="submit" value="<?php 
echo Lang::string('home-login');
?>
" class="but_user" />
	    	</div>
    	</form>
    	<a class="forgot" href="register.php?"><?php 
echo Lang::string('login-dont-have');
?>
</a>
    </div>
    <div class="bg"></div>
    <div class="clearfix mar_top8"></div>
</div>
<?php 
include 'includes/foot.php';
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:login.php

示例3: number_format

							<td>' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '<span class="order_value">' . number_format($ask['btc'] * ($ask['fiat_price'] > 0 ? $ask['fiat_price'] : $ask['stop_price']), 2) . '</span></td>
							<td><a href="edit-order.php?order_id=' . $ask['id'] . '" title="' . Lang::string('orders-edit') . '"><i class="fa fa-pencil"></i></a> <a href="open-orders.php?delete_id=' . $ask['id'] . '&uniq=' . $_SESSION["openorders_uniq"] . '" title="' . Lang::string('orders-delete') . '"><i class="fa fa-times"></i></a></td>
						</tr>';
        if ($double) {
            echo '
						<tr id="ask_' . $ask['id'] . '" class="ask_tr double">
							<td><div class="identify stop_order">S</div></td>
							<td>' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '<span class="order_price">' . number_format($ask['stop_price'], 2) . '</span></td>
							<td><span class="order_amount">' . number_format($ask['btc'], 8) . '</span></td>
							<td>' . $CFG->currencies[$ask['currency']]['fa_symbol'] . '<span class="order_value">' . number_format($ask['stop_price'] * $ask['btc'], 2) . '</span></td>
							<td><span class="oco"><i class="fa fa-arrow-up"></i> OCO</span></td>
						</tr>';
        }
    }
}
echo '<tr id="no_asks" style="' . (is_array($asks) && count($asks) > 0 ? 'display:none;' : '') . '"><td colspan="5">' . Lang::string('orders-no-ask') . '</td></tr>';
?>
					</table>
				</div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div>
<?php 
if (!$bypass) {
    ?>
		<div class="mar_top5"></div>
	</div>
	<?php 
    include 'includes/sidebar_account.php';
    ?>
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:31,代码来源:open-orders.php

示例4:

            echo $api_key['withdraw'] == 'Y' ? 'checked="checked"' : '';
            ?>
 />
								<label for="permission_<?php 
            echo $api_key['id'];
            ?>
_withdraw"><?php 
            echo Lang::string('api-permission_withdraw');
            ?>
</label>
							</td>
							<td class="inactive"></td>
						</tr>
						<?php 
        }
    } else {
        echo '<tr><td colspan="5">' . Lang::string('api-keys-no') . '</td></tr>';
    }
    ?>
					</table>
				</div>
			</form>
           	<?php 
}
?>
            <div class="mar_top8"></div>
        </div>
	</div>
</div>
<?php 
include 'includes/foot.php';
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:31,代码来源:api-access.php

示例5: executeOrder

 public static function executeOrder($buy, $price, $amount, $currency1, $fee, $market_price, $edit_id = 0, $this_user_id = 0, $external_transaction = false, $stop_price = false, $use_maker_fee = false, $verbose = false)
 {
     global $CFG;
     if (!$CFG->session_active) {
         return false;
     }
     if ($CFG->trading_status == 'suspended') {
         db_commit();
         return array('error' => array('message' => Lang::string('buy-trading-disabled'), 'code' => 'TRADING_SUSPENDED'));
     }
     $this_user_id = preg_replace("/[^0-9]/", "", $this_user_id);
     $this_user_id = $this_user_id > 0 ? $this_user_id : User::$info['id'];
     if (!($this_user_id > 0)) {
         db_commit();
         return array('error' => array('message' => 'Invalid authentication.', 'code' => 'AUTH_ERROR'));
     }
     $amount = preg_replace("/[^0-9\\.]/", "", $amount);
     $orig_amount = $amount;
     $price = preg_replace("/[^0-9\\.]/", "", $price);
     $stop_price = preg_replace("/[^0-9\\.]/", "", $stop_price);
     $currency1 = strtolower(preg_replace("/[^a-zA-Z]/", "", $currency1));
     $edit_id = preg_replace("/[^0-9]/", "", $edit_id);
     db_start_transaction();
     $orig_order = false;
     if ($edit_id > 0) {
         if (empty($CFG->session_api) || $external_transaction) {
             $orig_order = DB::getRecord('orders', $edit_id, 0, 1, false, false, false, 1);
         } else {
             $orig_order = self::getRecord(false, $edit_id, $this_user_id, true);
         }
         if ($orig_order['site_user'] != $this_user_id || !$orig_order) {
             db_commit();
             return array('error' => array('message' => 'Order not found.', 'code' => 'ORDER_NOT_FOUND'));
         }
         $buy = $orig_order['order_type'] == $CFG->order_type_bid;
         $currency_info = $CFG->currencies[$orig_order['currency']];
         $currency1 = strtolower($currency_info['currency']);
         $edit_id = $orig_order['id'];
         $use_maker_fee = $use_maker_fee && $orig_order['market_price'] != 'Y';
         if ($external_transaction) {
             $amount = $orig_order['btc'];
             $orig_amount = $amount;
         }
     } else {
         $currency_info = $CFG->currencies[strtoupper($currency1)];
     }
     $bid_ask = self::getBidAsk($currency1);
     $bid = $bid_ask['bid'];
     $ask = $bid_ask['ask'];
     $bid = $bid > $ask ? $ask : $bid;
     $price = $market_price ? $buy ? $ask : $bid : $price;
     $usd_info = $CFG->currencies['USD'];
     $user_balances = User::getBalances($this_user_id, array($currency_info['id'], $CFG->btc_currency_id), true);
     $user_fee = FeeSchedule::getUserFees($this_user_id);
     $on_hold = User::getOnHold(1, $this_user_id, $user_fee, array($currency_info['id'], $CFG->btc_currency_id));
     $this_btc_balance = !empty($user_balances['btc']) ? $user_balances['btc'] : 0;
     $this_fiat_balance = !empty($user_balances[$currency1]) ? $user_balances[$currency1] : 0;
     $this_triggered_stop = $stop_price > 0 && $market_price;
     $stop_price = $stop_price > 0 && $market_price ? false : $stop_price;
     $fee = !$use_maker_fee ? $user_fee['fee'] : $user_fee['fee1'];
     $insert_id = 0;
     $transactions = 0;
     $new_order = 0;
     $edit_order = 0;
     $comp_btc_balance = array();
     $comp_btc_on_hold = array();
     $comp_fiat_balance = array();
     $comp_fiat_on_hold = array();
     $currency_max = false;
     $currency_max_str = false;
     $currency_min = false;
     $currency_min_str = false;
     $compatible = false;
     $trans_total = 0;
     $this_funds_finished = false;
     $hidden_executions = array();
     $max_price = 0;
     $min_price = 0;
     $executed_orders = array();
     $executed_prices = array();
     $executed_orig_prices = false;
     $no_compatible = false;
     $triggered_rows = false;
     if (!empty($on_hold['BTC']['total'])) {
         $this_btc_on_hold = $edit_id > 0 && !$buy ? $on_hold['BTC']['total'] - $amount : $on_hold['BTC']['total'];
     } else {
         $this_btc_on_hold = 0;
     }
     if (!empty($on_hold[strtoupper($currency1)]['total'])) {
         $this_fiat_on_hold = $edit_id > 0 && $buy ? $on_hold[strtoupper($currency1)]['total'] - ($amount * $orig_order['btc_price'] + $amount * $orig_order['btc_price'] * ($fee * 0.01)) : $on_hold[strtoupper($currency1)]['total'];
     } else {
         $this_fiat_on_hold = 0;
     }
     $error = self::checkPreconditions($buy, $currency_info, $amount, $price, $stop_price, $fee, $buy ? $this_fiat_balance - $this_fiat_on_hold : $this_btc_balance - $this_btc_on_hold, $bid, $ask, $market_price, $this_user_id, $orig_order);
     if ($error) {
         db_commit();
         return $error;
     }
     if (!$market_price) {
         $error = self::checkUserOrders($buy, $currency_info, $this_user_id, $price, $stop_price, $fee);
//.........这里部分代码省略.........
开发者ID:MirellJ,项目名称:wlox-cron,代码行数:101,代码来源:Orders.php

示例6: array

    Link::redirect('index.php');
}
API::add('Content', 'getRecord', array('logged-out'));
$query = API::send();
$page_title = Lang::string('log-out');
$content = $query['Content']['getRecord']['results'][0];
include 'includes/head.php';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="index.php"><?php 
echo Lang::string('home');
?>
</a> <i>/</i> <a href="news.php"><?php 
echo $page_title;
?>
</a></div>
	</div>
</div>
<div class="container">
	<div class="content_right">
		<h2><?php 
echo $content['title'];
?>
</h2>
        <div class="text"><?php 
echo $content['content'];
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:logout.php

示例7:

	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="<?php 
echo Lang::url('index.php');
?>
"><?php 
echo Lang::string('home');
?>
</a> <i>/</i> <a href="<?php 
echo Lang::url('our-security.php');
?>
"><?php 
echo Lang::string('our-security');
?>
</a></div>
	</div>
</div>
<div class="container">
	<div class="content_right">
    <div class="text1"><?php 
echo $content['content'];
?>
</div>
    </div>
    <?php 
include 'includes/sidebar_topics.php';
?>
	<div class="clearfix mar_top8"></div>
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:31,代码来源:our-security.php

示例8:

        ?>
</div>
					</div>
				</div>
			</div>
		</div>
		<?php 
        echo $c != $i ? '<div class="clearfix divider_line3"></div>' : '';
        ?>
			<?php 
        $i++;
    }
}
?>
        <div class="clearfix mar_top5"></div>
        <a href="<?php 
echo Lang::url('press-releases.php');
?>
" class="highlight gray bigger"><i class="fa fa-plus-square"></i> <?php 
echo Lang::string('news-see-all');
?>
</a>
    </div>
	<div class="clearfix mar_top8"></div>
</div><!-- end features section 3 -->




<?php 
include 'includes/foot.php';
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:index.php

示例9:

            <div class="text"><p><?php 
echo Lang::string('settings-pass-explain');
?>
</p></div>
            <div class="content">
            	<h3 class="section_label">
                    <span class="left"><i class="fa fa-user fa-2x"></i></span>
                    <span class="right"><?php 
echo Lang::string('settings-personal-password');
?>
</span>
                </h3>
                <div class="clear"></div>
                <?php 
$personal->passwordInput('pass', Lang::string('settings-pass'), true);
$personal->passwordInput('pass2', Lang::string('settings-pass-confirm'), true, false, false, false, false, false, 'pass');
$personal->HTML('<div class="form_button"><input type="submit" name="submit" value="' . Lang::string('settings-save-password') . '" class="but_user" /></div>');
$personal->hiddenInput('uniq', 1, $_SESSION["firstlogin_uniq"]);
$personal->display();
?>
            	<div class="clear"></div>
            </div>       
            <div class="mar_top8"></div>
        </div>
	</div>
	<?php 
include 'includes/sidebar_account.php';
?>
</div>
<?php 
include 'includes/foot.php';
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:31,代码来源:first_login.php

示例10: foreach

        			</tr>
        			<?php 
if ($requests) {
    foreach ($requests as $request) {
        echo '
					<tr>
						<td>' . $request['id'] . '</td>
						<td><input type="hidden" class="localdate" value="' . strtotime($request['date']) . '" /></td>
						<td>' . $request['description'] . '</td>
						<td>' . ($CFG->currencies[$request['currency']]['is_crypto'] == 'Y' ? String::currency($request['amount'], true) . ' ' . $request['fa_symbol'] : $request['fa_symbol'] . String::currency($request['amount'])) . '</td>
    					<td>' . ($CFG->currencies[$request['currency']]['is_crypto'] == 'Y' ? String::currency($request['net_amount'] > 0 ? $request['net_amount'] : $request['amount'] - $request['fee'], true) . ' ' . $request['fa_symbol'] : $request['fa_symbol'] . String::currency($request['net_amount'] > 0 ? $request['net_amount'] : $request['amount'] - $request['fee'])) . '</td>
						<td>' . $request['status'] . '</td>
					</tr>';
    }
} else {
    echo '<tr><td colspan="6">' . Lang::string('withdraw-no') . '</td></tr>';
}
?>
        		</table>
			</div>
			<?php 
echo $pagination;
if (empty($_REQUEST['bypass'])) {
    ?>
		</div>
		<div class="mar_top5"></div>
	</div>
	<?php 
    include 'includes/sidebar_account.php';
    ?>
</div>
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:withdraw.php

示例11:

include 'includes/head.php';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="<?php 
echo Lang::url('index.php');
?>
"><?php 
echo Lang::string('home');
?>
</a> <i>/</i> <a href="withdrawing-account.php"><?php 
echo Lang::string('withdrawing-account');
?>
</a></div>
	</div>
</div>
<div class="container">
	<div class="content_right">
    <div class="text"><?php 
echo $content['content'];
?>
</div>
    </div>
    <?php 
include 'includes/sidebar_topics.php';
?>
	<div class="clearfix mar_top8"></div>
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:31,代码来源:withdrawing-account.php

示例12: str_replace

$content = str_replace('(boolean)', '<u>(boolean)</u>', $content);
$content = str_replace('(array)', '<u>(array)</u>', $content);
$content = preg_replace("#<div\\s(.+?)>\\s+<p>(.+?)<\\/p>\\s+<\\/div>#is", "<pre \$1><code \$1>\$2</code></pre>", $content);
include 'includes/head.php';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="index.php"><?php 
echo Lang::string('home');
?>
</a> <i>/</i> <a href="api-docs.php"><?php 
echo Lang::string('api-docs');
?>
</a></div>
	</div>
</div>
<div class="container">
	<div class="content_right">
    <div class="text2"><?php 
echo $content['content'];
?>
</div>
    </div>
    <?php 
include 'includes/sidebar_topics.php';
?>
	<div class="clearfix mar_top8"></div>
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:api-docs.php

示例13: elseif

} elseif (!User::isLoggedIn()) {
    Link::redirect('login.php');
}
include 'includes/head.php';
?>
<div class="page_title">
	<div class="container">
		<div class="title"><h1><?php 
echo $page_title;
?>
</h1></div>
        <div class="pagenation">&nbsp;<a href="index.php"><?php 
echo Lang::string('home');
?>
</a> <i>/</i> <a href="account.php"><?php 
echo Lang::string('account');
?>
</a> <i>/</i> <a href="withdraw.php"><?php 
echo $page_title;
?>
</a></div>
	</div>
</div>
<div class="container">
	<div class="content_right">
		<div class="testimonials-4">
			<?php 
Errors::display();
?>
			<?php 
Messages::display();
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:merchant-info.php

示例14:

		    	<?php 
} else {
    ?>
		    	<div style="margin-bottom:10px;">
		    		<div class="g-recaptcha" data-sitekey="<?php 
    echo $CFG->google_recaptch_api_key;
    ?>
"></div>
		    	</div>
		    	<?php 
}
?>
		    	<input type="hidden" name="uniq" value="<?php 
echo $_SESSION["forgot_uniq"];
?>
" />
	    		<input type="submit" name="submit" value="<?php 
echo Lang::string('login-forgot-send-new');
?>
" class="but_user" />
	    	</div>
    	</form>
    	<a class="forgot" href="login.php"><?php 
echo Lang::string('login-remembered');
?>
</a>
    </div>
    <div class="clearfix mar_top8"></div>
</div>
<?php 
include 'includes/foot.php';
开发者ID:bitdoviz,项目名称:wlox-frontend,代码行数:31,代码来源:forgot.php

示例15:

    echo $CFG->self == 'withdraw.php' ? 'class="active"' : '';
    ?>
><?php 
    echo Lang::string('withdraw');
    ?>
</a></li>
                    <li style="display:none;"><a href="help.php"><?php 
    echo Lang::string('help');
    ?>
</a></li>
	                <li style="display:none;"><a href="contact.php"><?php 
    echo Lang::string('contact');
    ?>
</a></li>
	                <li style="display:none;"><a href="logout.php?log_out=1"><?php 
    echo Lang::string('log-out');
    ?>
</a></li>
	                <?php 
}
?>
                </ul>
            </div>
            
        </nav><!-- end nav menu -->
      
        </div>
        
        
		</div>
		
开发者ID:gfts,项目名称:1btcxe-frontend,代码行数:30,代码来源:head.php


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