本文整理匯總了PHP中FSS_Input::GetInt方法的典型用法代碼示例。如果您正苦於以下問題:PHP FSS_Input::GetInt方法的具體用法?PHP FSS_Input::GetInt怎麽用?PHP FSS_Input::GetInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FSS_Input
的用法示例。
在下文中一共展示了FSS_Input::GetInt方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _
//.........這裏部分代碼省略.........
$current_access = $FSSRoute_access[FSS_Input::getInt('Itemid')];
}
if ($d) {
echo "Incoming Link : {$url}<br>";
echo "Cur Item ID : " . FSS_Input::getInt('Itemid') . "<br>";
//print_p($FSSRoute_menus);
}
foreach ($FSSRoute_menus as $id => $vars) {
if ($d) {
echo "{$id} => <Br>";
print_p($vars);
}
// need to check if the access level is the same
if ($current_access && array_key_exists($id, $FSSRoute_access) && $FSSRoute_access[$id] != $current_access) {
if ($d) {
echo "No Access<br>";
}
continue;
}
$count = FSSRoute::MatchVars($urivars, $vars);
if (FSS_Input::getInt('Itemid') == $id && $count > 0) {
if ($d) {
echo "Current ItemId: increase count<br>";
}
$count++;
}
if ($d) {
echo "Count: {$count}<br>";
}
if ($count > $bestcount) {
if ($d) {
echo "New best match - {$id}<br>";
}
$bestcount = $count;
$bestmatch = $id;
}
}
if ($bestcount == 0 && array_key_exists('view', $sourcevars) && substr($sourcevars['view'], 0, 6) == "admin_") {
foreach ($FSSRoute_menus as $id => $item) {
// need to check if the access level is the same
if ($current_access && array_key_exists($id, $FSSRoute_access) && $FSSRoute_access[$id] != $current_access) {
continue;
}
if ($item['view'] == "admin") {
$bestcount = 1;
$bestmatch = $id;
}
}
}
// no match found, try to fallback on the main support menu id
if ($bestcount == 0) {
foreach ($FSSRoute_menus as $id => $item) {
// need to check if the access level is the same
if ($current_access && array_key_exists($id, $FSSRoute_access) && $FSSRoute_access[$id] != $current_access) {
continue;
}
if ($item['view'] == "main") {
$bestcount = 1;
$bestmatch = $id;
}
}
}
if ($bestcount == 0) {
// still no match found, use any fss menu
if (count($FSSRoute_menus) > 0) {
foreach ($FSSRoute_menus as $id => $item) {
// need to check if the access level is the same
if ($current_access && array_key_exists($id, $FSSRoute_access) && $FSSRoute_access[$id] != $current_access) {
continue;
}
$bestcount = 1;
$bestmatch = $id;
break;
}
}
}
if ($d) {
echo "Best Found : {$bestcount}, {$bestmatch}<br>";
}
// sticky menu items
if (FSS_Settings::get('sticky_menus_type')) {
$cur_item_id = FSS_Input::GetInt("Itemid");
if ($cur_item_id > 0) {
$sticky_ids = explode(";", FSS_Settings::get('sticky_menus'));
if (FSS_Settings::get('sticky_menus_type') == 1 && in_array($cur_item_id, $sticky_ids) || FSS_Settings::get('sticky_menus_type') == 2 && !in_array($cur_item_id, $sticky_ids)) {
$bestcount = 0;
$uri->setVar('Itemid', $cur_item_id);
}
}
}
if ($bestcount > 0) {
$uri->setVar('Itemid', $bestmatch);
// we need to remove parameters that are in the main url as well as the sub one
// wait till 2.2 for this change as it may break stuff
}
if ($d) {
echo "Using : " . $uri->toString(array('path', 'query', 'fragment')) . "<br>";
}
return JRoute::_($uri->toString(array('path', 'query', 'fragment')), $xhtml, $ssl);
}
示例2:
?>
<?php
if ($cat['section'] != $sect && $cat['section'] != "") {
if ($open) {
echo "</optgroup>";
}
$open = true;
echo "<optgroup label='" . $cat['section'] . "'>";
$sect = $cat['section'];
}
?>
<option value='<?php
echo $cat['id'];
?>
' <?php
if (FSS_Input::GetInt('catid') == $cat['id']) {
echo "selected='selected'";
}
?>
><?php
echo $cat['title'];
?>
</option>
<?php
}
?>
<?php
if ($open) {
echo "</optgroup>";
}
?>
示例3: display
function display($tpl = null)
{
$autologin = FSS_Input::getCmd('login');
if ($autologin != "") {
FSS_Helper::AutoLogin($autologin);
}
if (!FSS_Permission::auth("fss.ticket.view", "com_fss.support_user") && !FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
return FSS_Helper::NoPerm();
}
$session = JFactory::getSession();
$user = JFactory::getUser();
$this->userid = $user->get('id');
$this->ticket = null;
$this->assign('tmpl', '');
$what = FSS_Input::getCmd('what');
$layout = FSS_Input::getCmd('layout');
$this->ticket_view = FSS_Input::getCmd('tickets');
if (!$this->ticket_view && FSS_Settings::get('support_simple_userlist_tabs')) {
$this->ticket_view = "all";
}
// reset the login and password
if ($what == "reset") {
$session->clear('ticket_email');
$session->clear('ticket_reference');
$session->clear('ticket_name');
$session->clear('ticket_pass');
}
if ($what == "unreg_passlist") {
return $this->Unreg_Passlist();
}
if ($what == "addccuser") {
return $this->AddCCUser();
}
if ($what == "removeccuser") {
return $this->RemoveCCUser();
}
if ($what == "pickccuser") {
return $this->PickCCUser();
}
// should we display the edit field screen
if ($what == 'editfield') {
return $this->EditField();
}
// save an edited field and continue what we were doing afterwards
if ($what == 'savefield') {
if ($this->SaveField()) {
return;
}
}
FSS_Helper::AddSCEditor();
// check for product search ajax display
if (FSS_Input::getString('prodsearch') != "") {
return $this->searchProducts();
}
if (FSS_Input::getString('deptsearch') != "") {
return $this->searchDepartments();
}
// page to hunt for unregistered ticket
if ($what == "find") {
return $this->findTicket();
}
// save status changes
if ($what == "statuschange") {
return $this->saveStatusChanges();
}
// save any replys
if ($what == 'savereply') {
return $this->saveReply();
}
// save any replys
if ($what == 'messages') {
return $this->showMessages();
}
// process any file downloads
$fileid = FSS_Input::getInt('fileid');
if ($fileid > 0) {
$ticketid = FSS_Input::GetInt('ticketid');
if ($what == 'attach_thumb') {
return SupportHelper::attachThumbnail($ticketid, $fileid, true);
} else {
return SupportHelper::attachDownload($ticketid, $fileid, true);
}
}
$this->count = $this->get('TicketCount');
// handle opening ticket
if ($layout == "open") {
return $this->doOpenTicket();
}
// handel ticket reply
if ($layout == "reply") {
return $this->doUserReply();
}
// display ticket list / ticket
return $this->doDisplayTicket();
}