コード例 #1
0
}
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 {
    $button->title('Serve one theme/tone to your entire site.');
コード例 #2
0
// 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'));
$sl->setList($day_list);
$sl->setValueID('id');
コード例 #3
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'] . ']');
            $sl->setList($date_list);
コード例 #4
0
// 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
$edit_form_output .= '<form accept-charset="UTF-8" action="marker.edit.php" method="post">' . "\n";
$edit_form_output .= '	<p><label for="new_title">Title</label>' . "\n";
コード例 #5
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';
    $static->info['title'] = 'Untitled';
}