public function send_update()
 {
     $query = "SELECT emp_id, emp_email, emp_name FROM jm_employee WHERE emp_status = 'ACTIVE' AND emp_notification = 1";
     $result = $this->db->query($query);
     $employees = $result->result_array();
     foreach ($employees as $employee) {
         $query = "\n              SELECT * FROM jm_view_job\n              WHERE company_id IN (\n                SELECT flw_company\n                FROM jm_employee\n                INNER JOIN jm_follower\n                  ON emp_id = flw_employee\n                WHERE emp_status = 'ACTIVE'\n                  AND emp_notification = 1\n                  AND flw_employee = '{$employee['emp_id']}'\n                )\n              AND DATE(created_at) = CURDATE()\n            ";
         $result = $this->db->query($query);
         $jobs = $result->result_array();
         if (count($jobs) > 0) {
             $list = "";
             foreach ($jobs as $row) {
                 $list .= '<tr>
                     <td style="border: 1px solid #ddd !important; padding: 15px;">
                         <h3 style="margin: 0 0 5px;"><a href="' . site_url() . "job/detail/" . permalink($row["vacancy"], $row["job_id"]) . '.html" style="color: #4bb9fe; text-decoration: none;">' . $row["vacancy"] . '</a></h3>
                         <p style="margin-bottom: 7px; margin-top: 0; line-height:20px">' . $row["description"] . '</p>
                         <p style="margin-bottom: 5px; margin-top: 0; opacity: .7;"><small>' . $row["city"] . ', ' . $row["country"] . ' | ' . $row["level"] . ' | ' . $row["field"] . '</small></p>
                     </td>
                     <td style="border: 1px solid #ddd !important; padding: 8px; text-align: center;"><a href="' . site_url() . "job/detail/" . permalink($row["vacancy"], $row["job_id"]) . '.html" style="padding: 10px 15px; border-radius: 5px; background: #4bb9fe; text-decoration: none; color: #ffffff; margin: 2px; display: inline-block; vertical-align: middle; font-weight: 600;">APPLY NOW</a></td>
                 </tr>';
             }
             $this->_send_batch_mail($employee['emp_email'], $list, "Jobs Update at " . date("d F Y"), $employee['emp_name']);
         }
     }
 }
 public function read_query()
 {
     $query = "SELECT * FROM jm_view_category {$this->thread_condition} {$this->thread_limit}";
     $result = $this->db->query($query);
     $row = $result->num_rows();
     if ($this->thread_fetch == CategoryModel::$FETCH_ROW) {
         $data = $result->row_array();
         $data["permalink"] = permalink($data["category"], $data["category_id"], false, true);
     } else {
         $data = $result->result_array();
         for ($i = 0; $i < count($data); $i++) {
             $data[$i]["permalink"] = permalink($data[$i]["category"], $data[$i]["category_id"], false, true);
         }
     }
     return $data;
 }
Example #3
0
 public function create()
 {
     $company_id = $this->session->userdata(UserModel::$SESSION_ID);
     $this->form_validation->set_rules('jm-people-name', 'Name', 'required|max_length[50]');
     $this->form_validation->set_rules('jm-people-position', 'Position', 'required|max_length[50]');
     $this->form_validation->set_rules('jm-people-about', 'About', 'required|max_length[500]');
     if ($this->form_validation->run() == FALSE) {
         $data = array();
         $data["page"] = "People";
         $data["menu"] = "people";
         $data["content"] = "website/pages/company/people";
         $data["people"] = $this->people_model->read_by_company($company_id);
         $data["operation"] = "warning";
         $data["message"] = validation_errors();
         $this->load->view("website/template", $data);
     } else {
         $data = array("plp_name" => $this->input->post("jm-people-name"), "plp_position" => $this->input->post("jm-people-position"), "plp_about" => $this->input->post("jm-people-about"), "plp_company" => $company_id);
         $upload = true;
         if ($_FILES["jm-people-avatar"]["size"] != 0 && $_FILES["jm-people-avatar"]["name"] != "") {
             $config = array("allowed_types" => UploaderModel::$TYPE_IMAGE, "upload_path" => "./assets/img/people", "file_name" => "people-avatar" . $this->session->userdata(UserModel::$SESSION_NAME) . "-" . uniqid(), "overwrite" => FALSE, "input_source" => "jm-people-avatar", "max_width" => 2000, "max_height" => 2000);
             $this->uploader_model->config($config);
             $upload = $this->uploader_model->start_upload();
             if ($upload) {
                 $data["plp_avatar"] = $this->uploader_model->upload_data()["file_name"];
             } else {
                 $this->alert->warning_alert($this->uploader_model->upload_error());
             }
         }
         $result = $this->people_model->create($data);
         if ($result["status"] && $upload) {
             $this->alert->success_alert("People has been created successfully");
             redirect("people/profile/" . permalink($data["plp_name"], $result["id"]));
         } else {
             if (!$result["status"]) {
                 $this->alert->danger_alert("Something is getting wrong");
                 redirect("people");
             }
         }
     }
 }
Example #4
0
 public function filter()
 {
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         $field = $this->input->post("field");
         $size = $this->input->post("size");
         $city = $this->input->post("city");
         $company = $this->input->post("company");
         if ($company != null) {
             $company = explode(",", $company);
         }
         $data = $this->company_model->read($this->uri->segment(3), 10, "'ACTIVE'", $field, $city, $size, $company, true);
         $config['base_url'] = site_url() . 'company/filter';
         $config['total_rows'] = $this->company_model->get_company_total();
         $config['uri_segment'] = 3;
         $this->pagination->initialize($config);
         for ($i = 0; $i < count($data); $i++) {
             $data[$i]["permalink"] = permalink($data[$i]["company"], $data[$i]["company_id"]);
         }
         echo json_encode(array("company" => $data, "pagination" => $this->pagination->create_links()));
     } else {
         redirect("error404");
     }
 }
Example #5
0
function blox_loop_grid_hook($options)
{
    $options = array_merge(array('overlay' => 'none', 'excerpt' => 'nocontent', 'readmore' => '', 'grid' => '4', 'element_style' => 'default'), $options);
    global $post, $layout_sidebar;
    $crop_width = 173;
    if ($layout_sidebar == 'full') {
        $crop_width = 247;
    }
    $class = 'col-md-3 col-sm-6 col-xs-12';
    if ($options['grid'] == '2') {
        $class = 'col-md-6 col-sm-6 col-xs-12';
    } else {
        if ($options['grid'] == '3') {
            $class = 'col-md-4 col-sm-6 col-xs-12';
        }
    }
    $post_format = get_post_format();
    $post_format = $post_format != '' ? $post_format : 'standard';
    ?>
    <div class="<?php 
    echo $class;
    ?>
 loop-item">
        <article itemscope itemtype='http://schema.org/BlogPosting' <?php 
    post_class('entry ' . $options['element_style'] . ' format-' . $post_format);
    ?>
>
            <?php 
    echo hover_featured_image(array('overlay' => $options['overlay']));
    ?>
            <div class="relative">
                <div class="entry-title">
                    <h2 itemprop="headline">
                        <a itemprop="url" href="<?php 
    echo permalink();
    ?>
"><?php 
    the_title();
    ?>
</a>
                    </h2>
                </div>
                <?php 
    blox_post_content(array('excerpt' => $options['excerpt'], 'button' => 'small', 'readmore' => $options['readmore']));
    ?>
                <ul class="entry-meta list-inline">
                    <li itemprop="datePublished" class="meta-date"><?php 
    echo date_i18n(get_option('date_format'), strtotime(get_the_date()));
    ?>
</li>
                    <li itemprop="author" class="meta-author"><?php 
    echo __("By ", "themeton") . get_author_posts_link();
    ?>
</li>
                    <li itemprop="keywords" class="meta-category"><?php 
    echo __('In', 'themeton') . ' ' . get_the_category_list(', ');
    ?>
</li>
                    <li itemprop="comment" class="meta-comment pull-right"><?php 
    echo comment_count();
    ?>
</li>
                    <li class="meta-like pull-right"><?php 
    echo get_post_like(get_the_ID());
    ?>
</li>
                </ul>
            </div>
        </article>
    </div>
    <?php 
}
        echo permalink($employee["emp_name"], $employee["emp_id"]);
        ?>
">View Details</a></td>
                            <td class="text-center">
                                <a href="<?php 
        echo site_url();
        ?>
employee/activate/<?php 
        echo permalink($employee["emp_name"], $employee["emp_id"]);
        ?>
" class="btn btn-success btn-sm action"><i class="fa fa-check mrxs"></i>ACTIVATE</a>
                                <a href="<?php 
        echo site_url();
        ?>
employee/delete/<?php 
        echo permalink($employee["emp_name"], $employee["emp_id"]);
        ?>
" class="btn btn-danger btn-sm action employee-delete"><i class="fa fa-trash"></i></a>
                            </td>
                        </tr>

                    <?php 
    }
}
?>
                </tbody>
            </table>
        </div>
    </div>
</div>
Example #7
0
        ?>
</p>
                                                <label class="job-label <?php 
        echo strtolower($row["type"]);
        ?>
"><i class="fa fa-clock-o mrsm"></i><?php 
        echo $row["type"];
        ?>
</label>
                                            </div>
                                        </div>
                                    </div>

                                <?php 
    }
}
?>
                        </div>
                        <a href="<?php 
echo site_url();
?>
company/job/<?php 
echo permalink($company["company"], $company["company_id"]);
?>
.html" class="seemore center-block text-center"><i class="fa fa-chevron-down mrsm"></i>SEE MORE</a>
                    </section>
                </section>
            </div>
        </div>
    </div>
</section>
Example #8
0
<?php

function permalink($string)
{
    $find = array('Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
    $replace = array('c', 's', 'g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
    $string = strtolower(str_replace($find, $replace, $string));
    $string = preg_replace("@[^A-Za-z0-9\\-_\\.\\+]@i", ' ', $string);
    $string = trim(preg_replace('/\\s+/', ' ', $string));
    $string = str_replace(' ', '-', $string);
    return $string;
}
return array('dir' => "uploads", 'access' => 'Barryvdh\\Elfinder\\Elfinder::checkAccess', 'roots' => array(array('driver' => 'LocalFileSystem', 'path' => public_path("uploads"), 'URL' => url("uploads"), 'dotFiles' => false, 'uploadOrder' => array('allow'), 'uploadAllow' => array('image'), 'uploadMaxSize' => "1M"), "encoding" => "UTF-8", "locale" => "tr_TR.UTF-8"), 'options' => array('bind' => array('mkdir mkfile duplicate upload paste' => function ($cmd, $result, $args, $elfinder) {
    $files = $result['added'];
    foreach ($files as $file) {
        $filename = permalink($file["name"]);
        // just for test
        $arg = array('target' => $file['hash'], 'name' => $filename);
        $elfinder->exec('rename', $arg);
    }
    return true;
}, "rename.pre" => function ($cmd, &$result, $args) {
    $new_name = permalink($result["name"]);
    $result["name"] = $new_name;
})), 'csrf' => null);
Example #9
0
 public function editCategory($slug = NULL)
 {
     $this->data['page_title'] = 'Редактирование категорий для фотографий';
     $this->data['query'] = $this->PhotoCategory_Model->get('permalink', $slug);
     if (!$this->data['query']) {
         $this->session->set_flashdata('error', 'Такой категории нет.');
         redirect('back/photos/category');
     }
     $this->form_validation->set_rules('title', 'название', 'trim|required|min_length[2]|max_length[50]|is_unique[posts_categories.title]');
     if ($this->form_validation->run()) {
         $entry = ['id_user' => (int) $this->session->userdata('id'), 'title' => $this->input->post('title'), 'permalink' => permalink($this->input->post('title')), 'updated_at' => date('Y-m-d H:i:s')];
         if ($this->PhotoCategory_Model->update('permalink', $slug, $entry)) {
             $this->session->set_flashdata('item', 'Категория обновлена.');
             redirect(base_url('back/photos/category'));
         } else {
             $this->session->set_flashdata('error', 'Ошибка при добавлении.');
             redirect(base_url('back/photos'));
         }
     }
     $this->load_theme('photos/category/edit', $this->data);
 }
Example #10
0
                                </td>
                                <td><a href="<?php 
        echo site_url();
        ?>
forum/thread/<?php 
        echo permalink($thread["title"], $thread["thread_id"]);
        ?>
.html" target="_blank"><?php 
        echo $thread["title"];
        ?>
</a></td>
                                <td><a href="<?php 
        echo site_url();
        ?>
forum/category/<?php 
        echo permalink($thread["category"], $thread["category_id"], false, true);
        ?>
.html" target="_blank"><?php 
        echo $thread["category"];
        ?>
</a></td>
                                <td class="text-center">
                                    <?php 
        $label = "label-warning";
        if ($thread["status"] == "PUBLISHED") {
            $label = "label-success";
        }
        ?>
                                    <label class="label <?php 
        echo $label;
        ?>
Example #11
0
							</ul>
						</div>
					</div>
				</header>

				<div id="content" class="center">
					<?php 
require "config.php";
function permalink($string)
{
    $find = array('a', 'b', 'v', 'g', 'd', 'e', 'zh', 'tz', 'ch', 'sh', 'sht', 'z', 'i', 'y', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'y', 'u', 'yu', 'ya');
    $replace = array('а', 'б', 'в', 'г', 'д', 'е', 'ж', 'ц', 'ч', 'ш', 'щ', 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ь', 'ъ', 'ю', 'я');
    $string = strtolower(str_replace($find, $replace, $string));
    return $string;
}
$search_words = permalink($_POST['search']);
$sql = mysql_query("SELECT * FROM recepts WHERE name LIKE '%" . $search_words . "%'");
echo '<div id="article">';
while ($result = mysql_fetch_assoc($sql)) {
    $cat = $result['category'];
    $cat = mysql_fetch_assoc(mysql_query("SELECT * FROM categories WHERE id='{$cat}'"));
    $subcat = $result['subcategory'];
    $subcat = mysql_fetch_assoc(mysql_query("SELECT * FROM subcategories WHERE id='{$subcat}'"));
    echo '
								<a href="../recepts.php?id=' . $result['id'] . '" class="article">
									<div class="image">';
    if ($result['small_image'] != NULL) {
        echo '<img src="images/recepts/' . $result['id'] . '/' . $result['small_image'] . '" alt="" class="recepts">';
    }
    echo '		</div>
									<h3>' . $result['name'] . '</h3>';
 public function notification_commented($id, $thread, $thread_id, $name)
 {
     $data = array("eac_employee" => $id, "eac_activity" => "Comment", "eac_message" => "Your thread <a href='" . site_url() . "forum/thread/" . permalink($thread, $thread_id) . ".html'>" . $thread . "</a> commented by " . $name, "eac_type" => $this->notification);
     $this->create($data);
 }
        echo base_url();
        ?>
assets/img/avatar/<?php 
        echo $comment["employee_avatar"];
        ?>
" class="img-responsive img-circle avatar-table">
                                <span class="pull-left mtxs"><?php 
        echo $comment["name"];
        ?>
</span>
                            </td>
                            <td><a href="<?php 
        echo site_url();
        ?>
forum/thread/<?php 
        echo permalink($comment["thread"], $comment["thread_id"]);
        ?>
.html" target="_blank"><?php 
        echo $comment["thread"];
        ?>
</a></td>
                            <td>
                                <?php 
        $text = character_limiter(strip_tags($comment["comment"]), 65);
        echo $text;
        if (strlen($text) > 65) {
            ?>
                                <a href="<?php 
            echo site_url();
            ?>
comment/detail" class="comment-detail">Read More</a>
Example #14
0
?>
            </div>
            <div class="col-md-9">
                <div class="main-content">
                    <div class="form-section">
                        <div class="title">
                            <h3><i class="fa fa-building"></i> Bookmark</h3>
                            <p>Jobs list you have saved</p>
                        </div>
                        <?php 
if (isset($bookmarks)) {
    if (count($bookmarks) == 0) {
        echo "<hr><p class='text-center'>No jobs saved</p><hr>";
    }
    foreach ($bookmarks as $bookmark) {
        $permalink = permalink($bookmark["vacancy"], $bookmark["job_id"]);
        if ($bookmark["job_id"] == null) {
            ?>

                                    <hr>
                                    <div class="featured-job">
                                        <div class="featured-body">
                                            <p><span class="job-title">This job has been removed by company</p>
                                            <a href="<?php 
            echo base_url();
            ?>
bookmark/delete/" class="text-muted delete" data-id="<?php 
            echo $bookmark["bookmark_id"];
            ?>
"><i class="fa fa-remove"></i> REMOVE</a>
                                        </div>
Example #15
0
                                <td><?php 
        echo $job["level"];
        ?>
</td>
                                <td><?php 
        echo $job["city"];
        ?>
, <?php 
        echo $job["country"];
        ?>
</td>
                                <td><a href="<?php 
        echo site_url();
        ?>
company/about/<?php 
        echo permalink($job["company"], $job["company_id"]);
        ?>
.html" target="_blank"><?php 
        echo $job["company"];
        ?>
</a></td>
                                <td class="text-center"><?php 
        echo $job["applicant"];
        ?>
</td>
                            </tr>

                        <?php 
    }
}
?>
            <div class="mtlg">
                <table class="table table-striped table-hover table-responsive table-custom">
                    <tbody>
                    <?php 
if (isset($threads)) {
    foreach ($threads as $thread) {
        ?>

                            <tr>
                                <td class="text-center"><i class="fa fa-circle-o"></i></td>
                                <td><a href="<?php 
        echo site_url();
        ?>
forum/thread/<?php 
        echo permalink($thread["title"], $thread["thread_id"]);
        ?>
.html"><?php 
        echo $thread["title"];
        ?>
</a></td>
                                <td class="text-center"><?php 
        echo $thread["category"];
        ?>
</td>
                                <td class="text-center"><?php 
        echo date_format(date_create($thread["created_at"]), "d F, Y h:m A");
        ?>
</td>
                                <td class="text-center"><?php 
        echo $thread["comment"];
Example #17
0
 private function _is_valid_permalink($permalink, $check_company = true)
 {
     if ($check_company) {
         $company_id = $this->session->userdata(UserModel::$SESSION_ID);
         $jobs = $this->job_model->read_by_company($company_id);
     } else {
         $jobs = $this->job_model->read(null, null, "ACTIVE");
     }
     $valid_permalink = false;
     foreach ($jobs as $job) {
         if (permalink($job["vacancy"], $job["job_id"]) == $permalink) {
             $valid_permalink = true;
             break;
         }
     }
     return $valid_permalink;
 }
.html">FOLLOWING</a></li>
                    <li><a href="<?php 
echo site_url();
?>
account/thread/<?php 
echo permalink($employee["emp_name"], $employee["emp_id"]);
?>
.html">THREAD</a></li>
                </ul>
            </div>

            <div class="mtlg">
                <?php 
if (isset($following)) {
    foreach ($following as $row) {
        $permalink = permalink($row["company"], $row["company_id"]);
        ?>

                        <div class="featured-company detail">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="featured-image">
                                        <div class="image-wrapper">
                                            <img src="<?php 
        echo base_url();
        ?>
assets/img/office/<?php 
        echo $row["featured"];
        ?>
" class="img-responsive center-block">
                                        </div>
?>
            </div>
            <div class="col-md-9">
                <div class="main-content">
                    <div class="form-section">
                        <div class="title">
                            <h3><i class="fa fa-building"></i> Following</h3>
                            <p>Company list you're following</p>
                        </div>
                        <?php 
if (isset($following)) {
    if (count($following) == 0) {
        echo "<hr><p class='text-center'>No companies followed</p><hr>";
    }
    foreach ($following as $follow) {
        $permalink = permalink($follow["company"], $follow["company_id"]);
        ?>

                                    <div class="featured-company detail">
                                        <div class="row">
                                            <div class="col-md-6">
                                                <div class="featured-image">
                                                    <div class="image-wrapper">
                                                        <img src="<?php 
        echo base_url();
        ?>
assets/img/office/<?php 
        echo $follow["featured"];
        ?>
" class="img-responsive center-block">
                                                    </div>
Example #20
0
                                                        <li><a href="<?php 
        echo site_url();
        ?>
job/create.html"><i class="fa fa-file"></i></a></li>
                                                        <li><a href="<?php 
        echo site_url();
        ?>
job/edit/<?php 
        echo permalink($job["vacancy"], $job["job_id"]);
        ?>
.html"><i class="fa fa-pencil"></i></a></li>
                                                        <li><a href="<?php 
        echo site_url();
        ?>
job/delete/<?php 
        echo permalink($job["vacancy"], $job["job_id"]);
        ?>
.html" class="delete" data-title="Job"><i class="fa fa-trash"></i></a></li>
                                                    </ul>
                                                </td>
                                            </tr>

                                            <?php 
    }
}
?>
                                    </tbody>
                                </table>
                                <a href="<?php 
echo site_url();
?>
Example #21
0
                                                        <li><a href="<?php 
        echo site_url();
        ?>
people/create" class="people-create"><i class="fa fa-file"></i></a></li>
                                                        <li><a href="<?php 
        echo site_url();
        ?>
people/profile/<?php 
        echo permalink($person["plp_name"], $person["plp_id"]);
        ?>
" class="people-edit"><i class="fa fa-pencil"></i></a></li>
                                                        <li><a href="<?php 
        echo site_url();
        ?>
people/delete/<?php 
        echo permalink($person["plp_name"], $person["plp_id"]);
        ?>
" class="people-delete"><i class="fa fa-trash"></i></a></li>
                                                    </ul>
                                                </td>
                                            </tr>

                                        <?php 
    }
}
?>
                                    </tbody>
                                </table>
                                <a href="<?php 
echo site_url();
?>
        ?>
assets/img/avatar/<?php 
        echo $application["employee_avatar"];
        ?>
" class="img-responsive img-circle avatar-table">
                                    <span class="pull-left mtxs"><?php 
        echo $application["employee"];
        ?>
</span>
                                </a>
                            </td>
                            <td><a href="<?php 
        echo site_url();
        ?>
job/detail/<?php 
        echo permalink($application["vacancy"], $application["job_id"]);
        ?>
.html" target="_blank"><?php 
        echo $application["vacancy"];
        ?>
</a></td>
                            <td><?php 
        echo $application["company"];
        ?>
</td>
                            <td class="text-center">
                                <?php 
        $file = "No File";
        if ($application["employee_resume"] != null) {
            $file = "<a href='" . base_url() . "assets/data/" . $application["employee_resume"] . "'><i class='fa fa-file-o'></i> CV</a>";
        }
        ?>
" data-description="<?php 
        echo $category["description"];
        ?>
">
                            <td class="text-center">
                                <div class="checkbox">
                                    <input type="checkbox" data-toggle="checkbox">
                                    <label class="check" for="check2"></label>
                                </div>
                            </td>
                            <td><a href="<?php 
        echo site_url();
        ?>
forum/category/<?php 
        echo permalink($category["category"], $category["category_id"], false, true);
        ?>
.html" target="_blank"><?php 
        echo $category["category"];
        ?>
</a></td>
                            <td>
                                <?php 
        $text = character_limiter(strip_tags($category["description"]), 65);
        echo $text;
        if (strlen($text) > 65) {
            ?>
                                    <a href="<?php 
            echo site_url();
            ?>
category/detail" class="category-detail">Read More</a>
        echo permalink($company["cmp_name"], $company["cmp_id"]);
        ?>
">View Details</a></td>
                                <td class="text-center">
                                    <a href="<?php 
        echo site_url();
        ?>
companies/suspend/<?php 
        echo permalink($company["cmp_name"], $company["cmp_id"]);
        ?>
" class="btn btn-warning btn-sm action"><i class="fa fa-remove mrxs"></i>SUSPEND</a>
                                    <a href="<?php 
        echo site_url();
        ?>
companies/delete/<?php 
        echo permalink($company["cmp_name"], $company["cmp_id"]);
        ?>
" class="btn btn-danger btn-sm action company-delete"><i class="fa fa-trash"></i></a>
                                </td>
                            </tr>

                        <?php 
    }
}
?>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
</div>
                                    <th width="10%" class="text-center"><i class="fa fa-circle-o"></i></th>
                                    <th width="25%" class="text-left">Job Title</th>
                                    <th width="25%" class="text-center">Company</th>
                                    <th width="20%" class="text-center">Sent Date</th>
                                    <th width="20%" class="text-center">Status</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php 
if (isset($applications)) {
    if (count($applications) == 0) {
        echo "<tr><td colspan='5' class='text-center'>No job vacancy applied</td><tr>";
    }
    foreach ($applications as $application) {
        $permalink_job = permalink($application["vacancy"], $application["job_id"]);
        $permalink_company = permalink($application["company"], $application["company_id"]);
        ?>

                                                <tr>
                                                    <td class="text-center"><i class="fa fa-circle-o"></i></td>
                                                    <?php 
        if ($application["job_id"] == null) {
            ?>

                                                        <td><span class="text-danger">This job has been removed</span></td>
                                                        <td class="text-center">-</td>

                                                    <?php 
        } else {
            ?>
                    <header>
                        <h3>Who Followed Us</h3>

                        <p>People have following company updates</p>
                    </header>
                    <section class="applicant">
                        <?php 
if (isset($followers)) {
    foreach ($followers as $follower) {
        ?>

                                <a href="<?php 
        echo site_url();
        ?>
account/<?php 
        echo permalink($follower["employee"], $follower["employee_id"]);
        ?>
"><img src="<?php 
        echo base_url();
        ?>
assets/img/avatar/<?php 
        echo $follower["avatar"];
        ?>
" class="img-circle"></a>

                            <?php 
    }
    if (count($followers) > 15) {
        ?>

                                <a href="<?php 
 public function notification_applied($id, $employee, $employee_id, $job, $job_id)
 {
     $data = array("cac_company" => $id, "cac_activity" => "Applied", "cac_message" => "Your job <a href='" . site_url() . "job/detail/" . permalink($job, $job_id) . ".html'>" . $job . "</a> applied by <a href='" . site_url() . "account/detail/" . permalink($employee, $employee_id) . ".html'>" . $employee . "</a>", "cac_type" => $this->notification);
     $this->create($data);
 }