function getNextLink()
{
    $paged = getCurrentPage();
    if ($paged === getMaxPage()) {
        echo '#';
    } else {
        echo getPageLink($paged + 1);
    }
}
Example #2
0
?>
		</div>
		<div class="btnbox2">
		<span class="btn00"><a href="<?php 
echo $g['bbs_reset'];
?>
">처음목록</a></span>
		<span class="btn00"><a href="<?php 
echo $g['bbs_list'];
?>
">새로고침</a></span>
		</div>
		<div class="clear"></div>
		<div class="pagebox01">
		<?php 
echo getPageLink($d['theme']['pagenum'], $p, $TPG, $g['img_core'] . '/page/default');
?>
		</div>
	</div>

	<div class="searchform">
		<form name="bbssearchf" action="<?php 
echo $g['s'];
?>
/">
		<input type="hidden" name="r" value="<?php 
echo $r;
?>
" />
		<input type="hidden" name="c" value="<?php 
echo $c;
Example #3
0
&amp;m=admin&amp;pickmodule=<?php 
    echo $m;
    ?>
&amp;front=skin&amp;theme=<?php 
    echo $d['bbs']['skin'];
    ?>
&panel=Y"><i class="fa fa-cog"></i> 관리</a></span>
                        </span>
                    </div>      
                  <?php 
}
?>
        
                    <div class="col-sm-10 text-center">
                       <span class="pagination pagination-sm"><?php 
echo getPageLink($d['theme']['pagenum'], $p, $TPG, '');
?>
</span>
                    </div>
                    <div class="col-sm-1 pull-right">
                        <span class="pull-right pagination"> 
                           <a class="btn btn-default" href="<?php 
echo $g['bbs_write'];
?>
"><i class="fa fa-pencil"></i> 등록</a>
                        </span>
                    </div>
              </div>
        </div> <!-- .panel-footer --> 
    </div> <!-- .panel panel-default rb-panel-table -->
</section>
Example #4
0
function getPagingHeader()
{
    global $pageStart, $usePaging, $pagingNumberOfPages, $pagingActualPage, $pageNumber, $files;
    static $displayPages = array();
    if (count($displayPages) == 0) {
        $displayPages[] = 0;
        for ($i = $pagingActualPage - 1; $i < $pagingActualPage + 3; $i++) {
            if ($i >= 0 && $i < $pagingNumberOfPages) {
                $displayPages[] = $i;
            }
        }
        $displayPages[] = $pagingNumberOfPages - 1;
        $displayPages = array_unique($displayPages);
    }
    $header = translate("pages") . "&nbsp;&nbsp;";
    if ($pageStart > 0) {
        $header .= getPageLink($pageStart - $usePaging, "&laquo;", translate("previous"));
    }
    if ($pageStart + $usePaging < count($files)) {
        $header .= getPageLink($pageStart + $usePaging, "&raquo;", translate("next"));
    }
    foreach ($displayPages as $i => $pageNumber) {
        if ($pageNumber - $displayPages[$i - 1] > 1) {
            $header .= ".. ";
        }
        if ($pageNumber == $pagingActualPage) {
            $header .= "<span class=\"snWhite\">" . ($pageNumber + 1) . "&nbsp;</span>";
        } else {
            $header .= getPageLink($pageNumber * $usePaging, $pageNumber + 1);
        }
    }
    return $header;
}
?>
		</div>
		<div class="btnbox2">
		<span class="btn00"><a href="<?php 
echo $g['bbs_reset'];
?>
">처음목록</a></span>
		<span class="btn00"><a href="<?php 
echo $g['bbs_list'];
?>
">새로고침</a></span>
		</div>
		<div class="clear"></div>
		<div class="pagebox01">
		<?php 
echo getPageLink($d['theme']['pagenum'], $p, $TPG, $g['img_core'] . '/page/default', array("admin_email=" . $admin_email, "sort_kind=" . $sort_kind, "start_duration=" . $start_duration, "end_duration=" . $end_duration, "reception=" . $reception, "search_travel={$search_travel}"));
?>
		</div>
	</div>

	<div class="searchform">
		<form name="bbssearchf" action="<?php 
echo $g['s'];
?>
/" method="get" >
		<input type="hidden" name="r" value="<?php 
echo $r;
?>
" />
		<input type="hidden" name="c" value="<?php 
echo $c;
                <?php 
if (getMaxPage() !== 1) {
    for ($p = 1; $p <= getMaxPage(); $p++) {
        ?>
                        <?php 
        if (getCurrentPage() === $p) {
            ?>
                            <li class="active grey darken-3"><a href="#"><?php 
            echo $p;
            ?>
</a></li>
                        <?php 
        } else {
            ?>
                            <li class="waves-effect"><a href="<?php 
            echo getPageLink($p);
            ?>
"><?php 
            echo $p;
            ?>
</a></li>
                        <?php 
        }
        ?>
                <?php 
    }
}
?>

                <?php 
if (getCurrentPage() !== getMaxPage()) {
Example #7
0
set_time_limit(300);
$time_start = microtime(true);
$recordCount = 0;
use Curl\Curl;
$categories = array('whey', 'creatine');
$curl = new Curl();
$curl->get('http://www.bodybuilding.com/store/' . $categories[0] . '.html');
$content = $curl->response;
htmlentities($content);
$content = iconv('UTF-8', 'UTF-8//IGNORE', $content);
$dom = new DOMDocument();
$dom->loadHTML($content);
$selector = new DOMXPath($dom);
$resultClass = $selector->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' " . COUNTCLASS . " ')]");
$link = $selector->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' " . PAGINATIONCLASS . " ')]");
$linkArray = getPageLink($dom->saveXML($link[0]));
if (isset($linkArray['error'])) {
    echo $linkArray['error'] . '<br/>';
    exit;
}
$count = ceil($linkArray[3][1] / 50);
$actualCount = $linkArray[3][1];
$done = FALSE;
$paramFirst = $linkArray['link'] . '?' . $linkArray[1][0] . '=';
$paramSecond = '&' . $linkArray[2][0] . '=50&' . $linkArray[3][0] . '=';
for ($i = 1; $i <= $count; $i++) {
    $curl->get(BODYBUILDING . $paramFirst . $i . $paramSecond . $count);
    $dom->loadHTML($curl->response);
    $tempSelector = new DOMXPath($dom);
    $articleTag = $tempSelector->query('/html/body//article');
    foreach ($articleTag as $ar) {