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


PHP prot函数代码示例

本文整理汇总了PHP中prot函数的典型用法代码示例。如果您正苦于以下问题:PHP prot函数的具体用法?PHP prot怎么用?PHP prot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: mysql_query

<?php

if (isset($_POST['s_title']) && !empty($_POST['s_title']) && !empty($_POST['s_url']) && !empty($_POST['s_desc']) && !empty($_POST['cur']) && !empty($_POST['cur_s'])) {
    mysql_query("UPDATE `system` SET `title`='" . prot($_POST['s_title']) . "',`url`='" . prot($_POST['s_url']) . "',`currency`='" . prot($_POST['cur']) . "',`currency_sign`='" . prot($_POST['cur_s']) . "',`description`='" . prot($_POST['s_desc']) . "' WHERE `id`=1 LIMIT 1");
}
开发者ID:tellurion-project,项目名称:CoinWheel,代码行数:5,代码来源:post.php

示例2: header

<?php

/*
 *  © CryptoBlackJack
 *  
 *  
 *  
*/
header('X-Frame-Options: DENY');
session_start();
if (!isset($_SESSION['logged_']) || $_SESSION['logged_'] !== true) {
    exit;
}
$included = true;
$init = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
if (empty($_GET['admin']) || !is_numeric($_GET['admin']) || empty($_GET['unm']) || empty($_GET['pass']) || mysql_num_rows(mysql_query("SELECT `id` FROM `admins` WHERE `id`='" . prot($_GET['admin']) . "' LIMIT 1")) == 0) {
    exit;
}
mysql_query("UPDATE `admins` SET `username`='" . prot($_GET['unm']) . "',`passwd`='" . md5($_GET['pass']) . "' WHERE `id`='" . prot($_GET['admin']) . "' LIMIT 1");
echo json_encode(array('error' => 'no'));
开发者ID:blackchat,项目名称:CryptoBlackJack,代码行数:22,代码来源:edit_admin.php

示例3: mysql_query

     $content .= '</table>';
     break;
 case 'news':
     $query = mysql_query("SELECT * FROM `news` ORDER BY `time` DESC");
     while ($row = mysql_fetch_array($query)) {
         $content .= '<div class="news_single">';
         $content .= str_replace('[I]', '<i>', str_replace('[/I]', '</i>', str_replace('[BR]', '<br>', str_replace('[/B]', '</b>', str_replace('[B]', '<b>', $row['content']))))) . '<br><span class="news_single_time">' . $row['time'] . '</span>';
         $content .= '</div>';
     }
     $content .= ' <br>';
     break;
 case 'fair':
     $unique = $_GET['_unique'];
     $player = mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($unique) . "' LIMIT 1"));
     if ($player != 0) {
         $player = mysql_fetch_array(mysql_query("SELECT `id`,`server_seed`,`client_seed`,`old_server_seed`,`old_client_seed` FROM `players` WHERE `hash`='" . prot($unique) . "' LIMIT 1"));
     } else {
         exit;
     }
     $content .= '<div id="fair_nice">';
     $content .= '<span class="seed_hash">Server seed hash: <b>' . hash('sha256', $player['server_seed']) . '</b></span>';
     $content .= '<br><span class="seed_hash">Client seed: <b>' . $player['client_seed'] . '</b></span>';
     $content .= '<br><a href="#" onclick="javascript:randomize();return false;" class="randomize">Set client seed for next spin</a><br>';
     $content .= '<br><span class="seed_hash">Old server seed: <b>' . $player['old_server_seed'] . '</b></span>';
     $content .= '<br><span class="seed_hash">Old client seed: <b>' . $player['old_client_seed'] . '</b></span><br>';
     $content .= '<br><span class="seed_hash">Formula: <b>((<i>client_seed</i> * 9) Mod 16) + 1</b> = final order in server seed</span><br><br>';
     $content .= '<br><span class="seed_hash"><b>Served seed values:</b></span>';
     $content .= '<br><span class="seed_hash">0 = 1.25x</span>';
     $content .= '<br><span class="seed_hash">1 = 0.25x</span>';
     $content .= '<br><span class="seed_hash">2 = 2x</span>';
     $content .= '<br><span class="seed_hash">3 = 0x</span>';
开发者ID:tellurion-project,项目名称:CoinWheel,代码行数:31,代码来源:_stats_load.php

示例4: mysql_fetch_array

if (empty($_GET['_unique']) || mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1")) == 0) {
    exit;
}
$player = mysql_fetch_array(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1"));
validateAccess($player['id']);
$settings = mysql_fetch_array(mysql_query("SELECT * FROM `system` WHERE `id`=1 LIMIT 1"));
if ($settings['chat_enable'] == 0) {
    exit;
}
if (empty($_GET['data'])) {
    echo json_encode(array('error' => 'yes', 'content' => 'nodata'));
    exit;
}
$alone = true;
$lastTen = mysql_query("SELECT * FROM `chat` ORDER BY `time` DESC LIMIT 10");
if (mysql_num_rows($lastTen) < 10) {
    $alone = false;
} else {
    while ($each = mysql_fetch_array($lastTen)) {
        if ($each['sender'] != $player['id']) {
            $alone = false;
            break;
        }
    }
}
if ($alone) {
    echo json_encode(array('error' => 'yes', 'content' => 'max_in_row'));
    exit;
}
mysql_query("INSERT INTO `chat` (`sender`,`content`) VALUES ({$player['id']},'" . substr(prot($_GET['data']), 0, 200) . "')");
echo json_encode(array('error' => 'no'));
开发者ID:blackchat,项目名称:CryptoBlackJack,代码行数:31,代码来源:chatSend.php

示例5: header

<?php

/*
 *  © CoinDice 
 *  Demo: http://www.btcircle.com/dice
 *  Please do not copy or redistribute.
 *  More licences we sell, more products we develop in the future.  
*/
header('X-Frame-Options: DENY');
session_start();
if (!isset($_SESSION['logged_']) || $_SESSION['logged_'] !== true) {
    exit;
}
$included = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
if (empty($_GET['_admin']) || mysql_num_rows(mysql_query("SELECT `id` FROM `admins` WHERE `id`='" . prot($_GET['_admin']) . "' LIMIT 1")) == 0) {
    exit;
}
mysql_query("DELETE FROM `admins` WHERE `id`='" . prot($_GET['_admin']) . "' LIMIT 1");
echo json_encode(array('error' => 'no'));
开发者ID:CoinDice,项目名称:CoinDice,代码行数:21,代码来源:delete_admin.php

示例6: header

header('X-Frame-Options: DENY');
$included = true;
include '../../inc/db-conf.php';
include '../../inc/wallet_driver.php';
$wallet = new jsonRPCClient($driver_login);
include '../../inc/functions.php';
if (empty($_GET['amount']) || empty($_GET['valid_addr']) || empty($_GET['_unique']) || mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1")) == 0) {
    exit;
}
$player = mysql_fetch_array(mysql_query("SELECT `id`,`balance` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1"));
$validate = $wallet->validateaddress($_GET['valid_addr']);
if ($validate['isvalid'] == false) {
    $error = 'yes';
    $con = 0;
} else {
    $player = mysql_fetch_array(mysql_query("SELECT `id`,`balance` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1"));
    if (!is_numeric($_GET['amount']) || (double) $_GET['amount'] > $player['balance'] || (double) $_GET['amount'] < $settings['min_withdrawal']) {
        $error = 'yes';
        $con = 1;
    } else {
        $amount = (double) $_GET['amount'];
        $txid = $wallet->sendtoaddress($_GET['valid_addr'], $amount);
        if ((string) $txid != '') {
            mysql_query("UPDATE `players` SET `balance`=TRUNCATE(ROUND((`balance`-{$amount}),9),8) WHERE `id`={$player['id']} LIMIT 1");
        }
        mysql_query("INSERT INTO `transactions` (`player_id`,`amount`,`txid`) VALUES ({$player['id']},(0-{$amount}),'{$txid}')");
        $error = 'no';
        $con = $txid;
    }
}
$return = array('error' => $error, 'content' => $con);
开发者ID:Cryptix23,项目名称:CryptoDice,代码行数:31,代码来源:withdraw.php

示例7: mysql_query

<?php

/*
 *  © CryptoBlackJack
 *  
 *  
 *  
*/
if (!isset($included)) {
    exit;
}
if (isset($_POST['new_new'])) {
    if (!empty($_POST['new_new'])) {
        mysql_query("INSERT INTO `news` (`content`) VALUES ('" . prot($_POST['new_new']) . "')");
        echo '<div class="zpravagreen"><b>Success:</b> New has been posted.</div>';
    } else {
        echo '<div class="zpravared"><b>Error:</b> One of required fields stayed empty.</div>';
    }
}
?>
<h1>News</h1>
<div class="zprava">
<b>Add new:</b><br>
<form method="post" action="./?p=news">
<table><tr><td><textarea name="new_new" style="width: 480px; height: 70px;"></textarea></td><td><input style="padding: 10px;" type="submit" value="Post"></td></tr></table>
<small>
<b>[B]</b>...<b>[/B]</b> = bold font<br>
<b>[I]</b>...<b>[/I]</b> = italic font<br>
<b>[BR]</b> = new line
</small>
</form>
开发者ID:Klaasje-NL,项目名称:CryptoBlackJack,代码行数:31,代码来源:news.php

示例8: mysql_query

<?php

/*
 *  © CryptoDice 
 *  
 *  
 *    
*/
if (isset($included) && $logged == true) {
    if (!empty($_POST['s_title']) && !empty($_POST['s_url']) && !empty($_POST['s_desc']) && !empty($_POST['cur']) && !empty($_POST['acttheme']) && !empty($_POST['cur_s']) && isset($_POST['bet_fr_players']) && is_numeric((int) $_POST['bet_fr_players']) && isset($_POST['bet_fr_bots']) && is_numeric((int) $_POST['bet_fr_bots']) && isset($_POST['house_edge']) && is_numeric((double) $_POST['house_edge']) && isset($_POST['min_withdrawal']) && is_numeric((double) $_POST['min_withdrawal']) && isset($_POST['txfee']) && is_numeric((double) $_POST['txfee']) && isset($_POST['bankroll_maxbet_ratio']) && is_numeric((double) $_POST['bankroll_maxbet_ratio'])) {
        mysql_query("UPDATE `system` SET `title`='" . prot($_POST['s_title']) . "',`url`='" . prot($_POST['s_url']) . "',`activeTheme`='" . prot($_POST['acttheme']) . "',`currency`='" . prot($_POST['cur']) . "',`currency_sign`='" . prot($_POST['cur_s']) . "',`description`='" . prot($_POST['s_desc']) . "',`house_edge`=" . (double) $_POST['house_edge'] . ",`rolls_mintime`=" . (int) $_POST['bet_fr_players'] . ",`rolls_mintime_bB`=" . (int) $_POST['bet_fr_bots'] . ",`min_withdrawal`=" . (double) $_POST['min_withdrawal'] . ",`bankroll_maxbet_ratio`=" . (double) $_POST['bankroll_maxbet_ratio'] . " WHERE `id`=1 LIMIT 1");
        $wallet->settxfee(round((double) $_POST['txfee'], 8));
    }
    if (isset($_POST['addons_form'])) {
        $giveaway = isset($_POST['giveaway']) ? 1 : 0;
        $chat_enable = isset($_POST['chat_enable']) ? 1 : 0;
        $bot_enable = isset($_POST['bot_enable']) ? 1 : 0;
        mysql_query("UPDATE `system` SET `giveaway`={$giveaway},`giveaway_amount`=" . (double) $_POST['giveaway_amount'] . ",`giveaway_freq`=" . (int) $_POST['giveaway_freq'] . ",`chat_enable`={$chat_enable},`bot_enable`={$bot_enable} LIMIT 1");
    }
}
开发者ID:blackchat,项目名称:CryptoDice,代码行数:20,代码来源:post.php

示例9: header

<?php

/*
 *  © CryptoBlackJack
 *  
 *  
 *  
*/
header('X-Frame-Options: DENY');
$init = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
if (empty($_GET['_unique']) || mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1")) == 0) {
    exit;
}
$player = mysql_fetch_array(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1"));
validateAccess($player['id']);
if (empty($_GET['alias'])) {
    echo json_encode(array('color' => 'red', 'content' => 'Alias can\'t be empty.'));
    exit;
}
$repaired = substr(prot($_GET['alias']), 0, 25);
if (mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `alias`='{$repaired}' LIMIT 1")) != 0) {
    echo json_encode(array('color' => 'red', 'content' => 'This alias is already taken.'));
    exit;
}
mysql_query("UPDATE `players` SET `alias`='{$repaired}' WHERE `id`={$player['id']} LIMIT 1");
echo json_encode(array('color' => 'green', 'content' => 'Alias has been saved.', 'repaired' => $repaired));
开发者ID:blackchat,项目名称:CryptoBlackJack,代码行数:28,代码来源:saveAlias.php

示例10: header

<?php

/*
 *  © BitcoinDice 
 */
header('X-Frame-Options: DENY');
$included = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
if (empty($_GET['alias']) || empty($_GET['_unique']) || mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1")) == 0) {
    exit;
}
if (mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `alias`='" . prot($_GET['alias']) . "' LIMIT 1")) != 0) {
    echo json_encode(array('error' => 'yes', 'content' => 'This alias is alredy taken :-('));
    exit;
}
if (strlen(prot($_GET['alias'])) < 3) {
    echo json_encode(array('error' => 'yes', 'content' => 'Alias can not be shorter than 3 characters!'));
    exit;
}
mysql_query("UPDATE `players` SET `alias`='" . prot($_GET['alias']) . "' WHERE `hash`='" . prot($_GET['_unique']) . "' LIMIT 1");
echo json_encode(array('error' => 'no', 'content' => true));
开发者ID:5chain,项目名称:BitcoinDice,代码行数:22,代码来源:change_alias.php

示例11: prot

/*
 *  © CoinDice 
 *  Demo: http://www.btcircle.com/dice
 *  Please do not copy or redistribute.
 *  More licences we sell, more products we develop in the future.  
*/
if (!isset($included)) {
    exit;
}
$perPage = 20;
$ifSearch = '';
$podm = '';
if (!empty($_GET['_search'])) {
    $podm = " WHERE `hash` LIKE '%" . prot($_GET['_search']) . "%' OR `alias` LIKE '%" . prot($_GET['_search']) . "%'";
    if (is_numeric($_GET['_search'])) {
        $podm .= " OR `balance`=" . prot($_GET['_search']) . " OR `id`=" . prot($_GET['_search']);
    }
    $ifSearch = $_GET['_search'];
}
$page = 1;
if (!empty($_GET['_page']) && is_numeric($_GET['_page']) && is_int((int) $_GET['_page'])) {
    $page = (int) $_GET['_page'];
    $lima = -$perPage + $page * $perPage;
} else {
    $lima = 0;
}
$query_ = mysql_query("SELECT `id`,`alias`,`hash`,`balance`,`time_last_active`,`lastip` FROM `players`{$podm} ORDER BY `time_created` DESC LIMIT {$lima},{$perPage}");
$pocet = mysql_num_rows(mysql_query("SELECT `id` FROM `players`{$podm}"));
$pages_ = $pocet / $perPage;
$xplosion = explode('.', (string) $pages_);
$pages = (int) $xplosion[0] + 1;
开发者ID:CoinDice,项目名称:CoinDice,代码行数:31,代码来源:players.php

示例12: header

<?php

/*
 *  © CoinDice 
 *  Demo: http://www.btcircle.com/dice
 *  Please do not copy or redistribute.
 *  More licences we sell, more products we develop in the future.  
*/
header('X-Frame-Options: DENY');
session_start();
if (!isset($_SESSION['logged_']) || $_SESSION['logged_'] !== true) {
    exit;
}
$included = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
if (empty($_GET['_player']) || empty($_GET['a']) || empty($_GET['h']) || !is_numeric($_GET['b']) || mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `id`='" . prot($_GET['_player']) . "' LIMIT 1")) == 0) {
    exit;
}
mysql_query("UPDATE `players` SET `hash`='" . prot($_GET['h']) . "',`balance`={$_GET['b']},`alias`='" . prot($_GET['a']) . "' WHERE `id`='" . prot($_GET['_player']) . "' LIMIT 1");
echo json_encode(array('error' => 'no'));
开发者ID:CoinDice,项目名称:CoinDice,代码行数:21,代码来源:edit_player.php

示例13: prot

$mp2500 = prot('boinc_master', 'boinc_project', '0500+setgid');
$rm4050 = prot('root', 'boinc_master', '0050+setuid');
$rm4555 = prot('root', 'boinc_master', '0555+setuid');
$mm0550 = prot('boinc_master', 'boinc_master', '0550');
$mm0555 = prot('boinc_master', 'boinc_master', '0555');
$mm0444 = prot('boinc_master', 'boinc_master', '0444');
$mm0660 = prot('boinc_master', 'boinc_master', '0660');
$mm0664 = prot('boinc_master', 'boinc_master', '0664');
$mm0771 = prot('boinc_master', 'boinc_master', '0771');
$mp0770 = prot('boinc_master', 'boinc_project', '0770');
$mp0775 = prot('boinc_master', 'boinc_project', '0775');
$mp06610771 = prot('boinc_master', 'boinc_project', '0661 or 0771');
$mp06640775 = prot('boinc_master', 'boinc_project', '0664 or 0775');
$mm2555 = prot('boinc_master', 'boinc_master', '0555');
$mm6555 = prot('boinc_master', 'boinc_master', '0555+setuid+setgid');
$ua0555 = prot('(installing user)', 'admin', '0555');
$colors = array('ddddff', 'ccccff', 'bbbbff');
function show_dir($level, $name, $prot, $contents)
{
    global $colors;
    $color = $colors[$level];
    $x = "\n        <table bgcolor={$color} cellpadding=6 cellspacing=0 border=1 width=100%>\n        <tr>\n            <td valign=top><b>{$name}</b> <font size=-1>{$prot}</font></td><td valign=top>\n    ";
    for ($i = 0; $i < sizeof($contents); $i++) {
        if ($i) {
            $x .= '<br>';
        }
        $c = $contents[$i];
        $x .= $c;
    }
    $x .= "\n        </td></tr>\n        </table>\n    ";
    return $x;
开发者ID:CalvinZhu,项目名称:boinc,代码行数:31,代码来源:sandbox.php

示例14: mysql_query

<?php

if (!isset($included)) {
    exit;
}
if (isset($_POST['nwa_user']) && isset($_POST['nwa_pass'])) {
    if (!empty($_POST['nwa_user']) && !empty($_POST['nwa_pass'])) {
        mysql_query("INSERT INTO `admins` (`username`,`passwd`) VALUES ('" . prot($_POST['nwa_user']) . "','" . md5($_POST['nwa_pass']) . "')");
        echo '<div class="zpravagreen"><b>Success:</b> Admin was successfuly created!</div>';
    } else {
        echo '<div class="zpravared"><b>Error:</b> One of required fields stayed empty!</div>';
    }
}
?>
<h1>Administrators</h1>
<div class="zprava">
<b>New admin:</b><br>
<form action="./?p=admins" method="post">
  Username: <input type="text" name="nwa_user"> Password: <input type="password" name="nwa_pass"> <input type="submit" value="Create">
</form>
</div>
<table class="vypis_table">
  <tr class="vypis_table_head">
    <th>ID</th>
    <th>Username</th>
    <th>Actions</th>
  </tr>
    <?php 
$qu = mysql_query("SELECT * FROM `admins`");
while ($row = mysql_fetch_array($qu)) {
    echo '<tr class="vypis_table_obsah" id="rowid_' . $row['id'] . '">';
开发者ID:tellurion-project,项目名称:CoinWheel,代码行数:31,代码来源:admins.php

示例15: header

<?php

/*
 *  © CryptoDice 
 *  
 *  
 *    
*/
header('X-Frame-Options: DENY');
session_start();
if (!isset($_SESSION['logged_']) || $_SESSION['logged_'] !== true) {
    exit;
}
$included = true;
include '../../inc/db-conf.php';
include '../../inc/functions.php';
include '../ga_class.php';
if (empty($_GET['newtoken']) || empty($_GET['totp']) || empty($_GET['id'])) {
    exit;
}
$verify = Google2FA::verify_key(prot($_GET['newtoken']), $_GET['totp'], 0);
if ($verify == true) {
    mysql_query("UPDATE `admins` SET `ga_token`='" . prot($_GET['newtoken']) . "' WHERE `id`=" . prot($_GET['id']) . " LIMIT 1");
    echo json_encode(array('success' => 'yes'));
} else {
    echo json_encode(array('success' => 'no'));
}
开发者ID:blackchat,项目名称:CryptoDice,代码行数:27,代码来源:pair.php


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