コード例 #1
0
		<input type="hidden" name="antonym_org" value="<?php 
        print $antonym_word;
        ?>
" />
		<input type="hidden" name="antonym_org_id" value="<?php 
        print $antonym_wmid;
        ?>
" />
		<?php 
        if (isset($antonym_mid)) {
            ?>
			Synset: <a href="synset.php?id=<?php 
            print $antonym_mid;
            ?>
"><?php 
            print getSynsetString($antonym_mid, 5);
            ?>
</a>
		<?php 
        }
        ?>
		<?php 
    } else {
        if ($auth->auth["uid"] == "nobody") {
            print "-";
        } else {
            ?>
			<input type="text" name="antonym" value="" />
			<input type="hidden" name="antonym_org" value="" />
			<?php 
        }
コード例 #2
0
    $query = sprintf("SELECT subject FROM subjects WHERE id = %d", $new_id);
    $db->query($query);
    $db->next_record();
    $new_subject = $db->f('subject');
    doLog(getSynsetString(uservar('mid'), 3), uservar('mid'), CHANGE_SUBJECT, uservar('oldsubject') . "->" . $new_subject);
    $changed = 1;
}
$query = sprintf("SELECT id, subject_id, distinction, hidden\n\tFROM meanings\n\tWHERE id = %d", myaddslashes(uservar('mid')));
$db->query($query);
if ($db->nf() == 0) {
    print "ID not found";
    return;
}
$db->next_record();
$subject_id = $db->f('subject_id');
$title = sprintf(_("Details for synset '%s'"), getSynsetString(uservar('mid'), 3));
function popdownlist()
{
    global $db, $subject_id;
    $query = "SELECT id, subject FROM subjects ORDER By subject";
    $db->query($query);
    $i = 0;
    print '<select name="subject_id">';
    print '<option value="">' . _("(none)") . '</option>' . "\n";
    $oldsubject = _("(none)");
    while ($db->next_record()) {
        $checked = "";
        # specific to German OpenThesaurus:
        # these are now handled on a word-by-word basis, so ignore them here:
        if ($db->f('id') == 17 || $db->f('id') == 16) {
            # figurativ
コード例 #3
0
$msg = $text . "\n";
$msg = HOMEPAGE . "overview.php?word=" . urlencode($text);
$msg .= "\n\n";
$msg .= "IP address: " . $_SERVER['REMOTE_ADDR'] . "\n";
if (array_key_exists('word', $_POST)) {
    $text = trim($_POST['word']);
    if ($text == "" || strlen($text) <= 1) {
        # this is needed to fight spam
        print "Error: No word specified or word too short\n";
        return;
    }
    $msg .= "Word: " . $_POST['word'] . "\n";
}
if (array_key_exists('meaning_id', $_POST)) {
    $id = intval($_POST['meaning_id']);
    $msg .= "Meaning: " . getSynsetString($id) . "\n";
    $msg .= "Meaning ID: " . HOMEPAGE . "synset.php?id=" . $id . "\n";
}
#print "<pre>".$msg."</pre>";
$subj = SUGGEST_SUBJECT . ": " . preg_replace("/[\n\r]/", " ", $text);
$success = mail(SUGGEST_EMAIL, $subj, $msg);
if (!$success) {
    print "Sending mail failed, please contact the webmaster";
    return;
}
?>

<p><?php 
print T_("Thanks for your contribution.");
?>
</p>
コード例 #4
0
	print "Illegal arguments.";
	return;
}

$distinction = "";
if( $db->f('distinction') ) {
	$distinction = $db->f('distinction');
}
$hidden = 0;
if( intval($db->f('hidden')) == 1 ) {
	$hidden = 1;
}

$subject = getSubject($meaning_id);

$title = sprintf(T_("Synset '%s'"), getSynsetString($meaning_id, 3));

$query = sprintf("SELECT words.id AS id, word_meanings.id AS wmid,
	word, meaning_id, word_meanings.use_id, uses.name
	FROM words, word_meanings LEFT JOIN uses ON (uses.id=word_meanings.use_id)
	WHERE 
		word_meanings.meaning_id = %d AND
		words.id = word_meanings.word_id
	ORDER BY meaning_id, word", $meaning_id);
$db->query($query);

include("include/top.php");
?>

<?php 
if( uservar('changed') == 1 ) { ?>