本文整理汇总了PHP中Criteria::setStart方法的典型用法代码示例。如果您正苦于以下问题:PHP Criteria::setStart方法的具体用法?PHP Criteria::setStart怎么用?PHP Criteria::setStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Criteria
的用法示例。
在下文中一共展示了Criteria::setStart方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: b_mysearch_last_search_show
function b_mysearch_last_search_show()
{
include_once XOOPS_ROOT_PATH . '/modules/mysearch/include/functions.php';
$mysearch_handler =& xoops_getmodulehandler('searches', 'mysearch');
$visiblekeywords = 0;
$block = array();
$visiblekeywords = mysearch_getmoduleoption('showindex');
if ($visiblekeywords > 0) {
$block['visiblekeywords'] = $visiblekeywords;
$totalcount = $mysearch_handler->getCount();
$start = 0;
$critere = new Criteria('mysearchid', 0, '<>');
$critere->setSort('datesearch');
$critere->setLimit($visiblekeywords);
$critere->setStart($start);
$critere->setOrder('DESC');
$tmpmysearch = new searches();
$elements = $mysearch_handler->getObjects($critere);
foreach ($elements as $oneelement) {
$search = array();
$search['keyword'] = $oneelement->getVar('keyword');
$search['date'] = formatTimestamp(strtotime($oneelement->getVar('datesearch')));
$search['uid'] = $oneelement->getVar('keyword');
$search['uname'] = $tmpmysearch->uname($oneelement->getVar('uid'));
$search['link'] = "<a href='" . XOOPS_URL . '/search.php?query=' . $oneelement->getVar('keyword') . "&action=results' target='_blank'>";
$block['searches'][] = $search;
unset($search);
}
}
return $block;
}
示例2: search
/**
* @brief search file
*
* @param query query
* @param limit the maximum number of rows to return
* @param offset the offset of the first row to return
* @param uid user ID
* @return array of item id
*/
function search($query, $limit, $offset, $uid)
{
$msg = false;
$iids = false;
$dummy = false;
$search_cache_id = false;
$_SESSION['XNPSID'] = session_id();
$member_handler =& xoops_gethandler('member');
if (empty($GLOBALS['xoopsUser'])) {
$GLOBALS['xoopsUser'] = $member_handler->getUser($uid);
}
if (xnpSearchExec('quicksearch', $query, 'all', false, $dummy, $dummy, $dummy, $search_cache_id, false, 'file')) {
// search_cache_id -> file_ids
$criteria = new Criteria('search_cache_id', $search_cache_id);
$criteria->setSort('item_id');
$criteria->setStart($offset);
if ($limit) {
$criteria->setLimit($limit);
}
$join = new XooNIpsJoinCriteria('xoonips_search_cache_file', 'file_id', 'file_id', 'LEFT');
$file_handler =& xoonips_getormhandler('xoonips', 'file');
$files =& $file_handler->getObjects($criteria, false, 'item_id', true, $join);
if (false === $files) {
return false;
}
$item_ids = array();
foreach ($files as $file) {
$item_ids[] = $file->get('item_id');
}
return $item_ids;
} else {
return false;
}
}
示例3: getAllVats
/**
* Return All TAX
*
* @param integer $start Position de départ
* @param integer $limit Nombre total d'enregistrements à renvoyer
* @param string $order Champ sur lequel faire le tri
* @param string $order Ordre du tri
* @param boolean $idaskey Indique si le tableau renvoyé doit avoir pour clé l'identifiant unique de l'enregistrement
* @return array tableau d'objets de type TVA
*/
function getAllVats($start = 0, $limit = 0, $sort = 'vat_id', $order = 'ASC', $idaskey = true)
{
$critere = new Criteria('vat_id', 0, '<>');
$critere->setLimit($limit);
$critere->setStart($start);
$critere->setSort($sort);
$critere->setOrder($order);
$tblVats = array();
$tblVats = $this->getObjects($critere, $idaskey);
return $tblVats;
}
示例4: getAllStores
/**
* Renvoie la liste de tous les vendeurs du module
*
* @param integer $start Position de départ
* @param integer $limit Nombre total d'enregistrements à renvoyer
* @param string $order Champ sur lequel faire le tri
* @param string $order Ordre du tri
* @param boolean $idaskey Indique si le tableau renvoyé doit avoir pour clé l'identifiant unique de l'enregistrement
* @return array tableau d'objets de type stores
*/
function getAllStores($start = 0, $limit = 0, $sort = 'store_name', $order = 'ASC', $idaskey = true)
{
$critere = new Criteria('store_id', 0, '<>');
$critere->setLimit($limit);
$critere->setStart($start);
$critere->setSort($sort);
$critere->setOrder($order);
$tbl_categs = array();
$tbl_categs = $this->getObjects($critere, $idaskey);
return $tbl_categs;
}
示例5: getLastVotes
/**
* Returns the (x) last votes
*
* @param integer $start Starting position
* @param integer $limit count of items to return
* @return array Array of votedata objects
*/
function getLastVotes($start = 0, $limit = 0)
{
$tbl_datas = array();
$criteria = new Criteria('vote_ratingid', 0, '<>');
$criteria->setLimit($limit);
$criteria->setStart($start);
$criteria->setSort('vote_ratingtimestamp');
$criteria->setOrder('DESC');
$tbl_datas = $this->getObjects($criteria, true);
return $tbl_datas;
}
示例6: getAllVats
/**
* Renvoie la liste de toutes les TVA du module
*
* @param integer $start Position de départ
* @param integer $limit Nombre total d'enregistrements à renvoyer
* @param string $order Champ sur lequel faire le tri
* @param string $order Ordre du tri
* @param boolean $idaskey Indique si le tableau renvoyé doit avoir pour clé l'identifiant unique de l'enregistrement
* @return array tableau d'objets de type TVA
*/
public function getAllVats(oledrion_parameters $parameters)
{
$parameters = $parameters->extend(new oledrion_parameters(array('start' => 0, 'limit' => 0, 'sort' => 'vat_id', 'order' => 'ASC', 'idaskey' => true)));
$critere = new Criteria('vat_id', 0, '<>');
$critere->setLimit($parameters['limit']);
$critere->setStart($parameters['start']);
$critere->setSort($parameters['sort']);
$critere->setOrder($parameters['order']);
$vats = array();
$vats = $this->getObjects($critere, $parameters['idaskey']);
return $vats;
}
示例7: getAllLocation
public function getAllLocation(oledrion_parameters $parameters)
{
$parameters = $parameters->extend(new oledrion_parameters(array('start' => 0, 'limit' => 0, 'sort' => 'location_id', 'order' => 'ASC')));
$critere = new Criteria('location_id', 0, '<>');
$critere->setLimit($parameters['limit']);
$critere->setStart($parameters['start']);
$critere->setSort($parameters['sort']);
$critere->setOrder($parameters['order']);
$location = array();
$location = $this->getObjects($critere);
return $location;
}
示例8: getProductsIdsFromManufacturer
/**
* Retourne les identifiants des produits d'un fabricant
*
* @param intege $pm_manu_id L'identifiant du fabricant
* @return array Les ID des produits
*/
function getProductsIdsFromManufacturer($pm_manu_id, $start = 0, $limit = 0)
{
$ret = array();
$criteria = new Criteria('pm_manu_id', $pm_manu_id, '=');
$criteria->setStart($start);
$criteria->setLimit($limit);
$items = $this->getObjects($criteria, false, false, 'pm_product_id', false);
if (count($items) > 0) {
foreach ($items as $item) {
$ret[] = $item['pm_product_id'];
}
}
return $ret;
}
示例9: getProductFiles
/**
* Retourne les fichiers attachés à un produit
*
* @param integer $file_product_id L'Id du produit
* @param integer $start Position de départ
* @param integer $limit Nombre maxi de produits à retourner
* @return array tableau d'objets de type myshop_files
*/
function getProductFiles($file_product_id, $start = 0, $limit = 0)
{
$criteria = new Criteria('file_product_id', $file_product_id, '=');
$criteria->setStart($start);
$criteria->setLimit($limit);
return $this->getObjects($criteria);
}
示例10: Criteria
function &getMemberObjects($limit=0, $start=0, $order_by_rand=false)
{
$criteria = new Criteria('cm.c_commu_id', $this->getVar('c_commu_id'));
$criteria->setLimit($limit);
$criteria->setStart($start);
if($order_by_rand){
$criteria->setSort('RAND()');
}
return $this->handler['member']->getObjects($criteria);
}
示例11: getItems
/**
* A generic shortcut to getObjects
*
* @author Herve Thouzard - Instant Zero
*
* @param integer $start Starting position
* @param integer $limit Maximum count of elements to return
* @param string $sort Field to use for the sort
* @param string $order Sort order
* @param boolean $idAsKey Do we have to return an array whoses keys are the record's ID ?
* @return array Array of current objects
*/
function getItems($start = 0, $limit = 0, $sort = '', $order = 'ASC', $idAsKey = true)
{
if (trim($order) == '') {
if (isset($this->identifierName) && trim($this->identifierName) != '') {
$order = $this->identifierName;
} else {
$order = $this->keyName;
}
}
$items = array();
$critere = new Criteria($this->keyName, 0, '<>');
$critere->setLimit($limit);
$critere->setStart($start);
$critere->setSort($sort);
$critere->setOrder($order);
$items = $this->getObjects($critere, $idAsKey);
return $items;
}
示例12: upgradeDB
//.........这里部分代码省略.........
foreach ($startStatuses as $desc => $state) {
$newStatus =& $hStatus->create();
$newStatus->setVar('id', $count);
$newStatus->setVar('description', $desc);
$newStatus->setVar('state', $state);
if (!$hStatus->insert($newStatus)) {
echo "<li>" . sprintf(_AM_XHELP_MSG_ADD_STATUS_ERR, $desc) . "</li>";
} else {
echo "<li>" . sprintf(_AM_XHELP_MSG_ADD_STATUS, $desc) . "</li>";
}
$count++;
}
// Change old status values to new status values
$oldStatuses = array(2 => 3, 1 => 2, 0 => 1);
foreach ($oldStatuses as $cStatus => $newStatus) {
$crit = new Criteria('status', $cStatus);
$success = $hTicket->updateAll('status', $newStatus, $crit);
}
if ($success) {
echo "<li>" . _AM_XHELP_MSG_CHANGED_STATUS . "</li>";
} else {
echo "<li>" . _AM_XHELP_MSG_CHANGED_STATUS_ERR . "</li>";
}
// Add xhelp_ticket_submit_emails table
$ret = $ret && _runQuery(sprintf("CREATE TABLE %s (ticketid int(11) NOT NULL default '0',\r\n uid int(11) NOT NULL default '0',\r\n email varchar(100) NOT NULL default '',\r\n suppress int(11) NOT NULL default '0',\r\n PRIMARY KEY(ticketid, email)\r\n )ENGINE=MyISAM;", $xoopsDB->prefix('xhelp_ticket_submit_emails')), sprintf(_AM_XHELP_MSG_ADDTABLE, 'xhelp_ticket_submit_emails'), sprintf(_AM_XHELP_MSG_ADDTABLE_ERR, 'xhelp_ticket_submit_emails'));
// Add records to xhelp_ticket_submit_emails for existing tickets
$count = $hTicket->getCount();
$batchsize = 100;
$crit = new Criteria('', '');
$crit->setLimit($batchsize);
$i = 0;
while ($i <= $count) {
set_time_limit(60);
$crit->setStart($i);
$tickets =& $hTicket->getObjects($crit);
$all_users = array();
foreach ($tickets as $ticket) {
$all_users[$ticket->getVar('uid')] = $ticket->getVar('uid');
}
$crit = new Criteria('uid', "(" . implode(array_keys($all_users), ',') . ")", 'IN');
$users =& $hXoopsMember->getUsers($crit, true);
foreach ($users as $user) {
$all_users[$user->getVar('uid')] = $user->getVar('email');
}
unset($users);
foreach ($tickets as $ticket) {
set_time_limit(60);
$ticket_uid = $ticket->getVar('uid');
if (array_key_exists($ticket_uid, $all_users)) {
$ticket_email = $all_users[$ticket_uid];
$success = $ticket->addSubmitter($ticket_email, $ticket_uid);
}
}
unset($tickets);
//increment
$i += $batchsize;
}
set_time_limit(60);
// Update xhelp_roles Admin record with new value (2047)
$crit = new Criteria('tasks', 511);
$admin_roles =& $hRole->getObjects($crit);
foreach ($admin_roles as $role) {
$role->setVar('tasks', 2047);
if ($hRole->insert($role)) {
echo "<li>" . sprintf(_AM_XHELP_MSG_UPDATE_ROLE, $role->getVar('name')) . "</li>";
} else {
示例13: manageFields
function manageFields()
{
global $oAdminButton, $imagearray;
$session =& Session::singleton();
$regex_array =& _getRegexArray();
$hFields =& xhelpGetHandler('ticketField');
$start = $limit = 0;
if (isset($_GET['limit'])) {
$limit = intval($_GET['limit']);
}
if (isset($_GET['start'])) {
$start = intval($_GET['start']);
}
if (!$limit) {
$limit = 15;
}
if (!isset($_POST['addField'])) {
$crit = new Criteria('', '');
$crit->setLimit($limit);
$crit->setStart($start);
$crit->setSort('weight');
$crit->setOrder('ASC');
$count = $hFields->getCount($crit);
$fields =& $hFields->getObjects($crit);
//Display List of Current Fields, form for new field
xoops_cp_header();
echo $oAdminButton->renderButtons('manfields');
if ($count) {
$nav = new XoopsPageNav($count, $limit, $start, 'start', "op=manageFields&limit={$limit}");
echo "<table width='100%' cellspacing='1' class='outer'>\r\n <tr><th colspan='7'><label>" . _AM_XHELP_TEXT_MANAGE_FIELDS . "</label></th></tr>";
echo "<tr class='head'>\r\n <td>" . _AM_XHELP_TEXT_ID . "</td>\r\n <td>" . _AM_XHELP_TEXT_NAME . "</td>\r\n <td>" . _AM_XHELP_TEXT_DESCRIPTION . "</td>\r\n <td>" . _AM_XHELP_TEXT_FIELDNAME . "</td>\r\n <td>" . _AM_XHELP_TEXT_CONTROLTYPE . "</td>\r\n <td>" . _AM_XHELP_TEXT_REQUIRED . "</td>\r\n <td>" . _AM_XHELP_TEXT_ACTIONS . "</td>\r\n </tr>";
$req_link_params = array('op' => 'setFieldRequired', 'setrequired' => 1, 'id' => 0);
foreach ($fields as $field) {
$req_link_params['id'] = $field->getVar('id');
if ($field->getVar('required')) {
$req_link_params['setrequired'] = 0;
$req_img = $imagearray['online'];
$req_title = _AM_XHELP_MESSAGE_DEACTIVATE;
} else {
$req_link_params['setrequired'] = 1;
$req_img = $imagearray['offline'];
$req_title = _AM_XHELP_MESSAGE_ACTIVATE;
}
$edit_url = xhelpMakeURI(XHELP_ADMIN_URL . '/fields.php', array('op' => 'editfield', 'id' => $field->getVar('id')));
$del_url = xhelpMakeURI(XHELP_ADMIN_URL . '/fields.php', array('op' => 'delfield', 'id' => $field->getVar('id')));
echo "<tr class='even'><td>" . $field->getVar('id') . "</td>\r\n <td>" . $field->getVar('name') . "</td>\r\n <td>" . $field->getVar('description') . "</td>\r\n <td>" . $field->getVar('fieldname') . "</td>\r\n <td>" . xhelpGetControlLabel($field->getVar('controltype')) . "</td>\r\n <td><a href='" . xhelpMakeURI(XHELP_ADMIN_URL . '/fields.php', $req_link_params) . "' title='{$req_title}'>{$req_img}</a></td>\r\n <td><a href='{$edit_url}'>{$imagearray['editimg']}</a>\r\n <a href='{$del_url}'>{$imagearray['deleteimg']}</a></td>\r\n </tr>";
}
echo '</table>';
//Render Page Nav
echo "<div id='pagenav'>" . $nav->renderNav() . "</div><br />";
}
//Get Custom Field From session (if exists)
$field_info = $session->get('xhelp_addField');
$field_errors = $session->get('xhelp_addFieldErrors');
$hDepts =& xhelpGetHandler('department');
$depts =& $hDepts->getObjects();
$deptarr = array();
foreach ($depts as $obj) {
$deptarr[$obj->getVar('id')] = $obj->getVar('department');
}
if (!$field_info === false) {
//extract($field_info , EXTR_PREFIX_ALL , 'fld_');
$fld_controltype = $field_info['controltype'];
$fld_datatype = $field_info['datatype'];
$fld_departments = $field_info['departments'];
$fld_name = $field_info['name'];
$fld_fieldname = $field_info['fieldname'];
$fld_description = $field_info['description'];
$fld_required = $field_info['required'];
$fld_length = $field_info['length'];
$fld_weight = $field_info['weight'];
$fld_defaultvalue = $field_info['defaultvalue'];
$fld_values = $field_info['values'];
$fld_validation = $field_info['validation'];
} else {
$fld_controltype = '';
$fld_datatype = '';
$fld_departments = array_keys($deptarr);
$fld_name = '';
$fld_fieldname = '';
$fld_description = '';
$fld_required = '';
$fld_length = '';
$fld_weight = '';
$fld_defaultvalue = '';
$fld_values = '';
$fld_validation = '';
}
if (!$field_errors === false) {
xhelpRenderErrors($field_errors, xhelpMakeURI(XHELP_ADMIN_URL . '/fields.php', array('op' => 'clearAddSession')));
}
//Add Field Form
$controls = xhelpGetControlArray();
$control_select = new XoopsFormSelect(_AM_XHELP_TEXT_CONTROLTYPE, 'fld_controltype', $fld_controltype);
foreach ($controls as $key => $control) {
$control_select->addOption($key, $control['label']);
}
$datatypes = array(_XHELP_DATATYPE_TEXT => _XHELP_DATATYPE_TEXT, _XHELP_DATATYPE_NUMBER_INT => _XHELP_DATATYPE_NUMBER_INT, _XHELP_DATATYPE_NUMBER_DEC => _XHELP_DATATYPE_NUMBER_DEC);
$datatype_select = new XoopsFormSelect(_AM_XHELP_TEXT_DATATYPE, 'fld_datatype', $fld_datatype);
$datatype_select->addOptionArray($datatypes);
//.........这里部分代码省略.........
示例14: search
/**
* @brief search item
*
* @param query query ( string or CriteriaElement )
* @param limit the maximum number of rows to return(0 = no limit)
* @param offset the offset of the first row to return(0 = from beginning)
* @param uid user ID
* @return array of item id
*/
function search($query, $limit, $offset, $uid)
{
if (!$this->iteminfo) {
return array();
}
$modulename = $this->iteminfo['ormcompo']['module'];
$dummy = false;
$search_cache_id = false;
// save xoopsUser
if (isset($GLOBALS['xoopsUser'])) {
$old_xoopsUser = $GLOBALS['xoopsUser'];
} else {
$old_xoopsUser = null;
}
// prepare for xnpSearchExec
$member_handler =& xoops_gethandler('member');
$GLOBALS['xoopsUser'] = $member_handler->getUser($uid);
// search
$item_ids = array();
if (xnpSearchExec('quicksearch', $query, $modulename, false, $dummy, $dummy, $dummy, $search_cache_id, false, 'item_metadata')) {
$search_cache_item_handler =& xoonips_getormhandler('xoonips', 'search_cache_item');
$criteria = new Criteria('search_cache_id', $search_cache_id);
$criteria->setSort('item_id');
$criteria->setStart($offset);
if ($limit) {
$criteria->setLimit($limit);
}
$search_cache_items =& $search_cache_item_handler->getObjects($criteria);
foreach ($search_cache_items as $search_cache_item) {
$item_ids[] = $search_cache_item->get('item_id');
}
}
// restore xoopsUser
$GLOBALS['xoopsUser'] = $old_xoopsUser;
return $item_ids;
}
示例15: search
public static function search()
{
$publisher =& PublisherPublisher::getInstance();
global $limit, $start, $imagearray, $aSearchBy, $aOrderBy, $aLimitBy, $aSortBy;
if (XoopsRequest::getString('deleteMimes', '', 'POST')) {
$aMimes = XoopsRequest::getArray('mimes', array(), 'POST');
$crit = new Criteria('mime_id', '(' . implode($aMimes, ',') . ')', 'IN');
if ($publisher->getHandler('mimetype')->deleteAll($crit)) {
header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit={$limit}&start={$start}");
} else {
redirect_header(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit={$limit}&start={$start}", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR);
}
}
if (XoopsRequest::getString('add_mime', '', 'POST')) {
// header("Location: " . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit");
redirect_header(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start={$start}&limit={$limit}", 3, _AM_PUBLISHER_MIME_CREATEF);
// exit();
}
$order = XoopsRequest::getString('order', 'ASC', 'POST');
$sort = XoopsRequest::getString('sort', 'mime_name', 'POST');
publisherCpHeader();
//publisher_adminMenu(4, _AM_PUBLISHER_MIMETYPES . " > " . _AM_PUBLISHER_BUTTON_SEARCH);
publisherOpenCollapsableBar('mimemsearchtable', 'mimesearchicon', _AM_PUBLISHER_MIME_SEARCH);
if (!XoopsRequest::getString('mime_search', '', 'POST')) {
echo "<form action='mimetypes.php?op=search' method='post'>";
echo "<table width='100%' cellspacing='1' class='outer'>";
echo "<tr><th colspan='2'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>';
echo "<tr><td class='head' width='20%'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td>\n <td class='even'>\n <select name='search_by'>";
foreach ($aSortBy as $value => $text) {
echo "<option value='{$value}'>{$text}</option>";
}
unset($value, $text);
echo '</select>
</td>
</tr>';
echo "<tr><td class='head'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td>\n <td class='even'>\n <input type='text' name='search_text' id='search_text' value='' />\n </td>\n </tr>";
echo "<tr class='foot'>\n <td colspan='2'>\n <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' />\n </td>\n </tr>";
echo '</table></form>';
} else {
$searchField = XoopsRequest::getString('search_by', '', 'POST');
$searchText = XoopsRequest::getString('search_text', '', 'POST');
$crit = new Criteria($searchField, "%{$searchText}%", 'LIKE');
$crit->setSort($sort);
$crit->setOrder($order);
$crit->setLimit($limit);
$crit->setStart($start);
$mimeCount =& $publisher->getHandler('mimetype')->getCount($crit);
$mimetypes =& $publisher->getHandler('mimetype')->getObjects($crit);
$nav = new XoopsPageNav($mimeCount, $limit, $start, 'start', "op=search&limit={$limit}&order={$order}&sort={$sort}&mime_search=1&search_by={$searchField}&search_text={$searchText}");
// Display results
echo '<script type="text/javascript" src="' . PUBLISHER_URL . '/include/functions.js"></script>';
echo "<table width='100%' cellspacing='1' class='outer'>";
echo "<tr><td colspan='6' align='right'>";
echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
echo '<table>';
echo '<tr>';
echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . '</td>';
echo "<td align='left'><select name='search_by'>";
foreach ($aSearchBy as $value => $text) {
$searchField == $value ? $selected = "selected='selected'" : ($selected = '');
echo "<option value='{$value}' {$selected}>{$text}</option>";
}
unset($value, $text);
echo '</select></td>';
echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . '</td>';
echo "<td align='left'><input type='text' name='search_text' id='search_text' value='{$searchText}' /></td>";
echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "' /></td>";
echo '</tr></table></form></td></tr>';
echo "<tr><td colspan='6'>";
echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>";
echo "<table width='100%'>";
echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . "\n <select name='sort'>";
foreach ($aSortBy as $value => $text) {
$sort == $value ? $selected = "selected='selected'" : ($selected = '');
echo "<option value='{$value}' {$selected}>{$text}</option>";
}
unset($value, $text);
echo '</select>
' . _AM_PUBLISHER_TEXT_ORDER_BY . "\n <select name='order'>";
foreach ($aOrderBy as $value => $text) {
$order == $value ? $selected = "selected='selected'" : ($selected = '');
echo "<option value='{$value}' {$selected}>{$text}</option>";
}
unset($value, $text);
echo '</select>
' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . "\n <select name='limit'>";
foreach ($aLimitBy as $value => $text) {
$limit == $value ? $selected = "selected='selected'" : ($selected = '');
echo "<option value='{$value}' {$selected}>{$text}</option>";
}
unset($value, $text);
echo "</select>\n <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' />\n <input type='hidden' name='mime_search' id='mime_search' value='1' />\n <input type='hidden' name='search_by' id='search_by' value='{$searchField}' />\n <input type='hidden' name='search_text' id='search_text' value='{$searchText}' />\n </td>\n </tr>";
echo '</table>';
echo '</td></tr>';
if (count($mimetypes) > 0) {
echo "<tr><th colspan='6'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>';
echo "<tr class='head'>\n <td>" . _AM_PUBLISHER_MIME_ID . '</td>
<td>' . _AM_PUBLISHER_MIME_NAME . "</td>\n <td align='center'>" . _AM_PUBLISHER_MIME_EXT . "</td>\n <td align='center'>" . _AM_PUBLISHER_MIME_ADMIN . "</td>\n <td align='center'>" . _AM_PUBLISHER_MIME_USER . "</td>\n <td align='center'>" . _AM_PUBLISHER_MINDEX_ACTION . '</td>
//.........这里部分代码省略.........