<?php

/* 
	This file is distributed under the terms of the GPL License.
	This work is copyright Kevin G. Francis 2003
	Redistribution of this work must comply to the original
	release license restrictions.
*/
$admin_area = TRUE;
$dir_path = "../";
require $dir_path . "config.php";
require $dir_path . "functions/db.php";
require $dir_path . "functions/authentication.php";
require $dir_path . "functions/textparse.php";
require $dir_path . "functions/render.php";
checkrank(10);
if (isset($_REQUEST['edit_blog'])) {
    $q_blog = mysql_query("SELECT id, blog, owner, posters FROM {$table_blog_owners} WHERE id = '" . $_REQUEST['id'] . "'");
    print $header;
    while ($blogs = mysql_fetch_object($q_blog)) {
        $posters = array();
        $posters = explode("|", $blogs->posters);
        $post_text = NULL;
        foreach ($posters as $key) {
            if (!empty($key)) {
                $post_text .= $key . ', ';
            } else {
                $post_text .= '';
            }
        }
        $post_text = substr(trim($post_text), 0, -1);
function pokerhands($data)
{
    //initialise the left and the right hands as array
    $arLeftHand = array();
    $arRightHand = array();
    //lets separate the five cards
    $arCards = explode(" ", $data);
    // now lets assign the cards on each hands
    for ($i = 0; $i < count($arCards); $i++) {
        if ($i < 5) {
            $arLeftHand[] = $arCards[$i];
        } else {
            $arRightHand[] = $arCards[$i];
        }
    }
    // print_r($arLeftHand);
    // echo "<br>";
    // print_r($arRightHand);
    $intLeftRank = checkrank($arLeftHand);
    $intRightRank = checkrank($arRightHand);
    if ($intLeftRank > $intRightRank) {
        echo "left";
    } elseif ($intLeftRank < $intRightRank) {
        echo "right";
    } else {
        echo "none";
    }
}
Beispiel #3
0
    }
    print '<tr>
	<td align="right" valign="top"><b>Description:</b></td>
	<td><textarea name="description" cols="40" rows="10" class="tbox"></textarea></td>
</tr>
<tr>
	<td></td>
	<td><input type="submit" value="Upload file" class="tbox" /></td>
</tr>
</table>
</form>';
    print $footer;
    exit;
}
if (isset($_REQUEST['uploading'])) {
    checkrank(40);
    $error = NULL;
    function error_check($status, $reason)
    {
        global $header, $footer;
        if ($status == FALSE) {
            print $header;
            print "<i>>>> <b>An error occurred.</b><br />" . $reason . "</i>";
            print $footer;
            exit;
        }
    }
    if (isset($_REQUEST['rename'])) {
        $filename = $_FILES['filename']['name'];
    } else {
        $filename = $_REQUEST['filename'];