<?php include_once "include/koneksi.php"; include_once "include/config.php"; $sql = urlDecode($_REQUEST['sql']); $tabel = urlDecode($_REQUEST['tbl']); $sql_exe = mysqli_query($conn, $sql); $no = $hal + 1; if ($sql_exe) { $tampil .= "<table class='listing' cellpadding='0' cellspacing='0'>"; $tampil .= "<tr>"; $jum_kolom = mysqli_num_fields($sql_exe); $tampil .= "<th class='full'>No</th>"; $title = array(); for ($i = 0; $i < $jum_kolom; $i++) { $nm_kolom = mysqli_fetch_field($sql_exe); array_push($title, $nm_kolom->name); $tampil .= "<th class='full'>" . $nm_kolom->name . "</th>"; } $tampil .= "<th class='full' colspan='2'>Aksi</th>"; $tampil .= "</tr>"; while ($data = mysqli_fetch_row($sql_exe)) { $tampil .= "<tr>"; $tampil .= "<td>" . $no++ . "</td>"; for ($i = 0; $i < count($data); $i++) { $tampil .= "<td class='data' ondblclick=\"edit_inline(this,'" . $url_update . "','" . $tabel . "','" . $nama_id . "')\" title='" . $title[$i] . "'>" . $data[$i] . "</td>"; } $tampil .= "<td class='id link' title='" . $data[1] . "'><img src='img/search.png'></td><td class='id link' title='" . $data[1] . "' onclick='hapus_data(this)'><img src='img/b_usrdrop.png' /></td>"; $tampil .= "</tr>"; } $tampil .= "</table>";
public static function decrypt_other_crv($str) { $str = urlDecode($str); $key = [-36, -63, 49, 37, -56, -32, 103, -85]; $keystr = ''; foreach ($key as $ch) { $keystr .= chr($ch); } $str = base64_decode($str); $strBin = $str; // hex2bin(strtolower($str)); $td = mcrypt_module_open('des', '', 'ecb', ''); //使用MCRYPT_DES算法,cbc模式 $iv = @mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); $ks = mcrypt_enc_get_key_size($td); @mcrypt_generic_init($td, $keystr, $iv); //初始处理 $text = mdecrypt_generic($td, $strBin); //解密 mcrypt_generic_deinit($td); //结束 mcrypt_module_close($td); $pad = ord($text[strlen($text) - 1]); if ($pad > strlen($text)) { return false; } if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) { return false; } return substr($text, 0, -1 * $pad); }
public function __construct($pageCall, $pageParam) { $this->search = trim(urlDecode($pageParam)); $this->query = strtr($this->search, '?*', '_%'); // restricted access if ($this->reqUGroup && !User::isInGroup($this->reqUGroup)) { $this->error(); } // statWeight for JSON-search if (isset($_GET['wt']) && isset($_GET['wtv'])) { $this->statWeight = array('wt' => explode(':', $_GET['wt']), 'wtv' => explode(':', $_GET['wtv'])); } // select search mode if (isset($_GET['json'])) { if ($_ = intVal($this->search)) { // allow for search by Id $this->query = $_; } $type = isset($_GET['type']) ? intVal($_GET['type']) : 0; if (!empty($_GET['slots'])) { $this->searchMask |= SEARCH_TYPE_JSON | 0x40; } else { if ($type == TYPE_ITEMSET) { $this->searchMask |= SEARCH_TYPE_JSON | 0x60; } else { if ($type == TYPE_ITEM) { $this->searchMask |= SEARCH_TYPE_JSON | 0x40; } } } } else { if (isset($_GET['opensearch'])) { $this->maxResults = CFG_SQL_LIMIT_QUICKSEARCH; $this->searchMask |= SEARCH_TYPE_OPEN | SEARCH_MASK_OPEN; } else { $this->searchMask |= SEARCH_TYPE_REGULAR | SEARCH_MASK_ALL; } } // handle maintenance status for js-cases if (CFG_MAINTENANCE && !User::isInGroup(U_GROUP_EMPLOYEE) && !($this->searchMask & SEARCH_TYPE_REGULAR)) { $this->notFound(); } parent::__construct($pageCall, $pageParam); // just to set g_user and g_locale // fill include, exclude and ignore $this->tokenizeQuery(); // invalid conditions: not enough characters to search OR no types to search if ((!$this->included || !($this->searchMask & SEARCH_MASK_ALL)) && !CFG_MAINTENANCE && !($this->searchMask & SEARCH_TYPE_JSON && intVal($this->search))) { $this->mode = CACHE_TYPE_NONE; $this->notFound(); } }
function GetParameters($params) { global $scaleDenominator, $annotations; $scaleDenominator = intval($params["scale_denominator"]); $annotations = array(); // The parameters whose name matches this pattern will be treated as annotation $pattern = "/^\\{field:.+\\}\$/i"; foreach ($params as $key => $value) { if (preg_match($pattern, $key) == 1) { $annotations[$key] = htmlspecialchars(urlDecode($value), ENT_QUOTES); } } // The scale annotation $annotations["{scale}"] = "1 : " . $scaleDenominator; }
public function render($bEcho = true) { $str = ''; if ($this->page) { $str .= "<table><tr><th>Product Name</th>"; $displayedElements = App::Get()->settings['browser_products_met']; foreach ($displayedElements as $elementName) { $str .= "<th>{$elementName}</th>"; } $str .= "</tr>"; if (!App::Get()->settings['browser_private_products_visibility']) { // Get a CAS-Browser XML/RPC client $browser = new CasBrowser(); $client = $browser->getClient(); foreach ($this->pageMetadata as $key => $value) { if ($browser->getProductVisibilityLevel($key) == "deny") { unset($this->pageMetadata[$key]); foreach ($this->pageProducts as $product) { if ($product->id == $key) { $productKey = array_search($product, $this->pageProducts); unset($this->pageProducts[$productKey]); } } } } } foreach ($this->pageProducts as $product) { $str .= "<tr><td><a href=\"" . $this->urlBase . "/product/{$product->getId()}/{$this->returnPage}\">" . urlDecode(basename($product->getName())) . "</a></td>"; foreach ($displayedElements as $elementName) { $str .= "<td>" . $this->pageMetadata[$product->getId()]->getMetadata($elementName) . "</td>"; } $str .= "</tr>"; } $str .= "</table>"; } if ($bEcho) { echo $str; } else { return $str; } }
/** * The sole constructor that creates a new URL from supplied location * * @param string $location an URL */ function __construct($location) { $this->location = $location; // Regex the url into components preg_match(self::$regexURL, $location, $matches ); $this->protocol = (strLen(@$matches['proto']) > 0) ? strToLower(@$matches['proto']):null; $this->user = (strLen(@$matches['user']) > 0) ? @$matches['user']:null; $this->password = (strLen(@$matches['haspass']) > 0) ? @$matches['pass']:null; $this->host = (strLen(@$matches['host']) > 0) ? strToLower(@$matches['host']):null; //Should we get concerned on default port? // $this->port = ( ! isSet($matches['port'])) ? getProtoByName($matches['proto']) : $matches['port']; $this->port = (strLen(@$matches['port']) > 0) ? @$matches['port']:null; $this->path = rtrim(@$matches['path'],($this->resource = baseName(@$matches['path']))); //$this->resource = baseName(@$matches['path']); // $this->path = (strLen(@$matches['path']) > 1) ? str_replace('\\', '/', dirName(@$matches['path'])) . '/' : ''; // $this->resource = baseName(@$matches['path']); preg_match('~(?P<ext>\.[^.]*)~',$this->resource,$extmatches); $this->extension = @$extmatches['ext']; $this->ref = (strLen(@$matches['ref']) > 0) ? @$matches['ref']:null; //keep query as an array if (( strLen(@$matches['hasquery']) > 1) ) foreach(explode('&', $matches['query']) as $q) { list($name,$value) = @explode('=', $q, 2); if (strLen($name) > 0) { $this->query[$name] = ($value = urlDecode($value)) ? $value:''; } } else $this->query = null; }
try { $page = Utils::getPage($type, $pageNum); } catch (Exception $e) { Utils::reportError($e->getMessage(), $outputFormat); } // Get the products from the requested page -- what we're really after $pageProducts = array(); foreach ($page->getPageProducts() as $p) { array_push($pageProducts, array('product' => $p)); } // Format results if ($outputFormat == 'html') { $payload = '<ul class="pp_productList" id="product_list">'; foreach ($pageProducts as $p) { $payload .= '<li><a href="' . $module->moduleRoot . '/product/' . $p['product']->getId() . '">'; $payload .= urlDecode($p['product']->getName()) . '</a></li>'; } $payload .= "</ul>\n"; $payload .= '<input type="hidden" id="total_pages" value="' . $page->getTotalPages() . '">'; $payload .= '<input type="hidden" id="page_size" value="' . $page->getPageSize() . '">'; } elseif ($outputFormat == 'json') { $payload = array(); try { $payload['results'] = Utils::formatResults($pageProducts); $payload['totalProducts'] = $client->getNumProducts($type); } catch (Exception $e) { Utils::reportError($e->getMessage(), $outputFormat); } $payload['totalPages'] = $page->getTotalPages(); $payload['pageSize'] = $page->getPageSize(); $payload = json_encode($payload);
public static function formatResults($products) { $cb = new CasBrowser(); $client = $cb->getClient(); $results = array(); foreach ($products as $product) { try { $p = array('id' => $product['product']->getId(), 'name' => urlDecode($product['product']->getName()), 'metadata' => $client->getMetadata($product['product'])->toAssocArray()); if (isset($product['typeName'])) { $p['type'] = $product['typeName']; } array_push($results, $p); } catch (Exception $e) { throw new CasBrowserException("An error occured while formatting product [" . $product['product']->getId() . "] metadata: " . $e->getMessage()); } } return $results; }
function udecode($u) { return urlDecode(base64_decode($u)); }
private static function getRequestURI($endPoint) { $url = parse_url($endPoint); $requestURI = $url['path']; if ($requestURI == null || $requestURI == self::EMPTY_STRING) { $requestURI = "/"; } else { $requestURI = urlDecode($requestURI); } return $requestURI; }
* GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ //G::LoadSystem('json'); require_once PATH_THIRDPARTY . 'pear/json/class.json.php'; $json = new Services_JSON(); $G_FORM = new form(G::getUIDName(urlDecode($_POST['form']))); $G_FORM->id = urlDecode($_POST['form']); $G_FORM->values = $_SESSION[$G_FORM->id]; $newValues = $json->decode(urlDecode(stripslashes($_POST['fields']))); //Resolve dependencies //Returns an array ($dependentFields) with the names of the fields //that depends of fields passed through AJAX ($_GET/$_POST) $dependentFields = array(); for ($r = 0; $r < sizeof($newValues); $r++) { $newValues[$r] = (array) $newValues[$r]; $G_FORM->setValues($newValues[$r]); //Search dependent fields foreach ($newValues[$r] as $k => $v) { $myDependentFields = explode(',', $G_FORM->fields[$k]->dependentFields); $dependentFields = array_merge($dependentFields, $myDependentFields); } } $dependentFields = array_unique($dependentFields); //Parse and update the new content
<?php include_once "include/koneksi.php"; // untuk update data //$tabel = $_REQUEST['tabel']; $sql = urlDecode($_REQUEST['sql']); $sql = stripslashes($sql); // hapus tanda / $sql_exe = mysql_query($sql); if ($sql_exe) { echo mysql_num_rows($sql_exe); }
protected static function decodeValue($value) { return urlDecode($value); }
<?php if (!isset($_GET['path'])) { die('This script is for displaying an HTML frameset and must be called with a URL parameter. It\'s not for direct access, it\'s called on document previews.'); } $pathToUse = ensureOnlyValidCharacters(urlDecode($_GET['path'])); $pathToUse = str_replace('\\', '/', $pathToUse) . '/'; $pathToUse = str_replace('/', DIRECTORY_SEPARATOR, $pathToUse); $thereIsAPreview = file_exists($pathToUse . 'test.html'); $configFilenamesPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'custom-filenames.php'; include_once $configFilenamesPath; $customFileNames = getCustomFilenames(); $chosenFile = null; $filesToDisplay = array($customFileNames[0], 'index.*', 'default.*', '*.odt'); foreach ($filesToDisplay as $fileToDisplay) { $possibleFile = getFirstByPattern($pathToUse . $fileToDisplay); if ($possibleFile) { $chosenFile = $possibleFile; break; } } if (!$chosenFile) { $filesToDisplayAsString = null; foreach ($filesToDisplay as $fileToDisplay) { $filesToDisplayAsString .= '"' . $fileToDisplay . '", '; } $filesToDisplayAsString = trim($filesToDisplayAsString); $filesToDisplayAsString = substr($filesToDisplayAsString, 0, strlen($filesToDisplayAsString) - 1); $filesInPreviewDirectory = glob($pathToUse . '*'); die('Docvert or pipeline error: Unable to determine the file to preview. I searched for the filename patterns ' . $filesToDisplayAsString . ' were tested but do not exist. Was given pathToUse of <tt>"' . $pathToUse . '"</tt> which contained <pre>' . revealXml(print_r($filesInPreviewDirectory, true)) . '</pre>'); }
function _upgrade_info_decode_val($str) { return urlDecode($str); }
//echo "$sroot<br /> " . __FILE__ . "<br/> ". $fileDir; if ($fileDir == '/home/qiushaowei/htdocs/uxcjs/tools/php') { $fileDir = '/~qiushaowei/uxcjs/tools/php'; } if ($fileDir == '/home/qiushaowei/htdocs/jcjs/tools/php') { $fileDir = '/~qiushaowei/jcjs/tools/php'; } $base_path = './'; $key = 'imququin360'; $aes = new AES(true); $keys = $aes->makeKey($key); $blacklist_folder = array('.', '..', '.svn', '.git'); $whitelist_fileext = array('html', 'htm', 'js', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ppt', 'pptx', 'doc', 'php', 'docx'); $path = empty($_GET['p']) ? '' : trim($_GET['p']); $path = $aes->decryptString(trim($path), $keys); $path = urlDecode($path); $path_arr = explode('/', trim($path, '/')); $list = scandir($base_path . $path); if ($list === false) { die('not exist!'); } $dir_list = array(); $file_list = array(); foreach ($list as $item) { $new_path = $path . $item; if (is_dir($base_path . $new_path)) { array_push($dir_list, $item); } else { array_push($file_list, $item); } }
?> <div style="float: right;"> <a href="#" class="caDeleteItemButton"><?php print caNavIcon($this->request, __CA_NAV_BUTTON_DEL_BUNDLE__); ?> </a> </div> <?php } ?> <div class="caListItem"> <span class="formLabel">{locale} ({filesize})</span> <?php print urlDecode(caNavLink($this->request, caNavIcon($this->request, __CA_NAV_BUTTON_DOWNLOAD__, null, array('align' => 'top')), '', '*', '*', 'downloadCaptionFile', array('representation_id' => $t_instance->getPrimaryKey(), 'caption_id' => "{caption_id}", 'download' => 1), array('id' => "{$vs_id_prefix}download{caption_id}", 'class' => 'attributeDownloadButton'))); ?> <input type="hidden" name="<?php print $vs_id_prefix; ?> _caption_id{n}" id="<?php print $vs_id_prefix; ?> _caption_id{n}" value="{caption_id}"/> </div> </div> </textarea>
function getMysqlParam($name) { #---------------------------------------------------------------------- $value = urlDecode(getRawParamThisShouldBeAnException($name)); $value = mysql_real_escape_string($value); debugParameter('mysql', $name, htmlEntities($value, ENT_QUOTES)); return $value; }
/** * Return attribute display value. * * @param array $pa_options * @return string * * Options: * showMediaInfo - if true media info (dimensions, filesize, bit depth) is returns as part of display; default is false * version - name of media version to return; default is 'thumbnail' * return - valid settings are url, tag, path; if set to a valid value then the url, tag or path for the media is returned rather than display HTML * * You can also pass other options to be passed-through to the underlying media plugin. Useful ones for video include: * viewer_width (also used for audio and tilepic image versions) * viewer_height (also used for audio and tilepic image versions) * poster_frame_version (which will be transformed into the correct poster_frame_url) */ public function getDisplayValue($pa_options = null) { if (!is_array($pa_options)) { $pa_options = array(); } if (isset($pa_options['forDuplication']) && $pa_options['forDuplication']) { $pa_options['return'] = 'path'; $pa_options['version'] = 'original'; } if (!isset($pa_options['showMediaInfo'])) { $pa_options['showMediaInfo'] = false; } if (!isset($pa_options['version'])) { $pa_options['version'] = 'thumbnail'; } $vs_version = $pa_options['version']; $vs_class = trim(isset($pa_options['class']) && $pa_options['class'] ? $pa_options['class'] : ''); if (!isset($pa_options['return'])) { $pa_options['return'] = null; } else { $pa_options['return'] = strtolower($pa_options['return']); } switch ($pa_options['return']) { case 'url': return $this->opo_media_info_coder->getMediaUrl($this->opa_media_data, $vs_version); break; case 'tag': return $this->opo_media_info_coder->getMediaTag($this->opa_media_data, $vs_version); break; case 'path': return $this->opo_media_info_coder->getMediaPath($this->opa_media_data, $vs_version); break; } if ($vs_url = $this->opo_media_info_coder->getMediaUrl($this->opa_media_data, 'original')) { AssetLoadManager::register('panel'); $va_info = $this->opo_media_info_coder->getMediaInfo($this->opa_media_data); $vs_dimensions = ''; if ($pa_options['showMediaInfo']) { $va_dimensions = array($va_info['INPUT']['MIMETYPE']); if ($va_info['ORIGINAL_FILENAME']) { $vs_filename = $va_info['ORIGINAL_FILENAME']; } else { $vs_filename = _t('Uploaded file'); } if (isset($va_info['original']['WIDTH']) && isset($va_info['original']['HEIGHT'])) { if (($vn_w = $va_info['original']['WIDTH']) && ($vn_h = $va_info['original']['WIDTH'])) { $va_dimensions[] = $va_info['original']['WIDTH'] . 'p x ' . $va_info['original']['HEIGHT'] . 'p'; } } if (isset($va_info['original']['PROPERTIES']['bitdepth']) && ($vn_depth = $va_info['original']['PROPERTIES']['bitdepth'])) { $va_dimensions[] = intval($vn_depth) . ' bpp'; } if (isset($va_info['original']['PROPERTIES']['colorspace']) && ($vs_colorspace = $va_info['original']['PROPERTIES']['colorspace'])) { $va_dimensions[] = $vs_colorspace; } if (isset($va_info['original']['PROPERTIES']['resolution']) && is_array($va_resolution = $va_info['original']['PROPERTIES']['resolution'])) { if (isset($va_resolution['x']) && isset($va_resolution['y']) && $va_resolution['x'] && $va_resolution['y']) { // TODO: units for resolution? right now assume pixels per inch if ($va_resolution['x'] == $va_resolution['y']) { $va_dimensions[] = $va_resolution['x'] . 'ppi'; } else { $va_dimensions[] = $va_resolution['x'] . 'x' . $va_resolution['y'] . 'ppi'; } } } if (isset($va_info['original']['PROPERTIES']['duration']) && ($vn_duration = $va_info['original']['PROPERTIES']['duration'])) { $va_dimensions[] = sprintf("%4.1f", $vn_duration) . 's'; } if (isset($va_info['original']['PROPERTIES']['pages']) && ($vn_pages = $va_info['original']['PROPERTIES']['pages'])) { $va_dimensions[] = $vn_pages . ' ' . ($vn_pages == 1 ? _t('page') : _t('pages')); } if (!isset($va_info['original']['PROPERTIES']['filesize']) || !($vn_filesize = $va_info['original']['PROPERTIES']['filesize'])) { $vn_filesize = 0; } if ($vn_filesize) { $va_dimensions[] = sprintf("%4.1f", $vn_filesize / (1024 * 1024)) . 'mb'; } if (!isset($va_info['PROPERTIES']['filesize']) || !($vn_filesize = $va_info['PROPERTIES']['filesize'])) { $vn_filesize = @filesize($this->opo_media_info_coder->getMediaPath($this->opa_media_data, 'original')); } if ($vn_filesize) { $va_dimensions[] = sprintf("%4.2f", $vn_filesize / (1024 * 1024)) . 'mb'; } $vs_dimensions = join('; ', $va_dimensions); } if (isset($pa_options['poster_frame_version']) && $pa_options['poster_frame_version']) { $pa_options['poster_frame_url'] = $this->opo_media_info_coder->getMediaUrl($this->opa_media_data, $pa_options['poster_frame_version']); } $vs_tag = $this->opo_media_info_coder->getMediaTag($this->opa_media_data, $vs_version, $pa_options); if (is_object($pa_options['request'])) { $vs_view_url = urldecode(caNavUrl($pa_options['request'], $pa_options['request']->getModulePath(), $pa_options['request']->getController(), 'GetMediaOverlay', array('value_id' => $this->opn_value_id))); $vs_val = "<div id='caMediaAttribute" . $this->opn_value_id . "' class='attributeMediaInfoContainer'>"; $vs_val .= "<div class='attributeMediaThumbnail'>"; $vs_val .= "<div style='float: left;'>" . urlDecode(caNavLink($pa_options['request'], caNavIcon($pa_options['request'], __CA_NAV_BUTTON_DOWNLOAD__, array('align' => 'middle')), '', $pa_options['request']->getModulePath(), $pa_options['request']->getController(), 'DownloadAttributeMedia', array('download' => 1, 'value_id' => $this->opn_value_id), array('class' => 'attributeDownloadButton'))) . "</div>"; $vs_val .= "<a href='#' onclick='caMediaPanel.showPanel(\"{$vs_view_url}\"); return false;'>{$vs_tag}</a>"; $vs_val .= "</div>"; if ($pa_options['showMediaInfo']) { $vs_val .= "<div class='attributeMediaInfo'><p>{$vs_filename}</p><p>{$vs_dimensions}</p></div>"; } $vs_val .= "</div>"; } else { $vs_val = "<div id='caMediaAttribute" . $this->opn_value_id . "' class='attributeMediaInfoContainer'><div class='attributeMediaThumbnail'>{$vs_tag}</div></div>"; } if ($pa_options['showMediaInfo']) { TooltipManager::add('#caMediaAttribute' . $this->opn_value_id, "<h2>" . _t('Media details') . "</h2> <p>{$vs_filename}</p><p>{$vs_dimensions}</p>"); } } return $vs_val; }
eval($_SESSION['CURRENT_PAGE_INITILIZATION']); } //G::LoadSystem('json'); //require_once (PATH_THIRDPARTY . 'pear/json/class.json.php'); //$json = new Services_JSON(); $G_FORM = new form(G::getUIDName(urlDecode($_POST['form']))); $G_FORM->id = urlDecode($_POST['form']); $G_FORM->values = $_SESSION[$G_FORM->id]; G::LoadClass('xmlDb'); $file = G::decrypt($G_FORM->values['PME_A'], URL_KEY); define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml'); define('DB_XMLDB_USER', ''); define('DB_XMLDB_PASS', ''); define('DB_XMLDB_NAME', ''); define('DB_XMLDB_TYPE', 'myxml'); $newValues = Bootstrap::json_decode(urlDecode(stripslashes($_POST['fields']))); //Resolve dependencies //Returns an array ($dependentFields) with the names of the fields //that depends of fields passed through AJAX ($_GET/$_POST) $dependentFields = array(); $aux = array(); for ($r = 0; $r < sizeof($newValues); $r++) { $newValues[$r] = (array) $newValues[$r]; $G_FORM->setValues($newValues[$r]); //Search dependent fields foreach ($newValues[$r] as $k => $v) { $myDependentFields = subDependencies($k, $G_FORM, $aux); $dependentFields = array_merge($dependentFields, $myDependentFields); } } $dependentFields = array_unique($dependentFields);
$edit = $_REQUEST['edit']; if ($edit == 1) { $ondblclick = "ondblclick=\"edit_inline(this,'" . $url_update . "','" . $tabel . "','" . $nama_id . "')\""; } else { $ondblclick = ""; } if (isset($_REQUEST['hal'])) { $hal = ($_REQUEST['hal'] - 1) * $limit; $hal_terpilih = $_REQUEST['hal']; $bag_sekarang = $_REQUEST['bag']; } else { $hal = 0; $hal_terpilih = 1; $bag_sekarang = 1; } $sql_kirim = urlDecode($_REQUEST['sql']); $sql_kirim = stripslashes($sql_kirim); $sql = $sql_kirim . " order by " . $nama_id . " limit {$hal},{$limit}"; $sql_exe = mysql_query($sql); $no = $hal_ke = $hal + 1; if ($sql_exe) { $tampil .= "<table class='listing' cellpadding='0' cellspacing='0'>"; $tampil .= "<tr>"; $jum_kolom = mysql_num_fields($sql_exe); $tampil .= "<th class='full'>No</th>"; $title = array(); for ($i = 0; $i < $jum_kolom; $i++) { $nm_kolom = mysql_field_name($sql_exe, $i); array_push($title, $nm_kolom); $tampil .= "<th class='full'>" . $nm_kolom . "</th>"; }
<?php include "C:/php_connectionScript/cwl_connection.php"; define(PATH_ROOT, 'C:\\www.citywildlife.org.uk\\test\\photos'); $area_name = $_GET['name']; //get the area name from the querystring if ($area_name !== null) { $area_name = urlDecode($area_name); echo $area_name; if ($objDBConn = ocilogon("{$username}", "{$password}", "{$sid}")) { //connect to database $strSQL = "SELECT d.name,\n b.filename as obs_photo,\n c.filename as lscape_photo\n FROM T_observations a,\n T_observation_species b,\n T_landscape_photos c,\n T_AREAS d\n \n WHERE a.observation_id = b.observation_id (+)\n AND a.observation_id = c.observation_id (+)\n AND a.area_id = d.area_id\n AND d.name = '{$area_name}'\n AND (b.filename IS NOT NULL OR c.filename IS NOT NULL)"; echo $strSQL; $objQuery = OCIParse($objDBConn, $strSQL); //parse query string OCIExecute($objQuery, OCI_BOTH); //execute SQL statement $row = oci_fetch_array($objQuery, OCI_ASSOC); if ($row !== null) { //test for an empty return echo "fname:" . $row[0]; $fname = ""; if ($row["obs_photo"]) { $fname = PATH_ROOT . "\\species\\t_" . $row["obs_photo"]; } else { if ($row["lscape_photo"]) { $fname = PATH_ROOT . "\\landscape\\t_" . $row["lscape_photo"]; } } echo "fname:" . $row; echo "fname:" . $row["lscape_photo"];
<!-- <?php get_header('2columns'); while (have_posts()) { the_post(); ?> <div class="lead"> <img src="<?php bloginfo('stylesheet_directory'); ?> /2columns-<?php echo sanitize_title(urlDecode($post->post_name)); ?> .gif" /> <h2><?php the_title(); ?> </h2> <h6><?php the_excerpt(); ?> </h6> </div> <div class="post"><?php the_content(); ?> </div> <?php }
$_SESSION[$G_FORM->id][$k] = $v; } else { foreach ($v[$_POST['row']] as $k1 => $v1) { $myDependentFields = subDependencies($k1, $G_FORM, $aux, $_POST['grid']); $_SESSION[$G_FORM->id][$_POST['grid']][$_POST['row']][$k1] = $v1; $G_FORM->values[$_POST['grid']][$_POST['row']][$k1] = $v1; } } $dependentFields = array_merge($dependentFields, $myDependentFields); } } $dependentFields = array_unique($dependentFields); //Delete all dependencies of all fields, we're interested only in the fields sending from AJAX, this in grids $arrayFieldSubDependent = array(); if (isset($_POST["grid"])) { $arrayField = (array) Bootstrap::json_decode(urlDecode(stripslashes($_POST["fields"]))); $arrayDependentField = array(); $ereg = null; foreach ($arrayField as $fieldData) { $arrayAux = (array) $fieldData; foreach ($arrayAux as $index => $value) { $ereg = $ereg . ($ereg != null ? "|" : null) . $index; //Concatenate field } } if ($ereg != null) { foreach ($dependentFields as $value) { //Direct dependent fields if (preg_match("/^(?:{$ereg})\\|[^\\|]*\$/", $value)) { $arrayAux = explode("|", $value); $arrayDependentField[] = $arrayAux[1];
/** * Do convert the slugs */ function action_save() { global $wpdb; // do convert post slugs // if (isset($_POST['post_slugs']) && $_POST['post_slugs']) { $posts = $wpdb->get_results("\n\t\t\t\tSELECT `ID`, `post_name`\n\t\t\t\tFROM `{$wpdb->posts}`\n\t\t\t\tWHERE `post_name` LIKE '%\\%%'\n\t\t\t\t"); foreach ($posts as $post) { $wpdb->query("\n\t\t\t\t\tUPDATE `{$wpdb->posts}`\n\t\t\t\t\t\tSET `post_name` = '" . $wpdb->escape(sanitize_title(urlDecode($post->post_name))) . "'\n\t\t\t\t\tWHERE ID = " . $wpdb->escape($post->ID)); add_post_meta($post->ID, '_wp_old_slug', $post->post_name); } } // do convert term slugs // if (isset($_POST['term_slugs']) && $_POST['term_slugs']) { $terms = $wpdb->get_results("\n\t\t\t\tSELECT `term_id`, `slug`\n\t\t\t\tFROM `{$wpdb->terms}`\n\t\t\t\tWHERE `slug` LIKE '%\\%%'\n\t\t\t\t"); foreach ($terms as $term) { $wpdb->query("\n\t\t\t\t\tUPDATE `{$wpdb->terms}`\n\t\t\t\t\t\tSET `slug` = '" . $wpdb->escape(sanitize_title(urlDecode($term->slug))) . "'\n\t\t\t\t\tWHERE term_id = " . $wpdb->escape($term->term_id)); } } wp_admin_page::redirect(remove_query_arg(array('converted'), $_SERVER['REQUEST_URI']) . '&converted=1', 1); }
private function getRequestURI($endPoint) { $url = parse_url($endPoint); $requestURI = $url['path']; if (!isset($requestURI)) { $requestURI = "/"; } else { $requestURI = urlDecode($requestURI); } return $requestURI; }
<input type="hidden" name="parent" value="<?php echo $this->parent; ?> " /> <input type="hidden" name="couponbg" value="<?php echo $this->couponbg; ?> " /> <fieldset> <legend><?php echo JText::_('Review'); ?> </legend> <?php if (!empty($this->imageUrl)) { $imagePathArr = unserialize(urlDecode($this->imageUrl)); for ($i = 0; $i < count($imagePathArr); $i++) { $link = 'http://'; $link .= $_SERVER["SERVER_NAME"] . $link_server . DS; $link .= $imagePathArr[$i]; $link = str_replace("\\", "/", $link); $imageLinkArr[$i] = $link; } ?> <div style="folat:left;"> <input type="text" size ="80" name="image-dir" id='image-dir' value="<?php echo urlencode($this->imageUrl); ?> "/> <input type="button" onclick="insertURL('<?php echo $this->parentId;