Location: PHPKode > projects > Pindorama > pindorama/active/config/core.php
<?php
/************************************************************
 *                                                          *
 *      Pindorama Core Configuration v. 0.11                *
 *      Guilherme Capilé <hide@address.com>           *
 *                                                          *
 ************************************************************/

$param["host"]=($_SERVER["host"] != "")?($_SERVER["host"]):($param["host"]);
$c["base"]=dirname(dirname($_SERVER["PATH_TRANSLATED"]));
$c["base"]=($_SERVER["pindorama_base"] != "")?($_SERVER["pindorama_base"]):($c["base"]);
$c["scheme"] = ($_SERVER["SERVER_PORT"] == "443")?("https"):("http");
$c += array(
    "active"            => $c["base"]."/active/",
    "components"        => $c["base"]."/active/components/",
    "stylesheets"       => $c["base"]."/active/stylesheets/",
    "config"            => $c["base"]."/etc/config/",
    "includes"          => $c["base"]."/etc/includes",
    "etc"               => $c["base"]."/etc/",
    "templates"         => $c["base"]."/etc/templates/",
    "db"                => $c["base"]."/var/db/",
    "index"             => $c["base"]."/var/index/",
    "www"               => $c["base"]."/var/www",
    "cache_dir"         => $c["base"]."/var/webcache",
    "logfile"           => $c["base"]."/var/log/xpml.log",
    "xslt_logfile"      => $c["base"]."/var/log/xpml-xslt.log",
    "search_dir"        => $c["base"]."/var/swish/",
    "data_dir"          => $c["base"]."/var/post/",
    "users"             => $c["base"]."/var/users/",
    "var"               => $c["base"]."/var/",
    "host"              => "http://".$_SERVER["HTTP_HOST"],
    "base_url"          => "",
    "dir_index"         => "index.html index.php",
    "xmlpi"             => '<?xml version="1.0" encoding="iso-8859-1"?>',
    "log_level"         => 0,
    "lock_delay"        => 7200,
    "file_mask"         => 0664,
    "require_valid_user"=> TRUE,
    "save-cache"        => FALSE,
    "cache"             => FALSE,
    "permissions"       => TRUE,
    "language"          => "pt-br",
    "error"             => array("404"=>$c["host"]."/erro404.html","403"=>$c["host"]."/erro403.html"),
    "read-only"         => "meta-type",
    "version"           => "0.11",
    "cookies"           => TRUE,
    "remote_server"     => array($c["scheme"]."://localhost/xrpc-server"),
    "only_cron_publish" => FALSE,
    "publish_mode"      => "local_copy",
    "sql_method"        => "odbc",
    "sql_dsn"           => "pindorama",
    "sql_user"          => "pindorama",
    "sql_password"      => "pindorama",
    "publish_maxfiles"  => 10,
    "publish_timeout"   => 10,
    "bpublish_maxfiles" => 5000,
    "bpublish_timeout"  => 5000,
);
$c["xmlrpc_s"] = array(
    "permit"            => array("127.0.0.1"),
    "document_root"     => $c["var"]."public",
    "modules_root"      => $c["components"]."xmlrpc/modules/",
    "scheme"            => $c["scheme"],
    "host"              => "localhost",
    "port"              => ":80",
    "path"              => "/xrpc-server",
    "server"            => "xml-rpc at pindorama v0.11",
    "logfile"           => $c["base"]."/var/log/xmlrpc.log"
);
$c["xmlrpc_c"] = array(
    "scheme"            => "http",
    "user"              => "",
    "pass"              => "",
    "host"              => "pindorama",
    "port"              => ":80",
    "path"              => "/xrpc-server",
    "user-agent"        => "xml-rpc from pindorama v0.11"
);

if (is_file($c["config"]."core.php")){
    require_once($c["config"]."core.php");
}
if ($c["cache"]) {
    $c["save-cache"] = TRUE;
}

if (is_file($c["components"]."lang/".$c["language"].".php")){
    require_once($c["components"]."lang/".$c["language"].".php");
}

$menu["tool"]["batch"]["url"]   = $c["base_url"]."/tools/batch_publish.dav";
$menu["tool"]["batch"]["label"] = $l["tools"]["batch_publish"];
$menu["tool"]["clean"]["url"]   = $c["base_url"]."/tools/clean.dav";
$menu["tool"]["clean"]["label"] = $l["tools"]["clean"];

if (!is_array($lang)) {
    $lang = array("pt-br"=>"português (Brasil)", "en-us"=>"inglês (EUA)");
}
if (!is_array($types)) {
    $types= array(
    //  "collection"    => $l["types"]["collection"],
        "text"          => $l["types"]["text"],
    //    "event"       => $l["types"]["event"],
        "image"         => $l["types"]["image"],
        "interactive-resource"=>$l["types"]["interactive-resource"],
        "binfile"       => $l["types"]["binfile"],
    //    "reference"     => $l["types"]["reference"],
        "dataset"       => $l["types"]["dataset"]
    //  "service"       => $l["types"]["service"],
    //  "software"      => $l["types"]["software"],
    //   "sound"        => $l["types"]["sound"],
    //  "physical-object"=>$l["types"]["physical-object"],
    );
}

if (!is_array($mime_types)) {
    $mime_types = array(
      "text"  => array(
        "html"	=>"text/html",
        "css"	=>"text/css",
        "txt"	=>"text/plain",
        "rtf"	=>"text/rtf",
        "xml"	=>"text/xml",
        "php"   =>"application/x-httpd-php",
        "js"	=>"application/x-javascript"
      ),
      "image" => array(
        "gif"	=>"image/gif",
        "jpg"	=>"image/jpeg",
        "png"	=>"image/png"
      ),
      "interactive-resource"=>array(
        "mid"	=>"audio/midi",
        "mp3"	=>"audio/mpeg",
        "ram"	=>"audio/x-pn-realaudio",
        "ra"	=>"audio/x-realaudio",
        "wav"	=>"audio/x-wav",
        "mpg"	=>"video/mpeg",
        "mov"	=>"video/quicktime",
        "swf"	=>"application/x-shockwave-flash"
      ),
      "binfile"=> array(
        "doc"	=>"application/msword",
        "ps"	=>"application/postscript",
        "pdf"	=>"application/pdf",
        "xls"	=>"application/vnd.ms-excel",
        "ppt"	=>"application/vnd.ms-powerpoint",
        "tar"	=>"application/x-tar",
        "zip"	=>"application/zip"
      ),
      "reference" => array(
        "html"	=>"text/html"
      ),
      "dataset"  => array(
        "xml"	=>"text/xml"
      ),
    );
}

require_once($c["active"]."config/mime.php");
require_once($c["users"]."permissions.php");

if (!is_array($d)) {
    $d = array(
    "title" => "Sem título",
    "type" => "text",
    "format" => "text/html",
    "language" => "pt-br",
    "version" => "0.11"
    );
}

$r = array(
"read" => $l["rights"]["read"],
"write" => $l["rights"]["write"],
"publish" => $l["rights"]["publish"]);

$a = array(
    "text-urls"=>"<ext>html</ext><ext>js</ext><ext>css</ext><ext>php</ext><ext>xml</ext>",
    "empty"=>"<xpml/>",
    "defaults"=>$d,
    "lang"=>$lang,
    "types"=>$types,
    "mime"=>$mime,
    "rights"=>$r,
    "mime_types"=>$mime_types,
    "groups"=>$g,
    "labels"=>$l,
    "menu"=>$menu,
);
?>
Return current item: Pindorama