コード例 #1
0
    die;
}
require $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/fileman/include.php";
require $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/fileman/admin/fileman_spellChecker.php";
function replacer($str)
{
    $str = CFileMan::SecurePathVar($str);
    $str = preg_replace("/[^a-zA-Z0-9_\\.-\\+]/is", "_", $str);
    return $str;
}
$word = isset($_POST['word']) ? $_POST['word'] : false;
$lang = replacer(isset($_GET['BXLang']) ? $_GET['BXLang'] : 'en');
$use_pspell = isset($_GET['use_pspell']) ? $_GET['use_pspell'] : true;
$use_custom_spell = isset($_GET['use_custom_spell']) ? $_GET['use_custom_spell'] : true;
$SC = new spellChecker();
$path = replacer($_SERVER["DOCUMENT_ROOT"] . COption::GetOptionString('fileman', "user_dics_path", "/freetrix/modules/fileman/u_dics"));
if (!is_dir($path)) {
    mkdir($path, FX_DIR_PERMISSIONS);
}
$lang_path = $path . '/' . $lang;
if (!is_dir($lang_path)) {
    mkdir($lang_path, FX_DIR_PERMISSIONS);
}
if (COption::GetOptionString('fileman', "use_separeted_dics", "Y") == "Y") {
    $user_path = $lang_path . '/' . $USER->GetID();
    if (!is_dir($user_path)) {
        mkdir($user_path, FX_DIR_PERMISSIONS);
    }
    $path = $user_path;
} else {
    $path = $lang_path;
コード例 #2
0
function translate($input)
{
    global $translate_page;
    //echo $_SERVER['SCRIPT_FILENAME'];
    //echo $translate_page;
    switch ($translate_page) {
        case "index.php":
            $replace = array("The current time in the village is" => "Die gegenwärtige Zeit im Dorf ist", "About TDS" => "Über TDS", "List Warriors" => "Liste der Kämpfer", "TDS Net" => "TDS Netz", "FAQ (for new players)" => "F.A.Q. (Für neue Spieler)", "Create a character" => "Neuen Charakter machen", "Forgotten Password" => "Passwort vergessen?", "New to TDS?" => "Neu hier?", array("<u>U</u>sername:" => "Name:", "<u>P</u>assword:" => "<u>P</u>asswort:"));
            break;
        case "create.php":
            $replace = array("How will you be known to this world?" => "Wie willst du heissen in dieser Welt?", "Enter a password:"******"Dein Passwort:", "Re-enter it for confirmation:" => "Und nocheinmal:", "Enter your email address:" => "Deine Email Adresse:", array("And are you a" => "Du bist", "Female or a" => "Weiblich oder", "Male?" => "Männlich?"), "Create your character" => "Erstelle deinen Charakter", array("Characters that have never been logged in to will be deleted after" => "Charakter welche nie einloggen werden nachr", "day(s) of no activity." => "Tag(en) gelöscht.", "Characters that have never reached level 2 will be deleted after" => "Charakter welche nie Level 2 erreichen werden nach", "days of no activity." => "Tagen ohne Aktivität gelöscht.", "Characters that have reached level 2 at least once will be deleted after" => "Charakter welche Level 2 erreicht haben werden nach"), "Your account was created, your login name is" => "Dein Charaker wurde erstellt dein Login Name ist", "Click here to log in" => "Hier geht es rein", "Login" => "Komm rein");
            break;
        case "village.php":
            $replace = array("`bCombat`b" => "`bKämpfe`b", "Forest" => "Wald", "Bluspring's Warrior Training" => "Bluspring's Kämpfer Training", "Slay Other Players" => "Töte anderen Spieler", "Commerce" => "Commerce", "MightyE's Weaponry" => "MightyE's Waffen", "Pegasus Armor" => "Pegasus Rüstungen", "Ye Olde Bank" => "Ye Olde Bank", "The Inn" => "Die Kneipe", "Stables" => "Stall", "Gypsy Tent" => "Zigeuner Zelt", "`bOther`b" => "`bAnderes`b", "F.A.Q. (newbies start here)" => "F.A.Q. (Für neue Spieler)", "Daily News" => "Tägliche News", "Preferences" => "Einstellungen", "List Warriors" => "Kämpfer Liste", "Hall of Fame" => "Halle des Ruhmes", "<font color='#FF00FF'>Quit</font> to the fields" => "<font color='#FF00FF'>Verlasse</font> die Felder", "Superuser Grotto" => "Superuser Grotto", "New Day" => "Neuer Tag", "`@`c`bVillage Square`b`cThe village hustles and bustles.  No one really notices that you're standing there." => "`@`c`bDorfplatz`b`cDie Einwohner rennen geschäftig umher.  Keiner bemerkt wirklich, dass Du dort stehst.", "You see various shops and businesses along main street.  There is a curious looking rock to one side." => "Du siehst verschiedene Geschäfte und Läden entlang der Strasse.  Es gibt einen merkwürdig aussehenden Felsen auf einer Seite.", "On every side the village is surrounded by deep dark forest.`n`n" => "Auf jeder Seite wird das Dorf durch tiefen dunklen Wald umgeben.`n`n", "The clock on the inn reads" => "Die Uhrzeit auf der Kneipe zeigt", "Village" => "Dorfplatz", "`n`n`%`@Nearby some villagers talk:`n" => "`n`n`%`@In der Nähe reden einige Dorfbewohner:`n", "Add" => "hinzufügen", "says" => "says");
            break;
        case "about.php":
            $replace = array();
            break;
        case "armor.php":
            $replace = array();
            break;
        case "armoreditor.php":
            $replace = array();
            break;
        case "bank.php":
            $replace = array();
            break;
        case "battle.php":
            $replace = array();
            break;
        case "bio.php":
            $replace = array();
            break;
        case "configuration.php":
            $replace = array();
            break;
        case "creatures.php":
            $replace = array();
            break;
        case "dragon.php":
            $replace = array();
            break;
        case "forest.php":
            $replace = array("Something Special" => "Etwas Besonderes", "Return to the forest" => "Zurück in den Wald", "You have successfully fled your oponent!" => "Du bist erfolgreich vor deinem Gegenüber geflohen!", "You failed to flee your oponent!" => "Dir ist es nicht gelungen deinem Gegenüber zu entkommen!", "Enter the cave" => "Betrete die Höhle", "Run away like a baby" => "Renne weg wie ein Baby", "You approach the blackened entrance of a cave deep in the forest, though" => "Du betrittst den dunkelnen Eingang einer Höhle, in den Tiefen des Waldes, jedoch", "the trees are scorched to stumps for a hundred yards all around." => "im Umkreis von mehreren hundert Metern sind die Bäume bis zu den Stümpfen niedergebrannt.", "A thin tendril of smoke escapes the roof of the cave's entrance, and is whisked away" => "Rauchschwaden steigen an der Decke des Höhleneinganges empor, und werden plötzlich", "by a suddenly cold and brisk wind.  The mouth of the cave lies up a dozen" => "von einer kalten Windböe verweht.  Der Eingang der Höhle liegt in der Seite eines Felsens,", "feet from the forest floor, set in the side of a cliff, with debris making a" => "ein Dutzent Meter über dem Boden des Waldes, wobei Geröll eine kegelförmige", "conical ramp to the opening.  Stalactites and stalagmites near the entrance" => "Rampe zum Eingang bildet.  Stalaktiten und Stalagmiten, nahe des Einganges", "trigger your imagination to inspire thoughts that the opening is really" => "erwecken dich aus deinen Gedanken. Dir wird klar,", "the mouth of a great leach." => "dass diese Öffnung wirklich der Eingang einer großen Grotte ist.", "You cautiously approach the entrance of the cave, and as you do, you hear," => "Als du vorsichtig den Eingang der Höhle betrittst, hörst bzw. fühlst du,", "or perhaps feel a deep rumble that lasts thirty seconds or so, before silencing" => "ein lautes Rumpeln, dass dreißig Sekunden andauert, bevor wieder Ruhe eintritt", "to a breeze of sulfur-air which wafts out of the cave.  The sound starts again, and stops" => "Du bemerkst das dir ein Schwefelgeruch entgegenkommt.  Das Poltern ertönt erneut, und hört wieder auf,", "again in a regular rhythm." => "in einem regelmäßigen Rhytmus.", "You clamber up the debris pile leading to the mouth of the cave, your feet crunching" => "Du kletterst den Geröllhaufen rauf, der zum Eingang der Höhle führt. Deine Schritte zerbrechen", "on the apparent remains of previous heroes, or herhaps hors d'ouvers." => "die scheinbaren Überreste der vorigen Helden.", "Every instinct in your body wants to run, and run quickly, back to the warm inn, and" => "Jeder Instinkt in deinem Körper will fliehen und so schnell wie möglich zurück ins Wirtshaus", array("the even warmer" => "in die Wärme", "What do you do?" => "Was gedenkst du zu tun?"), "You are too tired to search the forest any longer today.  Perhaps tomorrow you will have more energy." => "Du bist zu müde um heute den Wald weiter zu durchsuchen. Vielleicht hast du morgen mehr Energie dazu.", "Something Special!" => "Etwas Besonderes!", "Aww, your administrator has decided you're not allowed to have any special events.  Complain to them, not me." => "Arrr, dein Administrator hat entschieden, dass es dir nicht erlaubt ist, besondere Ereignisse zu haben.  Beschwer dich bei ihm, nicht bei mir.", "ERROR!!!`b`c`&Unable to open the special events!  Please notify the administrator!!" => "ERROR!!!`b`c`&Es ist nicht möglich die Speziellen Ereignisse zu öffnen! Bitte benachrichtige den Administrator!!", "Return to the forest" => "Zurück in den Wald", "You head for the section of forest you know to contain foes that you're a bit more comfortable with." => "Du steuerst den Abschnitt des Waldes an, von dem du weißt, dass sich dort Feinde aufhalten,  was dir ein bisschen angenehemer ist.", "You head for the section of forest which contains creatures of your nightmares, hoping to find one of them injured." => "Du steuerst den Abschnitt des Waldes an, in dem sich Kreaturen deiner schlimmsten Alpträume aufhalten, in der Hoffnung das Du eine findest die verletzt ist.", array("You have slain" => "Du hast", "!`0`b`n" => "getötet!`0`b`n"), "You receive" => "Du bekommst", array("Because of the difficult nature of this fight, you are awarded an additional" => "Durch die Schwierigkeit des Kampfes bekommst du extra", "experience!" => "Erfahrungspunkte!"), array("Because of the simplistic nature of this fight, you are penalized" => "Da der Kampf so leicht war bekommst du", "experience!" => "Erfahrungspunkte abgezogen"), array("You receive" => "Du bekommst insgesamt", "total experience!" => "Erfahrungspunkte!"), "~~ Flawless Fight! ~~`\$`n`bYou receive an extra turn!" => "~~ Fehlerloser Kampf! ~~`\$`n`bDu erhältst eine extra Runde!", "~~ Flawless Fight! ~~`b`\$`nA more difficult fight would have yielded an extra turn." => "~~ Fehlerloser Kampf! ~~`b`\$`nDieser schwierige kampf hat dir eine extra Runde gebracht !", "Daily news" => "Tägliche News", "has been slain in the forest by" => "würde im Wald getötet von", "You have been slain by" => "Du wurdest getötet von", "All gold on hand has been lost!" => "Alles an Gold welches mitgeführt wurde hast du verloren!", "10% of experience has been lost!" => "10% an Erfahrung ging verloren!", "You may begin fighting again tomorrow." => "Du solltest vielleicht morgen weiterkämpfen.", "Healer's Hut" => "Hütte des Heilers", "Look for Something to kill" => "Du suchst etwas zum bekämpfen", "Go Slumming" => "Herumziehen", "Go Thrillseeking" => "Nervenkitzel suchen", "Take horse to Dark Horse Tavern" => "Reiten zu der Dark Horse Kneipe", "Return to the Village" => "Zurück zur Stadt", "Seek out the Green Dragon" => "Suche den Green Dragon", "The Forest, home to evil creatures and evil doers of all sorts." => "Der Wald, Heimat von bösartigen Kraturen und bösartigen Übeltätern jeder Art..", "The thick foliage of the forest restricts view to only a few yards in most places." => "Die dichten Blätter des Waldes erlauben der Sicht nur ein paar meter zu den meisten Plätzen.", "The paths would be imperceptible except for your trained eye.  You move as silently as" => "Die Wege würden unbemerkbar sein, hättest du nicht so ein trainiertes Auge. Du bewegst dich so ruhig wie", "a soft breeze across the thick mould covering the ground, wary to avoid stepping on" => "eine milde Briese über den dicken Schimmel, der den Boden bedeckt, du versuchst es zu vermeiden,", "a twig or any of numerous bleached pieces of bone that perforate the forest floor, lest" => "auf dünne Zweige oder auf Knochenstücke zu treten welche den Waldboden durchlöchern könnten.", "you belie your presence to one of the vile beasts that wander the forest." => "Du verleugnest deine Gegenwart zu einen der vielen abscheulichen Monstern, die den Wald durchqueren.", "The Forest" => "Der Wald");
            break;
        case "gypsy.php":
            $replace = array();
            break;
        case "healer.php":
            $replace = array();
            break;
        case "hof.php":
            $replace = array();
            break;
        case "inn.php":
            $replace = array();
            break;
        case "list.php":
            $replace = array();
            break;
        case "logdnet.php":
            $replace = array();
            break;
        case "mail.php":
            $replace = array();
            break;
        case "masters.php":
            $replace = array();
            break;
        case "motd.php":
            $replace = array();
            break;
        case "newday.php":
            $replace = array();
            break;
        case "news.php":
            $replace = array();
            break;
        case "petition.php":
            $replace = array();
            break;
        case "prefs.php":
            $replace = array();
            break;
        case "pvp.php":
            $replace = array();
            break;
        case "shades.php":
            $replace = array();
            break;
        case "stables.php":
            $replace = array();
            break;
        case "superuser.php":
            $replace = array();
            break;
        case "taunt.php":
            $replace = array();
            break;
        case "train.php":
            $replace = array();
            break;
        case "user.php":
            $replace = array();
            break;
        case "viewpetition.php":
            $replace = array();
            break;
        case "weaponeditor.php":
            $replace = array();
            break;
        case "weapons.php":
            $replace = array();
            break;
    }
    return replacer($input, $replace);
}
コード例 #3
0
ファイル: main.php プロジェクト: yukisky/clipbucket
         echo json_encode(array('err' => error()));
     } else {
         echo json_encode(array('success' => 'yes', 'msg' => msg()));
     }
     break;
 case "send_message":
     $msg = post('message');
     $tid = post('thread_id');
     $subj = post('subject');
     $mid = $cbpm->send_message(array('message' => $msg, 'thread_id' => $tid, 'subject' => $suj));
     if (error()) {
         echo json_encode(array('err' => error()));
     } else {
         $message = $userquery->udetails;
         $message['message_id'] = $mid;
         $message['message'] = message(strip_tags(replacer($msg)));
         $message['time_added'] = time();
         $message['thread_id'] = $tid;
         assign('message', $message);
         $template = get_template('single_message');
         echo json_encode(array('success' => 'yes', 'template' => $template));
     }
     break;
 case "fetch_new_msgs":
     $tid = post('thread_id');
     $time = post('time');
     $messages = $cbpm->get_new_messages(array('thread_id' => $tid, 'time' => $time));
     $the_array = array();
     $template = '';
     if ($messages) {
         foreach ($messages as $msg) {
コード例 #4
0
ファイル: comments.php プロジェクト: Andrey939393/Labs
                flock($fp, LOCK_EX);
                fputs($fp, "{$text}\r\n");
                fflush($fp);
                flock($fp, LOCK_UN);
                fclose($fp);
                print "<br><br><br><center><font size=2 face=tahoma><b>Сообщение отправленно!</b></font></center><meta HTTP-EQUIV='Refresh' CONTENT='1; URL=comments.php?event=message'>";
                exit;
            }
            print "<form action=\"/comments.php?event=message&action=write&function=submit\" method=post><table cellpadding=2 align=center>\n<tr><td align=right><font size=2 face=tahoma>Ваше имя:</font>&nbsp;<input type=text maxlength=25 name=from class='inputname' style='width:420' title='Не более 25 символов'></td></tr>\n<tr><td align=right><font size=2 face=tahoma>Заголовок:</font>&nbsp;<input type=hidden name=who value='{$go}'><input type=text maxlength=120 name=theme class='inputname' style='width:420' title='от 3 до 120 символов'></td></tr>\n<tr><td><textarea name=msg cols=90 rows=10 class='com' style='width:500px;height:150px' title='от 3 до 2000 символов'></textarea></td></tr>\n<tr><td align=center><input type=reset value='Очистить' class='inputbutton' style='width:90px'>&nbsp;<input type=submit value='Отправить' class='inputbutton' style='width:90px'></td></tr></table></form>";
        }
        exit;
    }
}
if (isset($_REQUEST['add'])) {
    $name = Utf8ToWin(substr(replacer(strip_tags($_REQUEST['name'])), 0, $maxname));
    $comment = Utf8ToWin(str_replace("\n", '<br>', substr(replacer($_REQUEST['comment']), 0, $maxmes)));
    $name = wordwrap($name, $namewrap, ' ', 1);
    $comment = wordwrap($comment, $comwrap, ' ', 1);
    $timezone = floor($timezone);
    if ($timezone < -12 || $timezone > 12) {
        $timezone = 0;
    }
    $date = gmdate('d.m.Y', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
    $time = gmdate('H:i', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
    //$datetime=date('d.m.Y H:i');
    //if ($liteurl==1) {$comment=preg_replace("#([^\[img\]])(http|https|ftp|goper):\/\/([a-zA-Z0-9\.\?&=\;\-\/_]+)([\W\s<\[]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>\\4", $comment);}
    if ($liteurl == 1) {
        $comment = autolink($comment);
    }
    if ($antimat == 1) {
        $name = removeBadWords($name);
コード例 #5
0
ファイル: pm.class.php プロジェクト: yukisky/clipbucket
 /**
  * Send a private message...
  * 
  * @param ARRAY
  * @param INT $message_id
  */
 function send_message($params)
 {
     $default_value = array('userid' => userid(), 'recipients' => array(), 'subject' => "", 'message' => "", 'thread_id' => NULL);
     $data = array_merge($default_value, $params);
     extract($data);
     if (!$this->thread_exists($thread_id)) {
         $thread_id = $this->create_thread($data);
     }
     if (!$thread_id) {
         e(lang("Invalid thread id"));
         return false;
     }
     $message = strip_tags(replacer($message));
     $subject = strip_tags(replacer($subject));
     if (!$message) {
         e(lang('Message was empty'));
         return false;
     }
     //Add message and send emnail...
     $fields = array('subject' => $subject, 'message' => $message, 'userid' => $userid, 'thread_id' => $thread_id, 'date_added' => now(), 'time_added' => time());
     $message_id = db_insert(tbl('messages'), $fields);
     //Update thread
     $fields = array('last_userid' => $userid, 'last_message_id' => $message_id, 'last_message_date' => now(), 'last_message' => $message, 'total_messages' => '{{total_messages+1}}');
     //Exlude sender
     $exclude_notifiers = array($userid);
     $this->add_message_notifications($thread_id, $exclude_notifiers);
     db_update(tbl('threads'), $fields, " thread_id='{$thread_id}' ");
     //Increment unread message
     db_update(tbl('recipients'), array('unread_msgs' => '{{unread_msgs+1}}', 'unseen_msgs' => '{{unseen_msgs+1}}'), "thread_id='{$thread_id}' AND userid !='{$userid}' ");
     global $userquery;
     //if($message_id)
     return $message_id;
 }