function explodeCatz($filename)
{
    $dir = dirname($filename);
    $f = file($filename);
    while (list($index, $line) = each($f)) {
        $line = trim($line);
        if (empty($line)) {
            continue;
        }
        if (sex($line)) {
            $sex[] = $line;
            unset($f[$index]);
            continue;
        }
        if (mixed_adult($line)) {
            $mixed[] = $line;
            unset($f[$index]);
            continue;
        }
        if (gamble($line)) {
            $gamble[] = $line;
            unset($f[$index]);
            continue;
        }
        if (games($line)) {
            $games[] = $line;
            unset($f[$index]);
            continue;
        }
        if (radio($line)) {
            $radio[] = $line;
            unset($f[$index]);
            continue;
        }
        if (music($line)) {
            $music[] = $line;
            unset($f[$index]);
            continue;
        }
        if (webtv($line)) {
            $webtv[] = $line;
            unset($f[$index]);
            continue;
        }
        if (movies($line)) {
            $movies[] = $line;
            unset($f[$index]);
            continue;
        }
    }
    @file_put_contents($filename, @implode($f));
    @file_put_contents("{$dir}/" . time() . ".music.txt", @implode("\n", $music));
    @file_put_contents("{$dir}/" . time() . ".radio.txt", @implode("\n", $radio));
    @file_put_contents("{$dir}/" . time() . ".sex.txt", @implode("\n", $sex));
    @file_put_contents("{$dir}/" . time() . ".movies.txt", @implode("\n", $movies));
    @file_put_contents("{$dir}/" . time() . ".games.txt", @implode("\n", $games));
    @file_put_contents("{$dir}/" . time() . ".webtv.txt", @implode("\n", $webtv));
    @file_put_contents("{$dir}/" . time() . ".gamble.txt", @implode("\n", $gamble));
    @file_put_contents("{$dir}/" . time() . ".mixed_adult.txt", @implode("\n", $mixed));
}
示例#2
0
    ?>
	<div class="group col-sm-12">
		<h3>Group <?php 
    echo $groups[$x];
    ?>
</h3>
		<div class="tabell col-sm-4 col-md-3">
    		<?php 
    echo groupTeams($groups[$x]);
    ?>
    	</div>


	    <div class="games col-sm-8 col-md-9">
			<?php 
    echo games($groups[$x]);
    ?>
	
	    </div>
	</div><!-- group -->
	<div class="line col-xs-12"></div>

    <?php 
}
?>
	</div><!-- #Container -->
</div><!-- #row -->

<?php 
//funktionen hämtar slutresultatet i matchen
function results($game_id)
<?php

if (!isset($_GET['cmd'])) {
    $_GET['cmd'] = NULL;
}
switch ($_GET['cmd']) {
    default:
        cats();
        break;
    case 'games':
        games();
        break;
    case 'edit':
        edit();
        break;
    case 'delete':
        delete();
        break;
    case 'approve':
        approve();
        break;
}
function cats()
{
    global $domain, $thumbsfolder, $gamesfolder, $db, $action;
    $rr = mysql_query(sprintf('SELECT * FROM fas_categories'));
    echo '<div class="heading">
	<h2>Manage Games</h2>
</div>
<br clear="all">
<a href=\'' . $domain . '/index.php?action=' . $action . '&case=addgame\' class="button">New Game</a>