當前位置: 首頁>>代碼示例>>PHP>>正文


PHP box::menuBoxContents方法代碼示例

本文整理匯總了PHP中box::menuBoxContents方法的典型用法代碼示例。如果您正苦於以下問題:PHP box::menuBoxContents方法的具體用法?PHP box::menuBoxContents怎麽用?PHP box::menuBoxContents使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在box的用法示例。


在下文中一共展示了box::menuBoxContents方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: each

while (list(, $block_content) = each($blocks_contents)) {
    $heading = array();
    $contents = array();
    $contents_string = '';
    reset($block_content['pages']);
    while (list($filename, $pagetitle) = each($block_content['pages'])) {
        $url_params = '';
        if (strpos($filename, '?')) {
            $url_params = substr($filename, strpos($filename, '?') + 1) . '&';
            $filename = substr($filename, 0, strpos($filename, '?'));
        }
        $contents_check_query = tep_db_query("select count(*) as total from " . TABLE_USERS . " u, " . TABLE_USERS_GROUPS_TO_CONTENT . " ug where u.users_groups_id = ug.users_groups_id and u.users_id = '" . tep_db_input($REMOTE_USER) . "' and ug.filename = '" . tep_db_input($filename) . "'");
        $contents_check = tep_db_fetch_array($contents_check_query);
        if ($contents_check['total'] > 0) {
            if (!$heading) {
                $heading[] = array('text' => $block_content['title'], 'link' => tep_href_link($filename, $url_params . 'selected_box=' . $block_content['id']));
            }
            $contents_string .= '<a href="' . tep_href_link($filename, $url_params . 'selected_box=' . $block_content['id']) . '" class="menuBoxContentLink">' . $pagetitle . '</a><br>';
        }
    }
    if (tep_not_null($contents_string)) {
        echo '		  <tr>' . "\n" . '			<td>';
        $contents[] = array('text' => $contents_string);
        $box = new box();
        $box->table_data_parameters = 'class="menuBoxHeading" onclick="openMenu(\'contents' . $block_content['id'] . '\');"';
        echo $box->menuBoxHeading($heading);
        $box->table_data_parameters = 'class="menuBoxContent" id="contents' . $block_content['id'] . '"' . ($selected_box == $block_content['id'] ? '' : ' style="display: none;"') . '';
        echo $box->menuBoxContents($contents);
        echo '			</td>' . "\n" . '		  </tr>';
    }
}
開發者ID:rabbit-source,項目名稱:setbook.ru,代碼行數:31,代碼來源:column_left.php


注:本文中的box::menuBoxContents方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。