Exemple #1
0
        if (Main::db_result($query, 0) == 1 || $this->logged && strcasecmp($acc_name, $acc->account_username) == 0) {
            if ($GLOBALS['CONFIG_SERVER_TYPE'] == 1) {
                $query = Main::db_query(sprintf($GLOBALS['DBQUERY_SIGNATURE_ACC'], $GLOBALS['DBSTRUCT_L2OFF_USERDAT_ONLINE_TIME'], $GLOBALS['DBSTRUCT_L2OFF_USERDAT_PVP'], $GLOBALS['DBSTRUCT_L2OFF_USERDAT_PK'], $GLOBALS['DBSTRUCT_L2OFF_USERDAT_TABLE'], $GLOBALS['DBSTRUCT_L2OFF_USERDAT_ACC'], Main::db_escape_string($acc_name, $GLOBALS['DB_LOGIN_SERVER'])), $GLOBALS['DB_GAME_SERVER']);
            } else {
                $query = Main::db_query(sprintf($GLOBALS['DBQUERY_SIGNATURE_ACC'], $GLOBALS['DBSTRUCT_L2J_CHARS_ONLINE_TIME'], $GLOBALS['DBSTRUCT_L2J_CHARS_PVP'], $GLOBALS['DBSTRUCT_L2J_CHARS_PK'], $GLOBALS['DBSTRUCT_L2J_CHARS_TABLE'], $GLOBALS['DBSTRUCT_L2J_CHARS_ACC'], Main::db_escape_string($acc_name, $GLOBALS['DB_LOGIN_SERVER'])), $GLOBALS['DB_LOGIN_SERVER']);
            }
            $acc_data = Main::db_fetch_row($query);
            header('Content-type: image/png');
            $image_path = sep_path(CMS_DIR . '/templates/' . Template::used_template() . '/' . $GLOBALS['CONFIG_TEMPLATE_IMAGES'] . '/account_signature.png');
            $the_image = imagecreatefrompng($image_path);
            $color_1 = imagecolorallocate($the_image, 234, 234, 174);
            $color_2 = imagecolorallocate($the_image, 255, 255, 255);
            $color_3 = imagecolorallocate($the_image, 151, 162, 120);
            $shadow_color = imagecolorallocate($the_image, 0, 0, 0);
            $shading_color = imagecolorallocatealpha($the_image, 0, 0, 0, 100);
            draw_text($the_image, 17, 15, 23, $color_1, 110, $GLOBALS['CONFIG_WEBSITE_NAME']);
            draw_text($the_image, 14, 20, 50, $color_2, 120, $GLOBALS['LANG_USER']);
            draw_text($the_image, 10, 65, 65, $color_2, 120, '- ' . $acc_name);
            draw_text($the_image, 14, 20, 85, $color_2, 120, $GLOBALS['LANG_ON_TIME']);
            draw_text($the_image, 10, 20, 100, $color_2, 120, '- ' . gmstrftime(bcdiv($acc_data[0], 86400) . ' ' . $GLOBALS['LANG_DAYS'] . ' %H ' . $GLOBALS['LANG_HOURS'] . ' %M ' . $GLOBALS['LANG_MINS'], $acc_data[0]));
            draw_text($the_image, 14, 300, 35, $color_2, 120, $GLOBALS['LANG_PVP']);
            draw_text($the_image, 10, 345, 50, $color_2, 120, '- ' . $acc_data[1]);
            draw_text($the_image, 14, 300, 70, $color_2, 120, $GLOBALS['LANG_PK']);
            draw_text($the_image, 10, 345, 85, $color_2, 120, '- ' . $acc_data[2]);
            draw_text($the_image, 9, 280, 110, $color_1, null, $GLOBALS['CONFIG_WEBSITE_URL']);
            imagepng($the_image);
            imagepng($the_image, $image_cache);
            imagedestroy($the_image);
        }
    }
}
Exemple #2
0
						<tr>
    					   <th class="header" colspan="2">
                                <?php 
            echo $name_widget . ": " . _("Filters");
            ?>
                            </th>
    					</tr>

						<?php 
            foreach ($filters_list as $params) {
                $input_type = $params[2];
                $selected_value = $widget_params[$params[1]];
                echo '<tr>';
                switch ($input_type) {
                    case "text":
                        draw_text($params, $input_id, $selected_value);
                        break;
                    case "select":
                        draw_select($params, $input_id, $selected_value);
                        break;
                    case "radiobuttons":
                        draw_radiobutton($params, $input_id, $selected_value);
                        break;
                }
                $input_id++;
                echo '</tr>';
            }
        }
        ?>
				
Exemple #3
0
function make_poster($template, $figure, $content)
{
    $poster = new Imagick($template);
    foreach ($content as $kind => $c) {
        draw_text($poster, $c[0], $c[1], $c[2]);
    }
    draw_figure($poster, $figure, 75);
    if (!strstr($figure, 'unknown')) {
        unlink($figure);
    }
    return $poster;
}