本文整理汇总了PHP中phpgw::strip_html方法的典型用法代码示例。如果您正苦于以下问题:PHP phpgw::strip_html方法的具体用法?PHP phpgw::strip_html怎么用?PHP phpgw::strip_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpgw
的用法示例。
在下文中一共展示了phpgw::strip_html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('notes') . ': ' . lang('list notes');
$notes_list = $this->bonotes->read();
$link_data = array('menuaction' => 'notes.uinotes.index');
$content = array();
foreach ($notes_list as $note) {
$words = explode(' ', phpgw::strip_html($note['content']), 10);
$first = implode(' ', $words);
if (count($words) > 10) {
$first .= ' ...';
}
unset($words);
$content[] = array('note_id' => $note['note_id'], 'first' => $first, 'date' => $note['date'], 'owner' => $note['owner'], 'link_view' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.view', 'note_id' => $note['note_id'])), 'link_edit' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit', 'note_id' => $note['note_id'])), 'link_delete' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.delete', 'note_id' => $note['note_id'])), 'lang_view_statustext' => lang('view the note'), 'lang_edit_statustext' => lang('edit the note'), 'lang_delete_statustext' => lang('delete the note'), 'text_view' => lang('view'), 'text_edit' => lang('edit'), 'text_delete' => lang('delete'));
}
$table_header = array('sort_time_created' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'note_date', 'order' => $this->order, 'extra' => $link_data)), 'sort_note_id' => $this->nextmatchs->show_sort_order(array('sort' => $this->sort, 'var' => 'note_id', 'order' => $this->order, 'extra' => $link_data)));
$table_add = array('add_action' => $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'notes.uinotes.edit')));
$nm = array('start' => $this->start, 'start_record' => $this->start, 'num_records' => count($notes_list), 'all_records' => $this->bonotes->total_records, 'link_data' => $link_data);
$data = array('nm_data' => $this->nextmatchs->xslt_nm($nm), 'cat_filter' => $this->cats->formatted_xslt_list(array('select_name' => 'cat_id', 'selected' => $this->cat_id, 'globals' => true, 'link_data' => $link_data)), 'filter_data' => $this->nextmatchs->xslt_filter(array('filter' => $this->filter, 'link_data' => $link_data)), 'search_data' => $this->nextmatchs->xslt_search(array('query' => $this->query, 'link_data' => $link_data)), 'table_header' => $table_header, 'values' => $content, 'table_add' => $table_add);
$this->save_sessiondata();
$GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('list' => $data));
}