Location: PHPKode > projects > Pindorama > pindorama/active/components/indices.php
<?php
/**
*                                                          
* @name    Pindorama Core Configuration                    
* @version 0.11
* @author  Guilherme Capilé <hide@address.com>           
*                                                          
*/

/*
    $pcom["indices.preview_sitemap"]=$c["base_url"]."/sitemap.dav";
    $pcom["indices.select_sitemap"]=$c["base_url"]."/sitemap-select.dav";
    $pcom["indices.select_listing"]=$c["base_url"]."/index-listing.dav";
    $pcom["indices.select_file"]=$c["base_url"]."/file-listing.dav";
    $pcom["indices.preview_uris"]=$c["base_url"]."/uris.dav";
    $pcom["indices.select_uris"]=$c["base_url"]."/uris-select.dav";
    $pcom["indices.insert_uris"]=$c["base_url"]."/uris-insert.dav";
    $pcom["indices.preview_documents"]=$c["base_url"]."/open.dav";
    $pcom["indices.preview_users"]=$c["base_url"]."/users.dav";
    */

/**
*                                                          
* @name        pin_select_listing
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_select_listing()
{
    global $arg, $param, $c, $l;
    $param["select"] = 1;
    $param["title"] = $l["sitemap"]["title"];
    pin_output_header ($param["script-name"], FALSE, "php");
    if ($_GET["index"] != "") {
        $index = $_GET["index"];
        if ($index == "index:uris") {
            $index = "php:uris";
        }
    } else {
        $index = "index:dataset";
    }
    echo pin_xsl_process ($index, $c["stylesheets"]."dav/index-listing.xsl");
} // select_listing

/**
*                                                          
* @name        pin_select_file
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_select_file()
{
    global $arg, $param, $c, $l;
    $param["select"] = 1;
    $param["title"] = $l["sitemap"]["title"];
    pin_output_header ($param["script-name"], FALSE, "php");
    if ($_GET["index"] != "") {
        $index = $_GET["index"];
    } else {
        $index = "php:uris";
    }
    $index = "php:uris";
    echo pin_xsl_process ($index, $c["stylesheets"]."dav/file-listing.xsl");
} // select_file


/**
*                                                          
* @name        pin_preview_sitemap
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_preview_sitemap()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["title"];
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("index:sitemap", $c["stylesheets"]."dav/sitemap.xsl");
} // preview_sitemap

/**
*                                                          
* @name        pin_select_sitemap
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_select_sitemap()
{
    global $arg, $param, $c, $l;
    $param["select"] = 1;
    $param["title"] = $l["sitemap"]["title"];
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("index:sitemap", $c["stylesheets"]."dav/sitemap.xsl");
} // preview_sitemap

/**
*                                                          
* @name        pin_preview_uris
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_preview_uris()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["uris"];
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("php:uris", $c["stylesheets"]."dav/sitemap.xsl");
} // preview_uris


/**
*                                                          
* @name        pin_select_uris
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_select_uris()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["uris"];
    $param["select"] = 1;
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("php:uris", $c["stylesheets"]."dav/sitemap.xsl");
} // select_uris

/**
*                                                          
* @name        pin_insert_uris
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_insert_uris()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["uris"];
    $param["insert"] = 1;
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("php:uris", $c["stylesheets"]."dav/sitemap.xsl");
} // select_uris


/**
*                                                          
* @name        pin_preview_documents
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
* @see         pin_xsl_array()
* @see         pin_read_dir()
*
* @return      
*/
function pin_preview_documents()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["documents"];
    pin_output_header ($param["script-name"], FALSE, "php");
    $docs = "";
    if ($_GET["dir"] == "") {
        $alldocs = pin_read_dir($c["db"], "name", "www_n*.xml");
        if (is_array($alldocs)) {
            foreach ($alldocs as $tmp) {
                if (!preg_match("/\.[^\.]+\./", $tmp["name"])){
                    $docs[]["id"] = "db:".substr($tmp["name"], 0, strlen($tmp["name"]) -4);
                }
            }
        }
    }
    $arg["documents"] = $c["xmlpi"].'<xpml><resource name="documents">'.pin_xml_array($docs, TRUE, TRUE).'</resource></xpml>';
    echo pin_xsl_process ("arg:documents", $c["stylesheets"]."dav/sitemap.xsl");
} // preview_uris


/**
*                                                          
* @name        pin_preview_users
* @deprecated  
* @version     0.11
*
* @author      Guilherme Capilé <hide@address.com>
*
* @global      $arg
* @global      $param
* @global      $c
* @global      $l
*
* @see         pin_output_header()
* @see         pin_xsl_process()
*
* @return      
*/
function pin_preview_users()
{
    global $arg, $param, $c, $l;
    $param["title"] = $l["sitemap"]["users"];
    pin_output_header ($param["script-name"], FALSE, "php");
    echo pin_xsl_process ("index:users", $c["stylesheets"]."dav/users.xsl");
} // preview_uris

?>
Return current item: Pindorama