Commit 3d53e6e1 authored by Philipp's avatar Philipp

object orientified and updated documentation

parent ee83c63f
/nbproject/private/
data
/nbproject/
/data/
\ No newline at end of file
#!/usr/bin/php
<?php
include( 'mystic_library.php' );
require_once( 'mystic_library.php' );
echo "********************************\n";
echo "** mystic_library demo script **\n";
echo "********************************\n";
echo "\n";
/*
$mystic = new mystic( './data/' );
echo "\nLast callers:\n";
var_dump( mystic_lastcallers( './data/' ) );
var_dump( $mystic->lastcallers() );
echo "\nOneliner:\n";
var_dump( mystic_oneliner( './data/' ) );
var_dump( $mystic->oneliner() );
echo "\nChat:\n";
var_dump( mystic_chat( './data/', 10 ) );
var_dump( $mystic->chat( 10 ) );
echo "\nHistory:\n";
var_dump( mystic_history( './data/', 2 ) );
*/
var_dump( $mystic->history( 2 ) );
echo "\nUserlist:\n";
var_dump( mystic_userlist( './data/' ) );
var_dump( $mystic->userlist() );
echo "\nFilebases:\n";
var_dump( mystic_fbases( './data/' ) );
die();
var_dump( $mystic->fbases() );
echo "\nFiles:\n";
$days = 100;
$bases = true;
$count = 0;
while ( $bases != false ) {
$bases = mystic_fbases( './data/', 10, $count*10 );
$bases = $mystic->fbases( 10, $count*10 );
if ( $bases != false ) {
foreach ( $bases as $base ) {
$files = true;
$count2 = 0;
$title = false;
while ( $files != false ) {
$files = mystic_files( './data/', $base['filename'], 10, $count2*10 );
$files = $mystic->files( $base['filename'], 10, $count2*10 );
if ( $files != false ) {
foreach ( $files as $file ) {
if ( $file['datetime'] >= time()-(86400*$days) ) {
......@@ -68,5 +70,4 @@
}
}
$count++;
}
?>
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment