Example #1
0
function fixture_paragraph($entry, $context)
{
    $lipsum = get_lipsum($context);
    shuffle($lipsum);
    $sentences = rand(3, 5);
    $txt = array();
    for ($i = 0; $i < $sentences; $i++) {
        $txt[] = $lipsum[$i];
    }
    return implode(" ", $txt);
}
Example #2
0
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
}
require "global/library.php";
// if there's no incoming FORM values, just exit.
if (empty($_POST)) {
    exit;
}
// get our basic data
$link = db_connect();
$g_male_names = get_firstnames("male");
$g_female_names = get_firstnames("female");
$g_names = get_firstnames();
$g_words = get_lipsum();
$g_surnames = get_surnames();
$g_cities = get_cities();
$g_states = get_states();
$g_provinces = get_provinces();
$g_provinces_nl = get_provinces_nl();
$g_countries = get_countries();
$g_counties = get_counties();
db_disconnect($link);
$g_resultType = $_POST['resultType'];
$g_numCols = $_POST['numCols'];
$g_numResults = $_POST['numResults'];
$template = get_random_data_template($_POST, $g_numCols);
switch ($g_resultType) {
    case "HTML":
        require "html.php";