示例#1
0
                      <?
			$sql_person = "select * from person_main where  person_id='$result[person_id]' ";
			$query_person  = mysqli_query($connect,$sql_person);
			$result_person = mysqli_fetch_array($query_person);
			echo "$result_person[prename]$result_person[name]&nbsp;&nbsp;$result_person[surname]";
?>
</Td>
                  <Td><?=$result['car_number']?></Td>
                  <Td><?=$result['place']?></Td>
                  <Td><?=$result['finish_mile']?></Td>
                  <Td><?=$result['fuel']?></Td>
                  <Td><a href=?option=car&task=main/car_report&index=7&id=$id&page=$page&car_index=$car_index><img src=images/browse.png border='0' alt='รายละเอียด'></Td>
<?
//กำหนดเวลาให้แก้ไขได้
$now=time();
$timestamp_recdate=make_time_2($rec_date);
$timestamp_recdate2=$timestamp_recdate+3600;
//////////////////////
if( $result['person_id']==$user and $now<$timestamp_recdate2){
echo "<Td valign='top' align='center'><a href=?option=car&task=main/car_report&index=2&id=$id&page=$page&car_index=$car_index><img src=images/drop.png border='0' alt='ลบ'></Td><Td valign='top'  align='center'><a href=?option=car&task=main/car_report&index=5&id=$id&page=$page&car_index=$car_index><img src=images/edit.png border='0' alt='แก้ไข'></a></Td>";
}
else{
echo "<td></td><td></td>";
}
?></Tr>
<?
$M++;
$N++;  //*เกี่ยวข้องกับการแยกหน้า
}
?>
    </tbody>
示例#2
0
        echo $comment;
        ?>
</td>
					<td align='center'><?php 
        echo $register_date;
        ?>
</td>
					<td align="center"><A HREF="javascript:void(0)"
onclick="window.open('modules/bookregister/main/bookdetail_receive.php?id=<?php 
        echo $result['ms_id'];
        ?>
', 'bookdetail','width=500,height=500,scrollbars')" title="คลิกเพื่อดูรายละเอียด"><span style="text-decoration: none">คลิก</span></A></td>
<?php 
        //ตั้งค่าเวลาให้ลบได้
        $now = time();
        $timestamp_recdate = make_time_2($result['register_date']);
        $timestamp_recdate_2 = $timestamp_recdate + 86400 * 3;
        //เพิ่มเวลา 3 วัน
        if ($now <= $timestamp_recdate_2) {
            $delete = 1;
            //yes
        } else {
            $delete = 2;
            //no
        }
        if ($result['officer'] == $user and $delete == 1) {
            echo "<Td align='center'><a href=?option=bookregister&task=main/receive_de&index=2&id={$id}&page={$_REQUEST['page']}><img src=images/drop.png border='0' alt='ลบ'></a></Td>";
        } else {
            echo "<td></td>";
        }
        if ($result['officer'] == $user and $delete == 1) {
示例#3
0
        echo "<Td valign='top' align='center'><a href=?option=car&task=main/car_commander&index=7&id={$id}&page={$page}&car_index={$car_index}><img src=images/browse.png border='0' alt='รายละเอียด'></Td>";
        if ($result['commander_grant'] == '1') {
            echo "<Td align='center'><img src=images/yes.png border='0'></td>";
        } else {
            if ($result['commander_grant'] == '2') {
                echo "<Td align='center'><img src=images/no.png border='0'></td>";
            } else {
                echo "<Td align='center'><input type='checkbox' name='{$id}' id='{$id}' value='1'></td>";
            }
        }
        $now = time();
        $timestamp = make_time_2($result['commander_date']);
        if ($result['commander_date'] == "") {
            $timestamp_2 = $now + 1800;
        } else {
            $timestamp = make_time_2($result['commander_date']);
            $timestamp_2 = $timestamp + 1800;
        }
        if ($now < $timestamp_2) {
            echo "<Td valign='top' align='center'><a href=?option=car&task=main/car_commander&index=5&id={$id}&page={$page}&car_index={$car_index}><img src=images/edit.png border='0' alt='บันทึก'></a></Td>";
        } else {
            echo "<Td></td>";
        }
        echo "</Tr>";
        $M++;
        $N++;
        //*เกี่ยวข้องกับการแยกหน้า
    }
    echo "</Table>";
    echo "</form>";
}