Example #1
0
                edit_document($title, $body, $document['ID'], null);
            }
        }
        if (isset($_GET['sign'])) {
            sign($_SESSION['ID'], $_GET['sign']);
            header('location:./document_editor.php?id=' . $document['ID']);
        }
        echo '';
    } else {
        if ($permissions == 1) {
            show('document_editor', null, null);
            echo '<a  class="basic-grey-e" href="./documents.php">Вернуться к документам</a>
                <div class="basic-grey-e" id="title"></div>
                <div class="basic-grey-e" id="tbody"></div>
                <div class="basic-grey-e" id="tsigned"></div>';
            $document = get_document($_GET['id']);
            set_element_html('title', '<i><b>' . $document['TITLE'] . '</b></i>');
            set_element_html('tbody', '<i>' . $document['BODY'] . '</i>');
            if ($document['SIGNED_BY'] > 0) {
                $user = get_user($document['SIGNED_BY']);
                set_element_html('tsigned', 'Документ подписал(а): ' . $user['SURNAME'] . ' ' . $user['NAME'] . ', дата: ' . $document['SD']);
            }
        } else {
            echo 'Error 401';
        }
    }
} else {
    show('document_editor', null, null);
    echo '<form class="basic-grey-e" action="./document_editor.php" name="save_doc" method="post">
                <a href="./documents.php">Вернуться к документам</a>
                <input type="text" placeholder="Название документа" id="title" name="title"></br>
Example #2
0
 protected static function handle_assets()
 {
     $class = get_called_class();
     if (isset(self::$handled_assets[$class])) {
         return;
     }
     self::$handled_assets[$class] = true;
     static::add_assets(get_document());
 }
Example #3
0
	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
	IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.	
*/
//this script dispatch the request between the two scripts that return the
//document list and the two version of a document
require 'doclist.php';
require 'docversions.php';
require 'el_documentation.php';
//if is set the doc list variable then return the doc list
if (isset($_GET['doc_list'])) {
    $result = get_doc_list();
    echo $result;
    return $result;
} else {
    if (isset($_GET['doc_name'])) {
        $result = get_document($_GET['doc_name'], $_GET['version']);
        echo $result;
        return $result;
    } else {
        if (isset($_GET['el_documentation'])) {
            $result = get_element_documentation($_GET['el_documentation'], $_GET["type"]);
            echo $result;
            return $result;
        } else {
            if (isset($_GET['tec_documentation'])) {
                $result = get_element_tech_documentation($_GET['tec_documentation'], $_GET["type"]);
                echo $result;
                return $result;
            }
        }
    }
Example #4
0
 $doc->formatOutput = true;
 $doc->preserveWhiteSpace = false;
 $none = true;
 foreach ($filesListXml as $fileXml) {
     $docName = $fileXml->attributes()->name;
     $doc->load('../doc/' . $docName);
     $elements = $doc->getElementsByTagName($find_element);
     if ($elements->length == 0) {
         continue;
     }
     echo "<div class='title-link-wrapper'><a class='title-link menu-external' title='View this on schema examples' ref='" . $docName . "' href='index.html#" . $docName . "'>" . $docName . "</a></div>";
     $data = array();
     foreach ($elements as $node) {
         if (!empty($node)) {
             $aNode = $doc->saveXML($node);
             echo get_document($aNode);
             $none = false;
         }
         /*
             // For debugging
             
             foreach($node->childNodes as $child) {
                 $data[] = array($child->nodeName => $child->nodeValue);
                 //print_r($data);
                 echo $doc->saveXML($node);
             }
         */
     }
     echo "<hr />";
 }
 if ($none) {
Example #5
0
<?php

include 'functions.php';
session_start();
if (!isset($_SESSION['ID'])) {
    header('Location: ./index.php');
}
show('documents', null, null);
$document_ids = get_documents($_SESSION['ID']);
foreach ($document_ids['DOCUMENT_ID'] as $i => $document_id) {
    $document = get_document($document_ids['DOCUMENT_ID'][$i]);
    echo '<div class="basic-grey-r" ><a href="./document_editor.php?id=' . $document['ID'] . '">' . $document['TITLE'] . ' (создан ' . $document['CR'] . ')</a>
    <a href="./documents.php?delete=' . $document['ID'] . '"><i>удалить</i></a></div>
    </br>';
}
echo '</td>
    </tr>
</table>
</body>
</html>';
if (isset($_GET['delete'])) {
    delete_document($_GET['delete']);
    header('Location: ./documents.php');
}