当前位置: 首页>>代码示例>>PHP>>正文


PHP permalink函数代码示例

本文整理汇总了PHP中permalink函数的典型用法代码示例。如果您正苦于以下问题:PHP permalink函数的具体用法?PHP permalink怎么用?PHP permalink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了permalink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: send_update

 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']);
         }
     }
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:25,代码来源:subscribermodel.php

示例2: read_query

 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;
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:16,代码来源:categorymodel.php

示例3: create

 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");
             }
         }
     }
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:40,代码来源:people.php

示例4: filter

 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");
     }
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:23,代码来源:company.php

示例5: blox_loop_grid_hook

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 
}
开发者ID:petersondrs,项目名称:tellura,代码行数:72,代码来源:loop_layouts.php

示例6: permalink

        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>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:30,代码来源:employees_suspended.php

示例7: strtolower

        ?>
</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>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:31,代码来源:job.php

示例8: permalink

<?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);
开发者ID:lehoikma,项目名称:tessst,代码行数:25,代码来源:config.php

示例9: editCategory

 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);
 }
开发者ID:blrik,项目名称:bWorld,代码行数:21,代码来源:Photos.php

示例10: site_url

                                </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;
        ?>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:31,代码来源:threads.php

示例11: permalink

							</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>';
开发者ID:mish0501,项目名称:ecohome,代码行数:31,代码来源:search.php

示例12: notification_commented

 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);
 }
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:5,代码来源:employeeactivitymodel.php

示例13: base_url

        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>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:31,代码来源:thread_comment.php

示例14: foreach

?>
            </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>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:31,代码来源:bookmark.php

示例15: site_url

                                <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 
    }
}
?>
开发者ID:anggadarkprince,项目名称:jagamana-web,代码行数:31,代码来源:jobs.php


注:本文中的permalink函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。