• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_locations函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_locations函数的典型用法代码示例。如果您正苦于以下问题:PHP get_locations函数的具体用法?PHP get_locations怎么用?PHP get_locations使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_locations函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_locations_arg

function get_locations_arg()
{
    $locations = get_locations();
    $args = array();
    foreach ($locations as $location) {
        $args[$location->ID] = $location->NAME;
    }
    return $args;
}
开发者ID:KennyNguyen88,项目名称:ndt-hangdong,代码行数:9,代码来源:functions.php


示例2: implode

         $query .= ' WHERE 1 ' . implode('', $where_array);
         $where_array[$entry] = $tmp;
     } else {
         $query .= $where;
     }
     $query .= " AND `{$entry}` != '' {$query_permitted} GROUP BY `{$entry}` ORDER BY `{$entry}`";
     foreach (dbFetchColumn($query) as $item) {
         if ($entry == 'os') {
             $name = $config['os'][$item]['text'];
         } else {
             $name = nicecase($item);
         }
         $search_items[$entry][$item] = $name;
     }
 }
 foreach (get_locations() as $entry) {
     $search_items['location'][$entry] = $entry == '' ? 'UNSET' : htmlspecialchars($entry);
 }
 foreach (get_type_groups('device') as $entry) {
     $search_items['group'][$entry['group_id']] = $entry['group_name'];
 }
 $search_items['sort'] = array('hostname' => 'Hostname', 'location' => 'Location', 'os' => 'Operating System', 'uptime' => 'Uptime');
 $form = array('type' => 'rows', 'url' => generate_url($vars));
 // First row
 $form['row'][0]['hostname'] = array('type' => 'text', 'name' => 'Hostname', 'value' => $vars['hostname'], 'width' => '180px', 'placeholder' => TRUE);
 $form['row'][0]['location'] = array('type' => 'multiselect', 'name' => 'Select Locations', 'width' => '180px', 'json' => TRUE, 'value' => $vars['location'], 'values' => $search_items['location']);
 $form['row'][0]['os'] = array('type' => 'multiselect', 'name' => 'Select OS', 'width' => '180px', 'value' => $vars['os'], 'values' => $search_items['os']);
 $form['row'][0]['hardware'] = array('type' => 'multiselect', 'name' => 'Select Hardware', 'width' => '180px', 'value' => $vars['hardware'], 'values' => $search_items['hardware']);
 $form['row'][0]['group'] = array('type' => 'multiselect', 'name' => 'Select Groups', 'width' => '180px', 'value' => $vars['group'], 'values' => $search_items['group']);
 // Select sort pull-rigth
 $form['row'][0]['sort'] = array('type' => 'select', 'icon' => 'oicon-sort-alphabet-column', 'right' => TRUE, 'width' => '150px', 'value' => $vars['sort'], 'values' => $search_items['sort']);
开发者ID:skive,项目名称:observium,代码行数:31,代码来源:devices.inc.php


示例3: htmlentities

    }
    ?>

    <div class="row">
      <div class="col-lg-2">
          <input placeholder="主机名" type="text" name="hostname" id="hostname" class="input" value="<?php 
    htmlentities($vars['hostname']);
    ?>
" />
      </div>
      <div class="col-lg-2">
        <select class="selectpicker" name="location" id="location">
          <option value="">所有物理位置</option>
          <?php 
    // FIXME function?
    foreach (get_locations() as $location) {
        $value = base64_encode(json_encode(array($location)));
        $name = $location == '' ? '[[UNKNOWN]]' : htmlspecialchars($location);
        echo '<option value="' . $value . '"';
        if (array($location) === $vars['location']) {
            echo " selected";
        }
        echo ">" . $name . "</option>";
    }
    ?>
        </select>
      </div>
      <div class="col-lg-2">
        <select class="selectpicker" name='os' id='os'>
          <option value=''>所有操作系统</option>
          <?php 
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:devices.inc.php


示例4: get_managers

<?php

require_once '../../../util/main.php';
require_once '../../authenticate.php';
require_once '../../../view/headerForAdmin.php';
require_once '../../../model/database.php';
require_once '../../../model/location_db.php';
require_once '../../../model/employee_db.php';
$managers = get_managers();
$locations = get_locations();
?>

<div class="heading">
    <div class="clearfix">
        <div class="pull-left">
            <h3>Employees</h3>
        </div>
        <div class="pull-right">
            <button class="btn btn-default btn-xs" type="button" onclick="sodon_main.create('');">
                <i class="glyphicon glyphicon-file text-primary"></i> Add New Employee
            </button>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-xs-3">

        <input id="searchParams" type="hidden" value="">

        <div class="panel panel-default">
开发者ID:Byambatsog,项目名称:kconlineorder,代码行数:31,代码来源:index.php


示例5: get_locations

 * first  -> location identifier
 * second -> x coordinate of the center of the circle
 * thrid  -> y coordinate of the center of the circle
*/
function get_locations($loc_file)
{
    $locs = array();
    $fh = fopen($loc_file, "rb");
    /* while there is data in the file */
    while (!feof($fh)) {
        /* grab a line from the file */
        $line = fgets($fh);
        /* if the line starts with a '#' or isnt long enough then ignore it */
        if ($line[0] == '#' || strlen($line) < 5) {
            continue;
        }
        /* convert the line into an array */
        $pts = explode(',', $line);
        /* chop off any whitespace from each field */
        for ($i = 0; $i < sizeof($pts); $i++) {
            $pts[$i] = rtrim($pts[$i]);
        }
        /* push new data onto the end of the array */
        array_push($locs, $pts);
    }
    return $locs;
}
echo_header();
$pts = get_locations("locations.txt");
echo_locations($pts);
echo_footer();
开发者ID:jdegges,项目名称:image-map,代码行数:31,代码来源:image-map.php


示例6: show_map

function show_map($config)
{
    ?>
<div class="row" style="margin-bottom: 10px;">
  <div class="col-md-12">

  <style type="text/css">
    #chart_div label { width: auto; display:inline; }
    #chart_div img { max-width: none; }
  </style>
  <!-- <div id="reset" style="width: 100%; text-align: right;"><input type="button" onclick="resetMap();" value="重置地图" /></div> -->
  <div id="chart_div" style="height: <?php 
    echo $config['frontpage']['map']['height'];
    ?>
px;"></div>

  <?php 
    if ($config['frontpage']['map']['api'] != 'google-mc') {
        ?>
  <script type='text/javascript' src='//www.google.com/jsapi'></script>
  <script type='text/javascript'>
    google.load('visualization', '1.1', {'packages': ['geochart']});
    google.setOnLoadCallback(drawRegionsMap);
    function drawRegionsMap() {
      var data = new google.visualization.DataTable();
      data.addColumn('number', '纬度');
      data.addColumn('number', '经度');
      data.addColumn('string', '位置');
      data.addColumn('number', '状态');
      data.addColumn('number', '设备');
      data.addColumn({type: 'string', role: 'tooltip'});
      data.addColumn('string', 'url');
      data.addRows([
        <?php 
        $locations_up = array();
        $locations_down = array();
        foreach (get_locations() as $location) {
            $location_name = $location == '' ? '[[UNKNOWN]]' : strtr(htmlspecialchars($location), "'", "`");
            $location_url = generate_location_url($location);
            $devices_down = array();
            $devices_up = array();
            $count = $GLOBALS['cache']['device_locations'][$location];
            $down = 0;
            foreach ($GLOBALS['cache']['devices']['id'] as $device) {
                if ($device['location'] == $location) {
                    if ($device['status'] == "0" && $device['ignore'] == "0") {
                        $down++;
                        $devices_down[] = $device['hostname'];
                        $lat = $device['location_lat'];
                        $lon = $device['location_lon'];
                    } else {
                        if ($device['status'] == "1") {
                            $devices_up[] = $device['hostname'];
                            $lat = $device['location_lat'];
                            $lon = $device['location_lon'];
                        }
                    }
                }
            }
            $count = $count < 100 ? $count : 100;
            if ($down > 0) {
                $locations_down[] = "[{$lat}, {$lon}, '{$location_name}', {$down}, " . $count * $down . ", '" . count($devices_up) . " 设备启用, " . count($devices_down) . " 设备关闭: (" . implode(", ", $devices_down) . ")', '{$location_url}']";
            } else {
                if ($count) {
                    $locations_up[] = "[" . $lat . ", " . $lon . ", '" . $location_name . "',         0,       " . $count . ", '" . count($devices_up) . " Devices UP: (" . implode(", ", $devices_up) . ")', '{$location_url}']";
                }
            }
        }
        echo implode(",\n        ", array_merge($locations_up, $locations_down));
        ?>
      ]);

      var options = {
        region: '<?php 
        echo $config['frontpage']['map']['region'];
        ?>
',
        resolution: '<?php 
        echo $config['frontpage']['map']['resolution'];
        ?>
',
        displayMode: 'markers',
        keepAspectRatio: 0,
        //width: 1240,
        //height: 480,
        is3D: true,
        legend: 'none',
        enableRegionInteractivity: true,
        <?php 
        if ($config['frontpage']['map']['realworld']) {
            echo "\t\t  datalessRegionColor: '#93CA76',";
        } else {
            echo "\t\t  datalessRegionColor: '#d5d5d5',";
        }
        if ($config['frontpage']['map']['realworld']) {
            echo "\t\t  backgroundColor: {fill: '#000000'},";
        }
        ?>
        backgroundColor: {fill: 'transparent'},
        magnifyingGlass: {enable: true, zoomFactor: 5},
//.........这里部分代码省略.........
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:101,代码来源:default.php


示例7: booking_form

function booking_form()
{
    global $booking;
    $html = '<div id="bookingForm">
		<form class="formStep1" method="POST" enctype="multipart/form-data">

			<div class="step1">

		    <div class="form-group narrow">
		      <input type="text" name="pickup" id="pickup" class="required" placeholder="' . __('Pickup Location', 'vbs') . '" />
		      <select style="display: none;" id="pickup_location" name="pickup_location">
		      	<option value="">' . __('Select location...', 'vbs') . '</option>
		      	' . get_locations() . '
		      </select>

		      <input type="text" name="dropoff" id="dropoff" class="required" placeholder="' . __('Dropoff Location', 'vbs') . '" />
		      <select style="display: none;" id="dropoff_location" name="dropoff_location">
		      	<option value="">' . __('Select location...', 'vbs') . '</option>
		      	' . get_locations() . '
		      </select>

		      <button class="act route" type="submit">' . __('Route!', 'vbs') . '</button>
		    </div>

		    <div class="form-group narrow selection">
		    	<button class="act pick-loc-select" type="submit">' . __('Select Location', 'vbs') . '</button>
		    	<button class="act drop-loc-select" type="submit">' . __('Select Location', 'vbs') . '</button>
		    </div>

		    <div class="form-group">
		    	<input type="text" name="date_pickup" id="date_pickup" class="required" />
		    	<input type="text" name="time_pickup" id="time_pickup" class="required" />
		    </div>

		    <div class="form-group wide">
		    	<label for="return">' . __('Return trip required?', 'vbs') . '</label> <input type="checkbox" name="return" id="return" />
		    </div>

		    <div class="form-group return_group" style="display: none;">
		    	<input type="text" name="date_return" id="date_return" />
		    	<input type="text" name="time_return" id="time_return" />
		    </div>

		    <div class="form-group" id="route-info" style="display: none;"></div>
			  <div id="route_map" style="display: none;">
			  	<div id="map-canvas" style="width: 500px !important; height: 500px !important;"></div>
			  </div>

		    <div id="validation"></div>

		    <button class="btn" data-goto="2" type="submit"><i class="fa fa-arrow-right"></i> ' . __('Select Car', 'vbs') . '</button>

		  </div> <!-- step1 end -->

		</form>



		<form id="bookingForm" class="formStep2" method="POST" enctype="multipart/form-data">

		  <div class="step2" style="display: none;">

		  	<h3 class="section">' . __('Select car', 'vbs') . '</h3>
		  	<div class="cars"></div>

		  	<button class="btn" data-goto="3" type="submit"><i class="fa fa-arrow-right"></i> ' . __('Details', 'vbs') . '</button>

		  </div> <!-- step2 end -->

	  </form>';
    if (is_user_logged_in()) {
        $user = wp_get_current_user();
        $html .= '<form id="bookingForm" class="formStep3" method="POST" enctype="multipart/form-data">

		  <div class="step3" style="display: none;">

		  	<div class="info">

		  		<h3 class="section">' . __('Contact info:', 'vbs') . '</h3>
		      <div class="form-group">
		        <input readonly type="text" name="first_name" id="first_name" class="required" value="' . $user->user_firstname . '" />
		        <input readonly type="text" name="last_name" id="last_name" class="required" value="' . $user->user_lastname . '" />
		      </div>

		      <div class="form-group">
		        <input readonly type="text" name="email" id="email" class="required" value="' . $user->user_email . '" />
		        <input type="text" name="phone" id="phone" class="required" placeholder="' . __('Phone', 'vbs') . '" />
		      </div>

		      <div class="form-group wide">
		        <textarea name="comments" id="comments">' . __('Message to driver', 'vbs') . '</textarea>
		      </div>

		      <div class="form-group">
		        <h3 class="section">' . __('Payment Method:', 'vbs') . '</h3>
		        Paypal <input type="radio" name="payment" id="payment" class="required" value="paypal" />
		        Cash <input type="radio" name="payment" id="payment" class="required" value="cash" />
		      </div>

		  	</div>
//.........这里部分代码省略.........
开发者ID:arsen77,项目名称:vehicle-booking-system,代码行数:101,代码来源:shortcodes.php


示例8: get_locations

                                                </div>

                                                <div class="widget-content">

                                                        <table id="locations-table" class="table table-bordered table-striped data-table">
                                                <thead>
                                                        <tr>
                                                                <th>Location Name</th>
                                                                <th>Latitude</th>
                                                                <th>Longitude</th>
                                                                <th>Actions</th>
                                                        </tr>
                                                </thead>
                                                <tbody>
<?php 
get_locations();
?>
					
</tbody>
                                        </table>
        </div> 
                                                <!-- .widget-content -->

                                </div> <!-- .widget -->

                                        <div class="actions">						
                                                                <button onclick="window.location='add_location.php';" class="btn btn-quaternary"><span class="icon-plus"></span>Create New Location</button>
                                                                </div> <!-- .actions -->
                        </div> <!-- .grid -->
			
		</div> <!-- .container -->
开发者ID:liulingfu,项目名称:madserve,代码行数:31,代码来源:view_locations.php


示例9: foreach

							</tbody>
						</table>
					</div>
				</div>
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< JASON: Added panel to display artefacts -->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							Artefacts
						</h3>

					</div>
					<div class="panel-body" id = "artefacts">
						<h3> Todo: Put the players and weapons in rooms </h3>
						<?php 
foreach (get_locations() as $char) {
    ?>
							<h5> <?php 
    echo $char['name'];
    ?>
 </h5>
						<?php 
}
?>
					</div>
				</div>
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							Dice
开发者ID:Jason-vh,项目名称:cos216,代码行数:31,代码来源:game-main.php


示例10: get_locations

if ($webinar->description !== "") {
    echo '<tr>
        <td valign="top">Description:</td>
        <td width="20px">&nbsp;</td>
        <td valign="top">' . $webinar->description . '</td>
        </tr>';
}
if ($webinar->agenda !== "") {
    echo '<tr>
        <td valign="top">Agenda:</td>
        <td width="20px">&nbsp;</td>
        <td valign="top">' . $webinar->agenda . '</td>
        </tr>';
}
echo '</table>';
$locations = get_locations($webinar->id);
if (count($locations) > 2) {
    echo '<form method="get" action="view.php">';
    echo '<div><input type="hidden" name="f" value="' . $webinar->id . '"/>';
    choose_from_menu($locations, 'location', $location, '');
    echo '<input type="submit" value="' . get_string('showbylocation', 'webinar') . '"/>';
    echo '</div></form>';
}
print_session_list($course->id, $webinar->id, $location, $webinar);
$OUTPUT->box_end();
echo $OUTPUT->footer();
function print_session_list($courseid, $webinarid, $location, $webinar)
{
    global $USER;
    global $CFG;
    global $DB;
开发者ID:pavelsokolov,项目名称:webinar,代码行数:31,代码来源:view.php


示例11: format_string

$pagetitle = format_string($facetoface->name);
$f2frenderer = $PAGE->get_renderer('mod_facetoface');
$completion = new completion_info($course);
$completion->set_module_viewed($cm);
echo $OUTPUT->header();
if (empty($cm->visible) and !has_capability('mod/facetoface:viewemptyactivities', $context)) {
    notice(get_string('activityiscurrentlyhidden'));
}
echo $OUTPUT->box_start();
echo $OUTPUT->heading(get_string('allsessionsin', 'facetoface', $facetoface->name), 2);
if ($facetoface->intro) {
    echo $OUTPUT->box_start('generalbox', 'description');
    echo format_module_intro('facetoface', $facetoface, $cm->id);
    echo $OUTPUT->box_end();
}
$locations = get_locations($facetoface->id);
if (count($locations) > 2) {
    echo html_writer::start_tag('form', array('action' => 'view.php', 'method' => 'get'));
    echo html_writer::start_tag('div');
    echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id));
    echo html_writer::select($locations, 'location', $location, '');
    echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('showbylocation', 'facetoface')));
    echo html_writer::end_tag('div') . html_writer::end_tag('form');
}
print_session_list($course->id, $facetoface->id, $location);
if (has_capability('mod/facetoface:viewattendees', $context)) {
    echo $OUTPUT->heading(get_string('exportattendance', 'facetoface'));
    echo html_writer::start_tag('form', array('action' => 'view.php', 'method' => 'get'));
    echo html_writer::start_tag('div');
    echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id));
    echo get_string('format', 'facetoface') . '&nbsp;';
开发者ID:CWRTP,项目名称:facetoface-2.0,代码行数:31,代码来源:view.php


示例12: header

require_once MODULE_DIR . "access/class.IPAccess.inc";
require_once INIT_DIR . "env.inc";
require_once INIT_DIR . "db.inc";
require_once MODULE_DIR . "user/mod.user.inc";
require_once INIT_DIR . "smarty.inc";
require_once MODULE_DIR . "structure/mod.structure.inc";
require_once MODULE_DIR . "user/mod.usergroup.inc";
//require_once(MODULE_DIR . "productcatalog/mod.category.inc");
//require_once(MODULE_DIR . "productcatalog/mod.variable.inc");
//require_once(MODULE_DIR . "productcatalog/mod.product.inc");
require_once MODULE_DIR . "statistics/mod.query.inc";
require_once MODULE_DIR . "ind_functions.inc";
include_once MODULE_DIR . "edasimuuja.inc";
//require_once(MODULE_DIR . "sitevariables/mod.sitevariables.inc");
if (!$objIPAccess->fnValidate($arrAllowIP["access"], $_SERVER["REMOTE_ADDR"]) or $objIPAccess->fnValidate($arrAllowIP["deny"], $_SERVER["REMOTE_ADDR"])) {
    header("Location: " . LOGINCENTER_PATH);
}
if (!is_object($_SESSION["user"])) {
    header("Location: " . LOGINCENTER_PATH);
}
require_once CONFIG_DIR . $_SESSION["lang"] . ".translation.inc";
foreach ($_GET as $key => $value) {
    $_GET[$key] = norm($value);
}
$strTemplate = "content.maad.tpl";
$tree = get_locations($_GET['country'], $_GET['region']);
$engSmarty->assign("tree", $tree);
$engSmarty->assign("_GET", $_GET);
$engSmarty->assign("boolRefreshTree", $_GET["refreshtree"]);
$engSmarty->assign("arrTranslation", $arrTranslation);
$engSmarty->display("admin/" . $strTemplate);
开发者ID:vcgato29,项目名称:poff,代码行数:31,代码来源:frame.maad.php


示例13: header

        } else {
            header("Location: " . $_GET['state']);
        }
    }
}
// VIP cache
$vips = array("https://rhiaro.co.uk", "https://rhiaro.co.uk/", "http://tigo.rhiaro.co.uk/");
if (isset($_SESSION['me']) && in_array($_SESSION['me'], $vips) && !isset($_SESSION['locations'])) {
    $locations = get_locations("https://rhiaro.co.uk/locations");
} elseif (!isset($_SESSION['locations'])) {
    $locations = set_default_locations();
} else {
    $locations = $_SESSION['locations'];
}
if (isset($_POST['locations_source'])) {
    $fetch = get_locations($_POST['locations_source']);
    if (!$fetch) {
        $errors["Problem fetching locations"] = "The locations url needs to return a single page AS2 Collection as JSON.";
    } else {
        $locations = $fetch;
    }
}
if (isset($locations["id"])) {
    $locations_source = $locations["id"];
}
function dump_headers($curl, $header_line)
{
    echo "<br>YEAH: " . $header_line;
    // or do whatever
    return strlen($header_line);
}
开发者ID:rhiaro,项目名称:burrow,代码行数:31,代码来源:index.php



注:本文中的get_locations函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_log_manager函数代码示例发布时间:2022-05-15
下一篇:
PHP get_location_name_by_id函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap