Beispiel #1
0
<?php

header("Content-type:text/html; charset=utf-8");
$parent = isset($_REQUEST['parent']) ? $_REQUEST['parent'] : "";
$showadddict = isset($_REQUEST['showadddict']) ? $_REQUEST['showadddict'] : "1";
include_once 'arg.php';
$equeryword = encode_command_arg($parent);
if ($showadddict == "0") {
    $args = "-ird " . $equeryword;
} else {
    $args = "-ir " . $equeryword;
}
include_once 'backend.php';
echo call_stardict_client($args);
Beispiel #2
0
if ($username == "" || $password == "") {
    session_start();
    $username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
    $password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
    if ($username == "" || $password == "") {
        $username = isset($_COOKIE["StarDict_username"]) ? $_COOKIE["StarDict_username"] : "";
        $password = isset($_COOKIE["StarDict_password"]) ? $_COOKIE["StarDict_password"] : "";
        if ($username != "" && $password != "") {
            $_SESSION['username'] = $username;
            $_SESSION['password'] = $password;
        }
    }
}
$args;
include_once 'arg.php';
if ($username != "" && $password != "") {
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $args = "-ar " . $eusername . " " . $epassword . " ";
} else {
    $args = "";
}
$equeryword = encode_command_arg($queryword);
$args .= "-qs " . $equeryword;
include_once 'backend.php';
echo call_stardict_client($args);
if ($username == "" || $password == "") {
    echo "<br>You are guest user, try to <a href=\"http://www.stardict.org/register.php\" target=\"_blank\">Register</a> an account and choose your custom dictionaries.";
}
echo "</body></html>";
ob_end_flush();
Beispiel #3
0
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>StarDict:: Finance</title>
<link rel="shortcut icon" href="images/stardict.ico" />
</head>
<body><center>
<?php 
session_start();
include 'head.php';
echo "<br><table border=\"1\"><tr><td>" . _L('If you like StarDict, you can consider to upgrade to level 1 user, this will help StarDict develop further.<br>Upgrade to level 1 user can get better service when using StarDict too.<br><br>Normal registered user have these limits when using StarDict:<br>1.Can only choose 8 dictionaries.<br>2.Can\'t use some advance dictionaries.<br>3.Can\'t use collate function.<br>4.The usage of query, pattern match, fuzzy search, full-text search are limited.<br>You can only query for 50 times in one hour, use pattern match and fuzzy search for 5 times each in one hour, and 3 times for full-text search.') . "<br><br>" . _L('If you have done any contribution to StarDict ago, please <a href="mailto:huzheng001@gmail.com">mail me</a> and I will upgrade your account for Free!') . "</td></tr></table><br>";
$username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
$password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
if ($username == "" || $password == "") {
    echo "You need to <a href=\"login.php\">Sign in</a> first!";
} else {
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $args = "-ar " . $eusername . " " . $epassword . " -gu";
    include_once 'backend.php';
    $content = call_stardict_client($args);
    if ($content == "") {
        echo "Error while getting user level information.";
    } else {
        printf(_L("You are level %d user currently."), $content);
        if ($content == "0") {
            echo "<br><table border=\"1\"><tr><td>";
            printf(_L("Upgrade to Level %d user:"******"<center><form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n<input type=\"hidden\" name=\"business\" value=\"alantang@ieee.org\">\n<input type=\"hidden\" name=\"item_name\" value=\"Upgrade from level 0 to level 1 in www.stardict.org\">\n<input type=\"hidden\" name=\"item_number\" value=\"01\">\n<input type=\"hidden\" name=\"amount\" value=\"5.00\">\n<input type=\"hidden\" name=\"no_shipping\" value=\"2\">\n<input type=\"hidden\" name=\"return\" value=\"http://www.stardict.org/paymentreceived.php\">\n<input type=\"hidden\" name=\"cancel_return\" value=\"http://www.stardict.org/finance.php\">\n<input type=\"hidden\" name=\"no_note\" value=\"1\">\n<input type=\"hidden\" name=\"currency_code\" value=\"USD\">\n<input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF\">\n<input type=\"hidden\" name=\"on0\" value=\"account\"><input type=\"hidden\" name=\"os0\" value=\"";
            echo $username;
            echo "\"><input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/x-click-but23.gif\" border=\"0\" name=\"submit\" alt=\"Buy it\">\n<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">\n</form></center>\n<a href='https://login.taobao.com/auction/fast_buy_item.htm?auction_id=532034f765dbfa214ce156716961be58&x_id=null&key=7c5f69ca4036d6515f85c6058262f914'><img alt='网上汇款免手续费, 收货满意后卖家才能拿钱,货款都安全' src='http://img.alipay.com/pimg/button_alipaybutton_w.gif' align='absmiddle' border='0'/></a>\n<a href='https://www.99bill.com/webapp/payAction.do?ad=88990610177124105&buttonid=47908&mac=1DA09AA7031F1EDF5FD9869B5C25307F' target='_blank'><img border=0 alt='通过快钱购买!热!' src='https://www.99bill.com/img_2/btnimg/button1.gif' /></a>\n</td>\n<td>" . _L("Cost:") . " \$5.</td>\n<td>";
            printf(_L("Level %d user can choose %d dictionaries."), 1, 15);
            echo "<br>" . _L("Can use advance dictionaries.") . "<br>" . _L("Can use the collate function.") . "<br>" . _L("Use query, pattern match and fuzzy search without limit.") . "<br>";
<?php

header("Content-type:text/html; charset=utf-8");
session_start();
$username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
$password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
if ($username != "" && $password != "") {
    $lang = isset($_REQUEST['l']) ? $_REQUEST['l'] : "";
    $args;
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $elang = encode_command_arg($lang);
    $args = "-ar " . $eusername . " " . $epassword . " -sl " . $elang;
    include_once 'backend.php';
    $content = call_stardict_client($args);
    if ($content == "") {
        $_SESSION['language'] = $lang;
        setcookie("StarDict_language", $lang, time() + 60 * 60 * 24 * 30, '/');
    } else {
        echo $content;
    }
} else {
    echo "Error, didn't login!";
}
Beispiel #5
0
<?php

header("Content-type:text/html; charset=utf-8");
session_start();
$username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
$password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
if ($username != "" && $password != "") {
    $email = isset($_REQUEST['e']) ? $_REQUEST['e'] : "";
    $args;
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $eemail = encode_command_arg($email);
    $args = "-ar " . $eusername . " " . $epassword . " -se " . $eemail;
    include_once 'backend.php';
    echo call_stardict_client($args);
} else {
    echo "Error, didn't login!";
}
Beispiel #6
0
<?php

header("Content-type:text/html; charset=utf-8");
$username = isset($_REQUEST['username']) ? $_REQUEST['username'] : "";
$oldpassword = isset($_REQUEST['oldpassword']) ? $_REQUEST['oldpassword'] : "";
$newpassword = isset($_REQUEST['newpassword']) ? $_REQUEST['newpassword'] : "";
$newpassword2 = isset($_REQUEST['newpassword2']) ? $_REQUEST['newpassword2'] : "";
if ($username == "" || $oldpassword == "" || $newpassword == "" || $newpassword != $newpassword2) {
    echo "Invalid parameters.";
} else {
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $eoldpassword = encode_command_arg($oldpassword);
    $md5saltnewpassword = md5("StarDict" . $newpassword);
    $enewpassword = encode_command_arg($md5saltnewpassword);
    $args = "-cr " . $eusername . " " . $eoldpassword . " " . $enewpassword;
    include_once 'backend.php';
    $content = call_stardict_client($args);
    if ($content == "") {
        session_start();
        $_SESSION['password'] = $md5saltnewpassword;
        $cookpassword = isset($_COOKIE["StarDict_password"]) ? $_COOKIE["StarDict_password"] : "";
        if ($cookpassword != "") {
            setcookie("StarDict_password", $md5saltnewpassword, time() + 60 * 60 * 24 * 30, '/');
        }
        echo "<center>Change password success!<br>Back to <a href=\"index.php\">Home</a> page.</center>";
    } else {
        echo $content;
    }
}
<?php

header("Content-type:text/html; charset=utf-8");
session_start();
$username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
$password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
if ($username != "" && $password != "") {
    $func = isset($_REQUEST['f']) ? $_REQUEST['f'] : "";
    $args;
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $efunc = encode_command_arg($func);
    $args = "-ar " . $eusername . " " . $epassword . " -sf " . $efunc;
    include_once 'backend.php';
    echo call_stardict_client($args);
} else {
    echo "Error, didn't login!";
}
Beispiel #8
0
<?php

header("Content-type:text/html; charset=utf-8");
$rootpassword = isset($_REQUEST['rootpassword']) ? $_REQUEST['rootpassword'] : "";
$user = isset($_REQUEST['user']) ? $_REQUEST['user'] : "";
$fromlevel = isset($_REQUEST['fromlevel']) ? $_REQUEST['fromlevel'] : "";
$tolevel = isset($_REQUEST['tolevel']) ? $_REQUEST['tolevel'] : "";
if ($rootpassword == "" || $user == "" || $fromlevel == "" || $tolevel == "") {
    echo "Invalid parameters.";
} else {
    include_once 'arg.php';
    $erootpassword = encode_command_arg(md5("StarDict" . $rootpassword));
    $euser = encode_command_arg($user);
    $efromlevel = encode_command_arg($fromlevel);
    $etolevel = encode_command_arg($tolevel);
    $args = "-ar root " . $erootpassword . " -u " . $euser . " " . $efromlevel . " " . $etolevel;
    include_once 'backend.php';
    echo call_stardict_client($args);
}
Beispiel #9
0
<link rel="stylesheet" href="css/tree.css">
<script language="javascript" type="text/javascript" src="js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="js/showhide.js"></script>
<script language="javascript" type="text/javascript" src="js/dictmanage.js"></script>
</head>
<body topmargin="3" alink="#ff0000" bgcolor="#ffffff" link="#0000cc" marginheight="3" text="#000000" vlink="#551a8b"><center>
<?php 
session_start();
include 'head.php';
$username = isset($_SESSION['username']) ? $_SESSION['username'] : "";
$password = isset($_SESSION['password']) ? $_SESSION['password'] : "";
if ($username != "" && $password != "") {
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $epassword = encode_command_arg($password);
    $edir = encode_command_arg("/");
    $args = "-ar " . $eusername . " " . $epassword . " +ir " . $edir . " +gm -gd";
    include_once 'backend.php';
    $content = call_stardict_client($args);
    $result = explode("", $content);
    echo "<table width=\"100%\"><tr><td width=\"45%\"><div style='overflow-x:auto; height:380px;'><ul class=\"tree\">";
    echo $result[0];
    echo "</ul></div></td><td width=\"5%\"><div id=\"load\" style=\"display:none\"><img src=\"images/loading.gif\"></div></td><td width=\"50%\" valign=\"top\" align=\"right\"><table width=\"100%\"><tr><td><table><tr><td><div>";
    printf(_L('You can choose <b><span id="maxdictcount">%s</span></b> dictionaries.'), $result[1]);
    echo "</div><select id=\"dictlist\" size=\"8\">";
    echo $result[2];
    echo "</select></td><td><input type=\"button\" value=\"" . _L("Show Info") . "\" onClick=\"showDictInfo2()\" /><br><input type=\"button\" value=\"" . _L("Move Up") . "\" onClick=\"moveDictUp()\" /><br><input type=\"button\" value=\"" . _L("Move Down") . "\" onClick=\"moveDictDown()\" /><br><input type=\"button\" value=\"" . _L("Delete") . "\" onClick=\"deleteDict()\" /></td><td width=\"50\"></td><td><form action=\"setdictmask.php\" method=\"post\"><input id=\"setdictmask\" type=\"hidden\" name=\"dictmask\"><input type=\"submit\" value=\"" . _L("Apply") . "\" onClick=\"submitDictMask()\" /></form></td></tr></table><tr><td><hr><div id=\"dictinfo\"></div></td></tr></table></td></tr></table>";
} else {
    echo "You need to <a href=\"login.php\">Sign in</a> first!";
}
include 'end.inc.php';
Beispiel #10
0
        echo "<b>" . $cookie_username . "</b>";
    } else {
        $logged_in = FALSE;
        echo "<a href=\"login.php\">Sign in</a>";
    }
}
$language = isset($_SESSION['language']) ? $_SESSION['language'] : "";
if ($language == "") {
    $cookie_language = isset($_COOKIE["StarDict_language"]) ? $_COOKIE["StarDict_language"] : "";
    if ($cookie_language != "") {
        $_SESSION['language'] = $cookie_language;
    } else {
        if ($logged_in) {
            include_once 'arg.php';
            $eusername = encode_command_arg($_SESSION['username']);
            $epassword = encode_command_arg($_SESSION['password']);
            $args = "-ar " . $eusername . " " . $epassword . " -gl";
            include_once 'backend.php';
            $content = call_stardict_client($args);
            if ($content == "") {
                $_SESSION['language'] = "default";
            } else {
                $_SESSION['language'] = $content;
            }
            setcookie("StarDict_language", $_SESSION['language'], time() + 60 * 60 * 24 * 30, '/');
        } else {
            $_SESSION['language'] = "default";
        }
    }
}
include 'translate.php';
Beispiel #11
0
<?php

$username = isset($_REQUEST['username']) ? $_REQUEST['username'] : "";
$password = isset($_REQUEST['password']) ? $_REQUEST['password'] : "";
if ($username == "" || $password == "") {
    include 'login-body.php';
} else {
    include_once 'arg.php';
    $eusername = encode_command_arg($username);
    $md5saltpassword = md5("StarDict" . $password);
    $epassword = encode_command_arg($md5saltpassword);
    $args = "-ar " . $eusername . " " . $epassword;
    include_once 'backend.php';
    $content = call_stardict_client($args);
    if ($content == "") {
        $saveinfo = isset($_REQUEST['saveinfo']) ? $_REQUEST['saveinfo'] : "";
        session_start();
        $_SESSION['username'] = $username;
        $_SESSION['password'] = $md5saltpassword;
        unset($_SESSION['language']);
        if ($saveinfo == "on") {
            setcookie("StarDict_username", $username, time() + 60 * 60 * 24 * 30, '/');
            setcookie("StarDict_password", $md5saltpassword, time() + 60 * 60 * 24 * 30, '/');
        }
        $dir = dirname($_SERVER['PHP_SELF']);
        if ($dir == '/') {
            $dir = "";
        }
        header("Location: http://" . $_SERVER['HTTP_HOST'] . $dir . "/index.php");
    } else {
        echo $content;