function determine_type() { $types = array("G" => "Courtyards", "P" => "Parking", "L" => "Landmarks"); if (preg_match("/^(P|G|L)\\d+/", select_value(), $match)) { return array("type" => $types[$match[1]], "field" => "Loc_ID"); } else { return array("type" => "Buildings", "field" => "facility"); } }
input_value('info|email', $info['email']); ?> "/> </td> </tr> <tr> <td>უფასო / ფასიანი</td> <td> <select name="status"> <option value="">---</option> <option value="2" <?php select_value('status', $registry['banner'][0]['status'], 2); ?> >ფასიანი</option> <option value="1" <?php select_value('status', $registry['banner'][0]['status'], 1); ?> >უფასო</option> </select> </td> </tr> <tr> <td>ბანერის განთავსების ვადა</td> <td> <input type="text" class="calendar input_80" name="published_at" value="<?php input_value('published_at', $registry['banner'][0]['published_at'] > 0 ? date('d/m/Y', strtotime($registry['banner'][0]['published_at'])) : $_GET['from']); ?> " placeholder="დან"> <input type="text" class="calendar input_80" value="<?php input_value('finished_at', $registry['banner'][0]['finished_at'] > 0 ? date('d/m/Y', strtotime($registry['banner'][0]['finished_at'])) : $_GET['to']); ?> " name="finished_at" placeholder="მდე">
/** Format value to use in select * @param string * @param string * @param array * @param int * @return string HTML */ function select_value($val, $link, $field, $text_length) { global $adminer, $HTTPS; if (is_array($val)) { $return = ""; foreach ($val as $k => $v) { $return .= "<tr>" . ($val != array_values($val) ? "<th>" . h($k) : "") . "<td>" . select_value($v, $link, $field, $text_length); } return "<table cellspacing='0'>{$return}</table>"; } if (!$link) { $link = $adminer->selectLink($val, $field); } if ($link === null) { if (is_mail($val)) { $link = "mailto:{$val}"; } if ($protocol = is_url($val)) { $link = $protocol == "http" && $HTTPS || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) ? $val : "https://www.adminer.org/redirect/?url=" . urlencode($val); } } $return = $adminer->editVal($val, $field); if ($return !== null) { if ($return === "") { // === - may be int $return = " "; } elseif (!is_utf8($return)) { $return = ""; // htmlspecialchars of binary data returns an empty string } elseif ($text_length != "" && is_shortable($field)) { $return = shorten_utf8($return, max(0, +$text_length)); // usage of LEFT() would reduce traffic but complicate query - expected average speedup: .001 s VS .01 s on local network } else { $return = h($return); } } return $adminer->selectVal($return, $link, $field, $val); }
?> " <?php select_value('cat', $registry['banner'][0]['cat_id'] ? $registry['banner'][0]['cat_id'] : $_GET['cat'], $ca['id']); ?> >- <?php echo $ca['name']; ?> </option> <?php } else { ?> <option value="<?php echo $ca['id']; ?> " <?php select_value('cat', $registry['banner'][0]['cat_id'] ? $registry['banner'][0]['cat_id'] : $_GET['cat'], $ca['id']); ?> >--- <?php echo $ca['name']; ?> </option> <?php } ?> <?php } ?> <?php } ?> <?php
function select_value() { global $msql; global $strVoteSel; global $strVoteColor1, $strVoteColor2, $strVoteColor3, $strVoteColor4, $strVoteColor5, $strVoteColor6; global $strVoteColor7, $strVoteColor8, $strVoteColor9, $strVoteColor10, $strVoteColor11, $strVoteColor12; $msql->query(" select def_options from {P}_tools_pollconfig "); if ($msql->next_record()) { $def_options = $msql->f('def_options'); } for ($i = 1; $i <= $def_options; $i++) { $string .= "<tr><td width=\"90\">" . $strVoteSel . $i . "</td><td >\r\n\t\t\t <input name=\"option_id[{$i}]\" type=\"text\" size=\"30\" class=\"input\" />\r\n\t\t\t <select class=\"select\" name=\"color[{$i}]\" onChange=\"javascript:ChangeBar(options[selectedIndex].value,{$i})\">\r\n <option value=\"blank\" >---</option>\r\n <option value=\"aqua\" selected>" . $strVoteColor1 . "</option>\r\n <option value=\"blue\">" . $strVoteColor2 . "</option>\r\n <option value=\"brown\">" . $strVoteColor3 . "</option>\r\n <option value=\"darkgreen\">" . $strVoteColor4 . "</option>\r\n <option value=\"gold\">" . $strVoteColor5 . "</option>\r\n <option value=\"green\">" . $strVoteColor6 . "</option>\r\n <option value=\"grey\">" . $strVoteColor7 . "</option>\r\n <option value=\"orange\">" . $strVoteColor8 . "</option>\r\n <option value=\"pink\">" . $strVoteColor9 . "</option>\r\n <option value=\"purple\">" . $strVoteColor10 . "</option>\r\n <option value=\"red\">" . $strVoteColor11 . "</option>\r\n <option value=\"yellow\">" . $strVoteColor12 . "</option>\r\n </select><img src=\"images/blank.gif\" name=\"bar{$i}\" width=\"8\" height=\"8\" align=\"absmiddle\"></td></tr>"; } return $string; } echo select_value(); ?> </tr> </table> <table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr> <td > <?php echo $strVoteStat; ?> <select name="status" id="status"> <option value="0"><?php echo $strClose;
?> " <?php select_value('cat', $_GET['cat'], $ca['id']); ?> >- <?php echo $ca['name']; ?> </option> <?php } else { ?> <option value="<?php echo $ca['id']; ?> " <?php select_value('cat', $_GET['cat'], $ca['id']); ?> >--- <?php echo $ca['name']; ?> </option> <?php } ?> <?php } ?> <?php } ?> <?php
</select> <select name="min"> <?php for ($i = 0; $i <= 59; $i++) { ?> <?php if ($i < 10) { $i = '0' . $i; } ?> <option val="<?php echo $i; ?> " <?php select_value('min', strtotime($registry['banner'][0]['contact_at']) > 0 ? date('i', strtotime($registry['banner'][0]['contact_at'])) : $_POST['min'], $i); ?> ><?php echo $i; ?> </option> <?php } ?> </select> </td> </tr> </table> <input type="submit" name="<?php echo $_GET['section']; ?>
public function init() { $type = determine_type(); $query1 = array( "request" => "getselection", "type" => "query", "layer" => $type["type"], "idfield" => $type["field"], "query" => $type["field"] ." in ('" . select_value() . "')" ); $url = WMS_URL . '?' . http_build_query($query1); $error_reporting = intval(ini_get('error_reporting')); error_reporting($error_reporting & ~E_WARNING); $xml = file_get_contents($url); error_reporting($error_reporting); if($xml == "") { // if failed to grab xml feed, then run the generic error handler throw new DataServerException("$url is experiencing problems"); } $xml_obj = new DOMDocument(); $xml_obj->loadXML($xml); $extent = $xml_obj->firstChild->firstChild; if(!$extent) { //IMS server does not seem to be able to find anything return; } $bbox = array(); foreach(array('minx','miny','maxx','maxy') as $key) { $bbox[$key] = (int) $extent->getAttribute($key); } self::$server_BBox = $bbox; }
} } if ($key == "COUNT(*)") { //! columns looking like functions $link = ME . "select=" . urlencode($TABLE); $i = 0; foreach ((array) $_GET["where"] as $v) { if (!array_key_exists($v["col"], $unique_array)) { $link .= where_link($i++, $v["col"], $v["val"], $v["op"]); } } foreach ($unique_array as $k => $v) { $link .= where_link($i++, $k, $v); } } $val = select_value($val, $link, $field, $text_length); $id = h("val[{$unique_idf}][" . bracket_escape($key) . "]"); $value = $_POST["val"][$unique_idf][bracket_escape($key)]; $editable = !is_array($row[$key]) && is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key]; $text = preg_match('~text|lob~', $field["type"]); if ($_GET["modify"] && $editable || $value !== null) { $h_value = h($value !== null ? $value : $row[$key]); echo "<td>" . ($text ? "<textarea name='{$id}' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>{$h_value}</textarea>" : "<input name='{$id}' value='{$h_value}' size='{$lengths[$key]}'>"); } else { $long = strpos($val, "<i>...</i>"); echo "<td id='{$id}' onclick=\"selectClick(this, event, " . ($long ? 2 : ($text ? 1 : 0)) . ($editable ? "" : ", '" . h(lang('Use edit link to modify this value.')) . "'") . ");\">{$val}"; } } } if ($backward_keys) { echo "<td>";
</td> </tr> <tr> <td><label for="latin">Latin</label></td> <td> <select name="latin"> <option value="">---</option> <?php foreach ($registry['standart_latin'] as $item) { ?> <option value="<?php echo $item; ?> " <?php select_value('latin', $registry['anket'][0]->latin, $item); ?> ><?php echo $item; ?> </option> <?php } ?> </select> </td> </tr> <tr> <td><label for="club">კლუბი</label></td> <td><input type="text" name="club" value="<?php input_value('club', $registry['anket'][0]->club);
function timefield($prefix, $time) { list($h, $i) = split(' ', formatTimestamp($time, "G i")); $buf = select_value("%02d", "{$prefix}hour", 0, 23, $h); $buf .= " : "; $buf .= select_value("%02d", "{$prefix}min", 0, 59, $i, 5); $buf .= " : 00\n"; return $buf; }
<?php if (count($registry['company']) > 0) { ?> <?php foreach ($registry['company'] as $item) { $cinfo = unserialize($item['info']); $json_info = json_encode($cinfo, JSON_UNESCAPED_UNICODE); ?> <option value="<?php echo $item['company']; ?> " data-info='<?php echo $json_info; ?> ' <?php select_value('chose_company', $registry['banner'][0]['company'], $item['company']); ?> ><?php echo $item['company']; ?> </option> <?php } } ?> </select> </td> </tr> <tr> <td>საკონტაქტო პირი</td> <td>
} break 2; //display error //display error case LIST_VALUES: $_STATE->msgGreet_prefix = $_STATE->property_name . "<br>"; $_STATE->property_id = $_STATE->record_id; //save this guy for list_values() list_values(); $_STATE->msgGreet = $_STATE->msgGreet_prefix . "Select a value to edit"; $_STATE->backup = SELECTED_PROPERTY; //for goback $_STATE->status = SELECT_VALUE; break 2; case SELECT_VALUE: select_value(); $_STATE->status = SELECTED_VALUE; //for possible goback $_STATE->replace(); //so loopback() can find it //so loopback() can find it case SELECTED_VALUE: prop_fields(); $_STATE->backup = LIST_VALUES; //for goback if ($_STATE->record_id == -1) { $_STATE->msgGreet = $_STATE->msgGreet_prefix . "New property value"; $_STATE->status = ADD_VALUE; } else { value_info(); $_STATE->msgGreet = $_STATE->msgGreet_prefix . "Edit property value?";