Ejemplo n.º 1
0
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; 
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once __DIR__ . "/../tools.php";
require_once __DIR__ . "/public.php";
$operacion = http_request("Operation", "s", null);
$pendientes = http_request("Pendientes", "i", 10);
// on session==0, use this elements as IDentifiers
$prueba = http_request("Prueba", "i", 0);
$jornada = http_request("Jornada", "i", 0);
$manga = http_request("Manga", "i", 0);
$mode = http_request("Mode", "i", 0);
// used on access from public
$pb = new PublicWeb($prueba, $jornada, $manga, $mode);
try {
    switch ($operacion) {
        case "infodata":
            $res = $pb->publicweb_infodata();
            echo json_encode($res);
            break;
        case "deploy":
            $res = $pb->publicweb_deploy();
            echo json_encode($res);
            break;
        default:
            throw new Exception("publicFunctions.php: operacion invalida:'{$operacion}'");
            break;
    }
} catch (Exception $e) {
Ejemplo n.º 2
0
if (!isset($config)) {
    $config = Config::getInstance();
}
/* check for properly installed xampp */
if (!function_exists('openssl_get_publickey')) {
    die("Invalid configuration: please uncomment line 'module=php_openssl.dll' in file '\\xampp\\php\\php.ini'");
}
$am = new AuthManager("Public");
if (!$am->allowed(ENABLE_PUBLIC)) {
    die("Current license has no permissions to handle public (web) access related functions");
}
// tool to perform automatic upgrades in database when needed
require_once __DIR__ . "/server/upgradeVersion.php";
require_once __DIR__ . "/server/web/public.php";
$pruebaID = http_request("Prueba", "i", 18);
$pb = new PublicWeb($pruebaID);
$ptree = $pb->publicweb_deploy();
$poster = $ptree['Prueba']['Cartel'];
if ($poster == null || $poster == "") {
    $poster = "/agility/default_poster.png";
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php 
echo $ptree['Prueba']['Nombre'] . " - " . _("Web access");
?>
 </title>