Ejemplo n.º 1
0
 /**
  * Get Iris assets for the given gamespace / client ID
  *
  * @param object $parameters An object containing the following parameters:
  * @subparam int $offset
  * @subparam int $limit
  * @subparam string $search_term
  * @subparam string $gamespace
  * @subparam string $client_id
  * @subparam string $location
  */
 public function get_iris_assets($parameters)
 {
     $parameters = (object) $parameters;
     $offset = $parameters->offset;
     $limit = $parameters->limit;
     $search_term = $parameters->search_term;
     $gamespace = $parameters->id;
     $client_id = $parameters->client_id ? $parameters->client_id : "{$gamespace}:tuna_web:tuna_web:tuna_web:tuna_web";
     send_log('client ID used: ' . $client_id);
     $fed = new FedClient();
     $fed->set_pandora($parameters->location);
     $res = $fed->iris_get_assets($client_id);
     $res = json_decode($res->text, TRUE);
     $max = count($res);
     $result = array();
     for ($c = 0; $c < $max; $c += 1) {
         $result[] = array('name' => $res[$c]['name'], 'size' => $res[$c]['size'], 'hash' => $res[$c]['size']);
     }
     return array('data' => $result, 'total' => $max);
 }
Ejemplo n.º 2
0
Archivo: loader.php Proyecto: xpeknw/vc
            $object = $class_to_call::load($id_to_load);
            $result = $object->{$method_to_call}($params);
            break;
            /* call the given normal method */
        /* call the given normal method */
        default:
            $object = new $class_to_call();
            $result = $object->{$method_to_call}($params);
    }
    send_result($result);
    send_log('end of server process');
    echo json_encode($global_result);
} catch (Error $e) {
    if (!headers_sent()) {
        header('HTTP/1.0 ' . $e->http_code . ' ' . $e->http_status, TRUE, $e->http_code);
    }
    send_log('Backtrace: ' . $e->getTraceAsString());
    send_error($e->getMessage());
    echo json_encode($global_result);
} catch (Exception $e) {
    if (!headers_sent()) {
        header('HTTP/1.0 500 Internal Server Error', TRUE, 500);
        header('Content-type: text/plain', TRUE);
    }
    echo 'Exception:' . TUNA_NEWLINE . $e->getMessage() . TUNA_NEWLINE . TUNA_NEWLINE;
    echo 'Code:' . TUNA_NEWLINE . $e->getCode() . TUNA_NEWLINE . TUNA_NEWLINE;
    echo 'Line:' . TUNA_NEWLINE . $e->getLine() . TUNA_NEWLINE . TUNA_NEWLINE;
    echo 'Backtrace:' . TUNA_NEWLINE . $e->getTraceAsString() . TUNA_NEWLINE . TUNA_NEWLINE;
    echo 'Request vars:' . TUNA_NEWLINE . print_r($_REQUEST, TRUE);
}
closelog();
Ejemplo n.º 3
0
            //should use a template..... :P
            $G = $ADDRESS->getGroup($Q[$qcc]['grp_id']);
            $ReportMail_Subject = "Tellmatic: Q finished (QId: " . $Q[$qcc]['id'] . " / " . $Q[$qcc]['created'] . ") " . display($NL[0]['subject']) . " an " . display($G[0]['name']);
            $ReportMail_HTML = "";
            $created_date = $Q[$qcc]['created'];
            $sent_date = $created;
            $ReportMail_HTML .= "<br><b>" . $sent_date . "</b>" . "<br>Der Versand des Newsletter <b>" . display($NL[0]['subject']) . "</b> an die Gruppe <b>" . display($G[0]['name']) . "</b> ist abgeschlossen." . "<br>The Mailing for Newsletter <b>" . display($NL[0]['subject']) . "</b> to Group <b>" . display($G[0]['name']) . "</b> is finished." . "<br><ul>" . "Adressen/s:" . $hc . "<br>Gesendet/Sent: " . $hc_ok . "<br>Fehler/Errors:" . $hc_fail . "<br>versendet am/sent at: " . $sent_date . "<br>erstellt (nur versand vorbereitet)/created (prepared): " . $created_date . "<br>Log: " . $tm_URL_FE . "/" . $tm_logdir . "/" . $logfilename . "</ul>";
            if (!DEMO) {
                @SendMail_smtp($HOST[0]['sender_email'], $HOST[0]['sender_name'], $HOST[0]['sender_email'], $HOST[0]['sender_name'], $ReportMail_Subject, clear_text($ReportMail_HTML), $ReportMail_HTML, array(), $HOST);
            }
            //sendmail_smtp[0]=true/false [1]=""/errormessage
        }
        //hc==0
        //	}//q status 2 o 3
        send_log($qcc + 1 . " of {$qc} Qs");
        send_log("end");
    }
    //isset HOST[0]!!!!
    #send_log("write Log to ".$tm_URL_FE."/".$tm_logdir."/".$logfilename);
}
//$qcc
/*
QCC
*/
if ($called_via_url) {
    echo "</pre>";
    echo "<meta http-equiv=\"refresh\" content=\"" . $reload_intervall . "; URL=" . TM_DOMAIN . $_SERVER["PHP_SELF"] . "\">\n";
    if ($qc == 0) {
        echo "<br>" . ___("Zur Zeit gibt es keine zu verarbeitenden Versandaufträge.");
    }
    echo "<br>" . sprintf(___("Die Seite wird in %s Sekunden automatisch neu geladen."), $reload_intervall) . "<br>\n" . ___("Klicken Sie auf 'Neu laden' wenn Sie diese Seite erneut aufrufen wollen.") . "<a href=\"" . TM_DOMAIN . $_SERVER["PHP_SELF"] . "\"><br>" . ___("Neu laden") . "</a>";