Beispiel #1
0
function get_node_data($params, $get_array = false)
{
    $ret = array();
    $click_level = $params['TREE']['depth'];
    $subcat_id = $params['NODES'][$click_level]['id'];
    $cat_id = $params['NODES'][$click_level - 1]['id'];
    $href = true;
    if (isset($params['TREE']['caller']) and $params['TREE']['caller'] == 'Documents') {
        $href = false;
    }
    $nodes = get_documents($cat_id, $subcat_id, $href);
    foreach ($nodes as $node) {
        $ret['nodes'][] = $node->get_definition();
    }
    $json = new JSON(JSON_LOOSE_TYPE);
    $str = $json->encode($ret);
    return $str;
}
Beispiel #2
0
     echo get_company($_GET);
 } else {
     if (strpos($uri, '/company_reviews') !== false) {
         echo get_company_review($_GET);
     } else {
         if (strpos($uri, '/add_review_company') !== false) {
             echo add_company_review($_POST);
         } else {
             if (strpos($uri, '/get_account') !== false) {
                 echo get_account($_GET);
             } else {
                 if (strpos($uri, '/components') !== false) {
                     echo get_components($_GET);
                 } else {
                     if (strpos($uri, '/documents') !== false) {
                         echo get_documents($_GET);
                     } else {
                         if (strpos($uri, '/products') !== false) {
                             echo get_products($_GET);
                         } else {
                             if (strpos($uri, '/add_to_project') !== false) {
                                 echo add_to_project($_POST);
                             } else {
                                 if (strpos($uri, '/remove_from_project') !== false) {
                                     echo remove_from_project($_POST);
                                 } else {
                                     if (strpos($uri, '/uploadServiceImage') !== false) {
                                         echo upload_service_image($_POST, $_FILES);
                                     } else {
                                         if (strpos($uri, '/upload') !== false) {
                                             echo upload_document($_POST, $_FILES);
Beispiel #3
0
        <title>admin</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body class='admin'>
        <div>
            <h1>add new sources</h1>
            <p>this will index all the document inside the source folder</p>
           <a href="get_sources.php"> <button> add now!</button></a>
        </div>

        <div>
            <?php 
$results = get_documents();
?>
            <h1>remove results</h1>
            <p>check the document you wish to remove and press "remove this items"</p>
                    <?php 
if ($results->num_rows > 0) {
    ?>
            <form action="" method="post">
                <table cellspacing="10">
                    <thead>
                        <tr>
                            <th>book</th>
                            <th>chapter name</th>
                            <th>chapter number</th>
                            <th>remove</th>
                        </tr>
get_text_blocks('220x', true, true, '660x');
?>
            
            <?php 
get_internal_links();
?>
            
            <?php 
get_video('540', '304');
?>
            
            <?php 
get_image_gallery(8, '140x140', true, true, '660x');
?>
               
            <?php 
get_documents();
?>
          </div>
          <div class="sidebar">
            <?php 
get_contact();
?>
            <?php 
get_sidebar();
?>
          </div>          
          <div class="clear"></div>
        </div>
        <div class="clear"></div>
      </div> <!-- /.content -->
 /**
  * Tests that get_documents properly filters when asked
  */
 function test_get_documents_filter()
 {
     $tdr = new WP_Test_Document_Revisions();
     $tdr->test_add_document();
     //add a doc
     $docID = $tdr->test_add_document();
     //add another doc
     wp_publish_post($docID);
     //give postmeta to a doc
     update_post_meta($docID, 'test_meta_key', 'test_value');
     wp_cache_flush();
     $docs = get_documents(array('test_meta_key' => 'test_value'));
     $this->assertCount(1, $docs, 'get_documents filter count');
 }
Beispiel #6
0
            break;
        case $_L['BTN_delete']:
            break;
        case $_L['BTN_list']:
            break;
        case $_L['BTN_search']:
            //check if user is searching using name, payrollno, national id number or other fields
            //			find($_POST["search"]);
            break;
    }
}
if (!$propertyno) {
    $propertyno = 1;
}
$items = array();
$noitems = get_documents($propertyno, $invoiceno, $receiptno, $voucherno);
if (!$invoiceno && $_POST['invoiceno']) {
    $invoiceno = $_POST['invoiceno'];
}
if (!$receiptno && $_POST['receiptno']) {
    $receiptno = $_POST['receiptno'];
}
if (!$voucherno && $_POST['voucherno']) {
    $voucherno = $_POST['voucherno'];
}
?>
<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
<!--<html xmlns="http://www.w3.org/1999/xhtml">-->
<!--<head>-->
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />-->
<!--<link href="css/new.css" rel="stylesheet" type="text/css">-->
Beispiel #7
0
    echo '<a href="./admin_panel.php?action=exit">Выход</a></br>';
    echo '<table>
          <tr>
          <th>Управление пользователями</th>
          <th>Управление документами</th>
          </tr>
          <tr>
          <td>

        ';
    $users = get_users(null);
    foreach ($users['ID'] as $i => $user) {
        echo $users['NAME'][$i] . ' ' . $users['SURNAME'][$i] . ' <a href="./admin_panel.php?delete_user='******'ID'][$i] . '"> (УДАЛИТЬ)</a></br>';
    }
    echo '</td><td>';
    $documents = get_documents(null);
    foreach ($documents['ID'] as $i => $document) {
        echo $documents['TITLE'][$i] . ' ' . $documents['CR'][$i] . ' <a href="./admin_panel.php?delete_document=' . $documents['ID'][$i] . '"> (УДАЛИТЬ)</a></br>';
    }
    if (isset($_GET['delete_user'])) {
        delete_user($_GET['delete_user']);
    }
    if (isset($_GET['delete_document'])) {
        delete_document($_GET['delete_document']);
        header('Location: ./admin_panel.php');
    }
    if (isset($_GET['action'])) {
        session_destroy();
        header('Location: ./admin.php');
    }
}
Beispiel #8
0
/**
 * Get the next document number, 1 Voucher, 2 Invoice, 3 Receipt
 * @ingroup ADMIN_MANAGEMENT
 * @param $propertyno [in] property number
 * @param $doctype [in] 1 Voucher, 2 Invoice, 3 Receipt
 * @param $update [in] 1 update the document numbers.
 *
 * @return next document number
 */
function get_nextdocumentno($propertyno, $doctype, $update)
{
    global $conn;
    if (!$conn) {
        $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT);
    }
    if (!$conn) {
        return 0;
    }
    if (!$propertyno) {
        $propertyno = 1;
    }
    get_documents($propertyno, $inv, $rcp, $vch);
    if ($doctype == 1) {
        $doc = $vch;
        $vch++;
    }
    if ($doctype == 2) {
        $doc = $inv;
        $inv++;
    }
    if ($doctype == 3) {
        $doc = $rcp;
        $rcp++;
    }
    if ($update) {
        modify_documents($propertyno, $inv, $rcp, $vch);
    }
    return $doc;
}
Beispiel #9
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');
}