Example #1
0
<?php

require "../../../libraries/oop.php";
require "../../../libraries/user.php";
$stt = $_GET['stt'];
$iddh = time();
$user = new User();
$data = $user->listuser();
$ngaydat = date('d');
$thangdat = date('m');
$namdat = date('Y');
$dat = "{$namdat}-{$thangdat}-{$ngaydat}";
echo "<table>";
echo "<tr height='20px'>";
echo "<td align=center width='50px'>{$stt}</td>";
echo "<td align=center width='100px'><input type='text' name='iddh' value='{$iddh}' size='7' readonly='readonly'/></td>";
echo "<td align=center width='100px'>";
echo "<select name='user' id='user'>";
foreach ($data as $row) {
    echo "<option value='{$row['Username']}'><font color='#000000'>{$row['Username']}</font></option>;";
}
echo "</select>";
echo "</td>";
echo "<td align=center width='70px'><input type='text' name='ngaydat' id='ngaydat' value='{$dat}' size='7' readonly='readonly'/></td>";
echo "<td align=center width='70px'><input type='text' name='ngaygiao' id='ngaygiao' value='{$dat}' size='7'/></td>";
echo "<td align=center width='80px'><input type='text' name='nguoinhan' id='nguoinhan' size='7' /></td>";
echo "<td align=center width='100px'><input type='text' name='dienthoai' id='dienthoai' size='9' /></td>";
echo "<td align=center width='100px'><input type='text' name='diadiem' id='diadiem' size='9' /></td>";
echo "<td align=center width='100px'><input type='text' id='ghichu' size='10'/></td>";
?>
		
Example #2
0
<div align="center">	
	<table align="center"  width="600px" id="tableloaihang" >
    	<tr height="20px">
        	<td class=title width="100px">STT</td>
        	<td class=title width="150px">Tài Khoản</td>
            <td class=title width="150px">Chức Vụ</td>
            <td class=title width="100px">Chi Tiết</td>
            <td class=title width="100px">Sửa</td>
        	<td class=title width="100px">Xóa</td>                                                
        </tr>
<?php 
ini_set("display_errors", 0);
require_once '../../../libraries/oop.php';
require_once '../../../libraries/user.php';
$u = new User();
$data_u = $u->listuser();
$stt = 0;
foreach ($data_u as $item_u) {
    $stt++;
    echo "<tr height='20px'>";
    echo "<td align=center width='100px'>{$stt}</td>";
    echo "<td align=center width='150px'><input type='text' id='{$username}{$stt}' value='{$item_u['Username']}' size='25' disabled='disabled'/></td>";
    echo "<td align=center width='150px'><select id='level{$stt}'> ";
    ?>
			<option value='2'>Admin</option>
            <option value='1' <?php 
    if ($item_u['Level'] == 1) {
        echo "selected";
    }
    ?>
>User</option>
Example #3
0
    			<option value="0">List All</option>
				<option value="1">Member</option>
                <option value="2">Administrator</option>
				</select></h4>
     <div id="ketqua">           
	<table align="center"  width="350" >
    	<tr>
        	<td class=title>STT</td>
        	<td class=title>Username</td>
        	<td class=title>Level</td>
        	<td class=title>Edit</td>
        	<td class=title>Del</td>                                                
        </tr>
<?php 
$a = new User();
$data = $a->listuser();
$stt = 0;
foreach ($data as $item) {
    $stt++;
    echo "<tr>";
    echo "<td align=center>{$stt}</td>";
    echo "<td align=center>{$item['username']}</td>";
    if ($item[level] == 1) {
        echo "<td align=center>Member</td>";
    } else {
        echo "<td align=center><font color=red>Admin</font></td>";
    }
    echo "<td align=center><a href=index.php?module=news&act=edit&uid={$item['id']}>Edit</a></td>";
    echo "<td align=center><a href=index.php?module=news&act=del&uid={$item['id']}>Del</a></td>";
    echo "</tr>";
}