required: "กรุณากรอกหัวข้อค่ะ" } } }); }) </script> <h1>ศูนย์รวมวิชาการ</h1> <form id="frmMain" action="academics/admin/academics/save/<?php echo $academics->id; ?> " method="post" enctype="multipart/form-data"> <table class="form"> <tr class="trlang"><th></th><td class="lang"><a href="th" class="active flag th">ไทย</a><a href="en" class="flag en">อังกฤษ</a></td></tr> <?php echo group_dropdown($academics); ?> <tr> <th></th> <td><img class="img" style="max-height:90px; max-wide:120px;" src="<?php echo $academics->image ? $academics->image : 'themes/thaigcd/photo/nophoto.gif'; ?> " /></td></tr> <tr> <th>รูปภาพ :</th> <td><input type="text" name="image" value="<?php echo $academics->image; ?> " /><input type="button" name="browse" value="เลือกไฟล์" onclick="browser($(this).prev(),'academics_image')" /></td> </tr> <tr>
if ($key->group_id < '1000') { $tag = 'Built-in'; } if ($key->group_id == '1') { $tag = 'Built-in'; } if (mb_strpos($key->group_name, 'Network - ') !== false) { $tag = 'Auto Generated'; } echo " <tr> <td align=\"center\">".intval($key->total)."</td> <td><a href=\"".$this->config->item('oa_web_index')."/main/list_devices/".intval($key->group_id)."\">".htmlentities($key->group_name)."</a></td> <td>".htmlentities($tag)."</td> <td>".htmlentities($key->group_description)."</td> <td align=\"center\">".group_dropdown($key->group_id)."</td> </tr>"; endforeach; ?> </tbody> </table> </fieldset>
</tr> </thead> <tbody> <?php foreach ($query as $key) { $tag = 'User Defined'; if ($key->group_id < '1000') { $tag = 'Built-in'; } if ($key->group_id == '1') { $tag = 'Built-in'; } if (mb_strpos($key->group_name, 'Network - ') !== false) { $tag = 'Auto Generated'; } echo "\r\n\t\t<tr>\r\n\t\t\t<td align=\"center\">" . $key->total . "</td>\r\n\t\t\t<td><a href=\"" . base_url() . "index.php/main/list_devices/" . $key->group_id . "\">" . $key->group_name . "</a></td>\r\n\t\t\t<td>" . $tag . "</td>\r\n\t\t\t<td>" . $key->group_description . "</td>\r\n\t\t\t<td align=\"center\">" . group_dropdown($key->group_id) . "</td>\r\n\t\t</tr>"; } ?> </tbody> </table> </fieldset>
function approver_form($orm) { $group = group_dropdown($orm); $CI =& get_instance(); if ($orm->approve_id == $_SESSION['id']) { return $group . '<tr><th>สถานะ :</th><td>' . form_dropdown('status', array('approve' => 'Approve', 'draft' => 'Draft'), $orm->status) . '</td></tr><tr><th>ความคิดเห็น :</th><td><textarea name="comment">' . $orm->comment . '</textarea></td></tr>'; } elseif (is_approver($_SESSION['id'])) { return $group . '<tr><th>สถานะ :</th><td>' . form_dropdown('status', array('approve' => 'Approve', 'draft' => 'Draft'), $orm->status) . '</td></tr><tr><th>ความคิดเห็น :</th><td><textarea name="comment">' . $orm->comment . '</textarea><input type="hidden" name="approve_id" value="' . $_SESSION['id'] . '" /></td></tr>'; } else { return $group; } }
<h1>ปฎิทินกิจกกรม</h1> <form id="frmMain" method="post" action="calendars/admin/calendars/save/<?php echo $calendar->id; ?> "> <table class="form"> <? if(@$calendar->id): ?> <tr> <th></th><td><a href="calendars/admin/calendars/delete/<?php echo $calendar->id; ?> " class="btn" onclick="return confirm('ยืนยันการลบ')">ลบข้อมูลนี้</a></td> </tr> <? endif; ?> <?php echo group_dropdown($calendar); ?> <tr> <th>ข้อความ</th> <td><input type="text" name="title" value="<?php echo $calendar->title; ?> " class="text small" /></td> </tr> <tr> <th>ประเภท</th> <td> <input type="radio" name="className" value="e-blue" <?php echo $calendar->className == 'e-blue' || !$calendar->className ? 'checked' : ''; ?> /><span class="e-blue"> ประชุม </span>
if ($key->group_id < '1000') { $tag = 'Built-in'; } if ($key->group_id == '1') { $tag = 'Built-in'; } if (mb_strpos($key->group_name, 'Network - ') !== false) { $tag = 'Auto Generated'; } echo " <tr> <td align=\"center\">".$key->total."</td> <td><a href=\"".base_url()."index.php/main/list_devices/".$key->group_id."\">".htmlentities($key->group_name)."</a></td> <td>".$tag."</td> <td>".htmlentities($key->group_description)."</td> <td align=\"center\">".group_dropdown(intval($key->group_id), intval($key->access_level))."</td> </tr>"; endforeach; ?> </tbody> </table> </fieldset> <?php } ?> <?php function group_dropdown($group_id, $access_level) { if ($group_id == '0') { $js = "onchange=\"alter_all_groups();\""; } else { $js = '';