本文整理汇总了PHP中get_image_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_image_url函数的具体用法?PHP get_image_url怎么用?PHP get_image_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_image_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: documents_handle_on_build_menu
/**
* Build menu
*
* @param Menu $menu
* @param User $user
* @return array
*/
function documents_handle_on_build_menu(&$menu, &$user)
{
if ($user->isAdministrator() || $user->getSystemPermission('can_use_documents')) {
$menu->addToGroup(array(new MenuItem('documents', lang('Docs'), assemble_url('documents'), get_image_url('icon.gif', DOCUMENTS_MODULE))), 'main');
}
// if
}
示例2: smarty_function_object_visibility
/**
* Show object visibility if it's private
*
* @param array $params
* @param Smarty $smarty
* @return string
*/
function smarty_function_object_visibility($params, &$smarty)
{
static $ids = array();
$object = array_var($params, 'object');
if (!instance_of($object, 'ProjectObject')) {
return new InvalidParamError('object', $object, '$object is not valid instance of ProjectObject class', true);
}
// if
if ($object->getVisibility() > VISIBILITY_PRIVATE) {
return '';
}
// if
$user = array_var($params, 'user');
if (!instance_of($user, 'User')) {
return new InvalidParamError('user', $user, '$user is expected to be an instance of User class', true);
}
// if
if (!$user->canSeePrivate()) {
return '';
}
// if
$id = array_var($params, 'id');
if (empty($id)) {
do {
$id = 'object_visibility_' . make_string(40);
} while (in_array($id, $ids));
}
// if
$ids[] = $id;
return open_html_tag('a', array('href' => assemble_url('project_object_visibility', array('project_id' => $object->getProjectId(), 'object_id' => $object->getId())), 'title' => lang('Private :type', array('type' => Inflector::humanize($object->getType()))), 'class' => 'object_visibility', 'id' => $id)) . '<img src="' . get_image_url('private.gif') . '" alt="" /></a><script type="text/javascript">App.widgets.ObjectVisibility.init("' . $id . '");</script>';
}
示例3: timetracking_handle_on_build_menu
/**
* Add options to main menu
*
* @param Menu $menu
* @param User $user
* @return null
*/
function timetracking_handle_on_build_menu(&$menu, &$user)
{
if ($user->isAdministrator() || $user->getSystemPermission('use_time_reports')) {
$menu->addToGroup(array(new MenuItem('time', lang('Time'), 'https://www.healingcrystals.com/admin/timeSheets.php', get_image_url('navigation/time.gif'))), 'main');
}
// if
}
示例4: smarty_function_object_user_star
/**
* Render star for a given user page
*
* @param array $params
* @param Smarty $smarty
* @return string
*/
function smarty_function_object_user_star($params, &$smarty)
{
static $ids = array();
$starred_user_id = array_var($params, 'starred_user_id');
$starred_page_type = array_var($params, 'starred_page_type');
$starred_by_user_id = array_var($params, 'starred_by_user_id');
$project_id = array_var($params, 'project_id');
$id = array_var($params, 'id');
if (empty($id)) {
do {
$id = 'object_star_' . make_string(40);
} while (in_array($id, $ids));
}
// if
$ids[] = $id;
$link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME, $link);
$query = "select * from healingcrystals_starred_user_pages where starred_by_user_id='" . $starred_by_user_id . "' and starred_user_id='" . $starred_user_id . "' and starred_page_type='" . $starred_page_type . "'";
$result = mysql_query($query);
$is_starred = false;
if (mysql_num_rows($result)) {
$is_starred = true;
}
mysql_close($link);
if ($is_starred) {
$params = array('id' => $id, 'href' => assemble_url('unstar_user_' . $starred_page_type . '_page', array('project_id' => $project_id, 'user_id' => $starred_by_user_id)) . '&starred_user_id=' . $starred_user_id, 'title' => lang('Unstar this object'), 'class' => 'object_star');
$result = open_html_tag('a', $params) . '<img src="' . get_image_url('icons/star-small.gif') . '" alt="" /></a>';
} else {
$params = array('id' => $id, 'href' => assemble_url('star_user_' . $starred_page_type . '_page', array('project_id' => $project_id, 'user_id' => $starred_by_user_id)) . '&starred_user_id=' . $starred_user_id, 'title' => lang('Star this object'), 'class' => 'object_star');
$result = open_html_tag('a', $params) . '<img src="' . get_image_url('icons/unstar-small.gif') . '" alt="" /></a>';
}
// if
return $result . "\n<script type=\"text/javascript\">App.layout.init_star_unstar_link('" . $id . "')</script>";
}
示例5: invoicing_handle_on_company_options
/**
* Handle on_company_options event
*
* @param Company $company
* @param NamedList $options
* @param User $logged_user
* @return null
*/
function invoicing_handle_on_company_options(&$company, &$options, &$logged_user)
{
if (Invoice::canAccessCompanyInvoices($logged_user, $company)) {
$options->add('invoices', array('text' => lang('Invoices'), 'url' => assemble_url('people_company_invoices', array('company_id' => $company->getId())), 'icon' => get_image_url('company-invoices.gif', INVOICING_MODULE)));
}
// if
}
示例6: ckUpload
public function ckUpload()
{
$funcNum = $this->input->get_post('CKEditorFuncNum');
$thumbimage_config = $this->config->item('thumbimage');
$widths = $thumbimage_config['thumb_width'];
// 需要处理的图片宽度尺寸
$heights = $thumbimage_config['thumb_height'];
// 需要处理的图片高度尺寸
$path = '/uploads/ck/';
$config['upload_path'] = '.' . $path;
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '2048';
$config['max_width'] = '0';
$config['max_height'] = '0';
$config['encrypt_name'] = TRUE;
//检查并创建目录
create_folders($config['upload_path']);
$this->load->library('upload', $config);
$field_name = "upload";
if (!$this->upload->do_upload($field_name)) {
$message = $this->upload->display_errors();
} else {
$upload_data = $this->upload->data();
$url = get_image_url($path . $upload_data['file_name']);
}
echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction({$funcNum}, '{$url}', '{$message}');</script>";
}
示例7: system_handle_on_build_menu
function system_handle_on_build_menu(&$menu, &$user, &$project = null)
{
//EOF:task_1260
// ---------------------------------------------------
// Tools
// ---------------------------------------------------
//BOF:task_1260
/*if (is_null($project)){
$my_tickets_menu = new MenuItem('today', lang('My Tickets'), assemble_url('user_today_page'), get_image_url('navigation/today.png'));
} else {
$my_tickets_menu = new MenuItem('today', lang('My Tickets'), assemble_url('project_user_today_page', array('project_id' => $project->getId(), 'user_id' => $user->getId())), get_image_url('navigation/today.png'));
}*/
//EOF:task_1260
$menu->addToGroup(array(new MenuItem('tasks', lang('My Tasks'), assemble_url('goto_user_task_page', array('project_id' => TASK_LIST_PROJECT_ID)) . '&selected_user_id=' . $user->getId(), get_image_url('navigation/today.png')), new MenuItem('calendar', lang('Calendar'), Calendar::getDashboardCalendarUrl(), get_image_url('navigation/calendar.gif')), new MenuItem('projects', lang('Projects'), assemble_url('projects'), get_image_url('navigation/projects.gif')), new MenuItem('people', lang('People'), assemble_url('people'), get_image_url('navigation/people.gif'))), 'main');
// ---------------------------------------------------
// Folders
// ---------------------------------------------------
$folders = array(new MenuItem('search', lang('Search'), assemble_url('quick_search'), get_image_url('navigation/search.gif')), new MenuItem('starred_folder', lang('Starred'), assemble_url('starred'), get_image_url('navigation/starred.gif')));
if ($user->isAdministrator() || $user->getSystemPermission('manage_trash')) {
$folders[] = new MenuItem('trash', lang('Trash'), assemble_url('trash'), get_image_url('navigation/trash.gif'));
}
// if
$folders[] = new MenuItem('quick_add', lang('Quick Add'), assemble_url('homepage'), get_image_url('navigation/quick_add.gif'), null, '+');
$menu->addToGroup($folders, 'folders');
}
示例8: incoming_mail_handle_on_build_menu
/**
* Build menu
*
* @param Menu $menu
* @param User $user
* @return array
*/
function incoming_mail_handle_on_build_menu(&$menu, &$user)
{
if (($user->isAdministrator() || $user->getSystemPermission('can_use_incoming_mail_frontend')) && ($count_pending = IncomingMails::countPending()) > 0) {
$menu->addToGroup(array(new MenuItem('incoming_mail', lang('Inbox'), assemble_url('incoming_mail'), get_image_url('icon_menu.gif', INCOMING_MAIL_MODULE), $count_pending)), 'main');
}
// if
}
示例9: resources_handle_on_dashboard_important_section
/**
* Handle on_dashboard_important_section event
*
* @param NamedList $items
* @param User $user
* @return null
*/
function resources_handle_on_dashboard_important_section(&$items, &$user)
{
if ($reminders_count = Reminders::countActiveByUser($user)) {
$items->add('reminders', array('label' => $reminders_count > 1 ? lang('<strong>:count</strong> reminders', array('count' => $reminders_count)) : lang('<strong>:count</strong> reminder', array('count' => $reminders_count)), 'class' => 'reminders', 'icon' => get_image_url('important.gif'), 'url' => assemble_url('reminders')));
}
// if
}
示例10: calendar_handle_on_user_options
/**
* Return array of options $logged_user can do to $user account
*
* @param User $user
* @param NamedList $options
* @param User $logged_user
* @return null
*/
function calendar_handle_on_user_options(&$user, &$options, &$logged_user)
{
if (can_access_profile_calendar($logged_user, $user)) {
$options->add('calendar', array('text' => lang('Schedule'), 'icon' => get_image_url('gray-calendar.gif'), 'url' => Calendar::getProfileCalendarUrl($user)));
}
// if
}
示例11: invoicing_handle_on_time_report_footer_options
/**
* on_time_report_footer_options event handler implementation
*
* @param TimeReport $report
* @param array $options
* @param Project $project
* @param User $user
* @return null
*/
function invoicing_handle_on_time_report_footer_options(&$report, &$options, &$project, &$user)
{
if (Invoice::canAdd($user)) {
$options[] = array('url' => instance_of($project, 'Project') ? assemble_url('invoices_add', array('time_report_id' => $report->getId(), 'project_id' => $project->getId())) : assemble_url('invoices_add', array('time_report_id' => $report->getId())), 'text' => lang('New Invoice'), 'icon' => get_image_url('create-invoice.gif', INVOICING_MODULE));
}
// if
}
示例12: getGoodsList
public function getGoodsList($Page, $where)
{
$goods = $this->where($where)->order('`sort` DESC,goods_id DESC')->limit($Page->firstRow . ',' . $Page->listRows)->select();
foreach ($goods as $k => $v) {
$goods[$k]['pic_url'] = get_image_url($v['pic_url']);
}
return $goods;
}
示例13: status_handle_on_build_menu
/**
* Build menu
*
* @param Menu $menu
* @param User $user
* @return array
*/
function status_handle_on_build_menu(&$menu, &$user)
{
if ($user->isAdministrator() || $user->getSystemPermission('can_use_status_updates')) {
$last_visit = UserConfigOptions::getValue('status_update_last_visited', $user);
$menu->addToGroup(array(new MenuItem('status', lang('Status'), assemble_url('status_updates'), get_image_url('icon_menu.gif', STATUS_MODULE), StatusUpdates::countNewMessagesForUser($user, $last_visit))), 'main');
}
// if
}
示例14: shortcode_gallery
function shortcode_gallery($atts)
{
$ids = explode(',', $atts['ids']);
$pairs = [];
foreach ($ids as $id) {
$pairs[get_image_url($id)] = get_image_url($id, 'large');
}
return renderLatteToString(__DIR__ . '/gallery.latte', ['pairs' => $pairs]);
}
示例15: smarty_function_snooze_task_reminder
/**
* Render snooze task reminder widget
*
* @param array $params
* @param Smarty $smarty
* @return string
*/
function smarty_function_snooze_task_reminder($params, &$smarty)
{
$object = array_var($params, 'object');
if (!instance_of($object, 'ProjectObject')) {
return new InvalidParamError('$object', $object, '$object is expected to be a valid instance of ProjectObject class');
}
// if
return '<span class="option"><a href="' . assemble_url('project_task_snoozereminder', array('project_id' => $object->getProjectId(), 'task_id' => $object->getId())) . '" onclick="javascript:return false;"><img id="snooze_' . $object->getId() . '" src="' . get_image_url('gray-clock-small.gif') . '" alt="Snooze Reminder" title="Snooze Reminder" /></a></span>';
}