Exemple #1
0
	  <?php 
if ($totalrows['total'] > 0) {
    ?>
      <form method="post" action="../php/action.php">
        <table class='table table-hover'>
          <thead>
            <tr>
              <th></th><?php 
    foreach ($array as $key => $value) {
        if ($key == "id") {
            $field = str_replace("id", "#", $key);
        } else {
            $field = str_replace("_", " ", $key);
        }
        $field = ucwords($field);
        $field = columnSortArrows($key, $field, $orderby, $sort);
        ?>
              <th>
                <?php 
        echo $field;
        ?>
              </th><?php 
    }
    ?>
            </tr>
          </thead>
          <tbody>
            <?php 
    mysql_data_seek($result, 0);
    while ($row = mysql_fetch_assoc($result)) {
        ?>
Exemple #2
0
 //IF SORT NOT SET OR VALID, SET DEFAULT
 if (!isset($_GET['sort']) or $_GET['sort'] != "ASC" and $_GET['sort'] != "DESC") {
     //default sort
     $sort = "ASC";
 } else {
     $sort = mysql_real_escape_string($_GET['sort']);
 }
 //GET DATA
 $sql = "SELECT * FROM `" . $config['table'] . "` ORDER BY {$orderby} {$sort} LIMIT {$startrow},{$limit}";
 $result = mysql_query($sql) or die(mysql_error());
 //START TABLE AND TABLE HEADER
 echo "<table class=\"table table-striped table-bordered table-condensed\">\n<thead>\n<tr>";
 $field1 = columnSortArrows('id', 'ID', $orderby, $sort);
 $field2 = columnSortArrows('ip', 'IP', $orderby, $sort);
 $field3 = columnSortArrows('datetime', 'Date & Time', $orderby, $sort);
 $field4 = columnSortArrows('username', 'Nickname', $orderby, $sort);
 echo "<th>" . $field1 . "</th>\n";
 echo "<th>" . $field2 . "</th>\n";
 echo "<th>" . $field3 . "</th>\n";
 echo "<th>" . $field4 . "</th>\n";
 echo "<th></th>\n";
 echo "</tr>\n</thead>\n";
 //reset result pointer
 mysql_data_seek($result, 0);
 //LOOP TABLE ROWS
 echo "<tbody>\n";
 while ($row = mysql_fetch_assoc($result)) {
     echo "<tr>\n";
     echo "<td>" . $row['id'] . "</td>\n";
     echo "<td>" . $row['ip'] . "</td>\n";
     echo "<td>" . date('d/m/Y, H:m', $row['datetime']) . "</td>\n";
Exemple #3
0
    //default sort
    $sort = "ASC";
} else {
    $sort = mysql_real_escape_string($_GET['sort']);
}
//GET DATA
$sql = "SELECT * FROM `" . $config['table'] . "` ORDER BY {$orderby} {$sort}";
$result = mysql_query($sql) or die(mysql_error());
//START TABLE AND TABLE HEADER
echo "<table class=\"table table-striped table-bordered table-condensed\">\n<thead>\n<tr>";
$field1 = columnSortArrows('id', 'ID', $orderby, $sort);
$field2 = columnSortArrows('userwd', 'Username', $orderby, $sort);
$field3 = columnSortArrows('fullname', 'Fullname', $orderby, $sort);
$field4 = columnSortArrows('email', 'Email', $orderby, $sort);
$field5 = columnSortArrows('reg_time', 'Registered', $orderby, $sort);
$field6 = columnSortArrows('userip', 'IP', $orderby, $sort);
echo "<th>" . $field1 . "</th>\n";
echo "<th>" . $field2 . "</th>\n";
echo "<th>" . $field3 . "</th>\n";
echo "<th>" . $field4 . "</th>\n";
echo "<th>" . $field5 . "</th>\n";
echo "<th>" . $field6 . "</th>\n";
echo "<th>SharerLink</th>\n";
echo "<th></th>\n";
echo "</tr>\n</thead>\n";
//reset result pointer
mysql_data_seek($result, 0);
//LOOP TABLE ROWS
echo "<tbody>\n";
while ($row = mysql_fetch_assoc($result)) {
    $checkUser = $row['userwd'];
Exemple #4
0
    //default sort
    $sort = "ASC";
} else {
    $sort = mysql_real_escape_string($_GET['sort']);
}
//GET DATA
$sql = "SELECT * FROM `" . $config['table'] . "` ORDER BY {$orderby} {$sort} LIMIT {$startrow},{$limit}";
$result = mysql_query($sql) or die(mysql_error());
//START TABLE AND TABLE HEADER
echo "<table id='userlist' class='table table-striped table-bordered table-condensed open-sans'>\n<thead>\n<tr>";
$field1 = columnSortArrows('id', 'ID', $orderby, $sort);
$field2 = columnSortArrows('username', 'Username', $orderby, $sort);
$field3 = columnSortArrows('registration_ip', 'Last IP', $orderby, $sort);
$field4 = columnSortArrows('email', 'Email', $orderby, $sort);
$field5 = columnSortArrows('registered', 'Registered', $orderby, $sort);
$field6 = columnSortArrows('last_visit', 'Last Visit', $orderby, $sort);
echo "<th style='text-align:center'>" . $field1 . "</th>\n";
echo "<th style='text-align:center'>" . $field2 . "</th>\n";
echo "<th style='text-align:center'>" . $field3 . "</th>\n";
echo "<th style='text-align:center'>" . $field4 . "</th>\n";
echo "<th style='text-align:center'>" . $field5 . "</th>\n";
echo "<th style='text-align:center'>" . $field6 . "</th>\n";
echo "<th style='text-align:center'>SharerLink</th>\n";
echo "<th style='text-align:center'>Actions</th>\n";
echo "</tr>\n</thead>\n";
//reset result pointer
mysql_data_seek($result, 0);
//LOOP TABLE ROWS
echo "<tbody>\n";
while ($row = mysql_fetch_assoc($result)) {
    $userID = $row['id'];
Exemple #5
0
if (!isset($_GET['sort']) or $_GET['sort'] != "ASC" and $_GET['sort'] != "DESC") {
    //default sort
    $sort = "ASC";
} else {
    $sort = mysql_real_escape_string($_GET['sort']);
}
//GET DATA
$sql = "SELECT * FROM `" . $config['table'] . "` ORDER BY {$orderby} {$sort}";
$result = mysql_query($sql) or die(mysql_error());
//START TABLE AND TABLE HEADER
echo "<table class=\"table table-striped table-bordered table-condensed\">\n<thead>\n<tr>";
$field1 = columnSortArrows('id', 'ID', $orderby, $sort);
$field2 = columnSortArrows('filename', 'Filename', $orderby, $sort);
$field3 = columnSortArrows('author', 'Author', $orderby, $sort);
$field4 = columnSortArrows('uploaddate', 'Upload Date', $orderby, $sort);
$field5 = columnSortArrows('uploader', 'Uploader', $orderby, $sort);
echo "<th>" . $field1 . "</th>\n";
echo "<th>" . $field2 . "</th>\n";
echo "<th>" . $field3 . "</th>\n";
echo "<th>" . $field4 . "</th>\n";
echo "<th>" . $field5 . "</th>\n";
echo "<th></th>\n";
echo "</tr>\n</thead>\n";
//reset result pointer
mysql_data_seek($result, 0);
//LOOP TABLE ROWS
echo "<tbody>\n";
while ($row = mysql_fetch_assoc($result)) {
    echo "<tr>\n";
    echo "<td>" . $row['id'] . "</td>\n";
    echo "<td>" . $row['filename'];