die;
}
$PluginEnabled = '1';
//Enable edit plugin options
$PluginOptions = '1';
$SmiliesPath = 'img/smilies/';
$ThisPlugin = basename(__FILE__, '');
if ($PluginEnabled == 1) {
    //Change options
    if (isset($_POST["SmiliesPath"])) {
        $PATH = safeEscape($_POST["SmiliesPath"]);
        write_value_of('$SmiliesPath', "{$SmiliesPath}", $PATH, $plugins_dir . basename(__FILE__, ''));
        $SmiliesPath = $PATH;
    }
    //If user can edit plugin
    if (OS_is_admin() and OS_PluginEdit($ThisPlugin)) {
        //Show following options when user click on edit icon for this plugin
        //Display all smilies
        $Option = '
<form action="" method="post" >
  <input size="30" type="text" value="' . $SmiliesPath . '" name="SmiliesPath" />
  <input type="submit" value = "Change smilies path" class="menuButtons" />
  <a href="' . $website . 'adm/?plugins" class="menuButtons">Cancel</a>
</form>

<div><a href="javascript:;" onclick="showhide(\'smilies\')">Show all</a></div>';
        $Option .= '<div style="display:none; background-color: #fff;" id="smilies">';
        if (file_exists("../" . $SmiliesPath) and $handleSmilies = opendir("../" . $SmiliesPath)) {
            while (false !== ($icon = readdir($handleSmilies))) {
                if (strstr($icon, ".gif") or strstr($icon, ".jpg") or strstr($icon, ".png")) {
                    $Option .= '<img src="../' . $SmiliesPath . $icon . '" alt="" />';
示例#2
0
function OS_AdminTools($userID = "", $PlayerName = "", $member = "")
{
    if (OS_is_moderator()) {
        ?>
   <a class="menuButtons" href="<?php 
        echo OS_HOME;
        ?>
?u=<?php 
        echo $userID;
        ?>
&amp;mcp">Moderator CP</a> 
  <?php 
    }
    if (OS_is_admin()) {
        ?>
  <a class="menuButtons" href="<?php 
        echo OS_HOME;
        ?>
adm/?bans&amp;add=<?php 
        echo $PlayerName;
        ?>
" target="_blank">Ban User</a> 
  <a class="menuButtons" href="<?php 
        echo OS_HOME;
        ?>
adm/?pp&amp;addpp=<?php 
        echo $PlayerName;
        ?>
" target="_blank">Add PP</a>
  <a class="menuButtons" href="<?php 
        echo OS_HOME;
        ?>
adm/?players&amp;player=<?php 
        echo $PlayerName;
        ?>
&amp;show=ips" target="_blank">All IPs</a>
  <?php 
    }
    if (!empty($member)) {
        ?>
  <a class="menuButtons" href="<?php 
        echo OS_HOME;
        ?>
?members&amp;search_bnet=<?php 
        echo $member;
        ?>
">Find Member</a>
  <?php 
    }
}
示例#3
0
    header('HTTP/1.1 404 Not Found');
    die;
}
$PluginEnabled = '0';
$PluginOptions = '1';
$ThisPlugin = basename(__FILE__, '');
if ($PluginEnabled == 1) {
    if (OS_is_admin() and OS_PluginEdit($ThisPlugin)) {
        $Option = '
<div><a class="menuButtons" href="' . OS_HOME . '?reset_notification" target="_blank">Reset notification</a></div>';
    }
    //Check cookies - info about admin last login
    if (OS_is_admin()) {
        AddEvent("os_start", "OS_UserLoginCheck");
    }
    if (OS_is_admin() and !$_GET) {
        if (!isset($_SESSION["notification"])) {
            AddEvent("os_content", "OS_GetNotifications");
        }
        //AddEvent("os_content", "OS_Debug");
    }
    function OS_UserLoginCheck()
    {
        if (!isset($_COOKIE["os_last_login"])) {
            @setcookie("os_last_login", time() - 3600 * 24, time() + 3600 * 24 * 7, "/");
            header("location: " . OS_HOME . "");
            die;
        }
        //Reset notification
        if (isset($_GET["reset_notification"])) {
            @setcookie("os_last_login", " ", time() - 3600 * 24 * 7, "/");
示例#4
0
                if ($PlayerData["hide"] == 0) {
                    echo $PlayerData["wins"];
                    ?>
</span> / <span class="lost"><?php 
                    echo $PlayerData["losses"];
                    ?>
</span> <?php 
                    echo $Notice;
                    ?>
 <?php 
                } else {
                    echo "hidden";
                }
                ?>
	  <?php 
                if (OS_is_admin()) {
                    ?>
<span style="font-size:10px; float:right;"><?php 
                    if ($PlayerData["points"] >= 1) {
                        echo number_format($PlayerData["points"], 0);
                        ?>
pts<?php 
                    }
                    ?>
</span><?php 
                }
                ?>
	  
	  </td>
	  <td width="68"><?php 
                if ($PlayerData["hide"] == 0) {
示例#5
0
            $sel[6] = 'selected = "selected"';
        } else {
            $sel[6] = '';
        }
        if ($RedirectLogin == 7) {
            $sel[7] = 'selected = "selected"';
        } else {
            $sel[7] = '';
        }
        if ($RedirectLogin == 8) {
            $sel[8] = 'selected = "selected"';
        } else {
            $sel[8] = '';
        }
        //Show following options when user click on edit icon for this plugin
        if (OS_is_admin() and OS_PluginEdit()) {
            $Option = '<div><b>Redirect after login:</b></div>
<form action="" method="post" >
  <select name="RedirectPage">
   <option ' . $sel[8] . ' value="0">Last page visited</option>
   <option ' . $sel[0] . ' value="0">Home page</option>
   <option ' . $sel[1] . ' value="1">Profile page</option>
   <option ' . $sel[2] . ' value="2">Top page</option>
   <option ' . $sel[3] . ' value="3">Games page</option>
   <option ' . $sel[4] . ' value="4">Admins page</option>
   <option ' . $sel[5] . ' value="5">About Us page</option>
   <option ' . $sel[6] . ' value="6">Members page</option>
   <option ' . $sel[7] . ' value="7">Bans page</option>
  </select>
  <input type="submit" value = "Submit" class="menuButtons" />
  <a href="' . $website . 'adm/?plugins" class="menuButtons">Cancel</a>