public function __construct() { parent::__construct(); $this->load->helper("url"); $this->load->library("session"); if (!$this->session->userdata("ses_user") || $this->session->userdata("ses_level") != 1) { redirect(base_urL() . "admin/verify"); } }
"></script> <script> $(document).ready(function () { status(1); status(2); status(3); status(4); status(5); status(6); }); function status(id) { // alert(id); $.post("<?php echo base_urL('document/chack_status'); ?> ", { "id": id }, function (data) { // console.log(data); // alert(data); data = jQuery.parseJSON(data) status1 = data[0].status; number = data[0].number_document; date = data[0].startdate; //// console.log(status1); console.log(number); // var a ="alert('ยังไม่เปิดให้ส่งเอกสาร)"; if (status1 != 0) {
/** * Description: Creates an formated list for viewing/editing block in the developer/admin section * * @param Array of objects $block_objects (Its an array of objrct data we want to be formated exmpl. $object[$array_number]->object_variables) * @param boolean $admin (Default value is NULL, if it's !=NULL they we will give the user aditional blocks to edit, delete and add block in the administrator block menu) * @param int $block_group (Determinds what group are we creating new blocks) * @param string $module (Are we creating in the admin menu or the developer menu) * @param string $language (What will the language linking be (default="en", serbian="sr")) * @return String */ public function block_format($block_objects, $admin = NULL, $block_group = NULL, $module = 'admin', $language = 'en') { $lesson = ''; if ($block_objects == NULL and $admin != NULL) { $lesson .= "\t<div class=\"track_content col-lg-8 col-lg-offset-2 \" style=\"margin-bottom:25px; margin-top:15px; padding:10px\">\n"; $lesson .= "<h4 class=\"bold\">" . $this->lang->line('block_m_format_no_block') . " </h4> "; $lesson .= "<p class=\"\">" . $this->lang->line('block_m_format_start') . "</p> <br />"; $lesson .= "\t<a href=\"" . base_urL() . $language . "/{$module}/block/create/" . $block_group . "\" class=\"btn btn-primary\"><i class=\"glyphicon glyphicon-plus-sign\"></i> " . $this->lang->line('block') . "</a>"; $lesson .= "</div>\n"; } foreach ($block_objects as $block_object) { $block_group = $block_object->block_group; if ($admin != NULL) { $lesson .= "\t<div class=\"track_content col-lg-12 col-md-12 \" style=\"margin-bottom:25px; margin-top:15px; padding:10px\">\n"; $lesson .= "<h4 class=\"color-green\">" . $this->lang->line('block_m_format_number') . " " . $block_object->block_id . "<span class=\"pull-right\">" . $this->lang->line('block_m_format_order') . " " . $block_object->block_order . "</span></h4> <br />"; } if ($block_object->title != NULL) { $lesson .= "\t<div class=\"msB\"><p><strong>" . $block_object->title . "</strong></p></div>\n\n"; } if ($block_object->description != NULL) { $lesson .= "\t<div class=\"msB\"><p>" . $block_object->description . "</p></div>\n\n"; } if ($block_object->note != NULL) { $lesson .= "\t<p>" . $this->lang->line('block_m_format_note') . " " . $block_object->note . "</p>\n\n"; } if ($block_object->code != NULL) { $lesson .= "\t<pre>" . $block_object->code . "</pre>\n\n"; } if ($block_object->output != NULL) { $lesson .= "<div class=\"msB\"><p><strong>" . $this->lang->line('block_m_format_output') . "</strong></p></div>"; $lesson .= "\t<pre>" . $block_object->output . "</pre>\n\n"; } if ($block_object->video_url != NULL) { $lesson .= "<div class=\"video-container\"><div class=\"msB\"><p><strong> Video example </strong></p></div>"; $lesson .= "\t<iframe width=\"420\" height=\"315\" src=\"" . $block_object->video_url . "\"></iframe></div>\n\n"; } if ($admin != NULL) { $lesson .= "\t<a href=\"" . base_urL() . $language . "/{$module}/block/edit/" . $block_object->block_id . "\" class=\"btn btn-primary\"><i class=\"glyphicon glyphicon-pencil\"></i> " . $this->lang->line('block_m_edit_block') . "</a>"; $lesson .= "\t<a href=\"" . base_urL() . $language . "/{$module}/block/delete/" . $block_object->block_id . "\" class=\"btn btn-primary\"><i class=\"glyphicon glyphicon-trash\"></i> " . $this->lang->line('block') . "</a>"; $lesson .= "</div>\n"; } } if ($admin != NULL and $block_objects != NULL) { $lesson .= "\t<div class=\"track_content col-lg-6 col-lg-offset-3 col-md-12\" style=\"margin-bottom:25px; margin-top:15px; padding:10px\">\n"; $lesson .= "<h4 class=\"bold\">" . $this->lang->line('block_m_add_new') . "</h4> "; $lesson .= "<p class=\"\">" . $this->lang->line('block_m_format_start') . "</p> <br />"; $lesson .= "\t<a href=\"" . base_urL() . $language . "/{$module}/block/create/" . $block_group . "\" class=\"btn btn-primary\"><i class=\"glyphicon glyphicon-plus-sign\"></i> " . $this->lang->line('block') . "</a>"; $lesson .= "</div>\n"; } return $lesson; }