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


PHP get_picture_path函数代码示例

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


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

示例1: _loadFormEditRecord

 function _loadFormEditRecord()
 {
     $list_cat = category_type($this->cat_type);
     $array_cat = array('' => ' -- Chọn nhóm nhân viên -- ');
     foreach ($list_cat as $cat) {
         $array_cat[$cat['cat_id']] = $cat['cat_name'];
     }
     unset($db_query);
     parent::_loadFormEditRecord();
     // TODO: Change the autogenerated stub
     $db_age = new db_query('SELECT * FROM agencies');
     $list_agencies = array();
     while ($row = mysqli_fetch_assoc($db_age->result)) {
         $list_agencies[$row['age_id']] = $row['age_name'];
     }
     $this->add($this->form->text(array('label' => 'Tên nhân viên', 'name' => 'use_name', 'id' => 'use_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên nhân viên', 'value' => $this->f['use_name'])));
     $this->add($this->form->select(array('label' => 'Thuộc cửa hàng', 'name' => 'use_agency_id', 'id' => 'use_agency_id', 'option' => $list_agencies, 'selected' => $this->f['use_agency_id'], 'require' => 1, 'errorMsg' => 'Bạn chưa chọn cửa hàng')));
     $this->add($this->form->text(array('label' => 'Địa chỉ', 'name' => 'use_address', 'id' => 'use_address', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập địa chỉ', 'value' => $this->f['use_address'])));
     $this->add($this->form->text(array('label' => 'Điện thoại', 'name' => 'use_phone', 'id' => 'use_phone', 'value' => $this->f['use_phone'])));
     $this->add($this->form->number(array('label' => 'Lương ca', 'name' => 'use_pay', 'id' => 'use_pay', 'addon' => 'vnđ', 'value' => $this->f['use_pay'])));
     $this->add($this->form->number(array('label' => 'Chiết khấu', 'name' => 'use_discount', 'id' => 'use_discount', 'addon' => '%', 'value' => $this->f['use_discount'])));
     $this->add($this->form->select(array('label' => 'Nhóm nhân viên', 'name' => 'use_group_id', 'id' => 'use_group_id', 'option' => $array_cat, 'selected' => $this->f['use_group_id'], 'require' => 1, 'errorMsg' => 'Bạn chưa chọn nhóm nhân viên')));
     $this->add($this->form->text(array('label' => 'Mã nhân viên tự nhập', 'name' => 'use_code', 'id' => 'use_code', 'value' => $this->f['use_code'])));
     $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'use_note', 'id' => 'use_note', 'value' => $this->f['use_note'])));
     $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'use_image', 'id' => 'use_image', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => get_picture_path($this->f['use_image']))));
 }
开发者ID:virutmath,项目名称:crm_local,代码行数:26,代码来源:ajax.php

示例2: getAllCategories

 public function getAllCategories($parent_id = 0)
 {
     $list = [];
     $parent_id = intval($parent_id);
     foreach ($this->fields('id,name,icon,active,image,has_child')->where('parent_id', $parent_id)->get_all() as $item) {
         $item->icon = $this->icon_list[intval($item->icon)];
         $item->image = get_picture_path($item->image);
         if ($item->has_child) {
             $item->child = $this->getAllCategories($item->id);
         } else {
             $item->child = [];
         }
         $list[] = $item;
     }
     return $list;
 }
开发者ID:virutmath,项目名称:sieuthiphutung.net,代码行数:16,代码来源:Categories_model.php

示例3: prepare_hoidap_record

function prepare_hoidap_record(&$row_news, $type_image = 'mobile')
{
    if (isset($row_news['que_title']) && $row_news['que_title']) {
        $row_news['que_title'] = htmlspecialbo($row_news['que_title']);
    }
    if (isset($row_news['que_image']) && $row_news['que_image']) {
        $row_news['que_image_low'] = get_picture_path($row_news['que_image'], $type_image . '_low');
        $row_news['que_image'] = get_picture_path($row_news['que_image'], $type_image);
    }
    if (isset($row_news['que_question_content']) && $row_news['que_question_content']) {
        $row_news['full_question_content'] = $row_news['que_question_content'];
        $row_news['que_question_content'] = removeHTML($row_news['que_question_content']);
        $row_news['que_question_content'] = cut_string($row_news['que_question_content'], 50);
    }
    if (isset($row_news['que_date']) && $row_news['que_date']) {
        $row_news['post_time'] = date('d/m/Y | H:i', $row_news['que_date']);
    }
    $row_news['link_detail'] = generate_hoidap_detail($row_news);
    return $row_news;
}
开发者ID:virutmath,项目名称:suckhoe,代码行数:20,代码来源:mobile_custom_function.php

示例4: _loadFormEditCategory

 function _loadFormEditCategory()
 {
     parent::_loadFormEditCategory();
     // TODO: Change the autogenerated stub
     //kiểm tra quyền edit
     checkPermission('edit');
     global $cat_table;
     //lấy ra cat_id cần chỉnh sửa
     $cat_id = getValue('cat_id', 'int', 'POST', 0);
     //lấy ra data cat id
     $db_data = new db_query('SELECT * FROM ' . $cat_table . ' WHERE age_id = ' . $cat_id . ' LIMIT 1');
     if ($row = mysqli_fetch_assoc($db_data->result)) {
         extract($row);
     } else {
         exit;
     }
     $this->add($this->form->text(array('label' => 'Nhập tên', 'name' => 'age_name', 'id' => 'age_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên nhóm khách hàng', 'value' => $this->f['age_name'])));
     $this->add($this->form->text(array('label' => 'Địa chỉ', 'name' => 'age_address', 'id' => 'age_address', 'value' => $this->f['age_address'])));
     $this->add($this->form->text(array('label' => 'Điện thoại', 'name' => 'age_phone', 'id' => 'age_phone', 'value' => $this->f['age_phone'])));
     $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'age_image', 'id' => 'age_image', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => get_picture_path($this->f['age_image']))));
     $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'age_note', 'id' => 'age_note', 'value' => $this->f['age_note'])));
 }
开发者ID:virutmath,项目名称:crm_local,代码行数:22,代码来源:ajax.php

示例5: db_query

    }
}
//lấy dữ liệu record cần sửa đổi
$db_data = new db_query("SELECT * FROM " . $bg_table . " WHERE " . $id_field . " = " . $record_id);
if ($row = mysqli_fetch_assoc($db_data->result)) {
    foreach ($row as $key => $value) {
        ${$key} = $value;
    }
} else {
    exit;
}
#Phần hiển thị
$rainTpl = new RainTPL();
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$html_page = '';
$form = new form();
$html_page .= $form->form_open();
$html_page .= $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập');
/**
 * something here
 */
$html_page .= $form->text(array('label' => 'Tiêu đề tin', 'name' => 'new_title', 'id' => 'new_title', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tiêu đề tin', 'value' => getValue('new_title', 'str', 'POST', $new_title)));
$html_page .= $form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'new_picture', 'id' => 'new_picture', 'browse_id' => 'btn_picture', 'viewer_id' => 'viewer_picture', 'value' => get_picture_path($new_picture)));
$html_page .= $form->checkbox(array('name' => 'new_active', 'id' => 'new_active', 'label' => 'Active', 'value' => 1, 'currentValue' => $new_active));
$html_page .= $form->form_redirect();
$html_page .= $form->form_action(array('label' => array('Cập nhật', 'Nhập lại'), 'type' => array('submit', 'reset')));
$html_page .= $form->form_close();
$rainTpl->assign('html_page', $html_page);
$rainTpl->draw('add');
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:edit.php

示例6: db_count

$list->add('sec_type', 'Loại', 'array', 1, 0);
$list->add('sec_body_system', 'Hệ cơ quan', 'array', 1, 0);
$list->add('', 'Mô tả');
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $row['sec_picture'] = get_picture_path($row['sec_picture'], 'small');
    $array_td = array('<td class="center" width="150"><img src="' . $row['sec_picture'] . '" /></td>', '<td class="center">' . $row['sec_name'] . '</td>', '<td class="center">' . ($row['sec_parent_id'] ? $sec_parent_id[$row['sec_parent_id']] : '') . '</td>', '<td class="center">' . $array_type[$row['sec_type']] . '</td>', '<td class="center">' . ($row['sec_body_system'] ? $array_he_co_quan[$row['sec_body_system']] : '') . '</td>', '<td width="500">' . $row['sec_desc'] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:listing.php

示例7: db_query

        FROM questions
        STRAIGHT_JOIN categories ON cat_id = que_cat_id
        WHERE que_id = ' . $que_id . ' AND que_type = 0 AND que_status = 1';
$db_query = new db_query($sql);
$detail_data = mysqli_fetch_assoc($db_query->result);
unset($db_query);
if (!$detail_data) {
    error_404_document();
}
$detail_data['link_hoidap'] = generate_qaa_url();
$detail_data['link_cat'] = generate_qaa_url($detail_data);
$detail_data['que_question_content'] = nl2br($detail_data['que_question_content']);
$detail_data['que_title'] = htmlspecialbo($detail_data['que_title']);
$datetime_facebook = $detail_data['que_date'];
$detail_data['que_date'] = date('d/m/Y H:i', $detail_data['que_date']);
$detail_data['que_image'] = get_picture_path($detail_data['que_image']);
//phân tag ra thành link search
if ($detail_data['que_tags']) {
    $detail_data['array_tag_search'] = array();
    $array_tag = explode(',', $detail_data['que_tags']);
    $array_tag = array_slice($array_tag, 0, 6);
    foreach ($array_tag as $key => $value) {
        $detail_data['array_tag_search'][] = array('tag_link' => '#', 'tag_name' => $value);
    }
}
$detail_data['facebook_share_link'] = 'http://khang.vn' . generate_hoidap_detail($detail_data);
$detail_data['facebook_social'] = array();
$detail_data['facebook_social']['like'] = get_facebook_like_button($detail_data['facebook_share_link']);
$detail_data['facebook_social']['comment'] = get_facebook_comment_frame($detail_data['facebook_share_link']);
$detail_data['facebook_social']['embed'] = get_facebook_embedded_post($detail_data['facebook_share_link']);
$rainTpl->assign('detail_data', $detail_data);
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:inc_hoidap_detail.php

示例8: getImagePath

 public function getImagePath()
 {
     return get_picture_path($this->name);
 }
开发者ID:virutmath,项目名称:crm_local,代码行数:4,代码来源:Image.php

示例9: db_query

        $db_query = new db_query('SELECT * FROM law WHERE law_link_cat LIKE "' . $domain . '%" LIMIT 1');
        $law_detail = mysqli_fetch_assoc($db_query->result);
        unset($db_query);
        if (!$law_detail) {
            break;
        }
        //lấy tin theo luật này
        $news_data = pre_cron_news_detail(array('lin_id' => 0, 'lin_url' => $url, 'lin_cat_id' => 0, 'law_detail_title' => $law_detail['law_detail_title'], 'law_detail_content' => $law_detail['law_detail_content'], 'law_detail_teaser' => $law_detail['law_detail_teaser'], 'law_detail_tag' => $law_detail['law_detail_tag'], 'law_detail_remove' => $law_detail['law_detail_remove']), 1);
        if (!$news_data['success']) {
            $return_json['success'] = 0;
            $return_json['error'] = $news_data['error'];
        } else {
            $return_json['success'] = 1;
            $return_json['title'] = $news_data['title'];
            $return_json['content'] = $news_data['content'];
            $return_json['teaser'] = $news_data['teaser'];
            $return_json['picture'] = $news_data['image'];
            $return_json['link_picture'] = get_picture_path($news_data['image']);
        }
        $return_json = json_encode($return_json);
        echo $return_json;
        break;
    case 'loadCatChild':
        $cat_id = getValue('value', 'int', 'POST', 0);
        $db = new db_query('SELECT * FROM cat_disease WHERE cdi_parent_id = ' . $cat_id);
        while ($row = mysqli_fetch_assoc($db->result)) {
            echo '<option value="' . $row['cdi_id'] . '">' . $row['cdi_name'] . '</option>';
        }
        break;
}
exit;
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:ajax.php

示例10: getValue

if (isset($_GET['cus_id'])) {
    $cus_id = getValue('cus_id', 'int', 'GET', 0);
    $ten_ma = 'Mã KH';
    $ten_nhom = 'Nhóm khách hàng';
    $name_object = 'Tên khách hàng';
    if ($cus_id == 0) {
        $name = 'Khách lẻ';
    }
    if ($cus_id != 0) {
        $db_custemor = new db_query('SELECT * FROM customers 
                                        INNER JOIN customer_cat ON customers.cus_cat_id = customer_cat.cus_cat_id
                                        WHERE cus_id = ' . intval($cus_id));
        $data_cus = mysqli_fetch_assoc($db_custemor->result);
        unset($db_custemor);
        $id = format_codenumber($data_cus['cus_id'], 6, 'KH');
        $avata = '<img src="' . get_picture_path($data_cus['cus_picture']) . '"/>';
        $name = $data_cus['cus_name'];
        $address = $data_cus['cus_address'];
        $phone = $data_cus['cus_phone'];
        $email = $data_cus['cus_email'];
        $team_obj = $data_cus['cus_cat_name'];
        $note = $data_cus['cus_note'];
    }
}
if (isset($_GET['user_id'])) {
    $user_id = getValue('user_id', 'int', 'GET', 0);
    $ten_ma = 'Mã NV';
    $ten_nhom = 'Nhóm nhân viên';
    $name_object = 'Tên nhà cung cấp';
    if ($user_id == 0) {
        $name = 'Không chọn nhân viên';
开发者ID:virutmath,项目名称:crm_local,代码行数:31,代码来源:form_detail_cus_use.php

示例11: prepare_pharma_record

function prepare_pharma_record(&$ss)
{
    if (isset($ss['pha_title']) && $ss['pha_title']) {
        $ss['pha_title'] = htmlspecialbo($ss['pha_title']);
    }
    if (isset($ss['pha_image']) && $ss['pha_image']) {
        $ss['pha_image'] = get_picture_path($ss['pha_image']);
    }
    $ss['link_detail'] = generate_tuthuoc_detail($ss);
    return $ss;
}
开发者ID:virutmath,项目名称:suckhoe,代码行数:11,代码来源:functions.php

示例12: rtrim

                     $sql_value .= '"' . $value . '",';
                 }
             }
         }
         $sql = rtrim($sql, ',') . ')' . rtrim($sql_value, ',') . ')';
         //insert vào database
         $db_insert = new db_execute($sql, 1, 0);
         //insert số lượng vào menu_products
         $sql_product = 'INSERT INTO menu_products (mep_menu_id, mep_product_id, mep_quantity) VALUES';
         foreach ($data_menu['menu_products'] as $value) {
             $sql_product .= '(' . $value['mep_menu_id'] . ',' . $value['mep_product_id'] . ', ' . $value['mep_quantity'] . '),';
         }
         $sql_product = rtrim($sql_product, ',');
         $db_insert = new db_execute($sql_product, 1, 0);
         unset($db_insert);
         $picture_path = get_picture_path($data_menu['men_image']);
         generate_dir_upload($data_menu['men_image'], 'organic');
         @copy($domain_server_url . $data_menu['men_image_path'], '..' . $picture_path);
         $array_return = array('success' => 1, 'data' => $data_menu, 'step' => $record + 1);
         echo json_encode($array_return);
     }
     break;
 case 'desk':
     $curl = curl_get_content($api_download_url, array('action' => 'getListDesk', 'username' => $admin, 'password' => $password, 'agency' => $agency_id));
     $data = json_decode($curl, 1);
     if (!isset($data['desk']) || !isset($data['section']) || !isset($data['service_desk'])) {
         http_response_code(404);
         die;
     }
     //insert dữ liệu
     //insert bảng service_desks và sections ở lần request đầu tiên
开发者ID:virutmath,项目名称:crm_local,代码行数:31,代码来源:install.php

示例13: db_query

     // lay ra ten kho
     $db_store = new db_query('SELECT cat_name FROM categories_multi
                                     WHERE cat_id = ' . $data_sup['bio_store_id']);
     $data_store = mysqli_fetch_assoc($db_store->result);
     unset($db_store);
     $store = $data_store['cat_name'];
     // lay ra ten nha cung cap
     $db_nhacc = new db_query('SELECT sup_image, sup_name FROM suppliers
                                     WHERE sup_id = ' . $data_sup['bio_supplier_id']);
     $data_nhacc = mysqli_fetch_assoc($db_nhacc->result);
     unset($db_nhacc);
     $nhacc = $data_nhacc['sup_name'];
     if ($data_nhacc['sup_image'] == '') {
         $avata = '<span class="ava-cus"><i class="fa fa-camera-retro fa-2x"></i></span><p>Không có hình</p>';
     } else {
         $avata = '<img src="' . get_picture_path($data_nhacc['sup_image']) . '"/>';
     }
 }
 $ngay_nhap = date('d-m-Y', $data_sup['bio_start_time']);
 $da_thanhtoan = $data_sup['bio_total_money'] - $data_sup['bio_money_debit'];
 if ($data_sup['bio_status'] == 0) {
     $thanhtoan = 'Còn nợ lại';
     $con_lai = $data_sup['bio_money_debit'];
     $ngay_hen_tra = date("d-m-Y", $data_sup['bio_date_debit']);
 } else {
     $thanhtoan = 'Thanh toán đủ';
 }
 ///// HTML
 $right_content .= '<div class="box-content-inf-bill">';
 $right_content .= '<div class="box-content-inf-bill-left"><form method="" action="">';
 $right_content .= '<p>Ngày nhập:</p><input name="" class="inp-cnkh text-right" readonly="readonly" value="' . $ngay_nhap . '"/>';
开发者ID:virutmath,项目名称:crm_local,代码行数:31,代码来源:bill_detail.php

示例14: getArrayMenu

 private function getArrayMenu($desk_id)
 {
     $sql_menu = 'SELECT *,uni_name AS men_unit
                  FROM current_desk_menu
                  LEFT JOIN menus ON men_id = cdm_menu_id
                  LEFT JOIN units ON uni_id = men_unit_id
                  WHERE cdm_desk_id = ' . $desk_id;
     $db_query = new db_query($sql_menu);
     $array_data = array();
     while ($row = mysqli_fetch_assoc($db_query->result)) {
         $row['men_image'] = $row['men_image'] ? get_picture_path($row['men_image']) : '';
         $array_data[] = $row;
     }
     return $array_data;
 }
开发者ID:virutmath,项目名称:crm_local,代码行数:15,代码来源:ajax.php

示例15: db_query

<?php

require_once '../home/config.php';
require_once '../classes/CurlClient.php';
require_once '../classes/MyLog.php';
$db_query = new db_query('SELECT * FROM news
                          LEFT JOIN news_detail ON new_id = ndt_id
                          WHERE new_uploaded = 0 LIMIT 1');
$news_data = mysqli_fetch_assoc($db_query->result);
if (!$news_data) {
    reload(3600 * 8);
    die('Hết tin để lấy');
}
$news_data['data_picture'] = '@' . $_SERVER['DOCUMENT_ROOT'] . get_picture_path($news_data['new_picture']);
$CurlClient = new CurlClient(10);
$username = 'admin';
$password = 'test1234';
$url_post = 'http://khang.vn/cron/get_news_local.php';
$CurlClient->setAuthenDigest($username, $password);
$response = $CurlClient->post($url_post, $news_data);
if ($response) {
    echo 'Up thành công tin ' . $response;
    //update tin đã upload thành công
    $db_ex = new db_execute('UPDATE news SET new_uploaded = 1 WHERE new_id = ' . $news_data['new_id']);
} else {
    echo 'Lỗi';
}
reload(3);
开发者ID:virutmath,项目名称:suckhoe,代码行数:28,代码来源:up_news.php


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