示例#1
0
$list->add('sec_type', 'Loại', 'array', 1, 0);
$list->add('sec_body_system', 'Hệ cơ quan', 'array', 1, 0);
$list->add('', 'Mô tả');
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $row['sec_picture'] = get_picture_path($row['sec_picture'], 'small');
    $array_td = array('<td class="center" width="150"><img src="' . $row['sec_picture'] . '" /></td>', '<td class="center">' . $row['sec_name'] . '</td>', '<td class="center">' . ($row['sec_parent_id'] ? $sec_parent_id[$row['sec_parent_id']] : '') . '</td>', '<td class="center">' . $array_type[$row['sec_type']] . '</td>', '<td class="center">' . ($row['sec_body_system'] ? $array_he_co_quan[$row['sec_body_system']] : '') . '</td>', '<td width="500">' . $row['sec_desc'] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#2
0
 *
 */
$list->add('dic_key', 'Nội dung', 'string', 1, 0);
$list->add('dic_translate_en', 'Bản dịch', 'string');
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td width="50%">' . $row['dic_key'] . '</td>', '<td width="50%">' . $row['dic_translate_en'] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#3
0
$list->add('ana_sex', 'Sex', 'array', 1, 0);
$list->add('ana_type', 'Type', 'array', 1, 0);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            LEFT JOIN sections ON sec_id = ana_sec_id
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            LEFT JOIN sections ON sec_id = ana_sec_id
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td>' . $row['ana_title'] . '</td>', '<td>' . $row['ana_alt'] . '</td>', '<td>' . $row['sec_name'] . '</td>', '<td class="center">' . $array_sex[$row['ana_sex']] . '</td>', '<td class="center">' . $array_type[$row['ana_type']] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#4
0
*   tham số thứ 4 là is_search : có cho sắp xếp hay ko, tham số thứ 5 là is_sort có cho tạo khung tìm kiếm theo trường hay ko
*/
$list->add('cit_name', 'Tên thành phố', 'string', 1, 1);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
//$list->addSearch()
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td>' . $row['cit_name'] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#5
0
$list->add('adv_position', 'Vị trí', 'array', 1, 0);
$list->add('adv_link', 'Đường dẫn', 'string', 1, 0);
$list->add('', 'Ảnh', 'string', 1, 0);
$list->add('', 'Active', 'string', 0, 0);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td>' . $row['adv_name'] . '</td>', '<td>' . $array_position[$row['adv_position']] . '</td>', '<td>' . $row['adv_link'] . '</td>', '<td><img src="' . get_picture_path($row['adv_image'], 'small') . '"/></td>', $list->showCheckbox('adv_active', $row['adv_active'], $row[$id_field]), $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#6
0
$list->add('', 'Ảnh danh mục');
$list->add('cat_name', 'Tên danh mục', 'string', 1, 0);
$list->add('cat_title', 'Tiêu đề danh mục', 'string', 1, 0);
$list->add('cat_type', 'Loại danh mục', 'string', 1, 0);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td><img src="' . get_picture_path($row['cat_picture']) . '" /></td>', '<td>' . $row['cat_name'] . '</td>', '<td>' . $row['cat_title'] . '</td>', '<td class="center">' . $cat_type[$row['cat_type']] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#7
0
$list->add('new_cat_id', 'Danh mục', 'array', 1, 1);
$list->add('', 'Active');
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            LEFT JOIN categories ON cat_id = new_cat_id
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            LEFT JOIN categories ON cat_id = new_cat_id
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td class="center">' . $row[$id_field] . '</td>', '<td>' . $row['new_title'] . '</td>', '<td>' . $row['new_picture'] . '</td>', '<td>' . $row['new_date'] . ' - ' . date('d/m/Y H:i', $row['new_date']) . '</td>', '<td>' . $new_cat_id[$row['new_cat_id']] . '</td>', $list->showCheckbox('new_active', $row['new_active'], $row[$id_field]), $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#8
0
/**
 * $list->add('')...etc
 *
 */
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array($list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#9
0
        }
        $cat_hoidap = implode(', ', $cat_hoidap);
    } else {
        $cat_hoidap = '';
    }
    //lấy ra đối tượng
    $row_doi_tuong = $row['cdi_doi_tuong'] ? explode(',', $row['cdi_doi_tuong']) : array();
    $cat_doi_tuong = array();
    foreach ($row_doi_tuong as $dt_int) {
        $cat_doi_tuong[] = $array_doi_tuong[$dt_int];
    }
    $cat_doi_tuong = implode(', ', $cat_doi_tuong);
    //lấy ra độ tuổi
    $row_do_tuoi = $row['cdi_do_tuoi'] ? explode(',', $row['cdi_do_tuoi']) : array();
    $cat_do_tuoi = array();
    foreach ($row_do_tuoi as $dt_int) {
        $cat_do_tuoi[] = $array_do_tuoi[$dt_int];
    }
    $cat_do_tuoi = implode(', ', $cat_do_tuoi);
    //lấy ra bệnh theo mùa
    $row_theo_mua = $row['cdi_theo_mua'] ? explode(',', $row['cdi_theo_mua']) : array();
    $cat_theo_mua = array();
    foreach ($row_theo_mua as $dt_int) {
        $cat_theo_mua[] = $array_theo_mua[$dt_int];
    }
    $cat_theo_mua = implode(', ', $cat_theo_mua);
    $array_td = array('<td class="center">' . $row['cdi_id'] . '</td>', '<td>' . $row['cdi_name'] . '</td>', '<td>' . (isset($array_he_co_quan[$row['cdi_body_system']]) ? $array_he_co_quan[$row['cdi_body_system']] : '') . '</td>', '<td style="max-width:200px;">' . $cat_hoidap . '</td>', '<td>' . $cat_doi_tuong . '</td>', '<td>' . $cat_do_tuoi . '</td>', '<td>' . $cat_theo_mua . '</td>', $list->showCheckbox('cdi_truyen_nhiem', $row['cdi_truyen_nhiem'], $row[$id_field]), $list->showCheckbox('cdi_popular', $row['cdi_popular'], $row[$id_field]), $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#10
0
 */
$list->add('que_id', 'ID', 'string', 1, 1);
$list->add('que_title', 'Tiêu đề', 'string', 1, 0);
$list->add('', 'Status', 'string', 0, 0);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td class="center">' . $row[$id_field] . '</td>', '<td class="">' . $row['que_title'] . '</td>', $list->showCheckbox('que_status', $row['que_status'], $row[$id_field]), $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#11
0
$list->add('pha_id', 'ID', 'string', 1, 1);
$list->add('pha_name', 'Tên thuốc', 'string', 1, 1);
$list->add('pha_title', 'Tiêu đề thuốc', 'string', 1, 1);
$list->add('pha_nha_sx_name', 'Nhà sản xuất', 'string', 0, 1);
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array("<td>{$row['pha_id']}</td>", "<td>{$row['pha_name']}</td>", "<td>{$row['pha_title']}</td>", "<td>{$row['pha_nha_sx_name']}</td>", $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#12
0
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    //Quận huyện tương ứng
    $db_district = new db_query('SELECT * FROM ' . $bg_table_district . ' WHERE dis_city_id = ' . $row['cit_id'] . ' ORDER BY dis_name ASC');
    $array_district = array();
    while ($row_d = mysqli_fetch_assoc($db_district->result)) {
        $array_district[$row_d['dis_id']] = $row_d['dis_name'];
    }
    unset($db_district);
    if (!$array_district) {
        $array_district = array('' => 'Chưa có');
    }
    $array_td = array('<td>' . $row['cit_name'] . '</td>', '<td>' . form_dropdown('', $array_district) . '</td>', $list->showCheckbox('cit_tw', $row['cit_tw'], $row[$id_field]), $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
示例#13
0
    </td>
    <td>
        <?php 
    echo form_input('use_phone' . $row[$id_field], $row['use_phone'], 'class="span3" onkeyup="check_edit(\'record_' . $i . '\')"');
    ?>
    </td>
    <td>
        <?php 
    echo form_input('use_contact' . $row[$id_field], $row['use_contact'], 'class="span3" onkeyup="check_edit(\'record_' . $i . '\')"');
    ?>
    </td>
    <?php 
    echo $list->showCheckbox('use_active', $row['use_active'], $row[$id_field]);
    ?>
    <?php 
    echo $list->showEdit($row[$id_field]);
    ?>
    <?php 
    echo $list->showDelete($row[$id_field]);
    ?>
    <?php 
    echo $list->end_tr();
    ?>
    <?php 
}
?>
    <?php 
echo $list->showFooter();
?>
</div>
</body>