コード例 #1
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(
コード例 #2
0
<?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)) {
コード例 #3
0
                    break;
                case 13:
                    $temp['logo'] = 'intensedebate.logo.png';
                    break;
                case 14:
                    $temp['logo'] = 'livefyre.logo.svg';
                    $temp['url'] = 'https://www.livefyre.com/auth/register/';
                    break;
            }
        }
        $service_list[$item['function_id']]['items'][] = $temp;
    }
}
if ($service_list) {
    $view->group_css('social');
    $list = new GrlxList();
    $list->draggable(false);
    $edit_link = new GrlxLinkStyle();
    $edit_link->url('xtra.edit-info.ajax.php');
    $edit_link->title('Edit this service’s info.');
    $edit_link->reveal(true);
    $edit_link->action('edit');
    foreach ($service_list as $function_id => $section_group) {
        $view->group_h2($section_group['title']);
        $view->group_instruction($section_group['description']);
        // ! Follow
        //
        if ($function_id == 1) {
            $form->title('Show/hide a follow link for this service.');
            $heading_list[] = array('value' => 'Service', 'class' => 'nudge');
            $heading_list[] = array('value' => 'Your info', 'class' => 'nudge');
コード例 #4
0
<?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) {
コード例 #5
0
    $action_output = $button->button_secondary('power');
    $instruction = 'By default, your site uses one theme &amp; tone. Choose it here.';
    $label_output = 'Site theme &amp; tone';
    $form->input_hidden('sel');
    $form->value('milieu-' . $theme->milieuID['tone']);
    $list_output = $form->paint();
    $sl->setCurrent($theme->defaultToneID);
    $tone_select = $sl->buildSelect();
} else {
    $button->title('Serve one theme/tone to your entire site.');
    $button->tap('Turn off multi-theme');
    $action_output = $button->button_tertiary('power');
    $instruction = 'Multi-theme allows you to choose a unique setting for every group of pages listed here.';
    $label_output = 'Apply to selection';
    // Get book sections
    $list = new GrlxList();
    $list->draggable(false);
    $heading_list[] = array('value' => 'Select', 'class' => null);
    $heading_list[] = array('value' => 'Group', 'class' => 'nudge');
    $heading_list[] = array('value' => 'Theme/tone', 'class' => 'nudge');
    $list->row_class('theme');
    $list->headings($heading_list);
    $list_output = $list->format_headings();
    $book = new GrlxComicBook();
    $book->getMarkerList();
    // Chapters
    if ($book->markerList) {
        $i = 0;
        foreach ($book->markerList as $marker_id => $info) {
            $i++;
            $row_select = '<input type="checkbox" name="sel[book_page-' . $marker_id . ']" />';
コード例 #6
0
<?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);
コード例 #7
0
<?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);
コード例 #8
0
<?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) {