HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com.new/admin/fields.php
<?
require "db.php";

$page = $_GET['page'] ? (int) $_GET['page'] : 1;
$max_results = $_GET['setmax'] ? (int) $_GET['setmax'] : 100;
$from = (($page * $max_results) - $max_results);

$results = dbQuery("SELECT * FROM `fields` ORDER BY `name` LIMIT $from, $max_results", false);
$total_results = dbValue("SELECT COUNT(*) AS `count` FROM `fields`", 'count');
$total_pages = ceil($total_results / $max_results);
?>

<? include "header.php"; ?>

<div class="content-page">
    <div class="header-area">

        <div class="breadcrumbs">
            <a href="index.php">Admin Home</a>
            <span><a href="fields.php">Content Fields</a></span>
        </div>
    </div>

    <div class="content-outer">

        <h2>Content<strong>Fields</strong></h2>
        
        <div class="notification info">On this page you can find custom installed Tube Script editable fields for random modules.</div>

        <div class="content-inner">

            <form method="POST" action="" class="pagetable">
                <table>
                    <thead>
                        <tr>
                            <th>Module</th>
                            <th>Code</th>
                            <th>Name</th>
                            <th class="options">Options</th>
                        </tr>
                    </thead>
                    <tbody>
                        <? if (is_array($results)) { ?>
                            <? foreach ($results as $row) { ?>
                                <tr>
                                    <td><? echo $row['module']; ?></td>
                                    <td><? echo $row['code']; ?></td>
                                    <td><? echo $row['name']; ?></td>
                                    <td class="options">
                                        <a href="edit_field.php?id=<?php echo $row['record_num']; ?>" class="btn btn-xs btn-orange"><i class="ion ion-edit icon-edit"></i></a>
                                    </td>
                                </tr>
                            <? } ?>
                        <? } else { ?>
                            <tr><td colspan="4"><? echo setMessage('No fields found', 'error', true); ?></td></tr>
                        <? } ?>
                    </tbody>
                </table>
                <div id="adminPagination"><? echo showAdminPagination($total_pages); ?></div>
            </form>
        </div>
    </div>
</div>
<? require "footer.php"; ?>