コード例 #1
0
ファイル: functions.php プロジェクト: adriculous/BellaBuffs
{
    $array = file(BUTTONS);
    $buttons_found = array();
    foreach ($array as $value) {
        list($file, $width, $height, $donated, $donator, $donatorUrl) = preg_split("/,(?! )/", $value);
        $buttons_found[] = $width . "x" . $height;
    }
    $buttons_found = array_unique($buttons_found);
    natcasesort($buttons_found);
    echo "<ul>";
    foreach ($buttons_found as $size) {
        echo "<li><a href=\"buttons.php?p={$size}\">{$size}</a></li> \n";
    }
    echo "<li><a href=\"buttons.php?p=[0-9]x[0-9]\">View All?</a></li>";
    echo "</ul>";
}
function get_data($var)
{
    if (isset($_POST[$var])) {
        echo htmlspecialchars($_POST[$var]);
    }
}
blanklinefix(COUNTRIES);
blanklinefix(IPBLOCKLST);
blanklinefix(MEMBERS);
blanklinefix(NEWBIES);
blanklinefix(SPAMWDS);
blanklinefix(BUTTONS);
blanklinefix(AFFILIATES);
blanklinefix(UPDATES);
error_reporting(E_ALL);
コード例 #2
0
ファイル: admin.php プロジェクト: adriculous/BellaBuffs
             fwrite($fp, $newmembers);
             fclose($fp);
         } else {
             exit("<p>Invalid sort option in prefs.php: please ensure you use 'newest' or 'oldest'.</p>");
         }
     } else {
         exit("<p>No sort option in prefs.php: please ensure you're running the latest version.</p>");
     }
     if (isset($updateDate) && $updateDate == "yes") {
         $update = "\n" . date($timestamp) . ",New member(s) added";
         $fp = fopen(UPDATES, "w") or die("Couldn't open UPDATES - the update could not be stored.");
         fwrite($fp, $update);
         fclose($fp);
     }
     blanklinefix(NEWBIES);
     blanklinefix(MEMBERS);
     echo "<p>Member(s) approved.</p>";
 }
 if (isset($_POST['del']) && is_array($_POST['del'])) {
     if (isset($_POST['fileloc'])) {
         $fileloc = basename($_POST['fileloc']);
     } else {
         exit;
     }
     $members = file(MEMBERS);
     $newbies = file(NEWBIES);
     foreach ($_POST['del'] as $member => $file) {
         if (is_numeric($member)) {
             if ($fileloc == "newbies.txt" && array_key_exists($member, $newbies)) {
                 unset($newbies[$member]);
             } elseif ($fileloc == "members.txt" && array_key_exists($member, $members)) {