コード例 #1
0
ファイル: soap.php プロジェクト: Early-Modern-OCR/AWL-Editor
function getDocumentAttachmentSources($Uid, $Aid)
{
    include "../config.inc.php";
    $Did = $DATA['Attachments'][$Aid]['Did'];
    $ATid = "PAGE";
    $urlFullViewJpeg = getFileURI($Uid, $Did, 'fullViewJPEG');
    $urlAttachment = getFileURI($Uid, $Aid, 'attachment');
    $xml = new XMLWriter();
    $xml->openMemory();
    $xml->setIndent(true);
    $xml->setIndentString("\t");
    $xml->startDocument('1.0', 'utf-8');
    $xml->startElement("DocumentRepository");
    $xml->startElement("DocumentAttachmentSources");
    $xml->startElement("ImageSource");
    $xml->writeAttribute("documentId", $Did);
    $xml->writeAttribute("type", "fullview");
    $xml->text("{$urlFullViewJpeg}");
    $xml->endElement();
    $xml->startElement("AttachmentSource");
    $xml->writeAttribute("attachmentId", $Aid);
    $xml->writeAttribute("attachmentTypeId", $ATid);
    $xml->text("{$urlAttachment}");
    $xml->endElement();
    $xml->endElement();
    $xml->endElement();
    $xml->endDocument();
    return $xml->outputMemory(TRUE);
}
コード例 #2
0
ファイル: dbUtils.php プロジェクト: VoilaVoila/voilacms
function get_current_path()
{
    $out_of_chain_page = false;
    $file = getFileURI();
    $prev_file = getPrevFileURI();
    $current_item = getMenuId($file, $_SESSION['pageLang']);
    if (!$current_item) {
        $current_item = getMenuId($prev_file, $_SESSION['pageLang']);
        $out_of_chain_page = true;
    }
    $has_parent = lookupField('menus', 'menu_id', 'p_id', $current_item);
    $parent = lookupField('menus', 'menu_id', 'p_id', $current_item);
    echo '<a href="' . _PREF . '">' . home . '</a> ';
    if ($current_item) {
        if ($has_parent) {
            echo ' <span class="sep">></span> <a href="' . _PREF . lookupField('menus', 'menu_id', 'item_link', $parent) . '">' . lookupField('menus', 'menu_id', 'item_label', $parent) . '</a>';
            echo ' <span class="sep">></span> <a href="' . _PREF . lookupField('menus', 'menu_id', 'item_link', $current_item) . '">' . lookupField('menus', 'menu_id', 'item_label', $current_item) . '</a>';
        } else {
            echo ' <span class="sep">></span> <a href="' . _PREF . lookupField('menus', 'menu_id', 'item_link', $current_item) . '">' . lookupField('menus', 'menu_id', 'item_label', $current_item) . '</a>';
        }
    }
    if (!$current_item or $out_of_chain_page) {
        $current_form = getCurrentFormName();
        $prev_form = getPrevFormName();
        $id = $_REQUEST['id'];
        if (!$id) {
            $id = $_REQUEST['gid'];
        }
        $current = get_current_form_label($current_form, $id);
        $prev = get_current_form_label($prev_form, $id);
        if (!$out_of_chain_page) {
            foreach ($prev as $label => $link) {
                echo '<span class="sep"> > </span><a href="' . $link . '">' . $label . '</a>';
            }
        }
        foreach ($current as $label => $link) {
            echo '<span class="sep"> > </span><a href="' . $link . '">' . $label . '</a>';
        }
    }
}
コード例 #3
0
ファイル: pathUtil.php プロジェクト: kifah4itTeam/phpapps
function getPath($pageLang)
{
    $file = substr(strrchr($_SERVER['PHP_SELF'], "/"), 1);
    $thisfile = substr($file, 0, strpos($file, '.php'));
    $mid = addslashes($_REQUEST['mid']);
    if ($mid) {
        $title = "";
        $path = getMenuPath();
    } else {
        if ($find_id = getMenuId(getFileURI(), $pageLang)) {
            $title = "";
            $path = getMenuPath($find_id);
        } else {
            //			$title = "<a href='#'>".getTitle($thisfile,$pageLang)."</a>";
            $title = "&nbsp;&nbsp;" . getTitle($thisfile, $pageLang);
            $path = getSPath($thisfile, $pageLang);
        }
    }
    if ($thisfile != "viewProducts" && $thisfile != "viewNews") {
        $path .= $title;
    }
    if ($thisfile == "viewAllProducts") {
        $path .= "&nbsp;&nbsp;" . getTitle($thisfile, $pageLang);
    }
    return $path;
}