예제 #1
0
function init($conexao)
{
    if (isset($_POST['acao'])) {
        switch ($_POST['acao']) {
            case 'add':
                adicionar($conexao);
                break;
            case 'edit':
                editar($conexao);
                break;
            case 'delete':
                remover($conexao);
                break;
        }
    } else {
        index($conexao);
    }
}
    }
    ?>
        		<script>document.getElementById('info').style.display='none';</script>
				<div id='info' width='100%' align='center'>Retrive upload ID</div> 
<?php 
    $page = geturl("www.rapidgator.net", 80, "/", 0, $cookie);
    is_page($page);
    if (!preg_match('#var[\\r|\\n|\\s]+form_url[\\r|\\n|\\s]+=[\\r|\\n|\\s]+"([^"]+)"#', $page, $up)) {
        html_error('Cannot get form url upload.', 0);
    }
    if (!preg_match('#progress_url_srv[\\r|\\n|\\s]+=[\\r|\\n|\\s]+"([^"]+)"#', $page, $pr)) {
        html_error('Cannot get url progress upload.', 0);
    }
    $uuid = id();
    $url = parse_url($up[1] . $uuid);
    $lname = remover($lname);
    $ur = $pr[1] . '&data%5B0%5D%5Buuid%5D=' . $uuid . '&data%5B0%5D%5Bstart_time%5D=' . time();
    $upfiles = upfile($url['host'], defport($url), $url['path'] . ($url['query'] ? '?' . $url['query'] : ''), 'http://www.rapidgator.net/', $cookie, 0, $lfile, $lname, 'file');
    ?>
				<script>document.getElementById('progressblock').style.display='none';</script>
<?php 
    $Url = parse_url($ur);
    $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, $cookie, 0, 0, $_GET["proxy"], $pauth);
    preg_match('#{"state":"([^"]+)#', $page, $msg);
    if ($msg[1] == 'uploading') {
        html_error('Erro in upload: Code 01', 0);
    }
    if ($msg[1] == 'error') {
        html_error('Erro in upload: Code 02', 0);
    }
    preg_match('#"download_url":"([^"]+)#', $page, $dl);
예제 #3
0
  mapTypeId:google.maps.MapTypeId.ROADMAP
  };
var map=new google.maps.Map(document.getElementById("googleMap")
  ,mapProp);


<?php 
if (!empty($_POST['Estabelecimento'])) {
    $controle = 1;
    $y = $_POST['Estabelecimento'];
    $palavra = strtr(strtolower($y), "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÜÚÞß", "àáâãäåæçèéêëìíîïðñòóôõö÷øùüúþÿ");
    $palavra = remover($palavra);
    $resultBusca = $db->query('SELECT * FROM locais ') or die('Query db failed1');
    while ($rowBusca = $resultBusca->fetchArray()) {
        $banco = strtr(strtolower($rowBusca['nome']), "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÜÚÞß", "àáâãäåæçèéêëìíîïðñòóôõö÷øùüúþÿ");
        $banco = remover($banco);
        if ($banco == $palavra) {
            $controle = 0;
            $idBusca = $rowBusca['id'];
            $result = $db->query('SELECT * FROM enderecos WHERE lid=' . $idBusca) or die('Query db failed1');
            $fail = "";
        }
    }
    if ($controle == 1) {
        $result = $db->query('SELECT * FROM enderecos') or die('Query db failed1');
        $fail = "Estabelecimento não encontrado";
    }
} elseif (isset($_POST['check1']) and isset($_POST['check2']) and isset($_POST['check3']) and isset($_POST['check4'])) {
    $result = $db->query('SELECT * FROM enderecos WHERE gluten=1 or lactose=1 or light=1 or diet=1') or die('Query db failed1');
} elseif (isset($_POST['check1']) and isset($_POST['check2']) and isset($_POST['check3'])) {
    $result = $db->query('SELECT * FROM enderecos WHERE lactose=1 or gluten=1 or light=1 ') or die('Query db failed1');
예제 #4
0
파일: import_db.php 프로젝트: lee99/tpmaker
 function checkinputdata($data)
 {
     //本配置和"Sub_fieldtype"的配置是一致的,如有更改请同步更改
     $a = explode('(', $data['Type']);
     $a = $a[0];
     $b = intval(remover($data['Type'], '(', ')'));
     switch ($a) {
         case 'text':
             $typeid = 3;
             //[text][]
             break;
         case 'datetime':
             $typeid = 18;
             break;
         case 'date':
             $typeid = 17;
             break;
         case 'time':
             $typeid = 19;
             break;
         case 'year':
             $typeid = 20;
             break;
         case 'varchar':
             if ($b > 40) {
                 $typeid = 4;
                 //[varchar][240]
             } else {
                 $typeid = 1;
                 //[varchar][40]
             }
             break;
         case 'int':
             if ($b > 4) {
                 $typeid = 2;
                 //[INI][11]
             } else {
                 $typeid = 5;
                 //[tinyint][4]
             }
             break;
         default:
             $typeid = 1;
     }
     if ($data['Extra'] == 'auto_increment') {
         $typeid = 6;
         //是否自动加入
         //[autoid][11]
         return $typeid;
     }
     return $typeid;
 }