$query = "select `lang` from `tiki_languages`";
    $result = $tikilib->query($query);
    $languages = array();
    while ($row = $result->fetchRow()) {
        $languages[] = $row["lang"];
    }
    return $languages;
}
//Update the translation
if (!isset($_REQUEST['dst'])) {
    $_REQUEST['dst'] = "";
}
if (isset($_REQUEST['src']) && isset($_REQUEST['lang'])) {
    $_REQUEST['src'] = urldecode($_REQUEST['src']);
    $_REQUEST['dst'] = urldecode($_REQUEST['dst']);
    $_REQUEST['src'] = htmlentities($_REQUEST['src'], ENT_NOQUOTES, "UTF-8");
    $_REQUEST['dst'] = htmlentities($_REQUEST['dst'], ENT_NOQUOTES, "UTF-8");
    update_trans($_REQUEST['src'], $_REQUEST['dst'], $_REQUEST['lang']);
    $smarty->assign('update', 'y');
    $smarty->display("tiki-interactive_trans.tpl");
    die;
}
//Main windows
$languages = getLanguages();
$entries = array();
foreach ($languages as $key => $value) {
    getTrans(urldecode($_REQUEST['content']), $value);
}
$smarty->assign('languages', $languages);
$smarty->assign('entries', $entries);
$smarty->display("tiki-interactive_trans.tpl");
Beispiel #2
0
    drawText("a", 56, "WOWMeter.net", NULL, true);
    doImage();
}
# Change the font into the user's preference
setFont($getUser['r']['sig_font']);
# Chance the background into the user's preference
$im = setBackground($getUser['r']['sig_bg'], $getUser['r']['bg_color']);
# Draw the text
if ($_GET['mask'] != 1) {
    # Only draw the username when the mask isn't applied
    drawText("a", 16, $getUser['r']['username'], alloColor($getUser['r']['usrname_color'], true));
}
# %Username%
drawText("a", 36, getTrans("hasCollected"), NULL, true);
# has collected %c% wows.
drawText("a", 56, getTrans("clickHere"), NULL, true);
# Click here to give a wow!
if ($_GET['mask'] == 1) {
    # Apply a mask if it's set
    # Create the mask
    $mask = imagecreatetruecolor(240, 66);
    imagefilledrectangle($mask, 0, 0, 240, 66, alloColor("FFFFFF"));
    # Shadow
    drawText("a", 17, $getUser['r']['username'], alloColor(0, 0, 0, 80), false, NULL, 12, 0, $im);
    # Text in the mask
    drawText("a", 16, $getUser['r']['username'], alloColor("000001"), false, NULL, 12, 0, $mask);
    # Apply the mask
    imageAlphaMask($im, $mask);
}
# Need to turn on alpha again
imagealphablending($im, false);