本文整理汇总了PHP中icon函数的典型用法代码示例。如果您正苦于以下问题:PHP icon函数的具体用法?PHP icon怎么用?PHP icon使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了icon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_polls
/**
* display available polls
* @global type $course_id
* @global type $course_code
* @global type $urlServer
* @global type $tool_content
* @global type $id
* @global type $langPollNone
* @global type $langQuestionnaire
* @global type $langChoice
* @global type $langAddModulesButton
*/
function list_polls() {
global $course_id, $course_code, $urlServer, $tool_content, $id,
$langPollNone, $langQuestionnaire, $langChoice, $langAddModulesButton;
$result = Database::get()->queryArray("SELECT * FROM poll WHERE course_id = ?d AND active = 1", $course_id);
$pollinfo = array();
foreach ($result as $row) {
$pollinfo[] = array(
'id' => $row->pid,
'title' => $row->name,
'active' => $row->active);
}
if (count($pollinfo) == 0) {
$tool_content .= "<div class='alert alert-warning'>$langPollNone</div>";
} else {
$tool_content .= "<form action='insert.php?course=$course_code' method='post'>" .
"<input type='hidden' name='id' value='$id'>" .
"<table class='table-default'>" .
"<tr class='list-header'>" .
"<th class='text-left'> $langQuestionnaire</th>" .
"<th style='width:20px;' class='text-center'>$langChoice</th>" .
"</tr>";
foreach ($pollinfo as $entry) {
$tool_content .= "<tr>";
$tool_content .= "<td> ".icon('fa-question')." <a href='${urlServer}modules/questionnaire/pollresults.php?course=$course_code&pid=$entry[id]'>" . q($entry['title']) . "</a></td>";
$tool_content .= "<td class='text-center'><input type='checkbox' name='poll[]' value='$entry[id]'></td>";
$tool_content .= "</tr>";
}
$tool_content .= "</table>";
$tool_content .= "<div class='text-right'>";
$tool_content .= "<input class='btn btn-primary' type='submit' name='submit_poll' value='$langAddModulesButton'></div></form>";
}
}
示例2: fileUploadBlock
public static function fileUploadBlock()
{
if (self::$invalid) {
return;
}
i18n::set('admin');
$uploader = new Uploader('editFiles', 'EditPage::handleUpload', false, array('multi' => true));
queue_js_string("/*\$(function(){\$('.view-uploads').overlay({\n\tmask: {\n\t\tcolor: '#000',\n\t\tloadSpeed: 200,\n\t\topacity: 0.7\n\t},\n\n\tcloseOnClick: true\n});});*/");
$uploadedButton = sprintf("<a href='#' class='action view-uploads' rel='#cc_uploaded_overlay'>%s%s</a>", icon('folder_picture'), __('admin', 'view-all-files'));
$uploadedFiles = <<<EOT
<div class="cc_uploaded_files">
{$uploadedButton}
\t<div id="cc_uploaded_overlay" class="cc_modal">
\t\t<h2>%s</h2>
\t\t<ul class="cc_file_list">
\t\t\t%s
\t\t</ul>
\t</div>
</div>
EOT;
//foreach(Uploads::getAllFiles() as $)
$r .= sprintf("<h3>%s</h3>%s%s", __('upload-files'), sprintf($uploadedFiles, __('uploaded-files'), $files), $uploader->createHTML());
i18n::restore();
return $r;
}
示例3: contact_info
function contact_info($contactid, $email, $name)
{
global $strUnknown;
//$info .= "<span style='float:right;'>".gravatar($email, 16) . '</span>';
if (!empty($contactid)) {
$info .= "<a href='contact.php?id={$contactid}'>";
$info .= icon('contact', 16);
$info .= "</a>";
} else {
$info .= icon('email', 16);
}
$info .= ' ';
if (!empty($email)) {
$info .= "<a href=\"mailto:{$email}\" class='info'>";
}
if (!empty($name)) {
$info .= "{$name}";
} elseif (!empty($email)) {
$info .= "{$email}";
} else {
$info .= "{$strUnknown}";
}
if (!empty($email)) {
$info .= "<span>" . gravatar($email, 50, FALSE);
$info .= "{$email}";
$info .= "</span>";
$info .= "</a>";
}
if (!empty($contactid)) {
$info .= " (" . contact_site($contactid) . ")";
}
return $info;
}
示例4: lists
function lists()
{
$this->load->library(array('pagination', 'querystring'));
$this->load->helper('admin');
$param =& $this->querystring;
$page = $this->uri->segment(5, 1);
$sst = $param->get('sst', 'gr_id');
$sod = $param->get('sod', 'asc');
$sfl = $param->get('sfl');
$stx = $param->get('stx');
$config['suffix'] = $param->output();
$config['base_url'] = RT_PATH . '/' . ADM_F . '/boardgroup/lists/page/';
$config['per_page'] = 15;
$offset = ($page - 1) * $config['per_page'];
$result = $this->Boardgroup_model->list_result($sst, $sod, $sfl, $stx, $config['per_page'], $offset);
$config['total_rows'] = $result['total_cnt'];
$this->pagination->initialize($config);
$list = array();
$token = get_token();
foreach ($result['qry'] as $i => $row) {
$list[$i] = new stdClass();
$list[$i]->bo_cnt = $row['bo_cnt'];
$list[$i]->id = $row['gr_id'];
$list[$i]->subject = $row['gr_subject'];
$list[$i]->admin = $row['gr_admin'];
$list[$i]->s_mod = icon('수정', 'boardgroup/form/u/' . $row['gr_id']);
$list[$i]->s_del = icon('삭제', "javascript:post_send('" . ADM_F . "/_trans/boardgroup/delete', {gr_id:'" . $row['gr_id'] . "', token:'" . $token . "'}, true);");
}
$head = array('title' => '게시판그룹관리');
$data = array('token' => $token, 'list' => $list, 's_add' => icon('작성', 'boardgroup/form'), 'sfl' => $sfl, 'stx' => $stx, 'total_cnt' => number_format($result['total_cnt']), 'paging' => $this->pagination->create_links(), 'sort_gr_id' => $param->sort('gr_id', 'desc'), 'sort_gr_subject' => $param->sort('gr_subject'), 'sort_gr_admin' => $param->sort('gr_admin'));
widget::run('head', $head);
$this->load->view(ADM_F . '/boardgroup_list', $data);
widget::run('tail');
}
示例5: index
public function index($start = 0)
{
$this->load->library("admin");
$this->session->set_userdata("URL_BACK", uri_string());
$items = ITEMS_POR_PAG;
$this->load->library("admin");
$items_lista = crearConsulta("SELECT p FROM " . $this->entityStr . " p");
$this->load->library('pagination');
$config['base_url'] = site_url($this->ctrlPath . "/index");
$config['total_rows'] = count($items_lista->execute());
$config['per_page'] = $items;
$config['uri_segment'] = 3;
//1->Controlador, 2->Metodo, 3 en adelante son los argumentos
$this->pagination->initialize($config);
$items_lista->setMaxResults($items)->setFirstResult($start);
$this->admin->listado($items_lista->execute());
$this->admin->campos($this->camposTabla);
$this->admin->id("id");
$this->admin->titulos($this->titulosTabla);
if ($this->accionesDefault) {
$this->acciones = array("agregar" => array("url" => $this->ctrlPath . "agregar"), "editar" => array("url" => $this->ctrlPath . "/editar", "texto" => icon("fa-pencil") . " Editar", "propiedades" => array("class" => "btn-primary")), "eliminar" => array("texto" => i("", array("class" => "glyphicon glyphicon-remove")) . " Eliminar", "url" => $this->ctrlPath . "/eliminar", "propiedades" => array("class" => "eliminar_link btn-danger")));
}
$this->admin->acciones($this->acciones);
if ($this->vistaPre !== NULL) {
$this->admin->agregarVistaPre($this->vistaPre, $this->datosPre);
}
$this->admin->titulo($this->tituloMaestro);
$this->admin->show();
}
示例6: wlist
function wlist()
{
$lines = null;
$args = func_get_args();
switch ($args[0]) {
case 'scan':
if ($elements = scan_dir($args[2]['path'], 'DIR')) {
foreach ($elements as $value) {
if (is_file($args[2]['path'] . $value . $args[2]['find'])) {
$about = @parse_ini_file($args[2]['path'] . $value . '/protocol/about.gl.php');
$name = $about['product'] ? $about['product'] : $value;
$lines[$name] = $args[3] ? href(THIS, $args[3], $value) : href($value);
unset($about);
}
}
}
break;
default:
if (is_array($args[2])) {
foreach ($args[2] as $link => $name) {
$lines[$link] = href(THIS, $args[3], $name);
}
}
break;
}
//Выводим массив ссылок ;)
if ($lines) {
foreach ($lines as $name => $link) {
form("label", icon($args[1]) . '<a href="' . $link . '">' . $name . '</a>');
}
} else {
html('<br> Wlist lib. (C) Kazin Fedor, 2010');
}
}
示例7: list_lps
/**
* @brief display list of available learning paths (if any)
* @global type $id
* @global type $course_id
* @global type $tool_content
* @global type $urlServer
* @global type $langComments
* @global type $langAddModulesButton
* @global type $langChoice
* @global type $langNoLearningPath
* @global type $langLearningPaths
* @global type $course_code
*/
function list_lps()
{
global $id, $course_id, $tool_content, $urlServer, $langComments, $langAddModulesButton, $langChoice, $langNoLearningPath, $langLearningPaths, $course_code;
$result = Database::get()->queryArray("SELECT * FROM lp_learnPath WHERE course_id = ?d ORDER BY name", $course_id);
$lpinfo = array();
foreach ($result as $row) {
$lpinfo[] = array('id' => $row->learnPath_id, 'name' => $row->name, 'comment' => $row->comment, 'visible' => $row->visible, 'rank' => $row->rank);
}
if (count($lpinfo) == 0) {
$tool_content .= "<div class='alert alert-warning'>{$langNoLearningPath}</div>";
} else {
$tool_content .= "<form action='insert.php?course={$course_code}' method='post'>" . "<input type='hidden' name='id' value='{$id}'>" . "<table class='table-default'>" . "<tr>" . "<th><div align='left'> {$langLearningPaths}</div></th>" . "<th><div align='left'>{$langComments}</div></th>" . "<th width='80'>{$langChoice}</th>" . "</tr>";
foreach ($lpinfo as $entry) {
if ($entry['visible'] == 0) {
$vis = 'invisible';
} else {
$vis = '';
}
$tool_content .= "<tr class='{$vis}'>";
$tool_content .= "<td> " . icon('fa-ellipsis-h') . " <a href='{$urlServer}/modules/learnPath/learningPath.php?course={$course_code}&path_id={$entry['id']}'>" . q($entry['name']) . "</a></td>";
$tool_content .= "<td>" . q($entry['comment']) . "</td>";
$tool_content .= "<td class='text-center'><input type='checkbox' name='lp[]' value='{$entry['id']}'></td>";
$tool_content .= "</tr>";
}
$tool_content .= "<tr>" . "<th colspan='3'><div align='right'>";
$tool_content .= "<input class='btn btn-primary' type='submit' name='submit_lp' value='{$langAddModulesButton}'></div></th>";
$tool_content .= "</tr></table></form>\n";
}
}
示例8: list_ebooks
/**
*
* @global type $id
* @global type $course_id
* @global type $course_code
* @global type $tool_content
* @global type $urlServer
* @global type $mysqlMainDb
* @global type $langAddModulesButton
* @global type $langChoice
* @global type $langNoEbook
* @global type $langEBook
* @global type $course_code
*/
function list_ebooks()
{
global $id, $course_id, $course_code, $tool_content, $urlServer, $langAddModulesButton, $langChoice, $langNoEBook, $langEBook, $course_code;
$result = Database::get()->queryArray("SELECT * FROM ebook WHERE course_id = ?d ORDER BY `order`", $course_id);
if (count($result) == 0) {
$tool_content .= "<div class='alert alert-warning'>{$langNoEBook}</div>";
} else {
$tool_content .= "<form action='insert.php?course={$course_code}' method='post'>\n\t\t\t\t<input type='hidden' name='id' value='{$id}' />" . "<table class='table-default'>" . "<tr>" . "<th class='text-left'> {$langEBook}</th>" . "<th width='80' class='text-center'>{$langChoice}</th>" . "</tr>";
$unit_parameter = 'unit=' . $id;
foreach ($result as $catrow) {
$tool_content .= "<tr>";
$tool_content .= "<td class='bold'>" . icon('fa-folder-o') . " " . q($catrow->title) . "</td>";
$tool_content .= "<td class='text-center'>\n <input type='checkbox' name='ebook[]' value='{$catrow->id}' />\n <input type='hidden' name='ebook_title[{$catrow->id}]'\n value='" . q($catrow->title) . "'></td>";
$tool_content .= "</tr>";
$q = Database::get()->queryArray("SELECT ebook_section.id AS sid,\n ebook_section.public_id AS psid,\n ebook_section.title AS section_title,\n ebook_subsection.id AS ssid,\n ebook_subsection.public_id AS pssid,\n ebook_subsection.title AS subsection_title,\n document.path,\n document.filename\n FROM ebook, ebook_section, ebook_subsection, document\n WHERE ebook.id = ?d AND\n ebook.course_id = ?d AND\n ebook_section.ebook_id = ebook.id AND\n ebook_section.id = ebook_subsection.section_id AND\n document.id = ebook_subsection.file_id AND\n document.course_id = ?d AND\n document.subsystem = " . EBOOK . "\n ORDER BY CONVERT(psid, UNSIGNED), psid,\n CONVERT(pssid, UNSIGNED), pssid", $catrow->id, $course_id, $course_id);
$ebook_url_base = "{$urlServer}modules/ebook/show.php/{$course_code}/{$catrow->id}/";
$old_sid = false;
foreach ($q as $row) {
$sid = $row->sid;
$ssid = $row->ssid;
$display_id = $sid . ',' . $ssid;
$surl = $ebook_url_base . $display_id . '/' . $unit_parameter;
if ($old_sid != $sid) {
$tool_content .= "<tr>\n <td class='section'>" . icon('fa-link') . " \n " . q($row->section_title) . "</td>\n <td align='center'><input type='checkbox' name='section[]' value='{$sid}' />\n <input type='hidden' name='section_title[{$sid}]'\n value='" . q($row->section_title) . "'></td></tr>";
}
$tool_content .= "<tr>\n <td class='subsection'>" . icon('fa-link') . " \n <a href='" . q($surl) . "' target='_blank'>" . q($row->subsection_title) . "</a></td>\n <td align='center'><input type='checkbox' name='subsection[]' value='{$ssid}' />\n <input type='hidden' name='subsection_title[{$ssid}]'\n value='" . q($row->subsection_title) . "'></td>\n </tr>";
$old_sid = $sid;
}
}
$tool_content .= "<tr>" . "<th colspan='2'><div align='right'>" . "<input class='btn btn-primary' type='submit' name='submit_ebook' value='{$langAddModulesButton}' /></div></th>" . "</tr></table></form>";
}
}
示例9: backn
/**
* Go back n steps in history
* @param $n How many steps to go back
* @param $displayTitle Display the title of the target page if true. If false, show 'Back'
* @return string
*/
function backn($n = 1, $displayTitle = false)
{
if (isset($_SESSION['TRACE'][$n])) {
return '<a href="' . url(array_merge(@$_SESSION['TRACE'][$n]['_GET'], array('history' => 'back')), null, false) . '">' . icon('small/arrow_left') . ($displayTitle ? $Controller->get(@$_SESSION['TRACE'][$n]['id']) : __('Back')) . '</a>';
}
return '';
}
示例10: hookUserMenu
/**
* Добавляем активную иконку в меню
*
* @param object $menu
*/
public function hookUserMenu($menu)
{
if (!user()->id) {
return;
}
$menu->add(array('label' => icon('user'), 'tooltip' => t('Профиль'), 'link' => user()->getLink(), 'place' => 'left', 'title' => FALSE, 'order' => 3));
}
示例11: booleanToIcon
function booleanToIcon($bool)
{
if ($bool) {
return icon("icon check");
}
return icon("icon icon-bar");
}
示例12: dashboard_incoming
function dashboard_incoming($dashletid)
{
global $sit, $CONFIG, $iconset;
global $dbUpdates, $dbTempIncoming;
$content = "<p align='center'><img src='{$CONFIG['application_webpath']}images/ajax-loader.gif' alt='Loading icon' /></p>";
echo dashlet('incoming', $dashletid, icon('emailin', 16), 'Holding Queue Emails', 'holding_queue.php', $content);
}
示例13: get_forums
public function get_forums($forum_id = NULL, $mini = FALSE)
{
if ($forum_id) {
$this->db->where('f.parent_id', $forum_id)->where('f.is_subforum', TRUE);
} else {
$this->db->join('nf_forum f2', 'f2.parent_id = f.forum_id AND f2.is_subforum = "1"')->where('f.is_subforum', FALSE);
}
$forums = $this->db->select('f.forum_id', 'f.parent_id', 'f.title', 'f.description', !$forum_id ? 'f.count_messages + SUM(IFNULL(f2.count_messages, 0)) as count_messages' : 'f.count_messages', !$forum_id ? 'f.count_topics + SUM(IFNULL(f2.count_topics, 0)) as count_topics' : 'f.count_topics', 'f.last_message_id', 'u.user_id', 'u.username', 't.topic_id', 't.title as last_title', 'm.date as last_message_date', 't.count_messages as last_count_messages', 'u2.url', 'u2.redirects', (!$forum_id ? 'COUNT(f2.forum_id)' : 0) . ' as subforums', 'up.avatar', 'up.sex')->from('nf_forum f')->join('nf_forum_messages m', 'm.message_id = f.last_message_id')->join('nf_forum_topics t', 't.topic_id = m.topic_id')->join('nf_users u', 'u.user_id = m.user_id AND u.deleted = "0"')->join('nf_users_profiles up', 'u.user_id = up.user_id')->join('nf_forum_url u2', 'u2.forum_id = f.forum_id')->group_by('f.forum_id')->order_by('f.order', 'f.forum_id')->get();
foreach ($forums as &$forum) {
$forum['has_unread'] = $forum['url'] ? FALSE : $this->_has_unread($forum);
if ($forum['subforums']) {
foreach ($forum['subforums'] = $this->get_forums($forum['forum_id'], TRUE) as $subforum) {
if (!$forum['has_unread'] && $subforum['has_unread']) {
$forum['has_unread'] = TRUE;
}
if ($subforum['last_message_id'] > $forum['last_message_id']) {
foreach (['last_message_id', 'user_id', 'username', 'topic_id', 'last_title', 'last_message_date', 'last_count_messages'] as $var) {
$forum[$var] = $subforum[$var];
}
}
}
} else {
$forum['subforums'] = [];
}
$forum['icon'] = icon(($forum['url'] ? 'fa-globe' : 'fa-comments' . ($forum['has_unread'] ? '' : '-o')) . ($mini ? '' : ' fa-3x'));
}
return $forums;
}
示例14: dashboard_holidays
function dashboard_holidays($dashletid)
{
global $sit, $CONFIG, $iconset;
global $dbUsers;
$user = $sit[2];
echo "<div class='windowbox' style='width: 95%;' id='{$dashletid}'>";
echo "<div class='windowtitle'>" . icon('holiday', 16) . " {$GLOBALS['strWhosAwayToday']}</div>";
echo "<div class='window'>";
$sql = "SELECT * FROM `{$dbUsers}` WHERE status!=0 AND status!=1 ";
// status=0 means left company
$result = mysql_query($sql);
if (mysql_error()) {
trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING);
}
if (mysql_num_rows($result) >= 1) {
while ($users = mysql_fetch_array($result)) {
$title = userstatus_name($users['status']);
$title .= " - ";
if ($users['accepting'] == 'Yes') {
$title .= "{$GLOBALS['strAcceptingIncidents']}";
} else {
$title .= "{$GLOBALS['strNotAcceptingIncidents']}";
}
if (!empty($users['message'])) {
$title .= "\n(" . $users['message'] . ")";
}
echo "<strong>{$users['realname']}</strong>, {$title}";
echo "<br />";
}
} else {
echo "<p align='center'>{$GLOBALS['strNobody']}</p>\n";
}
echo "</div></div></div>";
}
示例15: lists
function lists($page = 1)
{
$this->load->library('pagination');
$this->load->helper('admin');
$config['base_url'] = RT_PATH . '/' . ADM_F . '/mail/lists/';
$config['per_page'] = 15;
$offset = ($page - 1) * $config['per_page'];
$result = $this->Mail_model->list_result($config['per_page'], $offset);
$total_cnt = $result['total_cnt'];
$config['total_rows'] = $total_cnt;
$config['uri_segment'] = 4;
$this->pagination->initialize($config);
$list = array();
$token = get_token();
foreach ($result['qry'] as $i => $row) {
$list[$i] = new stdClass();
$list[$i]->num = number_format($total_cnt - ($page - 1) * $config['per_page'] - $i);
$list[$i]->id = $row['ma_id'];
$list[$i]->subject = $row['ma_subject'];
$list[$i]->content = $row['ma_content'];
$list[$i]->time = $row['ma_time'];
$list[$i]->s_mod = icon('수정', 'mail/form/u/' . $row['ma_id']);
$list[$i]->s_del = icon('삭제', "javascript:post_send('" . ADM_F . "/_trans/mail/delete', {ma_id:'" . $row['ma_id'] . "', token:'" . $token . "'}, true);");
$list[$i]->s_vie = icon('보기', 'mail/preview/' . $row['ma_id'], "_blank");
}
$head = array('title' => '회원메일발송');
$data = array('token' => $token, 'list' => $list, 's_add' => icon('작성', 'mail/form'), 'total_cnt' => number_format($total_cnt), 'paging' => $this->pagination->create_links());
widget::run('head', $head);
$this->load->view(ADM_F . '/mail_list', $data);
widget::run('tail');
}