<?php /** Configuration file; f0ska xCRUD v.1.6.3; 12/2013 */
class Xcrud_config
{
    // default connection
    public static $dbname = 'dbname'; // Your database name
    public static $dbuser = 'dbuser'; // Your database username
    public static $dbpass = 'dbpass'; // // Your database password
    public static $dbhost = 'localhost'; // Your database host, 'localhost' is default.
    
    
    // theme and language
    public static $theme = 'default'; // can be 'default', 'bootstrap', 'minimal' or your custom. Theme of xCRUD visual presentation. For using bootstrap you need to load it on your page.
    public static $language = 'en'; // sets default localization
    
    
    // database advanced
    public static $dbencoding = 'utf8'; // Your database encoding, default is 'utf8'. Do not change, if not sure.
    public static $db_time_zone = ''; // database time zone, if you want use system default - leave empty.
    public static $mbencoding = 'utf-8'; // Your mb_string encoding, default is 'utf-8'. Do not change, if not sure.

    
    // session
    public static $sess_name = 'PHPSESSID'; // If your script is already using the session, specify the session name for it. By default, the name of the session in PHP equal 'PHPSESSID'.
    public static $sess_expire = 30; // Specifies the lifetime of the session, as well as the existence of a key safety (for example, the maximum edit-saving timeout).
    public static $dynamic_session = false; // this option is used for compatibility with with frameworks and cms that using dynamic session name.
    
    // alternative session (reqires memcache(d) and mcrypt)
    public static $alt_session = false; // use this only if you have troubles with native php sessions
    public static $alt_encription_key = 'super enc key'; // needs to protect alt. session data, required if alt. session is enabled
    public static $alt_lifetime = 30; // in minutes, maximum time between requests when instance's data can be valid
    public static $mc_host = 'localhost'; // Memcache(d) host
    public static $mc_port = 11211; // Memcache(d) port
    
    // scripts
    public static $load_bootstrap = false; // turn on, if you want to load bootstrap via xCRUD
    public static $load_googlemap = true; // loads google map api for 'POINT' type. Turn off, if your site already uses it.
    public static $load_jquery = true; // loads jQuery, turn it off if you already have jQuery on your page. jQuery version must be at least 1.7. If your jQuery loads in the bottom of page, you must activate $manual_load and use  Xcrud::load_css() & Xcrud::load_js() on your page.
    public static $load_jquery_ui = true; // jQueryUI, turn it on if you already have jQueryUI on your page (datepicker and slider widgets are mandatory).
    public static $load_jcrop = true; // disable, if your page already uses jCrop
    public static $jquery_no_conflict = true; // Includes jQuery.noConflict(). Use according to jQuery documentation.
    public static $manual_load = false; // Allows you to disable xcruds css and js output, but you can use Xcrud::load_css() & Xcrud::load_js() in your code manually.

    
    // editor
    public static $editor_url = ''; // URL path to editor script, if you want to use the visual editor.
    //public static $editor_url = 'editors/ckeditor/ckeditor.js';
    public static $editor_init_url = ''; //  URL path to your custom initialization file for editor.
    public static $force_editor = false; // Forced initialization of editor, even if the path is not specified. Check this if you're already using editor on your page.

    
    // grid settings
    public static $show_primary_ai_field = false; // Show primary auto-increment field in create/edit view.
    public static $show_primary_ai_column = false; // Show primary auto-increment column in list view.
    public static $start_minimized = false; // Start all xCRUD instances minimized.
    public static $remove_confirm = true; // Show confirmation dialog on remove action.
    public static $column_cut = 50; // Sets the maximum number of characters in the column.
    public static $limit = 5; // default limit of rows per page
    public static $limit_list = array('20', '50', '100', 'all'); // default limits list
    public static $clickable_list_links = true; // make all links, emails clikable in list view
    public static $clickable_filenames = true; // makes filenames clikable in list view
    public static $fixed_action_buttons = true; // it allows to fix the action buttons on the right side of the table. Appears when you hover on row.
    public static $images_in_grid = true; // shows images in list view
    public static $images_in_grid_height = 55; // maximal height of thumbnails in list view
    public static $button_labels = false; // displays button labels in grid
    
    
    // print
    public static $print_all_fields = true; // print all fields and rows of table or only visible.
    
    
    // csv export
    public static $csv_delimiter = ';'; // default delimiter in CSV file.
    public static $csv_enclosure = '"'; // default enclosure in CSV file.
    public static $csv_all_fields = false; // export all fields and rows of table or only visible.

    
    // editing
    public static $make_checkbox = true; // display TINYINT(1),BIT(1),BOOL(1),BOOLEAN(1) fields like checkboxes
    public static $lists_null_opt = true; // display null(empty) option in all dropdowns and multiselects
    public static $enum_as_radio = false; // shows ENUM field as radiobox, dropdown by default
    public static $set_as_checkboxes = false; // shows SET field as checkboxes, multiselect by default
    public static $upload_folder_def = '../uploads'; // Default uploads folder on your site, relative to xCRUD folder or absolute path required. Folder is must exist.
    
    
    // features
    public static $enable_printout = true; // show print button
    public static $enable_search = true; // show searck block
    public static $enable_pagination = true; // show pagination
    public static $enable_csv_export = true; // show csv export button
    public static $enable_table_title = true; // show table title and toggle button
    public static $enable_numbers = true; // show row numbers in grid
    public static $enable_limitlist = true; // show row numbers in grid
    public static $enable_sorting = true; // alows to sort by column
    public static $benchmark = false; // Displays information about the performance in the lower right corner.
    public static $nested_readonly_on_view = true; // turn of editing nested tables when viewing parent (can edit only when editing parent)
    
       
    // alert settings
    public static $email_from = 'mailer@example.com'; // email from address
    public static $email_from_name = 'xCRUD Data Management System'; // email from name
    public static $email_enable_html = true; // enables html in email letters

    
    // remote request options (call_page() methods)
    public static $use_browser_info = false; // allow to use your browser cookie, referer, user agent for http request to some file or url. BE CAREFUL: DON'T USE IT FOR REQUESTS TO EXTERNAL SITES!!!

    
    // date
    public static $date_first_day = 1; // 0 - Sunday, 1 - Monday etc. Uses in datepicker and search ranges
    public static $date_format = 'yy/mm/dd'; // jqueryui date format
    public static $time_format = 'HH:mm:ss'; // jqueryui time format
    public static $php_date_format = 'Y/m/d'; // php date format
    public static $php_time_format = 'H:i:s'; // php time format
    
    
    // search
    public static $search_all = true; // enables -all- option for search
    public static $available_date_ranges = array( // available date ranges, can be translated in language file
        'next_year',
        'next_month',
        'today',
        'this_week_today',
        'this_week_full',
        'last_week',
        'last_2weeks',
        'this_month',
        'last_month',
        'last_3months',
        'last_6months',
        'this_year',
        'last_year');
    public static $search_pattern = array('%','%'); // uses for LIKE operator in SQL request
    public static $search_opened = false; // make search always opened
    
    
    // map
    public static $default_point = '35.6894875,139.69170639999993';
    public static $default_text = 'your_position';
    public static $default_zoom = 8;
    public static $default_width = 500;
    public static $default_height = 300;
    public static $default_coord = true;
    public static $default_search = true;
    public static $default_search_text = 'search_here';
    
    
    // xcrud folder url
    public static $scripts_url = ''; // URL to the xCRUD folder, not real path, without a trailing slash, can be relative, e.g. 'some_folder/xcrud' or absolute, e.g. 'http://www.your_site.com/some_folder/xcrud'. If empty - will be detected automatically
    public static $urls2abs = true; // makes relative urls to absolute. Turn off if you have some troubles with relative urls.
    
    
    // system integration options. NO ANY TRAILING SLASHES!
    // urls (relative to $scripts_url or xcrud's folder, if $scripts_url is not defined)
    public static $plugins_uri = 'plugins'; // scripts and libraries
    public static $themes_uri = 'themes'; // css, images
    public static $lang_uri = 'languages'; // js files
    public static $ajax_uri = 'xcrud_ajax.php'; // main ajax file or url
    // paths (relative to xcrud's folder)
    public static $themes_path = 'themes'; // php and ini files
    public static $lang_path = 'languages'; // ini files
    // external session
    public static $external_session = false; // use only when you use integration with externall session
    // loading events
    public static $before_construct = false; // callable param, runs before instance creation
    public static $after_render = false; // callable param, runs after instance was rendered
    
    
    // system
    public static $demo_mode = false; // disables any changing data in database
    public static $performance_mode = false; // experimental, disables {field_tags} features
    
    

}
