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


PHP Get::sprite_link方法代码示例

本文整理汇总了PHP中Get::sprite_link方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::sprite_link方法的具体用法?PHP Get::sprite_link怎么用?PHP Get::sprite_link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Get的用法示例。


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

示例1: metaCertificate

/**
 * @package  DoceboLms
 * @version  $Id: meta_certificate.php,v 1
 * @author	 Marco Valloni <marco [at] docebo [dot] com>
 */
function metaCertificate()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.table.php';
    $mod_perm = checkPerm('mod', true);
    $lang =& DoceboLanguage::createInstance('certificate', 'lms');
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $tb = new Table(Get::sett('visuItem'), $lang->def('_META_CERTIFICATE_CAPTION'), $lang->def('_META_CERTIFICATE_SUMMARY'));
    $tb->initNavBar('ini', 'link');
    $tb->setLink("index.php?modname=meta_certificate&amp;op=meta_certificate");
    $ini = $tb->getSelectedElement();
    $form = new Form();
    if (isset($_POST['toggle_filter'])) {
        unset($_POST['filter_text']);
    }
    //search query of certificates
    $query_certificate = "\r\n\tSELECT id_certificate, code, name, description\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate" . " WHERE meta = 1";
    if (isset($_POST['filter'])) {
        if ($_POST['filter_text'] !== '') {
            $query_certificate .= " AND ( name LIKE '%" . $_POST['filter_text'] . "%'" . " OR code LIKE '%" . $_POST['filter_text'] . "%' )";
        }
    }
    $query_certificate .= " ORDER BY id_certificate\r\n\tLIMIT {$ini}," . Get::sett('visuItem');
    $query_certificate_tot = "\r\n\tSELECT COUNT(*)\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_certificate";
    $re_certificate = sql_query($query_certificate);
    list($tot_certificate) = sql_fetch_row(sql_query($query_certificate_tot));
    $type_h = array('', '', '', 'image', 'image');
    $cont_h = array($lang->def('_CODE'), $lang->def('_NAME'), $lang->def('_DESCRIPTION'));
    if ($mod_perm) {
        $cont_h[] = Lang::t('_TEMPLATE', 'certificate');
    }
    $cont_h[] = '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_PREVIEW') . '" />';
    if ($mod_perm) {
        $cont_h[] = Get::img('standard/moduser.png', Lang::t('_TITLE_ASSIGN_META_CERTIFICATE', 'certificate'));
        $type_h[] = 'image';
        $cont_h[] = Get::sprite('subs_print', Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'));
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" ' . 'alt="' . $lang->def('_MOD') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" ' . 'alt="' . $lang->def('_DEL') . '"" />';
        $type_h[] = 'image';
    }
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    while (list($id_certificate, $code, $name, $descr) = sql_fetch_row($re_certificate)) {
        $title = strip_tags($name);
        $cont = array($code, $name, Util::cut($descr));
        if ($mod_perm) {
            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=elemmetacertificate&amp;id_certificate=' . $id_certificate . '" ' . 'title="' . Lang::t('_TEMPLATE', 'certificate') . '">' . Lang::t('_TEMPLATE', 'certificate') . '</a>';
        }
        $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=preview&amp;id_certificate=' . $id_certificate . '">' . '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_PREVIEW') . ' : ' . $title . '" /></a>';
        if ($mod_perm) {
            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=assign&amp;id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_TITLE_ASSIGN_META_CERTIFICATE') . ' : ' . $name . '">' . Get::img('standard/moduser.png', Lang::t('_TITLE_ASSIGN_META_CERTIFICATE', 'certificate')) . '</a>';
            /*
            			$cont[] =	'<a href="index.php?modname=meta_certificate&amp;op=create&amp;id_certificate='.$id_certificate.'" '
            						.'title="'.$lang->def('_TITLE_CREATE_META_CERTIFICATE').' : '.$name.'">'
            						.Get::img('course/certificate.png', Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'))
            						.'</a>';*/
            $cont[] = Get::sprite_link('subs_print', 'index.php?modname=meta_certificate&amp;op=create&amp;id_certificate=' . $id_certificate, Lang::t('_TITLE_CREATE_META_CERTIFICATE', 'certificate'));
            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=modmetacertificate&amp;id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $title . '" /></a>';
            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=delmetacertificate&amp;id_certificate=' . $id_certificate . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $title . '" /></a>';
        }
        $tb->addBody($cont);
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=delmetacertificate]');
    if ($mod_perm) {
        $tb->addActionAdd('<a class="ico-wt-sprite subs_add" href="index.php?modname=meta_certificate&amp;op=addmetacertificate" title="' . $lang->def('_NEW_CERTIFICATE') . '"><span>' . $lang->def('_NEW_CERTIFICATE') . '</span></a>');
    }
    $out->add(getTitleArea($lang->def('_TITLE_META_CERTIFICATE'), 'certificate') . '<div class="std_block">');
    $out->add($form->openForm('certificate_filter', 'index.php?modname=meta_certificate&amp;op=meta_certificate') . '<div class="quick_search_form">
			<div>
				<div class="simple_search_box">' . Form::getInputTextfield("search_t", "filter_text", "filter_text", Get::req('filter_text', DOTY_MIXED, ''), '', 255, '') . Form::getButton("filter", "filter", Lang::t('_SEARCH', 'standard'), "search_b") . Form::getButton("toggle_filter", "toggle_filter", Lang::t('_RESET', 'standard'), "reset_b") . '</div>
			</div>
		</div>' . $form->closeForm());
    if (isset($_GET['result'])) {
        switch ($_GET['result']) {
            case "ok":
                $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                break;
            case "err":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
            case "err_del":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
        }
    }
    $out->add($tb->getTable() . $tb->getNavBar($ini, $tot_certificate) . '</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:97,代码来源:meta_certificate.php

示例2: view_report_certificate


//.........这里部分代码省略.........
    } else {
        $back_ui = getBackUi('index.php?modname=certificate&amp;op=report_certificate&amp;id_certificate=' . (int) $id_certificate, $lang->def('_BACK'));
        $out->add(getTitleArea(array('index.php?modname=certificate&amp;op=certificate' => $lang->def('_TITLE_CERTIFICATE'), 'index.php?modname=certificate&amp;op=report_certificate&amp;id_certificate=' . (int) $id_certificate => $lang->def('_COURSES'), $lang->def('_CERTIFICATE_VIEW_CAPTION')), 'certificate'));
    }
    $out->add('<div class="std_block">' . $back_ui);
    $numrows = sql_num_rows($res);
    $downloadables = array();
    if ($numrows > 0) {
        $clang =& DoceboLanguage::CreateInstance('course', 'lms');
        $type_h = array('image', '', '', '', '', '', '', 'image', 'image');
        $cont_h = array('', $lang->def('_USERNAME'), $lang->def('_LASTNAME'), $lang->def('_FIRSTNAME'), $clang->def('_STATUS'), $lang->def('_DATE'), $lang->def('_RELASE_DATE'), Get::sprite('subs_pdf', Lang::t('_TITLE_VIEW_CERT', 'certificate')), Get::sprite('subs_del', Lang::t('_DEL', 'certificate')));
        $tb->setColsStyle($type_h);
        $tb->addHead($cont_h);
        $acl_man =& $GLOBALS['current_user']->getAclManager();
        $arr_status = array(_CUS_CONFIRMED => $clang->def('_USER_STATUS_CONFIRMED'), _CUS_SUBSCRIBED => $clang->def('_USER_STATUS_SUBS'), _CUS_BEGIN => $clang->def('_USER_STATUS_BEGIN'), _CUS_END => $clang->def('_USER_STATUS_END'), _CUS_SUSPEND => $clang->def('_USER_STATUS_SUSPEND'));
        //foreach($report_info as $info_report)
        while ($info = sql_fetch_assoc($res)) {
            $cont = array();
            $can_assign = (bool) ($info['on_date'] == '');
            $input_id = $info['id_user'];
            $sel_cell_content = '';
            $label_open = '';
            $label_close = '';
            if ($can_assign) {
                $input = '<input type="hidden" id="selection_' . $input_id . '" name="selection[' . $input_id . ']" value="' . $input_id . '"/> ';
                if (in_array($input_id, $total_selection)) {
                    $checked = ' checked="checked"';
                } else {
                    $checked = '';
                }
                $sel_cell_content .= $input . '<input type="checkbox" id="selected_' . $input_id . '" name="selected[' . $input_id . ']" value="' . $input_id . '"' . $checked . '/>';
                $label_open = '<label for="selected_' . $input_id . '">';
                $label_close = '</label>';
            }
            $userid = $acl_man->relativeId($info['userid']);
            $cont[] = $sel_cell_content;
            $cont[] = $label_open . ($search_filter != '' ? highlightText($userid, $search_filter) : $userid) . $label_close;
            $cont[] = $label_open . ($search_filter != '' ? highlightText($info['lastname'], $search_filter) : $info['lastname']) . $label_close;
            $cont[] = $label_open . ($search_filter != '' ? highlightText($info['firstname'], $search_filter) : $info['firstname']) . $label_close;
            $cont[] = $arr_status[$info['status']];
            $cont[] = $info['date_complete'];
            $cont[] = $info['on_date'];
            $url = 'index.php?modname=certificate&amp;certificate_id=' . $id_certificate . '&amp;course_id=' . $id_course . '&amp;user_id=' . $info['id_user'];
            $dl_url = $url . "&amp;op=send_certificate";
            if ($can_assign) {
                $downloadables[] = 'dl_single_' . $input_id;
            }
            $cont[] = $can_assign ? '<a id="dl_single_' . $input_id . '" class="ico-wt-sprite subs_pdf" href="javascript:;" title="' . $lang->def('_GENERATE') . '"><span>' . $lang->def('_GENERATE') . '</span></a>' : '<a id="dl_single_' . $input_id . '" class="ico-wt-sprite subs_pdf" href="' . $dl_url . '" title="' . $lang->def('_DOWNLOAD') . '"><span>' . $lang->def('_DOWNLOAD') . '</span></a>';
            $cont[] = $can_assign ? '' : Get::sprite_link('subs_del', $url . '&amp;op=del_report_certificate', Lang::t('_DEL', 'certificate'));
            $tb->addBody($cont);
        }
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=del_report_certificate]');
        //search filter ...
        $release_options = array($lang->def('_ALL') => 0, $lang->def('_RELEASED') => 1, $lang->def('_TO_RELEASE') => 2);
        //search and store all non-available certificates
        $all_selection = array();
        $query = "SELECT cu.idUser as id_user " . " FROM ( " . $tu . " JOIN " . $tcu . " ON (u.idst = cu.idUser) ) LEFT JOIN " . $tca . " " . " ON ( ca.id_course = cu.idCourse AND ca.id_user=cu.idUser ) " . " WHERE (ca.id_certificate='" . (int) $id_certificate . "' OR ca.id_certificate IS NULL) AND " . $aval_status . " " . " AND cu.idCourse='" . (int) $id_course . "' " . ($search_filter != '' ? " AND (u.userid LIKE '%" . $search_filter . "%' OR u.lastname LIKE '%" . $search_filter . "%' OR u.firstname LIKE '%" . $search_filter . "%') " : "") . " AND ca.on_date IS NULL ";
        $res = sql_query($query);
        while (list($id_user) = sql_fetch_row($res)) {
            $all_selection[] = $id_user;
        }
        //---
        $form = new Form();
        $submit_url = "index.php?modname=certificate&amp;op=view_report_certificate&amp;id_certificate=" . (int) $id_certificate . "&amp;id_course=" . (int) $id_course;
        $out->add($form->openForm("certificates_emission", $submit_url) . $form->getHidden('old_selection', 'old_selection', implode(',', $total_selection)) . $form->getHidden('all_selection', 'all_selection', implode(',', $all_selection)) . $form->getHidden('active_text_filter', 'active_text_filter', $search_filter) . $form->getHidden('active_only_released', 'active_only_released', $only_released) . $form->getHidden('active_ini', 'active_ini', $ini_param) . '<div class="quick_search_form">' . '<div class="simple_search_box">' . Form::getInputTextfield("search_t", "filter", "filter", $search_filter, '', 255, '') . Form::getButton("search_button", "search_button", Lang::t('_SEARCH', 'standard'), "search_b") . Form::getButton("reset_button", "reset_button", Lang::t('_RESET', 'standard'), "reset_b") . '</div>' . '<a id="advanced_search" class="advanced_search" href="javascript:;">' . Lang::t("_ADVANCED_SEARCH", 'standard') . '</a>' . '<div id="certificate_release_as" class="advanced_search_options" style="display: ' . ($only_released != 0 ? 'block' : 'none') . '">' . Form::getRadioHoriz(Lang::t('_FILTER', 'certificate'), 'only_released', 'only_released', $release_options, $only_released) . '</div>' . '</div>' . '<script type="text/javascript">' . 'YAHOO.util.Event.addListener("advanced_search", "click", function(e){
				var el = YAHOO.util.Dom.get("certificate_release_as");
				if (el.style.display != \'block\') el.style.display = \'block\';
				else el.style.display = \'none\';
			});' . '</script>', 'content');
        $delgen_url = 'index.php?modname=certificate&amp;op=del_gen_certificate' . '&amp;id_certificate=' . (int) $id_certificate . '&amp;id_course=' . (int) $id_course;
        $delgen_txt = Lang::t('_DELETE_ALL_GENERATED', 'certificate');
        $print_button_1 = '<div>' . '<a id="print_selected_button_1" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a>' . '</div>';
        $print_button_2 = '<div><a id="print_selected_button_2" href="javascript:;">' . Get::img('course/certificate.png', Lang::t('_GENERATE_ALL_SELECTED', 'certificate')) . Lang::t('_GENERATE_ALL_SELECTED', 'certificate') . '</a>' . '</div>';
        $print_button_1 .= Lang::t('_SELECT', 'directory') . ': ';
        $print_button_2 .= Lang::t('_SELECT', 'directory') . ': ';
        /*	
        		$print_button_1 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="select_page_1">'.Lang::t('_SELECT_PAGE', 'standard').'</a>';
        		$print_button_2 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="select_page_2">'.Lang::t('_SELECT_PAGE', 'standard').'</a>';
        		$print_button_1 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="unselect_page_1">'.Lang::t('_UNSELECT_PAGE', 'standard').'</a>';
        		$print_button_2 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="unselect_page_2">'.Lang::t('_UNSELECT_PAGE', 'standard').'</a>';
        */
        $print_button_1 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="select_all_1">' . Lang::t('_ALL_PAGES', 'directory') . '</a>';
        $print_button_2 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="select_all_2">' . Lang::t('_ALL_PAGES', 'directory') . '</a>';
        $print_button_1 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="unselect_all_1">' . Lang::t('_NONE', 'directory') . '</a>';
        $print_button_2 .= '&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="unselect_all_2">' . Lang::t('_NONE', 'directory') . '</a>';
        $navbar = $tb->getNavBar($ini, $totalrows);
        $out->add($print_button_1 . '<br />' . $navbar . $tb->getTable() . $navbar . '<br />' . $print_button_2);
        $out->add($form->closeForm());
    } else {
        $out->add($lang->def('_NO_CONTENT'));
    }
    $out->add($back_ui . '</div>');
    addCss('style_menu', 'lms');
    Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/admin/modules/certificate/certificate.js?rnd=' . time(), true, true);
    //addJs($GLOBALS['where_lms_relative'].'/admin/modules/certificate/', 'certificate.js');
    $script = 'var ajax_url="ajax.adm_server.php?plf=lms&mn=certificate"; var _STOP="' . $lang->def('_STOP') . '"; ' . 'var glob_id_certificate = ' . (int) $id_certificate . ', glob_id_course = ' . (int) $id_course . ';' . 'var single_list = [' . (count($downloadables) ? '"' . implode('","', $downloadables) . '"' : '') . ']; ' . 'var reload_url = "' . str_replace('&amp;', '&', isset($submit_url) ? $submit_url : '') . '", ' . '_ERROR_PARSE = "' . $lang->def('_OPERATION_FAILURE') . '", _SUCCESS = "' . $lang->def('_OPERATION_SUCCESSFUL') . '", ' . '_AREYOUSURE="' . Lang::t('_AREYOUSURE', 'standard') . '";';
    $out->add('<script type="text/javascript">' . $script . '</script>', 'page_head');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:certificate.php


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