Exemplo n.º 1
0
<?php

/**
	/admin/cancellautente.php
	(C) Giovanni Capuano 2011
*/
require_once '../core/class.Ocarina.php';
$ocarina = new Ocarina();
$nickname = isset($_POST['nickname']) && $_POST['nickname'] !== '' ? $ocarina->purgeByXSS($_POST['nickname']) : '';
$all = isset($_POST['all']) ? true : false;
$submit = isset($_POST['submit']) ? true : false;
$ocarina->skin = 'admin';
$ocarina->addValue('titolo', $ocarina->getLanguage('title', 14) . $ocarina->getLanguage('title', 2) . $ocarina->getLanguage('title', 10) . $ocarina->getLanguage('title', 2) . $ocarina->config[0]->nomesito);
if ($ocarina->isLogged() && $ocarina->username[0]->grado == 1) {
    if (!$submit) {
        $ocarina->addValue('utenti', $ocarina->getUser());
    } else {
        if (!$all) {
            if ($ocarina->deleteUser($nickname)) {
                if ($ocarina->config[0]->log == 1) {
                    $ocarina->log($ocarina->username[0]->nickname, 'Has deleted ' . $nickname . '.');
                }
                $ocarina->addValue('result', $ocarina->getLanguage('deleteuser', 0));
            } else {
                if ($ocarina->config[0]->log == 1) {
                    $ocarina->log($ocarina->username[0]->nickname, 'Has failed the deletion of ' . $nickname . ' and all his contents.');
                }
                $ocarina->addValue('result', str_replace('{$nickname}', $nickname, $ocarina->getLanguage('deleteuser', 1)));
            }
        } else {
            if (!$ocarina->deleteUser($nickname)) {
Exemplo n.º 2
0
/**
	/admin/newsletter.php
	(C) Giovanni Capuano 2011
*/
require_once '../core/class.Ocarina.php';
$ocarina = new Ocarina();
$testo_email = isset($_POST['testo']) && $_POST['testo'] !== '' ? $_POST['testo'] : '';
$oggetto_email = isset($_POST['oggetto']) && $_POST['oggetto'] !== '' ? $_POST['oggetto'] : '';
$submit = isset($_POST['submit']) ? true : false;
$ocarina->skin = 'admin';
$ocarina->addValue('titolo', $ocarina->getLanguage('title', 30) . $ocarina->getLanguage('title', 2) . $ocarina->getLanguage('title', 10) . $ocarina->getLanguage('title', 2) . $ocarina->config[0]->nomesito);
if ($ocarina->isLogged() && $ocarina->username[0]->grado == 1) {
    if ($submit) {
        if ($testo_email !== '' && $oggetto_email !== '') {
            $ocarinas = $ocarina->getUser();
            $notsended = 0;
            $sended = 0;
            foreach ($ocarinas as $v) {
                if (!$ocarina->sendMail($v->email, $oggetto_email, $testo_email)) {
                    ++$notsended;
                } else {
                    ++$sended;
                }
            }
            if ($notsended == 0) {
                $ocarina->addValue('result', str_replace('{$sended}', $sended, $ocarina->getLanguage('newsletter', 0)));
            } else {
                $ocarina->addValue('result', str_replace('{$notsended}', $notsended, str_replace('{$sended}', $sended, $ocarina->getLanguage('newsletter', 1))));
            }
        } else {
Exemplo n.º 3
0
<?php

/**
	/profilo.php
	(C) Giovanni Capuano 2011
*/
require_once 'core/class.Ocarina.php';
$ocarina = new Ocarina();
$nickname = isset($_GET['nickname']) && $_GET['nickname'] !== '' ? $ocarina->purge($_GET['nickname']) : '';
if ($nickname == '') {
    $nickname = isset($_POST['nickname']) && $_POST['nickname'] !== '' ? $ocarina->purge($_POST['nickname']) : '';
}
$ocarina->skin = $ocarina->isLogged() ? $ocarina->username[0]->skin : $ocarina->config[0]->skin;
$ocarina->addValue('description', $nickname !== '' ? $ocarina->getLanguage('description', 6) . $nickname . '.' : $ocarina->getLanguage('description', 5));
if ($nickname == '') {
    $ocarina->addValue('titolo', $ocarina->getLanguage('profile', 0) . $ocarina->getLanguage('title', 2) . $ocarina->config[0]->nomesito);
    $ocarina->addValue('listautenti', $ocarina->getUser());
} else {
    $ocarina->addValue('titolo', $ocarina->isLogged() && $nickname == $ocarina->username[0]->nickname ? $ocarina->getLanguage('profile', 1) : $ocarina->getLanguage('profile', 2) . $nickname . $ocarina->getLanguage('title', 2) . $ocarina->config[0]->nomesito);
    $getUser = $ocarina->getUser($nickname);
    $ocarina->addValue('result', $getUser ? $getUser : $ocarina->getLanguage('profile', 3));
}
$ocarina->isLogged() && $ocarina->username[0]->grado == 7 ? $ocarina->renderize('bannato.tpl') : $ocarina->renderize('profilo.tpl');