本文整理汇总了PHP中JString::strtolower方法的典型用法代码示例。如果您正苦于以下问题:PHP JString::strtolower方法的具体用法?PHP JString::strtolower怎么用?PHP JString::strtolower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JString
的用法示例。
在下文中一共展示了JString::strtolower方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayItems
function displayItems()
{
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
$filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', 'id', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
$filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', -1, 'int');
$search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
$model = $this->getModel();
$tags = $model->getData();
$this->assignRef('rows', $tags);
$total = $model->getTotal();
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $limitstart, $limit);
$this->assignRef('page', $pageNav);
$lists = array();
$lists['search'] = $search;
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
$filter_state_options[] = JHTML::_('select.option', -1, JText::_('_SELECT_STATE_'));
$filter_state_options[] = JHTML::_('select.option', 1, JText::_('PUBLISHED'));
$filter_state_options[] = JHTML::_('select.option', 0, JText::_('UNPUBLISHED'));
$lists['state'] = JHTML::_('select.genericlist', $filter_state_options, 'filter_state', 'onchange="this.form.submit();"', 'value', 'text', $filter_state);
$this->assignRef('lists', $lists);
JToolBarHelper::title(JText::_('TAGS'));
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::deleteList(JText::_('ARE_YOU_SURE_YOU_WANT_TO_DELETE_SELECTED_TAGS'), 'remove', JText::_('DELETE'));
JToolBarHelper::addNew();
}
示例2: getTrans
/**
* Get language items and store them in an array
*
*/
function getTrans($lang, $item)
{
$app = JFactory::getApplication();
$option = 'com_osmembership';
$registry = new JRegistry();
$languages = array();
if (strpos($item, 'admin.') !== false) {
$isAdmin = true;
$item = substr($item, 6);
} else {
$isAdmin = false;
}
if ($isAdmin) {
$path = JPATH_ROOT . '/administrator/language/en-GB/en-GB.' . $item . '.ini';
} else {
$path = JPATH_ROOT . '/language/en-GB/en-GB.' . $item . '.ini';
}
$registry->loadFile($path, 'INI');
$languages['en-GB'][$item] = $registry->toArray();
if ($isAdmin) {
$path = JPATH_ROOT . '/administrator/language/' . $lang . '/' . $lang . '.' . $item . '.ini';
} else {
$path = JPATH_ROOT . '/language/' . $lang . '/' . $lang . '.' . $item . '.ini';
}
$search = $app->getUserStateFromRequest($option . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
if (JFile::exists($path)) {
$registry->loadFile($path, 'INI');
$languages[$lang][$item] = $registry->toArray();
} else {
$languages[$lang][$item] = array();
}
return $languages;
}
示例3: displayItems
function displayItems()
{
$model = $this->getModel('logs');
$lists = $model->getvar();
$filter_order = $lists['filter_order'];
$filter_order_Dir = $lists['filter_order_Dir'];
$limit = $lists['limit'];
$limitstart = $lists['limitstart'];
$search = $lists['search'];
$search = JString::strtolower($search);
$where = $model->getWhereClause($lists);
//echo $where;
//order by
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir;
$total = $model->getItems($where, 1);
//limit
if ($limit > $total) {
$limitstart = 0;
}
if ($limit == 0) {
$limit = $total;
}
$limited = " LIMIT " . $limitstart . ',' . $limit;
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $lists['limitstart'], $lists['limit']);
$items = $model->getItems($where, 0, $orderby, $limited);
$this->assign('items', $items);
$this->assign('lists', $lists);
$this->assign('pageNav', $pageNav);
}
示例4: configure
/**
* Tareas comunes a pantalla de listas
*
*/
function configure()
{
$option = JRequest::getCMD('option');
$mainframe = JFactory::getApplication();
// orden
$filter_order = $mainframe->getUserStateFromRequest($this->_context . 'filter_order', 'filter_order', $this->_orderfield, 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($this->_context . 'filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
// cadena de búsqueda
$search = $mainframe->getUserStateFromRequest($this->_context . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
// Configuramos el modelo
$model =& $this->getModel();
$model->_orderby_filter_order = $filter_order;
$model->_orderby_filter_order_dir = $filter_order_Dir;
// seteamos búsqueda en el modelo
$db = JFactory::getDBO();
if ($search) {
$model->setWhere('LOWER(' . $this->_searchfield . ') LIKE ' . $db->Quote('%' . $db->getEscaped($search, true) . '%', false));
}
// table ordering
$this->_lists['order_Dir'] = $filter_order_Dir;
$this->_lists['order'] = $filter_order;
$this->_lists['search'] = $search;
$this->assignRef('lists', $this->_lists);
}
示例5: getTotal
function getTotal()
{
$mainframe = JFactory::getApplication();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$db = JFactory::getDBO();
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
$filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', 1, 'int');
$filter_category = $mainframe->getUserStateFromRequest($option . $view . 'filter_category', 'filter_category', 0, 'int');
$filter_author = $mainframe->getUserStateFromRequest($option . $view . 'filter_author', 'filter_author', 0, 'int');
$search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
$query = "SELECT COUNT(*) FROM #__k2_comments AS c LEFT JOIN #__k2_items AS i ON c.itemID=i.id WHERE c.id>0";
if ($filter_state > -1) {
$query .= " AND c.published={$filter_state}";
}
if ($filter_category) {
$query .= " AND i.catid={$filter_category}";
}
if ($filter_author) {
$query .= " AND i.created_by={$filter_author}";
}
if ($search) {
$escaped = K2_JVERSION == '15' ? $db->getEscaped($search, true) : $db->escape($search, true);
$query .= " AND LOWER( c.commentText ) LIKE " . $db->Quote('%' . $escaped . '%', false);
}
$db->setQuery($query);
$total = $db->loadresult();
return $total;
}
示例6: setImage
public function setImage($path, $type = 'thumb')
{
CError::assert($path, '', '!empty', __FILE__, __LINE__);
$db = $this->getDBO();
// Fix the back quotes
$path = CString::str_ireplace('\\', '/', $path);
$type = JString::strtolower($type);
// Test if the record exists.
$oldFile = $this->{$type};
if ($db->getErrorNum()) {
JError::raiseError(500, $db->stderr());
}
if ($oldFile) {
// File exists, try to remove old files first.
$oldFile = CString::str_ireplace('/', '/', $oldFile);
// If old file is default_thumb or default, we should not remove it.
//
// Need proper way to test it
if (!JString::stristr($oldFile, 'group.jpg') && !JString::stristr($oldFile, 'group_thumb.jpg') && !JString::stristr($oldFile, 'default.jpg') && !JString::stristr($oldFile, 'default_thumb.jpg')) {
jimport('joomla.filesystem.file');
JFile::delete($oldFile);
}
}
$this->{$type} = $path;
$this->store();
}
示例7: display
public function display($tpl = null)
{
$app = JFactory::getApplication('');
if ($this->getLayout() == 'form') {
$this->_displayForm($tpl);
return;
}
$context = 'com_jacc' . '.' . strtolower($this->getName()) . '.list.';
$filter_state = $app->getUserStateFromRequest($context . 'filter_state', 'filter_state', '', 'word');
$filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', $this->get('DefaultFilter'), 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
$search = $app->getUserStateFromRequest($context . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
// Get data from the model
$this->total = $this->get('Total');
$this->pagination = $this->get('Pagination');
//create the lists
$lists = array();
$lists['state'] = JHTML::_('grid.state', $filter_state);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
$this->items = $this->get('Data');
$this->user = JFactory::getUser();
$this->lists = $lists;
parent::display();
}
示例8: getTotal
function getTotal()
{
$mainframe =& JFactory::getApplication();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$db =& JFactory::getDBO();
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
$search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
$filter_trash = $mainframe->getUserStateFromRequest($option . $view . 'filter_trash', 'filter_trash', 0, 'int');
$filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', 1, 'int');
$query = "SELECT COUNT(*) FROM #__k2_categories WHERE id>0";
if (!$filter_trash) {
$query .= " AND trash=0";
}
if ($search) {
$query .= " AND LOWER( name ) LIKE " . $db->Quote('%' . $db->getEscaped($search, true) . '%', false);
}
if ($filter_state > -1) {
$query .= " AND published={$filter_state}";
}
$db->setQuery($query);
$total = $db->loadResult();
return $total;
}
示例9: getTotal
function getTotal()
{
$mainframe = JFactory::getApplication();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$db = JFactory::getDBO();
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
$limitstart = $mainframe->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
$filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', 1, 'int');
$search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
$filter_type = $mainframe->getUserStateFromRequest($option . $view . 'filter_type', 'filter_type', '', 'string');
$filter_group = $mainframe->getUserStateFromRequest($option . $view . 'filter_group', 'filter_group', '', 'string');
$query = "SELECT COUNT(*) FROM #__k2_extra_fields WHERE id>0";
if ($filter_state > -1) {
$query .= " AND published={$filter_state}";
}
if ($search) {
$escaped = K2_JVERSION == '15' ? $db->getEscaped($search, true) : $db->escape($search, true);
$query .= " AND LOWER( name ) LIKE " . $db->Quote('%' . $escaped . '%', false);
}
if ($filter_type) {
$query .= " AND `type`=" . $db->Quote($filter_type);
}
if ($filter_group) {
$query .= " AND `group`=" . $db->Quote($filter_group);
}
$db->setQuery($query);
$total = $db->loadresult();
return $total;
}
示例10: display
public function display($tpl = null)
{
$document = JFactory::getDocument();
$db = JFactory::getDBO();
$app = JFactory::getApplication();
$jinput = JFactory::getApplication()->input;
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
$filter_order = $app->getUserStateFromRequest('com_jem.categoryelement.filter_order', 'filter_order', 'c.ordering', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.categoryelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
$filter_state = $app->getUserStateFromRequest('com_jem.categoryelement.' . $itemid . '.filter_state', 'filter_state', '', 'string');
$search = $app->getUserStateFromRequest('com_jem.categoryelement.' . $itemid . '.filter_search', 'filter_search', '', 'string');
$search = $db->escape(trim(JString::strtolower($search)));
// prepare document
$document->setTitle(JText::_('COM_JEM_SELECT_CATEGORY'));
// Load css
JemHelper::loadCss('backend');
// Get data from the model
$rows = $this->get('Data');
$pagination = $this->get('Pagination');
// publish/unpublished filter
$lists['state'] = JHtml::_('grid.state', $filter_state);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
// assign data to template
$this->lists = $lists;
$this->filter_state = $filter_state;
$this->rows = $rows;
$this->pagination = $pagination;
parent::display($tpl);
}
示例11: _buildContentWhere
function _buildContentWhere()
{
$option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$filter_sports_type = $mainframe->getUserStateFromRequest($option . '.' . $this->_identifier . '.filter_sports_type', 'filter_sports_type', '', 'int');
$filter_state = $mainframe->getUserStateFromRequest($option . '.' . $this->_identifier . '.filter_state', 'filter_state', '', 'word');
$search = $mainframe->getUserStateFromRequest($option . '.' . $this->_identifier . '.search', 'search', '', 'string');
$search_mode = $mainframe->getUserStateFromRequest($option . '.' . $this->_identifier . '.search_mode', 'search_mode', '', 'string');
$search = JString::strtolower($search);
$where = array();
if ($filter_sports_type > 0) {
$where[] = 'obj.sports_type_id=' . $this->_db->Quote($filter_sports_type);
}
if ($search) {
$where[] = 'LOWER(obj.name) LIKE ' . $this->_db->Quote('%' . $search . '%');
}
if ($filter_state) {
if ($filter_state == 'P') {
$where[] = 'obj.published = 1';
} elseif ($filter_state == 'U') {
$where[] = 'obj.published = 0';
}
}
$where = count($where) ? '' . implode(' AND ', $where) : '';
return $where;
}
示例12: display
function display($tpl = null)
{
## If we want the add/edit form..
if ($this->getLayout() == 'form') {
$this->_displayForm($tpl);
return;
}
$mainframe = JFactory::getApplication();
$db = JFactory::getDBO();
$model = $this->getModel();
## Getting the items into a variable
$items = $this->get('list');
$pagination = $this->get('Pagination');
$filter_order = $mainframe->getUserStateFromRequest('filter_ordering', 'filter_ordering', 'a.fueltype', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest('filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
$search = $mainframe->getUserStateFromRequest('search', 'search', '', 'string');
$search = JString::strtolower($search);
$lists['search'] = $search;
## Filling the Array() for doors and make a select list for it.
$ordering = array('a.name' => array('value' => 'a.name', 'text' => JText::_('COM_TICKETMASTER_SEARCH_NAME')), 'a.address' => array('value' => 'a.address', 'text' => JText::_('COM_TICKETMASTER_SEARCH_ADDRESS')), 'a.zipcode' => array('value' => 'a.zipcode', 'text' => JText::_('COM_TICKETMASTER_SEARCH_ZIPCODE')), 'a.city' => array('value' => 'a.city', 'text' => JText::_('COM_TICKETMASTER_SEARCH_CITY')), 'a.emailaddress' => array('value' => 'a.emailaddress', 'text' => JText::_('COM_TICKETMASTER_SEARCH_EMAIL')));
$lists['ordering'] = JHTML::_('select.genericList', $ordering, 'filter_ordering', ' class="inputbox" ', 'value', 'text', $filter_order);
$this->assignRef('pagination', $pagination);
$this->assignRef('items', $items);
$this->assignRef('lists', $lists);
parent::display($tpl);
}
示例13: _buildContentWhere
function _buildContentWhere()
{
$mainframe =& JFactory::getApplication();
$option = 'com_joomleague';
$filter_state = $mainframe->getUserStateFromRequest($option . 'tmb_filter_state', 'filter_state', '', 'word');
$filter_order = $mainframe->getUserStateFromRequest($option . 'tmb_filter_order', 'filter_order', 'u.username', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'tmb_filter_order_Dir', 'filter_order_Dir', '', 'word');
$search = $mainframe->getUserStateFromRequest($option . 'tmb_search', 'search', '', 'string');
$search_mode = $mainframe->getUserStateFromRequest($option . 'tmb_search_mode', 'search_mode', '', 'string');
$search = JString::strtolower($search);
$where = array();
$prediction_id = (int) $mainframe->getUserState('com_joomleague' . 'prediction_id');
if ($prediction_id > 0) {
$where[] = 'tmb.prediction_id = ' . $prediction_id;
}
if ($search) {
$where[] = "LOWER(u.username) LIKE " . $this->_db->Quote($search . '%');
}
if ($filter_state) {
if ($filter_state == 'P') {
$where[] = 'tmb.approved = 1';
} elseif ($filter_state == 'U') {
$where[] = 'tmb.approved = 0';
}
}
$where = count($where) ? '' . implode(' AND ', $where) : '';
return $where;
}
示例14: display
function display($tpl = null)
{
$mainframe = JFactory::getApplication();
$option = 'com_k2store';
$ns = 'com_k2store.fields';
$db = JFactory::getDBO();
$uri = JFactory::getURI();
$params = JComponentHelper::getParams('com_k2store');
$filter_order = $mainframe->getUserStateFromRequest($ns . 'filter_order', 'filter_order', 'a.field_id', 'cmd');
$filter_order_Dir = $mainframe->getUserStateFromRequest($ns . 'filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
$filter_orderstate = $mainframe->getUserStateFromRequest($ns . 'filter_orderstate', 'filter_orderstate', '', 'string');
$search = $mainframe->getUserStateFromRequest($ns . 'search', 'search', '', 'string');
if (strpos($search, '"') !== false) {
$search = str_replace(array('=', '<'), '', $search);
}
$search = JString::strtolower($search);
// Get data from the model
$items = $this->get('Data');
$total = $this->get('Total');
$pagination = $this->get('Pagination');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
$this->assignRef('lists', $lists);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->params = $params;
$model = $this->getModel();
$this->addToolBar();
$toolbar = new K2StoreToolBar();
$toolbar->renderLinkbar();
parent::display($tpl);
}
示例15: display
function display($tpl = null)
{
$document = JFactory::getDocument();
$user = JFactory::getUser();
$mainframe = JFactory::getApplication();
if (Komento::joomlaVersion() >= '1.6') {
if (!$user->authorise('komento.manage.pendings', 'com_komento')) {
$mainframe->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
$mainframe->close();
}
}
$filter_component = $mainframe->getUserStateFromRequest('com_komento.pending.filter_component', 'filter_component', '*', 'string');
$search = $mainframe->getUserStateFromRequest('com_komento.pending.search', 'search', '', 'string');
$search = trim(JString::strtolower($search));
$order = $mainframe->getUserStateFromRequest('com_komento.pending.filter_order', 'filter_order', 'created', 'cmd');
$orderDirection = $mainframe->getUserStateFromRequest('com_komento.pending.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
// Set Options
$options['published'] = 2;
$options['no_tree'] = 1;
$options['no_child'] = 1;
// Get data from the model
$commentsModel = Komento::getModel('comments');
$comments = $commentsModel->getData($options);
$pagination = $commentsModel->getPagination();
$this->assignRef('comments', $comments);
$this->assignRef('pagination', $pagination);
$this->assign('search', $search);
$this->assign('order', $order);
$this->assign('orderDirection', $orderDirection);
$this->assign('component', $this->getComponentState($filter_component));
$this->assign('columns', Komento::getConfig('com_komento_pending_columns', false));
$this->assign('columnCount', 2);
parent::display($tpl);
}