LATEST PAYMENTS SYSTEM

Présentation et discussions à propos de creadunet.com

LATEST PAYMENTS SYSTEM

Messagede chorao157 » Ven 12 Aoû 2016 15:38

Code: Tout sélectionner
<?php
session_start();
//Connexion à la BDD.
include ('conf.php');
include ('themes/'.$theme.'/header.php');

function String2Stars($string='',$first=0,$last=0,$rep='*'){
  $begin  = substr($string,0,$first);
  $middle = str_repeat($rep,strlen(substr($string,$first,$last)));
  $end    = substr($string,$last);
  $stars  = $begin.$middle.$end;
  return $stars;
}
?>

<h1> Latest's Payment's</h1>
<table class='table table-bordered table-striped' border="1" align="center">
   <tr>
      <th>Nickname</th>
      <th>Amount</th>
      <th>Andress</th>
      <th>Date</th>
   </tr>
   
<?php
$servername = "locahostl";
$username = "db_user";
$password = "db_pass";
$dbname = "db_bame";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
     die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT * FROM 11_payout ORDER BY paid DESC";
$result = $conn->query($sql);

if ($result->num_rows > 0) {

     while($row = $result->fetch_assoc()) {
         echo "<tr><td>".$row["login"].
            "</td><td>".$row["amount"].
            "</td><td>".String2Stars($row["payac"],0,5).
            "</td><td>".$row["paid"]."</td></tr>";
     }
}
else
{
     echo "0 results";
}


$conn->close();
?>
</table>
<?php
include ('themes/'.$theme.'/footer.php');
?>


RESULT

Image
chorao157
 
Messages: 21
Inscription: Mar 29 Mar 2016 20:26

Publicité

LATEST PAYMENTS SYSTEM

Publicité

sg-autorepondeur.com
 

Retourner vers Général



cron