コード例 #1
0
        public static string GetMnFooter()
        {
            HttpContext current = HttpContext.Current;
            string      text    = "SELECT * FROM tbl_Mod WHERE lang=" + current.Session["vlang"] + " AND Mod_Status=1";

            text += " AND Mod_ID in (SELECT Mod_ID FROM tbl_ModBox WHERE";
            object obj = text;

            text = string.Concat(new object[]
            {
                obj,
                " Box_ID in(SELECT Box_ID FROM tbl_Box WHERE Box_Code='Menufooter' AND lang=",
                current.Session["vlang"],
                "))"
            });
            text += " ORDER BY Mod_Pos";
            DataSet           dataSet       = UpdateData.UpdateBySql(text);
            DataRowCollection rows          = dataSet.Tables[0].Rows;
            StringBuilder     stringBuilder = new StringBuilder();

            for (int i = 0; i < rows.Count; i++)
            {
                int    num   = Convert.ToInt32(rows[i]["Mod_ID"]);
                string text2 = rows[i]["Mod_Name"].ToString();
                string text3 = rows[i]["Mod_Code"].ToString();
                string text4 = CMSfunc.VietnameseConvert.ChuyenTVKhongDau(CMSfunc._Replate(text2));
                string text5;
                if (text3 == "Home")
                {
                    text5 = VirtualPathUtility.ToAbsolute("~/Default.aspx");
                }
                else
                {
                    text5 = VirtualPathUtility.ToAbsolute(string.Concat(new string[]
                    {
                        "~/",
                        text3,
                        "/",
                        text4,
                        ".aspx"
                    })) + "?p=" + num;
                }
                stringBuilder.Append(string.Concat(new string[]
                {
                    "<a title=\"",
                    text2,
                    "\" href='",
                    text5,
                    "'>",
                    text2,
                    "</a>"
                }));
                if (i < rows.Count - 1)
                {
                    stringBuilder.Append("&nbsp;&nbsp; <a href='#'>|</a> &nbsp;&nbsp;");
                }
            }
            return(stringBuilder.ToString());
        }
コード例 #2
0
ファイル: CMSfunc.cs プロジェクト: Milkyway94/vexe
        public static string LoadSkin(string code, int p)
        {
            HttpContext       current       = HttpContext.Current;
            StringBuilder     stringBuilder = new StringBuilder();
            DataSet           dataSet       = UpdateData.UpdateBySql("SELECT Skintype_ID,Skintype_Viewtype,Skintype_Vspace,Skintype_Hspace,Skintype_Height,Skintype_Width,Skintype_Limit,Skintype_Target FROM tbl_Skintype WHERE Skintype_Status=1 AND Skintype_Code='" + code + "'");
            DataRowCollection rows          = dataSet.Tables[0].Rows;

            if (rows.Count > 0)
            {
                string text  = rows[0]["Skintype_ID"].ToString();
                bool   flag  = Convert.ToBoolean(rows[0]["Skintype_Viewtype"]);
                string text2 = rows[0]["Skintype_Vspace"].ToString();
                string text3 = rows[0]["Skintype_Hspace"].ToString();
                int    num   = Convert.ToInt32(rows[0]["Skintype_Limit"]);
                string ta    = rows[0]["Skintype_Target"].ToString().Trim();
                string text4 = string.Concat(new object[]
                {
                    "SELECT top ",
                    num,
                    " Mod_ID,Skin_ID,Skin_Name,Skin_Url,Skin_Height,Skin_Width,Skin_Link FROM tbl_Skin WHERE lang=",
                    current.Session["vlang"],
                    " AND Skin_Status=1 AND Skintype_ID=",
                    text
                });
                text4 += " ORDER BY Skin_Pos";
                string            vtype    = flag ? "<br />" : "";
                DataSet           dataSet2 = UpdateData.UpdateBySql(text4);
                DataRowCollection rows2    = dataSet2.Tables[0].Rows;
                for (int i = 0; i < rows2.Count; i++)
                {
                    int    id   = Convert.ToInt32(rows2[0]["Skin_ID"]);
                    int    num2 = Convert.ToInt32(rows2[0]["Mod_ID"]);
                    string n    = rows2[i]["Skin_Name"].ToString();
                    string img  = ApplicationSetting.URLRoot + rows2[i]["Skin_Url"].ToString();
                    string h    = rows2[i]["Skin_Height"].ToString();
                    string w    = rows2[i]["Skin_Width"].ToString();
                    string url  = rows2[i]["Skin_Link"].ToString();
                    if (num2 == -1)
                    {
                        stringBuilder.Append(CMSfunc._adv(ta, img, id, url, vtype, w, h, n));
                    }
                    else if (num2 == p || ModControl.GetOldP(p) == num2)
                    {
                        stringBuilder.Append(CMSfunc._adv(ta, img, id, url, vtype, w, h, n));
                    }
                }
            }
            else
            {
                stringBuilder.Append(CMSfunc.LoadOther(code));
            }
            return(stringBuilder.ToString());
        }
コード例 #3
0
ファイル: CMSfunc.cs プロジェクト: Milkyway94/vexe
        public static string LoadNewsItem(string url, string img, string n, string intro)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("<div class=\"item-news\">\n");
            stringBuilder.Append("    <div class=\"row\">\n");
            if (img.ToString() != "")
            {
                stringBuilder.Append("        <div class=\"col-md-4\">\n");
                stringBuilder.Append(string.Concat(new string[]
                {
                    "        <div class=\"img\"><a href=\"",
                    url,
                    "\" title=\"",
                    n,
                    "\"><img src=\"",
                    img,
                    "\" alt=\"",
                    n,
                    "\" class=\"img-thumbnail\" /></a></div>\n"
                }));
                stringBuilder.Append("        </div>\n");
            }
            stringBuilder.Append("        <div class=\"col-md-8\">\n");
            stringBuilder.Append("            <div class=\"detail\">\n");
            stringBuilder.Append(string.Concat(new string[]
            {
                "                <a href=\"",
                url,
                "\" title=\"",
                n,
                "\"><h2>",
                n,
                "</h2></a>\n"
            }));
            stringBuilder.Append("                <p>" + CMSfunc.CutString(CMSfunc.ClearHTMLTags(intro), 100) + "</p>");
            stringBuilder.Append(string.Concat(new string[]
            {
                "                <a href=\"",
                url,
                "\" title=\"",
                n,
                "\" class=\"btn btn-primary btn-sm\">",
                CMSfunc._Title("Detail"),
                "</a>\n"
            }));
            stringBuilder.Append("            </div>\n");
            stringBuilder.Append("        </div>\n");
            stringBuilder.Append("    </div>\n");
            stringBuilder.Append("</div>\n");
            return(stringBuilder.ToString());
        }
コード例 #4
0
ファイル: ApplicationUtil.cs プロジェクト: Milkyway94/vexe
        public static string GetTitlemod(string n)
        {
            string result;

            if (n != null)
            {
                result = CMSfunc.VietnameseConvert.ChuyenTVKhongDau(CMSfunc._Replatemod(n.Trim()));
            }
            else
            {
                result = "";
            }
            return(result);
        }
コード例 #5
0
        public static string ClickDetail(string url)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("<div class=\"ClickDetail\"><a href=\"" + url + "\">");
            stringBuilder.Append(string.Concat(new string[]
            {
                "<img src='",
                ApplicationSetting.URLImages,
                "/ic_mn.gif' border='0' align='absmiddle'> ",
                CMSfunc._Title("Detail"),
                "</a> </div>"
            }));
            return(stringBuilder.ToString());
        }
コード例 #6
0
ファイル: FunctionDB.cs プロジェクト: Milkyway94/vexe
 public static bool AddLog(string DepartmentID, string EmployeeID, string sManipulate, string sContent)
 {
     return(UpdateData.Insert("tbl_Log", new Hashtable
     {
         {
             "Log_DepartmentID",
             DepartmentID
         },
         {
             "Log_EmployeeID",
             EmployeeID
         },
         {
             "Log_Manipulate",
             sManipulate
         },
         {
             "Log_Content",
             CMSfunc.CutString(sContent, 50)
         }
     }));
 }
コード例 #7
0
ファイル: CMSfunc.cs プロジェクト: Milkyway94/vexe
        public static string LoadPath(int p, int id)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("<ul>");
            int p_From_Code = ModControl.GetP_From_Code("Home");

            stringBuilder.Append(string.Concat(new string[]
            {
                "    <li><a title=\"",
                ModControl.GetModField("Title", p_From_Code),
                "\" href=\"",
                VirtualPathUtility.ToAbsolute("~/"),
                "\">",
                CMSfunc._Title("home"),
                "</a></li>"
            }));
            if (ModControl.GetOldP(ModControl.GetOldP(p)) != 0)
            {
                int    oldP = ModControl.GetOldP(ModControl.GetOldP(p));
                string text = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(oldP) + ".htm");
                stringBuilder.Append(string.Concat(new string[]
                {
                    "    <li><a title=\"",
                    ModControl.GetModField("Name", oldP),
                    "\" href=\"",
                    text,
                    "\">",
                    ModControl.GetModField("Name", oldP),
                    "</a></li>"
                }));
            }
            if (ModControl.GetOldP(p) != 0)
            {
                int    oldP2 = ModControl.GetOldP(p);
                string text  = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(oldP2) + ".htm");
                stringBuilder.Append(string.Concat(new string[]
                {
                    "<li><a title=\"",
                    ModControl.GetModField("Name", oldP2),
                    "\" href=\"",
                    text,
                    "\">",
                    ModControl.GetModField("Name", oldP2),
                    "</a></li>"
                }));
            }
            if (p != 0)
            {
                string text = VirtualPathUtility.ToAbsolute("~/" + ModControl.GetModCode(p) + ".htm");
                stringBuilder.Append(string.Concat(new string[]
                {
                    "<li><a title=\"",
                    ModControl.GetModField("Name", p),
                    "\" href=\"",
                    text,
                    "\">",
                    ModControl.GetModField("Name", p),
                    "</a></li>"
                }));
            }
            stringBuilder.Append("</ul>");
            return(stringBuilder.ToString());
        }