<%@ Page Title="" Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true" CodeBehind="KeyInfoStatistics.aspx.cs" Inherits="Yuqing.Web.Administration.KeyInfoStatistics" %> <%@ Register Assembly="am.Charts" Namespace="am.Charts" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="SCRIPTS" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="cph1" runat="server"> <div style="float: inherit; padding-top: 0px; margin-top: 15px; text-align: center; height: auto; width: 100%;"> <asp:PlaceHolder runat="server" ID="ph_main"> <table width="50%"> <tr align="left"> <td> <h2> <asp:LinkButton runat="server" ID="lbtn_PagesByKey" OnClick="lbtn_PagesByKey_Click">关键字对应的网页信息统计</asp:LinkButton> </h2> </td> </tr> <tr align="left"> <td> <h2> <asp:LinkButton runat="server" ID="lbtn_KeysUseInfo" OnClick="lbtn_KeysUseInfo_Click">关键字使用情况统计</asp:LinkButton></h2> </td> </tr> <tr align="center"> <td align="justify"> <asp:Label runat="server" ID="lbl_keyword"></asp:Label> </td> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed; text-align: center;"> <tr> <td> <cc1:PieChart ID="PieChart1" runat="server"> </cc1:PieChart> </td> </tr> </table> </asp:PlaceHolder> </div> </asp:Content>
2,然后再把相关文件放到目录里即amcharts放到根目录
3,在工具箱上选择项,把 amcharts.dll加入。
破解:建一个amcharts_key.txt 内容:AMCHART-LNKS-1966-6679-1965-1082
文件放到amcharts下面的各个有swf里面的文件夹中。
于是用Lutz Reader's .net reflector,反编译了控件,找到加密算法
private bool CheckKey(string keyString)
{
try
{
string[] parts = keyString.Split(new char[] { '-' });
if (parts.Length != 6)
{
return false;
}
if (parts[0].ToUpper() != "AMCHART")
{
return false;
}
if (parts[1].ToUpper() != "NETL")
{
return false;
}
int n1 = int.Parse(parts[3]);
int n2 = int.Parse(parts[4]);
int n3 = int.Parse(parts[5]);
return (Math.Abs((int) ((((n1 * 8) - (n2 * 7)) + 0x4d2) % 0x2710)) == n3);
}
catch
{
return false;
}
} 然后找一个满足条件的注册号也不难了,
例如:AMCHART-NETL-Cracked-10-10-1244
最后写入在web.config里面即可
<configuration>
<appSettings>
<add key="amcharts_net_key" value="AMCHART-NETL-Cracked-10-10-1244" />
</appSettings>
<configuration>
在这里感谢网上的各位好友的分享:我分享我自己所写的代码连同各位前辈的呈上:希望给大家帮助;
后台:
1 public partial class KeyInfoStatistics : FrontEndPageBase
2 {
3 public DataTable dt_page = null;
4 protected void Page_Load(object sender, EventArgs e)
5 {
6 if (!IsPostBack)
7 {
8
9 if (this.UserInfo != null)
10 {
11 dt_page = this.PageSnapsServicer.GetKeygrpcountByClient(this.UserInfo.Id);
12 this.lbtn_PagesByKey_Click(sender, e);
13 }
14 }
15 else
16 {
17 this.lbl_keyword.Text = String.Empty;
18 }
19 }
20 /// <summary>
21 /// 关键字使用情况统计
22 /// </summary>
23 /// <param name="source"></param>
24 /// <param name="e"></param>
25 protected void lbtn_KeysUseInfo_Click(object source, EventArgs e)
26 {
27 PieChart1.Labels.Clear();
28 int used = this.ClientKeywordsServicer.GetClientKeyWordByClientid(this.UserInfo.Id).Rows.Count;
29 int all = this.ClientServicer.GetClientsById(this.UserInfo.Id).MaxKeyCount;
30
31 DataView dv_value = new System.Data.DataView(this.PageSnapsServicer.GetKeygrpcountByClient(this.UserInfo.Id));
32
33 System.Text.StringBuilder str = new System.Text.StringBuilder();
34 for (int i = 0; i < dv_value.Count; i++)
35 {
36 str.Append(string.Format("{0}:{1}\r\n", dv_value[i]["Value"].ToString(), dv_value[i]["PsCount"].ToString()));
37 }
38
39 int[] yValues = { used, all - used };
40 string[] xValues = { str.ToString(), "未使用" };
41 this.PieChart1.Items.Clear();
42
43 for (int i = 0; i < xValues.Length; i++)
44 {
45 PieChartDataItem pcd1 = new PieChartDataItem();
46 pcd1.Description = "Description" + yValues[i];
47 pcd1.Title = String.Format("{0}{1};", xValues[i], yValues[i]);
48 //设置点击时候的链接
49 //pcd1.Url = String.Format("SearchPages.aspx?KeywordId={0}",);
50 pcd1.LabelRadius = 1;
51 pcd1.Value = yValues[i].ToString();
52 pcd1.PullOut = true;
53 PieChart1.Items.Add(pcd1);
54 }
55
56
57 PieChart1.Width = 600;
58 PieChart1.Height = 600;
59 //设置链接的跳转方式
60 //PieChart1.SliceLinkTarget = "_blank";
61 PieChart1.ScientificMax = 0;
62 PieChart1.Labels.Add(new ChartLabel("关键字使用情况", new Unit(100), new Unit(20)));
63
64 }
65 /// <summary>
66 /// 关键字对应的网页信息统计
67 /// </summary>
68 /// <param name="source"></param>
69 /// <param name="e"></param>
70 protected void lbtn_PagesByKey_Click(object source, EventArgs e)
71 {
72 DataView dv_int = new DataView(this.PageSnapsServicer.GetKeygrpcountByClient(this.UserInfo.Id));
73 if (dv_int.Count > 0)
74 {
75 PieChart1.Labels.Clear();
76 this.PieChart1.Items.Clear();
77 for (int i = 0; i < dv_int.Count; i++)
78 {
79 int PsCount = Convert.ToInt32(dv_int[i]["PsCount"]);
80 string Value = Convert.ToString(dv_int[i]["Value"]);
81 PieChartDataItem pcd1 = new PieChartDataItem();
82 pcd1.Description = "Description" + PsCount;
83 pcd1.Title = String.Format("{0}{1};", Value, PsCount);
84 //设置点击时候的链接
85 pcd1.Url = String.Format("SearchPages.aspx?KeywordId={0}",dv_int[i]["Id"].ToString());
86 pcd1.LabelRadius = 1;
87 pcd1.Value = PsCount;
88 pcd1.PullOut = true;
89 PieChart1.Items.Add(pcd1);
90 }
91 string lable= String.Format("{0}:{1}关键字对应的网页信息统计!", this.UserInfo.Id == 1 ? "超级管理员" : UserInfo.IsAdmin == false ? "用户" : "管理员", this.UserInfo.username);
92 PieChart1.Width = 700;
93 PieChart1.Height = 700;
94 //设置链接的跳转方式
95 PieChart1.SliceLinkTarget = "_blank";
96 PieChart1.ScientificMax = 0;
97 PieChart1.Labels.Add(new ChartLabel(lable, new Unit(100), new Unit(20)));
98 }
99 else
100 {
101 this.lbl_keyword.Text = Server.HtmlDecode(String.Format("<span style=\"font-size:12px;color:#999;margin-left:120px\">您没有建立自己关键字!无法进行统计!</span>"));
102 }
103 }
104
105 }