コード例 #1
0
            ?>
				<tr class="trDOWN">
					<td><?php 
            echo $usuario;
            ?>
</td>
					<td><?php 
            echo $user;
            ?>
</td>
					<td><?php 
            echo $limite;
            ?>
</td>
					<td><?php 
            echo disponivel($user);
            ?>
</td>
					<td><?php 
            echo $total;
            ?>
</td>
					<td><a href="pp/gets.php?acao=remover_usuario&id=<?php 
            echo $user;
            ?>
"><button class="buttonRemover" name="remover">REMOVER</button></a></td>
				</tr>
	<?php 
        }
        $stmt->close();
    }
コード例 #2
0
ファイル: novo.php プロジェクト: pedradanamente/15.3.1
function copia() { 
    x = document.getElementById("logingmail").value;
    document.getElementById("from").value = x;
} 
</script>
	<div style="height:50px;">
		<img class="fl" src="imagens/novo.png" width="50"/>
		<h1 class="pagina">Novo (Limite diário disponível: <?php 
    echo disponivel($_SESSION['userid']);
    ?>
)</h1>
	</div>
	<hr style="clear:both;"/>
<?php 
    if (disponivel($_SESSION['userid']) > 0) {
        $contatos = contatos();
        ?>
	<a href="#usarTemplate"><div class="metodo" onclick="openclose_usarTemplate();">Enviar mensagem c/ Template</div></a>
	<div style="display:none;" id ="usarTemplate">
		<?php 
        include "inc/formulario_usarTemplate.php";
        ?>
		<div style="height:15px;"></div>
	</div>
	<a href="#usarHtml"><div class="metodo" onclick="openclose_usarHtml();">Enviar mensagem c/ HTML</div></a>
	<div style="display:none;" id ="usarHtml">
		<?php 
        include "inc/formulario_usarHtml.php";
        ?>
		<div style="height:15px;"></div>
コード例 #3
0
ファイル: banco.php プロジェクト: pedradanamente/15.3.1
function enviar($metodo, $op)
{
    global $conexao;
    $emailremetente = check_input($_POST['emailremetente']);
    if ($metodo == "Hospedagem") {
        $array_domain = array("@oi.com.br", "@gmail.com");
        foreach ($array_domain as $elemento) {
            $emailsender = str_replace("{$elemento}", "@127.0.0.1", $emailremetente);
        }
    } else {
        if ($metodo == "smtpGmail") {
            require_once "pp/class.phpmailer.php";
            $emailsender = smtplogin();
        }
    }
    $nomeremetente = check_input($_POST['nomeremetente']);
    $assunto = check_input($_POST['assunto']);
    $para = array();
    $para = explode("\n", check_input($_POST['para']));
    $boundary = "XYZ-" . md5(date("dmYis")) . "-ZYX";
    $message = "<div style='background-color:#FFF;color:#FFF;font-family:Arial;font-size:10px;'>";
    $message .= "--{$boundary}" . PHP_EOL;
    //$message .= "Content-Type: text/html; charset='utf-8'" . PHP_EOL;
    $message .= "</div>";
    $message .= "<div style='clear:both;background-color:#FFF;color:#000;'>" . opcao("{$op}") . "</div>";
    //mensagem
    $message .= "<div style='clear:both;margin-top:25px;margin-bottom:15px;height:1px;background-color:lightblue;width:100%;'></div>";
    /*if (isset($_FILES["anexo"]['name'])){
    			echo "Serviço indisponível para manuteção - att andre machado</br>";
    			echo var_dump($_FILES["anexo"]["tmp_name"]);
    			echo var_dump($_FILES["anexo"]["name"]);
    		$path = $_FILES["anexo"]['tmp_name']; 
    		$fileType = $_FILES["anexo"]['type']; 
    		$fileName = $_FILES["anexo"]['name'];
    		$fp = fopen( $path, "rb" ); // abre o arquivo enviado
    		$anexo = fread( $fp, filesize( $path ) ); // calcula o tamanho
    		$anexo = chunk_split(base64_encode( $anexo )); // codifica o anexo em base 64
    		fclose( $fp ); // fecha o arquivo
    
    		$message .= "Content-Type: ". $fileType ."; name=\"". $fileName . "\"" . PHP_EOL;
    		$message .= "Content-Transfer-Encoding: base64" . PHP_EOL;
    		$message .= "Content-Disposition: attachment; filename=\"". $fileName . "\"" . PHP_EOL;
    	}*/
    $message .= "<div style='color:#FFF;font-size:12px;font-weight:normal;font-family:Arial;'> --{$boundary} </div>" . PHP_EOL;
    imprime_headers($para, $nomeremetente, $emailsender, $emailremetente, $assunto);
    $x = 1;
    foreach ($para as $elemento) {
        ?>
	<div style="color:white;border:1px solid black;padding-left:15px;padding-bottom:0px;background-color:rgba(150,50,50,0.3);font-family:Arial;margin-bottom:5px;font-size:12px;">
		<div style="float:left;padding-top:8px;">
			<?php 
        echo "<div class='NUMERO'>{$x}</div>";
        echo "<div style='float:left;'>{$elemento}</div>";
        $x++;
        ?>
		</div>
		<?php 
        if ($metodo == "Hospedagem") {
            $headers = headers($emailsender, $emailremetente, $assunto);
            if (mail($elemento, $assunto, $message, implode("\r\n", $headers), "-r" . $emailsender) && disponivel($_SESSION['userid']) > 0) {
                ENVIADO($elemento, $metodo, $nomeremetente);
            } else {
                FALHA($elemento, $metodo, $nomeremetente);
            }
        } else {
            if ($metodo == "smtpGmail") {
                smtpmailer($elemento, $emailremetente, $nomeremetente, $assunto, $message, $metodo);
            }
        }
        ?>
		<div style="clear:both;"></div>
	</div>
		<?php 
    }
    ?>
<div class="imprime_msgSent">Terminou! Veja a mensagem que foi enviada:</div><?php 
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:#FFF;margin-bottom:5px;'>{$message}</div>";
    echo "<div style='font-weight:normal;font-size:12px;font-family:Arial;border:1px solid gray;padding:15px;background-color:rgba(255,255,255,0.5);margin-bottom:5px;color:black;'>" . htmlentities($message) . "</div>";
    if (isset($_SESSION['errorsmtp'])) {
        echo $_SESSION['errorsmtp'];
        unset($_SESSION['errorsmtp']);
    }
}