// Personal Webpage Engine
// Copyright(c) 2008 Mihail Kochanov
// You can contact me at StilgarAD@yahoo.com
// Copyright(c) 2009 Ivelina Georgieva
// You can contact me at ivelina.georgieva@gmail.com
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
//------------------------------------------------------------------------------
//
// Personal Web Page Engine
//
//------------------------------------------------------------------------------


/// <summary>
/// Summary description for Constants
/// </summary>
public static class Constants
{
    public static class Anchors
    {
        public const string Comment = "comment";
    }

    public static class Application
    {
        public const string AboutContent = "AboutContent";
        public const string CommentsPageSize = "CommentsPageSize";
        public const string WebsiteSlogan = "WebsiteSlogan";
        public const string WebsiteTitle = "WebsiteTitle";
    }

    public static class Cache
    {
        public const string LatestComments = "LatestComments";
        public const string NewsItemImage = "NewsItemImage";
        public const string Quotes = "Quotes";
        public const string Tags = "Tags";
        public const string Users = "Users";
    }

    public static class Error
    {
        public const string ArticleNotFound = "The article with the specified ID does not exist";
        public const string ValidationFailed = "Error validating request. This may occur if javascript is disabled.";
        public const string InvalidCommentLength = "Comment is above 10000 characters or contains more than 50 linebreaks.";
        public const string ImageUnavailable = "Image unavailable.";
        public const string InvalidQueryString = "The query string seems to be invalid.";
        public const string InvalidUser = "Invalid user.";
    }

    //query string variables
    public static class QueryString
    {
        public const string IP = "IP";
        public const string NewsItemID = "NewsItemID";
        public const string NewsItemImageID = "NewsItemImageID";
        public const string Page = "Page";
        public const string Tag = "Tag";
        public const string Username = "Username";
    }

    public static class Regex
    {
        //capture [] tags
        //the content of the opening tag with the attributes is in backreference group 1
        //the tag itself is in backreference 2
        //the value of the tag is in backreference 3
        public const string CaptureBracketTags = @"\[(([A-Z][A-Z0-9]*)\b[^\]]*)](.*?)\[/\2]";
        public const string CaptureHtmlTags = @"<(([A-Z][A-Z0-9]*)\b[^>]*)>(.*?)</\2>";
    }

    public static class Roles
    {
        public const string Admin = "Admin";
    }

    //session variables
    public static class Session
    {
        public const string EditNewsItem = "EditNewsItem";
        public const string ErrorMessage = "ErrorMessage";
    }

    public static class Settings
    {
        //default page size will be 20 says me
        public const int CommentsPageSize = 20;
        public const string DateTimeFormat = "HH:mm dd.MM.yyyy";
    }

    //viewstate variables
    public static class ViewState
    {
        public const string LastCommentID = "LastCommentID";
    }
}
