コード例 #1
0
function settings_custom_login_page_callback()
{
    $setting_key = get_setting_key(__FUNCTION__);
    $option = get_option($setting_key);
    $arr_data = array();
    $arr_data[''] = "-- " . __("Choose here", 'lang_login') . " --";
    get_post_children(array('output_array' => true), $arr_data);
    echo show_select(array('data' => $arr_data, 'name' => $setting_key, 'value' => $option, 'suffix' => "<a href='" . admin_url("post-new.php?post_type=page") . "'><i class='fa fa-lg fa-plus'></i></a>", 'description' => __("The content from this page is displayed next to the login screen", 'lang_login')));
}
コード例 #2
0
ファイル: foreigncredits.php プロジェクト: TIS-FMDP/Erasmus
function show_exchange_filter($filter_t)
{
    $sort_url = determine_sort_url();
    $menu = $_GET['m'];
    print '<form method="POST" action="index.php?m=' . $menu . $sort_url . '&setfilter">';
    print '<table><tbody><tr><th>Select student travel:</th></tr><tr><td>';
    //if (strlen($_POST['travel_selection']) > 0) $ft = $_POST['travel_selection']; else $ft = $filter_t;
    show_select('travel_selection', db_travels_list(), $filter_t, ' onchange="this.form.submit()"');
    print '</td></tr></tbody></table></form><br />';
}
コード例 #3
0
ファイル: settings.php プロジェクト: PONBBS/WEIPDCRM
        ?>
</h3>
						<br />
						<div class="control-group">
							<label class="control-label"><?php 
        _e('Autofill Depiction');
        ?>
</label>
							<div class="controls">
								<select name="autofill_depiction">
									<?php 
        $autofill_depiction = get_option('autofill_depiction');
        if (empty($autofill_depiction)) {
            $autofill_depiction = '2';
        }
        show_select($autofill_depiction);
        ?>
								</select>
								<p class="help-block"><?php 
        _e('Autofill package\'s Depiction when import if enabled.');
        ?>
</p>
							</div>
						</div>
						<br />
						<div class="control-group">
							<label class="control-label"><?php 
        _e('Default Identifier of Packages');
        ?>
</label>
							<div class="controls">
コード例 #4
0
ファイル: travels.php プロジェクト: TIS-FMDP/Erasmus
function show_travel_filters($filter_a, $filter_d1, $filter_d2)
{
    $sort_url = determine_sort_url();
    print '<form method="POST" action="index.php?m=travels&' . $sort_url . '&setfilter">';
    print '<table id="tblTravels"><tbody><tr><th colspan="3">Show only travels:</th></tr><tr><td>';
    print '<input type="checkbox" name="filterbyagr"';
    print (strlen($filter_a) > 0 ? ' checked="checked"' : '') . '" /> for agreement: </td><td colspan="2">';
    if (strlen($_POST['agreement_selection']) > 0) {
        $fa = $_POST['agreement_selection'];
    } else {
        $fa = $filter_a;
    }
    show_select('agreement_selection', db_retrieve_agreements_data(TRUE), $fa);
    print '</td></tr><tr><td><input type="checkbox" name="filterbydates"' . (strlen($filter_d1) > 0 ? 'checked="checked"' : '') . '" />';
    if (strlen($_POST['filter_from']) > 0) {
        $fromval = $_POST['filter_from'];
    } else {
        if (strlen($filter_d1) > 0) {
            $fromval = $filter_d1;
        } else {
            $fromval = "2000-12-24";
        }
    }
    print 'overlapping period </td><td>from (Y-M-D): <input type="date" name="filter_from" value="' . $fromval . '" />';
    if (strlen($_POST['filter_to']) > 0) {
        $toval = $_POST['filter_to'];
    } else {
        if (strlen($filter_d2) > 0) {
            $toval = $filter_d2;
        } else {
            $toval = "2010-12-24";
        }
    }
    print ' to (Y-M-D): <input type="date" name="filter_to" value="' . $toval . '" /></td><td>';
    print '<input type="submit" name="filter" value="apply filter" /></td></tr></tbody></table></form><br />';
}
コード例 #5
0
ファイル: functions.php プロジェクト: frostkom/mf_admin_menu
function setting_admin_menu_roles_callback()
{
    global $menu;
    mf_enqueue_script('script_admin_menu_wp', plugin_dir_url(__FILE__) . "script_wp.js");
    $setting_key = get_setting_key(__FUNCTION__);
    $option = get_option($setting_key);
    $arr_data = get_settings_roles(array('default' => true, 'custom_name' => true, 'none' => true));
    echo "<div id='admin_menu_roles'>";
    if (count($menu) > 0) {
        if (!in_array('profile.php', $menu)) {
            $menu[71] = array(0 => __("Profile", 'lang_admin_menu'), 1 => 'read', 2 => 'profile.php');
        }
        foreach ($menu as $item) {
            if ($item[0] != '') {
                //$item_name = strip_tags($item[0]);
                //$item_name = trim(preg_replace("/(\<span(.*)\<\/span\>)/is", "", $item[0]));
                $update_count = get_match("/(\\<span.*\\<\\/span\\>)/is", $item[0], false);
                $item_name = trim(str_replace($update_count, "", $item[0]));
                $item_capability = $item[1];
                $item_url = $item[2];
                $option_temp = $item_url . '|' . $item_name;
                if (!(is_array($option) && count($option) > 0 && isset($option[$option_temp]))) {
                    echo "<div class='flex_flow tight'>" . show_textfield(array('value' => $item_name)) . input_hidden(array('value' => $item_url)) . show_select(array('data' => $arr_data, 'name' => "setting_admin_menu_roles[" . $option_temp . "]", 'value' => $item_capability)) . "</div>";
                }
            }
        }
    }
    if (is_array($option) && count($option) > 0) {
        foreach ($option as $key => $value) {
            list($item_url, $item_name) = explode('|', $key);
            echo "<div class='flex_flow tight'>" . show_textfield(array('value' => $item_name)) . input_hidden(array('value' => $item_url)) . show_select(array('data' => $arr_data, 'name' => "setting_admin_menu_roles[" . $key . "]", 'value' => $value)) . "</div>";
        }
    }
    echo "</div>";
}
コード例 #6
0
	<?
		for ($ent=0;$ent<6;$ent++) {
			# serial
			print "<tr><td>$ent</td>";
			
			# languages
			print "<td>" . show_select("lang[$ent]", $langs, 'en') . "</td>";
			
			# translation
			print "<td><input name=trans[$ent]></td>";

			#part of speech
			print "<td>" . show_select("part_of_speech[$ent]", $part_of_speeches, 'noun') . "</td>";

			#gender
			print "<td>" . show_select("gender[$ent]", $genders, 'male') . "</td>";
		}
	
		print "</tr>";

	?>

</tbody>
</table>

<input type=submit name=submit value='go for it'>

</form>
</body>
</html>
コード例 #7
0
ファイル: functions.php プロジェクト: frostkom/mf_users
function setting_admin_color_callback()
{
    $setting_key = get_setting_key(__FUNCTION__);
    $option = get_option($setting_key);
    $arr_data = array('' => "-- " . __("Choose here", 'lang_users') . " --", 'blue' => __("Blue", 'lang_users'), 'fresh' => __("Fresh", 'lang_users') . " (" . __("Default", 'lang_users') . ")", 'ectoplasm' => __("Ectoplasm", 'lang_users'), 'light' => __("Light", 'lang_users'), 'coffee' => __("Coffee", 'lang_users'), 'midnight' => __("Midnight", 'lang_users'), 'ocean' => __("Ocean", 'lang_users'), 'sunrise' => __("Sunrise", 'lang_users'));
    echo show_select(array('data' => $arr_data, 'name' => $setting_key, 'value' => $option));
}