コード例 #1
0
<?php

// ! Setup
require_once 'panl.init.php';
require_once 'lib/htmLawed.php';
$link = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$fileops = new GrlxFileOps();
$comic_image = new GrlxComicImage();
$sl = new GrlxSelectList();
$view->yah = 1;
$var_list = array('page_id', 'new_page_name', 'blog_headline', 'book_id', 'beginning_end', 'into_marker_id');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if (!$book_id) {
    $book = new GrlxComicBook();
    $book_id = $book->bookID;
} else {
    $book = new GrlxComicBook($book_id);
}
$book->getMarkers();
// register_variable strips needed whitespace from text blocks
$transcript = $_POST['transcript'];
$transcript ? $transcript : ($transcript = $_GET['transcript']);
$transcript ? $transcript : ($transcript = $_SESSION['transcript']);
$blog_post = $_POST['blog_post'];
$blog_post ? $blog_post : ($blog_post = $_GET['blog_post']);
コード例 #2
0
<?php

/* Artists use this script to manage their site themes.
 */
/* ! Setup * * * * * * * */
require_once 'panl.init.php';
$args['yah'] = 9;
$view = new GrlxView($args);
$form = new GrlxForm();
$button = new GrlxLinkStyle();
$sl = new GrlxSelectList();
/* ! Actions * * * * * * * */
// Change one or more tone_id records
if (is_numeric($_POST['new_tone_id']) && $_POST['sel'] && $_POST['submit']) {
    unset($_GET);
    $new_id = $_POST['new_tone_id'];
    if (is_array($_POST['sel'])) {
        $sel = array_keys($_POST['sel']);
        foreach ($sel as $item) {
            $db_vars[] = strfunc_split_tablerow($item);
        }
    } else {
        $db_vars[] = strfunc_split_tablerow($_POST['sel']);
    }
    if ($db_vars) {
        foreach ($db_vars as $i => $row) {
            $row['table'] == 'milieu' ? $col = 'value' : ($col = 'tone_id');
            $data = array($col => $new_id);
            if ($row['table'] == 'book_page') {
                $marker = new GrlxMarker($row['id']);
                $page_ids = array_keys($marker->pageList);
コード例 #3
0
<?php

// ! Setup
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$link1 = new GrlxLinkStyle();
$link2 = new GrlxLinkStyle();
$list = new GrlxList();
$sl = new GrlxSelectList();
$var_list = array('marker_id', 'new_title', 'edit_marker_type');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if ($marker_id) {
    $marker = new GrlxMarker($marker_id, true);
} else {
    header('location:book.view.php');
    die;
}
// ! Updates
if ($marker_id && $new_title) {
    $success = $marker->saveMarker($marker_id, $new_title, $edit_marker_type);
    $marker = new GrlxMarker($marker_id);
    // reset
}
if ($success) {
    $link1->url('marker.view.php?marker_id=' . $marker_id);
コード例 #4
0
<?php

/* Artists use this script to control general site settings.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
require_once 'lib/htmLawed.php';
$view = new GrlxView();
$link = new GrlxLinkStyle();
$form = new GrlxForm();
$form->send_to($_SERVER['SCRIPT_NAME']);
$form->row_class('config');
$sl = new GrlxSelectList();
$view->yah = 12;
$date_list[] = array('id' => 'm/d/y', 'title' => '10/31/15');
$date_list[] = array('id' => 'm-d-Y', 'title' => '10-31-2015');
$date_list[] = array('id' => 'd-M-Y', 'title' => '31-Oct-2015');
$date_list[] = array('id' => 'F j, Y', 'title' => 'October 31, 2015');
$date_list[] = array('id' => 'j F Y', 'title' => '31 October 2015');
$timezone_master_list['America/Los_Angeles'] = array('id' => 'America/Los_Angeles', 'title' => 'UTC−08:00: San Francisco, Vancouver, Tijuana');
$timezone_master_list['America/Denver'] = array('id' => 'America/Denver', 'title' => 'UTC−07:00: Denver, Phoenix, Calgary, Ciudad Juárez');
$timezone_master_list['America/Chicago'] = array('id' => 'America/Chicago', 'title' => 'UTC−06:00: Chicago, Guatemala City, Mexico City, San José, San Salvador, Tegucigalpa, Winnipeg');
$timezone_master_list['America/New_York'] = array('id' => 'America/New_York', 'title' => 'UTC−05:00: New York, Lima, Toronto, Bogotá, Havana, Kingston');
$timezone_master_list['America/Caracas'] = array('id' => 'America/Caracas', 'title' => 'UTC−04:30: Caracas');
$timezone_master_list['America/Santiago'] = array('id' => 'America/Santiago', 'title' => 'UTC−04:00: Santiago, La Paz, San Juan de Puerto Rico, Manaus, Halifax');
$timezone_master_list['America/Argentina/Buenos_Aires'] = array('id' => 'America/Argentina/Buenos_Aires', 'title' => 'UTC−03:00: Buenos Aires, Montevideo, São Paulo');
$timezone_master_list['America/Canada/Newfoundland'] = array('id' => 'America/Canada/Newfoundland', 'title' => 'UTC−03:30: St. John’s');
$timezone_master_list['Europe/Lisbon'] = array('id' => 'Europe/Lisbon', 'title' => 'UTC±00:00: Accra, Abidjan, Casablanca, Dakar, Dublin, Lisbon, London');
$timezone_master_list['Europe/Berlin'] = array('id' => 'Europe/Berlin', 'title' => 'UTC+01:00: Belgrade, Berlin, Brussels, Lagos, Madrid, Paris, Rome, Tunis, Vienna, Warsaw');
コード例 #5
0
/*****
 * Setup
 */
include 'panl.init.php';
$link = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$form = new GrlxForm();
$fileops = new GrlxFileOps();
$fileops->db = $db;
$book = new GrlxComicBook();
$marker = new GrlxMarker();
$comic_image = new GrlxComicImage();
$message = new GrlxAlert();
$sl = new GrlxSelectList();
$view->yah = 2;
$book_id = $book->bookID;
/*****
 * Updates
 */
if ($_FILES && $book_id) {
    if (is_writable('../' . DIR_COMICS_IMG)) {
        $which = 'file';
        $fileops->up_set_destination_folder('../' . DIR_COMICS_IMG);
        $files_uploaded = $fileops->up_process($which);
        $new_order = $_POST['new_order'];
        $new_order ? $new_order : ($new_order = 1);
        if ($files_uploaded) {
            $i = -1;
            $qty = count($_FILES['file']['name']);
コード例 #6
0
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
require_once 'lib/htmLawed.php';
$link1 = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$marker = new GrlxMarker();
$fileops = new GrlxFileOps();
$sl = new GrlxSelectList();
$view->yah = 3;
$var_list = array('page_id', 'new_page_name', 'remove_id', 'blog_headline');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
for ($i = 1; $i < 32; $i++) {
    $i < 10 ? $i = '0' . $i : null;
    $day_list[$i] = array('title' => $i, 'id' => $i);
}
for ($i = 1; $i < 13; $i++) {
    $i < 10 ? $i = '0' . $i : null;
    $month_list[$i] = array('title' => date("F", mktime(0, 0, 0, $i, 1, 2015)), 'id' => $i);
}
for ($i = date('Y') - 10; $i < date('Y') + 2; $i++) {
    $year_list[$i] = array('title' => $i, 'id' => $i);
}
コード例 #7
0
if ($variable_list) {
    foreach ($variable_list as $val) {
        ${$val} = register_variable($val);
    }
}
// Hold it — no ID, no entrance.
if (!$page_id) {
    header('location:sttc.page-list.php');
    die;
}
$view = new GrlxView();
$link = new GrlxLinkStyle();
$message = new GrlxAlert();
$form = new GrlxForm();
$fileops = new GrlxFileOps();
$sl = new GrlxSelectList();
// Make sure the image folder exists and is accessible.
$alert_output .= $fileops->check_or_make_dir('../' . DIR_STATIC_IMG);
/*****
 * ! Updates
 */
// This comes from sttc.xml-new.php.
if ($msg == 'created') {
    $link1 = new GrlxLinkStyle();
    $link1->url('sttc.xml-new.php');
    $link1->tap('Create another new page');
    $link->url('site.nav.php');
    $link->tap('Add this page to the site’s menu');
    $alert_output .= $message->success_dialog('Page created. <ul><li>Make changes below</li><li>' . $link->paint() . '</li><li>' . $link1->paint() . '</li>');
}
// ! Upload images