Пример #1
0
 /**
  * Check weather or not the step is complete
  *
  * @param $step
  * @return null|string
  */
 function is_done($step)
 {
     $steps = steps();
     $step = array_search($step, $steps);
     $current_step = array_search(Route::currentRouteName(), $steps);
     return $current_step > $step ? 'done' : NULL;
 }
Пример #2
0
                    $manRow++;
                    $dir = "south";
                }
                break;
            case "south":
                if ($maze[$manRow][$manCol - 1] != "*") {
                    $manCol--;
                    $dir = "west";
                } elseif ($maze[$manRow + 1][$manCol] != "*") {
                    $manRow++;
                } elseif ($maze[$manRow][$manCol + 1] != "*") {
                    $manCol++;
                    $dir = "east";
                } else {
                    $manRow--;
                    $dir = "north";
                }
        }
        $maze[$manRow][$manCol] = "m";
    } while ($manCol < 10);
    return $maze;
}
steps($maze);
?>
<div class="wrapper eb">
    <h2>The End!</h2>
</div>
</body>
</html>

Пример #3
0
<meta name="viewport" content="width=device-width" />

<style>
* { margin: 0; padding: 0; }
ul, li { display: block; }
a { border: 0; }
</style>

<p>3 bj pages:</p>
<?php 
require '../HTMLExtractor.php';
$steps = steps();
$base = 'http://boobsjournal.com';
$pages = 3;
$P = isset($_GET['page']) ? (int) $_GET['page'] : 0;
$offset = $pages * $P;
echo '<ul>';
for ($p = 0; $p < $pages; $p++) {
    $page = 1 + $p + $offset;
    $url = 1 < $page ? '/page/' . $page . '/' : '/';
    $source = file_get_contents($base . $url);
    //var_dump(strlen($source));
    $process = new HTMLExtractionProcess($source, $steps);
    $process->start();
    foreach ($process->output['thumbnail_srcs'] as $i => $src) {
        $href = $process->output['thumbnail_hrefs'][$i];
        echo '<li><a href="' . $href . '"><img src="' . $src . '" /></a></li>';
    }
}
echo '<ul>';
echo '<a href="?page=' . ($P + 1) . '">Next page</a>';