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


PHP Transaction::query方法代码示例

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


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

示例1: while

            <tr>
                <td class='tablesubheader' width='1%' align='center'>ID</td>
                <td class='tablesubheader' width='20%'>Nome do Template</td>
                <td class='tablesubheader' width='12%' align='left'>Versão</td>
                <td class='tablesubheader' width='12%' align='left'>Autor</td>
                <td class='tablesubheader' width='10%' align='left'>Ativado?</td>
                <td class='tablesubheader' width='1%' align='center'>Ativar</td>
                <td class='tablesubheader' width='1%' align='center'>Deletar</td>
            </tr>
            <?php 
        $query_min = $page * 50 - 50;
        if ($query_min < 0) {
            // Page 1
            $query_min = 0;
        }
        $get_articles = Transaction::query("SELECT * FROM mobbo_templates ORDER BY id DESC LIMIT 100");
        while ($row = Transaction::fetch($get_articles)) {
            ?>

                <tr>
                    <td class='tablerow1' align='center'><?php 
            echo $row['id'];
            ?>
</td>
                    <td class='tablerow2'><strong><?php 
            echo Security::textFilterHK($row['name']);
            ?>
</strong><div class='desctext'><?php 
            echo $row['longstory'];
            ?>
</div></td>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:templates.php

示例2: htmlentities

 $rawname = htmlentities($_SESSION['id']);
 $usersql = Transaction::query("SELECT * FROM users WHERE id = '" . $rawname . "' LIMIT 1");
 $myrow = Transaction::fetch($usersql);
 $ban = Transaction::query("SELECT * FROM bans WHERE value = '" . $myrow['username'] . "' AND bantype = 'user' or value = '" . $remote_ip . "' AND bantype = 'ip' LIMIT 1");
 $bancheck = Transaction::num_rows($ban);
 if ($myrow['ip_reg'] == "0") {
     Transaction::query("UPDATE users SET ip_reg = '" . $remote_ip . "' WHERE id = '" . $myrow['id'] . "'");
 } elseif ($bancheck > 0) {
     $bandata = Transaction::fetch($ban);
     $timestamp = time();
     if ($bandata['expire'] > $timestamp) {
         session_destroy();
         header("Location: index.php");
         exit;
     } else {
         Transaction::query("DELETE FROM bans WHERE value = '" . $name . "' AND bantype = 'user' or value = '" . $remote_ip . "' AND bantype = 'ip' LIMIT 1");
     }
 }
 $rawhotel = 0;
 $rawhotel = md5($myrow['id'] + $myrow['username'] + $myrow['password'] + Security::getUserIP());
 if (isset($_COOKIE['rawsessionhotel'])) {
     if ($_COOKIE['rawsessionhotel'] == $rawhotel) {
         $logged_in = true;
         $name = mobbo::HoloText($myrow['username']) != 0 ? mobbo::HoloText($myrow['username']) : "Guest";
         $id = mobbo::HoloText($myrow['id']) != 0 ? mobbo::HoloText($myrow['id']) : 0;
         @($fb_id = mobbo::HoloText($myrow['fb_id']) != 0 ? mobbo::HoloText($myrow['fb_id']) : 0);
         $my_id = mobbo::HoloText($myrow['id']) != 0 ? mobbo::HoloText($myrow['id']) : 0;
         $motto = mobbo::HoloText($myrow['motto']) != 0 ? mobbo::HoloText($myrow['moyyo']) : "Nothing";
         $mail = mobbo::HoloText($myrow['mail']) != 0 ? mobbo::HoloText($myrow['mail']) : "guest@guest.com";
         $rank = mobbo::HoloText($myrow['rank']) != 0 ? mobbo::HoloText($myrow['rank']) : 0;
         $credits = mobbo::HoloText($myrow['credits']) != 0 ? mobbo::HoloText($myrow['credits']) : 0;
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:index.php

示例3: while

                <table cellpadding='4' cellspacing='0' width='100%'>
                    <tr>
                        <td class='tablesubheader' width='1%' align='center'>ID</td>
                        <td class='tablesubheader' width='20%'>Ttulo</td>
                        <td class='tablesubheader' width='12%' align='left'>Data</td>
                        <td class='tablesubheader' width='10%' align='left'>Autor</td>
                        <td class='tablesubheader' width='1%' align='center'>Editar</td>
                        <td class='tablesubheader' width='1%' align='center'>Remover</td>
                    </tr>
                    <?php 
        $query_min = $page * 50 - 50;
        if ($query_min < 0) {
            // Page 1
            $query_min = 0;
        }
        $get_articles = Transaction::query("SELECT * FROM mobbo_news ORDER BY id DESC LIMIT " . $query_min . ", 50");
        while ($row = Transaction::fetch($get_articles)) {
            ?>

                        <tr>
                            <td class='tablerow1' align='center'><?php 
            echo $row['id'];
            ?>
</td>
                            <td class='tablerow2'><strong><?php 
            echo Security::textFilterHK($row['title']);
            ?>
</strong><div class='desctext'><?php 
            echo $row['longstory'];
            ?>
</div></td>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:news.php

示例4: while

        <div class='tableborder'>
            <div class='tableheaderalt'><center>Usurios VIP atualmente</center></div>
            <table cellpadding='4' cellspacing='0' width='100%'>

                <tr>
                    <td class='tablesubheader' width='20%' align='left'>Nome de usurio</td>
                    <td class='tablesubheader' width='15%' align='left'>E-mail</td>
                    <td class='tablesubheader' width='15%' align='left'>IP</td>
                    <td class='tablesubheader' width='5%' align='left'>Editar</td>
                </tr>

                <?php 
    $get_vip = Transaction::query("SELECT * FROM users WHERE rank = '2' ORDER BY lastonline");
    while ($vip = Transaction::fetch($get_vip)) {
        $get_user = Transaction::query("SELECT * FROM users WHERE id = '" . $vip['id'] . "'");
        while ($row = Transaction::fetch($get_user)) {
            if ($row['online'] >= 1) {
                $online = "online";
            } else {
                $online = "offline";
            }
            ?>

                        <tr>
                            <td class='tablerow1' align='left'><?php 
            echo $row['username'];
            ?>
 (ID: <?php 
            echo $row['id'];
            ?>
开发者ID:habb0,项目名称:mobbo,代码行数:30,代码来源:viptool.php

示例5: getdefault

 private function getdefault()
 {
     $query = Transaction::query("SELECT * FROM mobbo_templates WHERE active = '1' LIMIT 1;");
     $row = Transaction::fetch($query);
     $this->path = $row['path'];
 }
开发者ID:habb0,项目名称:mobbo,代码行数:6,代码来源:Pages.class.php

示例6: while

                <table cellpadding='4' cellspacing='0' width='100%'>
                    <tr>
                        <td class='tablesubheader' width='1%' align='center'>ID</td>
                        <td class='tablesubheader' width='10%' align='center'>Cdigo do emblema</td>
                        <td class='tablesubheader' width='10%' align='center'>Nome</td>
                        <td class='tablesubheader' width='10%' align='center'>Preo</td>
                        <td class='tablesubheader' width='10%' align='center'>Editar</td>
                        <td class='tablesubheader' width='12%' align='center'>Borrar</td>
                    </tr>
                    <?php 
        $query_min = $page * 50 - 50;
        if ($query_min < 0) {
            // Page 1
            $query_min = 0;
        }
        $get_marktplatz = Transaction::query("SELECT * FROM mobbo_shop ORDER BY id DESC LIMIT " . $query_min . ", 50");
        while ($row = Transaction::fetch($get_marktplatz)) {
            ?>

                        <tr>
                            <td class='tablerow1' align='center'><?php 
            echo $row['id'];
            ?>
</td>
                            <td class='tablerow2' align='center'><img src="http://127.0.0.1/c_images/album1584/<?php 
            echo $row['image'];
            ?>
.gif" alt="<?php 
            echo $row['image'];
            ?>
"></td>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:marktplatz.php

示例7: COUNT

            <div class='tableborder'>
                <div class='tableheaderalt'><center>Emblemas (<?php 
        echo Transaction::evaluate("SELECT COUNT(*) FROM user_badges WHERE user_id = '" . $key . "'");
        ?>
) </div>

                <table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>

                    <tr>
                        <td class='tablesubheader' width='1%' align='center'>Cdigo</td>
                        <td class='tablesubheader' width='14%' align='center'>Emblema</td>
                    </tr>

                    <?php 
        $sql = Transaction::query("SELECT * FROM user_badges WHERE user_id = '" . $key . "' ORDER BY badge_id");
        while ($row = Transaction::fetch($sql)) {
            ?>

                        <tr>
                            <td class='tablerow1' align='center'><?php 
            echo $row['badge_id'];
            ?>
</td>
                            <td class='tablerow2'><img src="<?php 
            echo $cimagesurl . $badgesurl . $row['badge_id'];
            ?>
.gif"></div></td>
                        </tr>

                    <?php 
开发者ID:habb0,项目名称:mobbo,代码行数:30,代码来源:users_edit.php

示例8: while

        $get_users = Transaction::query("SELECT * FROM stafflogs ORDER BY id DESC");
        while ($row = Transaction::fetch($get_users)) {
            ?>

                    <script language="JavaScript" type="text/javascript">
                        function openWin () {
                            var newWin = window.open ('', '', 'height=330, width=560');
                            newWin.document.close ();
                        }
                    </script>

                    <?php 
            $userdata = Transaction::query("SELECT * FROM users WHERE id = '" . $row['userid'] . "' LIMIT 1");
            $userdata = Transaction::fetch($userdata);
            if (!empty($row['targetid'])) {
                $targetdata = Transaction::query("SELECT * FROM users WHERE id = '" . $row['targetid'] . "' LIMIT 1");
                $targetdata = Transaction::fetch($targetdata);
            } else {
                $targetdata['username'] = "-/-";
            }
            if (!empty($row['note'])) {
                $note = $row['note'];
            } else {
                $note = "<i>None given</i>";
            }
            ?>

                    <tr>
                        <td class='tablerow1' align='left'><?php 
            echo $row['action'];
            ?>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:stafflogs.php

示例9: user_badges

    $pageid = "badgetool";
    if (isset($_POST['badge']) && $_POST['name']) {
        $check_name = Transaction::query("SELECT * FROM users WHERE username = '" . Security::textFilter($_POST['name']) . "'");
        if (Transaction::num_rows($check_name) > 0) {
            $userdata = Transaction::fetch($check_name);
            $check_badge = Transaction::query("SELECT * FROM user_badges WHERE user_id = '" . $userdata['id'] . "' AND badge_id = '" . Security::textFilter($_POST['badge']) . "' LIMIT 1");
            if ($_POST['action'] == "give") {
                if (Transaction::num_rows($check_badge) < 1) {
                    Transaction::query("INSERT INTO user_badges (user_id,badge_id,badge_slot) VALUES ('" . $userdata['id'] . "','" . Security::textFilter($_POST['badge']) . "','0')");
                    $msg = "<div class='rounded rounded-green'><center>Voc acabou de dar  <b>" . Security::textFilter($_POST['name']) . "</b> o emblema " . Security::textFilter($_POST['badge']) . " com sucesso. <img src=\"./w/images/check.gif\"></center></div>";
                } else {
                    $msg = "<div class='rounded rounded-red'><center>" . $_POST['name'] . " J tm o Emblema " . $_POST['badge'] . ". <img src=\"./w/images/del.gif\"></center></div>";
                }
            } else {
                if (Transaction::num_rows($check_badge) > 0) {
                    Transaction::query("DELETE FROM user_badges WHERE user_id = '" . $userdata['id'] . "' AND badge_id = '" . Security::textFilter($_POST['badge']) . "'");
                    $msg = "<div class='rounded rounded-green'><center>Voc removeu o Emblema " . Security::textFilter($_POST['badge']) . " . <img src=\"./w/images/check.gif\"></center></div>";
                } else {
                    $msg = "<div class='rounded rounded-red'><center>" . Security::textFilter($_POST['name']) . " no tem o emblema " . Security::textFilter($_POST['badge']) . " <img src=\"./w/images/del.gif\"></center></div>";
                }
            }
        } else {
            $msg = "<div class='rounded rounded-red'><center>No foi possvel encontrar o usurio! <img src=\"./w/images/del.gif\"></center></div>";
        }
    }
    @(include 'subheader.php');
    if (isset($msg)) {
        ?>
<p><strong><?php 
        echo $msg;
        ?>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:badgetool.php

示例10: Referido

 <?php 
/*
Hooks System 0.1a - mobbo 6.0
:: NAME :: Reffers of a User
:: VERSION :: 1.0
:: AUTHOR :: bi0s
*/
$query = Transaction::query("SELECT * FROM users_referidos WHERE usuario = '" . mobbo::users_info('username') . "'");
$rows = Transaction::num_rows($query);
if ($rows == NULL or $rows == 0) {
    $rows = "Nenhum";
}
?>
                <h5 align="center">você tem <span style="font-size:x-large;"><?php 
echo $rows;
?>
</span> Referido(s)</h5>
                <?php 
if ($rows > 0) {
    ?>

                    <a href="#" class="button tiny success radius alert" data-dropdown="drop2">Trocar Referidos por Doláres</a>
                    <div id="drop2" class="f-dropdown content medium" data-dropdown-content>
                        <h4>Compras</h4>
                        <p>Atenção se você tiver 5 Referidos, Ganha 1 Dolar, se Você tiver 10 Referidos Ganha 2 Dolares, Assim Vai Adiante até 40 Referidos Que Ganha 8 Dolares, Se Você tiver 40 Referidos Automaticamente Ganha 8 Dolares, não Há como Escolher a Opção de Trocar 5 Referidos, Se você tiver mais de 40 Referidos basta Apenas Trocar Mais Uma Vez, E Assim Por Diante.</p>
                        <p>Grato, A Direção.</p>
                        <a class="button tiny success radius" href="/loja?buy=dolares">Trocar Os Seus Referidos por Doláre(s)</a>
                    </div>   
                    <?php 
}
开发者ID:habb0,项目名称:mobbo,代码行数:30,代码来源:reffers.php

示例11: time

                        <td class='tablesubheader' width='10%' align='left'>IP</td>
                        <td class='tablesubheader' width='10%' align='left'>Desde</td>
                        <td class='tablesubheader' width='10%' align='left'>Acaba</td>
                        <td class='tablesubheader' width='1%' align='left'>IP Banido</td>
                    </tr>

                    <?php 
    $query_min = $page * 50 - 50;
    if ($query_min < 0) {
        // Page 1
        $query_min = 0;
    }
    $get_bans = Transaction::query("SELECT * FROM bans WHERE expire + 3600 > '" . time() . "' ORDER BY expire LIMIT " . $query_min . ", 50");
    while ($row = Transaction::fetch($get_bans)) {
        if ($row['bantype'] == 'user') {
            $userdata = Transaction::query("SELECT * FROM users WHERE username = '" . $row['value'] . "'");
            $users = Transaction::fetch($userdata);
            $ip_last = $users['ip_last'];
        } else {
            $ip_last = '-/-';
        }
        $minuten = $row['expire'] - time();
        if (time() >= $row['expire']) {
            $stat = "Expira em";
            $color = "green";
        } elseif (time() + 3600 >= $row['expire']) {
            if (date('i', $minuten) > 0) {
                $stat = "(H " . date('i', $minuten) . " minutos)";
                $color = "orange";
            } else {
                $stat = "(H " . date('s', $minuten) . " segundos)";
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:banlogs.php

示例12: online

    <div class='tableborder'>
        <div class='tableheaderalt'> <center>Pessoas online (<?php 
    echo $onlineUsers;
    ?>
)</center> </div>
        <table cellpadding='4' cellspacing='0' width='100%'>
            <tr>
                <td class='tablesubheader' width='1%' align='center'>ID</td>
                <td class='tablesubheader' width='15%'>Nome de usurio</td>
                <td class='tablesubheader' width='18%' align='left'>E-mail</td>
                <td class='tablesubheader' width='10%' align='left'>Data de registro</td>
                <td class='tablesubheader' width='10%' align='left'>&Uacute;ltima vez conectado</td>
                <td class='tablesubheader' width='1%' align='left'>Editar</td>
            </tr>
            <?php 
    $get_users = Transaction::query("SELECT * FROM users WHERE online > '0' ORDER BY username LIMIT " . $onlineUsers);
    while ($row = Transaction::fetch($get_users)) {
        ?>

                <tr>
                    <td class='tablerow1' align='center'><?php 
        echo $row['id'];
        ?>
</td>
                    <td class='tablerow2'><strong><?php 
        echo $row['username'];
        ?>
 </strong><div class='desctext'><?php 
        echo $row['ip_last'];
        ?>
 [<a href='http://who.is/whois-ip/ip-address/<?php 
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:onlinelogs.php

示例13: md5

    // Verifica se a extenso  permitida
    if (!in_array(strtolower(strrchr($nome, ".")), $extensoes)) {
        $erro = 'Extensão inválida';
    }
    // Se no houver erro
    if (!$erro) {
        // Gerando um nome aleatrio para a imagem
        $nomeAleatorio = md5(uniqid(time())) . strrchr($nome, ".");
        // Movendo arquivo para servidor
        if (!move_uploaded_file($temp, $caminho . $nomeAleatorio)) {
            $erro = 'Não foi possível anexar o arquivo';
        }
        $path_info = pathinfo("uploads/{$nomeAleatorio}");
        if ($path_info['extension'] == 'xml') {
            $xml = simplexml_load_file("uploads/{$nomeAleatorio}");
            Transaction::query("INSERT INTO mobbo_plugins (id, plugin_name, plugin_version, plugin_author, mobbo_code) VALUES\n(NULL, '" . $xml->name . "', '" . $xml->version . "', '" . $xml->author . "', '" . $xml->code . "')");
            $install = $xml->mysql_query;
            eval($install);
            echo "Plugin " . $xml->plugin_name . " installed.";
            logs::mobbo_log("pluginsdb");
        } else {
            echo 'Error.';
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:upload.php

示例14:

<?php

/*
Hooks System 0.1a - mobbo 6.0
:: NAME :: Badges of Home
:: VERSION :: 1.0
:: AUTHOR :: bi0s
*/
$query = Transaction::query("SELECT * FROM users WHERE username = '" . $geter . "' LIMIT 1");
$fetch = Transaction::fetch($query);
$id = $fetch['id'];
$query1 = Transaction::query("SELECT * FROM user_badges WHERE user_id = '" . $id . "' ORDER BY id DESC LIMIT 5");
while ($row = Transaction::fetch($query1)) {
    if (preg_match('/ACH/', $row['badge_id'])) {
        echo '<a class="th"><img data-tooltip class="has-tip" title="' . $row['badge_id'] . '"  src="http://images.habbo.com/c_images/album1584/' . $row['badge_id'] . '.gif"></a>&#32;&#32;&#32;';
    } else {
        echo '<a class="th"><img data-tooltip class="has-tip" title="' . $row['badge_id'] . '"  src="http://images.habbo.com/c_images/album1584/' . $row['badge_id'] . '.gif"></a>&#32;&#32;&#32;';
    }
}
开发者ID:habb0,项目名称:mobbo,代码行数:19,代码来源:badges.php

示例15: header

            if ($_POST['headerclient'] == true) {
                header("location: {$path}/client");
                exit;
            } else {
                header("location: " . $adminpath . "/p/home");
                exit;
            }
        } else {
            $msg = "Nome de usuario, senha o Habbo ID incorrectos.";
            header("location: " . $adminpath . "/p/login");
        }
    } else {
        $msg = "Voc deve preencher todos os campos!";
    }
} elseif ($notify_logout == true) {
    Transaction::query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Logout','notify_logout','" . $my_id . "','0','" . $date_full . "')");
    $msg = "<font color='green'>Voc foi desconectado corretamente.</font>";
} else {
    $msg = "Faa o login";
}
include 'subheader.php';
?>
<style type="text/css">
    body {
        background-color: #fff


    }
    #fudeugeral {
        display:none;
        visibility:hidden;
开发者ID:habb0,项目名称:mobbo,代码行数:31,代码来源:login.php


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