protected function getDocuments(Request $request, \ContentAdmin $content)
 {
     $return = array();
     if ($content->id == '') {
         return array();
     }
     $query = "select id from " . Document::TABLE . ' where contenu=' . $content->id;
     $return = $this->extractResult($request, $content->query_liste($query), array("titre" => "document_titre_", "chapo" => "document_chapo_", "description" => "document_description_", "toDelete" => "document_to_delete_", "rank" => "rank_"));
     return $return;
 }
Beispiel #2
0
?>
</th>
                            <th><?php 
echo trad('En_ligne', 'admin');
?>
</th>
                            <th><?php 
echo trad('Classement', 'admin');
?>
</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
foreach (ContentAdmin::getInstance()->getList($parent, 'classement', 'ASC', '') as $contenu) {
    ?>
                            <tr>
                                <td><?php 
    echo $contenu["titre"];
    ?>
</td>
                                
                                <td><input type="checkbox" content-id="<?php 
    echo $contenu["id"];
    ?>
" content-action="changeDisplay" class="contentCheckbox" <?php 
    if ($contenu["ligne"]) {
        echo 'checked="checked"';
    }
    ?>
                            <div class="span6 offset4">
                                <?php 
for ($i = 1; $i <= ContentAdmin::getInstance()->getDocumentFile()->getNumberUpload(); $i++) {
    ?>
                                    <input type="file" name="document_<?php 
    echo $i;
    ?>
" class="input-large">
                                    <br >
                                <?php 
}
?>
                            </div>
                        </div>
                        <?php 
foreach (ContentAdmin::getInstance($contenu->id)->getDocumentList($lang) as $document) {
    ?>
                        <div class="row-fluid js-bloc-document" js-document-id="<?php 
    echo $document['id'];
    ?>
">
                            <div class="span3" style="position: relative;">
                                <p class="js-document">
                                    <a target="_blank" href="<?php 
    echo $document["fichier"];
    ?>
"><?php 
    echo $document["nomFichier"];
    ?>
</a>
                                </p>
Beispiel #4
0
<?php

require_once __DIR__ . '/../auth.php';
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
if ($request->isXmlHttpRequest() === false) {
    redirige("../accueil.php");
}
if (!est_autorise("acces_contenu")) {
    exit;
}
switch ($request->query->get('action')) {
    case 'changeDisplay':
        ContentAdmin::getInstance($request->query->get('content_id'))->changeColumn("ligne", $request->query->get('display') == 'true' ? 1 : 0);
        break;
}
Beispiel #5
0
                    </tr>
<?php 
    }
    ?>
            </tbody>   
        </table>
        </div>
<?php 
}
?>
    </div>
</div>

<!--CONTENUS-->
<?php 
$contentResult = ContentAdmin::getInstance()->getSearchList($request->query->get('motcle'), $clientFoundIdList);
?>
<div class="row-fluid">
    <div class="span12">
        <h3><?php 
echo strtoupper(trad(count($contentResult) > 0 ? 'RESULTATS_CONTENUS' : 'AUCUN_RESULTATS_CONTENUS', 'admin'));
?>
</h3>
    </div>
</div>
<div class="row-fluid">
    <div class="span12">
<?php 
if (count($contentResult) > 0) {
    ?>
        <div class="bigtable">