Ejemplo n.º 1
0
            $wheresql .= " AND `source` like '%" . $source . "%'";
        }
        if (!empty($_GET['title'])) {
            $wheresql .= " AND `parent_id` = '" . $_GET["title"] . "' ";
        }
    }
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('relation') . $wheresql;
    $total_val = $db->get_total($total_sql);
    $page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
    $currenpage = $page->nowindex;
    $offset = ($currenpage - 1) * $perpage;
    $list = get_list($offset, $perpage, $wheresql . $oederbysql);
    $smarty->assign('list', $list);
    $smarty->assign('page', $page->show(3));
    $smarty->assign('navlabel', "list");
    $smarty->assign('source_list', get_source_list());
    $smarty->assign('title_list', get_title_list());
    $smarty->assign('source', $_GET['source']);
    $smarty->assign('title', $_GET['title']);
    $smarty->assign('type', $_GET['type']);
    get_token();
    $smarty->display('replace/admin_replace.htm');
} elseif ($act == 'add') {
    get_token();
    $smarty->assign('navlabel', "add");
    $smarty->display('replace/admin_replace_add.htm');
} elseif ($act == 'add_title') {
    get_token();
    $smarty->assign('navlabel', "add_title");
    $smarty->display('replace/admin_replace_add_title.htm');
} elseif ($act == 'add_save') {
Ejemplo n.º 2
0
                echo '<li><a href="', $note->getHtmlUrl(), '" onclick="pasteid(\'', $note->getXref(), '\');"><span class="list_item">', $note->getFullName(), '</span></a></li>';
            }
            echo '</ul>
			<p>', WT_I18N::translate('Shared notes found'), ' ', count($mynotelist), '</p>';
        } else {
            echo '<p>', WT_I18N::translate('No results found.'), '</p>';
        }
        echo '</div>';
    }
    // Output Sources
    if ($type == "source") {
        echo '<div id="find-output">';
        if ($filter) {
            $mysourcelist = search_sources($filter_array, array(WT_GED_ID), 'AND', true);
        } else {
            $mysourcelist = get_source_list(WT_GED_ID);
        }
        if ($mysourcelist) {
            usort($mysourcelist, array('WT_GedcomRecord', 'Compare'));
            echo '<ul>';
            foreach ($mysourcelist as $source) {
                echo '<li><a href="', $source->getHtmlUrl(), '" onclick="pasteid(\'', $source->getXref(), '\', \'', WT_Filter::escapeJs($source->getFullName()), '\');"><span class="list_item">', $source->getFullName(), '</span></a></li>';
            }
            echo '</ul>
			<p>', WT_I18N::translate('Total sources: %s', count($mysourcelist)), '</p>';
        } else {
            echo '<p>', WT_I18N::translate('No results found.'), '</p>';
        }
        echo '</div>';
    }
    // Output Special Characters
Ejemplo n.º 3
0
         foreach ($mynotelist as $note) {
             echo '<li><a href="javascript:;" onclick="pasteid(\'', $note->getXref(), "', '", preg_replace("/(['\"])/", "\\\$1", PrintReady($note->getListName())), '\'); return false;"><span class="list_item">', PrintReady($note->getListName()), '</span></a></li>';
         }
         echo '</ul></td></tr><tr><td class="list_label">', $pgv_lang['shared_notes_found'], ' ', count($mynotelist), '</td></tr>';
     } else {
         echo '<tr><td class="list_value_wrap">', $pgv_lang['no_results'], '</td></tr>';
     }
     echo '</table>';
 }
 // Output Sources
 if ($type == "source") {
     echo '<table class="tabs_table ', $TEXT_DIRECTION, ' width90">';
     if ($filter) {
         $mysourcelist = search_sources($filter_array, array(PGV_GED_ID), 'AND', true);
     } else {
         $mysourcelist = get_source_list(PGV_GED_ID);
     }
     if ($mysourcelist) {
         usort($mysourcelist, array('GedcomRecord', 'Compare'));
         echo '<tr><td class="list_value_wrap"><ul>';
         foreach ($mysourcelist as $source) {
             echo '<li><a href="javascript:;" onclick="pasteid(\'', $source->getXref(), "', '", preg_replace("/(['\"])/", "\\\$1", PrintReady($source->getFullName())), '\'); return false;"><span class="list_item">', PrintReady($source->getFullName()), '</span></a></li>';
         }
         echo '</ul></td></tr><tr><td class="list_label">', $pgv_lang['total_sources'], ' ', count($mysourcelist), '</td></tr>';
     } else {
         echo '<tr><td class="list_value_wrap">', $pgv_lang['no_results'], '</td></tr>';
     }
     echo '</table>';
 }
 // Output Special Characters
 if ($type == "specialchar") {
Ejemplo n.º 4
0
function make_doc_form($path = '../')
{
    /**
    * constructs the doc form and returns it 
    *
    * @since 1.0
    *
    * @caller user loads index page
    * @calls get_source_list
    * @ingroup make index
    *
    * @param optional string url path
    * @return html string with the forms
    */
    $firstSources = get_source_list(1, $path);
    $secondSources = get_source_list(2, $path);
    $pop_up_slides = <<<EOD
<form id="documentForm" class="notVisible">

\t<article class="documentFormSection default" data-animatable="false">
\t\t<span tabindex="-1" class="ir btn logo">cut ups</span>
\t\t<fieldset id="src1">
\t\t\t<div class="twoSrcs">
\t\t\t
\t\t\t\t<button type="button" tabindex="-1" class="btn ir textInputBtn">text input</button>
\t\t\t\t<button type="button" tabindex="-1" class="btn ir publishedTextBtn">published input</button>
\t\t\t
\t\t\t\t<header class="documentFormHeader">
\t\t\t\t\t<span>select first</span><br/>
\t\t\t\t\t<span>source</span>
\t\t\t\t</header>
\t\t\t
\t\t\t\t<div class="inputTextSrc">
\t\t\t\t\t<p class="editable" tabindex="-1" contenteditable="true" data-original_value="input / paste text">input / paste text</p>
\t\t\t\t</div>
\t\t\t\t<div class="publishedTextSrc">
\t\t\t\t\t{$firstSources}
\t\t\t\t</div>
\t\t\t</div>
\t\t\t
\t\t</fieldset>
\t\t<footer id="src1Footer"><span class="makeProjectText">1 of 3</span><span class="makeDocumentText">1 of 2</span></footer>
\t\t<span class="scrollArrow">scroll to reveal</span>
\t</article>

\t<article class="documentFormSection default" data-animatable="false">
\t\t<span tabindex="-1" class="ir btn logo">cut ups</span>
\t\t<fieldset id="src2">
\t\t\t<div class="twoSrcs">
\t\t\t
\t\t\t\t<button type="button" tabindex="-1" class="btn ir textInputBtn">text input</button>
\t\t\t\t<button type="button" tabindex="-1" class="btn ir publishedTextBtn">published input</button>
\t\t\t
\t\t\t\t<header class="documentFormHeader">
\t\t\t\t\t<span>select second</span><br/>
\t\t\t\t\t<span>source</span>
\t\t\t\t</header>
\t\t\t
\t\t\t\t<div class="inputTextSrc">
\t\t\t\t\t<p class="editable"tabindex="-1" contenteditable="true" data-original_value="input / paste text">input / paste text</p>
\t\t\t\t</div>
\t\t\t\t<div class="publishedTextSrc">
\t\t\t\t\t{$secondSources}
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<label id="finalDocFormStep">
\t\t\t\tClick to add page
\t\t\t\t<button type="button" tabindex="-1" class="ir btn makeProject visible makeDoc"></button>
\t\t\t</label>
\t\t\t
\t\t</fieldset>
\t\t<footer id="src2Footer"><span class="makeProjectText">2 of 3</span><span class="makeDocumentText">2 of 2</span></footer>
\t\t<span class="scrollArrow">scroll to reveal</span>
\t</article>

\t<article id="titleAndPasswordInputOuterWrap" class="documentFormSection" data-animatable="false">
\t\t<span tabindex="-1" class="ir btn logo">cut ups</span>
\t\t<fieldset id="titleAndPasswordInputInnerWrap">
\t\t\t<div id="titleInputWrap">
\t\t\t\t<input autocomplete="off" tabindex="-1" class="textInput" type="text" id="titleInput" data-original_value="Title" value="Title" />
\t\t\t\t<span class="style notVisible copiedText">Title</span>
\t\t\t</div>
\t\t\t<div id="passwordInputWrap">
\t\t\t\t<input autocomplete="off" tabindex="-1" class="textInput passwordInput" type="text" id="passwordInput" data-original_value="Password (optional)" value="Password (optional)" maxlength="15" />
\t\t\t\t<span class="style notVisible copiedText"></span>
\t\t\t</div>
\t\t
\t\t\t<label id="finalProjectFormStep">
\t\t\t\tClick to make doc
\t\t\t\t<button type="button" tabindex="-1" class="ir btn makeProject visible makeDoc"></button>
\t\t\t</label>
\t\t</fieldset>
\t\t<footer id="titleAndPasswordFooter">3 of 3</footer>
\t</article>

</form>
<div id="documentFormExtender" class="style extender"></div>
<button type="button" tabindex="-1" class="ir btn hideCreate x"></button>
EOD;
    return $pop_up_slides;
}
Ejemplo n.º 5
0
// Parses gedcom file and displays a list of the sources in the file.
//
// webtrees: Web based Family History software
// Copyright (C) 2014 webtrees development team.
//
// Derived from PhpGedView
// Copyright (C) 2002 to 2009 PGV Development Team.  All rights reserved.
//
// 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 2 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, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
define('WT_SCRIPT_NAME', 'sourcelist.php');
require './includes/session.php';
require_once WT_ROOT . 'includes/functions/functions_print_lists.php';
$controller = new WT_Controller_Page();
$controller->setPageTitle(WT_I18N::translate('Sources'));
$controller->pageHeader();
echo '<div id="sourcelist-page">', '<h2>', WT_I18N::translate('Sources'), '</h2>';
echo format_sour_table(get_source_list(WT_GED_ID));
echo '</div>';