Esempio n. 1
0
 public function isReadonly()
 {
     if (Application::isReadonly()) {
         $this->message->error = I18n::t('I_A');
         $this->request->redirect(Theme::URL('Index/Index'));
     }
 }
Esempio n. 2
0
<?php

defined('PMDDA') or die('Restricted access');
?>
  
    <ul  class="nav nav-list collapse in">
        <?php 
foreach ($this->data['databases'] as $db) {
    ?>
        <li ><a href="<?php 
    echo Theme::URL('Collection/Index', array('db' => $db['name']));
    ?>
"><?php 
    echo $db['name'];
    ?>
</a></li>
        <?php 
}
?>


    </ul>
Esempio n. 3
0
 /**
  * @author Nanhe Kumar <*****@*****.**>
  * @access protected
  */
 protected function gotoDatabse()
 {
     $this->request->redirect(Theme::URL('Database/Index'));
 }
Esempio n. 4
0
?>
</th>
                        <th><?php 
I18n::p('T_C');
?>
</th>
                        <th >&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                    <?php 
foreach ($this->data['collectionList'] as $collection) {
    ?>
                        <tr>
                            <td><p><i class="icon-user"></i> <a  href="<?php 
    echo Theme::URL('Collection/Record', array('db' => $this->db, 'collection' => $collection['name']));
    ?>
"><?php 
    echo $collection['name'];
    ?>
</a></p></td>

                            <td><?php 
    echo $collection['count'];
    ?>
</td>
                             <?php 
    if (!Application::isReadonly()) {
        ?>
                            <td>
                                <a  href="#myModal" data-edit-collection="<?php 
Esempio n. 5
0
<?php

require_once '_menu.php';
if ($this->data['record']) {
    ?>
<div class="row-fluid">
    <div id="block_export_method" class="block ">
        <a href="<?php 
    echo Theme::URL('Collection/Export', array('db' => $this->db, 'collection' => $this->collection));
    ?>
" class="block-heading" ><?php 
    I18n::p('BACK');
    ?>
</a>
        <textarea  rows="10" style="width:1040px;"><?php 
    echo $this->data['record'];
    ?>
</textarea>
    </div>    
</div>     
<?php 
} else {
    ?>
<form method="post" action="index.php">
    <div class="row-fluid">
        <div class="block " id="block_export_method">
            <a href="javascript:void(0)" class="block-heading" data-toggle="collapse"><?php 
    I18n::p('E_M');
    ?>
</a>
            <div class="block-body">
Esempio n. 6
0
 public function Logout()
 {
     Application::getInstance('Session')->destroy();
     $this->request->redirect(Theme::URL('Login/Index'));
 }
Esempio n. 7
0
    ?>
        <div id="record-<?php 
    echo $format;
    ?>
" style="display: <?php 
    echo $format === 'json' ? 'block' : 'none';
    ?>
">
            <?php 
    $i = -1;
    foreach ($this->data['record'][$format] as $cursor) {
        ++$i;
        if (isset($this->data['record']['document'][0]['_id']) && !Application::isReadonly()) {
            echo '&nbsp<input type="checkbox" name="ids[]" value="' . $this->data['record']['document'][$i]['_id'] . '" class="checkbox-remove" />';
            echo '&nbsp<a href="javascript:void(0)"  onclick="callAjax(\'' . Theme::URL('Collection/EditRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'format' => $format, 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '\')" class="icon-edit" title="Edit">' . I18n::t('') . '</a>';
            echo '&nbsp<a href="' . Theme::URL('Collection/DeleteRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '" class="icon-remove" title="Delete">' . I18n::t('') . '</a>';
        }
        echo "<pre>";
        print_r($cursor);
        echo "</pre>";
    }
    ?>

            
        </div>
        <?php 
}
?>
    
</div>
   
Esempio n. 8
0
    echo Theme::URL('Collection/Import', array('db' => $this->db, 'collection' => $this->collection));
    ?>
')" href="javascript:void(0)"><?php 
    I18n::p('IMPORT');
    ?>
</a>
    <?php 
}
?>
    <a class="btn <?php 
echo $this->application->view === 'indexes' ? 'active' : '';
?>
" onclick="callAjax('<?php 
echo Theme::URL('Collection/Indexes', array('db' => $this->db, 'collection' => $this->collection));
?>
')" href="javascript:void(0)"><?php 
I18n::p('INDEXES');
?>
</a>
    <a class="btn <?php 
echo $this->application->view === 'search' ? 'active' : '';
?>
" onclick="callAjax('<?php 
echo Theme::URL('Collection/Search', array('db' => $this->db, 'collection' => $this->collection));
?>
')" href="javascript:void(0)"><?php 
I18n::p('SEARCH');
?>
</a>
</div>
Esempio n. 9
0
    echo $format;
    ?>
" style="display: <?php 
    echo $format === 'json' ? 'block' : 'none';
    ?>
">
            <?php 
    $i = -1;
    foreach ($this->data['record'][$format] as $cursor) {
        ++$i;
        if (isset($this->data['record']['document'][0]['_id']) && !Application::isReadonly()) {
            echo '&nbsp<input type="checkbox" name="ids[]" value="' . $this->data['record']['document'][$i]['_id'] . '" class="checkbox-remove" />';
            echo '&nbsp<a href="javascript:void(0)"  onclick="callAjax(\'' . Theme::URL('Collection/EditRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'format' => $format, 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '\')" class="icon-edit" title="Edit">' . I18n::t('') . '</a>';
            echo '&nbsp<a href="' . Theme::URL('Collection/DeleteRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '" class="icon-remove" title="Delete">' . I18n::t('') . '</a>';
        }
        echo '<pre style="cursor:pointer;" onclick="if(window.getSelection().toString() == \'\') { callAjax(\'' . Theme::URL('Collection/EditRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'format' => $format, 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '\') }">';
        print_r($cursor);
        echo "</pre>";
    }
    ?>

            
        </div>
        <?php 
}
?>
    
</div>
   
<?php 
Theme::pagination($this->getModel()->totalRecord($this->db, $this->collection));
Esempio n. 10
0
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i><?php 
echo I18n::t('LAN');
?>
                            <i class="icon-caret-down"></i>
                        </a>

                        
                        <ul class="dropdown-menu">
                            <?php 
$languageList = Widget::get('languageList');
foreach ($languageList as $key => $val) {
    ?>
                            <li><a tabindex="-1" href="<?php 
    echo Theme::URL('Index/SetLanguage', array('language' => $key));
    ?>
"><?php 
    echo $val;
    ?>
</a></li>
                            <?php 
}
?>
                        </ul>
                    </li>

                </ul>
                <a class="brand" href="<?php 
echo Theme::getHome();
?>
Esempio n. 11
0
                            <td><?php 
    echo isset($index['unique']) ? $index['unique'] ? 'true' : 'false' : '';
    ?>
</td>
                            <td><?php 
    echo $index['ns'];
    ?>
</td>
                            <td><?php 
    echo isset($index['background']) ? is_double($index['background']) ? 'NumberLong(' . $index['background'] . ')' : $index['background'] : '';
    ?>
                            <?php 
    if (!Application::isReadonly()) {
        ?>
                            <td><?php 
        echo $index['name'] !== '_id_' ? '<a href="' . Theme::URL('Collection/DeleteIndexes', array('db' => $this->db, 'collection' => $this->collection, 'name' => $index['name'])) . '">Delete</a>' : '';
        ?>
</td>
                            <?php 
    }
    ?>
                        </tr>
                    <?php 
}
?>
                </tbody>
            </table>
        </div>     
        <?php 
if (!Application::isReadonly()) {
    require_once '_create_index.php';