<?php

/*
 * ©2013 Croce Rossa Italiana
 */
paginaPrivata();
controllaParametri(array('id'));
$a = $_GET['id'];
$f = Commento::id($a);
$n = Commento::filtra([['upCommento', $a]]);
$volontario = $f->volontario();
$m = new Email('commentoRimozione', 'Commento rimosso');
$m->da = $me;
$m->a = $volontario;
$m->_NOME = $volontario->nome;
$m->_COMMENTO = $f->commento;
$m->_REFERENTE = $me->nomeCompleto();
$m->accoda();
foreach ($n as $_n) {
    $x = Commento::id($_n);
    $x->cancella();
}
$a = $f->attivita;
$f->cancella();
redirect('attivita.scheda&id=' . $a);
예제 #2
0
파일: Commento.php 프로젝트: pizar/gaia
 public function risposte()
 {
     return Commento::filtra([['upCommento', $this->id]], 'tCommenta DESC');
 }
예제 #3
0
파일: Utente.php 프로젝트: pizar/gaia
 public function commenti($limita = null)
 {
     if ($limita) {
         $limita = (int) $limita;
         return Commento::filtra([['volontario', $this]], "tCommenta DESC LIMIT 0, {$limita}");
     } else {
         return Commento::filtra([['volontario', $this]], "tCommenta DESC");
     }
 }
예제 #4
0
                    </a>
                    <a title="Modifica" href="?p=attivita.pagina.commento.modifica&id=<?php 
            echo $_c;
            ?>
">
                        <i class="icon-edit"></i>
                    </a>
                    
                <?php 
        }
        ?>
                </div>
            </div>
        </div>
    <?php 
        $n = Commento::filtra([['attivita', $a], ['upCommento', $_c->id]]);
        foreach ($n as $_n) {
            ?>
        <div class="row-fluid">
            <div class="span11 subcommento">
                <div class="span2 allinea-destra">
                    <?php 
            $g = Volontario::by('id', $_n->volontario);
            ?>
                        <img src="<?php 
            echo $g->avatar()->img(10);
            ?>
" class="img-polaroid" />
                </div>
                <div class="span8">
                    <p class="text-info"><?php 
예제 #5
0
파일: Attivita.php 프로젝트: pizar/gaia
 public function commenti($numero = 0)
 {
     $numero = (int) $numero;
     if ($numero) {
         $limit = "LIMIT 0, {$numero}";
     } else {
         $limit = '';
     }
     return Commento::filtra([['attivita', $this->id], ['upCommento', 0]], "tCommenta DESC {$limit}");
 }