コード例 #1
0
    //	$alert_output = $errorMsg->alert_dialog($theme->errorOutput);
}
if ($theme->successOutput) {
    /*
    	$successMsg = new GrlxAlert;
    	$alert_output .= $successMsg->success_dialog($theme->successOutput);
    */
}
if ($theme->toInstallOutput) {
    $message = new GrlxAlert();
    //	$alert_output .= $message->info_dialog($theme->toInstallOutput);
}
// Assignment section
$button->url($_SERVER['SCRIPT_NAME']);
$button->query('toggle-multi=true');
$sl->setName('new_tone_id');
$sl->setList($theme->toneSelectList);
$sl->setValueID('id');
$sl->setValueTitle('title');
if ($theme->multiTone < 1) {
    $button->title('With this you can set a different theme or tone for nearly every page of your site.');
    $button->tap('Turn on multi-theme');
    $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 {
コード例 #2
0
}
// ! Display logic
// Build calendar options (month list, day list, year list)
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);
}
// Build select elements for each date part.
$sl->setName('pub_year');
$sl->setCurrent(date('Y'));
$sl->setList($year_list);
$sl->setValueID('id');
$sl->setValueTitle('title');
$sl->setStyle('width:4rem');
$year_select_output = $sl->buildSelect();
$sl->setName('pub_month');
$sl->setCurrent(date('m'));
$sl->setList($month_list);
$sl->setValueID('id');
$sl->setValueTitle('title');
$sl->setStyle('width:8rem');
$month_select_output = $sl->buildSelect();
$sl->setName('pub_day');
$sl->setCurrent(date('d'));
コード例 #3
0
*/
// ! Get the marker types
// so we can let artists change this marker to a different kind.
$db->orderBy('rank', 'ASC');
$marker_type_list = $db->get('marker_type', null, 'id,title,rank');
$marker_type_list = rekey_array($marker_type_list, 'id');
// Add rank numbers to the titles (I want to emphasize
// that there’s a definite pecking order at work).
if ($marker_type_list) {
    foreach ($marker_type_list as $key => $val) {
        $marker_type_list[$key]['title'] = $val['rank'] . '. ' . $val['title'];
    }
}
// Build the list from which artists choose
if ($marker_type_list) {
    $sl->setName('edit_marker_type');
    // <select name="spike">
    $sl->setList($marker_type_list);
    // List for <option>s
    $sl->setCurrent($marker->markerInfo['marker_type_id']);
    // selected="selected"
    $sl->setValueID('id');
    // <select id="jet">
    $sl->setValueTitle('title');
    // <label for="jet">Faye</label>
    $sl->setStyle('width:12rem');
    // <select style="Ed">
    $select_options = $sl->buildSelect() . '<br/>' . "\n";
    // Assemble the select element.
}
// ! Build the edit form
コード例 #4
0
 */
// Get Google Analytics info
$cols = array('id', 'title', 'label', 'description', 'user_info', 'info_title');
$ga_info = $db->where('id', 16)->getOne('third_service', $cols);
// Fetch site milieu settings
$cols = array('sm.id', 'sm.title', 'description', 'label', 'value', 'sm.sort_order');
$result = $db->orderBy('sm.sort_order', 'ASC')->orderBy('label', 'ASC')->where('sort_order', 1, '>=')->get('milieu sm', NULL, $cols);
if ($result) {
    foreach ($result as $key => $val) {
        if ($val['label'] == 'timezone') {
            $current_timezone = $val['value'];
        }
    }
}
if ($timezone_master_list) {
    $sl->setName('input[timezone]');
    $sl->setList($timezone_master_list);
    $sl->setCurrent($current_timezone);
    $sl->setValueID('id');
    $sl->setValueTitle('title');
    $select_options = $sl->buildSelect();
}
if ($db->count > 0) {
    foreach ($result as $item) {
        if ($item['description']) {
            $tooltip = '<span data-tooltip aria-haspopup="true" class="info has-tip" title="' . $item['description'] . '"><i></i></span>';
        } else {
            $tooltip = null;
        }
        if ($item['label'] == 'date_format' && $date_list) {
            $sl->setName('input[' . $item['label'] . ']');
コード例 #5
0
    header('location:marker.view.php?marker_id=' . $new_marker_id);
    die;
}
/*****
 * 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.');
}
// Reset
$marker = new GrlxMarker();
$form->multipart();
$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');
    $sl->setList($marker_type_list);
    //	$sl-> setCurrent();
    $sl->setValueID('id');
    $sl->setValueTitle('title');
    $sl->setStyle('width:12rem');
    $select_options = $sl->buildSelect();
    /*
    	$select_options .= '<select name="add-marker-type" style="width:12rem">';
    	foreach ( $marker_type_list as $key => $val ) {
    		$select_options .= '<option value="'.$key.'">'.$val['title'].'</option>';
    	}
    	$select_options .= '</select>';
    */
}
$new_title_field .= '<label for="new_name">New marker title</label>' . "\n";
コード例 #6
0
        }
    }
    $pattern_select_output .= '</ul>' . "\n";
} else {
    $pattern_select_output = 'No patterns available for this file type.';
}
$pattern_select_output = '
<div class="' . $form->row_class . '">
	<div>
		<label>Items’ pattern</label>
	</div>
<div>' . "\n" . $pattern_select_output;
//.'</div></div>';
$layout_options[] = array('id' => 'list', 'title' => 'List');
$layout_options[] = array('id' => 'grid', 'title' => 'Grid');
$sl->setName('layout_id');
$sl->setCurrent($page_layout);
$sl->setList($layout_options);
$sl->setStyle('width:6rem');
$sl->setValueID('id');
$sl->setValueTitle('title');
$layout_select_output = '
<div class="' . $form->row_class . '">
	<div>
		<label>Overall page layout</label>
	</div>
	<div>' . $sl->buildSelect() . '</div></div>';
if ($static->info['title']) {
    $page_title = $static->info['title'];
} else {
    $page_title = 'Untitled';