本文整理汇总了PHP中icon函数的典型用法代码示例。如果您正苦于以下问题:PHP icon函数的具体用法?PHP icon怎么用?PHP icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了icon函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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>";
}
}
开发者ID:nikosv,项目名称:openeclass,代码行数:46,代码来源:insert_poll.php
示例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;
}
开发者ID:alecgorge,项目名称:TopHat,代码行数:25,代码来源:edit-page.php
示例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;
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:33,代码来源:inbox.php
示例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');
}
开发者ID:ubiopen,项目名称:KI_Board,代码行数:34,代码来源:boardgroup.php
示例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();
}
开发者ID:josercl,项目名称:forum,代码行数:29,代码来源:MY_Admin_controller.php
示例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');
}
}
开发者ID:cheevauva,项目名称:trash,代码行数:34,代码来源:wlist.gl.php
示例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";
}
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:42,代码来源:insert_lp.php
示例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>";
}
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:46,代码来源:insert_ebook.php
示例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 '';
}
开发者ID:jonatanolofsson,项目名称:solidba.se,代码行数:13,代码来源:Short.php
示例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));
}
开发者ID:brussens,项目名称:cogear2,代码行数:12,代码来源:Gear.php
示例11: booleanToIcon
function booleanToIcon($bool)
{
if ($bool) {
return icon("icon check");
}
return icon("icon icon-bar");
}
开发者ID:josercl,项目名称:forum,代码行数:7,代码来源:MY_html_helper.php
示例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);
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:7,代码来源:dashboard_incoming.php
示例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;
}
开发者ID:NeoFragCMS,项目名称:neofrag-theme-dungeon,代码行数:28,代码来源:forum.php
示例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>";
}
开发者ID:sitracker,项目名称:sitracker_old,代码行数:34,代码来源:dashboard_holidays.php
示例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');
}
开发者ID:ubiopen,项目名称:KI_Board,代码行数:31,代码来源:mail.php
示例16: index
public function index()
{
if (!$this->user()) {
return $this->login();
}
$this->title($this('member_area'));
return new Panel(array('title' => $this('member_area'), 'icon' => 'fa-user', 'content' => $this->load->view('index'), 'footer' => '<a class="btn btn-primary" href="' . url('user/edit.html') . '">' . icon('fa-cogs') . ' ' . $this('manage_my_account') . '</a> <a class="btn btn-danger" href="' . url('user/logout.html') . '">' . icon('fa-close') . ' ' . $this('logout') . '</a>'));
}
开发者ID:nsystem1,项目名称:neofrag-cms,代码行数:8,代码来源:index.php
示例17: index
public function index($config = array())
{
$count = count($links = $this->breadcrumb->get_links());
array_walk($links, function (&$value, $key) use($count) {
$value = '<li' . (($is_last = $key == $count - 1) ? ' class="active"' : '') . '><a href="' . url($value[1]) . '">' . ($is_last && $value[2] !== '' ? icon($value[2]) . ' ' : '') . $value[0] . '</a></li>';
});
return '<ol class="breadcrumb"><b>' . $this->config->nf_name . '</b> ' . icon('fa-angle-right') . ' ' . implode($links) . '</ol>';
}
开发者ID:nsystem1,项目名称:neofrag-cms,代码行数:8,代码来源:index.php
示例18: list_forums
/**
* display available forums (if any)
* @global type $id
* @global type $tool_content
* @global type $urlServer
* @global type $course_id
* @global type $langComments
* @global type $langAddModulesButton
* @global type $langChoice
* @global type $langNoForums
* @global type $langForums
* @global type $course_code
*/
function list_forums() {
global $id, $tool_content, $urlServer, $course_id,
$langComments, $langAddModulesButton, $langChoice, $langNoForums, $langForums, $course_code;
$result = Database::get()->queryArray("SELECT * FROM forum WHERE course_id = ?d", $course_id);
$foruminfo = array();
foreach ($result as $row) {
$foruminfo[] = array(
'id' => $row->id,
'name' => $row->name,
'comment' => $row->desc,
'topics' => $row->num_topics);
}
if (count($foruminfo) == 0) {
$tool_content .= "<div class='alert alert-warning'>$langNoForums</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>$langForums</th>" .
"<th>$langComments</th>" .
"<th style='width:20px;' class='text-center'>$langChoice</th>" .
"</tr>";
foreach ($foruminfo as $entry) {
$tool_content .= "<tr>";
$tool_content .= "<td>
<a href='${urlServer}modules/forum/viewforum.php?course=$course_code&forum=$entry[id]'>" . q($entry['name']). "</a></td>";
$tool_content .= "<td>" . q($entry['comment']) . "</td>";
$tool_content .= "<td class='text-center'><input type='checkbox' name='forum[]' value='$entry[id]' /></td>";
$tool_content .= "</tr>";
$r = Database::get()->queryArray("SELECT * FROM forum_topic WHERE forum_id = ?d", $entry['id']);
if (count($r) > 0) { // if forum topics found
$topicinfo = array();
foreach ($r as $topicrow) {
$topicinfo[] = array(
'topic_id' => $topicrow->id,
'topic_title' => $topicrow->title,
'topic_time' => $topicrow->topic_time);
}
foreach ($topicinfo as $topicentry) {
$tool_content .= "<tr>";
$tool_content .= "<td> ".icon('fa-comments')." <a href='${urlServer}/modules/forum/viewtopic.php?course=$course_code&topic=$topicentry[topic_id]&forum=$entry[id]'>" . q($topicentry['topic_title']) . "</a></td>";
$tool_content .= "<td> </td>";
$tool_content .= "<td class='text-center'><input type='checkbox' name='forum[]' value='$entry[id]:$topicentry[topic_id]' /></td>";
$tool_content .= "</tr>";
}
}
}
$tool_content .=
"</table>";
$tool_content .= "<div class='text-right'>
<input class='btn btn-primary' type='submit' name='submit_forum' value='$langAddModulesButton' />
</div></form>";
}
}
开发者ID:nikosv,项目名称:openeclass,代码行数:71,代码来源:insert_forum.php
示例19: index
public function index($config = array())
{
$members = $this->db->select('user_id', 'username', 'registration_date')->from('nf_users')->where('deleted', FALSE)->order_by('registration_date DESC')->limit(5)->get();
if (!empty($members)) {
return new Panel(array('title' => $this('last_members'), 'content' => $this->load->view('index', array('members' => $members)), 'body' => FALSE, 'footer' => '<a href="' . url('members.html') . '">' . icon('fa-arrow-circle-o-right') . ' ' . $this('members_list') . '</a>', 'footer_align' => 'right'));
} else {
return new Panel(array('title' => $this('last_members'), 'content' => $this('no_members')));
}
}
开发者ID:nsystem1,项目名称:neofrag-cms,代码行数:9,代码来源:index.php
示例20: wmysql_adminlist
function wmysql_adminlist($method, $array)
{
is_array($array) ? $param = $array : die('None array');
$_GET = get_url_array();
switch ($method) {
case 'list':
form("open");
html($param['name']);
$result = wmysql("page", "get", $param['sql'], $param['recsheet'], $_GET[$param['level']]);
if (mysql_num_rows($result) > 0) {
html("<table cellspacing='3px'><tr>");
foreach ($param['description'] as $el) {
html("<td>" . $el . "</td>");
}
html("</tr>");
while ($row = mysql_fetch_assoc($result)) {
html("<tr><td>");
form("input", array("type" => 'checkbox', "name" => 'arr[]', "value" => $row['id']));
html("</td>");
foreach ($param['getparam'] as $key) {
html("<td>" . $row[$key] . "</td>");
}
html("<td><a href='" . href(THIS, $param['level'] - 1, "edit", $row['id']) . "'>" . icon("edit", 20) . "</a></td>");
html("</tr>");
}
html("</table>");
} else {
if (intval($_GET[$param['level']]) > 1) {
die(header("location:" . href(THIS, $param['level'] - 1)));
}
}
if ($page = wmysql("page", "draw", $param['level'] - 1)) {
html("<br>Страницы: " . $page);
html(" Выбрать все на этой странице<input type='checkbox' \r\n onChange='for(i in this.form.elements)this.form.elements[i].checked = this.checked'>");
form("label");
}
form("input", array("type" => 'submit', "name" => 'qq', "value" => 'Удалить'));
html("или <a href='" . href(THIS, $param['level'] - 1, "add") . "'>Добавить" . icon("add", 16) . "</a>");
form("close");
return;
case 'delrec':
foreach ($param['array'] as $value) {
$value = mysql_escape_string($value);
$condition = true;
if ($param['condition']) {
$result = mysql_query($param['condition'] . " '" . $value . "'");
$condition = mysql_result($result, 0) == 0 ? true : false;
print_r(mysql_fetch_assoc($result));
}
if ($condition) {
mysql_query($param['true'] . " '" . $value . "'");
}
}
die(header("location:" . href(THIS)));
return;
}
}
开发者ID:cheevauva,项目名称:trash,代码行数:57,代码来源:wmysql.gl.php
注:本文中的icon函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论