本文整理汇总了PHP中JTable::isCheckedOut方法的典型用法代码示例。如果您正苦于以下问题:PHP JTable::isCheckedOut方法的具体用法?PHP JTable::isCheckedOut怎么用?PHP JTable::isCheckedOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JTable
的用法示例。
在下文中一共展示了JTable::isCheckedOut方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jump
/**
* Checks in the current item and displays the previous/next one in the list
* @return unknown_type
*/
function jump()
{
$model = $this->getModel($this->get('suffix'));
$row = $model->getTable();
$row->load($model->getId());
if (isset($row->checked_out) && !JTable::isCheckedOut(JFactory::getUser()->id, $row->checked_out)) {
$row->checkin();
}
$task = JRequest::getVar("task");
$redirect = "index.php?option=com_tienda&view=products";
Tienda::load("TiendaHelperProduct", 'helpers.product');
$surrounding = TiendaHelperProduct::getSurrounding($model->getId());
switch ($task) {
case "prev":
if (!empty($surrounding['prev'])) {
$redirect .= "&task=view&id=" . $surrounding['prev'];
}
break;
case "next":
if (!empty($surrounding['next'])) {
$redirect .= "&task=view&id=" . $surrounding['next'];
}
break;
}
$redirect = JRoute::_($redirect, false);
$this->setRedirect($redirect, $this->message, $this->messagetype);
}
示例2: is_checkout
function is_checkout($checked_out)
{
if ($this->user && JTable::isCheckedOut($this->user->get('id'), $checked_out)) {
return true;
}
return false;
}
示例3: prepare
function prepare(&$products)
{
// Get user
$user = JFactory::getUser();
// Get null date
$db = JFactory::getDBO();
$nullDate = $db->getNullDate();
// Get trash state
$mainframe = JFactory::getApplication();
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
$trash = $mainframe->getUserStateFromRequest("{$option}.{$view}.trash", 'trash', -1, 'int');
// Require Virtuemart classes for price display
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'currencydisplay.php';
$currency = CurrencyDisplay::getInstance();
// Cast the input to array
if (!is_array($products)) {
$rows = array($products);
} else {
$rows = $products;
}
// Prepare the products
foreach ($rows as $key => $product) {
$product->parity = $key % 2;
$product->key = $key + 1;
$product->checkout = JHTML::_('grid.checkedout', $product, $key);
$product->price = $currency->priceDisplay($product->price, (int) $product->currency, true);
$product->featuredToggler = K2martHTMLHelper::stateToggler($product, $key, 'featured', array('K2MART_FEATURED', 'K2MART_NOT_FEATURED'), array('K2MART_REMOVE_FEATURED_FLAG', 'K2MART_FLAG_AS_FEATURED'));
$product->publishedToggler = K2martHTMLHelper::stateToggler($product, $key, 'published', array('K2MART_PUBLISHED', 'K2MART_UNPUBLISHED'), array('K2MART_UNPUBLISH', 'K2MART_PUBLISH'));
if (JTable::isCheckedOut($user->get('id'), $product->checked_out) || $trash == 1) {
$product->link = false;
$product->featuredToggler = strip_tags($product->featuredToggler, '<img>');
$product->publishedToggler = strip_tags($product->publishedToggler, '<img>');
} else {
$product->link = JRoute::_('index.php?option=com_k2&view=item&cid=' . $product->id);
}
$product->categoryLink = JRoute::_('index.php?option=com_k2&view=category&cid=' . $product->catid);
if (JFile::exists(JPATH_SITE . DS . 'media' . DS . 'k2' . DS . 'items' . DS . 'cache' . DS . md5("Image" . $product->id) . '_XL.jpg')) {
$product->image = JURI::root(true) . '/media/k2/items/cache/' . md5("Image" . $product->id) . '_XL.jpg';
} else {
$product->image = false;
}
$product->created = JHTML::_('date', $product->created);
$product->modified = $product->modified == $nullDate ? JText::_('K2MART_NEVER') : JHTML::_('date', $product->modified);
}
}
示例4: getModulesTable
function getModulesTable($id)
{
JHTML::_('behavior.modal');
$user =& JFactory::getUser();
$modules = $this->getAdvancedModules($id);
if (!count($modules)) {
return '<p style="text-align:center;">' . JText::_('AMM_NO_ACTIVE_MODULES') . '</p>';
}
$table = '
<table class="adminlist" cellspacing="1">
<thead>
<tr>
<th>' . JText::_('Module Name') . '</th>
<th>' . JText::_('Position') . '</th>
<th>' . JText::_('Type') . '</th>
<th>' . JText::_('Access') . '</th>
<th>' . JText::_('ID') . '</th>
</tr>
</thead>
<tbody>';
foreach ($modules as $module) {
$access = JHTML::_('grid.access', $module, NULL, 1);
if (JTable::isCheckedOut($user->get('id'), $module->checked_out)) {
$title = $module->title;
} else {
$link = JRoute::_('index.php?option=com_advancedmodules&client=0&task=edit&tmpl=component&cid[]=' . $module->id);
$title = '
<span class="editlinktip hasTip" title="' . JText::_('AMM_EDIT_MODULE') . '::' . $module->title . '">
<a href="' . $link . '" class="modal" rel="{handler: \'iframe\', size: {x:window.getSize().scrollSize.x-100, y: window.getSize().size.y-100}}">' . $module->title . '</a>
</span>';
}
$table .= '
<tr>
<td>' . $title . '</td>
<td>' . $module->position . '</td>
<td>' . $module->module . '</td>
<td>' . $access . '</td>
<td>' . $module->id . '</td>
</tr>';
}
$table .= '
</tbody>
</table>';
return $table;
}
示例5: checkedOut
public static function checkedOut(&$row, $i, $identifier = 'id')
{
$user =& JFactory::getUser();
$userid = $user->get('id');
$result = false;
if (is_a($row, 'JTable')) {
$result = $row->isCheckedOut($userid);
} else {
$result = JTable::isCheckedOut($userid, $row->checked_out);
}
$checked = '';
if ($result) {
$checked = JHTMLGrid::_checkedOut($row);
} else {
$checked = JHTML::_('grid.id', $i, $row->{$identifier});
}
return $checked;
}
示例6: checkedOutRadio
/**
* @function checkedOutRadio
* abstract a little edited default function, just display radio buttons instead checkboxes
*/
function checkedOutRadio(&$row, $i, $identifier = 'id')
{
$user =& JFactory::getUser();
$userid = $user->get('id');
$result = false;
if (is_a($row, 'JTable')) {
$result = $row->isCheckedOut($userid);
} else {
$result = JTable::isCheckedOut($userid, $row->checked_out);
}
$checked = '';
if ($result) {
$checked = JHTMLGrid::_checkedOut($row);
} else {
echo $this->idRadio($i, $row->name);
}
return $checked;
}
示例7:
echo "row{$k}";
?>
">
<td align="right">
<?php
echo $this->pagination->getRowOffset($i);
?>
</td>
<td>
<?php
echo $checked;
?>
</td>
<td>
<?php
if (JTable::isCheckedOut($this->user->get('id'), $row->checked_out) || !$row->editable) {
echo $row->title;
} else {
?>
<span class="editlinktip hasTip" title="<?php
echo JText::_('Edit Plugin');
?>
::<?php
echo $row->title;
?>
">
<a href="<?php
echo $link;
?>
">
<?php
示例8: showTemplates
/**
* @param array An array of data objects
* @param object A page navigation object
* @param string The option
*/
function showTemplates(&$rows, &$lists, &$page, $option, &$client)
{
global $mainframe;
$limitstart = JRequest::getVar('limitstart', '0', '', 'int');
$user =& JFactory::getUser();
if (isset($row->authorUrl) && $row->authorUrl != '') {
$row->authorUrl = str_replace('http://', '', $row->authorUrl);
}
JHTML::_('behavior.tooltip');
?>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist">
<thead>
<tr>
<th width="5" class="title">
<?php
echo JText::_('Num');
?>
</th>
<th class="title" colspan="2">
<?php
echo JText::_('Template Name');
?>
</th>
<?php
if ($client->id == 1) {
?>
<th width="5%">
<?php
echo JText::_('Default');
?>
</th>
<?php
} else {
?>
<th width="5%">
<?php
echo JText::_('Default');
?>
</th>
<th width="5%">
<?php
echo JText::_('Assigned');
?>
</th>
<?php
}
?>
<th width="10%" align="center">
<?php
echo JText::_('Version');
?>
</th>
<th width="15%" class="title">
<?php
echo JText::_('Date');
?>
</th>
<th width="25%" class="title">
<?php
echo JText::_('Author');
?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8">
<?php
echo $page->getListFooter();
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i = 0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
$author_info = @$row->authorEmail . '<br />' . @$row->authorUrl;
?>
<tr class="<?php
echo 'row' . $k;
?>
">
<td>
<?php
echo $page->getRowOffset($i);
?>
</td>
<td width="5">
<?php
if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
?>
//.........这里部分代码省略.........
示例9:
$checked = JHTML::_('grid.checkedout', $row, $i);
?>
<tr class="<?php
echo "row{$k}";
?>
">
<td class="center"><?php
echo $this->pagination->getRowOffset($i);
?>
</td>
<td class="center"><?php
echo $checked;
?>
</td>
<?php
if (JTable::isCheckedOut($this->user->get('id'), $row->checked_out)) {
$inputappend = ' disabled="disabled"';
?>
<td class="center"> </td><?php
} else {
$inputappend = '';
?>
<td class="center">
<a href="<?php
echo $link;
?>
">
<?php
$imageTitle = JText::_('COM_JOOMLEAGUE_ADMIN_COUNTRIES_EDIT_DETAILS');
echo JHTML::_('image', 'administrator/components/com_joomleague/assets/images/edit.png', $imageTitle, 'title= "' . $imageTitle . '"');
?>
示例10: showAdministration
function showAdministration($option)
{
$kunena_app = JFactory::getApplication();
$kunena_db = JFactory::getDBO();
$kunena_acl = JFactory::getACL();
$filter_order = $kunena_app->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'ordering', 'cmd');
$filter_order_Dir = $kunena_app->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'asc', 'word');
if ($filter_order_Dir != 'asc') {
$filter_order_Dir = 'desc';
}
$limit = $kunena_app->getUserStateFromRequest("global.list.limit", 'limit', $kunena_app->getCfg('list_limit'), 'int');
$limitstart = $kunena_app->getUserStateFromRequest("{$option}.limitstart", 'limitstart', 0, 'int');
$levellimit = $kunena_app->getUserStateFromRequest("{$option}.limit", 'levellimit', 10, 'int');
$search = $kunena_app->getUserStateFromRequest($option . 'search', 'search', '', 'string');
$search = JString::strtolower($search);
$order = '';
if ($filter_order == 'ordering') {
$order = ' ORDER BY a.ordering ' . $filter_order_Dir;
} else {
if ($filter_order == 'name') {
$order = ' ORDER BY a.name ' . $filter_order_Dir;
} else {
if ($filter_order == 'id') {
$order = ' ORDER BY a.id ' . $filter_order_Dir;
}
}
}
$where = '';
if ($search) {
$where .= ' WHERE LOWER( a.name ) LIKE ' . $kunena_db->Quote('%' . $kunena_db->getEscaped($search, true) . '%', false) . ' OR LOWER( a.id ) LIKE ' . $kunena_db->Quote('%' . $kunena_db->getEscaped($search, true) . '%', false);
}
if (KUNENA_JOOMLA_COMPAT == '1.5') {
// Joomla 1.5
$query = "SELECT a.*, a.parent>0 AS category, u.name AS editor, g.name AS groupname, g.id AS group_id, h.name AS admingroup, v.name AS viewlevel\n\t\t\tFROM #__kunena_categories AS a\n\t\t\tLEFT JOIN #__users AS u ON u.id = a.checked_out\n\t\t\tLEFT JOIN #__core_acl_aro_groups AS g ON a.accesstype='none' AND g.id = a.pub_access\n\t\t\tLEFT JOIN #__core_acl_aro_groups AS h ON a.accesstype='none' AND h.id = a.admin_access\n\t\t\tLEFT JOIN #__groups AS v ON a.accesstype='joomla.level' AND v.id = a.access\n\t\t\t" . $where . $order;
} else {
// Joomla 1.6
$query = "SELECT a.*, a.parent>0 AS category, u.name AS editor, g.title AS groupname, h.title AS admingroup, v.title AS viewlevel\n\t\t\tFROM #__kunena_categories AS a\n\t\t\tLEFT JOIN #__users AS u ON u.id = a.checked_out\n\t\t\tLEFT JOIN #__usergroups AS g ON a.accesstype='none' AND g.id = a.pub_access\n\t\t\tLEFT JOIN #__usergroups AS h ON a.accesstype='none' AND h.id = a.admin_access\n\t\t\tLEFT JOIN #__viewlevels AS v ON a.accesstype='joomla.level' AND v.id = a.access\n\t\t\t" . $where . $order;
}
$kunena_db->setQuery($query);
$rows = $kunena_db->loadObjectList('id');
KunenaError::checkDatabaseError();
// establish the hierarchy of the categories
$children = array(0 => array());
// first pass - collect children
foreach ($rows as $v) {
$list = array();
$vv = $v;
while ($vv->parent > 0 && isset($rows[$vv->parent]) && !in_array($vv->parent, $list)) {
$list[] = $vv->id;
$vv = $rows[$vv->parent];
}
if ($vv->parent) {
$v->parent = -1;
if (empty($search)) {
$v->published = 0;
}
if (empty($search)) {
$v->name = JText::_('COM_KUNENA_CATEGORY_ORPHAN') . ' : ' . $v->name;
}
}
if ($v->accesstype == 'joomla.level') {
if (KUNENA_JOOMLA_COMPAT == '1.5') {
$v->accessname = JText::_('COM_KUNENA_INTEGRATION_JOOMLA_LEVEL') . ': ' . ($v->viewlevel ? JText::_($v->viewlevel) : JText::_('COM_KUNENA_NOBODY'));
} else {
$v->accessname = JText::_('COM_KUNENA_INTEGRATION_JOOMLA_LEVEL') . ': ' . ($v->viewlevel ? $v->viewlevel : JText::_('COM_KUNENA_NOBODY'));
}
} elseif ($v->accesstype != 'none') {
$v->accessname = JText::_('COM_KUNENA_INTEGRATION_' . strtoupper(preg_replace('/[^\\w\\d]+/', '_', $v->accesstype))) . ': ' . $v->access;
} elseif (KUNENA_JOOMLA_COMPAT == '1.5') {
// Joomla 1.5
if ($v->pub_access == 0) {
$v->accessname = JText::_('COM_KUNENA_PUBLIC');
} else {
if ($v->pub_access == -1) {
$v->accessname = JText::_('COM_KUNENA_ALLREGISTERED');
} else {
if ($v->pub_access == 1 || !$v->groupname) {
$v->accessname = JText::_('COM_KUNENA_NOBODY');
} else {
$v->accessname = JText::sprintf($v->pub_recurse ? 'COM_KUNENA_A_GROUP_X_PLUS' : 'COM_KUNENA_A_GROUP_X_ONLY', JText::_($v->groupname));
}
}
}
if ($v->pub_access > 0 && $v->admingroup && $v->pub_access != $v->admin_access) {
$v->accessname .= ' / ' . JText::sprintf($v->admin_recurse ? 'COM_KUNENA_A_GROUP_X_PLUS' : 'COM_KUNENA_A_GROUP_X_ONLY', JText::_($v->admingroup));
}
} else {
// Joomla 1.6+
$v->accessname = JText::sprintf($v->pub_recurse ? 'COM_KUNENA_A_GROUP_X_PLUS' : 'COM_KUNENA_A_GROUP_X_ONLY', $v->groupname ? JText::_($v->groupname) : JText::_('COM_KUNENA_NOBODY'));
if ($v->admingroup && $v->pub_access != $v->admin_access) {
$v->accessname .= ' / ' . JText::sprintf($v->admin_recurse ? 'COM_KUNENA_A_GROUP_X_PLUS' : 'COM_KUNENA_A_GROUP_X_ONLY', JText::_($v->admingroup));
}
}
if ($v->checked_out && !JTable::isCheckedOut(0, intval($v->checked_out))) {
$v->checked_out = 0;
$v->editor = '';
}
$children[$v->parent][] = $v;
$v->location = count($children[$v->parent]) - 1;
}
//.........这里部分代码省略.........
示例11: showNewsFeeds
//.........这里部分代码省略.........
<td colspan="10">
<?php
echo $pageNav->getListFooter();
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i = 0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
$link = JRoute::_('index.php?option=com_newsfeeds&task=edit&cid[]=' . $row->id);
$checked = JHTML::_('grid.checkedout', $row, $i);
$published = JHTML::_('grid.published', $row, $i);
$row->cat_link = JRoute::_('index.php?option=com_categories§ion=com_newsfeeds&task=edit&cid[]=' . $row->catid);
?>
<tr class="<?php
echo 'row' . $k;
?>
">
<td align="center">
<?php
echo $pageNav->getRowOffset($i);
?>
</td>
<td>
<?php
echo $checked;
?>
</td>
<td>
<?php
if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
echo $row->name;
} else {
?>
<span class="editlinktip hasTip" title="<?php
echo JText::_('Edit Newsfeed');
?>
::<?php
echo $row->name;
?>
">
<a href="<?php
echo $link;
?>
">
<?php
echo $row->name;
?>
</a></span>
<?php
}
?>
</td>
<td align="center">
<?php
echo $published;
?>
</td>
<td class="order">
<span><?php
echo $pageNav->orderUpIcon($i, $row->catid == @$rows[$i - 1]->catid, 'orderup', 'Move Up', $ordering);
?>
</span>
示例12: clients
//.........这里部分代码省略.........
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php
echo $pageNav->getListFooter();
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i = 0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
$row->id = $row->cid;
$link = JRoute::_('index.php?option=com_banners&c=client&task=edit&cid[]=' . $row->id);
$checked = JHTML::_('grid.checkedout', $row, $i);
?>
<tr class="<?php
echo "row{$k}";
?>
">
<td align="center">
<?php
echo $pageNav->getRowOffset($i);
?>
</td>
<td>
<?php
echo $checked;
?>
</td>
<td>
<?php
if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
echo $row->name;
} else {
?>
<span class="editlinktip hasTip" title="<?php
echo JText::_('Edit');
?>
::<?php
echo $row->name;
?>
">
<a href="<?php
echo $link;
?>
">
<?php
echo $row->name;
?>
</a>
</span>
<?php
}
?>
</td>
<td>
<?php
echo $row->contact;
?>
</td>
<td align="center">
<?php
echo $row->nbanners;
?>
</td>
<td align="center">
<?php
echo $row->cid;
?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
<input type="hidden" name="c" value="client" />
<input type="hidden" name="option" value="com_banners" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php
echo $lists['order'];
?>
" />
<input type="hidden" name="filter_order_Dir" value="<?php
echo $lists['order_Dir'];
?>
" />
<?php
echo JHTML::_('form.token');
?>
</form>
<?php
}
示例13: ligen
//.........这里部分代码省略.........
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
if ($val == 1) {
$menu = 'index.php?option=com_clm§ion=runden&liga=';
} else {
$menu = 'index.php?option=com_clm§ion=ligen&task=edit&cid[]=';
}
for ($i = 0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
$link = JRoute::_($menu . $row->id);
$checked = JHTML::_('grid.checkedout', $row, $i);
$published = JHTML::_('grid.published', $row, $i);
?>
<tr class="<?php
echo 'row' . $k;
?>
">
<td align="center">
<?php
echo $pageNav->getRowOffset($i);
?>
</td>
<td>
<?php
echo $checked;
?>
</td>
<td>
<?php
if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
echo $row->name;
} else {
$ligenedit = 'index.php?option=com_clm§ion=ligen&task=edit&cid[]=' . $row->id;
?>
<span class="editlinktip hasTip" title="<?php
echo JText::_('LEAGUE_OVERVIEW_TIP');
?>
::<?php
echo $row->name;
?>
">
<a href="<?php
echo $ligenedit;
?>
">
<?php
echo $row->name;
?>
</a>
<?php
}
?>
</span>
<?php
//}
?>
</td>
<td align="center"><?php
echo $row->saison;
?>
</td>
示例14:
echo $i % 2;
?>
">
<td>
<?php
echo $this->pagination->getRowOffset($i);
?>
</td>
<td>
<?php
echo JHtml::_('grid.checkedout', $item, $i);
?>
</td>
<td>
<?php
if (JTable::isCheckedOut($userId, $item->checked_out)) {
?>
<?php
echo $item->name;
?>
<?php
} else {
?>
<a href="<?php
echo JRoute::_('index.php?option=com_contact&task=contact.edit&cid[]=' . (int) $item->id);
?>
">
<?php
echo $this->escape($item->name);
?>
</a>
示例15: showPages
//.........这里部分代码省略.........
<td colspan="13">
<?php
echo $pageNav->getListFooter();
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i = 0, $n = count($rows); $i < $n; $i++) {
$row =& $rows[$i];
$link = 'index.php?option=com_flippingbook&task=edit_page&cid[]=' . $row->id;
$checked = JHTML::_('grid.checkedout', $row, $i);
$published = JHTML::_('grid.published', $row, $i);
?>
<tr class="<?php
echo "row{$k}";
?>
">
<td><?php
echo $pageNav->getRowOffset($i);
?>
</td>
<td><?php
echo $checked;
?>
</td>
<td align="center"><?php
echo $row->id;
?>
</td>
<td><?php
if (JTable::isCheckedOut($user->get('id'), $row->checked_out)) {
echo $row->title;
} else {
?>
<a href="<?php
echo JRoute::_($link);
?>
" title="<?php
echo JText::_('Edit Page');
?>
"><?php
echo $row->file;
?>
</a>
<?php
}
?>
</td>
<td width="1%" align="center"><?php
echo $row->book_id;
?>
</td>
<td align="left"><?php
echo $row->title;
?>
</td>
<td align="center"><?php
echo $published;
?>
</td>
<td align="center"><?php
echo $row->link_url;
?>