/**
  * Set defaults
  */
 public function __construct()
 {
     parent::__construct();
     unset($this->css_file);
     unset($this->js_file);
     $this->css_file[] = 'login.css';
     $this->js_file[] = 'login.min.js';
 }
<?php

/* Artists use this script to control the main site navigation.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$link = new GrlxLinkStyle();
$form = new GrlxForm();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$list = new GrlxList();
$view->yah = 7;
/*****
 * Updates
 */
// Act on an edit from the reveal modal
if ($_POST['modal-submit']) {
    $input = $_POST['input'];
    foreach ($input as $val) {
        $val = trim($val);
        $val = htmlspecialchars($val, ENT_COMPAT);
    }
    $input['url'] = mb_strtolower($input['url'], "UTF-8");
    // Add an external URL to nav
    if ($_POST['modal-submit'] == 'add') {
        $data = array('title' => $input['title'], 'url' => $input['url'], 'rel_type' => 'external', 'sort_order' => 0, 'in_menu' => 1);
        $new_id = $db->insert('path', $data);
        if ($new_id == 0) {
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$fileops = new GrlxFileOps();
$link = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$list = new GrlxList();
$list->draggable(false);
$image_obj = new GrlxImage();
// Default value
$page_title = 'Ad editor';
$var_list = array('title', 'ad_id', 'tap_url', 'small_image_url', 'medium_image_url', 'large_image_url', 'msg');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
$code = $_POST['code'];
// No ad selected? Send ’em back to the list.
if (!$ad_id || !is_numeric($ad_id)) {
    header('location:ad.list.php');
}
// Folder in which we keep ad images.
$image_path = $milieu_list['directory']['value'] . '/assets/images/ads';
// List of status levels.
/*
$priority_list = array(
<?php

/* Artists use this script to add connections to social media services.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$form = new GrlxForm();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$view->yah = 8;
/*****
 * Updates
 */
// Reset comment service
if (is_numeric($_GET['reset_comments'])) {
    $service_id = $_GET['reset_comments'];
    $data = array('user_info' => null);
    $db->where('id', $service_id);
    $db->update('third_service', $data);
    $data = array('active' => 0);
    $db->where('service_id', $service_id);
    $db->update('third_match', $data);
}
// Save edits from the info modal
if ($_POST['edit']) {
    foreach ($_POST['edit'] as $key => $val) {
        if (is_numeric($key)) {
            $data = array('user_info' => $val);
<?php

/* Artists use this script to create a link list.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$list = new GrlxList();
$form = new GrlxForm();
$fileops = new GrlxFileOps();
$image_path = $milieu_list['directory']['value'] . '/assets/images/icons';
$view->yah = 11;
/*****
 * Updates
 */
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $input = $_POST['input'];
    foreach ($input as $val) {
        $val = trim($val);
        $val = htmlspecialchars($val, ENT_COMPAT);
    }
    $input['url'] = mb_strtolower($input['url'], "UTF-8");
    if (count($_FILES) > 0) {
        $file_name = basename($_FILES['input']['name']['img_path']);
        $uploadfile = '..' . $image_path . '/' . $file_name;
        $web_file_path = $image_path . '/' . $file_name;
        if (move_uploaded_file($_FILES['input']['tmp_name']['img_path'], $uploadfile)) {
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$var_list = array('marker_type_id', 'new_title');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if ($marker_type_id) {
    $marker_type = new GrlxMarkerType($marker_type_id);
} else {
    header('location:marker-type.list.php');
    die;
}
/*****
 * Updates
 */
if ($marker_type_id && $new_title) {
    $success = $marker_type->saveMarkerType($marker_type_id, $new_title);
    $marker_type = new GrlxMarkerType($marker_type_id);
}
if ($success) {
<?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);
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$link = new GrlxLinkStyle();
$fileops = new GrlxFileOps();
$view->yah = 14;
// Permissions to check
$folder_list = array('../' . DIR_COMICS_IMG, '../assets', '../assets/data', '../assets/images', '../assets/images/ads', '../assets/images/icons', '../assets/images/static');
$image_status_list = array(array('#404d98', 'toomuch'), array('#9f9', 'excellent'), array('#ff6', 'mediocre'), array('#fa0', 'bad'), array('#f40', 'abysmal'));
// CSV of files that the admin panel should have.
$panel_files = array('book.pages-create.php', 'ad.adsense-edit.php', 'ad.list.php', 'ad.promo-create.php', 'ad.promo-edit.php', 'ad.slot-edit.php', 'ajax.alert-dismiss.php', 'ajax.book-delete.php', 'ajax.book-edit.php', 'ajax.sort.php', 'ajax.tone-set.php', 'ajax.visibility-toggle.php', 'book.archive.php', 'book.bulk-upload.php', 'book.edit.php', 'book.import.php', 'book.page-create.php', 'book.page-edit.php', 'book.view.php', 'css', 'diag.health-check.php', 'img', 'inc', 'index.php', 'js', 'lib', 'marker-type.list.php', 'marker.create.php', 'marker.edit.php', 'marker.view.php', 'marker-type.create.php', 'marker-type.edit.php', 'panl.init.php', 'panl.login.php', 'panl.logout.php', 'panl.password-forgot.php', 'panl.password-reset.php', 'site.config.php', 'site.link-delete.ajax.php', 'site.link-edit.ajax.php', 'site.link-list.php', 'site.nav-delete.ajax.php', 'site.nav-edit.ajax.php', 'site.nav.php', 'site.theme-dupetone.ajax.php', 'site.theme-manager.php', 'site.theme-options.php', 'slot.label-set.ajax.php', 'sttc.page-delete.ajax.php', 'sttc.page-list.php', 'sttc.xml-edit.php', 'sttc.xml-new.php', 'uploadtome.php', 'user.config.php', 'xtra.comments.ajax.php', 'xtra.edit-info.ajax.php', 'xtra.social.php', 'xtra.toggle-active.ajax.php', 'xtra.toggle-wonderful-active.ajax.php');
/*****
 * Functions
 */
// Does the .htaccess file exist?
function check_htaccess($htaccess_string)
{
    $x = check_path('../.htaccess');
    if ($x['exists'] === false) {
        $message .= '<p>Missing .htaccess file</p>' . "\n";
        $status = 'error';
    } else {
        $message .= '<p>Found the .htaccess file</p>' . "\n";
        $status = 'aok';
    }
    return array('message' => $message, 'status' => $status);
}
<?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');
        return $success;
    }
    function importFolders()
    {
        if (is_array($this->fileList)) {
            foreach ($this->fileList as $item) {
            }
        }
    }
}
$bimport = new bulkImport();
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$fileops = new GrlxFileOps();
$message = new GrlxAlert();
$book = new GrlxComicBook(1);
$comic_image = new GrlxComicImage();
$marker = new GrlxMarker();
$link = new GrlxLinkStyle();
$link1 = new GrlxLinkStyle();
$list = new GrlxList();
// Yeeeeah, really should make this a constant.
$import_path = '../import';
if ($book) {
    $book->getPages();
}
if ($book->pageList) {
    $last_page = end($book->pageList);
<?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']);
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$link = new GrlxLinkStyle();
$view = new GrlxView();
$list = new GrlxList();
$list->draggable(false);
$image = new GrlxImage();
$message = new GrlxAlert();
// Default value
$page_title = 'Ad location editor';
$var_list = array('slot_id', 'change_to', 'change_from', 'label', 'title');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
// No ad selected? Send ’em back to the list.
if (!$slot_id || !is_numeric($slot_id)) {
    header('location:ad.list.php');
}
// List of status levels.
$priority_list = array('1' => 'High', '0' => 'Normal', '-1' => 'Hidden');
/*****
 * Updates
 */
if ($label && $title && $slot_id) {
    $data = array('label' => $label, 'title' => $title);
<?php

/* Artists use this script to create and edit text pages.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
require_once 'lib/htmLawed.php';
$link = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$fileops = new GrlxFileOps();
$view->yah = 5;
// Offer these to the artist.
$page_type_list[1] = array('layout_type' => 'ht', 'label' => 'About the artist', 'image' => '../' . DIR_PATTERNS . 'ht.default.svg', 'description' => 'Your bio, artist’s statement, or just who you want people to know you as.', 'url' => '/about-artist');
$page_type_list[2] = array('layout_type' => 'ht', 'function' => 'about-comic', 'label' => 'About the comic', 'image' => '../' . DIR_PATTERNS . 'ht.default.svg', 'description' => 'What you want new readers to know about your comic.', 'url' => '/about-comic');
$page_type_list[3] = array('layout_type' => 'hit', 'function' => 'cast', 'label' => 'Cast', 'image' => '../' . DIR_PATTERNS . 'hit.default.svg', 'description' => 'Name, quick bio and picture of each character.', 'url' => '/comic-characters');
$page_type_list[4] = array('layout_type' => 'hl', 'function' => 'links', 'label' => 'Links', 'image' => '../' . DIR_PATTERNS . 'hl.default.svg', 'description' => 'Simple title, optional descriptive text and URL.', 'url' => '/favorite-links');
$page_type_list[5] = array('layout_type' => 'ht', 'function' => 'faq', 'label' => 'FAQ', 'image' => '../' . DIR_PATTERNS . 'ht.default.svg', 'description' => 'Answers to questions you get asked often it’s worth a page.', 'url' => '/frequently-asked-questions');
$page_type_list[6] = array('layout_type' => 'free', 'function' => 'freeform', 'label' => 'Freeform', 'image' => '../' . DIR_PATTERNS . 'free.svg', 'description' => 'Add your own HTML. Anything goes.', 'url' => '/new-page');
$page_type_list[7] = array('layout_type' => 'ht', 'function' => 'welcome', 'label' => 'Welcome new readers', 'image' => '../' . DIR_PATTERNS . 'ht.default.svg', 'description' => 'Introduction to your comic.', 'url' => '/new-readers-begin-here');
$page_type_list[8] = array('layout_type' => 'hilt', 'function' => 'store', 'label' => 'Store', 'image' => '../' . DIR_PATTERNS . 'hit.default.svg', 'description' => 'Quick product teasers that you link to your ecommerce package.', 'url' => '/store');
/*****
 * Updates
 */
if ($_GET['id']) {
    $id = $_GET['id'];
    $layout_type_id = $page_type_list[$id]['layout_type'];
    $xml_source = '../' . DIR_PATTERNS . '' . $layout_type_id . '.xml';
    if (is_file($xml_source)) {
<?php

/*****
 * 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;
<?php

/*****
 * 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();
$comic_image = new GrlxComicImage();
$message = new GrlxAlert();
$sl = new GrlxSelectList();
$view->yah = 2;
$book_id = $book->bookID;
/*****
 * Updates
 */
/*****
 * Display
 */
if (!is_writable('../' . DIR_COMICS_IMG)) {
    $alert_output .= $message->alert_dialog('I can’t write to the ' . DIR_COMICS_IMG . ' directory. Looks like a permissions problem.');
}
$marker_type_list = $db->get('marker_type', null, 'id,title');
$marker_type_list = rekey_array($marker_type_list, 'id');
if ($marker_type_list) {
    $sl->setName('add-marker-type');
<?php

/*****
 * ! Setup
 */
require_once 'panl.init.php';
$fileops = new GrlxFileOps();
$message = new GrlxAlert();
$image = new GrlxImage();
$link = new GrlxLinkStyle();
$edit_link = new GrlxLinkStyle();
$delete_link = new GrlxLinkStyle();
$view = new GrlxView();
$list = new GrlxList();
$list->draggable(false);
$view->yah = 10;
// Default value
$page_title = 'Ad browser';
// URL to PW’s XML feed. ID not included at this point.
$wonderful_file_path = 'http://projectwonderful.com/xmlpublisherdata.php?publisher=';
// Folder in which we store ad pics.
$image_path = $milieu_list['directory']['value'] . '/assets/images/ads';
// Get and sanitize every variable sent by _get, _post and _session.
$var_list = array('ad_id', 'delete_ad_id', 'current_group', 'wonderful_id');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
// Does the ad image repository exist? If not, try to make it.
$alert_output = $fileops->check_or_make_dir('..' . $image_path);
<?php

/* Artists use this script to browse their static site pages.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$link = new GrlxLinkStyle();
$static = new GrlxStaticPage();
// Number of <item>s per page to show.
$preview_limit = 5;
$view->yah = 6;
/*****
 * Updates
 */
if ($_POST['modal-submit'] && is_numeric($_POST['delete_id'])) {
    $delete_id = $_POST['delete_id'];
    $result = $db->where('id', $delete_id)->delete('static_page');
    $result = $db->where('rel_id', $delete_id)->where('rel_type', 'static')->where('edit_path', 1)->delete('path');
}
/*****
 * Display logic
 */
// Grab all pages from the database.
$page_list = $static->getPageList();
if ($page_list) {
    foreach ($page_list as $key => $val) {
        if ($val['url'] == '/') {
<?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);
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$form = new GrlxForm();
$marker_type = new GrlxMarkerType();
$var_list = array('marker_type_id', 'new_marker_name', 'delete_id');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
// Folder in which we keep ad images.
// $image_path = $milieu_list['directory']['value'].'/assets/images';
/*****
 * Updates
 */
if ($_GET && $delete_id) {
    $success = $marker_type->deleteMarkerType($delete_id);
    $marker_type->resetMarkerTypes();
}
if ($success && $delete_id) {
    $alert_output = $message->alert_dialog('Marker type deleted.');
}
/*****
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$fileops = new GrlxFileOps();
$link = new GrlxLinkStyle();
$view = new GrlxView();
//$image_obj = new GrlxImage;
$var_list = array('destination', 'small_image_url', 'medium_image_url', 'large_image_url', 'code');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
// Folder in which we keep ad images.
$image_path = $milieu_list['directory']['value'] . '/assets/images/ads';
/*****
 * Updates
 */
$check_these = array('small' => 'small_image_url', 'medium' => 'medium_image_url', 'large' => 'large_image_url');
if ($check_these) {
    foreach ($check_these as $key => $val) {
        // Got a new file upload? Then upload it.
        $upload_status[$key] = upload_specific_file($val, $image_path);
        $upload_sizes[$key] = getimagesize('..' . $image_path . '/' . basename($_FILES[$val]['name']));
    }
}
// Prepare to update the ad’s database record.
if ($_POST) {
Beispiel #21
0
<?php

/*****
 * ! Setup
 */
require_once 'panl.init.php';
$message = new GrlxAlert();
$view = new GrlxView();
$list = new GrlxList();
$list->draggable(false);
$view->yah = 10;
// Default value
$page_title = 'Ad table fix';
$db->rawQuery("ALTER TABLE grlx_ad_reference ADD title VARCHAR(32)", NULL, NULL);
/*****
 * Display
 */
$output = $view->open_view();
$output .= $view->view_header();
$output .= $alert_output;
$output .= $content_output;
print $output;
?>

<?php 
$output = $view->close_view();
print $output;
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$var_list = array('book_id', 'new_title', 'publish_frequency', 'start_month', 'start_day', 'start_year');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if ($book_id) {
    $book = new GrlxComicBook($book_id);
} else {
    $book = new GrlxComicBook();
    $book_id = $book->bookID;
}
$month_list = array('01' => 'January', '02' => 'February', '03' => 'March', '04' => 'April', '05' => 'May', '06' => 'June', '07' => 'July', '08' => 'August', '09' => 'September', '10' => 'October', '11' => 'November', '12' => 'December');
$start_month_output = build_select_simple('start_month', $month_list, $date_start[1]);
for ($i = 1; $i < 32; $i++) {
    $i < 10 ? $j = '0' . $i : ($j = $i);
    $day_list[$j] = $i;
}
$start_day_output = build_select_simple('start_day', $day_list, $date_start[2]);
for ($y = date('Y') + 1; $y >= 1980; $y--) {
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
//$modal = new GrlxForm_Modal;
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$sl = new GrlxSelectList();
$form = new GrlxForm();
$marker = new GrlxMarker();
$view->yah = 3;
$var_list = array('book_id', 'delete_page_id', 'start_sort_order', 'keyword', 'delete_marker_id', 'sel', 'add_marker_type');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if ($start_sort_order) {
    $_SESSION['start_sort_order'] = $start_sort_order;
} else {
    $start_sort_order = $_SESSION['start_sort_order'];
}
$start_sort_order ? $start_sort_order : ($start_sort_order = 1);
/*****
 * Updates
 */
if ($book_id) {
<?php

/* Artists use this script to configure a theme tone.
 */
/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$link = new GrlxLinkStyle();
$message = new GrlxAlert();
$form = new GrlxForm();
$theme = new GrlxXML_Theme();
$img = new GrlxImage();
$img->db_new = $db;
$theme_id = numfunc_register_var('theme_id');
$tone_id = numfunc_register_var('tone_id');
$theme->set_theme_id($theme_id);
$theme->set_tone_id($tone_id);
/*****
 * Updates
 */
// Delete a tone
if (is_numeric($_GET['delete_id'])) {
    $delete_id = $_GET['delete_id'];
    $result = $db->where('id', $delete_id)->delete('theme_tone');
    if ($result) {
        $match_list = $db->where('tone_id', $delete_id)->delete('image_tone_match');
    } else {
        $alert_output .= $message->alert_dialog('Unable to delete tone from database.');
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
$modal = new GrlxForm_Modal();
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$marker_type = new GrlxMarkerType();
$var_list = array('next_rank', 'new_title');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
/*****
 * Updates
 */
if ($_POST && $new_title) {
    $next_rank ? $next_rank : ($next_rank = 1);
    $new_id = $marker_type->createMarkerType($new_title, $next_rank);
    if ($new_id) {
        header('location:marker-type.list.php');
        die;
    } else {
        $alert_output = $message->alert_dialog('I couldn’t create the new marker.');
    }
} elseif ($_POST && !$new_title) {
<?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']);
Beispiel #27
0
);

$link_set[] = array(
	'url' => 'site.config.php',
	'tap' => 'Change my copyright year',
	'title' => ''
);

$link_set[] = array(
	'url' => 'user.config.php',
	'tap' => 'Change my login/password',
	'title' => ''
);
*/
/* ! Build * * * * * * * */
$view = new GrlxView();
$fileops = new GrlxFileOps();
$link = new GrlxLink();
$fileops->db = $db;
$view->yah = 15;
$view->page_title('Grawlix panel');
$view->tooltype('panl');
$view->headline('Grawlix panel');
$db->where('date_publish >= NOW()');
$db->orderBy('sort_order', 'ASC');
$id_info = $db->getOne('book_page', 'id');
if ($id_info) {
    $comic_page = new GrlxComicPage($id_info['id']);
}
if ($comic_page) {
    $image = reset($comic_page->imageList);
<?php

/* ! Setup * * * * * * * */
require_once 'panl.init.php';
$view = new GrlxView();
$view->yah = 4;
$form = new GrlxForm();
$form->send_to($_SERVER['SCRIPT_NAME']);
$form->row_class = 'row arcv';
// Load up the settings/info for building the archive
$args['infoXML'] = 1;
$infoXML = new GrlxXML_Book($args);
unset($args);
$book_id = $_POST['book_id'];
$book_id ? $book_id : ($book_id = $_GET['book_id']);
if (!$book_id) {
    $book = new GrlxComicBook();
    $book_id = $book->bookID;
}
if ($_POST['submit']) {
    $args['archiveNew'] = array('behavior' => $_POST['behavior'], 'chapter' => $_POST['chapter'], 'page' => $_POST['page']);
    // These can’t be empty
    if (!array_key_exists('option', $args['archiveNew']['chapter'])) {
        $args['archiveNew']['chapter']['option'] = 'number';
    }
    if (!array_key_exists('option', $args['archiveNew']['page'])) {
        $args['archiveNew']['page']['option'] = 'number';
    }
}
$args['bookID'] = $book_id;
$xml = new GrlxXML_Book($args);
<?php

/*****
 * Setup
 */
include 'panl.init.php';
$link = new GrlxLinkStyle();
$view = new GrlxView();
$message = new GrlxAlert();
$var_list = array('ad_id', 'title');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
$code = $_POST['code'];
// No ad selected? Send ’em back to the list.
if (!$ad_id || !is_numeric($ad_id)) {
    //	header('location:ad.list.php');
}
// Folder in which we keep ad images.
$image_path = $milieu_list['directory']['value'] . '/assets/images/ads';
// List of status levels.
$priority_list = array('1' => 'High', '0' => 'Normal', '-1' => 'Hidden');
/*****
 * Updates
 */
// Prepare to update the ad’s database record.
if ($_POST && $ad_id) {
    $data = array('code' => $code, 'title' => $title);
    $db->where('id', $ad_id);
<?php

/*****
 * Setup
 */
require_once 'panl.init.php';
$view = new GrlxView();
//$modal = new GrlxForm_Modal;
$message = new GrlxAlert();
$link = new GrlxLinkStyle();
$list = new GrlxList();
$form = new GrlxForm();
$fileops = new GrlxFileOps();
$fileops->db = $db;
$comic_image = new GrlxComicImage();
$sl = new GrlxSelectList();
$form->send_to($_SERVER['SCRIPT_NAME']);
$var_list = array('marker_id', 'book_id', 'new_order');
if ($var_list) {
    foreach ($var_list as $key => $val) {
        ${$val} = register_variable($val);
    }
}
if (!$marker_id) {
    header('location:book.view.php');
    die;
}
$marker = new GrlxMarker($marker_id);
$new_order ? $new_order : ($new_order = 1);
/*****
 * Updates