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


PHP crud::dbInsert方法代码示例

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


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

示例1: crud

<?php

// Definindo encode pra UTF-8
header('Content-type: text/html; charset="utf-8"', true);
require "../helper/class.crud.php";
require "../helper/secure_validation.php";
//change this use key of your bot
$secret_code = "testbot";
//register machine
if ($_POST['secret_code'] == $secret_code) {
    $crud = new crud();
    $name = htmlentities($_POST['name']);
    if (!$name) {
        print "need name";
        exit;
    }
    $date = date('Y-m-d H:i:s');
    $password = htmlentities($_POST['password']);
    $url = htmlentities($_POST['url']);
    $values = array(array('name' => sanitize($name), 'date' => sanitize($date), 'password' => sanitize($password), 'url' => sanitize($url)));
    $crud->dbInsert('phishing', $values);
} else {
    echo "error at secret code";
}
开发者ID:CoolerVoid,项目名称:Ooze,代码行数:24,代码来源:register_phishing.php

示例2: crud

<?php

// Definindo encode pra UTF-8
header('Content-type: text/html; charset="utf-8"', true);
require "../helper/class.crud.php";
require "../helper/secure_validation.php";
//change this use key of your bot
$secret_code = "testbot";
//register machine
if ($_POST['secret_code'] == $secret_code) {
    $crud = new crud();
    $name = htmlentities($_POST['name']);
    if (!$name) {
        print "need name";
        exit;
    }
    $date = date('Y-m-d H:i:s');
    $system = htmlentities($_POST['system']);
    $ip = htmlentities($_POST['ip']);
    $keyboard = htmlentities($_POST['keyboard']);
    $values = array(array('name' => sanitize($name), 'date' => sanitize($date), 'ip' => sanitize($ip), 'system' => sanitize($system), 'keyboard' => sanitize($keyboard)));
    $crud->dbInsert('machine_report', $values);
} else {
    echo "error at secret code";
}
开发者ID:CoolerVoid,项目名称:Ooze,代码行数:25,代码来源:register_machine.php

示例3: date

 if ($nome == '') {
     echo '<div class="alert alert-danger">Você deve informar seu nome.</div>';
 } else {
     if ($email == '') {
         echo '<div class="alert alert-danger">Você deve informar um e-mail válido.</div>';
     } else {
         if ($msg == '') {
             echo '<div class="alert alert-danger">Você deve informar uma Mensagem.</div>';
         } else {
             if (!preg_match("/^[a-z0-9_\\.\\-]+@[a-z0-9_\\.\\-]*[a-z0-9_\\-]+\\.[a-z]{2,4}\$/i", $email)) {
                 echo '<div class="alert alert-danger"> O e-mail digitado não e válido.</div>';
             } else {
                 $dataEmail = date("d-m-Y H:i:s");
                 try {
                     $values = array(array('nome' => $nome, 'email' => $email, 'telefone' => $telefone, 'mensagem' => $msg, 'data' => $dataEmail));
                     $envia_dados = $conecta->dbInsert('contatos', $values);
                     // enviando email de contato
                     $to = 'janderfrancisco@hotmail.com';
                     // assunto
                     $subject = 'Contato Site FACIDIL';
                     $message = "\n\t\t\t\t\t\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t\t\t\t<title>Contato Site FACIDIL</title>\n\t\t\t\t\t\t\t\t\t\t\t\t<style type='text/css'> \n\t\t\t\t\t\t\t\t\t\t\t\t\tp{font:18px Calibri;}\n\t\t\t\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Nome: </b>" . $nome . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>E-mail: </b>" . $email . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Telefone: </b>" . $telefone . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Mensagem: </b>" . $msg . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Data do Recebimento:</b>  " . $dataEmail . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t\t\t\t";
                     $headers .= 'To: FACIDIL <janderfrancisco@hotmail.com>' . "\r\n";
                     $headers = 'MIME-Version: 1.0' . "\r\n";
                     $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                     // $headers .= 'Cc: janderfrancisco@gmail.com' . "\r\n";
                     $headers .= 'From: Contato Site FACIDIL	<contato@janderoliveira.com>' . "\r\n";
                     mail($to, $subject, $message, $headers);
                     echo "<div class='alert alert-success'>Agradeçemos o seu contato! <br/> Em breve lhe responderemos.</div>";
                     unset($nome);
                     unset($email);
                     unset($telefone);
开发者ID:janderfrancisco,项目名称:saara_cursos,代码行数:31,代码来源:contato.php

示例4: htmlentities

        if (!$loginadd) {
            print "need login";
            exit;
        }
        $mailadd = htmlentities($_POST['mailadd']);
        $passadd = htmlentities($_POST['passadd']);
        if (!$passadd) {
            print "need a password";
            exit;
        }
        $owneradd = htmlentities($_POST['owneradd']);
        $secret = $frase . $passadd;
        $gen = new Bcrypt(12);
        $bcrypt_hashadd = $gen->hash($secret);
        $values = array(array('login' => sanitize($loginadd), 'pass' => sanitize($bcrypt_hashadd), 'mail' => sanitize($mailadd), 'owner' => sanitize($owneradd)));
        $crud->dbInsert('userronin', $values);
        $page->titulo = "Data insert";
        $page->conteudo = '<br><br>
                      <p class="message message-success message-closable">Added user ok  !</p><br<br>';
        print $page->display_page();
        break;
    case "RmUser":
        $janela .= '<div class="portlet portlet-closable x4">	
				<div class="portlet-header">
					<h4>Remove user</h4> 
				</div> <!-- .portlet-header -->		
				<div class="portlet-content">
                              ';
        $form = new form();
        $token = NoCSRF::generate('csrf_token');
        $values = array(':hidden' => 'csrf_token:' . $token, 'remover:text' => 'userm:ID to remove');
开发者ID:CoolerVoid,项目名称:Ooze,代码行数:31,代码来源:auth.php


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