<table class="table table-striped">
                            <tr>
                                <th>first name</th>
                                <th>last name</th>
                                <th>email address</th>
                                <th>password</th>
                                <th>phone</th>
                                <th colspan="2">receive ‘yes’ emails?</th>
                            </tr>‌
                            <?php 
$user_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_USER . " WHERE type='admin'"));
$user_sql = "SELECT u.* FROM " . TBL_USER . " u WHERE u.type='admin' ORDER BY u.id DESC";
$userPagination = new Pagination();
$userPagination->limit = 30;
$userPagination->pageParam = 'user_page';
$userPagination->execute($user_count['total']);
$user_sql .= $userPagination->getLimitStr();
$user_query = mysql_query($user_sql);
while ($user_data = mysql_fetch_assoc($user_query)) {
    ?>
                                <tr>
                                    <td><?php 
    echo $user_data['first_name'];
    ?>
</td>
                                    <td><?php 
    echo $user_data['last_name'];
    ?>
</td>
                                    <td><?php 
    echo $user_data['email'];
Example #2
0
                            <th>first name</th>
                            <th>last name</th>
                            <th>phone number</th>
                            <th>time to call</th>
                            <th>yes/no</th>
                            <th>date/time</th>
                            <th>user (first last)</th>
                            <th>agency</th>
                        </tr>
                        <?php 
$leads_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_LEADS . ""));
$leads_sql = "SELECT\r\n                                        l.*,\r\n                                        u.first_name as user_first_name,\r\n                                        u.last_name as user_last_name,\r\n                                        a.agency_name\r\n                                     FROM\r\n                                        " . TBL_LEADS . " l\r\n                                     LEFT JOIN " . TBL_USER . " u\r\n                                        ON (l.user_id=u.id)\r\n                                     LEFT JOIN " . TBL_AGENCY . " a\r\n                                        ON (u.agency_id=a.id)\r\n                                     ORDER BY l.id DESC";
$leadsPagination = new Pagination();
$leadsPagination->limit = 30;
$leadsPagination->pageParam = 'page';
$leadsPagination->execute($leads_count['total']);
$leads_sql .= $leadsPagination->getLimitStr();
$leads_query = mysql_query($leads_sql);
while ($leads = mysql_fetch_assoc($leads_query)) {
    ?>
                            <tr>
                                <td><?php 
    echo $leads['first_name'];
    ?>
</td>
                                <td><?php 
    echo $leads['last_name'];
    ?>
</td>
                                <td><?php 
    echo $leads['phone_no'];
Example #3
0
                                                                    <tr>
                                                                        <th>first name</th>
                                                                        <th>last name</th>
                                                                        <th>phone number</th>
                                                                        <th>time to call</th>
                                                                        <th>yes/no</th>
                                                                        <th>date/time</th>

                                                                    </tr>
                                                                    <?php 
$count = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM ' . TBL_LEADS . ' WHERE user_id=' . $_SESSION['user_id']));
$leadsSQL = 'SELECT * FROM ' . TBL_LEADS . ' WHERE user_id=' . $_SESSION['user_id'];
$Pagination = new Pagination();
$Pagination->limit = 30;
$Pagination->pageParam = 'page';
$Pagination->execute($count['total']);
$leadsSQL .= $Pagination->getLimitStr();
$leadsQuery = mysql_query($leadsSQL);
while ($leads = mysql_fetch_assoc($leadsQuery)) {
    ?>
                                                                        <tr>
                                                                            <td><?php 
    echo $leads['first_name'];
    ?>
</td>
                                                                            <td><?php 
    echo $leads['last_name'];
    ?>
</td>
                                                                            <td><?php 
    echo $leads['phone_no'];
Example #4
0
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <tr>
                                <th>Agency name</th>
                                <th>primary contact</th>
                                <th>agency email</th>
                                <th>agency phone </th>
                                <th colspan="2">leads (yes/no)</th>
                            </tr>
                            <?php 
$agency_count = mysql_fetch_array(mysql_query("SELECT COUNT(*) as total FROM " . TBL_AGENCY));
$agency_sql = "SELECT * FROM " . TBL_AGENCY . ' ORDER BY id DESC';
$agencyPagination = new Pagination();
$agencyPagination->limit = 30;
$agencyPagination->pageParam = 'agency_page';
$agencyPagination->execute($agency_count['total']);
$agency_sql .= $agencyPagination->getLimitStr();
$agency_query = mysql_query($agency_sql);
if (mysql_num_rows($agency_query) > 0) {
    $lead_count_y['count'] = 0;
    $lead_count_n['count'] = 0;
    while ($data = mysql_fetch_assoc($agency_query)) {
        //Count lead_result
        $lead_count_y = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS count FROM leads WHERE lead_result = 'Y' AND user_id IN(SELECT id FROM user WHERE agency_id = '" . $data['id'] . "')"));
        $lead_count_n = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS count FROM leads WHERE lead_result = 'N' AND user_id IN(SELECT id FROM user WHERE agency_id = '" . $data['id'] . "')"));
        ?>
                                    <tr>
                                        <td><?php 
        echo $data['agency_name'];
        ?>
</td>